Slide 1

Slide 1 text

1)1ʹܕਪ࿦Λ࣮૷͢Δʙೖ໳ฤʙ ٱอాޫଇ!BOBUPP

Slide 2

Slide 2 text

ࣗݾ঺հ w ٱอాޫଇ!BOBUPP w 6*69σβΠφʔ݉
 ιϑτ΢ΣΞΤϯδχΞ w "TQFDUJWF--$୅ද w IUUQBTQFDUJWFJP

Slide 3

Slide 3 text

w "TQFDUJWF--$͸1)1ΧϯϑΝϨϯε෱Ԭʹڠࢍ͍ͯ͠·͢

Slide 4

Slide 4 text

޷ධൃചதʂ

Slide 5

Slide 5 text

IUUQPOTFOJP

Slide 6

Slide 6 text

ΞδΣϯμ w ܕਪ࿦ͱ͸ w ͳͥ1)1Ͱܕਪ࿦ w ಈతݴޠͰͷܕਪ࿦ͷϝϦοτ w 1)1ͷ"45ͷଘࡏ w ܕਪ࿦ΞϧΰϦζϜͷ঺հ

Slide 7

Slide 7 text

ܕਪ࿦ͱ͸

Slide 8

Slide 8 text

ܕਪ࿦8JLJQFEJB IUUQTKBXJLJQFEJBPSHXJLJ&&#&&"&"# lܕਪ࿦ʢ͔͍ͨ͢ΖΜʣͱ͸ϓϩάϥϛϯάݴ ޠͷػೳͷͭͰɺ੩తͳܕ෇͚Λ࣋ͭݴޠʹ ͓͍ͯɺม਺΍ؔ਺ͷܕΛએݴ͠ͳͯ͘΋ͦΕ Λಋ͘ͷʹ࢖ΘΕͨؔ਺ͷܕγάωνϟͳͲ͔ ΒࣗಈతʹܕΛܾఆ͢Δػߏͷ͜ͱɻz

Slide 9

Slide 9 text

ྫ4XJGU w ܕ৘ใΛॻ͔ͳͯ͘΋ܕΛਪ࿦ͯ͠ίϯύΠϧͯ͘͠ΕΔ w ͋͘·Ͱ੩తܕ෇͚ͳͷͰpC/VNCFSͷܕ͸*OU func fib(number: Int) -> Int { if number <= 1 { return number } else { return fib(number - 1) + fib(number - 2) } } var fibNumber = fib(8)

Slide 10

Slide 10 text

ܕਪ࿦Λ࣋ͭݴޠ w 4DBMB w )BTLFMM w 0$BNM w 4XJGU w શͯ੩తܕ෇͚ͷݴޠ

Slide 11

Slide 11 text

ಈతܕ෇͚ݴޠͰ͸ w 1)1͸ಈతܕ෇͚ݴޠ w ίϯύΠϧ࣌ʹܕ͕ܾ·Δඞཁ͸ͳ͍ w ܕਪ࿦Λॻ͘ඞཁͳΜͯͳ͍ͷͰ͸

Slide 12

Slide 12 text

w ಈతܕ෇͚ͷݴޠͰ΋ܕਪ࿦ͷϝϦοτ͸ ͋Δ w ͱ͍͏͔ɺ͢ͰʹΈͳ͞Μ࣮͸ܕਪ࿦ͷԸ ܙΛҰ෦त͔͍ͬͯΔ

Slide 13

Slide 13 text

ಈతݴޠͰͷϝϦοτ w ίϯύΠϧ࣌࠷దԽ w ΤσΟλ΍*%&Ͱͷิ׬ w ࣄલͷΤϥʔݕ஌

Slide 14

Slide 14 text

ίϯύΠϧ࣌࠷దԽ w ಈతݴޠͰ͸ɺ࣮ߦ࣌ʹͲͷܕ͕ೖͬͯ΋ ໰୊ͳ࣮͘ߦͰ͖ΔΑ͏ʹઃܭ͞Ε͍ͯΔ w ͦͷͨΊ࣮ߦ࣌ͷ੩తܕ෇͚ݴޠʹൺ΂Δ ͱΦʔόʔϔου͕େ͖͍

Slide 15

Slide 15 text

ྫ1)1ͷԋࢉࢠͷॲཧ

Slide 16

Slide 16 text

IUUQTHJUIVCDPNQIQQIQTSDCMPCNBTUFS;FOE[FOE@PQFSBUPSTD- w ࣮ߦ࣌ʹͲͷܕͷ૊Έ߹Θ͔ͤΛTXJUDIจͰ෼ذ

Slide 17

Slide 17 text

ܕਪ࿦Λ࢖͑͹ w ྫ͑͹zBCzͷBͱCͷܕ͕ܕਪ࿦ͰΘ͔Ε ͹ɺίϯύΠϧ࣌ʹͦΕઐ༻ͷߴ଎ͳॲཧ ʹࠩ͠ସ͑Δ͜ͱ͕Ͱ͖Δ͸ͣ w ֦ுϥΠϒϥϦͰΦϓςΟϚΠβॻ࣌͘ʹ ໾ཱͪͦ͏

Slide 18

Slide 18 text

+4ͰͷྫIUUQSGSOPSHdTIVESBGUTUJQEG

Slide 19

Slide 19 text

*%&Ͱͷϝιουͷิ׬ w *%& 1IQ4UPSNͱ͔ Ͱɺ͋Δม਺ͷΠϯελϯεϝιου ͕ิ׬͞ΕΔͷ͸ɺܕਪ࿦͞Ε͍ͯΔ͔ΒʹଞͳΒͳ͍

Slide 20

Slide 20 text

Τϥʔݕ஌ɾ-JOU w ܕਪ࿦Ͱܕͷໃ६͕ݟ͔ͭΕ͹ɺ࣮ߦલʹ ΤϥʔΛग़͢͜ͱ͕Ͱ͖Δ w *%&΍ΤσΟλͷΤϥʔݕ஌΍ɺ-JOUπʔϧ ͳͲͰԠ༻Ͱ͖Δ

Slide 21

Slide 21 text

༻్·ͱΊ w ิ׬΍MJOUπʔϧͳͲɺ։ൃऀΛࢧԉ͢Δ੩ తղੳπʔϧͷ࣮૷ʹ໾ཱͯΒΕΔ w ֦ுϥΠϒϥϦͰ͕Μ͹Ε͹ɺ࠷దԽ͞Ε ͨPQDPEFΛు͘ࣄ΋Մೳ

Slide 22

Slide 22 text

1)1Ͱͷػӡ

Slide 23

Slide 23 text

1)1Ͱͷػӡ w 4DBMBS5ZQF)JOUT͕ಋೖ͞Εͨ w ؔ਺ͷฦΓ஋ͷܕΛࢦఆ͕Մೳʹ w ݫີͳܕνΣοΫͷಋೖ w "45 ந৅ߏจ໦ ͷಋೖ

Slide 24

Slide 24 text

4DBMBS5ZQF)JOUT w JOU΍qPBU΍TUSJOH΍CPPMͳͲͷεΧϥ஋ͷܕ͕5ZQF)JOUͰ ࢦఆͰ͖Δ w ࣗಈతʹΩϟετ͞ΕΔΏΔ͍λΠϓνΣοΫ 9 square(4.1); // => 16

Slide 25

Slide 25 text

ؔ਺ͷ໭Γܕ w ؔ਺ͷ໭Γ஋ͷܕ΋ࢦఆͰ͖ΔΑ͏ʹͳͬ ͨ

Slide 26

Slide 26 text

ݫ֨ͳܕࢦఆ w એݴͨ͠ϑΝΠϧͰ͸ܕ͕ݫ֨ʹѻΘΕΔ w ҉໧ͷΩϟετ͕ߦΘΕͳ͍Ϟʔυʹ

Slide 27

Slide 27 text

1)1Ͱͷܕͷѻ͍ͷมԽ w ໭Γ஋ͷܕνΣοΫΛએݴͰ͖ΔΑ͏ʹͳͬͨ w ݫີʹએݴͰ͖ΔΑ͏ʹͳͬͨ w ϓϦϛςΟϒͳ஋ͷܕ͕ࢦఆͰ͖ΔΑ͏ʹͳͬ ͨ w ੩తղੳ͠΍͘͢ͳͬͨ

Slide 28

Slide 28 text

1)1ͷ"45 w ैདྷͰ͸ɺ"45͸ੜ੒ͤͣʹ;FOE&OHJOF ༻ͷ໋ྩΛίϯύΠϧ͍ͯͨ͠ w 1)1Ͱ͸ɺίϯύΠϧ࣌ʹ"45Λੜ੒͢Δ Α͏ʹͳͬͨ

Slide 29

Slide 29 text

"45 ந৅ߏจ໦ ͱ͸ w ύʔεͨ͠ίʔυͷந৅తͳπϦʔߏ଄ͷσʔλ IUUQTpSFCFBSTUVEJPDPNCMPHIPXUPHFUSFBEZGPSQIQIUNM for ($i = 0; $i < 4; $i++) { ... }

Slide 30

Slide 30 text

ࣈ۟ղੳ ߏจղੳίϯύΠϧ ࣮ߦ w 1)1Ͱ͸ɺߏจղੳ͠ͳ͕Β7.༻ίʔυΛੜ੒ w CJTPOͷηϚϯςΟοΫΞΫγϣϯͰ׬݁ τʔΫϯͷϦετΛੜ੒ ύʔεͭͭ͠7.༻ͷ໋ྩΛੜ੒ ಺෦7.Ͱ࣮ߦ 1)1Ͱͷ࣮ߦͷྲྀΕ

Slide 31

Slide 31 text

τʔΫϯͷϦετΛੜ੒ ந৅ߏจ໦ "45 ͷੜ੒ ಺෦7.༻ͷ໋ྩΛੜ੒ ಺෦7.Ͱ࣮ߦ ࣈ۟ղੳ ߏจղੳ ίϯύΠϧ ࣮ߦ w 1)1Ͱ͸ɺߏจղੳ࣌ʹ͸"45Λੜ੒ w 7.༻ͷίʔυੜ੒͸ͦͷޙʹߦ͏Α͏ʹͳͬͨ 1)1Ͱͷ࣮ߦͷྲྀΕ

Slide 32

Slide 32 text

1)1"45֦ுϥΠϒϥϦ w ैདྷίϯύΠϧ͕ऴΘΕ͹"45͸ࣺͯΒΕΔ w 1)1͔ΒͰ΋ந৅ߏจ໦Λѻ͏͜ͱ͕Ͱ͖ ΔΑ͏ʹ͢Δ֦ுϥΠϒϥϦ w ந৅ߏจ໦ΛऔΓग़ͯ͠੩తղੳͰ͖Δ IUUQTHJUIVCDPNOJLJDQIQBTU

Slide 33

Slide 33 text

Slide 34

Slide 34 text

ग़ྗ w WBSͱ͍͏ίʔυͷߏจ໦͕औΕ͍ͯΔ w ͜ΕͰ੩తղੳ͠์୊ͩʂ AST_STMT_LIST 0: AST_ASSIGN var: AST_VAR name: "var" expr: 42

Slide 35

Slide 35 text

ܕਪ࿦ͷ֓ཁ

Slide 36

Slide 36 text

ܕਪ࿦ثͷ௒جຊతͳಈ͖ w ͱ͍͏දݱΛܕਪ࿦ثʹ༩͑Δ৔߹ w ܕਪ࿦ث͸ɺந৅ߏจ໦ͷܭࢉ΍એݴΛਫ਼ࠪͯ͠ਪ࿦نଇ Λݩʹܕ৘ใΛܭࢉ͍ͯ͘͠ JOUFHFS JOUFHFS JOUFHFS

Slide 37

Slide 37 text

ޡΓ͕͋Δ৔߹ w OFX0CKFDU ͱ͍͏ίʔυΛਪ࿦ثʹ౉͢৔߹ w ܕϨϕϧͰޡΓ͕͋Ε͹࣮ߦલʹΤϥʔΛग़͢ OFX 0CKFDU &3303 0CKFDU JOUFHFS OFX 0CKFDU

Slide 38

Slide 38 text

ਪ࿦ͷϙΠϯτ w &YQSFTTJPOͷߏจ໦ͷ຤୺͔Βਪ࿦Λ࢝ΊΔ w ਪ࿦نଇʹԠͯ͡ਪ࿦͍ͯ͘͠ w Θ͔Βͳ͍৔߹ʹ͸ܕม਺Λ෇Ճ w ੍ݶʹԠͯ͡ϢχϑΟέʔγϣϯΛߦ͏ w ܕม਺ͷ୅ೖɾΤϥʔͷݕ஌ w ਪ࿦͕Ͱ͖ͨ৔߹ʹ͸ܕ؀ڥʹ൓ө͍ͯ͘͠

Slide 39

Slide 39 text

຤୺͔Βਪ࿦͢Δ w ͋ΔܭࢉΛਪ࿦͢Δ৔߹ʹ͸ɺԼ෦ͷϊʔυ͔Βਪ࿦͍ͯ͘͠ w ߏจ໦Λ࠶ؼతʹḷͬͯߦ͘͜ͱͰՄೳ JOUFHFS JOUFHFS JOUFHFS JOUFHFS JOUFHFS

Slide 40

Slide 40 text

ਪ࿦نଇʹΑͬͯਪ࿦͍ͯ͘͠ w ྫF ͱF ͷܕ͕JOUͰ͋Δ࣌ɺ F F ͷܕ͸JOUͰ͋Δ w ྫF ͱF ͷܕ͕BSSBZͰ͋Δ࣌ɺ F F ͷܕ͸BSSBZͰ͋Δ w ྫF ͷܕ͕0CKFDUͱF ͷܕ͕JOUͰ͋Δ࣌ɺλΠϓΤϥʔͰ͋Δ w ߏจ໦ΛͨͲ͍ͬͯ࣌͘ʹਪ࿦نଇΛద༻ w نଇ͸۪௚ʹίʔυΛॻ͍͍ͯ͘ w ܕ͕Θ͔ͬͨΒܕ؀ڥʹ൓ө͍ͯ͘͠

Slide 41

Slide 41 text

ܕ؀ڥ w ؔ਺΍ΫϥεͳͲͷܕ৘ใΛొ࿥͢Δ৔ॴ w ૊ΈࠐΈؔ਺ͷܕ৘ใ͸༧Ίొ࿥ w ίʔυΛղੳͯ͠ਪ࿦Ͱ͖ͨ݁ՌΛ֨ೲ w ܕਪ࿦ثͷ࣮ߦίϯςΩετΈ͍ͨͳ΋ͷ

Slide 42

Slide 42 text

ܕ͕Θ͔Βͳ͍৔߹ w Bͷܕ͕Θ͔Βͳ͍ w ܕม਺ΛׂΓ౰ͯͯɺ൑அΛ஗Ԇͤ͞Δ B JOUFHFS

Slide 43

Slide 43 text

ܕม਺ w ܕͱͯ͠ѻ͑ΔೖΕ෺ɻޙͰதʹ࣮ࡍͷܕΛ୅ೖͰ͖Δ w ܕ͕Θ͔Βͳ͍৔߹ʹ͸ܕม਺ΛׂΓ౰ͯΔ JOU TUSJOH 'PP

Slide 44

Slide 44 text

ׂΓ౰ͯΔྫ w ྫ͑͹ؔ਺ͷԾҾ਺΍ฦΓ஋ʹܕ͕ࢦఆ͞ Ε͍ͯͳ͍৔߹

Slide 45

Slide 45 text

ܕม਺΁ͷ୅ೖ w ϢχϑΟέʔγϣϯΛ௨ͯ͡୅ೖ͢Δ JOU =

Slide 46

Slide 46 text

ϢχϑΟέʔγϣϯ ୯ҰԽ w ܕਪ࿦தʹ૒ํ޲ͷ୅ೖΛߦ͏ͨΊͷ࢓૊Έ w ࣦഊͨ͠৔߹͸ܕϨϕϧͰؒҧ͍͕͋ΔͱΈͳ ͯ͠Τϥʔ w ܕͷ੍ݶ͕͋ΔՕॴͰϢχϑΟέʔγϣϯΛߦ ͏

Slide 47

Slide 47 text

ϢχϑΟέʔγϣϯ͸ܕͷ੍ ݶ͕͔͔ΔՕॴͰ࣮ߦ͢Δ

Slide 48

Slide 48 text

ԾҾ਺ͷܕͱҾ਺ͷܕ w OVNͷܕͱBҾ਺ͷܕ͸ಉ͡Ͱͳ͚Ε͹ͳΒͳ͍

Slide 49

Slide 49 text

SFUVSOͷܕͱฦΓ஋ͷܕએݴ w SFUVSOͷදݱͷܕͱฦΓ஋ͷܕએݴ͸ಉ͡Ͱͳ ͚Ε͹ͳΒͳ͍

Slide 50

Slide 50 text

ྫ w Կ΋͠ͳ͍ɻܕ͕͋ͬͯΔͷͰେৎ෉ function foobar(): int { return 1; } JOUJOU ੒ޭ

Slide 51

Slide 51 text

ྫ function foobar(): int { return “hoge”; } JOUTUSJOH Τϥʔ w ܕ͕͋ͬͯͳ͍ͷͰΤϥʔΛग़͢

Slide 52

Slide 52 text

ྫ w GPPCBSؔ਺ͷฦΓ஋ͷܕม਺BʹJOU͕୅ೖ͞ΕΔ function foobar() { return 1; } BJOU BʹJOUΛ୅ೖ ฦΓ஋ͷܕʹܕม਺BΛׂΓ౰ͯ

Slide 53

Slide 53 text

ྫ w ΋͠ܕม਺ʹผͷܕ͕͢Ͱʹೖ͍ͬͯΔ৔߹ʹ ͸Τϥʔ function foobar(): int { return $globalNum; } JOUC ܕม਺CʹJOUΛ࣮૷ ܕม਺CΛׂΓ౰ͯ

Slide 54

Slide 54 text

ྫ w Ҿ਺ͷܕͱฦΓ஋ͷܕ͕ಉ͡Ͱ͋Δ͜ͱ͕ਪ࿦ Ͱ͖Δ function foobar($a) { return $a; } ED ܕม਺DΛܕม਺Eʹ΋ׂΓ౰ͯΔ ܕม਺DΛׂΓ౰ͯ ฦΓ஋ͷܕʹܕม਺EΛׂΓ౰ͯ

Slide 55

Slide 55 text

ؔ਺ద༻Ͱਪ࿦Ͱ͖Δྫ w JODؔ਺ͷ໭Γ஋ͷܕ͸ɺؔ਺ຊମΛݟ͚ͨͩͰ͸Θ͔Βͳ͍ w ؔ਺ద༻ͰҾ਺ͷܕݟΔͱॳΊͯ൑໌͢Δ w ؔ਺ద༻ͷࣜΛਪ࿦͢Δͱ͖ʹɺҾ਺ͷܕͱJODؔ਺ͷத਎ Λਪ࿦͠௚͢͜ͱͰJOD ͷܕ͕Θ͔Δ function inc($a) { return $a + 1; }; $n = inc(3);

Slide 56

Slide 56 text

ͱΓ͋͑ͣҎ্ w ಈతܕ෇͚ͳͷͰɺਪ࿦Ͱ͖Δͱ͜Ζ͚ͩ ෦෼తʹਪ࿦ͯ͠ऴΘΓͰ΋໰୊ͳ͍ w ੩తܕ෇͚ͷݴޠͱ͸ҧͬͯ׬શʹ͢΂ͯ ܕ෇͚͠ͳͯ͘΋ྑ͍ w ϝιουิ׬ͳͲͷ໨తͷͨΊʹ׬ᘳʹਪ ࿦͠Α͏ͱ͢Ε͹͢Δ΄Ͳ೉͘͠ͳΔ

Slide 57

Slide 57 text

·ͱΊ w 1)1Ͱ͸"45ͷಋೖͰ੩తղੳ͕͠΍͘͢ ͳͬͨ w ಈతܕ෇͚Ͱ΋ܕਪ࿦Λߦ͏ϝϦοτ͸͋Δ w ࣮ߦલΤϥʔݕ஌ w ίϯύΠϧ࣌࠷దԽ w ิ׬ࢧԉ

Slide 58

Slide 58 text

·ͱΊ w ܕਪ࿦͸"45Λḷͬͯਪ࿦نଇΛݩʹਪ࿦͍ͯ͘͠ w ؔ਺΍ϝιουͷܕ͸ܕ؀ڥʹొ࿥͍ͯ͘͠ w ͦͷ৔Ͱ͸Θ͔Βͳ͍ܕ͸ɺܕม਺ΛׂΓ౰ͯΔ w Τϥʔͷݕ஌΍ܕม਺΁ͷ୅ೖ͸ϢχϑΟέʔγϣ ϯΛ༻͍Δ w ϢχϑΟέʔγϣϯ͸ܕͷ੍ݶ͕͋ΔՕॴͰద༻͢ Δ

Slide 59

Slide 59 text

࢒Γ࿩͍ͨ͜͠ͱ w ΑΓৄࡉͳΞϧΰϦζϜ w ଟ૬ܕ΍ OVMMcJOUFHFS Έ͍ͨͳܕͷѻ͍ w ಈతܕ෇͚ͷ৔߹ͷΞϧΰϦζϜͷௐ੔ w FWBM͕͋Δͱ୆ແ͠ͳ࿩ w ίϯτϩʔϧϑϩʔΛղੳ͢Δ࿩ w ෼Ͱ͸ෆՄೳ

Slide 60

Slide 60 text

ը૾ग़యंాਖ਼ඒஉࡔ

Slide 61

Slide 61 text

No content

Slide 62

Slide 62 text

͝ਗ਼ௌ͋Γ͕ͱ͏ ͍͟͝·ͨ͠