id
int64 3
39.4k
| title
stringlengths 1
80
| text
stringlengths 2
313k
| paragraphs
listlengths 1
6.47k
| abstract
stringlengths 1
52k
â | wikitext
stringlengths 10
330k
â | date_created
stringlengths 20
20
â | date_modified
stringlengths 20
20
| templates
sequencelengths 0
20
| url
stringlengths 32
653
|
---|---|---|---|---|---|---|---|---|---|
36,817 | äžåŠæ ¡å®¶åº/äžåŠçãšããŠã®èªç« | é£äºã»èº«ã ããªã¿ã»ç掻ãªã©ã家æã®ããã«ããªããããŠããå
容ãæããŸãããã
äžåŠçã«ãªããšãç§éãå°åŠçã®é ãšæ¯ã¹ãŠå¿ãäœãæé·ããŠããŸããè¡åç¯å²ãåºããã家ããé¢ããŠéããæéãå¢ããŸããã幎霢ãäžããã«ã€ããŠãèªåã§åºæ¥ãç¯å²ãã©ãã©ãåºãã£ãŠãããŸãã家æã芪ããå人ã«é Œãããæãããã°ãé Œããã«èªåã§ããããæãåºãŠããã§ããããäžåŠçãèªç«ããããã«ã¯ãèªåã®è¡åã«è²¬ä»»ãæã¡ãèªåã§ç©äºãé²ããããããã«ãªããªããã°ãªããŸããããŸããèªåã ãã§ã¯ãªãã家æã身è¿ãªäººã®ããã«è¡åãããšãèªç«ãžã®å€§ããªäžæ©ãšãªãã§ãããã
äžåŠçã«ãªããšã家æã身è¿ãªäººéãšååããŠãããããç掻ãéããããã«ãªããŸãã
ä»äºãšç掻ãäž¡ç«ãããããã«äœãããã®ããä»äºãšç掻ã®èª¿åæ²ç« (ã¯ãŒã¯ã»ã©ã€ãã»ãã©ã³ã¹æ²ç« )ã§ããè²å
ã»ä»è·ã»å®¶æã»å°åã»å人ã®æéãæã¡ããããããå
å®ã®ããä»äºãããªãããå¥åº·ã§è±ããªç掻ãéããããã«ãè¡åæéãåãçµã¿ãå®ããããŠããŸãã
家æã®ç掻ãæ¯ãã家åºã®ä»äºã¯ãã飯äœãã»æŽæ¿¯ã»æé€ã»åè²ãŠã»å°åãšã®ä»ãåãã»ãéã®ç®¡çã»ä»è·ãªã©ã家æã®æ¥åžžç掻ã«é¢ããæ§ã
ãªä»äºããæãç«ã£ãŠããŸãã家æã®æäŒã以å€ã«ããå°åã»èªæ²»äœã»äŒæ¥ãªã©ã®å£äœããæäŒããåããŠããŸãã
äžåŠçã«ãªã£ãããç§éãåºæ¥ãä»äºãé²ãã§è¡ããŸããããèªåãåºæ¥ãä»äºã責任ãæã£ãŠããã°ã家æãªã©èº«è¿ãªäººãšã®ä¿¡é Œé¢ä¿ãæ·±ãŸããŸãã
èªç«ããããã«ã¯ãå©ããŠãããã ãã§ãªããçžæãå©ããäžç·ã«è¡åãã姿å¢ã倧åã§ããããããã¯é Œãããååšã«ãªããç©æ¥µçã«é¢ãããååããããå©ãåã£ãããããšãå°åã瀟äŒã®äžã§èªç«åºæ¥ãããã«ãªããŸãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "é£äºã»èº«ã ããªã¿ã»ç掻ãªã©ã家æã®ããã«ããªããããŠããå
容ãæããŸãããã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "äžåŠçã«ãªããšãç§éãå°åŠçã®é ãšæ¯ã¹ãŠå¿ãäœãæé·ããŠããŸããè¡åç¯å²ãåºããã家ããé¢ããŠéããæéãå¢ããŸããã幎霢ãäžããã«ã€ããŠãèªåã§åºæ¥ãç¯å²ãã©ãã©ãåºãã£ãŠãããŸãã家æã芪ããå人ã«é Œãããæãããã°ãé Œããã«èªåã§ããããæãåºãŠããã§ããããäžåŠçãèªç«ããããã«ã¯ãèªåã®è¡åã«è²¬ä»»ãæã¡ãèªåã§ç©äºãé²ããããããã«ãªããªããã°ãªããŸããããŸããèªåã ãã§ã¯ãªãã家æã身è¿ãªäººã®ããã«è¡åãããšãèªç«ãžã®å€§ããªäžæ©ãšãªãã§ãããã",
"title": "äžåŠçãšãªã£ãŠ"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "äžåŠçã«ãªããšã家æã身è¿ãªäººéãšååããŠãããããç掻ãéããããã«ãªããŸãã",
"title": "äžåŠçãšãªã£ãŠ"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "ä»äºãšç掻ãäž¡ç«ãããããã«äœãããã®ããä»äºãšç掻ã®èª¿åæ²ç« (ã¯ãŒã¯ã»ã©ã€ãã»ãã©ã³ã¹æ²ç« )ã§ããè²å
ã»ä»è·ã»å®¶æã»å°åã»å人ã®æéãæã¡ããããããå
å®ã®ããä»äºãããªãããå¥åº·ã§è±ããªç掻ãéããããã«ãè¡åæéãåãçµã¿ãå®ããããŠããŸãã",
"title": "äžåŠçãšãªã£ãŠ"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "家æã®ç掻ãæ¯ãã家åºã®ä»äºã¯ãã飯äœãã»æŽæ¿¯ã»æé€ã»åè²ãŠã»å°åãšã®ä»ãåãã»ãéã®ç®¡çã»ä»è·ãªã©ã家æã®æ¥åžžç掻ã«é¢ããæ§ã
ãªä»äºããæãç«ã£ãŠããŸãã家æã®æäŒã以å€ã«ããå°åã»èªæ²»äœã»äŒæ¥ãªã©ã®å£äœããæäŒããåããŠããŸãã",
"title": "家åºã®ä»äºãšèªç«"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "äžåŠçã«ãªã£ãããç§éãåºæ¥ãä»äºãé²ãã§è¡ããŸããããèªåãåºæ¥ãä»äºã責任ãæã£ãŠããã°ã家æãªã©èº«è¿ãªäººãšã®ä¿¡é Œé¢ä¿ãæ·±ãŸããŸãã",
"title": "家åºã®ä»äºãšèªç«"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "èªç«ããããã«ã¯ãå©ããŠãããã ãã§ãªããçžæãå©ããäžç·ã«è¡åãã姿å¢ã倧åã§ããããããã¯é Œãããååšã«ãªããç©æ¥µçã«é¢ãããååããããå©ãåã£ãããããšãå°åã瀟äŒã®äžã§èªç«åºæ¥ãããã«ãªããŸãã",
"title": "家åºã®ä»äºãšèªç«"
}
] | é£äºã»èº«ã ããªã¿ã»ç掻ãªã©ã家æã®ããã«ããªããããŠããå
容ãæããŸãããã | [[å°åŠæ ¡ã»äžåŠæ ¡ã»é«çåŠæ ¡ã®åŠç¿]]>[[äžåŠæ ¡ã®åŠç¿]]>[[äžåŠæ ¡å®¶åº]]>äžåŠçãšããŠã®èªç«
é£äºã»èº«ã ããªã¿ã»ç掻ãªã©ã家æã®ããã«ããªããããŠããå
容ãæããŸãããã
== äžåŠçãšãªã£ãŠ ==
äžåŠçã«ãªããšãç§éãå°åŠçã®é ãšæ¯ã¹ãŠå¿ãäœãæé·ããŠããŸããè¡åç¯å²ãåºããã家ããé¢ããŠéããæéãå¢ããŸããã幎霢ãäžããã«ã€ããŠãèªåã§åºæ¥ãç¯å²ãã©ãã©ãåºãã£ãŠãããŸãã家æã芪ããå人ã«é Œãããæãããã°ãé Œããã«èªåã§ããããæãåºãŠããã§ããããäžåŠçã'''èªç«'''ããããã«ã¯ãèªåã®è¡åã«è²¬ä»»ãæã¡ãèªåã§ç©äºãé²ããããããã«ãªããªããã°ãªããŸããããŸããèªåã ãã§ã¯ãªãã家æã身è¿ãªäººã®ããã«è¡åãããšãèªç«ãžã®å€§ããªäžæ©ãšãªãã§ãããã
äžåŠçã«ãªããšã家æã身è¿ãªäººéãšååããŠãããããç掻ãéããããã«ãªããŸãã
ä»äºãšç掻ãäž¡ç«ãããããã«äœãããã®ããä»äºãšç掻ã®èª¿åæ²ç« ïŒã¯ãŒã¯ã»ã©ã€ãã»ãã©ã³ã¹æ²ç« ïŒã§ããè²å
ã»ä»è·ã»å®¶æã»å°åã»å人ã®æéãæã¡ããããããå
å®ã®ããä»äºãããªãããå¥åº·ã§è±ããªç掻ãéããããã«ãè¡åæéãåãçµã¿ãå®ããããŠããŸãã
== 家åºã®ä»äºãšèªç« ==
家æã®ç掻ãæ¯ãã家åºã®ä»äºã¯ãã飯äœãã»æŽæ¿¯ã»æé€ã»åè²ãŠã»å°åãšã®ä»ãåãã»ãéã®ç®¡çã»ä»è·ãªã©ã家æã®æ¥åžžç掻ã«é¢ããæ§ã
ãªä»äºããæãç«ã£ãŠããŸãã家æã®æäŒã以å€ã«ããå°åã»èªæ²»äœã»äŒæ¥ãªã©ã®å£äœããæäŒããåããŠããŸãã
äžåŠçã«ãªã£ãããç§éãåºæ¥ãä»äºãé²ãã§è¡ããŸããããèªåãåºæ¥ãä»äºã責任ãæã£ãŠããã°ã家æãªã©èº«è¿ãªäººãšã®ä¿¡é Œé¢ä¿ãæ·±ãŸããŸãã
èªç«ããããã«ã¯ãå©ããŠãããã ãã§ãªããçžæãå©ããäžç·ã«è¡åãã姿å¢ã倧åã§ããããããã¯é Œãããååšã«ãªããç©æ¥µçã«é¢ãããååããããå©ãåã£ãããããšãå°åã瀟äŒã®äžã§èªç«åºæ¥ãããã«ãªããŸãã
[[ã«ããŽãª:äžåŠæ ¡å®¶åºç§]] | null | 2023-02-01T20:44:13Z | [] | https://ja.wikibooks.org/wiki/%E4%B8%AD%E5%AD%A6%E6%A0%A1%E5%AE%B6%E5%BA%AD/%E4%B8%AD%E5%AD%A6%E7%94%9F%E3%81%A8%E3%81%97%E3%81%A6%E3%81%AE%E8%87%AA%E7%AB%8B |
36,827 | äžåŠæ ¡å®¶åº/幌å
ã®äœã®çºé | 幌å
ãšäžåŠçã®äœåãã©ãéãã®ãèããŠã¿ãŸãããã
幌å
æã¯ãåäŸã®èº«äœãšå¿ãé©ãã»ã©æé·ããå€åããŠãããŸãã幌å
ã¯äžäººäžäººãç¹å¥ãªååšã§ããåäŸãå¥ããã«æé·ããããã«ã¯ã倧人ãåäŸã®åæ§ãå人差ã«æ°ã¥ããåäŸãèªãæé·ããŠå€åããåãæ¯ããå¿
èŠããããŸããåäŸéã¯ããããèªåã®ããŒã¹ã«åãããŠæé·ããªãããèå³ãæ©ã¿ãåŸæåéãèŠæåéãªã©ãäžäººäžäººéããŸãããããã£ãŠããããåãå
¥ããªãããäžäººäžäººã®åäŸãšæ¥ããŠãããªããã°ãªããŸããã
倧人ã®èŠéã¯äžäžçŽ120床ãå·Šå³çŽ150床èŠããŸããã6æ³äœã®åäŸã¯äžäžçŽ70床ãå·Šå³çŽ90床ãšã倧人ã®6å²çšåºŠããèŠããŠããŸããããŸããåäŸã®ç®ã¯å€§äººãããã£ãšäœãäœçœ®ã«ãããããããçãç¯å²ããèŠããŸããã
å人差ããããŸãããéªšæ Œãçºéããã«ã€ããŠã身é·ãäœéãå¢ããŠãããŸãã幌å
ã¯æ足ãçãã身é·ã«å¯ŸããŠé ã倧ããã®ã§ã姿å¢ãæ£ããä¿ãŠãŸããããã®ããã幌å
æã¯ã€ãŸããããã転ãã ããããããªããŸãã
ãã«ã¢ã³ãšã¯ãäœã®åãã調ç¯ããç©è³ªã§ãã粟ç¥ãšäœã®æé·ã«é¢ä¿ããŸããç²ç¶è
ºãã«ã¢ã³ã¯ã乳幌å
æã«è³ã®æé·ãå©ããææ¥æã«ã¯äœã®æé·ãä¿ããŸããè³äžåäœã¯ã骚ãçèãæé·ãããæé·ãã«ã¢ã³ãšãããã«ã¢ã³ãäœããŸããã©ã¡ããã乳幌å
æã®å¿èº«çºéã«éèŠã§ãã
幌å
ã®äœãéåèœåã®çºéã¯ãäžå®ã®æ¹æ³ãšé åºã§èµ·ãããŸããå人差ããã£ãŠããéåæ©èœã®çºéã«ãã£ãŠãåºæ¥ãç¯å²ãåºããã奜å¥å¿ãçãŸããŸãããã®å¥œå¥å¿ãéåæ©èœãåºæ¿ããŠãçžäºã«çºéããŸãã
乳幌å
ã®åŒåžãå¿ææ°ã¯ã倧人ããã掻çºã§ãããŸããäœæž©ãé«ããäœæž©èª¿ç¯æ©èœãæªçºéã§æ±ããããããŸããããæ°Žããããã飲ãŸãªããã°ãªããŸããããŸããç²ããçãããã次ã®æŽ»åã«åããŠãšãã«ã®ãŒãèãããããããã«ãå€ãã®ç¡ç æéãå¿
èŠã§ãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "幌å
ãšäžåŠçã®äœåãã©ãéãã®ãèããŠã¿ãŸãããã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "幌å
æã¯ãåäŸã®èº«äœãšå¿ãé©ãã»ã©æé·ããå€åããŠãããŸãã幌å
ã¯äžäººäžäººãç¹å¥ãªååšã§ããåäŸãå¥ããã«æé·ããããã«ã¯ã倧人ãåäŸã®åæ§ãå人差ã«æ°ã¥ããåäŸãèªãæé·ããŠå€åããåãæ¯ããå¿
èŠããããŸããåäŸéã¯ããããèªåã®ããŒã¹ã«åãããŠæé·ããªãããèå³ãæ©ã¿ãåŸæåéãèŠæåéãªã©ãäžäººäžäººéããŸãããããã£ãŠããããåãå
¥ããªãããäžäººäžäººã®åäŸãšæ¥ããŠãããªããã°ãªããŸããã",
"title": "幌å
ã®çºéãšå人差"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "倧人ã®èŠéã¯äžäžçŽ120床ãå·Šå³çŽ150床èŠããŸããã6æ³äœã®åäŸã¯äžäžçŽ70床ãå·Šå³çŽ90床ãšã倧人ã®6å²çšåºŠããèŠããŠããŸããããŸããåäŸã®ç®ã¯å€§äººãããã£ãšäœãäœçœ®ã«ãããããããçãç¯å²ããèŠããŸããã",
"title": "幌å
ã®çºéãšå人差"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "å人差ããããŸãããéªšæ Œãçºéããã«ã€ããŠã身é·ãäœéãå¢ããŠãããŸãã幌å
ã¯æ足ãçãã身é·ã«å¯ŸããŠé ã倧ããã®ã§ã姿å¢ãæ£ããä¿ãŠãŸããããã®ããã幌å
æã¯ã€ãŸããããã転ãã ããããããªããŸãã",
"title": "幌å
ã®äœã®çºéã®ç¹åŸŽ"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "ãã«ã¢ã³ãšã¯ãäœã®åãã調ç¯ããç©è³ªã§ãã粟ç¥ãšäœã®æé·ã«é¢ä¿ããŸããç²ç¶è
ºãã«ã¢ã³ã¯ã乳幌å
æã«è³ã®æé·ãå©ããææ¥æã«ã¯äœã®æé·ãä¿ããŸããè³äžåäœã¯ã骚ãçèãæé·ãããæé·ãã«ã¢ã³ãšãããã«ã¢ã³ãäœããŸããã©ã¡ããã乳幌å
æã®å¿èº«çºéã«éèŠã§ãã",
"title": "幌å
ã®äœã®çºéã®ç¹åŸŽ"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "幌å
ã®äœãéåèœåã®çºéã¯ãäžå®ã®æ¹æ³ãšé åºã§èµ·ãããŸããå人差ããã£ãŠããéåæ©èœã®çºéã«ãã£ãŠãåºæ¥ãç¯å²ãåºããã奜å¥å¿ãçãŸããŸãããã®å¥œå¥å¿ãéåæ©èœãåºæ¿ããŠãçžäºã«çºéããŸãã",
"title": "幌å
ã®äœã®çºéã®ç¹åŸŽ"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "乳幌å
ã®åŒåžãå¿ææ°ã¯ã倧人ããã掻çºã§ãããŸããäœæž©ãé«ããäœæž©èª¿ç¯æ©èœãæªçºéã§æ±ããããããŸããããæ°Žããããã飲ãŸãªããã°ãªããŸããããŸããç²ããçãããã次ã®æŽ»åã«åããŠãšãã«ã®ãŒãèãããããããã«ãå€ãã®ç¡ç æéãå¿
èŠã§ãã",
"title": "幌å
ã®äœã®çºéã®ç¹åŸŽ"
}
] | 幌å
ãšäžåŠçã®äœåãã©ãéãã®ãèããŠã¿ãŸãããã | [[å°åŠæ ¡ã»äžåŠæ ¡ã»é«çåŠæ ¡ã®åŠç¿]]>[[äžåŠæ ¡ã®åŠç¿]]>[[äžåŠæ ¡å®¶åº]]>幌å
ã®äœã®çºé
幌å
ãšäžåŠçã®äœåãã©ãéãã®ãèããŠã¿ãŸãããã
== 幌å
ã®çºéãšå人差 ==
幌å
æã¯ãåäŸã®èº«äœãšå¿ãé©ãã»ã©æé·ããå€åããŠãããŸãã幌å
ã¯äžäººäžäººãç¹å¥ãªååšã§ããåäŸãå¥ããã«æé·ããããã«ã¯ã倧人ãåäŸã®'''åæ§'''ã'''å人差'''ã«æ°ã¥ããåäŸãèªãæé·ããŠå€åããåãæ¯ããå¿
èŠããããŸããåäŸéã¯ããããèªåã®ããŒã¹ã«åãããŠæé·ããªãããèå³ãæ©ã¿ãåŸæåéãèŠæåéãªã©ãäžäººäžäººéããŸãããããã£ãŠããããåãå
¥ããªãããäžäººäžäººã®åäŸãšæ¥ããŠãããªããã°ãªããŸããã
倧人ã®èŠéã¯äžäžçŽïŒïŒïŒåºŠãå·Šå³çŽïŒïŒïŒåºŠèŠããŸãããïŒæ³äœã®åäŸã¯äžäžçŽïŒïŒåºŠãå·Šå³çŽïŒïŒåºŠãšã倧人ã®ïŒå²çšåºŠããèŠããŠããŸããããŸããåäŸã®ç®ã¯å€§äººãããã£ãšäœãäœçœ®ã«ãããããããçãç¯å²ããèŠããŸããã
== 幌å
ã®äœã®çºéã®ç¹åŸŽ ==
å人差ããããŸãããéªšæ Œãçºéããã«ã€ããŠã身é·ãäœéãå¢ããŠãããŸãã幌å
ã¯æ足ãçãã身é·ã«å¯ŸããŠé ã倧ããã®ã§ã姿å¢ãæ£ããä¿ãŠãŸããããã®ããã幌å
æã¯ã€ãŸããããã転ãã ããããããªããŸãã{{ã³ã©ã |幌å
æã®èº«é·ãšäœéã®å¹³å|身é·ãäœéã ãã§ãªããæ¶ååžåã»åŒåžã»è³ã»ç¥çµç³»ã倧ããçºéããŸãã}}ãã«ã¢ã³ãšã¯ãäœã®åãã調ç¯ããç©è³ªã§ãã粟ç¥ãšäœã®æé·ã«é¢ä¿ããŸããç²ç¶è
ºãã«ã¢ã³ã¯ã乳幌å
æã«è³ã®æé·ãå©ããææ¥æã«ã¯äœã®æé·ãä¿ããŸããè³äžåäœã¯ã骚ãçèãæé·ãããæé·ãã«ã¢ã³ãšãããã«ã¢ã³ãäœããŸããã©ã¡ããã乳幌å
æã®å¿èº«çºéã«éèŠã§ãã
=== éåæ©èœ ===
幌å
ã®äœãéåèœåã®çºéã¯ãäžå®ã®'''æ¹åãšé åº'''ã§èµ·ãããŸããå人差ããã£ãŠããéåæ©èœã®çºéã«ãã£ãŠãåºæ¥ãç¯å²ãåºããã奜å¥å¿ãçãŸããŸãããã®å¥œå¥å¿ãéåæ©èœãåºæ¿ããŠãçžäºã«çºéããŸãã
=== çççæ©èœ ===
乳幌å
ã®åŒåžãå¿ææ°ã¯ã倧人ããã掻çºã§ãããŸããäœæž©ãé«ããäœæž©èª¿ç¯æ©èœãæªçºéã§æ±ããããããŸããããæ°Žããããã飲ãŸãªããã°ãªããŸããããŸããç²ããçãããã次ã®æŽ»åã«åããŠãšãã«ã®ãŒãèãããããããã«ãå€ãã®ç¡ç æéãå¿
èŠã§ãã
{| class="wikitable"
!äœãéåæ©èœã®çºé
|-
|é ãšéŠãæŽããè骚ãšè
°ããã£ããããŠã座ããããã«ãªããèªåã§æ©ãããç«ã£ãããåºæ¥ãããã«ãªããŸãã
è
ã¯æå
ã«å±ããŸã§äŒžã³ãŠãæå
ãåšçšã«äœ¿ããããã«ãªããŸãã
|-
!幌å
æã®æé·äŸ
|-
|å
šèº«ã®éåæ©èœïŒäœãçºéãããšãã©ãã©ãåºæ¥ãããã«ãªããŸãã
æå
ã®éåæ©èœïŒçŽ°ããåããæ£ç¢ºãªåäœãäžæã«ãªã£ãŠããŸãã
çççæ©èœïŒåŒåžæ°ãå¿ææ°ãé
ããªããç¡ç æéãçããªããŸãã
|}
[[ã«ããŽãª:äžåŠæ ¡å®¶åºç§]]
[[ã«ããŽãª:人äœ]]
[[ã«ããŽãª:åäŸ]] | 2023-02-02T12:13:55Z | 2023-10-24T08:02:06Z | [
"ãã³ãã¬ãŒã:ã³ã©ã "
] | https://ja.wikibooks.org/wiki/%E4%B8%AD%E5%AD%A6%E6%A0%A1%E5%AE%B6%E5%BA%AD/%E5%B9%BC%E5%85%90%E3%81%AE%E4%BD%93%E3%81%AE%E7%99%BA%E9%81%94 |
36,874 | äžåŠæ ¡å®¶åº/家æãå°åã®é«éœ¢è
ãšã®é¢ãã | 家æãå°åã®é«éœ¢è
ããèãã話ãªã©ãèªåã®éå»ãæ¯ãè¿ããèªåã®å¿ã«é¿ããåºæ¥äºãæžããŠã¿ãŸãããã
çŸä»£ã¯å¹³å寿åœ100æ³ãšèšãããããã«ãç§éã®äœãå°åã«ãæ§ã
ãªé«éœ¢è
ãæ®ãããŠããŸããåããŠãã人ããã©ã³ãã£ã¢ãªã©å°åã®ããã«äœããããŠãã人ãæãã€ããŠæ©ããããè»æ€
åãå©çšãã人ãããŸããå°åé«éœ¢ç€ŸäŒã®äžã§ãé«éœ¢è
ã®æ°ã¯ã©ãã©ãå¢ããŠããŸããå°åã®äººã
ããããé«éœ¢è
ãšé¢ãããšãç§éã®ç掻ã家æã®æ®ãããããè±ãã«ãªããŸãã
ç§éã®å®¶æãå°åã®ã幎å¯ãããä»ãŸã§ã®ç掻ã®äžã§äœãããŠããããèããŠã¿ãŸãããããããŠãå°æ¥ã®ç§éã家æãå°åã®ã幎å¯ãã«äœãåºæ¥ãã®ããèããŠã¿ãŸãããã
諺ãäºã®ç²ãã幎ã®å«ããšããããã«ã幎ãåããšçµéšå€ã貎éã§å€§åã«ãªã£ãŠããŸããäžåœèªã®ãå«ãã¯éåžžã«é·ãæéãæå³ããŸãããŸããã幎ã®åããšæžããŠãæåã®å¹Žæ°ãæå³ããå ŽåããããŸãã
人éã¯èª°ã§ãä¹³å
æã»å¹Œå
æã»å
ç«¥æã»é幎æã»å£®å¹Žæã»é«éœ¢æãè¿ããŸãã人ã¯çãŸããŠããæ»ã¬ãŸã§å€åãç¶ããªããçããŠãããŸããã幎霢ãéãããšãã ãã ããšè¡°ããŠãããŸãã幎霢ãéãããšç²Ÿç¥ãäœãå€ãããŸãããããããã®çŸãæ¹ã¯äººã«ãã£ãŠéããŸãã
ããã家æãå°åã®é«éœ¢è
ãèµ·ãäžãã£ããã移åããéãå°ã£ãŠãããã声ããããããæãå·®ã䌞ã¹ãŠããããšããã®é«éœ¢è
ã®å©ãã«ãªããããªããšã®è·é¢ãçž®ãŸããŸããäžã®è³æã¯ãããã©ããã£ãŠè¡ãã°ããã®ããåãäžããŠããŸãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "家æãå°åã®é«éœ¢è
ããèãã話ãªã©ãèªåã®éå»ãæ¯ãè¿ããèªåã®å¿ã«é¿ããåºæ¥äºãæžããŠã¿ãŸãããã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "çŸä»£ã¯å¹³å寿åœ100æ³ãšèšãããããã«ãç§éã®äœãå°åã«ãæ§ã
ãªé«éœ¢è
ãæ®ãããŠããŸããåããŠãã人ããã©ã³ãã£ã¢ãªã©å°åã®ããã«äœããããŠãã人ãæãã€ããŠæ©ããããè»æ€
åãå©çšãã人ãããŸããå°åé«éœ¢ç€ŸäŒã®äžã§ãé«éœ¢è
ã®æ°ã¯ã©ãã©ãå¢ããŠããŸããå°åã®äººã
ããããé«éœ¢è
ãšé¢ãããšãç§éã®ç掻ã家æã®æ®ãããããè±ãã«ãªããŸãã",
"title": "å°åã®é«éœ¢è
ãšé¢ãã"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "ç§éã®å®¶æãå°åã®ã幎å¯ãããä»ãŸã§ã®ç掻ã®äžã§äœãããŠããããèããŠã¿ãŸãããããããŠãå°æ¥ã®ç§éã家æãå°åã®ã幎å¯ãã«äœãåºæ¥ãã®ããèããŠã¿ãŸãããã",
"title": "å°åã®é«éœ¢è
ãšé¢ãã"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "諺ãäºã®ç²ãã幎ã®å«ããšããããã«ã幎ãåããšçµéšå€ã貎éã§å€§åã«ãªã£ãŠããŸããäžåœèªã®ãå«ãã¯éåžžã«é·ãæéãæå³ããŸãããŸããã幎ã®åããšæžããŠãæåã®å¹Žæ°ãæå³ããå ŽåããããŸãã",
"title": "å°åã®é«éœ¢è
ãšé¢ãã"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "人éã¯èª°ã§ãä¹³å
æã»å¹Œå
æã»å
ç«¥æã»é幎æã»å£®å¹Žæã»é«éœ¢æãè¿ããŸãã人ã¯çãŸããŠããæ»ã¬ãŸã§å€åãç¶ããªããçããŠãããŸããã幎霢ãéãããšãã ãã ããšè¡°ããŠãããŸãã幎霢ãéãããšç²Ÿç¥ãäœãå€ãããŸãããããããã®çŸãæ¹ã¯äººã«ãã£ãŠéããŸãã",
"title": "é«éœ¢è
ã®äœã®ç¹åŸŽ"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "ããã家æãå°åã®é«éœ¢è
ãèµ·ãäžãã£ããã移åããéãå°ã£ãŠãããã声ããããããæãå·®ã䌞ã¹ãŠããããšããã®é«éœ¢è
ã®å©ãã«ãªããããªããšã®è·é¢ãçž®ãŸããŸããäžã®è³æã¯ãããã©ããã£ãŠè¡ãã°ããã®ããåãäžããŠããŸãã",
"title": "é«éœ¢è
ã®äœã®ç¹åŸŽ"
}
] | 家æãå°åã®é«éœ¢è
ããèãã話ãªã©ãèªåã®éå»ãæ¯ãè¿ããèªåã®å¿ã«é¿ããåºæ¥äºãæžããŠã¿ãŸãããã | [[å°åŠæ ¡ã»äžåŠæ ¡ã»é«çåŠæ ¡ã®åŠç¿]]>[[äžåŠæ ¡ã®åŠç¿]]>[[äžåŠæ ¡å®¶åº]]>家æãå°åã®é«éœ¢è
ãšã®é¢ãã
家æãå°åã®é«éœ¢è
ããèãã話ãªã©ãèªåã®éå»ãæ¯ãè¿ããèªåã®å¿ã«é¿ããåºæ¥äºãæžããŠã¿ãŸãããã
== å°åã®é«éœ¢è
ãšé¢ãã ==
çŸä»£ã¯å¹³å寿åœïŒïŒïŒæ³ãšèšãããããã«ãç§éã®äœãå°åã«ãæ§ã
ãª'''é«éœ¢è
'''ãæ®ãããŠããŸããåããŠãã人ããã©ã³ãã£ã¢ãªã©å°åã®ããã«äœããããŠãã人ãæãã€ããŠæ©ããããè»æ€
åãå©çšãã人ãããŸãã'''å°åé«éœ¢ç€ŸäŒ'''ã®äžã§ãé«éœ¢è
ã®æ°ã¯ã©ãã©ãå¢ããŠããŸããå°åã®äººã
ããããé«éœ¢è
ãšé¢ãããšãç§éã®ç掻ã家æã®æ®ãããããè±ãã«ãªããŸãã
ç§éã®å®¶æãå°åã®ã幎å¯ãããä»ãŸã§ã®ç掻ã®äžã§äœãããŠããããèããŠã¿ãŸãããããããŠãå°æ¥ã®ç§éã家æãå°åã®ã幎å¯ãã«äœãåºæ¥ãã®ããèããŠã¿ãŸãããã
{| style="border:2px solid orange;width:80%" cellspacing="0"
! style="background:orange" |'''é«éœ¢è
ãå
æ°ã«çãã'''
|-
| style="padding:5px" |é«éœ¢ã«ãªã£ãŠãã趣å³ã»ä»äºã»ç®æšã»æ°ããçµéšãªã©ã人çãå
å®ãããããã«ãé«éœ¢è
ã®çãæ¹ããåèã«ãªãéšåãããã§ãããã
ïŒïŒïŒïŒå¹Žä»£ãããäžæµŠéäžéããã¯ãããã¹ããŒã€ãŒãšããŠæŽ»èºããŠããŸããïŒïŒïŒïŒå¹Žã»ïŒïŒïŒïŒå¹Žã»ïŒïŒïŒïŒå¹Žã«ãç
æ°ãæªæãæ±ããªãããïŒåºŠã®ãšãã¬ã¹ãç»é ãæãããŸãããïŒåºŠç®ã®ãšãã¬ã¹ãç»é ã¯ïŒïŒæ³ïŒïŒïŒæ¥ã§äžçæé«éœ¢èšé²ãšãªããŸããåž°åœåŸãã倢ã«åãã£ãŠè«Šããªããã°ãæã¿ã¯å¶ããããŸãããšèªããŸããã
è¥å®®æ£åããã¯å®å¹ŽåŸãåå±
ããæ¯ã®ä»è·ãããªããã趣å³ã«å±ã¿ãäžäººã§ããœã³ã³ã®äœ¿ãæ¹ãèŠããŸããïŒïŒæ³ã§ããã°ã©ãã³ã°ãèŠãå§ããïŒïŒæ³ã§ã·ãã¢åãã®ã¢ããªãhinadanããäœããŸããã奜å¥å¿ããæ°ããè©Šã¿ããããã¡ã«ããä»ã人çã§äžçªæ¥œããããšè©±ããŠãããŸããã
宀äºæ©è¶åã¯ãïŒæ³ãããã¢ããç¿ãå§ããïŒïŒïŒïŒå¹Žã«ãœãªã¹ããšããŠåç»å ŽããŸãããïŒïŒïŒïŒå¹Žã«ãã€ãã«æž¡ããæµ·å€ïŒïŒã«åœã§æŒå¥ããŸãããåž°åœåŸãïŒïŒæ³ãéããŠãåæŒå¥å®¶ãšããŠæŽ»èºããŸãããã幎ãåã£ããããšãã£ãŠè¡°ãããæé·ããŸããããšèªä¿¡æºã
ã«èªã£ãŠããŸãã
|}
諺ãäºã®ç²ãã幎ã®å«ããšããããã«ã幎ãåããšçµéšå€ã貎éã§å€§åã«ãªã£ãŠããŸããäžåœèªã®ãå«ãã¯éåžžã«é·ãæéãæå³ããŸãããŸããã幎ã®åããšæžããŠãæåã®å¹Žæ°ãæå³ããå ŽåããããŸãã
== é«éœ¢è
ã®äœã®ç¹åŸŽ ==
{| style="border:2px solid pink;width:80%" cellspacing="0"
! style="background:pink" |'''å 霢ã«ããäœã®å€å'''
|-
| style="padding:5px" |è³ïŒèŽèŠå°é£ïŒç¹ã«é«ãé³ïŒããããŸãã
ç®èïŒæèŠãéããæãåãããªããªããŸãã
åŒåžïŒèºæŽ»éãäœäžããŠãæ¯åããèµ·ããããããªããŸãã
æ³å°¿åšïŒãã€ã¬ã«è¡ãåæ°ãå¢ããŸãã
ç®ïŒä»¥åããèŠããªããªããŸãã
å¿èïŒå¿èã®éŒåãæ©ãæããããŸãã
骚ïŒéªšæãããããªããŸãã
é¢ç¯ïŒé¢ç¯ã硬ããªããåãã«ãããªããŸãã
çèïŒè¶³è
°ã匱ããªããŸãã
|}
人éã¯èª°ã§ãä¹³å
æã»å¹Œå
æã»å
ç«¥æã»é幎æã»å£®å¹Žæã»'''é«éœ¢æ'''ãè¿ããŸãã人ã¯çãŸããŠããæ»ã¬ãŸã§å€åãç¶ããªããçããŠãããŸããã幎霢ãéãããšãã ãã ããšè¡°ããŠãããŸãã幎霢ãéãããšç²Ÿç¥ãäœãå€ãããŸãããããããã®çŸãæ¹ã¯äººã«ãã£ãŠéããŸãã{{ã³ã©ã |ä»è·çŠç¥å£«æŸéã¿ã©ããããé«éœ¢è
ãšã®äŒè©±ã楜ããã§|ç
æ°ãäºæ
ã§å
¥é¢ããŠããæ¹ãå
æ°ã«ãªãããã®æ¯æŽãããŠããŸããã»ãŒåããªãæ£è
ãèªåã§ã飯ãé£ã¹ãããããã«ãªããæ¶ãæµããªããç¬é¡ã§éé¢ããŠãã姿ãèŠããšããããããæããŸããä»è·ã®ä»äºã¯ã倧å€ããããšããèšãããŠããŸããããããªã«ããããããšãããšèšãããä»äºã¯äžã
ãããŸãããé«éœ¢è
ã¯ãç§éãã人ççµéšãç¥èããæ®ãããæéãè±å¯ã§ãããã²ãä»è·ã®ã€ã¡ãŒãžã«ãšãããããé«éœ¢è
ãšé¢ãã£ãŠã¿ãŠãã ããã}}
ããã家æãå°åã®é«éœ¢è
ãèµ·ãäžãã£ããã移åããéãå°ã£ãŠãããã声ããããããæãå·®ã䌞ã¹ãŠããããšããã®é«éœ¢è
ã®å©ãã«ãªããããªããšã®è·é¢ãçž®ãŸããŸããäžã®è³æã¯ãããã©ããã£ãŠè¡ãã°ããã®ããåãäžããŠããŸãã
{| class="wikitable"
!é«éœ¢è
ãšã®é¢ããæ¹
|-
|â ç«ã¡äžããã®ä»å©
* æãæ·»ããªããã足ããã£ããå°é¢ã«ã€ããèžµãæµ®ããªãããã«è¶³ãåŒãäžããŸãã
* ãèŸåãããããã«æãæãäžã«åŒãããå°»ãæµ®ãããŸãã
* èã䌞ã°ããäžäœãèµ·ããããã«ããŸããåŒãäžããæã¯ããŸã匷ãåŒã£åŒµããªãããã«ããŸãããã
â æ©è¡ã®ä»å©
䞊ãã§æ©ãæã¯ãåãæ©èª¿ã§ãè
ã®äžããæ¯ãåããŸããææºãããã°ãããå©çšããŸãããã
â»éº»çºããªããèªåã§ç«ã£ãŠæ©ããããã«ãªã£ã人ã«æ©è¡ã®ä»å©ãè¡ããŸãããã
â 声ã®æãæ¹
* ã幎å¯ãã®ç®ç·ã«æããŠãè·é¢ãåããŸãããã
* æããèšèã§ããã£ãã倧ããªå£°ã§è©±ããŸãããã
* èªåã®å£°ãæ°æã¡ãäŒããããã«ãæãèäžã«è§ŠããŠããããã話ããããŸãããã
|}
[[ã«ããŽãª:äžåŠæ ¡å®¶åºç§]]
[[ã«ããŽãª:家æ]]
[[ã«ããŽãª:é«éœ¢è
]] | 2023-02-05T12:48:43Z | 2024-02-08T07:37:17Z | [
"ãã³ãã¬ãŒã:ã³ã©ã "
] | https://ja.wikibooks.org/wiki/%E4%B8%AD%E5%AD%A6%E6%A0%A1%E5%AE%B6%E5%BA%AD/%E5%AE%B6%E6%97%8F%E3%82%84%E5%9C%B0%E5%9F%9F%E3%81%AE%E9%AB%98%E9%BD%A2%E8%80%85%E3%81%A8%E3%81%AE%E9%96%A2%E3%82%8F%E3%82%8A |
36,890 | äžåŠæ ¡å®¶åº/å¥åº·ã§å¿«é©ãªå®€å
ç°å¢ | â»æ¬ç¯ããæç§æžã®é
ç®ãå
šãŠå€åœ¢ããŠããŸãã
宀å
ç°å¢æ±æã®åå ãšå¯Ÿçã«ã€ããŠãŸãšããŸãããã
ç§éã¯ãäœå±
ãå¿«é©ã§å®å
šãªç°å¢ã«æŽããªããã°ãªããŸããã枩床ã»æ¹¿åºŠã»é颚ã»ææ°ã»æããã»å
ã»é³ãªã©ãå¿«é©ãªå®€å
ç°å¢ã«ã¯æ§ã
ãªèŠçŽ ããããŸãããŸããéšå±ã®åºãã食ãæ¹ã«ãã£ãŠãå€ãã£ãŠããŸãã
çŸä»£ã¯ãæ°å¯æ§ãé«ãäœå®
ãå¢ããŠããŸããããããäœå®
ã¯å·ææ¿ãããå¹ããŠããŠããæ§ã
ãªåå ãã倧æ°æ±æã®åœ±é¿ãåããŠãå¥åº·ã«æªã圱é¿ãäžããŠããŸããŸããå®å
šã§å¿«é©ãªæ®ãããå®çŸããããã«ãäœå®
ã®å·¥å€«ã«ã€ããŠèããŠã¿ãŸãããã
宀å
ã®ç©ºæ°ãæ±æããç©è³ªãšããŠãåŒåžããåºãäºé
žåççŽ ã»ææ¿ããåºãæ°Žèžæ°ã»ã«ãã»ããã»ãã³ãªã»ãããã®æ¯ãªã©ãæããããŸãããŸããé²è«å€ã»æ®ºè«å€ã»ç
èã®ç
ãäœå®
建æã家å
·ã«äœ¿ãããæ¥çå€ã»å¡æã«å«ãŸããååŠç©è³ªãªã©ã宀å
ã®ç©ºæ°ãæ±æããåå ãšãªããŸãããããã®ååŠç©è³ªãåå ã§èµ·ãã身äœã®äžèª¿ãã·ãã¯ããŠã¹çå矀ãšãããŸããããã®å€ãã¯ååŠç©è³ªãåå ã§ãã人ã«ãã£ãŠæ§ã
ãªçç¶ãçŸããŸãã
24æéææ°ã·ã¹ãã ãšã¯ãéšå±ã®ç©ºæ°ãèªåã§åŒ·å¶çã«å
¥ãæ¿ããææ°èšåã§ããã·ãã¯ããŠã¹çå矀ãªã©ã®äºé²ã«ã€ãªããããã24æéææ°ã·ã¹ãã ã®èšçœ®ã矩åä»ããããŠããŸãã
çŠæ¯çµŠæ¹¯åšãçŠæ¯ã³ã³ããç³æ²¹ã¹ããŒããªã©ãäžå®å
šççŒããçºçããäžé
žåççŽ ã¯ãå°éã§ãæ·±å»ãªå¥åº·è¢«å®³ãæ»äº¡ã®åå ã«ãªããŸãã
宀å
ã®ç©ºæ°æ±æãé²ãã«ã¯ãææ°ã倧åã§ããææ°æã䜿ã£ãããçªãéãããããŠæ°é®®ãªç©ºæ°ãåãå
¥ããŸãããã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "â»æ¬ç¯ããæç§æžã®é
ç®ãå
šãŠå€åœ¢ããŠããŸãã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "宀å
ç°å¢æ±æã®åå ãšå¯Ÿçã«ã€ããŠãŸãšããŸãããã",
"title": ""
},
{
"paragraph_id": 2,
"tag": "p",
"text": "ç§éã¯ãäœå±
ãå¿«é©ã§å®å
šãªç°å¢ã«æŽããªããã°ãªããŸããã枩床ã»æ¹¿åºŠã»é颚ã»ææ°ã»æããã»å
ã»é³ãªã©ãå¿«é©ãªå®€å
ç°å¢ã«ã¯æ§ã
ãªèŠçŽ ããããŸãããŸããéšå±ã®åºãã食ãæ¹ã«ãã£ãŠãå€ãã£ãŠããŸãã",
"title": "è¯å¥œãªå®¶åºç°å¢"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "çŸä»£ã¯ãæ°å¯æ§ãé«ãäœå®
ãå¢ããŠããŸããããããäœå®
ã¯å·ææ¿ãããå¹ããŠããŠããæ§ã
ãªåå ãã倧æ°æ±æã®åœ±é¿ãåããŠãå¥åº·ã«æªã圱é¿ãäžããŠããŸããŸããå®å
šã§å¿«é©ãªæ®ãããå®çŸããããã«ãäœå®
ã®å·¥å€«ã«ã€ããŠèããŠã¿ãŸãããã",
"title": "è¯å¥œãªå®¶åºç°å¢"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "宀å
ã®ç©ºæ°ãæ±æããç©è³ªãšããŠãåŒåžããåºãäºé
žåççŽ ã»ææ¿ããåºãæ°Žèžæ°ã»ã«ãã»ããã»ãã³ãªã»ãããã®æ¯ãªã©ãæããããŸãããŸããé²è«å€ã»æ®ºè«å€ã»ç
èã®ç
ãäœå®
建æã家å
·ã«äœ¿ãããæ¥çå€ã»å¡æã«å«ãŸããååŠç©è³ªãªã©ã宀å
ã®ç©ºæ°ãæ±æããåå ãšãªããŸãããããã®ååŠç©è³ªãåå ã§èµ·ãã身äœã®äžèª¿ãã·ãã¯ããŠã¹çå矀ãšãããŸããããã®å€ãã¯ååŠç©è³ªãåå ã§ãã人ã«ãã£ãŠæ§ã
ãªçç¶ãçŸããŸãã",
"title": "宀å
ã®æ±æç©è³ª"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "24æéææ°ã·ã¹ãã ãšã¯ãéšå±ã®ç©ºæ°ãèªåã§åŒ·å¶çã«å
¥ãæ¿ããææ°èšåã§ããã·ãã¯ããŠã¹çå矀ãªã©ã®äºé²ã«ã€ãªããããã24æéææ°ã·ã¹ãã ã®èšçœ®ã矩åä»ããããŠããŸãã",
"title": "宀å
ã®æ±æç©è³ª"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "çŠæ¯çµŠæ¹¯åšãçŠæ¯ã³ã³ããç³æ²¹ã¹ããŒããªã©ãäžå®å
šççŒããçºçããäžé
žåççŽ ã¯ãå°éã§ãæ·±å»ãªå¥åº·è¢«å®³ãæ»äº¡ã®åå ã«ãªããŸãã",
"title": "宀å
ã®æ±æç©è³ª"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "宀å
ã®ç©ºæ°æ±æãé²ãã«ã¯ãææ°ã倧åã§ããææ°æã䜿ã£ãããçªãéãããããŠæ°é®®ãªç©ºæ°ãåãå
¥ããŸãããã",
"title": "宀å
ã®æ±æç©è³ª"
}
] | â»æ¬ç¯ããæç§æžã®é
ç®ãå
šãŠå€åœ¢ããŠããŸãã 宀å
ç°å¢æ±æã®åå ãšå¯Ÿçã«ã€ããŠãŸãšããŸãããã | [[å°åŠæ ¡ã»äžåŠæ ¡ã»é«çåŠæ ¡ã®åŠç¿]]>[[äžåŠæ ¡ã®åŠç¿]]>[[äžåŠæ ¡å®¶åº]]>å¥åº·ã§å¿«é©ãªå®€å
ç°å¢
â»æ¬ç¯ããæç§æžã®é
ç®ãå
šãŠå€åœ¢ããŠããŸãã
宀å
ç°å¢æ±æã®åå ãšå¯Ÿçã«ã€ããŠãŸãšããŸãããã
== è¯å¥œãªå®¶åºç°å¢ ==
ç§éã¯ãäœå±
ãå¿«é©ã§å®å
šãªç°å¢ã«æŽããªããã°ãªããŸããã枩床ã»æ¹¿åºŠã»é颚ã»ææ°ã»æããã»å
ã»é³ãªã©ãå¿«é©ãªå®€å
ç°å¢ã«ã¯æ§ã
ãªèŠçŽ ããããŸãããŸããéšå±ã®åºãã食ãæ¹ã«ãã£ãŠãå€ãã£ãŠããŸãã
çŸä»£ã¯ãæ°å¯æ§ãé«ãäœå®
ãå¢ããŠããŸããããããäœå®
ã¯å·ææ¿ãããå¹ããŠããŠããæ§ã
ãªåå ãã倧æ°æ±æã®åœ±é¿ãåããŠãå¥åº·ã«æªã圱é¿ãäžããŠããŸããŸããå®å
šã§å¿«é©ãªæ®ãããå®çŸããããã«ãäœå®
ã®å·¥å€«ã«ã€ããŠèããŠã¿ãŸãããã
== 宀å
ã®æ±æç©è³ª ==
宀å
ã®ç©ºæ°ãæ±æããç©è³ªãšããŠãåŒåžããåºãäºé
žåççŽ ã»ææ¿ããåºãæ°Žèžæ°ã»ã«ãã»ããã»ãã³ãªã»ãããã®æ¯ãªã©ãæããããŸãããŸããé²è«å€ã»æ®ºè«å€ã»ç
èã®ç
ãäœå®
建æã家å
·ã«äœ¿ãããæ¥çå€ã»å¡æã«å«ãŸããååŠç©è³ªãªã©ã宀å
ã®ç©ºæ°ãæ±æããåå ãšãªããŸãããããã®ååŠç©è³ªãåå ã§èµ·ãã身äœã®äžèª¿ã'''ã·ãã¯ããŠã¹çå矀'''ãšãããŸããããã®å€ãã¯ååŠç©è³ªãåå ã§ãã人ã«ãã£ãŠæ§ã
ãªçç¶ãçŸããŸãã
24æéææ°ã·ã¹ãã ãšã¯ãéšå±ã®ç©ºæ°ãèªåã§åŒ·å¶çã«å
¥ãæ¿ããææ°èšåã§ããã·ãã¯ããŠã¹çå矀ãªã©ã®äºé²ã«ã€ãªããããã24æéææ°ã·ã¹ãã ã®èšçœ®ã矩åä»ããããŠããŸãã
çŠæ¯çµŠæ¹¯åšãçŠæ¯ã³ã³ããç³æ²¹ã¹ããŒããªã©ãäžå®å
šççŒããçºçãã'''äžé
žåççŽ '''ã¯ãå°éã§ãæ·±å»ãªå¥åº·è¢«å®³ãæ»äº¡ã®åå ã«ãªããŸãã
宀å
ã®ç©ºæ°æ±æãé²ãã«ã¯ãææ°ã倧åã§ããææ°æã䜿ã£ãããçªãéãããããŠæ°é®®ãªç©ºæ°ãåãå
¥ããŸãããã
[[ã«ããŽãª:äžåŠæ ¡å®¶åºç§]]
[[ã«ããŽãª:å¥åº·]]
[[ã«ããŽãª:äœç掻]] | null | 2023-02-06T20:54:13Z | [] | https://ja.wikibooks.org/wiki/%E4%B8%AD%E5%AD%A6%E6%A0%A1%E5%AE%B6%E5%BA%AD/%E5%81%A5%E5%BA%B7%E3%81%A7%E5%BF%AB%E9%81%A9%E3%81%AA%E5%AE%A4%E5%86%85%E7%92%B0%E5%A2%83 |
36,902 | æ°æ³ç¬¬778æ¡ã®2 | (å«¡åºåŠèªã®èšŽãã®åºèšŽæé) | [
{
"paragraph_id": 0,
"tag": "p",
"text": "(å«¡åºåŠèªã®èšŽãã®åºèšŽæé)",
"title": "æ¡æ"
}
] | æ³åŠïŒæ°äºæ³ïŒæ°æ³ïŒã³ã³ã¡ã³ã¿ãŒã«æ°æ³ïŒç¬¬4ç·š 芪æ
æ³åŠïŒã³ã³ã¡ã³ã¿ãŒã«ïŒã³ã³ã¡ã³ã¿ãŒã«æ°æ³ïŒç¬¬4ç·š 芪æ | *[[æ³åŠ]]ïŒ[[æ°äºæ³]]ïŒ[[æ°æ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«æ°æ³]]ïŒ[[第4ç·š 芪æ (ã³ã³ã¡ã³ã¿ãŒã«æ°æ³)|第4ç·š 芪æ]]
*[[æ³åŠ]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«æ°æ³]]ïŒ[[第4ç·š 芪æ (ã³ã³ã¡ã³ã¿ãŒã«æ°æ³)|第4ç·š 芪æ]]
==æ¡æ==
([[å«¡åºåŠèª]]ã®èšŽãã®åºèšŽæé)
;第778æ¡ã®2
#[[æ°æ³ç¬¬777æ¡|第777æ¡]]ïŒç¬¬2å·ã«ä¿ãéšåã«éããïŒåã¯[[æ°æ³ç¬¬778æ¡|åæ¡]]ïŒç¬¬2å·ã«ä¿ãéšåã«éããïŒã®æéã®æºäºå6ç®æ以å
ã®éã«èŠªæš©ãè¡ãæ¯ã芪暩ãè¡ãé€èŠªåã³æªæ幎åŸèŠäººããªããšãã¯ãåã¯ãæ¯è¥ããã¯é€èŠªã®èŠªæš©åæ¢ã®æéãæºäºãã芪暩åªå€±è¥ããã¯èŠªæš©åæ¢ã®å¯©å€ã®åæ¶ãã®å¯©å€ã確å®ããè¥ããã¯èŠªæš©ãå埩ãããæãæ°ãã«é€åçžçµãæç«ããæåã¯æªæ幎åŸèŠäººãå°±è·ããæãã6ç®æãçµéãããŸã§ã®éã¯ãå«¡åºåŠèªã®èšŽããæèµ·ããããšãã§ããã
#åã¯ããã®ç¶ãšç¶ç¶ããŠåå±
ããæéïŒåœè©²æéãäºä»¥äžãããšãã¯ããã®ãã¡æãé·ãæéïŒã3幎ãäžåããšãã¯ã[[æ°æ³ç¬¬777æ¡|第777æ¡]]ïŒç¬¬2å·ã«ä¿ãéšåã«éããïŒåã³[[æ°æ³ç¬¬778æ¡|åæ¡]]ïŒç¬¬2å·ã«ä¿ãéšåã«éããïŒã®èŠå®ã«ãããããã21æ³ã«éãããŸã§ã®éãå«¡åºåŠèªã®èšŽããæèµ·ããããšãã§ããããã ããåã®åŠèªæš©ã®è¡äœ¿ãç¶ã«ããé€è²ã®ç¶æ³ã«ç
§ãããŠç¶ã®å©çãèãã害ãããšãã¯ããã®éãã§ãªãã
#[[æ°æ³ç¬¬774æ¡|第774æ¡]]第2é
ã®èŠå®ã¯ãåé
ã®å Žåã«ã¯ãé©çšããªãã
#[[æ°æ³ç¬¬777æ¡|第777æ¡]]ïŒç¬¬4å·ã«ä¿ãéšåã«éããïŒåã³[[æ°æ³ç¬¬778æ¡|åæ¡]]ïŒç¬¬4å·ã«ä¿ãéšåã«éããïŒã«æ²ããåŠèªæš©ã®è¡äœ¿ã«ä¿ãå«¡åºåŠèªã®èšŽãã¯ãåãæ幎ã«éããåŸã¯ãæèµ·ããããšãã§ããªãã
==解説==
:2022幎æ¹æ£ã«ãŠæ°èš(2024幎(什å6幎)4æ1æ¥æœè¡)ã
:#åã®åŠèªæš©è¡äœ¿ã¯ãéåžžã芪暩ãè¡ãæ¯ã芪暩ãè¡ãé€èŠªåã³æªæ幎åŸèŠäººãè¡äœ¿ããããšãæ³å®ãããããæéæºäº6ã¶æ以å
ã«ãããŠãããããæ¬ ãç¶æ³ãçããå Žåããã®ç¶æ³ãå埩ããåŸ6ã¶æéåºèšŽæéã延é·ãããïŒç¬¬1é
ïŒã
:#åã¯ãç¶ãšç¶ç¶ããŠç掻ããæéã3幎ãäžåãå Žåã21æ³ã«éãããŸã§ã®éãå«¡åºåŠèªã®èšŽããæèµ·ããããšãã§ããã18æ³ã«éãããŸã§ã¯æªæ幎ã§ããã18æ³ã«éããŠããã3ãµå¹Žã®åºèšŽæéãäžãããã®ã§ãã(第2é
)ãåŠèªæš©è¡äœ¿ããç¶ã®å©çãèãã害ãããšãã¯åŠèªæš©ã®è¡äœ¿ã¯èªããããªããåŠèªããåã®å©çã害ããŠè¡äœ¿ããåŸãªãããšã«åŒå¿ãããã®ã§ããããç¶ã®å©çã¯ãäžè¬ã«ç€ŸäŒç匱è
ã§ããä¿è·ãèŠããåã®å©çãšã¯ãäœçžãç°ã«ããŠç解ãã¹ãã§ãããäŸãã°ã被æ¶é€ã®æåŸ
å©çãªã©ããç¶ãšããŠã®ååãªæ¯ãèãïŒæé·ãããŸã§ãäžè¶³ã®ãªãé€è²è²»ã®æäŸãè¡ãªã£ãçïŒã®äžã§ãç¶ã®å©çãšèšãããã¯ã¯çåã§ãããä»åŸã®ååã泚èŠããå¿
èŠãããã
:#å倫ã¯åãæ幎ã«éããåŸã¯ãå«¡åºåŠèªã®èšŽããæèµ·ããããšãã§ããªãã
==åç
§æ¡æ==
==å€äŸ==
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«æ°æ³|æ°æ³]]
|[[第4ç·š 芪æ (ã³ã³ã¡ã³ã¿ãŒã«æ°æ³)|第4ç·š 芪æ]]<br>
[[第4ç·š 芪æ (ã³ã³ã¡ã³ã¿ãŒã«æ°æ³)#3|第3ç« èŠªå]]<br>
[[第4ç·š 芪æ (ã³ã³ã¡ã³ã¿ãŒã«æ°æ³)#3-1|第1ç¯ å®å]]
|[[æ°æ³ç¬¬778æ¡]]<br>ïŒå«¡åºåŠèªã®èšŽãã®åºèšŽæéïŒ
|[[æ°æ³ç¬¬778æ¡ã®3]]<br>ïŒåã®ç£è·ã«èŠããè²»çšã®åéã®å¶éïŒ
}}
{{stub|law}}
[[category:æ°æ³|778ã®2]]
[[category:æ°æ³ 2022幎æ¹æ£|778ã®2]] | 2023-02-09T04:27:01Z | 2024-02-15T07:30:39Z | [
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E6%B0%91%E6%B3%95%E7%AC%AC778%E6%9D%A1%E3%81%AE2 |
36,904 | æ°æ³ç¬¬778æ¡ã®3 | (åã®ç£è·ã«èŠããè²»çšã®åéã®å¶é) | [
{
"paragraph_id": 0,
"tag": "p",
"text": "(åã®ç£è·ã«èŠããè²»çšã®åéã®å¶é)",
"title": "æ¡æ"
}
] | æ³åŠïŒæ°äºæ³ïŒæ°æ³ïŒã³ã³ã¡ã³ã¿ãŒã«æ°æ³ïŒç¬¬4ç·š 芪æ
æ³åŠïŒã³ã³ã¡ã³ã¿ãŒã«ïŒã³ã³ã¡ã³ã¿ãŒã«æ°æ³ïŒç¬¬4ç·š 芪æ | *[[æ³åŠ]]ïŒ[[æ°äºæ³]]ïŒ[[æ°æ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«æ°æ³]]ïŒ[[第4ç·š 芪æ (ã³ã³ã¡ã³ã¿ãŒã«æ°æ³)|第4ç·š 芪æ]]
*[[æ³åŠ]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«æ°æ³]]ïŒ[[第4ç·š 芪æ (ã³ã³ã¡ã³ã¿ãŒã«æ°æ³)|第4ç·š 芪æ]]
==æ¡æ==
(åã®ç£è·ã«èŠããè²»çšã®åéã®å¶é)
;第778æ¡ã®3
:[[æ°æ³ç¬¬774æ¡|第774æ¡]]ã®èŠå®ã«ããå«¡åºã§ããããšãåŠèªãããå Žåã§ãã£ãŠããåã¯ãç¶ã§ãã£ãè
ãæ¯åºããåã®ç£è·ã«èŠããè²»çšãåéãã矩åãè² ããªãã
==解説==
:2022幎æ¹æ£ã«ãŠæ°èš(2024幎(什å6幎)4æ1æ¥æœè¡)ã
==åç
§æ¡æ==
==å€äŸ==
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«æ°æ³|æ°æ³]]
|[[第4ç·š 芪æ (ã³ã³ã¡ã³ã¿ãŒã«æ°æ³)|第4ç·š 芪æ]]<br>
[[第4ç·š 芪æ (ã³ã³ã¡ã³ã¿ãŒã«æ°æ³)#3|第3ç« èŠªå]]<br>
[[第4ç·š 芪æ (ã³ã³ã¡ã³ã¿ãŒã«æ°æ³)#3-1|第1ç¯ å®å]]
|[[æ°æ³ç¬¬778æ¡ã®2]]<br>ïŒå«¡åºåŠèªã®èšŽãã®åºèšŽæéïŒ
|[[æ°æ³ç¬¬778æ¡ã®4]]<br>ïŒçžç¶ã®éå§åŸã«æ°ãã«åãšæšå®ãããè
ã®äŸ¡é¡ã®æ¯æè«æ±æš©ïŒ
}}
{{stub|law}}
[[category:æ°æ³|778ã®3]]
[[category:æ°æ³ 2022幎æ¹æ£|778ã®3]] | 2023-02-09T04:31:03Z | 2024-02-05T07:07:31Z | [
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E6%B0%91%E6%B3%95%E7%AC%AC778%E6%9D%A1%E3%81%AE3 |
36,905 | æ°æ³ç¬¬778æ¡ã®4 | (çžç¶ã®éå§åŸã«æ°ãã«åãšæšå®ãããè
ã®äŸ¡é¡ã®æ¯æè«æ±æš©) | [
{
"paragraph_id": 0,
"tag": "p",
"text": "(çžç¶ã®éå§åŸã«æ°ãã«åãšæšå®ãããè
ã®äŸ¡é¡ã®æ¯æè«æ±æš©)",
"title": "æ¡æ"
}
] | æ³åŠïŒæ°äºæ³ïŒæ°æ³ïŒã³ã³ã¡ã³ã¿ãŒã«æ°æ³ïŒç¬¬4ç·š 芪æ
æ³åŠïŒã³ã³ã¡ã³ã¿ãŒã«ïŒã³ã³ã¡ã³ã¿ãŒã«æ°æ³ïŒç¬¬4ç·š 芪æ | *[[æ³åŠ]]ïŒ[[æ°äºæ³]]ïŒ[[æ°æ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«æ°æ³]]ïŒ[[第4ç·š 芪æ (ã³ã³ã¡ã³ã¿ãŒã«æ°æ³)|第4ç·š 芪æ]]
*[[æ³åŠ]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«æ°æ³]]ïŒ[[第4ç·š 芪æ (ã³ã³ã¡ã³ã¿ãŒã«æ°æ³)|第4ç·š 芪æ]]
==æ¡æ==
(çžç¶ã®éå§åŸã«æ°ãã«åãšæšå®ãããè
ã®äŸ¡é¡ã®æ¯æè«æ±æš©)
;第778æ¡ã®4
:çžç¶ã®éå§åŸã[[æ°æ³ç¬¬774æ¡|第774æ¡]]ã®èŠå®ã«ããåŠèªæš©ãè¡äœ¿ããã[[æ°æ³ç¬¬772æ¡|第772æ¡]]æ¡ç¬¬4é
ã®èŠå®ã«ããèªã¿æ¿ããããåæ¡ç¬¬3é
ã®èŠå®ã«ããæ°ãã«è¢«çžç¶äººããã®ç¶ãšå®ããããè
ãçžç¶äººãšããŠéºç£ã®åå²ãè«æ±ããããšããå Žåã«ãããŠãä»ã®å
±åçžç¶äººãæ¢ã«ãã®åå²ãã®ä»ã®åŠåãããŠãããšãã¯ãåœè©²çžç¶äººã®éºç£åå²ã®è«æ±ã¯ã䟡é¡ã®ã¿ã«ããæ¯æã®è«æ±ã«ããè¡ããã®ãšããã
==解説==
:2022幎æ¹æ£ã«ãŠæ°èš(2024幎(什å6幎)4æ1æ¥æœè¡)ã
==åç
§æ¡æ==
==å€äŸ==
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«æ°æ³|æ°æ³]]
|[[第4ç·š 芪æ (ã³ã³ã¡ã³ã¿ãŒã«æ°æ³)|第4ç·š 芪æ]]<br>
[[第4ç·š 芪æ (ã³ã³ã¡ã³ã¿ãŒã«æ°æ³)#3|第3ç« èŠªå]]<br>
[[第4ç·š 芪æ (ã³ã³ã¡ã³ã¿ãŒã«æ°æ³)#3-1|第1ç¯ å®å]]
|[[æ°æ³ç¬¬778æ¡ã®3]]<br>ïŒåã®ç£è·ã«èŠããè²»çšã®åéã®å¶éïŒ
|[[æ°æ³ç¬¬779æ¡]]<br>ïŒèªç¥ïŒ
}}
{{stub|law}}
[[category:æ°æ³|778ã®4]]
[[category:æ°æ³ 2022幎æ¹æ£|778ã®4]] | 2023-02-09T04:36:00Z | 2024-02-05T07:07:51Z | [
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E6%B0%91%E6%B3%95%E7%AC%AC778%E6%9D%A1%E3%81%AE4 |
36,906 | ãªã¹ãã³åžåœ | ãªã¹ãã³åžåœãšã¯1299幎ãã1922幎ãŸã§ãŠãŒã©ã·ã¢ãã¢ããªã«å€§éžã«ååšããåœå®¶ã
1299幎ã«ãªã¹ãã³1äžãã¢ãããªã¢å島西éšã«ãªã¹ãã³å䟯åœ(åŸã®ãªã¹ãã³åžåœ)ã建ãŠãã
詳现ã¯ãw:ã³ã³ã¹ã¿ã³ãã£ããŒãã«ã®é¥èœããåç
§
1453幎ã¡ãã¡ã2äžã«ãã£ãŠãã¶ã³ãåžåœã®éŠéœã³ã³ã¹ã¿ã³ãã£ããŒãã«ãåŸæããåå°ã«é·éœãããããã«ãã£ãŠãã¶ã³ãåžåœã¯æ»
亡ããã
詳现ã¯ãw:ã»ãªã 1äžããåç
§
1514幎ãã£ã«ãã£ã©ãŒã³ã®æŠãã§ãµãã¡ãŽã£ãŒæãç Žããã·ãªã¢ãç²åŸããã1517幎ã«ã¯ãã ã«ãŒã¯æãæ»
亡ãããã¡ãã«ã»ã¡ãã£ãã®ä¿è·æš©ãææ¡ãããªã¹ãã³åžåœãã¹ã³ã掟ã€ã¹ã©ãŒã æãå®è·ããååšã«ããã
詳现ã¯ãw:第äžæ¬¡ãŠã£ãŒã³å
å²ããåç
§
1529幎ã¹ã¬ã€ãã³1äžã«ãã£ãŠãŠã£ãŒã³ãå
å²ããããšãŒãããè«žåœã«å€§ããªè
åšãäžããã
詳现ã¯ãw:ãã¬ãŽã§ã¶ã®æµ·æŠããåç
§
1538幎ã¹ãã€ã³ã»æçé£åèŠéãç Žããæ±å°äžæµ·ã®å¶æµ·æš©ãææ¡ããã
詳现ã¯ãw:ã®ãªã·ã¢ç¬ç«æŠäºããåç
§
1821幎ãªã¹ãã³åžåœå
ã®ã®ãªã·ã¢ãç¬ç«æŠäºãèµ·ãããå匷諞åœã¯ã®ãªã·ã¢ãæ¯æŽããåäžæ¿çãè¡ã£ãŠãããã·ã¢åžåœãä»å
¥ã1829幎ã«ã¯ãã·ã¢ãšã¢ããªã¢ããŒãã«æ¡çŽãçµã³ãã®ãªã·ã¢ã®ç¬ç«æ¿èªãé»æµ·æ²¿å²žã®é åããã·ã¢ã«å²è²ããã
詳现ã¯ãw:é幎ãã«ã³é©åœããåç
§
ãããã=ãã·ã£ãèµ·èããããããæ²æ³ã¯ãã¢ãžã¢ã®ç¬ç«åœå®¶ã§ã¯æåã®æ²æ³ã ã£ãããã¹ã«ã¿ã³ã®ã¢ããã¥ã«=ããã2äžã¯ãããåçµããããããããè¿œæŸããã
ããã«å¯ŸããŠæ²æ³åæ¢ã«åçºããé幎ãã«ã³äººã¯ãçµ±äžãšé²æ©å£ããçµæãã1908幎ã«é©åœãèµ·ããæ²æ³ã埩掻ãããæ¿æš©ãæ¡ã£ãã ãã®åŸæ¿å±ã¯äžå®å®ã«ãªããåœå
äžè«ã¯åè£ãããã ãããã®ããšããã£ãããšãªããã«ã³æ°æ䞻矩ã®æé·ãé²ãã ã
詳现ã¯ãw:第äžæ¬¡ãã«ã«ã³æŠäº ãw:第äºæ¬¡ãã«ã«ã³æŠäºããåç
§
1908幎ã«ãªãŒã¹ããªã¢=ãã³ã¬ãªãŒåžåœããã¹ãã¢ã»ãã«ãã§ãŽãŽã£ãã䜵åãããšããã·ã¢ã¯1912幎ã«ã»ã«ãã¢ããã«ã¬ãªã¢ãã¢ã³ããã°ããã®ãªã·ã¢ã®4åœããã«ã«ã³åçã«çµæããããã³=ã²ã«ãã³äž»çŸ©ã«å¯Ÿæããã
ãã®åŸå幎ã®ã€ã¿ãªã¢=ãã«ã³æŠäºä¹ããŠãªã¹ãã³åžåœã«å®£æŠããã(第1次ãã«ã«ã³æŠäº)ããã§ãã«ã«ã³åçã¯åå©ããããç²åŸããé åãããã£ãŠå¯Ÿç«ãããã«ã¬ãªã¢ãšä»ã®ãã«ã«ã³åçéã§æŠäºã«ãªã£ãã(第2次ãã«ã«ã³æŠäº)
ãã®æŠäºã«ãã£ãŠãªã¹ãã³åžåœã¯ãã€ãåžåœã«ããã«ã¬ãªã¢ã¯ãã€ããšãªãŒã¹ããªã¢ã«æ¥è¿ãã第1次äžç倧æŠã§åçåœåŽãšããŠåæŠããããšãšãªãã
第1次ãã«ã«ã³æŠäºåŸã«ãã€ãã«æ¥è¿ããå¯çŽãçµãã ããšã§1914幎ã«åçåœåŽãšããŠåæŠããã
ã ããåœå
ã®ã¢ã©ã人ã«åä¹±ãèµ·ããããå£å¢ã«é¥ãã1918幎ã«éäŒã 1920幎ã«ã»ãŽãŒã«æ¡çŽãç· çµããã
1919幎ããã®ãªã·ã¢=ãã«ã³æŠäºãèµ·ããããã«ã³äººã倧åãå ããå°åãå é ããããšããã®å°åã®ä¿å
šãç®æããã ã¹ã¿ãã¡=ã±ãã«ã«ãã£ãŠèšææ¿åºãæš¹ç«ãã»ãŽãŒã«æ¡çŽã«åããŠé£åè»ãéããã ããã«ãã£ãŠã»ãŽãŒã«æ¡çŽã«ä»£ãããããŒã¶ã³ãæ¡çŽãç· çµãããã
1923幎ã«ã¯ãã«ã³å
±ååœãæç«ãç¿24幎ã«ã«ãªãå¶ã®å»æ¢ããã«ã³å
±ååœæ²æ³ãçºåžããããªã¹ãã³åžåœã¯æ»
亡ããã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "ãªã¹ãã³åžåœãšã¯1299幎ãã1922幎ãŸã§ãŠãŒã©ã·ã¢ãã¢ããªã«å€§éžã«ååšããåœå®¶ã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "1299幎ã«ãªã¹ãã³1äžãã¢ãããªã¢å島西éšã«ãªã¹ãã³å䟯åœ(åŸã®ãªã¹ãã³åžåœ)ã建ãŠãã",
"title": "æŽå²"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "詳现ã¯ãw:ã³ã³ã¹ã¿ã³ãã£ããŒãã«ã®é¥èœããåç
§",
"title": "æŽå²"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "1453幎ã¡ãã¡ã2äžã«ãã£ãŠãã¶ã³ãåžåœã®éŠéœã³ã³ã¹ã¿ã³ãã£ããŒãã«ãåŸæããåå°ã«é·éœãããããã«ãã£ãŠãã¶ã³ãåžåœã¯æ»
亡ããã",
"title": "æŽå²"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "詳现ã¯ãw:ã»ãªã 1äžããåç
§",
"title": "æŽå²"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "1514幎ãã£ã«ãã£ã©ãŒã³ã®æŠãã§ãµãã¡ãŽã£ãŒæãç Žããã·ãªã¢ãç²åŸããã1517幎ã«ã¯ãã ã«ãŒã¯æãæ»
亡ãããã¡ãã«ã»ã¡ãã£ãã®ä¿è·æš©ãææ¡ãããªã¹ãã³åžåœãã¹ã³ã掟ã€ã¹ã©ãŒã æãå®è·ããååšã«ããã",
"title": "æŽå²"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "詳现ã¯ãw:第äžæ¬¡ãŠã£ãŒã³å
å²ããåç
§",
"title": "æŽå²"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "1529幎ã¹ã¬ã€ãã³1äžã«ãã£ãŠãŠã£ãŒã³ãå
å²ããããšãŒãããè«žåœã«å€§ããªè
åšãäžããã",
"title": "æŽå²"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "詳现ã¯ãw:ãã¬ãŽã§ã¶ã®æµ·æŠããåç
§",
"title": "æŽå²"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "1538幎ã¹ãã€ã³ã»æçé£åèŠéãç Žããæ±å°äžæµ·ã®å¶æµ·æš©ãææ¡ããã",
"title": "æŽå²"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "詳现ã¯ãw:ã®ãªã·ã¢ç¬ç«æŠäºããåç
§",
"title": "æŽå²"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "1821幎ãªã¹ãã³åžåœå
ã®ã®ãªã·ã¢ãç¬ç«æŠäºãèµ·ãããå匷諞åœã¯ã®ãªã·ã¢ãæ¯æŽããåäžæ¿çãè¡ã£ãŠãããã·ã¢åžåœãä»å
¥ã1829幎ã«ã¯ãã·ã¢ãšã¢ããªã¢ããŒãã«æ¡çŽãçµã³ãã®ãªã·ã¢ã®ç¬ç«æ¿èªãé»æµ·æ²¿å²žã®é åããã·ã¢ã«å²è²ããã",
"title": "æŽå²"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "詳现ã¯ãw:é幎ãã«ã³é©åœããåç
§",
"title": "æŽå²"
},
{
"paragraph_id": 13,
"tag": "p",
"text": "ãããã=ãã·ã£ãèµ·èããããããæ²æ³ã¯ãã¢ãžã¢ã®ç¬ç«åœå®¶ã§ã¯æåã®æ²æ³ã ã£ãããã¹ã«ã¿ã³ã®ã¢ããã¥ã«=ããã2äžã¯ãããåçµããããããããè¿œæŸããã",
"title": "æŽå²"
},
{
"paragraph_id": 14,
"tag": "p",
"text": "ããã«å¯ŸããŠæ²æ³åæ¢ã«åçºããé幎ãã«ã³äººã¯ãçµ±äžãšé²æ©å£ããçµæãã1908幎ã«é©åœãèµ·ããæ²æ³ã埩掻ãããæ¿æš©ãæ¡ã£ãã ãã®åŸæ¿å±ã¯äžå®å®ã«ãªããåœå
äžè«ã¯åè£ãããã ãããã®ããšããã£ãããšãªããã«ã³æ°æ䞻矩ã®æé·ãé²ãã ã",
"title": "æŽå²"
},
{
"paragraph_id": 15,
"tag": "p",
"text": "詳现ã¯ãw:第äžæ¬¡ãã«ã«ã³æŠäº ãw:第äºæ¬¡ãã«ã«ã³æŠäºããåç
§",
"title": "æŽå²"
},
{
"paragraph_id": 16,
"tag": "p",
"text": "1908幎ã«ãªãŒã¹ããªã¢=ãã³ã¬ãªãŒåžåœããã¹ãã¢ã»ãã«ãã§ãŽãŽã£ãã䜵åãããšããã·ã¢ã¯1912幎ã«ã»ã«ãã¢ããã«ã¬ãªã¢ãã¢ã³ããã°ããã®ãªã·ã¢ã®4åœããã«ã«ã³åçã«çµæããããã³=ã²ã«ãã³äž»çŸ©ã«å¯Ÿæããã",
"title": "æŽå²"
},
{
"paragraph_id": 17,
"tag": "p",
"text": "ãã®åŸå幎ã®ã€ã¿ãªã¢=ãã«ã³æŠäºä¹ããŠãªã¹ãã³åžåœã«å®£æŠããã(第1次ãã«ã«ã³æŠäº)ããã§ãã«ã«ã³åçã¯åå©ããããç²åŸããé åãããã£ãŠå¯Ÿç«ãããã«ã¬ãªã¢ãšä»ã®ãã«ã«ã³åçéã§æŠäºã«ãªã£ãã(第2次ãã«ã«ã³æŠäº)",
"title": "æŽå²"
},
{
"paragraph_id": 18,
"tag": "p",
"text": "ãã®æŠäºã«ãã£ãŠãªã¹ãã³åžåœã¯ãã€ãåžåœã«ããã«ã¬ãªã¢ã¯ãã€ããšãªãŒã¹ããªã¢ã«æ¥è¿ãã第1次äžç倧æŠã§åçåœåŽãšããŠåæŠããããšãšãªãã",
"title": "æŽå²"
},
{
"paragraph_id": 19,
"tag": "p",
"text": "",
"title": "æŽå²"
},
{
"paragraph_id": 20,
"tag": "p",
"text": "第1次ãã«ã«ã³æŠäºåŸã«ãã€ãã«æ¥è¿ããå¯çŽãçµãã ããšã§1914幎ã«åçåœåŽãšããŠåæŠããã",
"title": "æŽå²"
},
{
"paragraph_id": 21,
"tag": "p",
"text": "ã ããåœå
ã®ã¢ã©ã人ã«åä¹±ãèµ·ããããå£å¢ã«é¥ãã1918幎ã«éäŒã 1920幎ã«ã»ãŽãŒã«æ¡çŽãç· çµããã",
"title": "æŽå²"
},
{
"paragraph_id": 22,
"tag": "p",
"text": "1919幎ããã®ãªã·ã¢=ãã«ã³æŠäºãèµ·ããããã«ã³äººã倧åãå ããå°åãå é ããããšããã®å°åã®ä¿å
šãç®æããã ã¹ã¿ãã¡=ã±ãã«ã«ãã£ãŠèšææ¿åºãæš¹ç«ãã»ãŽãŒã«æ¡çŽã«åããŠé£åè»ãéããã ããã«ãã£ãŠã»ãŽãŒã«æ¡çŽã«ä»£ãããããŒã¶ã³ãæ¡çŽãç· çµãããã",
"title": "æŽå²"
},
{
"paragraph_id": 23,
"tag": "p",
"text": "1923幎ã«ã¯ãã«ã³å
±ååœãæç«ãç¿24幎ã«ã«ãªãå¶ã®å»æ¢ããã«ã³å
±ååœæ²æ³ãçºåžããããªã¹ãã³åžåœã¯æ»
亡ããã",
"title": "æŽå²"
}
] | ãªã¹ãã³åžåœãšã¯1299幎ãã1922幎ãŸã§ãŠãŒã©ã·ã¢ãã¢ããªã«å€§éžã«ååšããåœå®¶ã | '''ãªã¹ãã³åžåœ'''ãšã¯1299幎ãã1922幎ãŸã§ãŠãŒã©ã·ã¢ãã¢ããªã«å€§éžã«ååšããåœå®¶ã
==æŽå²==
===建åœ===
1299幎ã«ãªã¹ãã³1äžãã¢ãããªã¢å島西éšã«ãªã¹ãã³å䟯åœïŒåŸã®ãªã¹ãã³åžåœïŒã建ãŠãã
===å
šçæ===
====ã³ã³ã¹ã¿ã³ãã£ããŒãã«åŸæ====
詳现ã¯ã[[w:ã³ã³ã¹ã¿ã³ãã£ããŒãã«ã®é¥èœ]]ããåç
§
1453幎ã¡ãã¡ã2äžã«ãã£ãŠãã¶ã³ãåžåœã®éŠéœã³ã³ã¹ã¿ã³ãã£ããŒãã«ãåŸæããåå°ã«é·éœãããããã«ãã£ãŠãã¶ã³ãåžåœã¯æ»
亡ããã
====ã»ãªã 1äž====
詳现ã¯ã[[w:ã»ãªã 1äž]]ããåç
§
1514幎ãã£ã«ãã£ã©ãŒã³ã®æŠãã§ãµãã¡ãŽã£ãŒæãç Žããã·ãªã¢ãç²åŸããã1517幎ã«ã¯ãã ã«ãŒã¯æãæ»
亡ãããã¡ãã«ã»ã¡ãã£ãã®ä¿è·æš©ãææ¡ãããªã¹ãã³åžåœãã¹ã³ã掟ã€ã¹ã©ãŒã æãå®è·ããååšã«ããã
====第1次ãŠã£ãŒã³å
å²====
詳现ã¯ã[[w:第äžæ¬¡ãŠã£ãŒã³å
å²]]ããåç
§
1529幎ã¹ã¬ã€ãã³1äžã«ãã£ãŠãŠã£ãŒã³ãå
å²ããããšãŒãããè«žåœã«å€§ããªè
åšãäžããã
====ãã¬ãŽã§ã¶ã®æµ·æŠ====
詳现ã¯ã[[w:ãã¬ãŽã§ã¶ã®æµ·æŠ]]ããåç
§
1538幎ã¹ãã€ã³ã»æçé£åèŠéãç Žããæ±å°äžæµ·ã®å¶æµ·æš©ãææ¡ããã
===è¡°é===
====ã®ãªã·ã¢ç¬ç«æŠäº====
詳现ã¯ã[[w:ã®ãªã·ã¢ç¬ç«æŠäº]]ããåç
§
1821幎ãªã¹ãã³åžåœå
ã®ã®ãªã·ã¢ãç¬ç«æŠäºãèµ·ãããå匷諞åœã¯ã®ãªã·ã¢ãæ¯æŽããåäžæ¿çãè¡ã£ãŠãã[[ãã·ã¢åžåœ]]ãä»å
¥ã1829幎ã«ã¯ãã·ã¢ãšã¢ããªã¢ããŒãã«æ¡çŽãçµã³ãã®ãªã·ã¢ã®ç¬ç«æ¿èªãé»æµ·æ²¿å²žã®é åããã·ã¢ã«å²è²ããã
====é幎ãã«ã³é©åœ====
詳现ã¯ã[[w:é幎ãã«ã³é©åœ]]ããåç
§
ãããã=ãã·ã£ãèµ·èããããããæ²æ³ã¯ãã¢ãžã¢ã®ç¬ç«åœå®¶ã§ã¯æåã®æ²æ³ã ã£ãããã¹ã«ã¿ã³ã®ã¢ããã¥ã«=ããã2äžã¯ãããåçµããããããããè¿œæŸããã
ããã«å¯ŸããŠæ²æ³åæ¢ã«åçºããé幎ãã«ã³äººã¯ãçµ±äžãšé²æ©å£ããçµæãã1908幎ã«é©åœãèµ·ããæ²æ³ã埩掻ãããæ¿æš©ãæ¡ã£ãã
ãã®åŸæ¿å±ã¯äžå®å®ã«ãªããåœå
äžè«ã¯åè£ãããã ãããã®ããšããã£ãããšãªããã«ã³æ°æ䞻矩ã®æé·ãé²ãã ã
====第1次ã»ç¬¬2次ãã«ã«ã³æŠäº====
詳现ã¯ã[[w:第äžæ¬¡ãã«ã«ã³æŠäº]] ã[[w:第äºæ¬¡ãã«ã«ã³æŠäº]]ããåç
§
1908幎ã«[[ãªãŒã¹ããªã¢=ãã³ã¬ãªãŒåžåœ]]ããã¹ãã¢ã»ãã«ãã§ãŽãŽã£ãã䜵åãããšããã·ã¢ã¯1912幎ã«ã»ã«ãã¢ããã«ã¬ãªã¢ãã¢ã³ããã°ããã®ãªã·ã¢ã®4åœããã«ã«ã³åçã«çµæããããã³=ã²ã«ãã³äž»çŸ©ã«å¯Ÿæããã<br>
ãã®åŸå幎ã®ã€ã¿ãªã¢=ãã«ã³æŠäºä¹ããŠãªã¹ãã³åžåœã«å®£æŠãããïŒç¬¬1次ãã«ã«ã³æŠäºïŒããã§ãã«ã«ã³åçã¯åå©ããããç²åŸããé åãããã£ãŠå¯Ÿç«ãããã«ã¬ãªã¢ãšä»ã®ãã«ã«ã³åçéã§æŠäºã«ãªã£ããïŒç¬¬2次ãã«ã«ã³æŠäºïŒ
ãã®æŠäºã«ãã£ãŠãªã¹ãã³åžåœã¯[[ãã€ãåžåœ]]ã«ããã«ã¬ãªã¢ã¯ãã€ããšãªãŒã¹ããªã¢ã«æ¥è¿ãã第1次äžç倧æŠã§åçåœåŽãšããŠåæŠããããšãšãªãã
====第äžæ¬¡äžç倧æŠ====
第1次ãã«ã«ã³æŠäºåŸã«ãã€ãã«æ¥è¿ããå¯çŽãçµãã ããšã§1914幎ã«åçåœåŽãšããŠåæŠããã
ã ããåœå
ã®ã¢ã©ã人ã«åä¹±ãèµ·ããããå£å¢ã«é¥ãã1918幎ã«éäŒã
1920幎ã«ã»ãŽãŒã«æ¡çŽãç· çµããã
====æ»
亡====
1919幎ããã®ãªã·ã¢ïŒãã«ã³æŠäºãèµ·ããããã«ã³äººã倧åãå ããå°åãå é ããããšããã®å°åã®ä¿å
šãç®æããã ã¹ã¿ãã¡ïŒã±ãã«ã«ãã£ãŠèšææ¿åºãæš¹ç«ãã»ãŽãŒã«æ¡çŽã«åããŠé£åè»ãéããã
ããã«ãã£ãŠã»ãŽãŒã«æ¡çŽã«ä»£ãããããŒã¶ã³ãæ¡çŽãç· çµãããã
1923幎ã«ã¯ãã«ã³å
±ååœãæç«ãç¿24幎ã«ã«ãªãå¶ã®å»æ¢ããã«ã³å
±ååœæ²æ³ãçºåžããããªã¹ãã³åžåœã¯æ»
亡ããã
==æ¿æ²»==
==è»äº==
==é¢é£é
ç®==
{{Wikipedia}}
*[[第äžæ¬¡äžç倧æŠ]]
[[ã«ããŽãª:ãªã¹ãã³åžåœã®æŽå²|*]] | null | 2023-02-09T08:41:07Z | [
"ãã³ãã¬ãŒã:Wikipedia"
] | https://ja.wikibooks.org/wiki/%E3%82%AA%E3%82%B9%E3%83%9E%E3%83%B3%E5%B8%9D%E5%9B%BD |
36,908 | æ | æã¯1368幎ãã1644幎ãŸã§ååšããåœå®¶ã
1368幎æ±å
çãå
ã®å€§éœãå æ ãã措æŠåžãšããŠå³äœããã
1399幎建æåžã«å¯Ÿããççæ±æ££(ã®ã¡ã®æ°žæ¥œåž)ãã¯ãŒãã¿ãŒãèµ·ããå³äœããã
察å€æ¿çã§ã¯éåã®åæŽé åŸããããã åºå
µãã¢ã³ãŽã«é åŸãªã©ãè¡ã£ãã
å
æ¿é¢ã§ã¯æ°žæ¥œå€§å
žã®ç·šçºã1421幎ã«ã¯éŠéœãå京ãžé·éœãã玫çŠåãç¯ããã
åæ¹ã§ã¯1449幎ã«åæšã®å€ãèµ·ããæ£çµ±åžããªã€ã©ãã®ãšã»ã³ã«æçžããã1550幎ã«ã¯åºæã®å€ãèµ·ãããå京ã¯ã¢ã³ãŽã«ã®ã¢ã«ã¿ã³=ããŒã³ã«å
å²ãããã
äžæ¹åæ¹ã§ã¯åŸæåå¯ã®æŽ»åãæ¿åããã
1631幎ã«æèªæã®ä¹±ãèµ·ãã1644幎ã«ã¯æèªæãå京ãå é ãçåžã ã£ãåŽçŠåžã¯èªæ®ºããæã¯æ»
亡ããã
1644幎ã«æž
ã®é æ²»åžãæèªæè»ãç Žããå京ãå é ãæž
ãäžåœãæ¯é
ã
ç·šçºäºæ¥ã¯äž»ã«æ°žæ¥œåžæã«è¡ããããšãã«æåãªã®ã¯åæžå€§å
šãäºçµå€§å
šã氞楜倧å
šãæ§ç倧å
šãªã©ã§ããã
å®ä»£ã®é¶ç£åšã¯ç¡å°ã®ãã®ãå€ãã£ãããæã»æž
代ã«å
¥ããšèµ€çµµãæä»ãªã©ã®è¯ãããªãã®ãå€ããªã£ãã ç¹ã«æåãªç£å°ã§ããæ¯åŸ³é®ã§ã¯é¶ç£åšã®å®ææãè¿ããã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æã¯1368幎ãã1644幎ãŸã§ååšããåœå®¶ã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "1368幎æ±å
çãå
ã®å€§éœãå æ ãã措æŠåžãšããŠå³äœããã",
"title": "æŽå²"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "1399幎建æåžã«å¯Ÿããççæ±æ££(ã®ã¡ã®æ°žæ¥œåž)ãã¯ãŒãã¿ãŒãèµ·ããå³äœããã",
"title": "æŽå²"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "察å€æ¿çã§ã¯éåã®åæŽé åŸããããã åºå
µãã¢ã³ãŽã«é åŸãªã©ãè¡ã£ãã",
"title": "æŽå²"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "å
æ¿é¢ã§ã¯æ°žæ¥œå€§å
žã®ç·šçºã1421幎ã«ã¯éŠéœãå京ãžé·éœãã玫çŠåãç¯ããã",
"title": "æŽå²"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "åæ¹ã§ã¯1449幎ã«åæšã®å€ãèµ·ããæ£çµ±åžããªã€ã©ãã®ãšã»ã³ã«æçžããã1550幎ã«ã¯åºæã®å€ãèµ·ãããå京ã¯ã¢ã³ãŽã«ã®ã¢ã«ã¿ã³=ããŒã³ã«å
å²ãããã",
"title": "æŽå²"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "äžæ¹åæ¹ã§ã¯åŸæåå¯ã®æŽ»åãæ¿åããã",
"title": "æŽå²"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "1631幎ã«æèªæã®ä¹±ãèµ·ãã1644幎ã«ã¯æèªæãå京ãå é ãçåžã ã£ãåŽçŠåžã¯èªæ®ºããæã¯æ»
亡ããã",
"title": "æŽå²"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "1644幎ã«æž
ã®é æ²»åžãæèªæè»ãç Žããå京ãå é ãæž
ãäžåœãæ¯é
ã",
"title": "æŽå²"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "ç·šçºäºæ¥ã¯äž»ã«æ°žæ¥œåžæã«è¡ããããšãã«æåãªã®ã¯åæžå€§å
šãäºçµå€§å
šã氞楜倧å
šãæ§ç倧å
šãªã©ã§ããã",
"title": "æå"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "å®ä»£ã®é¶ç£åšã¯ç¡å°ã®ãã®ãå€ãã£ãããæã»æž
代ã«å
¥ããšèµ€çµµãæä»ãªã©ã®è¯ãããªãã®ãå€ããªã£ãã ç¹ã«æåãªç£å°ã§ããæ¯åŸ³é®ã§ã¯é¶ç£åšã®å®ææãè¿ããã",
"title": "æå"
}
] | æã¯1368幎ãã1644幎ãŸã§ååšããåœå®¶ã | '''æ'''ã¯1368幎ãã1644幎ãŸã§ååšããåœå®¶ã
==æŽå²==
===建åœ===
1368幎æ±å
çãå
ã®å€§éœãå æ ãã措æŠåžãšããŠå³äœããã
===éé£ã®åœ¹===
1399幎建æåžã«å¯Ÿããççæ±æ££ïŒã®ã¡ã®æ°žæ¥œåžïŒãã¯ãŒãã¿ãŒãèµ·ããå³äœããã
===å
šçæ===
====氞楜åž====
察å€æ¿çã§ã¯éåã®åæŽé åŸããããã åºå
µãã¢ã³ãŽã«é åŸãªã©ãè¡ã£ãã
å
æ¿é¢ã§ã¯æ°žæ¥œå€§å
žã®ç·šçºã1421幎ã«ã¯éŠéœãå京ãžé·éœãã玫çŠåãç¯ããã
===è¡°é===
====åèåå====
åæ¹ã§ã¯1449幎ã«åæšã®å€ãèµ·ããæ£çµ±åžããªã€ã©ãã®ãšã»ã³ã«æçžããã1550幎ã«ã¯åºæã®å€ãèµ·ãããå京ã¯ã¢ã³ãŽã«ã®ã¢ã«ã¿ã³ïŒããŒã³ã«å
å²ãããã
äžæ¹åæ¹ã§ã¯åŸæåå¯ã®æŽ»åãæ¿åããã
===æ»
亡===
1631幎ã«æèªæã®ä¹±ãèµ·ãã1644幎ã«ã¯æèªæãå京ãå é ãçåžã ã£ãåŽçŠåžã¯èªæ®ºããæã¯æ»
亡ããã
===ãã®åŸ===
1644幎ã«[[æž
]]ã®é æ²»åžãæèªæè»ãç Žããå京ãå é ã'''æž
ãäžåœãæ¯é
ã'''
==æå==
===ç·šçºäºæ¥===
ç·šçºäºæ¥ã¯äž»ã«æ°žæ¥œåžæã«è¡ããããšãã«æåãªã®ã¯åæžå€§å
šãäºçµå€§å
šã氞楜倧å
šãæ§ç倧å
šãªã©ã§ããã
===æåŠ===
===èžè¡===
====é¶ç£åš====
[[å®]]代ã®é¶ç£åšã¯ç¡å°ã®ãã®ãå€ãã£ãããæã»æž
代ã«å
¥ããšèµ€çµµãæä»ãªã©ã®è¯ãããªãã®ãå€ããªã£ãã
ç¹ã«æåãªç£å°ã§ããæ¯åŸ³é®ã§ã¯é¶ç£åšã®å®ææãè¿ããã
{{wikipedia}}
[[ã«ããŽãª:äžåœã®æŽå²|ã¿ã]] | null | 2023-02-09T11:12:05Z | [
"ãã³ãã¬ãŒã:Wikipedia"
] | https://ja.wikibooks.org/wiki/%E6%98%8E |
36,911 | ãµã³=ãžã§ã«ãã³æ¡çŽ | ãµã³=ãžã§ã«ãã³æ¡çŽã¯ã1919幎9æã«çµã°ããã第äžæ¬¡äžç倧æŠã®å¯ŸãªãŒã¹ããªã¢çšã®è¬åæ¡çŽã§ããã
æ¡çŽã®è©³ããå
容ã¯ãw:ãµã³=ãžã§ã«ãã³æ¡çŽ]ãåç
§ããŠã»ããã
æ¡çŽã®å
容ã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "ãµã³=ãžã§ã«ãã³æ¡çŽã¯ã1919幎9æã«çµã°ããã第äžæ¬¡äžç倧æŠã®å¯ŸãªãŒã¹ããªã¢çšã®è¬åæ¡çŽã§ããã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "æ¡çŽã®è©³ããå
容ã¯ãw:ãµã³=ãžã§ã«ãã³æ¡çŽ]ãåç
§ããŠã»ããã",
"title": ""
},
{
"paragraph_id": 2,
"tag": "p",
"text": "æ¡çŽã®å
容ã",
"title": ""
}
] | ãµã³ïŒãžã§ã«ãã³æ¡çŽã¯ã1919幎9æã«çµã°ããã第äžæ¬¡äžç倧æŠã®å¯ŸãªãŒã¹ããªã¢çšã®è¬åæ¡çŽã§ããã æ¡çŽã®è©³ããå
容ã¯ãw:ãµã³ïŒãžã§ã«ãã³æ¡çŽ]ãåç
§ããŠã»ããã æ¡çŽã®å
容ã ãªãŒã¹ããªã¢=ãã³ã¬ãªãŒåžåœã®è§£äœ
é å
ã®ããŒã©ã³ãã»ãã§ã³ã»ã»ã«ãïŒã¯ãã¢ãŒãïŒã¹ããŽã§ãŒã³çåœïŒãŠãŒãŽã¹ã©ãŽã£ã¢ïŒã»ãã³ã¬ãªãŒã®ç¬ç«
ãæªååã®ã€ã¿ãªã¢ãã®ã€ã¿ãªã¢ãžã®å²è²
ãã€ããšãªãŒã¹ããªã¢ã®å䜵çŠæ¢ | '''ãµã³ïŒãžã§ã«ãã³æ¡çŽ'''ã¯ã1919幎9æã«çµã°ããã第äžæ¬¡äžç倧æŠã®å¯ŸãªãŒã¹ããªã¢çšã®è¬åæ¡çŽã§ããã
æ¡çŽã®è©³ããå
容ã¯ã[[w:ãµã³ïŒãžã§ã«ãã³æ¡çŽ]]]ãåç
§ããŠã»ããã
æ¡çŽã®å
容ã
*[[ãªãŒã¹ããªã¢=ãã³ã¬ãªãŒåžåœ]]ã®è§£äœ
*é å
ã®ããŒã©ã³ãã»ãã§ã³ã»ã»ã«ãïŒã¯ãã¢ãŒãïŒã¹ããŽã§ãŒã³çåœïŒãŠãŒãŽã¹ã©ãŽã£ã¢ïŒã»ãã³ã¬ãªãŒã®ç¬ç«
*ãæªååã®ã€ã¿ãªã¢ãã®ã€ã¿ãªã¢ãžã®å²è²
*ãã€ããšãªãŒã¹ããªã¢ã®å䜵çŠæ¢
{{wikipedia}}
[[ã«ããŽãª:æŠäº]]
[[ã«ããŽãª:第äžæ¬¡äžç倧æŠ]] | null | 2023-02-09T23:36:34Z | [
"ãã³ãã¬ãŒã:Wikipedia"
] | https://ja.wikibooks.org/wiki/%E3%82%B5%E3%83%B3%3D%E3%82%B8%E3%82%A7%E3%83%AB%E3%83%9E%E3%83%B3%E6%9D%A1%E7%B4%84 |
36,912 | ãã€ã€æ¡çŽ | ãã€ã€æ¡çŽãšã¯1919幎11æã«çµã°ããã第äžæ¬¡äžç倧æŠã®å¯Ÿãã«ã¬ãªã¢çšã®æ¡çŽã§ããã
詳ããå
容ã¯ãw:ãã€ã€æ¡çŽãåç
§ãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "ãã€ã€æ¡çŽãšã¯1919幎11æã«çµã°ããã第äžæ¬¡äžç倧æŠã®å¯Ÿãã«ã¬ãªã¢çšã®æ¡çŽã§ããã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "詳ããå
容ã¯ãw:ãã€ã€æ¡çŽãåç
§ãã",
"title": ""
}
] | ãã€ã€æ¡çŽãšã¯1919幎11æã«çµã°ããã第äžæ¬¡äžç倧æŠã®å¯Ÿãã«ã¬ãªã¢çšã®æ¡çŽã§ããã 詳ããå
容ã¯ãw:ãã€ã€æ¡çŽãåç
§ãã | '''ãã€ã€æ¡çŽ'''ãšã¯1919幎11æã«çµã°ããã第äžæ¬¡äžç倧æŠã®å¯Ÿãã«ã¬ãªã¢çšã®æ¡çŽã§ããã
詳ããå
容ã¯ã[[w:ãã€ã€æ¡çŽ]]ãåç
§ãã
===æ¡çŽã®å
容===
*ãã©ãã¢ãã®ãªã·ã¢ã«å²è²
*é åã®äžéšãã»ã«ãïŒã¯ãã¢ãŒãïŒã¹ããŽã§ãŒã³çåœã«å²è²
*倧æŠäžã«ç²åŸããé åã§ãããããã«ãžã£ãã«ãŒããã¢ãžå²è²
{{wikipedia}}
[[ã«ããŽãª:æŠäº]]
[[ã«ããŽãª:第äžæ¬¡äžç倧æŠ]] | null | 2023-02-09T23:45:05Z | [
"ãã³ãã¬ãŒã:Wikipedia"
] | https://ja.wikibooks.org/wiki/%E3%83%8C%E3%82%A4%E3%82%A4%E6%9D%A1%E7%B4%84 |
36,914 | é«çåŠæ ¡æŽå²ç·å/å·æŠã®çµçµ | 1980幎代ã瀟äŒäž»çŸ©é£å¶ã¯è¡ãè©°ãŸããèŠããŸããããã®åé¡ã解決ããããã®æ¹é©ãé²ããããã¢ã¡ãªã«ãšãœé£ã¯æ¥éã«ä»²çŽãããŠãã€ãã«å·æŠã¯çµãã£ããšèšãããããã«ãªããŸãããå·æŠã®çµçµã¯ããäºãã®é¢ä¿ãã©ã®ããã«å€ããŠãã£ãã®ã§ããããã
瀟äŒäž»çŸ©åã§ã¯ãäžåœããœé£ã®å¹³åå
±åæ¿çã«å察ããŠããŸããã1960幎代以éãäžåœãšãœé£è»ã¯æŠäºç¶æ
ã«ãªããŸãããæ±æ¬§è«žåœã®ãœé£é¢ããé²ã¿ãŸããã1968幎ããã§ã³ã¹ããŽã¡ãã¢ã§å€§èŠæš¡ãªèªç±åã»æ°äž»åéåããã©ãã®æ¥ããèµ·ãããŸããããã®éããœé£ã¯ã¯ã«ã·ã£ã¯æ¡çŽæ©æ§è»ãéã蟌ã¿ãèªç±åã»æ°äž»åéåãé®å§ããŠåœéçãªä¿¡çšã倱ããŸããããã®åŸãã¢ã¡ãªã«ãšãœé£ã®éã«ç·åŒµãèããŸãããããããç¿å¹Žãœé£è»ãã¢ãã¬ãã¹ã¿ã³ã«äŸµæ»ããŸãããã®æãã¢ã¡ãªã«ãå«ã西åŽè«žåœã¯ã1978幎ã«ã¢ãã¬ãã¹ã¿ã³ã«æš¹ç«ãããå·Šç¿Œæ¿æš©ã®æ¯æãå£å®ã«å¯ŸæããŸããããããæ°å·æŠã®å§ãŸãã§ãã
åœæããœé£ã®çµæžã¯æé·ãããç£æ¥æ§é ã®è»¢æãé
ããŠããŸããã1985幎ãããã€ã«ã»ãŽã«ããã§ãæžèšé·ã¯ããã®ç¶æ³ããæãåºãããã«ãæ
å ±å
¬é(ã°ã©ã¹ãã¹ã)ãšæ°äž»åãä¿ãé称ãã¬ã¹ããã€ã«(æ¹é©)æ¿çãå§ããŸãããæ°æèå€äº€ã»ã¢ãã¬ãã¹ã¿ã³ããã®æ€éã»æ žææ¢è«ã®åŠå®ãªã©ã®çµæãã¢ã¡ãªã«ãšãœé£ã®é¢ä¿ã¯äžæ°ã«æ¹åããŸããããããããœé£ã®åãã«å¯ŸæããŠãæ±æ¬§è«žåœãæ°äž»åã«åãå§ããŸãã(æ±æ¬§é©åœ)ãæ±æ¬§é©åœã«ãã£ãŠãå
񇜆
ã®äžå
æ¯é
ãçµããããŸããã1989幎ãæ±æ¬§é©åœäžã«ãå·æŠã®è±¡åŸŽ(ãã«ãªã³ã®å£)ãå£ãããŸããããã«ã¿äŒè«ã§ãã¢ã¡ãªã«ãšãœé£ã®éŠè³ãå·æŠçµçµã宣èšããŸããã1990幎ããã€ãã¯åçµ±äžããŸããã
ãœé£ã§ã¯ããã¬ã¹ããã€ã«ã®ææã§ãæ°æ䞻矩ãé«ãŸããæ¿æš©äº€ä»£ãŸã§å«ã°ããããã«ãªããä¿å®æŽŸãã¯ãŒãã¿ãèµ·ãããŸãããã倱æããŸãããããªã¹ã»ãšãªãã£ã³ãæ¹é©æŽŸã¯ã1991幎12æãç¬ç«åœå®¶å
±åäœ(CIS)ãçºè¶³ãããŸãããç¬ç«åœå®¶å
±åäœ(CIS)ã¯ããã·ã¢ãå«ã11ã®å
±ååœã§æãç«ã£ãŠããŸãããœé£ã¯69幎ç®ã«ãªãã厩å£ãžåãããŸããã
å·æŠæ«æé ãäžçåå°ã§å·æŠæ代ã«äžæããŠããçŽäºãçºçããŸãããã€ã©ã¯ãäžæ±ã®è»äºå€§åœåããã®ãã1980幎ã«å§ãŸã£ãã€ã©ã³ã»ã€ã©ã¯æŠäºã§ãã€ã©ã³ã«åçºããŠãããœé£ã西åŽè«žåœãã€ã©ã¯ã«å³æ¹ããããã§ãã1990幎ãã€ã©ã¯ãã¯ãŠã§ãŒããæ»æããæãã¢ã¡ãªã«ã»ã€ã®ãªã¹ã»ãµãŠãžã¢ã©ãã¢ãªã©ååœã®è»éãã€ã©ã¯ã«æ»æãä»æããŸãã(湟岞æŠäº)ãæ¥æ¬ã¯åœéè»ã«è³éãæäŸããŸããããæµ·å€ãããåŸæããšæ¹å€ãããŸããããã®æŠäºã¯ãå·æŠçµçµåŸã®ã¢ã¡ãªã«äžå¿ã®äžç秩åºãå°è±¡ä»ããçµæãšãªããå·æŠçµçµåŸã®åœé瀟äŒã§åœéè²¢ç®ã®ããæ¹ã«ã€ããŠæ¥æ¬åœå
ã§ãè«è°ãå§ãŸããŸããã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "1980幎代ã瀟äŒäž»çŸ©é£å¶ã¯è¡ãè©°ãŸããèŠããŸããããã®åé¡ã解決ããããã®æ¹é©ãé²ããããã¢ã¡ãªã«ãšãœé£ã¯æ¥éã«ä»²çŽãããŠãã€ãã«å·æŠã¯çµãã£ããšèšãããããã«ãªããŸãããå·æŠã®çµçµã¯ããäºãã®é¢ä¿ãã©ã®ããã«å€ããŠãã£ãã®ã§ããããã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "瀟äŒäž»çŸ©åã§ã¯ãäžåœããœé£ã®å¹³åå
±åæ¿çã«å察ããŠããŸããã1960幎代以éãäžåœãšãœé£è»ã¯æŠäºç¶æ
ã«ãªããŸãããæ±æ¬§è«žåœã®ãœé£é¢ããé²ã¿ãŸããã1968幎ããã§ã³ã¹ããŽã¡ãã¢ã§å€§èŠæš¡ãªèªç±åã»æ°äž»åéåããã©ãã®æ¥ããèµ·ãããŸããããã®éããœé£ã¯ã¯ã«ã·ã£ã¯æ¡çŽæ©æ§è»ãéã蟌ã¿ãèªç±åã»æ°äž»åéåãé®å§ããŠåœéçãªä¿¡çšã倱ããŸããããã®åŸãã¢ã¡ãªã«ãšãœé£ã®éã«ç·åŒµãèããŸãããããããç¿å¹Žãœé£è»ãã¢ãã¬ãã¹ã¿ã³ã«äŸµæ»ããŸãããã®æãã¢ã¡ãªã«ãå«ã西åŽè«žåœã¯ã1978幎ã«ã¢ãã¬ãã¹ã¿ã³ã«æš¹ç«ãããå·Šç¿Œæ¿æš©ã®æ¯æãå£å®ã«å¯ŸæããŸããããããæ°å·æŠã®å§ãŸãã§ãã",
"title": "瀟äŒäž»çŸ©äžçã®å€å®¹"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "åœæããœé£ã®çµæžã¯æé·ãããç£æ¥æ§é ã®è»¢æãé
ããŠããŸããã1985幎ãããã€ã«ã»ãŽã«ããã§ãæžèšé·ã¯ããã®ç¶æ³ããæãåºãããã«ãæ
å ±å
¬é(ã°ã©ã¹ãã¹ã)ãšæ°äž»åãä¿ãé称ãã¬ã¹ããã€ã«(æ¹é©)æ¿çãå§ããŸãããæ°æèå€äº€ã»ã¢ãã¬ãã¹ã¿ã³ããã®æ€éã»æ žææ¢è«ã®åŠå®ãªã©ã®çµæãã¢ã¡ãªã«ãšãœé£ã®é¢ä¿ã¯äžæ°ã«æ¹åããŸããããããããœé£ã®åãã«å¯ŸæããŠãæ±æ¬§è«žåœãæ°äž»åã«åãå§ããŸãã(æ±æ¬§é©åœ)ãæ±æ¬§é©åœã«ãã£ãŠãå
񇜆
ã®äžå
æ¯é
ãçµããããŸããã1989幎ãæ±æ¬§é©åœäžã«ãå·æŠã®è±¡åŸŽ(ãã«ãªã³ã®å£)ãå£ãããŸããããã«ã¿äŒè«ã§ãã¢ã¡ãªã«ãšãœé£ã®éŠè³ãå·æŠçµçµã宣èšããŸããã1990幎ããã€ãã¯åçµ±äžããŸããã",
"title": "å·æŠã®çµçµãšãœé£ã®åŽ©å£"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "ãœé£ã§ã¯ããã¬ã¹ããã€ã«ã®ææã§ãæ°æ䞻矩ãé«ãŸããæ¿æš©äº€ä»£ãŸã§å«ã°ããããã«ãªããä¿å®æŽŸãã¯ãŒãã¿ãèµ·ãããŸãããã倱æããŸãããããªã¹ã»ãšãªãã£ã³ãæ¹é©æŽŸã¯ã1991幎12æãç¬ç«åœå®¶å
±åäœ(CIS)ãçºè¶³ãããŸãããç¬ç«åœå®¶å
±åäœ(CIS)ã¯ããã·ã¢ãå«ã11ã®å
±ååœã§æãç«ã£ãŠããŸãããœé£ã¯69幎ç®ã«ãªãã厩å£ãžåãããŸããã",
"title": "å·æŠã®çµçµãšãœé£ã®åŽ©å£"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "å·æŠæ«æé ãäžçåå°ã§å·æŠæ代ã«äžæããŠããçŽäºãçºçããŸãããã€ã©ã¯ãäžæ±ã®è»äºå€§åœåããã®ãã1980幎ã«å§ãŸã£ãã€ã©ã³ã»ã€ã©ã¯æŠäºã§ãã€ã©ã³ã«åçºããŠãããœé£ã西åŽè«žåœãã€ã©ã¯ã«å³æ¹ããããã§ãã1990幎ãã€ã©ã¯ãã¯ãŠã§ãŒããæ»æããæãã¢ã¡ãªã«ã»ã€ã®ãªã¹ã»ãµãŠãžã¢ã©ãã¢ãªã©ååœã®è»éãã€ã©ã¯ã«æ»æãä»æããŸãã(湟岞æŠäº)ãæ¥æ¬ã¯åœéè»ã«è³éãæäŸããŸããããæµ·å€ãããåŸæããšæ¹å€ãããŸããããã®æŠäºã¯ãå·æŠçµçµåŸã®ã¢ã¡ãªã«äžå¿ã®äžç秩åºãå°è±¡ä»ããçµæãšãªããå·æŠçµçµåŸã®åœé瀟äŒã§åœéè²¢ç®ã®ããæ¹ã«ã€ããŠæ¥æ¬åœå
ã§ãè«è°ãå§ãŸããŸããã",
"title": "å·æŠåŸã®å°åçŽäºãšæ¥æ¬"
}
] | ãïŒïŒïŒïŒå¹Žä»£ã瀟äŒäž»çŸ©é£å¶ã¯è¡ãè©°ãŸããèŠããŸããããã®åé¡ã解決ããããã®æ¹é©ãé²ããããã¢ã¡ãªã«ãšãœé£ã¯æ¥éã«ä»²çŽãããŠãã€ãã«å·æŠã¯çµãã£ããšèšãããããã«ãªããŸãããå·æŠã®çµçµã¯ããäºãã®é¢ä¿ãã©ã®ããã«å€ããŠãã£ãã®ã§ããããã | [[å°åŠæ ¡ã»äžåŠæ ¡ã»é«çåŠæ ¡ã®åŠç¿]]>[[é«çåŠæ ¡ã®åŠç¿]]>[[é«çåŠæ ¡å°çæŽå²]]>[[é«çåŠæ ¡æŽå²ç·å]]>å·æŠã®çµçµ
ãïŒïŒïŒïŒå¹Žä»£ã瀟äŒäž»çŸ©é£å¶ã¯è¡ãè©°ãŸããèŠããŸããããã®åé¡ã解決ããããã®æ¹é©ãé²ããããã¢ã¡ãªã«ãšãœé£ã¯æ¥éã«ä»²çŽãããŠãã€ãã«å·æŠã¯çµãã£ããšèšãããããã«ãªããŸãããå·æŠã®çµçµã¯ããäºãã®é¢ä¿ãã©ã®ããã«å€ããŠãã£ãã®ã§ããããã
== 瀟äŒäž»çŸ©äžçã®å€å®¹ ==
ã瀟äŒäž»çŸ©åã§ã¯ãäžåœããœé£ã®å¹³åå
±åæ¿çã«å察ããŠããŸãããïŒïŒïŒïŒå¹Žä»£ä»¥éãäžåœãšãœé£è»ã¯æŠäºç¶æ
ã«ãªããŸãããæ±æ¬§è«žåœã®ãœé£é¢ããé²ã¿ãŸãããïŒïŒïŒïŒå¹Žããã§ã³ã¹ããŽã¡ãã¢ã§å€§èŠæš¡ãªèªç±åã»æ°äž»åéåã'''[[w:ãã©ãã®æ¥|ãã©ãã®æ¥]]'''ããèµ·ãããŸããããã®éããœé£ã¯ã¯ã«ã·ã£ã¯æ¡çŽæ©æ§è»ãéã蟌ã¿ãèªç±åã»æ°äž»åéåãé®å§ããŠåœéçãªä¿¡çšã倱ããŸããããã®åŸãã¢ã¡ãªã«ãšãœé£ã®éã«ç·åŒµãèããŸãããããããç¿å¹Žãœé£è»ãã¢ãã¬ãã¹ã¿ã³ã«äŸµæ»ããŸãããã®æãã¢ã¡ãªã«ãå«ã西åŽè«žåœã¯ãïŒïŒïŒïŒå¹Žã«ã¢ãã¬ãã¹ã¿ã³ã«æš¹ç«ãããå·Šç¿Œæ¿æš©ã®æ¯æãå£å®ã«å¯ŸæããŸããããããæ°å·æŠã®å§ãŸãã§ãã
== å·æŠã®çµçµãšãœé£ã®åŽ©å£ ==
ãåœæããœé£ã®çµæžã¯æé·ãããç£æ¥æ§é ã®è»¢æãé
ããŠããŸãããïŒïŒïŒïŒå¹Žã'''[[w:ããã€ã«ã»ãŽã«ããã§ã|ããã€ã«ã»ãŽã«ããã§ã]]'''æžèšé·ã¯ããã®ç¶æ³ããæãåºãããã«ãæ
å ±å
¬éïŒã°ã©ã¹ãã¹ãïŒãšæ°äž»åãä¿ãé称'''ãã¬ã¹ããã€ã«'''ïŒæ¹é©ïŒæ¿çãå§ããŸãããæ°æèå€äº€ã»ã¢ãã¬ãã¹ã¿ã³ããã®æ€éã»æ žææ¢è«ã®åŠå®ãªã©ã®çµæãã¢ã¡ãªã«ãšãœé£ã®é¢ä¿ã¯äžæ°ã«æ¹åããŸããããããããœé£ã®åãã«å¯ŸæããŠãæ±æ¬§è«žåœãæ°äž»åã«åãå§ããŸããïŒ'''æ±æ¬§é©åœ'''ïŒãæ±æ¬§é©åœã«ãã£ãŠãå
񇜆
ã®äžå
æ¯é
ãçµããããŸãããïŒïŒïŒïŒå¹Žãæ±æ¬§é©åœäžã«ãå·æŠã®è±¡åŸŽïŒãã«ãªã³ã®å£ïŒãå£ãããŸããããã«ã¿äŒè«ã§ãã¢ã¡ãªã«ãšãœé£ã®éŠè³ãå·æŠçµçµã宣èšããŸãããïŒïŒïŒïŒå¹Žã'''ãã€ãã¯åçµ±äž'''ããŸããã
ããœé£ã§ã¯ããã¬ã¹ããã€ã«ã®ææã§ãæ°æ䞻矩ãé«ãŸããæ¿æš©äº€ä»£ãŸã§å«ã°ããããã«ãªããä¿å®æŽŸãã¯ãŒãã¿ãèµ·ãããŸãããã倱æããŸããã'''[[w:ããªã¹ã»ãšãªãã£ã³|ããªã¹ã»ãšãªãã£ã³]]'''ãæ¹é©æŽŸã¯ãïŒïŒïŒïŒå¹ŽïŒïŒæãç¬ç«åœå®¶å
±åäœïŒïŒ£ïŒ©ïŒ³ïŒãçºè¶³ãããŸãããç¬ç«åœå®¶å
±åäœïŒïŒ£ïŒ©ïŒ³ïŒã¯ããã·ã¢ãå«ãïŒïŒã®å
±ååœã§æãç«ã£ãŠããŸãããœé£ã¯ïŒïŒå¹Žç®ã«ãªãã厩å£ãžåãããŸããã
== å·æŠåŸã®å°åçŽäºãšæ¥æ¬ ==
ãå·æŠæ«æé ãäžçåå°ã§å·æŠæ代ã«äžæããŠããçŽäºãçºçããŸãããã€ã©ã¯ãäžæ±ã®è»äºå€§åœåããã®ããïŒïŒïŒïŒå¹Žã«å§ãŸã£ãã€ã©ã³ã»ã€ã©ã¯æŠäºã§ãã€ã©ã³ã«åçºããŠãããœé£ã西åŽè«žåœãã€ã©ã¯ã«å³æ¹ããããã§ããïŒïŒïŒïŒå¹Žãã€ã©ã¯ãã¯ãŠã§ãŒããæ»æããæãã¢ã¡ãªã«ã»ã€ã®ãªã¹ã»ãµãŠãžã¢ã©ãã¢ãªã©ååœã®è»éãã€ã©ã¯ã«æ»æãä»æããŸããïŒ'''湟岞æŠäº'''ïŒãæ¥æ¬ã¯åœéè»ã«è³éãæäŸããŸããããæµ·å€ãããåŸæããšæ¹å€ãããŸããããã®æŠäºã¯ãå·æŠçµçµåŸã®ã¢ã¡ãªã«äžå¿ã®äžç秩åºãå°è±¡ä»ããçµæãšãªããå·æŠçµçµåŸã®åœé瀟äŒã§åœéè²¢ç®ã®ããæ¹ã«ã€ããŠæ¥æ¬åœå
ã§ãè«è°ãå§ãŸããŸããã
[[ã«ããŽãª:é«çåŠæ ¡æŽå²ç·å|ããããã®ããããã€]]
[[ã«ããŽãª:å·æŠ]]
[[ã«ããŽãª:ãã·ã¢å²]] | 2023-02-10T10:35:10Z | 2023-09-28T08:09:56Z | [] | https://ja.wikibooks.org/wiki/%E9%AB%98%E7%AD%89%E5%AD%A6%E6%A0%A1%E6%AD%B4%E5%8F%B2%E7%B7%8F%E5%90%88/%E5%86%B7%E6%88%A6%E3%81%AE%E7%B5%82%E7%B5%90 |
36,927 | JavaScript/äºçŽèª/let | letããŒã¯ãŒãã¯ãå€æ°ãå®çŸ©ããããŒã¯ãŒãã§ããå®çŸ©ãããšãã«ãå€ãå
¥ããªããŠãæ§ããŸãããå
¥ããªãã£ãå Žåã¯ããundefinedããå
¥ããããŸãã
å®è¡çµæ
letã®é
åã®äœãæ¹ã¯ãconstã®ãšããšäžç·ã§ãã
å®è¡çµæ
letã®é
åã¯å€ã®æžãæãã代å
¥ãå¯èœã§ãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "letããŒã¯ãŒãã¯ãå€æ°ãå®çŸ©ããããŒã¯ãŒãã§ããå®çŸ©ãããšãã«ãå€ãå
¥ããªããŠãæ§ããŸãããå
¥ããªãã£ãå Žåã¯ããundefinedããå
¥ããããŸãã",
"title": "å€æ°ãå®çŸ©ãã let"
},
{
"paragraph_id": 1,
"tag": "p",
"text": "å®è¡çµæ",
"title": "å€æ°ãå®çŸ©ãã let"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "letã®é
åã®äœãæ¹ã¯ãconstã®ãšããšäžç·ã§ãã",
"title": "let ã®é
å"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "å®è¡çµæ",
"title": "let ã®é
å"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "letã®é
åã¯å€ã®æžãæãã代å
¥ãå¯èœã§ãã",
"title": "let ã®é
å"
}
] | null | == å€æ°ãå®çŸ©ãã let ==
<code>let</code>ããŒã¯ãŒãã¯ãå€æ°ãå®çŸ©ããããŒã¯ãŒãã§ããå®çŸ©ãããšãã«ãå€ãå
¥ããªããŠãæ§ããŸãããå
¥ããªãã£ãå Žåã¯ãã<code>undefined</code>ããå
¥ããããŸãã<syntaxhighlight lang="javascript">
let price = 1500;
console.log('price = ' + price);
</syntaxhighlight>å®è¡çµæ
price = 1500
== let ã®é
å ==
<code>let</code>ã®é
åã®äœãæ¹ã¯ã<code>const</code>ã®ãšããšäžç·ã§ãã<syntaxhighlight lang="javascript">
let array = ['index0', 'index1', 'index2', 'index3'];
console.log(array);
</syntaxhighlight>å®è¡çµæ
''(4) ['index0', 'index1', 'index2', 'index3']''
''0: "index0"''
''1: "index1"''
''2: "index2"''
''3: "index3"''
length: 4
ïž
letã®é
åã¯å€ã®æžãæãã代å
¥ãå¯èœã§ãã
[[ã«ããŽãª:JavaScript]] | 2023-02-14T02:42:21Z | 2023-02-14T02:42:21Z | [] | https://ja.wikibooks.org/wiki/JavaScript/%E4%BA%88%E7%B4%84%E8%AA%9E/let |
36,969 | 家äºäºä»¶æç¶æ³ç¬¬39æ¡ | æ³åŠ>æ°äºæ³>ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³
(審å€äºé
) | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ°äºæ³>ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "(審å€äºé
)",
"title": "æ¡æ"
}
] | æ³åŠïŒæ°äºæ³ïŒã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³ | [[æ³åŠ]]ïŒ[[æ°äºæ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³]]
==æ¡æ==
ïŒå¯©å€äºé
ïŒ
;第39æ¡
:家åºè£å€æã¯ããã®ç·šã«å®ãããšããã«ããã[[家äºäºä»¶æç¶æ³å¥è¡šç¬¬1|å¥è¡šç¬¬1]]åã³[[家äºäºä»¶æç¶æ³å¥è¡šç¬¬2|å¥è¡šç¬¬2]]ã«æ²ããäºé
䞊ã³ã«åç·šã«å®ããäºé
ã«ã€ããŠã審å€ãããã
==解説==
:[[家äºå¯©å€æ³ç¬¬9æ¡]]ãç¶æ¿ã
==åç
§æ¡æ==
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³|家äºäºä»¶æç¶æ³]]
|[[ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³#2|第2ç·š 家äºå¯©å€ã«é¢ããæç¶]]<br>
[[ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³#2-1|第1ç« ç·å]]<br>
[[ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³#2-1-1|第1ç¯ å®¶äºå¯©å€ã®æç¶]]<br>
[[ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³#2-1-1-1|第1欟 éå]]
|[[家äºäºä»¶æç¶æ³ç¬¬38æ¡]]<br>é»åæ
å ±åŠççµç¹ã«ããç³ç«ãŠç
|[[家äºäºä»¶æç¶æ³ç¬¬40æ¡]]<br>(åäžå¡)
}}
{{stub|law}}
[[category:家äºäºä»¶æç¶æ³|039]] | 2023-02-18T14:53:44Z | 2023-02-18T14:53:44Z | [
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E5%AE%B6%E4%BA%8B%E4%BA%8B%E4%BB%B6%E6%89%8B%E7%B6%9A%E6%B3%95%E7%AC%AC39%E6%9D%A1 |
36,970 | 家äºäºä»¶æç¶æ³ç¬¬201æ¡ | æ³åŠ>æ°äºæ³>ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³ | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ°äºæ³>ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³",
"title": ""
}
] | æ³åŠïŒæ°äºæ³ïŒã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³ | [[æ³åŠ]]ïŒ[[æ°äºæ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³]]
==æ¡æ==
;第201æ¡
#çžç¶ã®æ¿èªåã³æŸæ£ã«é¢ãã審å€äºä»¶ïŒ[[家äºäºä»¶æç¶æ³å¥è¡šç¬¬1|å¥è¡šç¬¬1]]ã®89ã®é
ãã95ã®é
ãŸã§ã®äºé
ã«ã€ããŠã®å¯©å€äºä»¶ããããïŒã¯ãçžç¶ãéå§ããå°ã管èœãã家åºè£å€æã®ç®¡èœã«å±ããã
#åé
ã®èŠå®ã«ããããããéå®æ¿èªã®å Žåã«ãããéå®äººã®éžä»»ã®å¯©å€äºä»¶ïŒ[[家äºäºä»¶æç¶æ³å¥è¡šç¬¬1|å¥è¡šç¬¬1]]ã®93ã®é
ã®äºé
ã«ã€ããŠã®å¯©å€äºä»¶ããããïŒã¯ãéå®æ¿èªã®ç³è¿°ãåçãã家åºè£å€æïŒæåè£å€æãåçããå Žåã«ãã£ãŠã¯ããã®ç¬¬äžå¯©è£å€æã§ãã家åºè£å€æïŒã®ç®¡èœã«å±ããã
#家åºè£å€æïŒæåè£å€æãéå®æ¿èªã®ç³è¿°ãåçããå Žåã«ãã£ãŠã¯ããã®è£å€æïŒã¯ãçžç¶äººãæ°äººããå Žåã«ãããŠãéå®æ¿èªã®ç³è¿°ãåçãããšãã¯ãè·æš©ã§ã[[æ°æ³ç¬¬936æ¡]]第1é
ã®èŠå®ã«ããçžç¶è²¡ç£ã®ç®¡ç人ãéžä»»ããªããã°ãªããªãã
#[[家äºäºä»¶æç¶æ³ç¬¬118æ¡|第118æ¡]]ã®èŠå®ã¯ãéå®æ¿èªåã¯çžç¶ã®æŸæ£ã®åæ¶ãã®ç³è¿°ã®åçã®å¯©å€äºä»¶ïŒ[[家äºäºä»¶æç¶æ³å¥è¡šç¬¬1|å¥è¡šç¬¬1]]ã®91ã®é
ã®äºé
ã«ã€ããŠã®å¯©å€äºä»¶ããããïŒã«ãããéå®æ¿èªåã¯çžç¶ã®æŸæ£ã®åæ¶ããããããšãã§ããè
ã«ã€ããŠæºçšããã
#éå®æ¿èªåã³ãã®åæ¶ã䞊ã³ã«çžç¶ã®æŸæ£åã³ãã®åæ¶ãã®ç³è¿°ã¯ã次ã«æ²ããäºé
ãèšèŒããç³è¿°æžã家åºè£å€æã«æåºããŠããªããã°ãªããªãã
##åœäºè
åã³æ³å®ä»£ç人
##éå®æ¿èªè¥ããã¯ãã®åæ¶ãåã¯çžç¶ã®æŸæ£è¥ããã¯ãã®åæ¶ããããæš
#[[家äºäºä»¶æç¶æ³ç¬¬49æ¡|第49æ¡]]第3é
ãã第6é
ãŸã§åã³[[家äºäºä»¶æç¶æ³ç¬¬50æ¡|第50æ¡]]ã®èŠå®ã¯ãåé
ã®ç³è¿°ã«ã€ããŠæºçšããããã®å Žåã«ãããŠã[[家äºäºä»¶æç¶æ³ç¬¬49æ¡|第49æ¡]]第4é
äžã第2é
ããšããã®ã¯ãã第201æ¡ç¬¬5é
ããšèªã¿æ¿ãããã®ãšããã
#家åºè£å€æã¯ã第5é
ã®ç³è¿°ã®åçã®å¯©å€ããããšãã¯ãç³è¿°æžã«ãã®æšãèšèŒããªããã°ãªããªãããã®å Žåã«ãããŠãåœè©²å¯©å€ã¯ãç³è¿°æžã«ãã®æšãèšèŒããæã«ããã®å¹åãçããã
#åé
ã®å¯©å€ã«ã€ããŠã¯ã[[家äºäºä»¶æç¶æ³ç¬¬76æ¡|第76æ¡]]ã®èŠå®ã¯ãé©çšããªãã
#次ã®åå·ã«æ²ãã審å€ã«å¯ŸããŠã¯ãåœè©²åå·ã«å®ããè
ã¯ãå³ææåãããããšãã§ããã
##çžç¶ã®æ¿èªåã¯æŸæ£ããã¹ãæéã®äŒžé·ã®ç³ç«ãŠãåŽäžãã審å€ãç³ç«äºº
##éå®æ¿èªåã¯çžç¶ã®æŸæ£ã®åæ¶ãã®ç³è¿°ãåŽäžãã審å€ãéå®æ¿èªåã¯çžç¶ã®æŸæ£ã®åæ¶ããããããšãã§ããè
##éå®æ¿èªåã¯çžç¶ã®æŸæ£ã®ç³è¿°ãåŽäžãã審å€ãç³è¿°äºº
#[[家äºäºä»¶æç¶æ³ç¬¬125æ¡|第125æ¡]]ã®èŠå®ã¯ãçžç¶è²¡ç£ã®ä¿ååã¯ç®¡çã«é¢ããåŠåã®å¯©å€äºä»¶ã«ã€ããŠæºçšããããã®å Žåã«ãããŠãåæ¡ç¬¬3é
äžãæ幎被åŸèŠäººã®è²¡ç£ããšããã®ã¯ããçžç¶è²¡ç£ããšèªã¿æ¿ãããã®ãšããã
==解説==
==åç
§æ¡æ==
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³|家äºäºä»¶æç¶æ³]]
|[[ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³#2|第2ç·š 家äºå¯©å€ã«é¢ããæç¶]]<br>
[[ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³#2-2|第2ç« å®¶äºå¯©å€äºä»¶]]<br>
[[ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³#2-2-14|第1ç¯ çžç¶ã®æ¿èªåã³æŸæ£ã«é¢ãã審å€äºä»¶]]
|[[家äºäºä»¶æç¶æ³ç¬¬200æ¡]]<br>ïŒéºç£ã®åå²ã®å¯©å€äºä»¶ãæ¬æ¡ãšããä¿å
šåŠåïŒ
|[[家äºäºä»¶æç¶æ³ç¬¬202æ¡]]<br>財ç£åé¢ã«é¢ãã審å€äºä»¶
}}
{{stub|law}}
[[category:家äºäºä»¶æç¶æ³|201]] | 2023-02-18T15:26:46Z | 2023-02-18T15:26:46Z | [
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E5%AE%B6%E4%BA%8B%E4%BA%8B%E4%BB%B6%E6%89%8B%E7%B6%9A%E6%B3%95%E7%AC%AC201%E6%9D%A1 |
36,979 | é«çåŠæ ¡æŽå²ç·å/å·æŠäžã®æ±ã¢ãžã¢ | ã¢ã¡ãªã«ãšãœé£ã®æŠäºã¯ã第äºæ¬¡äžç倧æŠåŸã®æ±ã¢ãžã¢ã®æ
å¢ã倧ããå€ããŸãããäžè¯äººæ°å
±ååœãšå°æ¹Ÿã«äžè¯æ°åœæ¿åºãæé®®å島ã«å€§éæ°åœãšæé®®æ°äž»äž»çŸ©äººæ°å
±ååœã建åœãããŸããã第äºæ¬¡äžç倧æŠåŸãæ±ã¢ãžã¢ã®ç§©åºã¯ã©ã®ããã«å€åããã®ã§ããããã
1945幎ã«æ¥æ¬ãææŠãããšãåœæ°å
ã®èä»ç³ãšå
񇜆
ã®æ¯æ²¢æ±ã¯åååå®ãçµã³ãŸããããã®æãæ°ããåœå®¶ãã€ããããã«æ¿æ²»ååäŒè°ã®éå¬ã«åæããŸããã1946幎ã«æ¬æ Œçãªåœå
±å
æŠãå§ãŸããšã3幎åŸã«äžè¯äººæ°å
±ååœãèªçããŸãããäžåœå
񇜆
ã®æ¯æ²¢æ±ãäžå€®äººæ°æ¿åºäž»åžãåšæ©æ¥ãç·çã«ãªããŸããããã®çµæã瀟äŒäž»çŸ©é£å¶ã¯ããã«åãã€ããŸãããäžãœå奜åççžäºæŽå©æ¡çŽã«ãã£ãŠãäžè¯äººæ°å
±ååœãšãœããšãé£éŠã®éã«ææºé¢ä¿ãçãŸããŸããããŸããäžè¯äººæ°å
±ååœã®å·¥æ¥åãé²ããããã人æ亀æµã掻çºåããŸãããäžæ¹ãèä»ç³ã®åœæ°å
æ¿åºã¯å°æ¹Ÿã«äžè¯æ°åœã建åœããŠãã¢ã¡ãªã«ã®æ¯æŽãåããªãã倧éžã«åæãããããäžåœãåæãããŸããã
æ¯æ²¢æ±äž»å°ã®äžè¯äººæ°å
±ååœã¯ã倧èºé²éåã§é£ç³§ãééŒã®å¢ç£ãå³ããŸãããã倱æããŸããã1960幎代ã«ãªããšããœé£ãšåé¡ãèµ·ãããåœå¢åé¡ã§ã€ã³ããšçžãåããŸããããã®ããã1970幎代ã«ãªããšã¢ã¡ãªã«ã«æ¥è¿ããããã«ãªããŸããã
æé®®å島ã¯æ¥æ¬ã®æ€æ°å°æ¯é
ãã解æŸãããŠããåç·¯38床ç·ã«æ²¿ã£ãŠãåã¯ãœé£è»ãåã¯ã¢ã¡ãªã«è»ã«åå²å é ãããŸãããååã®æŠäºã¯æ¿ãããªããæé®®å島ã¯å·æŠã®æåç·ãšãªããŸããã1948幎ãåéšã«å€§éæ°åœ(ææ¿æ©å€§çµ±é )ãã¢ã¡ãªã«ã®æ¯æŽãåããŠå»ºåœããŸãããäžæ¹ãåéšã«æé®®æ°äž»äž»çŸ©äººæ°å
±ååœ(éæ¥æéŠçž)ããœããšãé£éŠã®æ¯æŽãåããŠå»ºåœããŸãããããããŠãæé®®å島ã¯å®å
šã«åæãããŸããã1950幎ã«åæé®®ãéåœã«äŸµæ»ããŠæé®®æŠäºãå§ãŸããšãæé®®å島ã®ã»ãŒå
šåãæé®®æ°äž»äž»çŸ©äººæ°å
±ååœã®æ¯é
äžã«çœ®ãããŸãããããããã¢ã¡ãªã«ã¯è»éãéã蟌ã¿ãã¢ã¡ãªã«è»ãäžå¿ãšããåœé£è»ãç«ã¡äžããŸãããäžæ¹ãäžåœã矩åè»ãéããŸããããã®çµæãæ¿éåºã§äŒæŠåå®ãçµã°ããæé®®æŠäºã¯çµãããŸãããããããåæé®®ãšéåœéã®ç·åŒãã¯ãã®ãŸãŸã§ãããæé®®æŠäºã§ã¯ãæ°éã®æ¥æ¬äººã茞éè»åã«ååããããã«ãªããç ç²ã«ãªããŸããã
倧éæ°åœã¯ãäŒæŠåå®ä»¥éã®1960幎代ã«è»äººæŽæ£çãã¯ãŒãã¿ã§æ¿æš©ãæ¡ããŸãããæŽæ£çã¯å·¥æ¥åãé²ããŸããã倧éæ°åœãšäžè¯æ°åœ(å°æ¹Ÿ)ã¯ãã¢ã¡ãªã«ã®æ¯æŽãåããªããè³æ¬äž»çŸ©çãªçµæžæé·ãéãã1980幎代ã«ã¯æ°äž»åãé²ã¿ãŸãããäžæ¹ãæé®®æ°äž»äž»çŸ©äººæ°å
±ååœã§ã¯ãéäžæã«ããè»éšåªå
ã®ç¬è£äœå¶ãç¶ããŸãã
æ¥æ¬ã¯ææŠãããšãå°æ¹Ÿçµ±æ²»ãæŸæ£ããŸããããããŠåœæ°å
ãæ¿æš©ããšã£ãæãæŠåããæ®ãããŠãã人éã«ãåœæ°å
ã®æãéãã«ãªãããã«åŒ·èŠããŸãããæ¬ç人ã¯ç
èã®å¯å£²ãåãç· ãŸã£ããæã£ãã®ã§ãäºã»äºå
«äºä»¶ã«çºå±ããŸãããæ©é¢éã§æ¬¡ã
ãšäººã殺ãããæ¬ç人ãšãªãŒãã¯èŠå¯ã«æ€æãããŠãåŠåãããŸããã1947幎ã®äºã»äºå
«äºä»¶ä»¥éãæå³ä»€ãæ·ãããç¬è£è
ã統治ããããã«ãªããŸãããæå³ä»€ã¯ã30幎åŸã®1987幎ã«å»æ¢ãããŸããã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "ã¢ã¡ãªã«ãšãœé£ã®æŠäºã¯ã第äºæ¬¡äžç倧æŠåŸã®æ±ã¢ãžã¢ã®æ
å¢ã倧ããå€ããŸãããäžè¯äººæ°å
±ååœãšå°æ¹Ÿã«äžè¯æ°åœæ¿åºãæé®®å島ã«å€§éæ°åœãšæé®®æ°äž»äž»çŸ©äººæ°å
±ååœã建åœãããŸããã第äºæ¬¡äžç倧æŠåŸãæ±ã¢ãžã¢ã®ç§©åºã¯ã©ã®ããã«å€åããã®ã§ããããã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "1945幎ã«æ¥æ¬ãææŠãããšãåœæ°å
ã®èä»ç³ãšå
񇜆
ã®æ¯æ²¢æ±ã¯åååå®ãçµã³ãŸããããã®æãæ°ããåœå®¶ãã€ããããã«æ¿æ²»ååäŒè°ã®éå¬ã«åæããŸããã1946幎ã«æ¬æ Œçãªåœå
±å
æŠãå§ãŸããšã3幎åŸã«äžè¯äººæ°å
±ååœãèªçããŸãããäžåœå
񇜆
ã®æ¯æ²¢æ±ãäžå€®äººæ°æ¿åºäž»åžãåšæ©æ¥ãç·çã«ãªããŸããããã®çµæã瀟äŒäž»çŸ©é£å¶ã¯ããã«åãã€ããŸãããäžãœå奜åççžäºæŽå©æ¡çŽã«ãã£ãŠãäžè¯äººæ°å
±ååœãšãœããšãé£éŠã®éã«ææºé¢ä¿ãçãŸããŸããããŸããäžè¯äººæ°å
±ååœã®å·¥æ¥åãé²ããããã人æ亀æµã掻çºåããŸãããäžæ¹ãèä»ç³ã®åœæ°å
æ¿åºã¯å°æ¹Ÿã«äžè¯æ°åœã建åœããŠãã¢ã¡ãªã«ã®æ¯æŽãåããªãã倧éžã«åæãããããäžåœãåæãããŸããã",
"title": "æŠåŸã®äžåœ"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "æ¯æ²¢æ±äž»å°ã®äžè¯äººæ°å
±ååœã¯ã倧èºé²éåã§é£ç³§ãééŒã®å¢ç£ãå³ããŸãããã倱æããŸããã1960幎代ã«ãªããšããœé£ãšåé¡ãèµ·ãããåœå¢åé¡ã§ã€ã³ããšçžãåããŸããããã®ããã1970幎代ã«ãªããšã¢ã¡ãªã«ã«æ¥è¿ããããã«ãªããŸããã",
"title": "æŠåŸã®äžåœ"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "æé®®å島ã¯æ¥æ¬ã®æ€æ°å°æ¯é
ãã解æŸãããŠããåç·¯38床ç·ã«æ²¿ã£ãŠãåã¯ãœé£è»ãåã¯ã¢ã¡ãªã«è»ã«åå²å é ãããŸãããååã®æŠäºã¯æ¿ãããªããæé®®å島ã¯å·æŠã®æåç·ãšãªããŸããã1948幎ãåéšã«å€§éæ°åœ(ææ¿æ©å€§çµ±é )ãã¢ã¡ãªã«ã®æ¯æŽãåããŠå»ºåœããŸãããäžæ¹ãåéšã«æé®®æ°äž»äž»çŸ©äººæ°å
±ååœ(éæ¥æéŠçž)ããœããšãé£éŠã®æ¯æŽãåããŠå»ºåœããŸãããããããŠãæé®®å島ã¯å®å
šã«åæãããŸããã1950幎ã«åæé®®ãéåœã«äŸµæ»ããŠæé®®æŠäºãå§ãŸããšãæé®®å島ã®ã»ãŒå
šåãæé®®æ°äž»äž»çŸ©äººæ°å
±ååœã®æ¯é
äžã«çœ®ãããŸãããããããã¢ã¡ãªã«ã¯è»éãéã蟌ã¿ãã¢ã¡ãªã«è»ãäžå¿ãšããåœé£è»ãç«ã¡äžããŸãããäžæ¹ãäžåœã矩åè»ãéããŸããããã®çµæãæ¿éåºã§äŒæŠåå®ãçµã°ããæé®®æŠäºã¯çµãããŸãããããããåæé®®ãšéåœéã®ç·åŒãã¯ãã®ãŸãŸã§ãããæé®®æŠäºã§ã¯ãæ°éã®æ¥æ¬äººã茞éè»åã«ååããããã«ãªããç ç²ã«ãªããŸããã",
"title": "æé®®å島ã®åååæ"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "倧éæ°åœã¯ãäŒæŠåå®ä»¥éã®1960幎代ã«è»äººæŽæ£çãã¯ãŒãã¿ã§æ¿æš©ãæ¡ããŸãããæŽæ£çã¯å·¥æ¥åãé²ããŸããã倧éæ°åœãšäžè¯æ°åœ(å°æ¹Ÿ)ã¯ãã¢ã¡ãªã«ã®æ¯æŽãåããªããè³æ¬äž»çŸ©çãªçµæžæé·ãéãã1980幎代ã«ã¯æ°äž»åãé²ã¿ãŸãããäžæ¹ãæé®®æ°äž»äž»çŸ©äººæ°å
±ååœã§ã¯ãéäžæã«ããè»éšåªå
ã®ç¬è£äœå¶ãç¶ããŸãã",
"title": "çŸä»£ã®æé®®å島ãšå°æ¹Ÿ"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "æ¥æ¬ã¯ææŠãããšãå°æ¹Ÿçµ±æ²»ãæŸæ£ããŸããããããŠåœæ°å
ãæ¿æš©ããšã£ãæãæŠåããæ®ãããŠãã人éã«ãåœæ°å
ã®æãéãã«ãªãããã«åŒ·èŠããŸãããæ¬ç人ã¯ç
èã®å¯å£²ãåãç· ãŸã£ããæã£ãã®ã§ãäºã»äºå
«äºä»¶ã«çºå±ããŸãããæ©é¢éã§æ¬¡ã
ãšäººã殺ãããæ¬ç人ãšãªãŒãã¯èŠå¯ã«æ€æãããŠãåŠåãããŸããã1947幎ã®äºã»äºå
«äºä»¶ä»¥éãæå³ä»€ãæ·ãããç¬è£è
ã統治ããããã«ãªããŸãããæå³ä»€ã¯ã30幎åŸã®1987幎ã«å»æ¢ãããŸããã",
"title": "çŸä»£ã®æé®®å島ãšå°æ¹Ÿ"
}
] | ãã¢ã¡ãªã«ãšãœé£ã®æŠäºã¯ã第äºæ¬¡äžç倧æŠåŸã®æ±ã¢ãžã¢ã®æ
å¢ã倧ããå€ããŸãããäžè¯äººæ°å
±ååœãšå°æ¹Ÿã«äžè¯æ°åœæ¿åºãæé®®å島ã«å€§éæ°åœãšæé®®æ°äž»äž»çŸ©äººæ°å
±ååœã建åœãããŸããã第äºæ¬¡äžç倧æŠåŸãæ±ã¢ãžã¢ã®ç§©åºã¯ã©ã®ããã«å€åããã®ã§ããããã | [[å°åŠæ ¡ã»äžåŠæ ¡ã»é«çåŠæ ¡ã®åŠç¿]]>[[é«çåŠæ ¡ã®åŠç¿]]>[[é«çåŠæ ¡å°çæŽå²]]>[[é«çåŠæ ¡æŽå²ç·å]]>å·æŠäžã®æ±ã¢ãžã¢
ãã¢ã¡ãªã«ãšãœé£ã®æŠäºã¯ã第äºæ¬¡äžç倧æŠåŸã®æ±ã¢ãžã¢ã®æ
å¢ã倧ããå€ããŸãããäžè¯äººæ°å
±ååœãšå°æ¹Ÿã«äžè¯æ°åœæ¿åºãæé®®å島ã«å€§éæ°åœãšæé®®æ°äž»äž»çŸ©äººæ°å
±ååœã建åœãããŸããã第äºæ¬¡äžç倧æŠåŸãæ±ã¢ãžã¢ã®ç§©åºã¯ã©ã®ããã«å€åããã®ã§ããããã
== æŠåŸã®äžåœ ==
ãïŒïŒïŒïŒå¹Žã«æ¥æ¬ãææŠãããšãåœæ°å
ã®èä»ç³ãšå
񇜆
ã®'''[[w:æ¯æ²¢æ±|æ¯æ²¢æ±]]'''ã¯åååå®ãçµã³ãŸããããã®æãæ°ããåœå®¶ãã€ããããã«æ¿æ²»ååäŒè°ã®éå¬ã«åæããŸãããïŒïŒïŒïŒå¹Žã«æ¬æ Œçãªåœå
±å
æŠãå§ãŸããšãïŒå¹ŽåŸã«'''äžè¯äººæ°å
±ååœ'''ãèªçããŸãããäžåœå
񇜆
ã®æ¯æ²¢æ±ãäžå€®äººæ°æ¿åºäž»åžã'''[[w:åšæ©æ¥|åšæ©æ¥]]'''ãç·çã«ãªããŸããããã®çµæã瀟äŒäž»çŸ©é£å¶ã¯ããã«åãã€ããŸãããäžãœå奜åççžäºæŽå©æ¡çŽã«ãã£ãŠãäžè¯äººæ°å
±ååœãšãœããšãé£éŠã®éã«ææºé¢ä¿ãçãŸããŸããããŸããäžè¯äººæ°å
±ååœã®å·¥æ¥åãé²ããããã人æ亀æµã掻çºåããŸãããäžæ¹ãèä»ç³ã®åœæ°å
æ¿åºã¯å°æ¹Ÿã«äžè¯æ°åœã建åœããŠãã¢ã¡ãªã«ã®æ¯æŽãåããªãã倧éžã«åæãããããäžåœãåæãããŸããã
ãæ¯æ²¢æ±äž»å°ã®äžè¯äººæ°å
±ååœã¯ã倧èºé²éåã§é£ç³§ãééŒã®å¢ç£ãå³ããŸãããã倱æããŸãããïŒïŒïŒïŒå¹Žä»£ã«ãªããšããœé£ãšåé¡ãèµ·ãããåœå¢åé¡ã§ã€ã³ããšçžãåããŸããããã®ãããïŒïŒïŒïŒå¹Žä»£ã«ãªããšã¢ã¡ãªã«ã«æ¥è¿ããããã«ãªããŸããã
== æé®®å島ã®åååæ ==
ãæé®®å島ã¯æ¥æ¬ã®æ€æ°å°æ¯é
ãã解æŸãããŠããåç·¯ïŒïŒåºŠç·ã«æ²¿ã£ãŠãåã¯ãœé£è»ãåã¯ã¢ã¡ãªã«è»ã«åå²å é ãããŸãããååã®æŠäºã¯æ¿ãããªããæé®®å島ã¯å·æŠã®æåç·ãšãªããŸãããïŒïŒïŒïŒå¹Žãåéšã«'''倧éæ°åœ'''ïŒ'''[[w:ææ¿æ©|ææ¿æ©]]'''倧統é ïŒãã¢ã¡ãªã«ã®æ¯æŽãåããŠå»ºåœããŸãããäžæ¹ãåéšã«'''æé®®æ°äž»äž»çŸ©äººæ°å
±ååœ'''ïŒ'''[[w:éæ¥æ|éæ¥æ]]'''éŠçžïŒããœããšãé£éŠã®æ¯æŽãåããŠå»ºåœããŸãããããããŠãæé®®å島ã¯å®å
šã«åæãããŸãããïŒïŒïŒïŒå¹Žã«åæé®®ãéåœã«äŸµæ»ããŠ'''[[w:æé®®æŠäº|æé®®æŠäº]]'''ãå§ãŸããšãæé®®å島ã®ã»ãŒå
šåãæé®®æ°äž»äž»çŸ©äººæ°å
±ååœã®æ¯é
äžã«çœ®ãããŸãããããããã¢ã¡ãªã«ã¯è»éãéã蟌ã¿ãã¢ã¡ãªã«è»ãäžå¿ãšããåœé£è»ãç«ã¡äžããŸãããäžæ¹ãäžåœã矩åè»ãéããŸããããã®çµæãæ¿éåºã§äŒæŠåå®ãçµã°ããæé®®æŠäºã¯çµãããŸãããããããåæé®®ãšéåœéã®ç·åŒãã¯ãã®ãŸãŸã§ãããæé®®æŠäºã§ã¯ãæ°éã®æ¥æ¬äººã茞éè»åã«ååããããã«ãªããç ç²ã«ãªããŸããã
== çŸä»£ã®æé®®å島ãšå°æ¹Ÿ ==
ã倧éæ°åœã¯ãäŒæŠåå®ä»¥éã®ïŒïŒïŒïŒå¹Žä»£ã«è»äººæŽæ£çãã¯ãŒãã¿ã§æ¿æš©ãæ¡ããŸããã[[w:æŽæ£ç
|'''æŽæ£ç''']]ã¯å·¥æ¥åãé²ããŸããã倧éæ°åœãšäžè¯æ°åœïŒå°æ¹ŸïŒã¯ãã¢ã¡ãªã«ã®æ¯æŽãåããªããè³æ¬äž»çŸ©çãªçµæžæé·ãéããïŒïŒïŒïŒå¹Žä»£ã«ã¯æ°äž»åãé²ã¿ãŸãããäžæ¹ãæé®®æ°äž»äž»çŸ©äººæ°å
±ååœã§ã¯ãéäžæã«ããè»éšåªå
ã®ç¬è£äœå¶ãç¶ããŸãã
ãæ¥æ¬ã¯ææŠãããšãå°æ¹Ÿçµ±æ²»ãæŸæ£ããŸããããããŠåœæ°å
ãæ¿æš©ããšã£ãæãæŠåããæ®ãããŠãã人éã«ãåœæ°å
ã®æãéãã«ãªãããã«åŒ·èŠããŸãããæ¬ç人ã¯ç
èã®å¯å£²ãåãç· ãŸã£ããæã£ãã®ã§ãäºã»äºå
«äºä»¶ã«çºå±ããŸãããæ©é¢éã§æ¬¡ã
ãšäººã殺ãããæ¬ç人ãšãªãŒãã¯èŠå¯ã«æ€æãããŠãåŠåãããŸãããïŒïŒïŒïŒå¹Žã®äºã»äºå
«äºä»¶ä»¥éãæå³ä»€ãæ·ãããç¬è£è
ã統治ããããã«ãªããŸãããæå³ä»€ã¯ãïŒïŒå¹ŽåŸã®ïŒïŒïŒïŒå¹Žã«å»æ¢ãããŸããã
[[ã«ããŽãª:é«çåŠæ ¡æŽå²ç·å|ãããããã®ã²ããããã]]
[[ã«ããŽãª:å·æŠ]]
[[ã«ããŽãª:æ±ã¢ãžã¢]] | 2023-02-19T08:28:54Z | 2023-09-28T08:10:29Z | [] | https://ja.wikibooks.org/wiki/%E9%AB%98%E7%AD%89%E5%AD%A6%E6%A0%A1%E6%AD%B4%E5%8F%B2%E7%B7%8F%E5%90%88/%E5%86%B7%E6%88%A6%E4%B8%8B%E3%81%AE%E6%9D%B1%E3%82%A2%E3%82%B8%E3%82%A2 |
37,093 | 家äºäºä»¶æç¶æ³ç¬¬33æ¡ | æ³åŠ>æ°äºæ³>ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³
(æç¶ã®éå
Ž) | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ°äºæ³>ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "(æç¶ã®éå
Ž)",
"title": "æ¡æ"
}
] | æ³åŠïŒæ°äºæ³ïŒã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³ | [[æ³åŠ]]ïŒ[[æ°äºæ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³]]
==æ¡æ==
ïŒæç¶ã®éå
¬éïŒ
;第39æ¡
:家äºäºä»¶ã®æç¶ã¯ãå
¬éããªãããã ããè£å€æã¯ãçžåœãšèªããè
ã®åèŽãèš±ãããšãã§ããã
==解説==
:家äºäºä»¶ã¯éèšäºä»¶ã®æ§è³ªãæãããããå
¬éã®æ³å»·ã§ã¯è¡ããªãã
==åç
§æ¡æ==
*[[éèšäºä»¶æç¶æ³ç¬¬30æ¡]]
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³|家äºäºä»¶æç¶æ³]]
|[[ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³#1|第1ç·š ç·å]]<br>
[[ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³#1-7|第7ç« å®¶äºäºä»¶ã®å¯©çç]]
|[[家äºäºä»¶æç¶æ³ç¬¬32æ¡]]<br>æç¶äžã®æå©
|[[家äºäºä»¶æç¶æ³ç¬¬34æ¡]]<br>(ææ¥åã³æé)
}}
{{stub|law}}
[[category:家äºäºä»¶æç¶æ³|033]] | 2023-03-02T01:01:59Z | 2023-03-02T01:01:59Z | [
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E5%AE%B6%E4%BA%8B%E4%BA%8B%E4%BB%B6%E6%89%8B%E7%B6%9A%E6%B3%95%E7%AC%AC33%E6%9D%A1 |
37,094 | 家äºäºä»¶æç¶æ³ç¬¬56æ¡ | æ³åŠ>æ°äºæ³>ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³
(äºå®ã®èª¿æ»åã³èšŒæ 調ã¹ç) | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ°äºæ³>ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "(äºå®ã®èª¿æ»åã³èšŒæ 調ã¹ç)",
"title": "æ¡æ"
}
] | æ³åŠïŒæ°äºæ³ïŒã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³ | [[æ³åŠ]]ïŒ[[æ°äºæ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³]]
==æ¡æ==
ïŒäºå®ã®èª¿æ»åã³èšŒæ 調ã¹çïŒ
;第56æ¡
#家åºè£å€æã¯ãè·æš©ã§äºå®ã®èª¿æ»ããããã€ãç³ç«ãŠã«ããåã¯è·æš©ã§ãå¿
èŠãšèªãã蚌æ 調ã¹ãããªããã°ãªããªãã
#åœäºè
ã¯ãé©åãã€è¿
éãªå¯©çåã³å¯©å€ã®å®çŸã®ãããäºå®ã®èª¿æ»åã³èšŒæ 調ã¹ã«ååãããã®ãšããã
==解説==
:家äºäºä»¶ã®å¯©å€ã«ãããŠã¯[[è·æš©æ¢ç¥äž»çŸ©]]ãæ¡çšãããã
==åç
§æ¡æ==
*[[éèšäºä»¶æç¶æ³ç¬¬49æ¡]]
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³|家äºäºä»¶æç¶æ³]]
|[[ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³#2|第2ç·š 家äºå¯©å€ã«é¢ããæç¶]]<br>
[[ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³#2-1|第1ç« ç·å]]<br>
[[ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³#2-1-1|第1ç¯ å®¶äºå¯©å€ã®æç¶]]<br>
[[ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³#2-1-1-4|第4欟 äºå®ã®èª¿æ»åã³èšŒæ 調ã¹]]
|[[家äºäºä»¶æç¶æ³ç¬¬55æ¡]]<br>(é蚳人ã®ç«äŒãçãã®ä»ã®æªçœ®)
|[[家äºäºä»¶æç¶æ³ç¬¬57æ¡]]<br>(çæ)
}}
{{stub|law}}
[[category:家äºäºä»¶æç¶æ³|056]] | 2023-03-02T01:08:55Z | 2023-03-02T01:08:55Z | [
"ãã³ãã¬ãŒã:Stub",
"ãã³ãã¬ãŒã:ååŸ"
] | https://ja.wikibooks.org/wiki/%E5%AE%B6%E4%BA%8B%E4%BA%8B%E4%BB%B6%E6%89%8B%E7%B6%9A%E6%B3%95%E7%AC%AC56%E6%9D%A1 |
37,095 | 家äºäºä»¶æç¶æ³ç¬¬78æ¡ | æ³åŠ>æ°äºæ³>ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³
(審å€ã®åæ¶ãåã¯å€æŽ) | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ°äºæ³>ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "(審å€ã®åæ¶ãåã¯å€æŽ)",
"title": "æ¡æ"
}
] | æ³åŠïŒæ°äºæ³ïŒã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³ | [[æ³åŠ]]ïŒ[[æ°äºæ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³]]
==æ¡æ==
ïŒå¯©å€ã®åæ¶ãåã¯å€æŽïŒ
;第78æ¡
#家åºè£å€æã¯ã審å€ãããåŸããã®å¯©å€ãäžåœãšèªãããšãã¯ã次ã«æ²ãã審å€ãé€ããè·æš©ã§ããããåãæ¶ããåã¯å€æŽããããšãã§ããã
##ç³ç«ãŠã«ãã£ãŠã®ã¿å¯©å€ããã¹ãå Žåã«ãããŠç³ç«ãŠãåŽäžãã審å€
##å³ææåãããããšãã§ãã審å€
#審å€ã確å®ããæ¥ãã5幎ãçµéãããšãã¯ã家åºè£å€æã¯ãåé
ã®èŠå®ã«ããåæ¶ãåã¯å€æŽãããããšãã§ããªãããã ããäºæ
ã®å€æŽã«ãããã®å¯©å€ãäžåœãšèªããã«è³ã£ããšãã¯ããã®éãã§ãªãã
#家åºè£å€æã¯ã第1é
ã®èŠå®ã«ãã審å€ã®åæ¶ãåã¯å€æŽãããå Žåã«ã¯ããã®å¯©å€ã«ãããåœäºè
åã³ãã®ä»ã®å¯©å€ãåããè
ã®é³è¿°ãèŽããªããã°ãªããªãã
#第1é
ã®èŠå®ã«ããåæ¶ãåã¯å€æŽã®å¯©å€ã«å¯ŸããŠã¯ãåæ¶ãåŸåã¯å€æŽåŸã®å¯©å€ãå審å€ã§ãããšããå Žåã«å³ææåãããããšãã§ããè
ã«éããå³ææåãããããšãã§ããã
==解説==
:
==åç
§æ¡æ==
*[[éèšäºä»¶æç¶æ³ç¬¬59æ¡]]
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³|家äºäºä»¶æç¶æ³]]
|[[ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³#2|第2ç·š 家äºå¯©å€ã«é¢ããæç¶]]<br>
[[ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³#2-1|第1ç« ç·å]]<br>
[[ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³#2-1-1|第1ç¯ å®¶äºå¯©å€ã®æç¶]]<br>
[[ã³ã³ã¡ã³ã¿ãŒã«å®¶äºäºä»¶æç¶æ³#2-1-1-7|第7欟 審å€ç]]
|[[家äºäºä»¶æç¶æ³ç¬¬77æ¡]]<br>(æŽæ£æ±ºå®)
|[[家äºäºä»¶æç¶æ³ç¬¬79æ¡]]<br>(審å€ã«é¢ããæ°äºèšŽèšæ³ã®æºçš)
}}
{{stub|law}}
[[category:家äºäºä»¶æç¶æ³|078]] | 2023-03-02T01:16:30Z | 2023-03-02T01:16:30Z | [
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E5%AE%B6%E4%BA%8B%E4%BA%8B%E4%BB%B6%E6%89%8B%E7%B6%9A%E6%B3%95%E7%AC%AC78%E6%9D%A1 |
37,110 | ããã°ã©ãã³ã°/Nullå®å
šæ§ | Nullå®å
šæ§(Null Safety)ã¯ãããã°ã©ãã³ã°èšèªã«ãããŠãå€æ°ãNullå€ãæã€ããšãã§ãããã©ããã瀺ãæŠå¿µã§ããNullå€ã¯ãå€æ°ãå€ãæããªãããšãè¡šããŸããNullå€ãæã€å€æ°ã«å¯Ÿããæäœã¯ãã©ã³ã¿ã€ã ãšã©ãŒãåŒãèµ·ããå¯èœæ§ããããããNullå®å
šæ§ã¯ããã°ã©ã ã®å質ãåäžãããããã«éåžžã«éèŠã§ãã
以äžã«ãåèšèªã«ãããNullå®å
šæ§ã®å¯Ÿå¿ç¶æ³ã説æããŸãã
Nullå®å
šæ§ã«é¢ãããšã©ãŒã¯ãå®è¡æãšã©ãŒã«ãªãããšãå€ãããããã¹ãã§ã¯æ€åºã§ããªãå¯èœæ§ããããŸãã ãããã£ãŠãããã°ã©ããŒã¯Nullå®å
šæ§ã«ã€ããŠã®ãã¹ããã©ã¯ãã£ã¹ãç解ããã³ãŒããæžãéã«é©åãªæ³šæãæãå¿
èŠããããŸãã
Nullå®å
šæ§(Null Safety)ãšã¯ãããã°ã©ãã³ã°èšèªããã¬ãŒã ã¯ãŒã¯ã®èšèšãæ©èœã®äžéšã§ãããnullãã€ã³ã¿åç
§ãnullå€ã«é¢é£ããåé¡ãåé¿ããããã®æŠå¿µã§ããnullãã€ã³ã¿åç
§ãšã©ãŒã¯ãããã°ã©ã ãnullå€ãåç
§ããããšãããšãã«çºçããå¯èœæ§ããããšã©ãŒã§ããããã°ã©ã ãnullå€ãåç
§ããå Žåãéåžžã¯ã©ã³ã¿ã€ã ãšã©ãŒãçºçããäºæãã¬åäœãåŒãèµ·ããå¯èœæ§ããããŸãã
Nullå®å
šæ§ã®ç®çã¯ãããã°ã©ããŒãnullåç
§ãšã©ãŒãåé¿ããã³ãŒãã®å®å
šæ§ãåäžãããããšã§ããããã¯ãããã°ã©ã ã®å質ãä¿¡é Œæ§ãé«ããäžã§éèŠãªèŠçŽ ãšãªããŸãã
Nullå®å
šæ§ãå®çŸããæ¹æ³ã«ã¯ãããŸããŸãªã¢ãããŒãããããŸãããäž»ãªãã®ã¯ä»¥äžã®éãã§ãã
Nullå®å
šæ§ã¯ãããã°ã©ãã³ã°èšèªããã¬ãŒã ã¯ãŒã¯ã®èšèšãæ©èœã®äžéšãšããŠåãå
¥ããããããšã§ãããã°ã©ã ã®å質ãåäžãããå®å
šæ§ã確ä¿ããããšãã§ããŸãã
Nullå®å
šã§ã¯ãªãã³ãŒãã®äŸã瀺ããŸãããã®äŸã§ã¯ãnullå€ãæ±ãéã«é©åãªãã§ãã¯ããã³ããªã³ã°ãè¡ãããŠããªããããnullåç
§ãšã©ãŒãçºçããå¯èœæ§ããããŸãã
ãã®äŸã§ã¯ãå€æ° name ã« null ã代å
¥ãããŠããŸãããããã«å¯Ÿãããã§ãã¯ãè¡ãããŠããŸããããã®ãããname ã® length() ã¡ãœãããåŒã³åºããšãnullåç
§ãšã©ãŒãçºçããå¯èœæ§ããããŸãã
Nullå®å
šæ§ã確ä¿ããããã«ã¯ã以äžã®ããã«é©åãªãã§ãã¯ããã³ããªã³ã°ãè¡ãå¿
èŠããããŸãã
ããã§ã¯ãname ã null ã§ãªãããšããã§ãã¯ããŠãã length() ã¡ãœãããåŒã³åºããŠããŸãããã name ã null ã®å Žåã¯ãé©åãªãšã©ãŒãã³ããªã³ã°ãè¡ã£ãŠããŸããããã«ãããnullåç
§ãšã©ãŒãåé¿ããããã°ã©ã ã®å®å
šæ§ãåäžãããããšãã§ããŸãã
Javaã«ã¯ãC#ãKotlinãªã©ã®ä»ã®èšèªã«ãããããªãNULLåäœæŒç®å(null coalescing operator)ã¯ååšããŸããã§ãããNULLåäœæŒç®åã¯ãnullãã§ãã¯ãè¡ãç絡æŒç®åã§ãããå·ŠåŽã®åŒãnullã§ããã°ä»£æ¿å€ãè¿ããŸãããã®ãããªæŒç®åã¯Javaã«ã¯çµã¿èŸŒãŸããŠãããã代ããã«æ¡ä»¶æŒç®å(ternary operator)ãif-elseæãªã©ã䜿çšããŠnullãã§ãã¯ãšä»£æ¿å€ã®æå®ãè¡ãå¿
èŠããããŸãã
ããããJava 14ããã¯ãJEP 358(ãSwitch Expressionsã)ã«ãããswitchæãåŒãšããŠäœ¿çšå¯èœã«ãªããnullåäœæŒç®åã«äŒŒãæ©èœãæäŸããæ¹æ³ãå°å
¥ãããŸãããããã«ãããnullãã§ãã¯ãšä»£æ¿å€ã®æå®ãããç°¡æœã«è¡ãããšãã§ããŸãã
äŸãã°ã以äžã®ãããªã³ãŒããèããŠã¿ãŸãããã
ããã¯ãname ãnullã§ãªããã° name ãè¿ããnullã§ããã° "default" ãè¿ãæ¡ä»¶æŒç®åã䜿çšããäŸã§ããåãåäœãJava 14以éã®switchåŒã䜿çšããŠè¡ãããšãã§ããŸãã
ãã®ã³ãŒãã¯ãname ã®å€ãnullã§ããã° "default" ãè¿ãããã以å€ã®å Žå㯠name ãè¿ããŸããããã«ãããnullåäœæŒç®åã«è¿ãæåãå®çŸããããšãã§ããŸãã
Javaãnullå®å
šæ§ã«é¢ããŠæ¹å€ãããçç±ã¯ããã€ããããŸãã
èšèªã®é²åã®é
ã: Javaã¯å€ãããã®èšèªã§ãããä»ã®æ°ããèšèªãšæ¯èŒããŠãèšèªã®é²åãæ¯èŒçé
ããŠããŸããæè¿ã®ããŒãžã§ã³ã§ããã€ãã®æ¹åãè¡ãããŸããããnullå®å
šæ§ã«é¢ããé©æ°çãªæ©èœã¯ãŸã äžè¶³ããŠãããšäžéšã®éçºè
ã«ã¯æããããŸãã
ãããã®çç±ãããJavaã¯nullå®å
šæ§ã«é¢ããåé¡ãããçã«æããããšããããŸããããããè¿å¹Žã®Javaã®ããŒãžã§ã³ã§ã¯ãnullå®å
šæ§ã«é¢ããæ¹åãé²ããããŠãããããã°ã©ããŒãããå®å
šãªã³ãŒããèšè¿°ããããã®ããŒã«ãæ©èœãæäŸãããŠããŸãã
Java以å€ã«ããnullå®å
šæ§ã®åé¡ãé¡èãªèšèªããããŸãããããã®èšèªã§ã¯ãnullãã€ã³ã¿åç
§ãšã©ãŒãé »ç¹ã«çºçãããããéçºè
ã泚æãæããªããã°ãªããŸããã以äžã¯ãããã€ãã®äŸã§ãã
ãããã®èšèªã§ã¯ãnullããã®é¡äŒŒå€(Noneãnilãªã©)ãåºã䜿çšãããŠããŸãããé©åãªãã§ãã¯ããã³ããªã³ã°ãè¡ããªããšãnullãã€ã³ã¿åç
§ãšã©ãŒãçºçããå¯èœæ§ããããŸãããããã£ãŠãéçºè
ã¯ãããã®èšèªã§ã³ãŒãã£ã³ã°ããéã«ã¯ãnullå®å
šæ§ã«æ³šæãæãå¿
èŠããããŸãã
åçåä»ãèšèªãšnullã®å±éºæ§ã¯ãåãã§ã¯ãããŸããããããã€ãã®é¡äŒŒç¹ããããŸãã
åçåä»ãèšèªã§ã¯ãå€æ°ã®åãå®è¡æã«æ±ºå®ããããããéçåä»ãèšèªãšæ¯èŒããŠåã®äžæŽåãçºçãããããšããç¹åŸŽããããŸããããã¯ãã³ã³ãã€ã«æã«åã®æŽåæ§ããã§ãã¯ã§ããªããããå®è¡æã«åã®äžæŽåãçºçããå¯èœæ§ãé«ãŸããŸãã
äžæ¹ãnullã¯å€ã®äžåšãè¡šãããã®ç¹å¥ãªå€ã§ãããéçåä»ãèšèªã§ãåçåä»ãèšèªã§ã䜿çšãããŸããããããåçåä»ãèšèªã§ã¯ãå€æ°ã®åãå®è¡æã«æ±ºå®ããããããnullã®æ±ããéçåä»ãèšèªãããæè»ã§ãããnullãæåŸ
ãããå Žæã«æž¡ãããããè¿ãããããšããããŸãããã®ãããnullã®å±éºæ§ãéçåä»ãèšèªãããé«ããªãããšããããŸãã
åçåä»ãèšèªã§ã¯ãåã®äžæŽåãnullã®æ±ãã«é¢ããåé¡ãã©ã³ã¿ã€ã ãšã©ãŒãšããŠæããããšãäžè¬çã§ããéçåä»ãèšèªã§ã¯ããããã®åé¡ãã³ã³ãã€ã«æã«æ€åºããããåŸåããããŸãã
ãããã£ãŠãåçåä»ãèšèªãšnullã®å±éºæ§ã¯å¯æ¥ã«é¢é£ããŠããŸãããå³å¯ã«ã¯ç°ãªãæŠå¿µã§ãããããããã®èšèªã®ç¹æ§ãèšèšã«å¿ããŠé©åãªãã³ããªã³ã°ãå¿
èŠã§ãã
Nullå®å
šæ§ã®ãŠãŒã¹ã±ãŒã¹ã¯ãããã°ã©ãã³ã°ã®ããŸããŸãªåŽé¢ã§èŠãããŸãã以äžã«ããã®äžéšãæããŠã¿ãŸãã ããã°ã©ã ã®å®å
šæ§ã®åäž: Nullå®å
šæ§ãå°å
¥ããããšã§ãnullãã€ã³ã¿åç
§ãšã©ãŒãåé¿ããããã°ã©ã ã®å®å
šæ§ãåäžãããããšãã§ããŸããããã«ãããå®è¡æã«äºæãã¬äŸå€ãçºçãããªã¹ã¯ãäœæžããããã°ã©ã ã®ä¿¡é Œæ§ãé«ããããšãã§ããŸãã
ãããã®ãŠãŒã¹ã±ãŒã¹ã¯ãããã°ã©ãã³ã°ã«ãããnullå®å
šæ§ã®éèŠæ§ãšããã®é©çšç¯å²ã瀺ããŠããŸããnullå®å
šæ§ãèæ
®ããããšã§ãããã°ã©ã ã®å®å
šæ§ãä¿å®æ§ãããã³ä¿¡é Œæ§ãåäžãããããšãã§ããŸãã
Nullå®å
šæ§ã«é¢é£ãããããã¯ä»¥å€ã«ããããã°ã©ãã³ã°ã«ãããå®å
šæ§ãä¿¡é Œæ§ã«é¢é£ããããŸããŸãªãããã¯ããããŸããããã€ãã®äŸãæãããšã
ãããã®ãããã¯ã¯ãããã°ã©ã ã®å®å
šæ§ãä¿¡é Œæ§ãåäžãããããã«éèŠãªèãæ¹ãææ³ã§ããããã°ã©ãã³ã°ã«ãããŠããããã®ãããã¯ãç解ããé©åã«é©çšããããšãéèŠã§ãã
Nullå®å
šæ§ã確ä¿ããããã®ãã¹ããã©ã¯ãã£ã¹ã¯ã以äžã®ãããªãã®ããããŸãã
ãããã®ãã¹ããã©ã¯ãã£ã¹ãéµå®ããããšã§ãããã°ã©ã ã®nullå®å
šæ§ã確ä¿ããå®å
šã§ä¿¡é Œæ§ã®é«ãã³ãŒããéçºããããšãã§ããŸãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "Nullå®å
šæ§(Null Safety)ã¯ãããã°ã©ãã³ã°èšèªã«ãããŠãå€æ°ãNullå€ãæã€ããšãã§ãããã©ããã瀺ãæŠå¿µã§ããNullå€ã¯ãå€æ°ãå€ãæããªãããšãè¡šããŸããNullå€ãæã€å€æ°ã«å¯Ÿããæäœã¯ãã©ã³ã¿ã€ã ãšã©ãŒãåŒãèµ·ããå¯èœæ§ããããããNullå®å
šæ§ã¯ããã°ã©ã ã®å質ãåäžãããããã«éåžžã«éèŠã§ãã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "以äžã«ãåèšèªã«ãããNullå®å
šæ§ã®å¯Ÿå¿ç¶æ³ã説æããŸãã",
"title": ""
},
{
"paragraph_id": 2,
"tag": "p",
"text": "Nullå®å
šæ§ã«é¢ãããšã©ãŒã¯ãå®è¡æãšã©ãŒã«ãªãããšãå€ãããããã¹ãã§ã¯æ€åºã§ããªãå¯èœæ§ããããŸãã ãããã£ãŠãããã°ã©ããŒã¯Nullå®å
šæ§ã«ã€ããŠã®ãã¹ããã©ã¯ãã£ã¹ãç解ããã³ãŒããæžãéã«é©åãªæ³šæãæãå¿
èŠããããŸãã",
"title": ""
},
{
"paragraph_id": 3,
"tag": "p",
"text": "Nullå®å
šæ§(Null Safety)ãšã¯ãããã°ã©ãã³ã°èšèªããã¬ãŒã ã¯ãŒã¯ã®èšèšãæ©èœã®äžéšã§ãããnullãã€ã³ã¿åç
§ãnullå€ã«é¢é£ããåé¡ãåé¿ããããã®æŠå¿µã§ããnullãã€ã³ã¿åç
§ãšã©ãŒã¯ãããã°ã©ã ãnullå€ãåç
§ããããšãããšãã«çºçããå¯èœæ§ããããšã©ãŒã§ããããã°ã©ã ãnullå€ãåç
§ããå Žåãéåžžã¯ã©ã³ã¿ã€ã ãšã©ãŒãçºçããäºæãã¬åäœãåŒãèµ·ããå¯èœæ§ããããŸãã",
"title": "Nullå®å
šæ§ãšã¯ïŒ"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "Nullå®å
šæ§ã®ç®çã¯ãããã°ã©ããŒãnullåç
§ãšã©ãŒãåé¿ããã³ãŒãã®å®å
šæ§ãåäžãããããšã§ããããã¯ãããã°ã©ã ã®å質ãä¿¡é Œæ§ãé«ããäžã§éèŠãªèŠçŽ ãšãªããŸãã",
"title": "Nullå®å
šæ§ãšã¯ïŒ"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "Nullå®å
šæ§ãå®çŸããæ¹æ³ã«ã¯ãããŸããŸãªã¢ãããŒãããããŸãããäž»ãªãã®ã¯ä»¥äžã®éãã§ãã",
"title": "Nullå®å
šæ§ãšã¯ïŒ"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "Nullå®å
šæ§ã¯ãããã°ã©ãã³ã°èšèªããã¬ãŒã ã¯ãŒã¯ã®èšèšãæ©èœã®äžéšãšããŠåãå
¥ããããããšã§ãããã°ã©ã ã®å質ãåäžãããå®å
šæ§ã確ä¿ããããšãã§ããŸãã",
"title": "Nullå®å
šæ§ãšã¯ïŒ"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "Nullå®å
šã§ã¯ãªãã³ãŒãã®äŸã瀺ããŸãããã®äŸã§ã¯ãnullå€ãæ±ãéã«é©åãªãã§ãã¯ããã³ããªã³ã°ãè¡ãããŠããªããããnullåç
§ãšã©ãŒãçºçããå¯èœæ§ããããŸãã",
"title": "Nullå®å
šæ§ãšã¯ïŒ"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "ãã®äŸã§ã¯ãå€æ° name ã« null ã代å
¥ãããŠããŸãããããã«å¯Ÿãããã§ãã¯ãè¡ãããŠããŸããããã®ãããname ã® length() ã¡ãœãããåŒã³åºããšãnullåç
§ãšã©ãŒãçºçããå¯èœæ§ããããŸãã",
"title": "Nullå®å
šæ§ãšã¯ïŒ"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "Nullå®å
šæ§ã確ä¿ããããã«ã¯ã以äžã®ããã«é©åãªãã§ãã¯ããã³ããªã³ã°ãè¡ãå¿
èŠããããŸãã",
"title": "Nullå®å
šæ§ãšã¯ïŒ"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "ããã§ã¯ãname ã null ã§ãªãããšããã§ãã¯ããŠãã length() ã¡ãœãããåŒã³åºããŠããŸãããã name ã null ã®å Žåã¯ãé©åãªãšã©ãŒãã³ããªã³ã°ãè¡ã£ãŠããŸããããã«ãããnullåç
§ãšã©ãŒãåé¿ããããã°ã©ã ã®å®å
šæ§ãåäžãããããšãã§ããŸãã",
"title": "Nullå®å
šæ§ãšã¯ïŒ"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "Javaã«ã¯ãC#ãKotlinãªã©ã®ä»ã®èšèªã«ãããããªãNULLåäœæŒç®å(null coalescing operator)ã¯ååšããŸããã§ãããNULLåäœæŒç®åã¯ãnullãã§ãã¯ãè¡ãç絡æŒç®åã§ãããå·ŠåŽã®åŒãnullã§ããã°ä»£æ¿å€ãè¿ããŸãããã®ãããªæŒç®åã¯Javaã«ã¯çµã¿èŸŒãŸããŠãããã代ããã«æ¡ä»¶æŒç®å(ternary operator)ãif-elseæãªã©ã䜿çšããŠnullãã§ãã¯ãšä»£æ¿å€ã®æå®ãè¡ãå¿
èŠããããŸãã",
"title": "Nullå®å
šæ§ãšã¯ïŒ"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "ããããJava 14ããã¯ãJEP 358(ãSwitch Expressionsã)ã«ãããswitchæãåŒãšããŠäœ¿çšå¯èœã«ãªããnullåäœæŒç®åã«äŒŒãæ©èœãæäŸããæ¹æ³ãå°å
¥ãããŸãããããã«ãããnullãã§ãã¯ãšä»£æ¿å€ã®æå®ãããç°¡æœã«è¡ãããšãã§ããŸãã",
"title": "Nullå®å
šæ§ãšã¯ïŒ"
},
{
"paragraph_id": 13,
"tag": "p",
"text": "äŸãã°ã以äžã®ãããªã³ãŒããèããŠã¿ãŸãããã",
"title": "Nullå®å
šæ§ãšã¯ïŒ"
},
{
"paragraph_id": 14,
"tag": "p",
"text": "ããã¯ãname ãnullã§ãªããã° name ãè¿ããnullã§ããã° \"default\" ãè¿ãæ¡ä»¶æŒç®åã䜿çšããäŸã§ããåãåäœãJava 14以éã®switchåŒã䜿çšããŠè¡ãããšãã§ããŸãã",
"title": "Nullå®å
šæ§ãšã¯ïŒ"
},
{
"paragraph_id": 15,
"tag": "p",
"text": "ãã®ã³ãŒãã¯ãname ã®å€ãnullã§ããã° \"default\" ãè¿ãããã以å€ã®å Žå㯠name ãè¿ããŸããããã«ãããnullåäœæŒç®åã«è¿ãæåãå®çŸããããšãã§ããŸãã",
"title": "Nullå®å
šæ§ãšã¯ïŒ"
},
{
"paragraph_id": 16,
"tag": "p",
"text": "Javaãnullå®å
šæ§ã«é¢ããŠæ¹å€ãããçç±ã¯ããã€ããããŸãã",
"title": "NULLå®å
šã§Javaãããçã«ããäžããçç±ã¯ïŒ ="
},
{
"paragraph_id": 17,
"tag": "p",
"text": "èšèªã®é²åã®é
ã: Javaã¯å€ãããã®èšèªã§ãããä»ã®æ°ããèšèªãšæ¯èŒããŠãèšèªã®é²åãæ¯èŒçé
ããŠããŸããæè¿ã®ããŒãžã§ã³ã§ããã€ãã®æ¹åãè¡ãããŸããããnullå®å
šæ§ã«é¢ããé©æ°çãªæ©èœã¯ãŸã äžè¶³ããŠãããšäžéšã®éçºè
ã«ã¯æããããŸãã",
"title": "NULLå®å
šã§Javaãããçã«ããäžããçç±ã¯ïŒ ="
},
{
"paragraph_id": 18,
"tag": "p",
"text": "ãããã®çç±ãããJavaã¯nullå®å
šæ§ã«é¢ããåé¡ãããçã«æããããšããããŸããããããè¿å¹Žã®Javaã®ããŒãžã§ã³ã§ã¯ãnullå®å
šæ§ã«é¢ããæ¹åãé²ããããŠãããããã°ã©ããŒãããå®å
šãªã³ãŒããèšè¿°ããããã®ããŒã«ãæ©èœãæäŸãããŠããŸãã",
"title": "NULLå®å
šã§Javaãããçã«ããäžããçç±ã¯ïŒ ="
},
{
"paragraph_id": 19,
"tag": "p",
"text": "Java以å€ã«ããnullå®å
šæ§ã®åé¡ãé¡èãªèšèªããããŸãããããã®èšèªã§ã¯ãnullãã€ã³ã¿åç
§ãšã©ãŒãé »ç¹ã«çºçãããããéçºè
ã泚æãæããªããã°ãªããŸããã以äžã¯ãããã€ãã®äŸã§ãã",
"title": "NULLå®å
šã§Javaãããçã«ããäžããçç±ã¯ïŒ ="
},
{
"paragraph_id": 20,
"tag": "p",
"text": "ãããã®èšèªã§ã¯ãnullããã®é¡äŒŒå€(Noneãnilãªã©)ãåºã䜿çšãããŠããŸãããé©åãªãã§ãã¯ããã³ããªã³ã°ãè¡ããªããšãnullãã€ã³ã¿åç
§ãšã©ãŒãçºçããå¯èœæ§ããããŸãããããã£ãŠãéçºè
ã¯ãããã®èšèªã§ã³ãŒãã£ã³ã°ããéã«ã¯ãnullå®å
šæ§ã«æ³šæãæãå¿
èŠããããŸãã",
"title": "NULLå®å
šã§Javaãããçã«ããäžããçç±ã¯ïŒ ="
},
{
"paragraph_id": 21,
"tag": "p",
"text": "åçåä»ãèšèªãšnullã®å±éºæ§ã¯ãåãã§ã¯ãããŸããããããã€ãã®é¡äŒŒç¹ããããŸãã",
"title": "NULLå®å
šã§Javaãããçã«ããäžããçç±ã¯ïŒ ="
},
{
"paragraph_id": 22,
"tag": "p",
"text": "åçåä»ãèšèªã§ã¯ãå€æ°ã®åãå®è¡æã«æ±ºå®ããããããéçåä»ãèšèªãšæ¯èŒããŠåã®äžæŽåãçºçãããããšããç¹åŸŽããããŸããããã¯ãã³ã³ãã€ã«æã«åã®æŽåæ§ããã§ãã¯ã§ããªããããå®è¡æã«åã®äžæŽåãçºçããå¯èœæ§ãé«ãŸããŸãã",
"title": "NULLå®å
šã§Javaãããçã«ããäžããçç±ã¯ïŒ ="
},
{
"paragraph_id": 23,
"tag": "p",
"text": "äžæ¹ãnullã¯å€ã®äžåšãè¡šãããã®ç¹å¥ãªå€ã§ãããéçåä»ãèšèªã§ãåçåä»ãèšèªã§ã䜿çšãããŸããããããåçåä»ãèšèªã§ã¯ãå€æ°ã®åãå®è¡æã«æ±ºå®ããããããnullã®æ±ããéçåä»ãèšèªãããæè»ã§ãããnullãæåŸ
ãããå Žæã«æž¡ãããããè¿ãããããšããããŸãããã®ãããnullã®å±éºæ§ãéçåä»ãèšèªãããé«ããªãããšããããŸãã",
"title": "NULLå®å
šã§Javaãããçã«ããäžããçç±ã¯ïŒ ="
},
{
"paragraph_id": 24,
"tag": "p",
"text": "åçåä»ãèšèªã§ã¯ãåã®äžæŽåãnullã®æ±ãã«é¢ããåé¡ãã©ã³ã¿ã€ã ãšã©ãŒãšããŠæããããšãäžè¬çã§ããéçåä»ãèšèªã§ã¯ããããã®åé¡ãã³ã³ãã€ã«æã«æ€åºããããåŸåããããŸãã",
"title": "NULLå®å
šã§Javaãããçã«ããäžããçç±ã¯ïŒ ="
},
{
"paragraph_id": 25,
"tag": "p",
"text": "ãããã£ãŠãåçåä»ãèšèªãšnullã®å±éºæ§ã¯å¯æ¥ã«é¢é£ããŠããŸãããå³å¯ã«ã¯ç°ãªãæŠå¿µã§ãããããããã®èšèªã®ç¹æ§ãèšèšã«å¿ããŠé©åãªãã³ããªã³ã°ãå¿
èŠã§ãã",
"title": "NULLå®å
šã§Javaãããçã«ããäžããçç±ã¯ïŒ ="
},
{
"paragraph_id": 26,
"tag": "p",
"text": "Nullå®å
šæ§ã®ãŠãŒã¹ã±ãŒã¹ã¯ãããã°ã©ãã³ã°ã®ããŸããŸãªåŽé¢ã§èŠãããŸãã以äžã«ããã®äžéšãæããŠã¿ãŸãã ããã°ã©ã ã®å®å
šæ§ã®åäž: Nullå®å
šæ§ãå°å
¥ããããšã§ãnullãã€ã³ã¿åç
§ãšã©ãŒãåé¿ããããã°ã©ã ã®å®å
šæ§ãåäžãããããšãã§ããŸããããã«ãããå®è¡æã«äºæãã¬äŸå€ãçºçãããªã¹ã¯ãäœæžããããã°ã©ã ã®ä¿¡é Œæ§ãé«ããããšãã§ããŸãã",
"title": "ãŠãŒã¹ã±ãŒã¹"
},
{
"paragraph_id": 27,
"tag": "p",
"text": "ãããã®ãŠãŒã¹ã±ãŒã¹ã¯ãããã°ã©ãã³ã°ã«ãããnullå®å
šæ§ã®éèŠæ§ãšããã®é©çšç¯å²ã瀺ããŠããŸããnullå®å
šæ§ãèæ
®ããããšã§ãããã°ã©ã ã®å®å
šæ§ãä¿å®æ§ãããã³ä¿¡é Œæ§ãåäžãããããšãã§ããŸãã",
"title": "ãŠãŒã¹ã±ãŒã¹"
},
{
"paragraph_id": 28,
"tag": "p",
"text": "Nullå®å
šæ§ã«é¢é£ãããããã¯ä»¥å€ã«ããããã°ã©ãã³ã°ã«ãããå®å
šæ§ãä¿¡é Œæ§ã«é¢é£ããããŸããŸãªãããã¯ããããŸããããã€ãã®äŸãæãããšã",
"title": "ãŠãŒã¹ã±ãŒã¹"
},
{
"paragraph_id": 29,
"tag": "p",
"text": "ãããã®ãããã¯ã¯ãããã°ã©ã ã®å®å
šæ§ãä¿¡é Œæ§ãåäžãããããã«éèŠãªèãæ¹ãææ³ã§ããããã°ã©ãã³ã°ã«ãããŠããããã®ãããã¯ãç解ããé©åã«é©çšããããšãéèŠã§ãã",
"title": "ãŠãŒã¹ã±ãŒã¹"
},
{
"paragraph_id": 30,
"tag": "p",
"text": "Nullå®å
šæ§ã確ä¿ããããã®ãã¹ããã©ã¯ãã£ã¹ã¯ã以äžã®ãããªãã®ããããŸãã",
"title": "ãã¹ããã©ã¯ãã£ã¹"
},
{
"paragraph_id": 31,
"tag": "p",
"text": "ãããã®ãã¹ããã©ã¯ãã£ã¹ãéµå®ããããšã§ãããã°ã©ã ã®nullå®å
šæ§ã確ä¿ããå®å
šã§ä¿¡é Œæ§ã®é«ãã³ãŒããéçºããããšãã§ããŸãã",
"title": "ãã¹ããã©ã¯ãã£ã¹"
}
] | Nullå®å
šæ§ã¯ãããã°ã©ãã³ã°èšèªã«ãããŠãå€æ°ãNullå€ãæã€ããšãã§ãããã©ããã瀺ãæŠå¿µã§ããNullå€ã¯ãå€æ°ãå€ãæããªãããšãè¡šããŸããNullå€ãæã€å€æ°ã«å¯Ÿããæäœã¯ãã©ã³ã¿ã€ã ãšã©ãŒãåŒãèµ·ããå¯èœæ§ããããããNullå®å
šæ§ã¯ããã°ã©ã ã®å質ãåäžãããããã«éåžžã«éèŠã§ãã 以äžã«ãåèšèªã«ãããNullå®å
šæ§ã®å¯Ÿå¿ç¶æ³ã説æããŸãã Nullå®å
šæ§ã«é¢ãããšã©ãŒã¯ãå®è¡æãšã©ãŒã«ãªãããšãå€ãããããã¹ãã§ã¯æ€åºã§ããªãå¯èœæ§ããããŸãã
ãããã£ãŠãããã°ã©ããŒã¯Nullå®å
šæ§ã«ã€ããŠã®ãã¹ããã©ã¯ãã£ã¹ãç解ããã³ãŒããæžãéã«é©åãªæ³šæãæãå¿
èŠããããŸãã | Nullå®å
šæ§ïŒNull SafetyïŒã¯ãããã°ã©ãã³ã°èšèªã«ãããŠãå€æ°ãNullå€ãæã€ããšãã§ãããã©ããã瀺ãæŠå¿µã§ããNullå€ã¯ãå€æ°ãå€ãæããªãããšãè¡šããŸããNullå€ãæã€å€æ°ã«å¯Ÿããæäœã¯ãã©ã³ã¿ã€ã ãšã©ãŒãåŒãèµ·ããå¯èœæ§ããããããNullå®å
šæ§ã¯ããã°ã©ã ã®å質ãåäžãããããã«éåžžã«éèŠã§ãã
以äžã«ãåèšèªã«ãããNullå®å
šæ§ã®å¯Ÿå¿ç¶æ³ã説æããŸãã
;CãC++:CãšC++ã¯Nullå®å
šæ§ãæã¡ãŸããããããã®èšèªã§ã¯ããã€ã³ã¿ã䜿çšããããšã§Nullå€ãè¡šçŸããããšãã§ããŸããããã€ã³ã¿ã®äœ¿çšã«ã¯æ³šæãå¿
èŠã§ãããŸããC++11ããã¯ãNullå€ãè¡šãããã®std::nullptr_tåãå°å
¥ãããŠããŸãã
;Java:Javaã¯Nullå®å
šæ§ãæã¡ãŸããJavaã®å Žåãnullåç
§ãè¡ããšãNullPointerExceptionãçºçããŸããJava 8以éã§ã¯ãOptionalã¯ã©ã¹ãå°å
¥ãããnullå€ãæ±ãããã®æè»ãªæ段ãæäŸãããŠããŸãã
;C#:C#ã¯Nullå®å
šæ§ãæã¡ãŸããC# 8.0ããã¯ãNull蚱容åç
§åããµããŒããããããã«ãªããŸãããããã«ãããNullåç
§ã«å¯Ÿããåäœãæ瀺çã«æå®ããããšãã§ããŸãã
;Kotlin:Kotlinã¯Nullå®å
šæ§ãæã¡ãŸããKotlinã®å Žåãnullåç
§ãè¡ããšãNullPointerExceptionãçºçããŸããKotlinã§ã¯ãNullå®å
šæ§ã確ä¿ããããã«ãnull蚱容åãšããæŠå¿µãå°å
¥ãããŠããŸãã
;Scala:Scalaã¯Nullå®å
šæ§ãæã¡ãŸãããScalaã§ã¯ãnullã蚱容ããAnyRefåããããŸãããnullã蚱容ããªãAnyValåããããŸãã
;Swift:Swiftã¯Nullå®å
šæ§ãæã¡ãŸããSwiftã®å Žåãnilåç
§ãè¡ããšãå®è¡æãšã©ãŒãçºçããŸããSwiftã§ã¯ãOptionalåãšããæŠå¿µãå°å
¥ãããŠãããnilã蚱容ããå€ãæ±ãå Žåã«ã¯ãOptionalåã䜿çšããããšãæšå¥šãããŠããŸãã
;Go:Goã¯Nullå®å
šæ§ãæã¡ãŸãããGoã®å Žåãnilã蚱容ãããã€ã³ã¿åããããŸãããnilã«å¯Ÿããæäœãè¡ããšã©ã³ã¿ã€ã ãšã©ãŒãçºçããŸãã;
;Rust:Rustã®Nullå®å
šæ§: Rustã§ã¯ãnullå®å
šæ§ã«ã€ããŠãOption<T>åã䜿çšããŠè§£æ±ºããŠããŸããOption<T>åã¯ãå€ãååšããªãå Žåã«Noneãååšããå Žåã«Some<T>ãšããå€ãæã¡ãŸããããã«ãããnullã䜿çšããå¿
èŠããªããªããããã°ã©ã ãå®å
šã«ãªããŸããRustã®ã³ã³ãã€ã©ã¯ãNullå®å
šæ§ã«é¢ããåé¡ãæ€åºããããã°ã©ã ãã³ã³ãã€ã«ããåã«ãšã©ãŒãå ±åãããããéçºè
ã¯å®å¿ããŠããã°ã©ã ãäœæããããšãã§ããŸãã
;Zig:Zigã®Nullå®å
šæ§: Zigã§ã¯ãnullå®å
šæ§ã«ã€ããŠã?æŒç®åã䜿çšããŠè§£æ±ºããŠããŸãã?æŒç®åã¯ããšã©ãŒãçºçããå Žåã«nullãè¿ããŸãããŸããZigã§ã¯ãOption<T>åãååšããnullå®å
šæ§ãæ
ä¿ããããã«äœ¿çšãããŸããOption<T>åã¯ãRustã®Option<T>åãšäŒŒãŠããŸãããSome<T>ã®ä»£ããã«Nullable<T>ãšããå€ãæã¡ãŸãã
Nullå®å
šæ§ã«é¢ãããšã©ãŒã¯ãå®è¡æãšã©ãŒã«ãªãããšãå€ãããããã¹ãã§ã¯æ€åºã§ããªãå¯èœæ§ããããŸãã
ãããã£ãŠãããã°ã©ããŒã¯Nullå®å
šæ§ã«ã€ããŠã®ãã¹ããã©ã¯ãã£ã¹ãç解ããã³ãŒããæžãéã«é©åãªæ³šæãæãå¿
èŠããããŸãã
== Nullå®å
šæ§ãšã¯ïŒ ==
Nullå®å
šæ§ïŒNull SafetyïŒãšã¯ãããã°ã©ãã³ã°èšèªããã¬ãŒã ã¯ãŒã¯ã®èšèšãæ©èœã®äžéšã§ãããnullãã€ã³ã¿åç
§ãnullå€ã«é¢é£ããåé¡ãåé¿ããããã®æŠå¿µã§ããnullãã€ã³ã¿åç
§ãšã©ãŒã¯ãããã°ã©ã ãnullå€ãåç
§ããããšãããšãã«çºçããå¯èœæ§ããããšã©ãŒã§ããããã°ã©ã ãnullå€ãåç
§ããå Žåãéåžžã¯ã©ã³ã¿ã€ã ãšã©ãŒãçºçããäºæãã¬åäœãåŒãèµ·ããå¯èœæ§ããããŸãã
Nullå®å
šæ§ã®ç®çã¯ãããã°ã©ããŒãnullåç
§ãšã©ãŒãåé¿ããã³ãŒãã®å®å
šæ§ãåäžãããããšã§ããããã¯ãããã°ã©ã ã®å質ãä¿¡é Œæ§ãé«ããäžã§éèŠãªèŠçŽ ãšãªããŸãã
Nullå®å
šæ§ãå®çŸããæ¹æ³ã«ã¯ãããŸããŸãªã¢ãããŒãããããŸãããäž»ãªãã®ã¯ä»¥äžã®éãã§ãã
;åã·ã¹ãã ã®åŒ·å: äžéšã®èšèªã¯ãnull蚱容åãénullåãªã©ãnullå®å
šæ§ãèæ
®ããåãå°å
¥ããŠããŸããããã«ãããnullå€ã®æ±ããæ瀺çã«å¶åŸ¡ãããã³ã³ãã€ã©ãnullãã€ã³ã¿åç
§ãšã©ãŒãæ€åºã§ããããã«ãªããŸãã
;ãªãã·ã§ãã«åã®å°å
¥: ãªãã·ã§ãã«åã¯ãå€ãååšããªãå¯èœæ§ãããããšã瀺ãããã«äœ¿çšãããŸãããã®ãããªåã¯ãnullå€ãè¡šçŸããããã«ã䜿çšãããnullåç
§ãšã©ãŒãåé¿ããã®ã«åœ¹ç«ã¡ãŸãã
;éç解æããŒã«ã®äœ¿çš: éç解æããŒã«ã¯ãã³ãŒãã®è§£æãè¡ããnullåç
§ãšã©ãŒãæœåšçãªåé¡ãæ€åºããããšãã§ããŸããããã«ãããããã°ã©ããŒã¯åé¡ãäºåã«ç¹å®ããä¿®æ£ããããšãã§ããŸãã
Nullå®å
šæ§ã¯ãããã°ã©ãã³ã°èšèªããã¬ãŒã ã¯ãŒã¯ã®èšèšãæ©èœã®äžéšãšããŠåãå
¥ããããããšã§ãããã°ã©ã ã®å質ãåäžãããå®å
šæ§ã確ä¿ããããšãã§ããŸãã
=== Nullå®å
šã§ãªãã³ãŒãã®äŸ ===
Nullå®å
šã§ã¯ãªãã³ãŒãã®äŸã瀺ããŸãããã®äŸã§ã¯ãnullå€ãæ±ãéã«é©åãªãã§ãã¯ããã³ããªã³ã°ãè¡ãããŠããªããããnullåç
§ãšã©ãŒãçºçããå¯èœæ§ããããŸãã
:<syntaxhighlight lang=c++>
public class Main {
public static void main(String[] args) {
String name = null;
int length = name.length(); // nullåç
§ãšã©ãŒãçºçããå¯èœæ§ããã
System.out.println("Name length: " + length);
}
}
</syntaxhighlight>
ãã®äŸã§ã¯ãå€æ° <code>name</code> ã« null ã代å
¥ãããŠããŸãããããã«å¯Ÿãããã§ãã¯ãè¡ãããŠããŸããããã®ããã<code>name</code> ã® <code>length()</code> ã¡ãœãããåŒã³åºããšãnullåç
§ãšã©ãŒãçºçããå¯èœæ§ããããŸãã
Nullå®å
šæ§ã確ä¿ããããã«ã¯ã以äžã®ããã«é©åãªãã§ãã¯ããã³ããªã³ã°ãè¡ãå¿
èŠããããŸãã
:<syntaxhighlight lang=c++>
public class Main {
public static void main(String[] args) {
String name = null;
if (name != null) {
int length = name.length(); // nullãã§ãã¯ãè¡ã
System.out.println("Name length: " + length);
} else {
System.out.println("Name is null");
}
}
}
</syntaxhighlight>
ããã§ã¯ã<code>name</code> ã null ã§ãªãããšããã§ãã¯ããŠãã <code>length()</code> ã¡ãœãããåŒã³åºããŠããŸãããã <code>name</code> ã null ã®å Žåã¯ãé©åãªãšã©ãŒãã³ããªã³ã°ãè¡ã£ãŠããŸããããã«ãããnullåç
§ãšã©ãŒãåé¿ããããã°ã©ã ã®å®å
šæ§ãåäžãããããšãã§ããŸãã
=== Javaã£ãŠNULLåäœæŒç®åãªãã£ãã£ãïŒ ===
Javaã«ã¯ãC#ãKotlinãªã©ã®ä»ã®èšèªã«ãããããªãNULLåäœæŒç®åïŒnull coalescing operatorïŒã¯ååšããŸããã§ãããNULLåäœæŒç®åã¯ãnullãã§ãã¯ãè¡ãç絡æŒç®åã§ãããå·ŠåŽã®åŒãnullã§ããã°ä»£æ¿å€ãè¿ããŸãããã®ãããªæŒç®åã¯Javaã«ã¯çµã¿èŸŒãŸããŠãããã代ããã«æ¡ä»¶æŒç®åïŒternary operatorïŒãif-elseæãªã©ã䜿çšããŠnullãã§ãã¯ãšä»£æ¿å€ã®æå®ãè¡ãå¿
èŠããããŸãã
:<syntaxhighlight lang=c++>
String result = (name != null) ? name : "default";
</syntaxhighlight>
ããããJava 14ããã¯ãJEP 358ïŒãSwitch ExpressionsãïŒã«ãããswitchæãåŒãšããŠäœ¿çšå¯èœã«ãªããnullåäœæŒç®åã«äŒŒãæ©èœãæäŸããæ¹æ³ãå°å
¥ãããŸãããããã«ãããnullãã§ãã¯ãšä»£æ¿å€ã®æå®ãããç°¡æœã«è¡ãããšãã§ããŸãã
äŸãã°ã以äžã®ãããªã³ãŒããèããŠã¿ãŸãããã
:<syntaxhighlight lang=c++>
String result = switch (name) {
case null -> "default";
default -> name;
};
</syntaxhighlight>
ããã¯ã<code>name</code> ãnullã§ãªããã° <code>name</code> ãè¿ããnullã§ããã° "default" ãè¿ãæ¡ä»¶æŒç®åã䜿çšããäŸã§ããåãåäœãJava 14以éã®switchåŒã䜿çšããŠè¡ãããšãã§ããŸãã
ãã®ã³ãŒãã¯ã<code>name</code> ã®å€ãnullã§ããã° "default" ãè¿ãããã以å€ã®å Žå㯠<code>name</code> ãè¿ããŸããããã«ãããnullåäœæŒç®åã«è¿ãæåãå®çŸããããšãã§ããŸãã
== NULLå®å
šã§Javaãããçã«ããäžããçç±ã¯ïŒ ===
Javaãnullå®å
šæ§ã«é¢ããŠæ¹å€ãããçç±ã¯ããã€ããããŸãã
* æŽå²çãªçµç·¯: Javaã¯é·ãæŽå²ãæã€èšèªã§ãããåæã®ããŒãžã§ã³ã§ã¯nullå®å
šæ§ãèæ
®ãããŠããŸããã§ããããã®ãããå€ãã³ãŒãããŒã¹ã«ã¯nullãã€ã³ã¿åç
§ãšã©ãŒãå«ãŸããŠããå¯èœæ§ãé«ãããããã®åé¡ãä¿®æ£ããããšãé£ããå ŽåããããŸãã
* nullã®ããã©ã«ã蚱容: Javaã§ã¯ãã»ãšãã©ã®åç
§åã®å€æ°ã¯ããã©ã«ãã§nullã蚱容ããŸããããã¯ãnullãã€ã³ã¿åç
§ãšã©ãŒã®çºçãä¿é²ããå¯èœæ§ããããŸããä»ã®èšèªïŒäŸãã°ãKotlinãSwiftïŒã§ã¯ãnullå®å
šæ§ãèšèªä»æ§ã®äžéšãšããŠçµã¿èŸŒãŸããŠãããnull蚱容åãå°å
¥ãããŠããŸãã
* ãšã³ã·ã¹ãã ã®å€æ§æ§: Javaã®ãšã³ã·ã¹ãã ã¯éåžžã«åºç¯å²ã«ããããå€ãã®ç°ãªãã©ã€ãã©ãªããã¬ãŒã ã¯ãŒã¯ãååšããŸãããããã®å€æ§ãªã©ã€ãã©ãªã®äžã«ã¯ãnullãã€ã³ã¿åç
§ãšã©ãŒãåŒãèµ·ããå¯èœæ§ããããã®ããããŸãã
*
èšèªã®é²åã®é
ã: Javaã¯å€ãããã®èšèªã§ãããä»ã®æ°ããèšèªãšæ¯èŒããŠãèšèªã®é²åãæ¯èŒçé
ããŠããŸããæè¿ã®ããŒãžã§ã³ã§ããã€ãã®æ¹åãè¡ãããŸããããnullå®å
šæ§ã«é¢ããé©æ°çãªæ©èœã¯ãŸã äžè¶³ããŠãããšäžéšã®éçºè
ã«ã¯æããããŸãã
ãããã®çç±ãããJavaã¯nullå®å
šæ§ã«é¢ããåé¡ãããçã«æããããšããããŸããããããè¿å¹Žã®Javaã®ããŒãžã§ã³ã§ã¯ãnullå®å
šæ§ã«é¢ããæ¹åãé²ããããŠãããããã°ã©ããŒãããå®å
šãªã³ãŒããèšè¿°ããããã®ããŒã«ãæ©èœãæäŸãããŠããŸãã
=== Javaæå€ã«NULLå±éºãªèšèªã¯ïŒ ===
Java以å€ã«ããnullå®å
šæ§ã®åé¡ãé¡èãªèšèªããããŸãããããã®èšèªã§ã¯ãnullãã€ã³ã¿åç
§ãšã©ãŒãé »ç¹ã«çºçãããããéçºè
ã泚æãæããªããã°ãªããŸããã以äžã¯ãããã€ãã®äŸã§ãã
* C/C++: CèšèªãC++èšèªã§ã¯ããã€ã³ã¿ã䜿çšããéã«nullãã§ãã¯ãè¡ããªããšãnullãã€ã³ã¿åç
§ãšã©ãŒãçºçããå¯èœæ§ããããŸããç¹ã«ããã€ã³ã¿ãä»ããŠã¡ã¢ãªãæäœããå Žåã¯ãnullãã€ã³ã¿åç
§ãšã©ãŒã«æ³šæããå¿
èŠããããŸãã
* JavaScript: JavaScriptã¯åçåä»ãèšèªã§ãããnullãundefinedãé »ç¹ã«æ±ãããŸããç¹ã«ããªããžã§ã¯ãã®ããããã£ãã¡ãœãããžã®ã¢ã¯ã»ã¹æã«ã¯ãnullãundefinedã«å¯Ÿãããã§ãã¯ãå¿
èŠã§ãããããªããšãTypeErrorãçºçãããããªããŸãã
* Python: Pythonãåçåä»ãèšèªã§ãããnullã«çžåœããå€ã¯Noneã§ããNoneã¯ãé¢æ°ã®è¿ãå€ãèŸæžã®ããŒãšããŠäœ¿çšãããããšããããŸããããããNoneãé©åã«æ±ããªããšãAttributeErrorãTypeErrorãªã©ã®ãšã©ãŒãçºçããå¯èœæ§ããããŸãã
* Ruby: Rubyãåçåä»ãèšèªã§ãããnilãnullã«çžåœããŸããnilã¯ãã¡ãœããã®è¿ãå€ãå€æ°ã®åæå€ãšããŠäœ¿çšãããããšããããŸãããé©åã«ãã§ãã¯ãããªãå Žåã¯ãNoMethodErrorãªã©ã®ãšã©ãŒãçºçããå¯èœæ§ããããŸãã
ãããã®èšèªã§ã¯ãnullããã®é¡äŒŒå€ïŒNoneãnilãªã©ïŒãåºã䜿çšãããŠããŸãããé©åãªãã§ãã¯ããã³ããªã³ã°ãè¡ããªããšãnullãã€ã³ã¿åç
§ãšã©ãŒãçºçããå¯èœæ§ããããŸãããããã£ãŠãéçºè
ã¯ãããã®èšèªã§ã³ãŒãã£ã³ã°ããéã«ã¯ãnullå®å
šæ§ã«æ³šæãæãå¿
èŠããããŸãã
=== åçåã¥ãèšèªã¯NULLå±éºãšã¯éããŸãããïŒ ===
åçåä»ãèšèªãšnullã®å±éºæ§ã¯ãåãã§ã¯ãããŸããããããã€ãã®é¡äŒŒç¹ããããŸãã
åçåä»ãèšèªã§ã¯ãå€æ°ã®åãå®è¡æã«æ±ºå®ããããããéçåä»ãèšèªãšæ¯èŒããŠåã®äžæŽåãçºçãããããšããç¹åŸŽããããŸããããã¯ãã³ã³ãã€ã«æã«åã®æŽåæ§ããã§ãã¯ã§ããªããããå®è¡æã«åã®äžæŽåãçºçããå¯èœæ§ãé«ãŸããŸãã
äžæ¹ãnullã¯å€ã®äžåšãè¡šãããã®ç¹å¥ãªå€ã§ãããéçåä»ãèšèªã§ãåçåä»ãèšèªã§ã䜿çšãããŸããããããåçåä»ãèšèªã§ã¯ãå€æ°ã®åãå®è¡æã«æ±ºå®ããããããnullã®æ±ããéçåä»ãèšèªãããæè»ã§ãããnullãæåŸ
ãããå Žæã«æž¡ãããããè¿ãããããšããããŸãããã®ãããnullã®å±éºæ§ãéçåä»ãèšèªãããé«ããªãããšããããŸãã
åçåä»ãèšèªã§ã¯ãåã®äžæŽåãnullã®æ±ãã«é¢ããåé¡ãã©ã³ã¿ã€ã ãšã©ãŒãšããŠæããããšãäžè¬çã§ããéçåä»ãèšèªã§ã¯ããããã®åé¡ãã³ã³ãã€ã«æã«æ€åºããããåŸåããããŸãã
ãããã£ãŠãåçåä»ãèšèªãšnullã®å±éºæ§ã¯å¯æ¥ã«é¢é£ããŠããŸãããå³å¯ã«ã¯ç°ãªãæŠå¿µã§ãããããããã®èšèªã®ç¹æ§ãèšèšã«å¿ããŠé©åãªãã³ããªã³ã°ãå¿
èŠã§ãã
== ãŠãŒã¹ã±ãŒã¹ ==
Nullå®å
šæ§ã®ãŠãŒã¹ã±ãŒã¹ã¯ãããã°ã©ãã³ã°ã®ããŸããŸãªåŽé¢ã§èŠãããŸãã以äžã«ããã®äžéšãæããŠã¿ãŸãã
ããã°ã©ã ã®å®å
šæ§ã®åäž: Nullå®å
šæ§ãå°å
¥ããããšã§ãnullãã€ã³ã¿åç
§ãšã©ãŒãåé¿ããããã°ã©ã ã®å®å
šæ§ãåäžãããããšãã§ããŸããããã«ãããå®è¡æã«äºæãã¬äŸå€ãçºçãããªã¹ã¯ãäœæžããããã°ã©ã ã®ä¿¡é Œæ§ãé«ããããšãã§ããŸãã
;ã³ãŒãã®ä¿å®æ§ã®åäž: Nullå®å
šæ§ã確ä¿ããããšã§ãã³ãŒãã®ä¿å®æ§ãåäžããŸããnullãã€ã³ã¿åç
§ãšã©ãŒãçºçããªããããã³ãŒãã®ä¿®æ£ãå€æŽã容æã«ãªããŸãããŸããnullå®å
šæ§ãæèããèšèšã«ãããã³ãŒãã®æå³ãæ確ã«ãªããä»ã®éçºè
ãç解ãããããªããŸãã
;APIã®èšèš: APIãèšèšããéã«ã¯ãnullå®å
šæ§ãèæ
®ããããšãéèŠã§ããnullå®å
šãªAPIãæäŸããããšã§ãå©çšè
ãäºæãã¬ãšã©ãŒãåé¿ãããããªããŸãããŸããAPIã®ããã¥ã¡ã³ãã«nullå®å
šæ§ã«é¢ããæ
å ±ãæ瀺ããããšã§ãå©çšè
ã«å®å¿æãäžããããšãã§ããŸãã
;ããŒã¿ããŒã¹æäœ: ããŒã¿ããŒã¹æäœã«ãããŠããnullå®å
šæ§ãèæ
®ããããšãéèŠã§ããnullå€ãæ±ãéã«ã¯ãé©åãªãšã©ãŒãã³ããªã³ã°ã代æ¿å€ã®æäŸãªã©ãå¿
èŠãšãªããŸãããŸããORMïŒObject-Relational MappingïŒããŒã«ã䜿çšããå Žåããnullå®å
šæ§ãèæ
®ãããããã³ã°ãå¿
èŠã§ãã
;ãŠãŒã¶ãŒå
¥åã®æ€èšŒ: ãŠãŒã¶ãŒããã®å
¥åããŒã¿ãåŠçããéã«ã¯ãnullå®å
šæ§ã確ä¿ããããšãéèŠã§ãããŠãŒã¶ãŒå
¥åãnullã§ããå Žåã«é©åã«åŠçããããšã§ãã»ãã¥ãªãã£äžã®ãªã¹ã¯ã軜æžããå®å
šãªã¢ããªã±ãŒã·ã§ã³ãæäŸããããšãã§ããŸãã
ãããã®ãŠãŒã¹ã±ãŒã¹ã¯ãããã°ã©ãã³ã°ã«ãããnullå®å
šæ§ã®éèŠæ§ãšããã®é©çšç¯å²ã瀺ããŠããŸããnullå®å
šæ§ãèæ
®ããããšã§ãããã°ã©ã ã®å®å
šæ§ãä¿å®æ§ãããã³ä¿¡é Œæ§ãåäžãããããšãã§ããŸãã
=== Nullå®å
šæ§ã®ãããªãããã¯ã¯ä»ã«ãããŸãããïŒ ===
Nullå®å
šæ§ã«é¢é£ãããããã¯ä»¥å€ã«ããããã°ã©ãã³ã°ã«ãããå®å
šæ§ãä¿¡é Œæ§ã«é¢é£ããããŸããŸãªãããã¯ããããŸããããã€ãã®äŸãæãããšã
;åå®å
šæ§ïŒType SafetyïŒ: åå®å
šæ§ã¯ãããã°ã©ã ãåã®æŽåæ§ãç¶æããããšã§ãå®è¡æã®ãšã©ãŒããã°ãæžããããã®æŠå¿µã§ããéçåä»ãèšèªã§ã¯ãã³ã³ãã€ã«æã«åã®æŽåæ§ãæ€æ»ããããããåå®å
šæ§ãé«ããªããŸãã
;ã¡ã¢ãªå®å
šæ§ïŒMemory SafetyïŒ: ã¡ã¢ãªå®å
šæ§ã¯ãããã°ã©ã ãã¡ã¢ãªãæ£ããã¢ã¯ã»ã¹ããã¡ã¢ãªãªãŒã¯ãã»ã°ã¡ã³ããŒã·ã§ã³éåãªã©ã®ã¡ã¢ãªé¢é£ã®ãšã©ãŒãåé¿ããããšãæããŸããã¬ããŒãžã³ã¬ã¯ã·ã§ã³ããã€ã³ã¿ãŒã®å®å
šãªäœ¿çšãªã©ãã¡ã¢ãªå®å
šæ§ãåäžãããææ³ã§ãã
;ã¹ã¬ããå®å
šæ§ïŒThread SafetyïŒ: ã¹ã¬ããå®å
šæ§ã¯ãè€æ°ã®ã¹ã¬ããããåæã«ã¢ã¯ã»ã¹ããããšãã«ãããŒã¿ç«¶åãåæã®åé¡ãåé¿ããããã®æŠå¿µã§ããããã¯ããã¥ãŒããã¯ã¹ãªã©ã®åæã¡ã«ããºã ã䜿çšããŠãã¹ã¬ããå®å
šæ§ã確ä¿ããŸãã
;ã»ãã¥ãªãã£: ã»ãã¥ãªãã£ã¯ãæªæã®ããæ»æãããŒã¿æŒæŽ©ããã·ã¹ãã ãããŒã¿ãä¿è·ããããã®æŠå¿µã§ããå
¥åæ€èšŒãæå·åãã¢ã¯ã»ã¹å¶åŸ¡ãªã©ã®ã»ãã¥ãªãã£å¯ŸçãåãããŸãã
;ãšã©ãŒãã³ããªã³ã°: ãšã©ãŒãã³ããªã³ã°ã¯ãããã°ã©ã ãç°åžžç¶æ
ããšã©ãŒãé©åã«åŠçããããã®ææ³ã§ããé©åãªãšã©ãŒã¡ãã»ãŒãžã®è¡šç€ºãäŸå€ã®ãã£ããããã°ã®èšé²ãªã©ããšã©ãŒãã³ããªã³ã°ã®äžç°ã§ãã
ãããã®ãããã¯ã¯ãããã°ã©ã ã®å®å
šæ§ãä¿¡é Œæ§ãåäžãããããã«éèŠãªèãæ¹ãææ³ã§ããããã°ã©ãã³ã°ã«ãããŠããããã®ãããã¯ãç解ããé©åã«é©çšããããšãéèŠã§ãã
::é
ç®ãæ¹ããŠå·çããŸã
== ãã¹ããã©ã¯ãã£ã¹ ==
Nullå®å
šæ§ã確ä¿ããããã®ãã¹ããã©ã¯ãã£ã¹ã¯ã以äžã®ãããªãã®ããããŸãã
*null蚱容åã®æ瀺çãªäœ¿çš: null蚱容åã䜿çšããŠãnullå¯èœãªå€æ°ããã©ã¡ãŒã¿ãæ瀺çã«æå®ããŸããããã«ãããnullå€ãäºæãããå Žåãšäºæãããªãå Žåãæ確ã«åºå¥ããã³ãŒãã®å®å
šæ§ãåäžãããããšãã§ããŸãã
*ãªãã·ã§ã³åãMaybeåã®æŽ»çš: ãªãã·ã§ã³åãMaybeåãªã©ã®ããŒã¿æ§é ã掻çšããŠãå€ã®ååšããªãå¯èœæ§ãè¡šçŸããŸããããã«ãããnullåç
§ãšã©ãŒãåé¿ããããã°ã©ã ã®å®å
šæ§ã確ä¿ããããšãã§ããŸãã
*nullå€ã®ä»£æ¿æ段ã®æ€èš: nullå€ãå¿
èŠãªå Žåã§ãã代æ¿æ段ãæ€èšããŸããããšãã°ã空ã®ã³ã¬ã¯ã·ã§ã³ãããã©ã«ãå€ã䜿çšããããšã§ãnullåç
§ãšã©ãŒãåé¿ãããããªããŸãã
*æ¡ä»¶åå²ããšã©ãŒãã§ãã¯ã®å®è£
: nullå€ãæ±ãéã«ã¯ãé©åãªæ¡ä»¶åå²ããšã©ãŒãã§ãã¯ãå®è£
ããŸããnullå€ãçºçããå Žåã«ã¯ãé©åãªãšã©ãŒãã³ããªã³ã°ãè¡ããããã°ã©ã ã®å®å
šæ§ã確ä¿ããŸãã
*éç解æããŒã«ã®å©çš: éç解æããŒã«ã䜿çšããŠãnullå®å
šæ§ã確èªããŸããããã«ãããã³ã³ãã€ã«æã«nullåç
§ãšã©ãŒãæ€åºããåé¡ãæ©æã«çºèŠããããšãã§ããŸãã
*ããã¥ã¡ã³ãã®äœæãšå
±æ: nullå®å
šæ§ã«é¢ããæ
å ±ãããã¥ã¡ã³ãåããéçºè
éã§å
±æããŸããAPIãé¢æ°ã®ããã¥ã¡ã³ãã«ã¯ãnullå€ã®æ±ããå®å
šãªäœ¿çšæ¹æ³ã«ã€ããŠæ確ã«èšèŒããŸãã
*ãã¹ãã®å®æœ: nullå€ãå«ãããŸããŸãªã·ããªãªã§ãã¹ããå®æœããnullå®å
šæ§ã確èªããŸãããŠããããã¹ããçµ±åãã¹ãã掻çšããŠãããã°ã©ã ã®å®å
šæ§ãæ€èšŒããŸãã
ãããã®ãã¹ããã©ã¯ãã£ã¹ãéµå®ããããšã§ãããã°ã©ã ã®nullå®å
šæ§ã確ä¿ããå®å
šã§ä¿¡é Œæ§ã®é«ãã³ãŒããéçºããããšãã§ããŸãã
[[ã«ããŽãª:ããã°ã©ãã³ã°]] | 2023-03-05T06:53:35Z | 2024-01-26T03:54:49Z | [] | https://ja.wikibooks.org/wiki/%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0/Null%E5%AE%89%E5%85%A8%E6%80%A7 |
37,111 | ããã°ã©ãã³ã°/åæšè« | åæšè«(Type Inference)ã¯ãããã°ã©ãã³ã°èšèªã«ãããŠãå€æ°ãåŒã®åãæ瀺çã«æå®ããã«ãã³ã³ãã€ã©ãã€ã³ã¿ããªã¿ããã®åãæšæž¬ããæ©èœã§ããåæšè«ã«ãããããã°ã©ãã¯ã³ãŒããç°¡æœã«æžãããšãã§ããåæã«åå®å
šæ§ãä¿èšŒã§ããŸãã
åæšè«ã¯ãéçåä»ãèšèªãåçåä»ãèšèªã®äž¡æ¹ã§å©çšãããŸãããç¹ã«éçåä»ãèšèªã§ãã䜿çšãããŸããéçåä»ãèšèªã§ã¯ãå€æ°ãé¢æ°ã®åãã³ã³ãã€ã«æã«æ±ºå®ããããããåæšè«ã¯åã®åé·ãªæå®ãçç¥ããã³ãŒãã®å¯èªæ§ãåäžãããŸãã
åæšè«ã®æ©èœã¯èšèªããšã«ç°ãªããŸãããäžè¬çã«ã¯ä»¥äžã®ãããªææ³ã䜿ãããŸãã
åæšè«ã®å©ç¹ã¯å€å²ã«ããããŸãããŸã第äžã«ãã³ãŒãã®èšè¿°éãæžãããã¿ã€ããã¹ãåäžäžèŽã«ãããã°ãæžããããšãã§ããŸããããã«ãåã®æšè«ã«ãããåå®å
šæ§ãåäžããã³ãŒãã®å質ãåäžããŸãããã ããåæšè«ãè€éãªå Žåãã³ã³ãã€ã«æéãé·ããªãå ŽåããããŸãããŸããæšè«ãããåãæå³ããªããã®ã«ãªãããšããããŸãã®ã§ãããã°ã©ãã¯æ³šæãå¿
èŠã§ãã
åæšè«ãå®è£
ããããã°ã©ãã³ã°èšèªã«ã¯ããŸããŸãªã¢ã«ãŽãªãºã ããããŸãã 以äžã«ããã€ãã®ä»£è¡šçãªã¢ã«ãŽãªãºã ãšãããæ¡çšããŠããèšèªã瀺ããŸãã
ãããã®ã¢ã«ãŽãªãºã ã¯ãéçåä»ãèšèªã«ãããŠäžè¬çã«äœ¿çšãããŠãããããããç°ãªãç¹æ§ãå©ç¹ãæã£ãŠããŸãã
äŸãã°ãHindley-Milneråæšè«ã¯åçžåã®æšè«ã«åªããŠãããAlgorithm Wã¯ãã®ç¹æ®ãªã±ãŒã¹ãæ±ãããšãã§ããŸã
ãäžæ¹ãBidirectionalåæšè«ã¯ãããæè»ãªåã·ã¹ãã ãæäŸããããã«ãåæ¹åãšåŸæ¹åã®ãã§ãŒãºãçµã¿åãããŠããŸãã
以äžã«ãåèšèªããšã«ã³ãŒãäŸãšãã®åæšè«ã¢ã«ãŽãªãºã ã解説ããŸãã
Haskellã§ã¯ãé¢æ°ã®åŒæ°ãæ»ãå€ã®åãæå®ããããšãªããã³ã³ãã€ã©ãèªåçã«åãæšè«ããŸãã
OCamlã®åæšè«ã§ã¯ãå€æ°ã«å¯ŸããŠåãæ瀺çã«æå®ããå¿
èŠã¯ãããŸããã
C++ã§ã¯ãautoããŒã¯ãŒãã䜿çšããŠãå€æ°ã®åãæšè«ããããšãã§ããŸãã
Rustã§ã¯ãå€æ°ã®åãæå®ããããšãªããã³ã³ãã€ã©ãèªåçã«åãæšè«ããŸãã
TypeScriptã¯éçåä»ãèšèªã§ãããå€æ°ã®åãæå®ããå¿
èŠããããŸãããåæšè«ã«ããã³ã³ãã€ã©ãèªåçã«åãæšè«ããããšãã§ããŸãã
Scalaã¯éçåä»ãèšèªã§ãããå€æ°ã®åãæå®ããå¿
èŠããããŸãããåæšè«ã«ããã³ã³ãã€ã©ãèªåçã«åãæšè«ããããšãã§ããŸãã
Kotlinã¯éçåä»ãèšèªã§ãããå€æ°ã®åãæå®ããå¿
èŠããããŸãããåæšè«ã«ããã³ã³ãã€ã©ãèªåçã«åãæšè«ããããšãã§ããŸãã
Swiftã§ã¯ãå€æ°ã«å¯ŸããŠæ瀺çã«åãæå®ããããšãã§ããŸãããéåžžã¯å¿
èŠãããŸããã
Goã§ããå€æ°ã®åãæ瀺çã«æå®ããããšãã§ããŸãããéåžžã¯å¿
èŠãããŸããã
Zigã§ããå€æ°ã®åãæ瀺çã«æå®ããããšãã§ããŸãããéåžžã¯å¿
èŠãããŸããã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "åæšè«(Type Inference)ã¯ãããã°ã©ãã³ã°èšèªã«ãããŠãå€æ°ãåŒã®åãæ瀺çã«æå®ããã«ãã³ã³ãã€ã©ãã€ã³ã¿ããªã¿ããã®åãæšæž¬ããæ©èœã§ããåæšè«ã«ãããããã°ã©ãã¯ã³ãŒããç°¡æœã«æžãããšãã§ããåæã«åå®å
šæ§ãä¿èšŒã§ããŸãã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "åæšè«ã¯ãéçåä»ãèšèªãåçåä»ãèšèªã®äž¡æ¹ã§å©çšãããŸãããç¹ã«éçåä»ãèšèªã§ãã䜿çšãããŸããéçåä»ãèšèªã§ã¯ãå€æ°ãé¢æ°ã®åãã³ã³ãã€ã«æã«æ±ºå®ããããããåæšè«ã¯åã®åé·ãªæå®ãçç¥ããã³ãŒãã®å¯èªæ§ãåäžãããŸãã",
"title": ""
},
{
"paragraph_id": 2,
"tag": "p",
"text": "åæšè«ã®æ©èœã¯èšèªããšã«ç°ãªããŸãããäžè¬çã«ã¯ä»¥äžã®ãããªææ³ã䜿ãããŸãã",
"title": ""
},
{
"paragraph_id": 3,
"tag": "p",
"text": "åæšè«ã®å©ç¹ã¯å€å²ã«ããããŸãããŸã第äžã«ãã³ãŒãã®èšè¿°éãæžãããã¿ã€ããã¹ãåäžäžèŽã«ãããã°ãæžããããšãã§ããŸããããã«ãåã®æšè«ã«ãããåå®å
šæ§ãåäžããã³ãŒãã®å質ãåäžããŸãããã ããåæšè«ãè€éãªå Žåãã³ã³ãã€ã«æéãé·ããªãå ŽåããããŸãããŸããæšè«ãããåãæå³ããªããã®ã«ãªãããšããããŸãã®ã§ãããã°ã©ãã¯æ³šæãå¿
èŠã§ãã",
"title": ""
},
{
"paragraph_id": 4,
"tag": "p",
"text": "",
"title": ""
},
{
"paragraph_id": 5,
"tag": "p",
"text": "åæšè«ãå®è£
ããããã°ã©ãã³ã°èšèªã«ã¯ããŸããŸãªã¢ã«ãŽãªãºã ããããŸãã 以äžã«ããã€ãã®ä»£è¡šçãªã¢ã«ãŽãªãºã ãšãããæ¡çšããŠããèšèªã瀺ããŸãã",
"title": "åæšè«ãšããã°ã©ãã³ã°èšèª"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "ãããã®ã¢ã«ãŽãªãºã ã¯ãéçåä»ãèšèªã«ãããŠäžè¬çã«äœ¿çšãããŠãããããããç°ãªãç¹æ§ãå©ç¹ãæã£ãŠããŸãã",
"title": "åæšè«ãšããã°ã©ãã³ã°èšèª"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "äŸãã°ãHindley-Milneråæšè«ã¯åçžåã®æšè«ã«åªããŠãããAlgorithm Wã¯ãã®ç¹æ®ãªã±ãŒã¹ãæ±ãããšãã§ããŸã",
"title": "åæšè«ãšããã°ã©ãã³ã°èšèª"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "ãäžæ¹ãBidirectionalåæšè«ã¯ãããæè»ãªåã·ã¹ãã ãæäŸããããã«ãåæ¹åãšåŸæ¹åã®ãã§ãŒãºãçµã¿åãããŠããŸãã",
"title": "åæšè«ãšããã°ã©ãã³ã°èšèª"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "以äžã«ãåèšèªããšã«ã³ãŒãäŸãšãã®åæšè«ã¢ã«ãŽãªãºã ã解説ããŸãã",
"title": "åæšè«ãšããã°ã©ãã³ã°èšèª"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "Haskellã§ã¯ãé¢æ°ã®åŒæ°ãæ»ãå€ã®åãæå®ããããšãªããã³ã³ãã€ã©ãèªåçã«åãæšè«ããŸãã",
"title": "åæšè«ãšããã°ã©ãã³ã°èšèª"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "OCamlã®åæšè«ã§ã¯ãå€æ°ã«å¯ŸããŠåãæ瀺çã«æå®ããå¿
èŠã¯ãããŸããã",
"title": "åæšè«ãšããã°ã©ãã³ã°èšèª"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "C++ã§ã¯ãautoããŒã¯ãŒãã䜿çšããŠãå€æ°ã®åãæšè«ããããšãã§ããŸãã",
"title": "åæšè«ãšããã°ã©ãã³ã°èšèª"
},
{
"paragraph_id": 13,
"tag": "p",
"text": "Rustã§ã¯ãå€æ°ã®åãæå®ããããšãªããã³ã³ãã€ã©ãèªåçã«åãæšè«ããŸãã",
"title": "åæšè«ãšããã°ã©ãã³ã°èšèª"
},
{
"paragraph_id": 14,
"tag": "p",
"text": "TypeScriptã¯éçåä»ãèšèªã§ãããå€æ°ã®åãæå®ããå¿
èŠããããŸãããåæšè«ã«ããã³ã³ãã€ã©ãèªåçã«åãæšè«ããããšãã§ããŸãã",
"title": "åæšè«ãšããã°ã©ãã³ã°èšèª"
},
{
"paragraph_id": 15,
"tag": "p",
"text": "Scalaã¯éçåä»ãèšèªã§ãããå€æ°ã®åãæå®ããå¿
èŠããããŸãããåæšè«ã«ããã³ã³ãã€ã©ãèªåçã«åãæšè«ããããšãã§ããŸãã",
"title": "åæšè«ãšããã°ã©ãã³ã°èšèª"
},
{
"paragraph_id": 16,
"tag": "p",
"text": "Kotlinã¯éçåä»ãèšèªã§ãããå€æ°ã®åãæå®ããå¿
èŠããããŸãããåæšè«ã«ããã³ã³ãã€ã©ãèªåçã«åãæšè«ããããšãã§ããŸãã",
"title": "åæšè«ãšããã°ã©ãã³ã°èšèª"
},
{
"paragraph_id": 17,
"tag": "p",
"text": "Swiftã§ã¯ãå€æ°ã«å¯ŸããŠæ瀺çã«åãæå®ããããšãã§ããŸãããéåžžã¯å¿
èŠãããŸããã",
"title": "åæšè«ãšããã°ã©ãã³ã°èšèª"
},
{
"paragraph_id": 18,
"tag": "p",
"text": "Goã§ããå€æ°ã®åãæ瀺çã«æå®ããããšãã§ããŸãããéåžžã¯å¿
èŠãããŸããã",
"title": "åæšè«ãšããã°ã©ãã³ã°èšèª"
},
{
"paragraph_id": 19,
"tag": "p",
"text": "Zigã§ããå€æ°ã®åãæ瀺çã«æå®ããããšãã§ããŸãããéåžžã¯å¿
èŠãããŸããã",
"title": "åæšè«ãšããã°ã©ãã³ã°èšèª"
}
] | åæšè«ã¯ãããã°ã©ãã³ã°èšèªã«ãããŠãå€æ°ãåŒã®åãæ瀺çã«æå®ããã«ãã³ã³ãã€ã©ãã€ã³ã¿ããªã¿ããã®åãæšæž¬ããæ©èœã§ããåæšè«ã«ãããããã°ã©ãã¯ã³ãŒããç°¡æœã«æžãããšãã§ããåæã«åå®å
šæ§ãä¿èšŒã§ããŸãã åæšè«ã¯ãéçåä»ãèšèªãåçåä»ãèšèªã®äž¡æ¹ã§å©çšãããŸãããç¹ã«éçåä»ãèšèªã§ãã䜿çšãããŸããéçåä»ãèšèªã§ã¯ãå€æ°ãé¢æ°ã®åãã³ã³ãã€ã«æã«æ±ºå®ããããããåæšè«ã¯åã®åé·ãªæå®ãçç¥ããã³ãŒãã®å¯èªæ§ãåäžãããŸãã åæšè«ã®æ©èœã¯èšèªããšã«ç°ãªããŸãããäžè¬çã«ã¯ä»¥äžã®ãããªææ³ã䜿ãããŸãã åæšè«ã®å©ç¹ã¯å€å²ã«ããããŸãããŸã第äžã«ãã³ãŒãã®èšè¿°éãæžãããã¿ã€ããã¹ãåäžäžèŽã«ãããã°ãæžããããšãã§ããŸããããã«ãåã®æšè«ã«ãããåå®å
šæ§ãåäžããã³ãŒãã®å質ãåäžããŸãããã ããåæšè«ãè€éãªå Žåãã³ã³ãã€ã«æéãé·ããªãå ŽåããããŸãããŸããæšè«ãããåãæå³ããªããã®ã«ãªãããšããããŸãã®ã§ãããã°ã©ãã¯æ³šæãå¿
èŠã§ãã | åæšè«ïŒType InferenceïŒã¯ãããã°ã©ãã³ã°èšèªã«ãããŠãå€æ°ãåŒã®åãæ瀺çã«æå®ããã«ãã³ã³ãã€ã©ãã€ã³ã¿ããªã¿ããã®åãæšæž¬ããæ©èœã§ããåæšè«ã«ãããããã°ã©ãã¯ã³ãŒããç°¡æœã«æžãããšãã§ããåæã«åå®å
šæ§ãä¿èšŒã§ããŸãã
åæšè«ã¯ãéçåä»ãèšèªãåçåä»ãèšèªã®äž¡æ¹ã§å©çšãããŸãããç¹ã«éçåä»ãèšèªã§ãã䜿çšãããŸããéçåä»ãèšèªã§ã¯ãå€æ°ãé¢æ°ã®åãã³ã³ãã€ã«æã«æ±ºå®ããããããåæšè«ã¯åã®åé·ãªæå®ãçç¥ããã³ãŒãã®å¯èªæ§ãåäžãããŸãã
åæšè«ã®æ©èœã¯èšèªããšã«ç°ãªããŸãããäžè¬çã«ã¯ä»¥äžã®ãããªææ³ã䜿ãããŸãã
;ãã³ãã«åºã¥ãæšè«ïŒType HintingïŒ:ããã°ã©ããåã®ãã³ããäžããããšã§ãã³ã³ãã€ã©ãã€ã³ã¿ããªã¿ããã®åãæšè«ããŸããããã«ãããåã®äžéšãæ瀺çã«æå®ããªãããåã®æšè«ããµããŒãããããšãã§ããŸãã
;å¶çŽããŒã¹ã®åæšè«ïŒConstraint-Based Type InferenceïŒ:å¶çŽãœã«ããŒã䜿çšããŠãå€æ°ãåŒã®åã«é¢ããå¶çŽã解決ããæé©ãªåãæšè«ããŸããå¶çŽããŒã¹ã®åæšè«ã¯ãHindley-Milneråã·ã¹ãã ãªã©ã®å€ãã®åæšè«ã¢ã«ãŽãªãºã ã§äœ¿çšãããŸãã
;ãŠããã£ã±ãŒã·ã§ã³ããŒã¹ã®åæšè«ïŒUnification-Based Type InferenceïŒ:åã®çåŒå¶çŽã解ãããã«ããŠããã£ã±ãŒã·ã§ã³ã¢ã«ãŽãªãºã ã䜿çšããŸãããã®ææ³ã¯ãPrologãªã©ã®è«çããã°ã©ãã³ã°èšèªããMLç³»èšèªãªã©ã§äœ¿çšãããŸãã
åæšè«ã®å©ç¹ã¯å€å²ã«ããããŸãããŸã第äžã«ãã³ãŒãã®èšè¿°éãæžãããã¿ã€ããã¹ãåäžäžèŽã«ãããã°ãæžããããšãã§ããŸããããã«ãåã®æšè«ã«ãããåå®å
šæ§ãåäžããã³ãŒãã®å質ãåäžããŸãããã ããåæšè«ãè€éãªå Žåãã³ã³ãã€ã«æéãé·ããªãå ŽåããããŸãããŸããæšè«ãããåãæå³ããªããã®ã«ãªãããšããããŸãã®ã§ãããã°ã©ãã¯æ³šæãå¿
èŠã§ãã
== åæšè«ãšããã°ã©ãã³ã°èšèª ==
åæšè«ãå®è£
ããããã°ã©ãã³ã°èšèªã«ã¯ããŸããŸãªã¢ã«ãŽãªãºã ããããŸãã
以äžã«ããã€ãã®ä»£è¡šçãªã¢ã«ãŽãªãºã ãšãããæ¡çšããŠããèšèªã瀺ããŸãã
;Hindley-Milneråæšè«:
:;äž»ãªç¹åŸŽ: å€ãã®éçåä»ãèšèªã§æ¡çšãããŠãããåçžåïŒmonomorphic typeïŒã®æšè«ã«äœ¿çšãããã
:;å®è£
äŸ: MLç³»èšèªïŒStandard MLãOCamlïŒãHaskellãScalaïŒäžéšïŒ
;Damas-Hindley-Milneråæšè«:
:;äž»ãªç¹åŸŽ: Hindley-Milneråæšè«ãæ¡åŒµããå€çžåïŒpolymorphic typeïŒã®æšè«ãè¡ãã
:;å®è£
äŸ: HaskellãMLtonãMiranda
;Algorithm W:
:;äž»ãªç¹åŸŽ: Hindley-Milneråæšè«ã®ç¹æ®ãªã±ãŒã¹ã§ãããå€æ°ã®äžè¬åïŒgeneralizationïŒãšåäžåïŒunificationïŒãè¡ãã
:;å®è£
äŸ: MLç³»èšèªïŒStandard MLãOCamlïŒãHaskellãScala
;Bidirectionalåæšè«:
:;äž»ãªç¹åŸŽ: åã®æšè«ãåæ¹åãšåŸæ¹åã®2ã€ã®ãã§ãŒãºã«åããããæè»ãªåæšè«ãå¯èœã«ããã
:;å®è£
äŸ: TypeScriptãScalaãPurescript
ãããã®ã¢ã«ãŽãªãºã ã¯ãéçåä»ãèšèªã«ãããŠäžè¬çã«äœ¿çšãããŠãããããããç°ãªãç¹æ§ãå©ç¹ãæã£ãŠããŸãã
äŸãã°ãHindley-Milneråæšè«ã¯åçžåã®æšè«ã«åªããŠãããAlgorithm Wã¯ãã®ç¹æ®ãªã±ãŒã¹ãæ±ãããšãã§ããŸã
ãäžæ¹ãBidirectionalåæšè«ã¯ãããæè»ãªåã·ã¹ãã ãæäŸããããã«ãåæ¹åãšåŸæ¹åã®ãã§ãŒãºãçµã¿åãããŠããŸãã
=== èšèªã®åæšè«ãã®ã¢ã«ãŽãªãºã ===
以äžã«ãåèšèªããšã«ã³ãŒãäŸãšãã®åæšè«ã¢ã«ãŽãªãºã ã解説ããŸãã
# Haskell (Hindley-Milneråæšè«):
:<syntaxhighlight lang=haskell>
-- é¢æ°ã®äŸ
add x y = x + y
</syntaxhighlight>
#:ãã®äŸã§ã¯ãé¢æ° <code>add</code> ã®åãæšè«ããŸããHindley-Milneråæšè«ã«ããã<code>x</code> ãš <code>y</code> ã®åãæ°å€åã§ããããšãæšè«ãããé¢æ°ã®å㯠<code>Num a => a -> a -> a</code> ãšãªããŸããããã§ã<code>Num a =></code> ã¯åã¯ã©ã¹å¶çŽã瀺ãã<code>a</code> ã¯'''ä»»æã®æ°å€å'''ãè¡šããŸãããã®æšè«ã¯ãå€æ°ãåŒã®åãå©çšããŠãæãäžè¬çãªåãæšæž¬ããããšã§è¡ãããŸãã
# Scala (Hindley-Milneråæšè«ã®äžéšã䜿çš):
:<syntaxhighlight lang=haskell>
// é¢æ°ã®äŸ
def add(x: Int, y: Int) = x + y
</syntaxhighlight>
#:Scalaã§ã¯ãäžéšã®å Žåã«Hindley-Milneråæšè«ã䜿çšãããŸããããã®ä»ã®å Žåã«ã¯ããè€éãªåæšè«ã¢ã«ãŽãªãºã ã䜿çšãããŸãããã®äŸã§ã¯ãé¢æ° <code>add</code> ã®åŒæ° <code>x</code> ãš <code>y</code> ã®åã <code>Int</code> ã§ããããšãæ瀺ãããŠããŸãããã®ããããã®é¢æ°ã®å㯠<code>Int => Int => Int</code> ãšæšè«ãããŸãããã®æšè«ã¯ãåŒã®åãåã¢ãããŒã·ã§ã³ã䜿çšããŠè¡ãããŸãã
# TypeScript (Bidirectionalåæšè«):
:<syntaxhighlight lang=haskell>
// é¢æ°ã®äŸ
function add(x, y) {
return x + y;
}
</syntaxhighlight>
#:TypeScriptã§ã¯ãBidirectionalåæšè«ã䜿çšãããŸãããã®äŸã§ã¯ãé¢æ° <code>add</code> ã®åŒæ° <code>x</code> ãš <code>y</code> ã®åãæ瀺ãããŠããŸããããé¢æ°å
ã§ã®æŒç® <code>x + y</code> ãããåŒæ°ã®åãæ°å€ã§ããããšãæšæž¬ãããŸãããã®ããããã®é¢æ°ã®å㯠<code>(x: number, y: number) => number</code> ãšæšè«ãããŸãããã®æšè«ã¯ãé¢æ°ã®åŒã³åºãå
ãé¢æ°å
ã®åŒã䜿çšããŠè¡ãããŸãã
:<syntaxhighlight lang=ts>
-- é¢æ°ã®äŸ
add x y = x + y
</syntaxhighlight>
----
=== Haskell ===
[[Haskell]]ã§ã¯ãé¢æ°ã®åŒæ°ãæ»ãå€ã®åãæå®ããããšãªããã³ã³ãã€ã©ãèªåçã«åãæšè«ããŸãã
;Haskellã®åæšè«ã®äŸ:<syntaxhighlight lang=haskell>
-- ãªã¹ãã®åæšè«ã®äŸ
myList = [1, 2, 3, 4, 5] -- myListã¯Num a => [a]åãšæšè«ããã
-- é¢æ°ã®åæšè«ã®äŸ
add x y = x + y -- addé¢æ°ã®åã¯Num a => a -> a -> aãšæšè«ããã
-- ã¿ãã«ã®åæšè«ã®äŸ
myTuple = (1, "hello", True) -- myTupleã¯(Num a, IsString b) => (a, [Char], Bool)åãšæšè«ããã
-- ãžã§ããªã¯ã¹ã®åæšè«ã®äŸ
myMaybe = Just 42 -- myMaybeã¯Num a => Maybe aåãšæšè«ããã
-- é¢æ°ã®åæšè«ã®äŸ
myFunc x = x * 2 -- myFuncã¯Num a => a -> aåãšæšè«ããã
</syntaxhighlight>
: ãã®ã³ãŒãã§ã¯ãé¢æ°<code>add</code>ã®åŒæ°<code>x</code>ãš<code>y</code>ã®åãæå®ããŠããŸãããããããã³ã³ãã€ã©ã¯<code>Num</code>åã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ã§ããåãæšè«ããæ£ããçµæãåŸãããšãã§ããŸãã
=== OCaml ===
OCamlã®åæšè«ã§ã¯ãå€æ°ã«å¯ŸããŠåãæ瀺çã«æå®ããå¿
èŠã¯ãããŸããã
;OCamlã®åæšè«ã®äŸ:<syntaxhighlight lang=ocaml>
(* ãªã¹ãã®åæšè«ã®äŸ *)
let my_list = [1; 2; 3; 4; 5] (* my_listã¯int liståãšæšè«ããã *)
(* é¢æ°ã®åæšè«ã®äŸ *)
let add x y = x + y (* addé¢æ°ã®åã¯int -> int -> intãšæšè«ããã *)
(* ã¿ãã«ã®åæšè«ã®äŸ *)
let my_tuple = (1, "hello", true) (* my_tupleã¯int * string * boolåãšæšè«ããã *)
(* ãžã§ããªã¯ã¹ã®åæšè«ã®äŸ *)
let my_maybe = Some 42 (* my_maybeã¯int optionåãšæšè«ããã *)
(* é¢æ°ã®åæšè«ã®äŸ *)
let my_func x = x * 2 (* my_funcã¯int -> intåãšæšè«ããã *)
</syntaxhighlight>
=== C++ ===
C++ã§ã¯ã<code>auto</code>ããŒã¯ãŒãã䜿çšããŠãå€æ°ã®åãæšè«ããããšãã§ããŸãã
;C++ã®åæšè«ã®äŸ:<syntaxhighlight lang=cpp>
#include <iostream>
#include <vector>
#include <map>
#include <functional>
int main() {
// ãã¯ã¿ãŒã®åæšè«ã®äŸ
auto myVector = std::vector<int>{1, 2, 3, 4, 5}; // myVectorã¯std::vector<int>åãšæšè«ããã
// é¢æ°ã®åæšè«ã®äŸ
auto add = [](int x, int y) { return x + y; }; // addé¢æ°ã®åã¯èªåçã«æšè«ããã
// ãããã®åæšè«ã®äŸ
auto myMap = std::map<std::string, int>{{"a", 1}, {"b", 2}, {"c", 3}}; // myMapã¯std::map<std::string, int>åãšæšè«ããã
// é¢æ°ãã€ã³ã¿ã®åæšè«ã®äŸ
auto myFunc = [](int x) -> int { return x * 2; }; // myFuncã¯std::function<int(int)>åãšæšè«ããã
// ã©ã ãåŒã®åæšè«ã®äŸ
auto myLambda = [](int x) { return x * x; }; // myLambdaã¯std::function<int(int)>åãšæšè«ããã
std::cout << "Vector: ";
for (auto& num : myVector) {
std::cout << num << " ";
}
std::cout << std::endl;
std::cout << "Map: ";
for (const auto& pair : myMap) {
std::cout << "{" << pair.first << ": " << pair.second << "} ";
}
std::cout << std::endl;
std::cout << "Result of add(3, 4): " << add(3, 4) << std::endl;
std::cout << "Result of myFunc(5): " << myFunc(5) << std::endl;
std::cout << "Result of myLambda(6): " << myLambda(6) << std::endl;
return 0;
}
</syntaxhighlight>
: ãã®äŸã§ã¯ã<code>my_variable</code>ã¯<code>int</code>åã§ããããšãæšè«ãããŸãã
=== Rust ===
Rustã§ã¯ãå€æ°ã®åãæå®ããããšãªããã³ã³ãã€ã©ãèªåçã«åãæšè«ããŸãã
;Rustã§ã®åæšè«ã®äŸ:<syntaxhighlight lang=rust>
fn main() {
// ãã¯ã¿ãŒã®åæšè«ã®äŸ
let my_vector = vec![1, 2, 3, 4, 5]; // my_vectorã¯Vec<i32>åãšæšè«ããã
// é¢æ°ã®åæšè«ã®äŸ
let add = |x: i32, y: i32| x + y; // addé¢æ°ã®åã¯èªåçã«æšè«ããã
// ããã·ã¥ãããã®åæšè«ã®äŸ
let mut my_map = std::collections::HashMap::new();
my_map.insert(String::from("a"), 1);
my_map.insert(String::from("b"), 2);
my_map.insert(String::from("c"), 3); // my_mapã¯HashMap<String, i32>åãšæšè«ããã
// ã¯ããŒãžã£ã®åæšè«ã®äŸ
let my_closure = |x: i32| x * 2; // my_closureã¯ã¯ããŒãžã£åãšæšè«ããã
// Option<i>åã®åæšè«ã®äŸ
let my_maybe = Some(42); // my_maybeã¯Option<i32>åãšæšè«
println!("Vector: {:?}", my_vector);
for (key, value) in &my_map {
println!("Key: {}, Value: {}", key, value);
}
println!("Result of add(3, 4): {}", add(3, 4));
println!("Result of my_closure(5): {}", my_closure(5));
}
</syntaxhighlight>
=== TypeScript ===
TypeScriptã¯éçåä»ãèšèªã§ãããå€æ°ã®åãæå®ããå¿
èŠããããŸãããåæšè«ã«ããã³ã³ãã€ã©ãèªåçã«åãæšè«ããããšãã§ããŸãã
;TypeScriptã§ã®åæšè«ã®äŸ:<syntaxhighlight lang=ts>
// é
åã®åæšè«ã®äŸ
const myArray = [1, 2, 3, 4, 5]; // myArrayã¯number[]åãšæšè«ããã
// é¢æ°ã®åæšè«ã®äŸ
function add(x: number, y: number) {
return x + y;
} // addé¢æ°ã®åã¯(x: number, y: number) => numberãšæšè«ããã
// ãªããžã§ã¯ãã®åæšè«ã®äŸ
const myObject = { a: 1, b: 2, c: 3 }; // myObjectã¯{ a: number, b: number, c: number }åãšæšè«ããã
// ãžã§ããªã¯ã¹ã®åæšè«ã®äŸ
const myArray2 = [1, 2, 3, 4, 5]; // myArray2ã¯number[]åãšæšè«ããã
const myOption = myArray2.find(x => x === 3); // myOptionã¯number | undefinedåãšæšè«ããã
// é¢æ°ã®åæšè«ã®äŸ
const myFunc = (x: number) => x * 2; // myFuncã¯(x: number) => numberåãšæšè«ããã
</syntaxhighlight>
: ãã®ã³ãŒãã§ã¯ãé¢æ°<code>add</code>ã®åŒæ°<code>x</code>ãš<code>y</code>ã®åãæå®ããŠããŸããããã³ã³ãã€ã©ã¯ãããã<code>number</code>åãšæšè«ããŸãã
=== Scala ===
Scalaã¯éçåä»ãèšèªã§ãããå€æ°ã®åãæå®ããå¿
èŠããããŸãããåæšè«ã«ããã³ã³ãã€ã©ãèªåçã«åãæšè«ããããšãã§ããŸãã
;Scalaã§ã®åæšè«ã®äŸ:<syntaxhighlight lang=scala>
object Main extends App {
// ãªã¹ãã®åæšè«ã®äŸ
val myList = List(1, 2, 3, 4, 5) // myListã¯List[Int]åãšæšè«ããã
// é¢æ°ã®åæšè«ã®äŸ
val add = (x: Int, y: Int) => x + y // addé¢æ°ã®åã¯(Int, Int) => Intãšæšè«ããã
// ãããã®åæšè«ã®äŸ
val myMap = Map("a" -> 1, "b" -> 2, "c" -> 3) // myMapã¯Map[String, Int]åãšæšè«ããã
// ãžã§ããªã¯ã¹ã®åæšè«ã®äŸ
val myOption = Some(42) // myOptionã¯Option[Int]åãšæšè«ããã
// é¢æ°ãªãã©ã«ã®åæšè«ã®äŸ
val myFunc = (x: Int) => x * 2 // myFuncã¯Int => Intåãšæšè«ããã
println("myList: " + myList)
println("Result of add(3, 4): " + add(3, 4))
println("myMap: " + myMap)
println("myOption: " + myOption)
println("Result of myFunc(5): " + myFunc(5))
}
</syntaxhighlight>
:ãã®ã³ãŒãã§ã¯ãé¢æ°<code>add</code>ã®åŒæ°<code>x</code>ãš<code>y</code>ã®åãæå®ããŠããŸãããå€æ°<code>x</code>ãš<code>y</code>ã®åãæå®ããŠããŸãããããããã³ã³ãã€ã©ã¯ãããã<code>Int</code>åãšæšè«ããŸãã
=== Kotlin ===
Kotlinã¯éçåä»ãèšèªã§ãããå€æ°ã®åãæå®ããå¿
èŠããããŸãããåæšè«ã«ããã³ã³ãã€ã©ãèªåçã«åãæšè«ããããšãã§ããŸãã
;Kotlinã§ã®åæšè«ã®äŸ:<syntaxhighlight lang=kotlin>
fun main() {
// ãªã¹ãã®åæšè«ã®äŸ
val myList = listOf(1, 2, 3, 4, 5) // myListã¯List<Int>åãšæšè«ããã
// é¢æ°ã®åæšè«ã®äŸ
val add = { x: Int, y: Int -> x + y } // addé¢æ°ã®åã¯(Int, Int) -> Intãšæšè«ããã
// ãããã®åæšè«ã®äŸ
val myMap = mapOf("a" to 1, "b" to 2, "c" to 3) // myMapã¯Map<String, Int>åãšæšè«ããã
// é¢æ°ãªãã©ã«ã®åæšè«ã®äŸ
val myFunc = { x: Int -> x * 2 } // myFuncã¯(Int) -> Intåãšæšè«ããã
println("myList: $myList")
println("Result of add(3, 4): ${add(3, 4)}")
println("myMap: $myMap")
println("myNullable: $myNullable")
println("Result of myFunc(5): ${myFunc(5)}")
}
</syntaxhighlight>
=== Swift ===
Swiftã§ã¯ãå€æ°ã«å¯ŸããŠæ瀺çã«åãæå®ããããšãã§ããŸãããéåžžã¯å¿
èŠãããŸããã
;Swiftã®åæšè«ã®äŸ:<syntaxhighlight lang=swift>
import Foundation
// é
åã®åæšè«ã®äŸ
let myList = [1, 2, 3, 4, 5] // myListã¯[Int]åãšæšè«ããã
// é¢æ°ã®åæšè«ã®äŸ
let add = { (x: Int, y: Int) -> Int in return x + y } // addé¢æ°ã®åã¯(Int, Int) -> Intãšæšè«ããã
// èŸæžã®åæšè«ã®äŸ
let myDict = ["a": 1, "b": 2, "c": 3] // myDictã¯[String: Int]åãšæšè«ããã
// ã¯ããŒãžã£ã®åæšè«ã®äŸ
let myClosure = { (x: Int) -> Int in return x * 2 } // myClosureã¯(Int) -> Intåãšæšè«ããã
print("myList: \(myList)")
print("Result of add(3, 4): \(add(3, 4))")
print("myDict: \(myDict)")
print("myOptional: \(String(describing: myOptional))")
print("Result of myClosure(5): \(myClosure(5))")
</syntaxhighlight>
: ãã®äŸã§ã¯ã<code>my_variable</code>ã¯<code>String</code>åã§ããããšãæšè«ãããŸãã
=== Go ===
Goã§ããå€æ°ã®åãæ瀺çã«æå®ããããšãã§ããŸãããéåžžã¯å¿
èŠãããŸããã
;Goã®åæšè«ã®äŸ:<syntaxhighlight lang=go>
package main
import "fmt"
func main() {
// ã¹ã©ã€ã¹ã®åæšè«ã®äŸ
myList := []int{1, 2, 3, 4, 5} // myListã¯[]intåãšæšè«ããã
// é¢æ°ã®åæšè«ã¯ãããŸããããç¡åé¢æ°ã䜿ãããšã§åã®æå®ãçç¥ã§ããŸãã
add := func(x, y int) int { return x + y } // addé¢æ°ã®åã¯æ瀺çã«æå®ãããŠããŸã
// ãããã®åæšè«ã®äŸ
myMap := map[string]int{"a": 1, "b": 2, "c": 3} // myMapã¯map[string]intåãšæšè«ããã
// å€æ°ã®åæšè«ã®äŸ
var myVariable = 42 // myVariableã¯intåãšæšè«ããã
fmt.Println("myList:", myList)
fmt.Println("Result of add(3, 4):", add(3, 4))
fmt.Println("myMap:", myMap)
fmt.Println("myVariable:", myVariable)
}
</syntaxhighlight>
: ãã®äŸã§ã¯ã<code>my_variable</code>ã¯<code>string</code>åã§ããããšãæšè«ãããŸãã
=== Zig ===
Zigã§ããå€æ°ã®åãæ瀺çã«æå®ããããšãã§ããŸãããéåžžã¯å¿
èŠãããŸããã
;Zigã®åæšè«ã®äŸ:<syntaxhighlight lang=zig>
const my_variable = 42;
</syntaxhighlight>
: ãã®äŸã§ã¯ã<code>my_variable</code>ã¯<code>const int</code>åã§ããããšãæšè«ãããŸãã<code>const int</code>ã¯ã<code>int</code>åã®å®æ°ãè¡šããŸãã
[[ã«ããŽãª:ããã°ã©ãã³ã°]] | 2023-03-05T07:41:42Z | 2024-01-26T03:31:28Z | [] | https://ja.wikibooks.org/wiki/%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0/%E5%9E%8B%E6%8E%A8%E8%AB%96 |
37,120 | ããã°ã©ãã³ã°/ | ããã°ã©ãã³ã°ãšã¯ãèšç®æ©ã«ç¹å®ã®æ瀺ãäžããŠãç®çã®åŠçãå®çŸããããã®æè¡ã§ãã çŸä»£ç€ŸäŒã«ãããŠã¯ãããŸããŸãªæ¥çãåéã§ããã°ã©ãã³ã°ãå¿
èŠãšãããŠããããã®éèŠã¯ãŸããŸãé«ãŸã£ãŠããŸãã æ¬æžã§ã¯ãããã°ã©ãã³ã°ååŠè
ã察象ã«ãããã°ã©ãã³ã°ã®åºç€ããå¿çšãŸã§ãå
æ¬çã«è§£èª¬ããŸãã å
·äœçã«ã¯ãããã°ã©ãã³ã°èšèªã®æŠèŠãããŒã¿åãå¶åŸ¡æ§é ã®åºæ¬ãé¢æ°ã®äœ¿ãæ¹ãã¯ã©ã¹ã®å®çŸ©ãªã©ãããã°ã©ã ãæžãäžã§å¿
èŠãªåºç€ç¥èã詳ãã説æããŸãã ãŸããæ¬æžã§ã¯ãããã°ã©ãã³ã°ã«ãããŠéèŠãªèãæ¹ãææ³ã«ã€ããŠã玹ä»ããŸããäŸãã°ãã¢ã«ãŽãªãºã ã®èšèšããããã°ã®æ¹æ³ãããã°ã©ã ã®å質管çãªã©ã§ãããããã®èãæ¹ãææ³ã身ã«ã€ããããšã§ãããã°ã©ã ãããå¹ççã«äœæããããšãã§ããŸãã æ¬æžãèªã¿é²ããããšã§ãããã°ã©ãã³ã°ã®åºç€ç¥èã身ã«ã€ããç°¡åãªããã°ã©ã ãæžãããšãã§ããããã«ãªãã ãã§ãªããå¿çšçãªããã°ã©ã ã®äœæããããã°ã©ãã³ã°ã«ãããåé¡è§£æ±ºèœåã®åäžã«ã€ãªããã§ãããããã²ãæ¬æžãéããŠãããã°ã©ãã³ã°ã®é
åã奥深ããäœéšããŠã¿ãŠãã ããã
ããã°ã©ãã³ã°ãšã¯ãã³ã³ãã¥ãŒã¿ãŒã«å®è¡ãããããã®æé ãåœä»€ãèšè¿°ããããšã§ããããã°ã©ãã³ã°ã«ãã£ãŠãã³ã³ãã¥ãŒã¿ãŒã«ç¹å®ã®ã¿ã¹ã¯ãå®è¡ãããããšãã§ããŸããããã°ã©ãã³ã°ã«ã¯ãããã°ã©ãã³ã°èšèªã䜿çšããŠã³ãŒããæžãããšãäžè¬çã§ããããã°ã©ãã³ã°ã¯ãã¢ããªã±ãŒã·ã§ã³ãã²ãŒã ãWebãµã€ããã¢ãã€ã«ã¢ããªãèªååããŒã«ãªã©ãäœæããããã«äœ¿çšãããŸãããŸããã³ã³ãã¥ãŒã¿ãŒãµã€ãšã³ã¹ãæ
å ±æè¡åéã§éèŠãªã¹ãã«ãšãããŠããŸãã
ããã°ã©ãã³ã°èšèªã«ã¯å€æ°ã®çš®é¡ããããåé¡æ¹æ³ãããã€ããããŸããã代衚çãªãã®ã以äžã«æããŸãã
ãããã¿ã€ããšã¯ããªããžã§ã¯ããæã€ããããã£ãšã¡ãœããã®ãã³ãã¬ãŒãã§ãããããã¿ã€ããå€æŽãããšããã®ãããã¿ã€ããã掟çããå
šãŠã®ãªããžã§ã¯ãã圱é¿ãåããŸãã
èšèªã®äžä»£ã¯ãã³ã³ãã¥ãŒã¿ãŒããã°ã©ãã³ã°èšèªã®éçºã®é²åãè¡šãçšèªã§ãäžè¬çã«ã¯æ¬¡ã®4ã€ã®äžä»£ã«åé¡ãããŸãã
ããã°ã©ãã³ã°èšèªã¯ããã®çšéã«å¿ããŠå€ãã®çš®é¡ã«åé¡ãããŸãã以äžã«ããã€ãã®äžè¬çãªåé¡ãæããŠã¿ãŸãã
ãã®ããã«ãããã°ã©ãã³ã°èšèªã¯æ§ã
ãªåé¡æ¹æ³ããããããããã«ç¹åŸŽããããŸããããã°ã©ã ãäœæããéã«ã¯ãã©ã®åé¡ã«å±ããèšèªãæé©ããå€æããããšãéèŠã§ãã
ããã°ã©ãã³ã°èšèªã«ã¯ããã®çšéãèšèšææ³ã«ãã£ãŠå€æ§ãªçš®é¡ããããŸããããã§ã¯äžéšã玹ä»ããŸãã
ããã°ã©ã ã®å®è¡æ¹æ³ã¯ãããã°ã©ã ã®çš®é¡ãšå®è¡ãããã©ãããã©ãŒã ã«ãã£ãŠç°ãªããŸãããäžè¬çãªæé ã¯ä»¥äžã®éãã§ãã
ãã ããããã°ã©ã ã®çš®é¡ã«ãã£ãŠã¯ãäžèšã®æé ãšç°ãªãå ŽåããããŸããããšãã°ãWebã¢ããªã±ãŒã·ã§ã³ã¯ããŠã§ããµãŒããŒäžã§å®è¡ãããŸãããŸããã¹ã¯ãªããèšèªã®ããã°ã©ã ã¯ãã³ã³ãã€ã«ããå¿
èŠããªããçŽæ¥å®è¡ã§ããŸãã
ããã°ã©ãã³ã°ã¯ãæ§ã
ãªåéã§å¿çšãããŠããŸãã以äžã«ããã€ãã®äŸãæããŸãã
ãããã¯ãããã°ã©ãã³ã°ã®å¿çšäŸã®äžéšã§ããããã°ã©ãã³ã°ã¯ãããããåéã§äœ¿çšãããæ±çšæè¡ã§ãããå€ãã®å¯èœæ§ãç§ããŠããŸãã
å€æ°ã¯ãããã°ã©ã ã§äœ¿çšãããå€ãæ ŒçŽããããã®ã¡ã¢ãªã®å Žæã瀺ãèå¥åã§ããèå¥åãšããŠæå¹ãªååã¯ããã°ã©ãã³ã°èšèªã«ãã£ãŠç°ãªããŸãã
åçåä»ãèšèªã§ã¯ãå®è¡æã«å€æ°ã®åã決å®ãããŸããã€ãŸããå€æ°ã«è¡šç€ºãããå€ã¯ã代å
¥ããããšãã«ãã®åã«é¢é£ããåçã«æ±ºå®ãããåæ
å ±ãæã£ãŠããŸãã
éçåä»ãèšèªã§ã¯ãå€æ°ãå®çŸ©ããããšãã«å€æ°ã®åã決ãŸãããã®å以å€ã®å€ã¯ä»£å
¥ã§ããŸãããã€ãŸããå€æ°ã®åã¯å®è¡åã«æ±ºå®ãããŸãã
代å
¥ã®æå³è«äžã®éãã¯ãå€æ°ã«ä»£å
¥ã§ããå€ã®åã«é¢é£ããŠããŸããåçåä»ãã§ã¯ãåãå®è¡æã«æ±ºå®ããããããããåã®å€ãå¥ã®åã®å€æ°ã«ä»£å
¥ãããããšãã§ããŸããäžæ¹ãéçåä»ãã§ã¯ãå€æ°ãå®çŸ©ããããšãã«å€æ°ã®åã決å®ããã以éã¯åãåã®å€ãã代å
¥ã§ããŸããã
äŸãã°ãåçåä»ãèšèªã§ã¯ã以äžã®ãããªã³ãŒããæå¹ã§ãã
ããããéçåä»ãèšèªã§ã¯ãåãã³ãŒãã¯ãšã©ãŒãè¿ããŸãã
å®æ°ãšã¯ãããã°ã©ã äžã§ååãæã¡ããã®å€ãåžžã«å€ãããªãå€æ°ã®ããšãæããŸããäŸãã°ãæ°å€ãæååãªã©ãå®æ°ãšããŠäœ¿çšãããŸãã
å®æ°ã¯ãããã°ã©ã å
ã§å€æ°å䜿çšãããå€ãè¡šããšãã«ç¹ã«åœ¹ç«ã¡ãŸããå®æ°ã䜿çšããããšã§ãããã°ã©ã ãããç解ãããããã¡ã³ããã³ã¹ã容æã«ãªããŸãããŸãã誀ã£ãŠå€ãå€æŽããŠããŸãããšããªãããããã°ãæžããããšãã§ããŸãã
ããã°ã©ã äžã§å®æ°ã宣èšããæ¹æ³ã¯ãããã°ã©ãã³ã°èšèªã«ãã£ãŠç°ãªããŸãããå€ãã®ããã°ã©ãã³ã°èšèªã§ã¯ãå®æ°ã«ã¯èå¥åãä»ããåæå€ãå²ãåœãŠãããšã«ãã£ãŠå®£èšããŸãã
以äžã¯ãããã°ã©ãã³ã°ã«ãããŠäžè¬çã«äœ¿çšãããåºæ¬çãªããŒã¿åã§ãã
ãããã®ããŒã¿åã¯ãããã°ã©ã ãã¢ããªã±ãŒã·ã§ã³ã§äœ¿çšãããããŒã¿ãè¡šãããã«éåžžã«åœ¹ç«ã¡ãŸãã
ãåŒãã¯ãèšç®ãè¡šããã®ã§ãããäžé£ã®ãæŒç®åããšããªãã©ã³ãããšåŒã°ããå€ãå«ã¿ãŸãã æŒç®åã«ã¯ãç®è¡æŒç®å(å ç®ãæžç®ãä¹ç®ãé€ç®ãªã©)ãæ¯èŒæŒç®åããããæŒç®åãè«çæŒç®åãªã©ããããŸãã ãªãã©ã³ãã¯ãæŒç®åã«ãã£ãŠå®è¡ãããèšç®ã®å¯Ÿè±¡ãšãªãå€ãè¡šããå€æ°ãå®æ°ãé¢æ°åŒã³åºããªã©ãå«ãŸããŸãã
äžé£ã®æŒç®åã䜿çšããŠãåŒãçµã¿åãããŠè€éãªåŒãäœæããããšãã§ããŸãã ãããã®åŒã¯ãããã°ã©ã å
ã®åçš®ã¿ã¹ã¯ãäŸãã°èšç®ãæ¯èŒãè«çæŒç®ãæ¡ä»¶åå²ãªã©ã«äœ¿çšãããŸãã
å¶åŸ¡æ§é ãšã¯ãããã°ã©ã ã®æµããå¶åŸ¡ããããã®ä»çµã¿ã®ããšã§ããããã°ã©ãã³ã°ã§ã¯ãæ¡ä»¶åå²ãç¹°ãè¿ãã®åŠçãªã©ãå¶åŸ¡æ§é ã®äžäŸã§ãã
æ¡ä»¶åå²ãšã¯ãããæ¡ä»¶ãæºãããããšãã«ç¹å®ã®åŠçãå®è¡ããä»çµã¿ã§ããäŸãã°ãããæ°ã0ãã倧ããå Žåã«ã¯ãæ£ã®æ°ã§ãããšè¡šç€ºãã0以äžã®å Žåã«ã¯ã0ãŸãã¯è² ã®æ°ã§ãããšè¡šç€ºãããããªåŠçããæ¡ä»¶åå²ã䜿ã£ãŠæžãããšãã§ããŸãã
ç¹°ãè¿ãã®åŠçãšã¯ãåãåŠçãç¹°ãè¿ãä»çµã¿ã§ããäŸãã°ã1ãã10ãŸã§ã®æ°ãå
šãŠè¡šç€ºãããããªåŠçããç¹°ãè¿ãã®åŠçã䜿ã£ãŠæžãããšãã§ããŸãã
ããã°ã©ãã³ã°èšèªã«ãã£ãŠã¯ãifæãforæãªã©ã®å
·äœçãªæ§æãçšæãããŠãããããããçµã¿åãããŠå¶åŸ¡æ§é ãå®çŸããŸãããŸããé¢æ°ããªããžã§ã¯ãæåããã°ã©ãã³ã°ãªã©ã®ææ³ããå¶åŸ¡æ§é ã®å®çŸã«åœ¹ç«ã¡ãŸãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "ããã°ã©ãã³ã°ãšã¯ãèšç®æ©ã«ç¹å®ã®æ瀺ãäžããŠãç®çã®åŠçãå®çŸããããã®æè¡ã§ãã çŸä»£ç€ŸäŒã«ãããŠã¯ãããŸããŸãªæ¥çãåéã§ããã°ã©ãã³ã°ãå¿
èŠãšãããŠããããã®éèŠã¯ãŸããŸãé«ãŸã£ãŠããŸãã æ¬æžã§ã¯ãããã°ã©ãã³ã°ååŠè
ã察象ã«ãããã°ã©ãã³ã°ã®åºç€ããå¿çšãŸã§ãå
æ¬çã«è§£èª¬ããŸãã å
·äœçã«ã¯ãããã°ã©ãã³ã°èšèªã®æŠèŠãããŒã¿åãå¶åŸ¡æ§é ã®åºæ¬ãé¢æ°ã®äœ¿ãæ¹ãã¯ã©ã¹ã®å®çŸ©ãªã©ãããã°ã©ã ãæžãäžã§å¿
èŠãªåºç€ç¥èã詳ãã説æããŸãã ãŸããæ¬æžã§ã¯ãããã°ã©ãã³ã°ã«ãããŠéèŠãªèãæ¹ãææ³ã«ã€ããŠã玹ä»ããŸããäŸãã°ãã¢ã«ãŽãªãºã ã®èšèšããããã°ã®æ¹æ³ãããã°ã©ã ã®å質管çãªã©ã§ãããããã®èãæ¹ãææ³ã身ã«ã€ããããšã§ãããã°ã©ã ãããå¹ççã«äœæããããšãã§ããŸãã æ¬æžãèªã¿é²ããããšã§ãããã°ã©ãã³ã°ã®åºç€ç¥èã身ã«ã€ããç°¡åãªããã°ã©ã ãæžãããšãã§ããããã«ãªãã ãã§ãªããå¿çšçãªããã°ã©ã ã®äœæããããã°ã©ãã³ã°ã«ãããåé¡è§£æ±ºèœåã®åäžã«ã€ãªããã§ãããããã²ãæ¬æžãéããŠãããã°ã©ãã³ã°ã®é
åã奥深ããäœéšããŠã¿ãŠãã ããã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ããã°ã©ãã³ã°ãšã¯ãã³ã³ãã¥ãŒã¿ãŒã«å®è¡ãããããã®æé ãåœä»€ãèšè¿°ããããšã§ããããã°ã©ãã³ã°ã«ãã£ãŠãã³ã³ãã¥ãŒã¿ãŒã«ç¹å®ã®ã¿ã¹ã¯ãå®è¡ãããããšãã§ããŸããããã°ã©ãã³ã°ã«ã¯ãããã°ã©ãã³ã°èšèªã䜿çšããŠã³ãŒããæžãããšãäžè¬çã§ããããã°ã©ãã³ã°ã¯ãã¢ããªã±ãŒã·ã§ã³ãã²ãŒã ãWebãµã€ããã¢ãã€ã«ã¢ããªãèªååããŒã«ãªã©ãäœæããããã«äœ¿çšãããŸãããŸããã³ã³ãã¥ãŒã¿ãŒãµã€ãšã³ã¹ãæ
å ±æè¡åéã§éèŠãªã¹ãã«ãšãããŠããŸãã",
"title": "ããã°ã©ãã³ã°ã®æŠèŠ"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "ããã°ã©ãã³ã°èšèªã«ã¯å€æ°ã®çš®é¡ããããåé¡æ¹æ³ãããã€ããããŸããã代衚çãªãã®ã以äžã«æããŸãã",
"title": "ããã°ã©ãã³ã°ã®æŠèŠ"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "ãããã¿ã€ããšã¯ããªããžã§ã¯ããæã€ããããã£ãšã¡ãœããã®ãã³ãã¬ãŒãã§ãããããã¿ã€ããå€æŽãããšããã®ãããã¿ã€ããã掟çããå
šãŠã®ãªããžã§ã¯ãã圱é¿ãåããŸãã",
"title": "ããã°ã©ãã³ã°ã®æŠèŠ"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "èšèªã®äžä»£ã¯ãã³ã³ãã¥ãŒã¿ãŒããã°ã©ãã³ã°èšèªã®éçºã®é²åãè¡šãçšèªã§ãäžè¬çã«ã¯æ¬¡ã®4ã€ã®äžä»£ã«åé¡ãããŸãã",
"title": "ããã°ã©ãã³ã°ã®æŠèŠ"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "ããã°ã©ãã³ã°èšèªã¯ããã®çšéã«å¿ããŠå€ãã®çš®é¡ã«åé¡ãããŸãã以äžã«ããã€ãã®äžè¬çãªåé¡ãæããŠã¿ãŸãã",
"title": "ããã°ã©ãã³ã°ã®æŠèŠ"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "ãã®ããã«ãããã°ã©ãã³ã°èšèªã¯æ§ã
ãªåé¡æ¹æ³ããããããããã«ç¹åŸŽããããŸããããã°ã©ã ãäœæããéã«ã¯ãã©ã®åé¡ã«å±ããèšèªãæé©ããå€æããããšãéèŠã§ãã",
"title": "ããã°ã©ãã³ã°ã®æŠèŠ"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "ããã°ã©ãã³ã°èšèªã«ã¯ããã®çšéãèšèšææ³ã«ãã£ãŠå€æ§ãªçš®é¡ããããŸããããã§ã¯äžéšã玹ä»ããŸãã",
"title": "ããã°ã©ãã³ã°ã®æŠèŠ"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "ããã°ã©ã ã®å®è¡æ¹æ³ã¯ãããã°ã©ã ã®çš®é¡ãšå®è¡ãããã©ãããã©ãŒã ã«ãã£ãŠç°ãªããŸãããäžè¬çãªæé ã¯ä»¥äžã®éãã§ãã",
"title": "ããã°ã©ãã³ã°ã®æŠèŠ"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "ãã ããããã°ã©ã ã®çš®é¡ã«ãã£ãŠã¯ãäžèšã®æé ãšç°ãªãå ŽåããããŸããããšãã°ãWebã¢ããªã±ãŒã·ã§ã³ã¯ããŠã§ããµãŒããŒäžã§å®è¡ãããŸãããŸããã¹ã¯ãªããèšèªã®ããã°ã©ã ã¯ãã³ã³ãã€ã«ããå¿
èŠããªããçŽæ¥å®è¡ã§ããŸãã",
"title": "ããã°ã©ãã³ã°ã®æŠèŠ"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "ããã°ã©ãã³ã°ã¯ãæ§ã
ãªåéã§å¿çšãããŠããŸãã以äžã«ããã€ãã®äŸãæããŸãã",
"title": "ããã°ã©ãã³ã°ã®æŠèŠ"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "ãããã¯ãããã°ã©ãã³ã°ã®å¿çšäŸã®äžéšã§ããããã°ã©ãã³ã°ã¯ãããããåéã§äœ¿çšãããæ±çšæè¡ã§ãããå€ãã®å¯èœæ§ãç§ããŠããŸãã",
"title": "ããã°ã©ãã³ã°ã®æŠèŠ"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "å€æ°ã¯ãããã°ã©ã ã§äœ¿çšãããå€ãæ ŒçŽããããã®ã¡ã¢ãªã®å Žæã瀺ãèå¥åã§ããèå¥åãšããŠæå¹ãªååã¯ããã°ã©ãã³ã°èšèªã«ãã£ãŠç°ãªããŸãã",
"title": "ããã°ã©ã ã®åºæ¬æ§é "
},
{
"paragraph_id": 13,
"tag": "p",
"text": "åçåä»ãèšèªã§ã¯ãå®è¡æã«å€æ°ã®åã決å®ãããŸããã€ãŸããå€æ°ã«è¡šç€ºãããå€ã¯ã代å
¥ããããšãã«ãã®åã«é¢é£ããåçã«æ±ºå®ãããåæ
å ±ãæã£ãŠããŸãã",
"title": "ããã°ã©ã ã®åºæ¬æ§é "
},
{
"paragraph_id": 14,
"tag": "p",
"text": "éçåä»ãèšèªã§ã¯ãå€æ°ãå®çŸ©ããããšãã«å€æ°ã®åã決ãŸãããã®å以å€ã®å€ã¯ä»£å
¥ã§ããŸãããã€ãŸããå€æ°ã®åã¯å®è¡åã«æ±ºå®ãããŸãã",
"title": "ããã°ã©ã ã®åºæ¬æ§é "
},
{
"paragraph_id": 15,
"tag": "p",
"text": "代å
¥ã®æå³è«äžã®éãã¯ãå€æ°ã«ä»£å
¥ã§ããå€ã®åã«é¢é£ããŠããŸããåçåä»ãã§ã¯ãåãå®è¡æã«æ±ºå®ããããããããåã®å€ãå¥ã®åã®å€æ°ã«ä»£å
¥ãããããšãã§ããŸããäžæ¹ãéçåä»ãã§ã¯ãå€æ°ãå®çŸ©ããããšãã«å€æ°ã®åã決å®ããã以éã¯åãåã®å€ãã代å
¥ã§ããŸããã",
"title": "ããã°ã©ã ã®åºæ¬æ§é "
},
{
"paragraph_id": 16,
"tag": "p",
"text": "äŸãã°ãåçåä»ãèšèªã§ã¯ã以äžã®ãããªã³ãŒããæå¹ã§ãã",
"title": "ããã°ã©ã ã®åºæ¬æ§é "
},
{
"paragraph_id": 17,
"tag": "p",
"text": "ããããéçåä»ãèšèªã§ã¯ãåãã³ãŒãã¯ãšã©ãŒãè¿ããŸãã",
"title": "ããã°ã©ã ã®åºæ¬æ§é "
},
{
"paragraph_id": 18,
"tag": "p",
"text": "å®æ°ãšã¯ãããã°ã©ã äžã§ååãæã¡ããã®å€ãåžžã«å€ãããªãå€æ°ã®ããšãæããŸããäŸãã°ãæ°å€ãæååãªã©ãå®æ°ãšããŠäœ¿çšãããŸãã",
"title": "ããã°ã©ã ã®åºæ¬æ§é "
},
{
"paragraph_id": 19,
"tag": "p",
"text": "å®æ°ã¯ãããã°ã©ã å
ã§å€æ°å䜿çšãããå€ãè¡šããšãã«ç¹ã«åœ¹ç«ã¡ãŸããå®æ°ã䜿çšããããšã§ãããã°ã©ã ãããç解ãããããã¡ã³ããã³ã¹ã容æã«ãªããŸãããŸãã誀ã£ãŠå€ãå€æŽããŠããŸãããšããªãããããã°ãæžããããšãã§ããŸãã",
"title": "ããã°ã©ã ã®åºæ¬æ§é "
},
{
"paragraph_id": 20,
"tag": "p",
"text": "ããã°ã©ã äžã§å®æ°ã宣èšããæ¹æ³ã¯ãããã°ã©ãã³ã°èšèªã«ãã£ãŠç°ãªããŸãããå€ãã®ããã°ã©ãã³ã°èšèªã§ã¯ãå®æ°ã«ã¯èå¥åãä»ããåæå€ãå²ãåœãŠãããšã«ãã£ãŠå®£èšããŸãã",
"title": "ããã°ã©ã ã®åºæ¬æ§é "
},
{
"paragraph_id": 21,
"tag": "p",
"text": "以äžã¯ãããã°ã©ãã³ã°ã«ãããŠäžè¬çã«äœ¿çšãããåºæ¬çãªããŒã¿åã§ãã",
"title": "ããã°ã©ã ã®åºæ¬æ§é "
},
{
"paragraph_id": 22,
"tag": "p",
"text": "ãããã®ããŒã¿åã¯ãããã°ã©ã ãã¢ããªã±ãŒã·ã§ã³ã§äœ¿çšãããããŒã¿ãè¡šãããã«éåžžã«åœ¹ç«ã¡ãŸãã",
"title": "ããã°ã©ã ã®åºæ¬æ§é "
},
{
"paragraph_id": 23,
"tag": "p",
"text": "ãåŒãã¯ãèšç®ãè¡šããã®ã§ãããäžé£ã®ãæŒç®åããšããªãã©ã³ãããšåŒã°ããå€ãå«ã¿ãŸãã æŒç®åã«ã¯ãç®è¡æŒç®å(å ç®ãæžç®ãä¹ç®ãé€ç®ãªã©)ãæ¯èŒæŒç®åããããæŒç®åãè«çæŒç®åãªã©ããããŸãã ãªãã©ã³ãã¯ãæŒç®åã«ãã£ãŠå®è¡ãããèšç®ã®å¯Ÿè±¡ãšãªãå€ãè¡šããå€æ°ãå®æ°ãé¢æ°åŒã³åºããªã©ãå«ãŸããŸãã",
"title": "ããã°ã©ã ã®åºæ¬æ§é "
},
{
"paragraph_id": 24,
"tag": "p",
"text": "äžé£ã®æŒç®åã䜿çšããŠãåŒãçµã¿åãããŠè€éãªåŒãäœæããããšãã§ããŸãã ãããã®åŒã¯ãããã°ã©ã å
ã®åçš®ã¿ã¹ã¯ãäŸãã°èšç®ãæ¯èŒãè«çæŒç®ãæ¡ä»¶åå²ãªã©ã«äœ¿çšãããŸãã",
"title": "ããã°ã©ã ã®åºæ¬æ§é "
},
{
"paragraph_id": 25,
"tag": "p",
"text": "å¶åŸ¡æ§é ãšã¯ãããã°ã©ã ã®æµããå¶åŸ¡ããããã®ä»çµã¿ã®ããšã§ããããã°ã©ãã³ã°ã§ã¯ãæ¡ä»¶åå²ãç¹°ãè¿ãã®åŠçãªã©ãå¶åŸ¡æ§é ã®äžäŸã§ãã",
"title": "ããã°ã©ã ã®åºæ¬æ§é "
},
{
"paragraph_id": 26,
"tag": "p",
"text": "æ¡ä»¶åå²ãšã¯ãããæ¡ä»¶ãæºãããããšãã«ç¹å®ã®åŠçãå®è¡ããä»çµã¿ã§ããäŸãã°ãããæ°ã0ãã倧ããå Žåã«ã¯ãæ£ã®æ°ã§ãããšè¡šç€ºãã0以äžã®å Žåã«ã¯ã0ãŸãã¯è² ã®æ°ã§ãããšè¡šç€ºãããããªåŠçããæ¡ä»¶åå²ã䜿ã£ãŠæžãããšãã§ããŸãã",
"title": "ããã°ã©ã ã®åºæ¬æ§é "
},
{
"paragraph_id": 27,
"tag": "p",
"text": "ç¹°ãè¿ãã®åŠçãšã¯ãåãåŠçãç¹°ãè¿ãä»çµã¿ã§ããäŸãã°ã1ãã10ãŸã§ã®æ°ãå
šãŠè¡šç€ºãããããªåŠçããç¹°ãè¿ãã®åŠçã䜿ã£ãŠæžãããšãã§ããŸãã",
"title": "ããã°ã©ã ã®åºæ¬æ§é "
},
{
"paragraph_id": 28,
"tag": "p",
"text": "ããã°ã©ãã³ã°èšèªã«ãã£ãŠã¯ãifæãforæãªã©ã®å
·äœçãªæ§æãçšæãããŠãããããããçµã¿åãããŠå¶åŸ¡æ§é ãå®çŸããŸãããŸããé¢æ°ããªããžã§ã¯ãæåããã°ã©ãã³ã°ãªã©ã®ææ³ããå¶åŸ¡æ§é ã®å®çŸã«åœ¹ç«ã¡ãŸãã",
"title": "ããã°ã©ã ã®åºæ¬æ§é "
}
] | ããã°ã©ãã³ã°ãšã¯ãèšç®æ©ã«ç¹å®ã®æ瀺ãäžããŠãç®çã®åŠçãå®çŸããããã®æè¡ã§ãã
çŸä»£ç€ŸäŒã«ãããŠã¯ãããŸããŸãªæ¥çãåéã§ããã°ã©ãã³ã°ãå¿
èŠãšãããŠããããã®éèŠã¯ãŸããŸãé«ãŸã£ãŠããŸãã
æ¬æžã§ã¯ãããã°ã©ãã³ã°ååŠè
ã察象ã«ãããã°ã©ãã³ã°ã®åºç€ããå¿çšãŸã§ãå
æ¬çã«è§£èª¬ããŸãã
å
·äœçã«ã¯ãããã°ã©ãã³ã°èšèªã®æŠèŠãããŒã¿åãå¶åŸ¡æ§é ã®åºæ¬ãé¢æ°ã®äœ¿ãæ¹ãã¯ã©ã¹ã®å®çŸ©ãªã©ãããã°ã©ã ãæžãäžã§å¿
èŠãªåºç€ç¥èã詳ãã説æããŸãã
ãŸããæ¬æžã§ã¯ãããã°ã©ãã³ã°ã«ãããŠéèŠãªèãæ¹ãææ³ã«ã€ããŠã玹ä»ããŸããäŸãã°ãã¢ã«ãŽãªãºã ã®èšèšããããã°ã®æ¹æ³ãããã°ã©ã ã®å質管çãªã©ã§ãããããã®èãæ¹ãææ³ã身ã«ã€ããããšã§ãããã°ã©ã ãããå¹ççã«äœæããããšãã§ããŸãã
æ¬æžãèªã¿é²ããããšã§ãããã°ã©ãã³ã°ã®åºç€ç¥èã身ã«ã€ããç°¡åãªããã°ã©ã ãæžãããšãã§ããããã«ãªãã ãã§ãªããå¿çšçãªããã°ã©ã ã®äœæããããã°ã©ãã³ã°ã«ãããåé¡è§£æ±ºèœåã®åäžã«ã€ãªããã§ãããããã²ãæ¬æžãéããŠãããã°ã©ãã³ã°ã®é
åã奥深ããäœéšããŠã¿ãŠãã ããã | {{ç¹å¥:åæ¹äžèŽããŒãžäžèŠ§/ããã°ã©ãã³ã°}}
----
ããã°ã©ãã³ã°ãšã¯ãèšç®æ©ã«ç¹å®ã®æ瀺ãäžããŠãç®çã®åŠçãå®çŸããããã®æè¡ã§ãã
çŸä»£ç€ŸäŒã«ãããŠã¯ãããŸããŸãªæ¥çãåéã§ããã°ã©ãã³ã°ãå¿
èŠãšãããŠããããã®éèŠã¯ãŸããŸãé«ãŸã£ãŠããŸãã
æ¬æžã§ã¯ãããã°ã©ãã³ã°ååŠè
ã察象ã«ãããã°ã©ãã³ã°ã®åºç€ããå¿çšãŸã§ãå
æ¬çã«è§£èª¬ããŸãã
å
·äœçã«ã¯ãããã°ã©ãã³ã°èšèªã®æŠèŠãããŒã¿åãå¶åŸ¡æ§é ã®åºæ¬ãé¢æ°ã®äœ¿ãæ¹ãã¯ã©ã¹ã®å®çŸ©ãªã©ãããã°ã©ã ãæžãäžã§å¿
èŠãªåºç€ç¥èã詳ãã説æããŸãã
ãŸããæ¬æžã§ã¯ãããã°ã©ãã³ã°ã«ãããŠéèŠãªèãæ¹ãææ³ã«ã€ããŠã玹ä»ããŸããäŸãã°ãã¢ã«ãŽãªãºã ã®èšèšããããã°ã®æ¹æ³ãããã°ã©ã ã®å質管çãªã©ã§ãããããã®èãæ¹ãææ³ã身ã«ã€ããããšã§ãããã°ã©ã ãããå¹ççã«äœæããããšãã§ããŸãã
æ¬æžãèªã¿é²ããããšã§ãããã°ã©ãã³ã°ã®åºç€ç¥èã身ã«ã€ããç°¡åãªããã°ã©ã ãæžãããšãã§ããããã«ãªãã ãã§ãªããå¿çšçãªããã°ã©ã ã®äœæããããã°ã©ãã³ã°ã«ãããåé¡è§£æ±ºèœåã®åäžã«ã€ãªããã§ãããããã²ãæ¬æžãéããŠãããã°ã©ãã³ã°ã®é
åã奥深ããäœéšããŠã¿ãŠãã ããã
__TOC__
== ããã°ã©ãã³ã°ã®æŠèŠ ==
=== ããã°ã©ãã³ã°ã®å®çŸ© ===
ããã°ã©ãã³ã°ãšã¯ãã³ã³ãã¥ãŒã¿ãŒã«å®è¡ãããããã®æé ãåœä»€ãèšè¿°ããããšã§ããããã°ã©ãã³ã°ã«ãã£ãŠãã³ã³ãã¥ãŒã¿ãŒã«ç¹å®ã®ã¿ã¹ã¯ãå®è¡ãããããšãã§ããŸããããã°ã©ãã³ã°ã«ã¯ãããã°ã©ãã³ã°èšèªã䜿çšããŠã³ãŒããæžãããšãäžè¬çã§ããããã°ã©ãã³ã°ã¯ãã¢ããªã±ãŒã·ã§ã³ãã²ãŒã ãWebãµã€ããã¢ãã€ã«ã¢ããªãèªååããŒã«ãªã©ãäœæããããã«äœ¿çšãããŸãããŸããã³ã³ãã¥ãŒã¿ãŒãµã€ãšã³ã¹ãæ
å ±æè¡åéã§éèŠãªã¹ãã«ãšãããŠããŸãã
=== ããã°ã©ãã³ã°èšèªã®çš®é¡ ===
ããã°ã©ãã³ã°èšèªã«ã¯å€æ°ã®çš®é¡ããããåé¡æ¹æ³ãããã€ããããŸããã代衚çãªãã®ã以äžã«æããŸãã
*èšèªã®çš®é¡ã«ããåé¡
#ã¯ã©ã¹ããŒã¹ã®ãªããžã§ã¯ãæåèšèª{{---}}ãªããžã§ã¯ããå®çŸ©ããããã«ã¯ã©ã¹ãšåŒã°ãããã³ãã¬ãŒãã䜿çšããããã°ã©ãã³ã°èšèªã§ããã¯ã©ã¹ã¯ããªããžã§ã¯ããã©ã®ãããªããããã£ãã¡ãœãããæã€ããå®çŸ©ããŸãã
##Java
##C++
##Python
##Ruby
#ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåèšèª{{---}}ã¯ã©ã¹ã䜿ããã«ãªããžã§ã¯ããå®çŸ©ããããã°ã©ãã³ã°èšèªã§ãããªããžã§ã¯ãã¯ãããã¿ã€ããšåŒã°ãããªããžã§ã¯ããã掟çããŸãã
ãããã¿ã€ããšã¯ããªããžã§ã¯ããæã€ããããã£ãšã¡ãœããã®ãã³ãã¬ãŒãã§ãããããã¿ã€ããå€æŽãããšããã®ãããã¿ã€ããã掟çããå
šãŠã®ãªããžã§ã¯ãã圱é¿ãåããŸãã
##JavaScript
##Lua
#é¢æ°åããã°ã©ãã³ã°èšèª{{---}}é¢æ°ãäž»èŠãªããã°ã©ãã³ã°ã®æ§æèŠçŽ ãšããŠäœ¿çšããããã°ã©ãã³ã°èšèªã§ããé¢æ°åããã°ã©ãã³ã°èšèªã§ã¯ãããŒã¿ãšã¢ã«ãŽãªãºã ãåé¢ããç¶æ
ãå€æŽããããããå€ã®å€æãèšç®ã«éç¹ã眮ãããŸãã
##Haskell
##Lisp
##ML
##Erlang
#åœä»€åããã°ã©ãã³ã°èšèª{{---}}ã³ã³ãã¥ãŒã¿ã«å
·äœçãªæé ãæ瀺ããããšã§ããã°ã©ã ãäœæããããã°ã©ãã³ã°èšèªã§ãã
##ã¢ã»ã³ããªèšèª
##C
##Fortran
#宣èšåããã°ã©ãã³ã°èšèª
##Prolog
*èšèªã®äžä»£ã«ããåé¡
èšèªã®äžä»£ã¯ãã³ã³ãã¥ãŒã¿ãŒããã°ã©ãã³ã°èšèªã®éçºã®é²åãè¡šãçšèªã§ãäžè¬çã«ã¯æ¬¡ã®4ã€ã®äžä»£ã«åé¡ãããŸãã
*第1äžä»£èšèªïŒæ©æ¢°èªïŒïŒã³ã³ãã¥ãŒã¿ãŒã®ããŒããŠã§ã¢ã«çŽæ¥åœä»€ãäžããããã®èšèªã§ãã0ãš1ã®ãã€ããªã³ãŒãã§è¡šãããŸãã
*第2äžä»£èšèªïŒã¢ã»ã³ããªèšèªïŒïŒæ©æ¢°èªã«å¯Ÿãã人éã«ãšã£ãŠç解ããããããŒã¢ããã¯ïŒå©èšç¬Šå·ïŒã䜿çšããäœæ°Žæºèšèªã§ãã
*第3äžä»£èšèªïŒé«æ°ŽæºèšèªïŒïŒCãJavaãPythonãªã©ã®é«æ°Žæºã®ããã°ã©ãã³ã°èšèªã§ã人éã«ãšã£ãŠç解ãããããããã°ã©ãã³ã°ã容æã«ãªããŸããã
*第4äžä»£èšèªïŒããŒã¿ããŒã¹ã¯ãšãªèšèªãGUIçæèšèªãªã©ã®é«åºŠã«æœè±¡åãããèšèªã§ãéçºè
ãé«éã§ç°¡åã«ã¢ããªã±ãŒã·ã§ã³ãäœæã§ããããã«ãªã£ãŠããŸãã
* çšéã«ããåé¡
ããã°ã©ãã³ã°èšèªã¯ããã®çšéã«å¿ããŠå€ãã®çš®é¡ã«åé¡ãããŸãã以äžã«ããã€ãã®äžè¬çãªåé¡ãæããŠã¿ãŸãã
#ã·ã¹ãã ããã°ã©ãã³ã°èšèªïŒã·ã¹ãã ããã°ã©ãã³ã°èšèªã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãããã€ã¹ãã©ã€ããããŒããŠã§ã¢å¶åŸ¡ãªã©ãäœã¬ãã«ã§ã®ããã°ã©ãã³ã°ã«äœ¿çšãããŸããCèšèªãC++èšèªãã¢ã»ã³ããªèšèªã代衚çãªäŸã§ãã
#ã¢ããªã±ãŒã·ã§ã³ããã°ã©ãã³ã°èšèªïŒã¢ããªã±ãŒã·ã§ã³ããã°ã©ãã³ã°èšèªã¯ããœãããŠã§ã¢ã¢ããªã±ãŒã·ã§ã³ãéçºããããã«äœ¿çšãããŸããJavaãPythonãRubyãJavaScriptãSwiftãObjective-CãKotlinãªã©ã代衚çãªäŸã§ãã
#ã¹ã¯ãªããèšèªïŒã¹ã¯ãªããèšèªã¯ããããåŠçãèªååãWebãµãŒããŒäžã§ã®åŠçãªã©ãæ¯èŒçå°èŠæš¡ãªã¿ã¹ã¯ã«äœ¿çšãããŸããBashãPerlãPythonãRubyãJavaScriptã代衚çãªäŸã§ãã
#ããŒã¿ããŒã¹ããã°ã©ãã³ã°èšèªïŒããŒã¿ããŒã¹ããã°ã©ãã³ã°èšèªã¯ãããŒã¿ããŒã¹ç®¡çã·ã¹ãã ïŒDBMSïŒã®æäœã«äœ¿çšãããŸããSQLã代衚çãªäŸã§ããããŒã¿ããŒã¹ããã°ã©ãã³ã°èšèªãããã°ã©ãã³ã°èšèªã«åé¡ããããšã¯å³å¯ã«ã¯æ£ãããããŸããã
#ããŒã¯ã¢ããèšèªïŒããŒã¯ã¢ããèšèªã¯ãææžã®æ§é ãèšè¿°ããããã«äœ¿çšãããŸããHTMLãXMLãMarkdownãªã©ã代衚çãªäŸã§ããããŒã¯ã¢ããèšèªãããã°ã©ãã³ã°èšèªã«åé¡ããããšã¯å³å¯ã«ã¯æ£ãããããŸããã
ãã®ããã«ãããã°ã©ãã³ã°èšèªã¯æ§ã
ãªåé¡æ¹æ³ããããããããã«ç¹åŸŽããããŸããããã°ã©ã ãäœæããéã«ã¯ãã©ã®åé¡ã«å±ããèšèªãæé©ããå€æããããšãéèŠã§ãã
==== æ§ã
ãªããã°ã©ãã³ã°èšèª ====
ããã°ã©ãã³ã°èšèªã«ã¯ããã®çšéãèšèšææ³ã«ãã£ãŠå€æ§ãªçš®é¡ããããŸããããã§ã¯äžéšã玹ä»ããŸãã
*[[Fortran]]ïŒç§åŠæè¡èšç®ãæ°å€è§£æãªã©ã®åéã§äœ¿çšãããããã°ã©ãã³ã°èšèªãåæã®ã³ã³ãã¥ãŒã¿ã·ã¹ãã ã®éçºã«å€§ããè²¢ç®ããèšèªã®äžã€ã
*[[COBOL]]ïŒããžãã¹ã¢ããªã±ãŒã·ã§ã³ã®éçºã«äœ¿çšãããããã°ã©ãã³ã°èšèªãç¹ã«éèæ¥çã§åºã䜿çšãããŠããã
*[[ALGOL]]ïŒã¢ã«ãŽãªãºã èšèªã®ç¥ã§ãæ°åŠçãªè¡šçŸèœåãæã£ãæ§é åãããããã°ã©ãã³ã°èšèªã§ãã1950幎代ã«éçºãããç§åŠæè¡èšç®ãæ°å€è§£æãªã©ã®åéã§äœ¿çšãããŸãããALGOL 60ã¯ãããã°ã©ãã³ã°èšèªã®æšæºåã®åæ段éã§ãå€ãã®èšèªã®èšèšã«åœ±é¿ãäžããŸããã
*[[Pascal]]ïŒæè²çšèšèªãšããŠãåºã䜿çšãããŸãããPascalã«ã¯ãããŒã¿åã®åŒ·å¶ããµãã«ãŒãã³ã®å®çŸ©ãªã©ãæ§é åããã°ã©ãã³ã°ã®åºæ¬æŠå¿µãå«ãŸããŠããŸãã
*[[Logo]]ïŒåäŸãã¡ãããã°ã©ãã³ã°ã®åºæ¬æŠå¿µãåŠã¶ã®ã«é©ããããã°ã©ãã³ã°èšèªãã¿ãã«ã°ã©ãã£ãã¯ã®ä»ããªã¹ãåŠçããµããŒãããŠããŸãã
*[[BASIC]]ïŒåå¿è
åãã®ããã°ã©ãã³ã°èšèªã§ãç°¡åã«åŠã³å§ããããšãã§ãããã³ã³ãã¥ãŒã¿ã²ãŒã ãæè²çšã¢ããªã±ãŒã·ã§ã³ã®éçºã«ã䜿çšãããŸãã
*[[Cèšèª]]ïŒUNIXãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãçµèŸŒã¿ã·ã¹ãã ãªã©ã«åºã䜿çšãããæ±çšçãªããã°ã©ãã³ã°èšèªã
*[[C++]]ïŒCèšèªãåºç€ã«ãããªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã§ãé«éã§å¹ççãªã³ã³ãã¥ãŒã¿ã¢ããªã±ãŒã·ã§ã³ã®éçºã«äœ¿çšãããŸãã
*[[Java]]ïŒã¯ãã¹ãã©ãããã©ãŒã ã¢ããªã±ãŒã·ã§ã³ãWebã¢ããªã±ãŒã·ã§ã³ãã¢ãã€ã«ã¢ããªã±ãŒã·ã§ã³ãªã©ãéçºããããã«äœ¿çšãããããã°ã©ãã³ã°èšèªã
*[[Python]]ïŒããŒã¿ãµã€ãšã³ã¹ã人工ç¥èœãªã©ã®åéã§åºã䜿çšãããé«æ°Žæºèšèªã
*[[Lua]]ïŒçµèŸŒã¿ã·ã¹ãã ãã²ãŒã éçºã«åºã䜿çšãããã¹ã¯ãªããèšèªã
*[[Perl]]ïŒUNIXç°å¢ã§åºã䜿çšãããã¹ã¯ãªããèšèªã§ãæ£èŠè¡šçŸãããã¹ãåŠçã«åªããŠããŸãã
*[[Ruby]]ïŒWebã¢ããªã±ãŒã·ã§ã³ãåçãªWebããŒãžãäœæããããã«äœ¿çšãããããã°ã©ãã³ã°èšèªã
*[[JavaScript]]ïŒWebã¢ããªã±ãŒã·ã§ã³ãWebããŒãžã®ã€ã³ã¿ã©ã¯ãã£ããªèŠçŽ ãå®è£
ããããã«äœ¿çšãããã¹ã¯ãªããèšèªã
*[[TypeScript]]ïŒJavaScriptã®æ¡åŒµèšèªã§ãéçåä»ããã¯ã©ã¹ããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°ããµããŒãããŠããŸãã
*[[PHP]]ïŒWebãµã€ãã®éçºã«ç¹åããã¹ã¯ãªããèšèªã§ãWordPressãDrupalãªã©ã®CMSã§äœ¿çšãããŸãã
*[[Haskell]]ïŒé¢æ°åããã°ã©ãã³ã°èšèªã§ãé«åºŠãªæ°åŠçæäœãè¡ãããšãã§ããŸãã䞊è¡åŠçã«ãé©ããŠãããè€éãªã¢ããªã±ãŒã·ã§ã³ã®éçºã«äœ¿çšãããŸãããŸãã人工ç¥èœãèªç¶èšèªåŠçãªã©ã®åéã§ã䜿çšãããŸãã
*[[Swift]]ïŒiOSããã³macOSã¢ããªã±ãŒã·ã§ã³ã®éçºã«äœ¿çšãããããã°ã©ãã³ã°èšèªã
*[[Groovy]]ïŒJavaä»®æ³ãã·ã³äžã§åäœããåçãªãªããžã§ã¯ãæåèšèªã§ãJavaã®ã©ã€ãã©ãªãç°¡åã«å©çšããããšãã§ããŸãã
*[[Scala]]ïŒJavaä»®æ³ãã·ã³äžã§åäœãããã«ããã©ãã€ã ããã°ã©ãã³ã°èšèªã§ãé¢æ°åããã°ã©ãã³ã°ããªããžã§ã¯ãæåããã°ã©ãã³ã°ãå¯èœã§ãã
*[[Kotlin]]ïŒAndroidã¢ããªã±ãŒã·ã§ã³ã®éçºã«äœ¿çšãããŠããããã°ã©ãã³ã°èšèªã
*[[Rust]]ïŒRustã¯ã·ã¹ãã ããã°ã©ãã³ã°ã«é©ããããã°ã©ãã³ã°èšèªã§ãå®å
šæ§ãããã©ãŒãã³ã¹ã䞊è¡åŠçãéèŠããŠããŸãã
*[[Go]]ïŒGoogleãéçºãã䞊ååŠçãåæ£ã·ã¹ãã ã®éçºã«é©ããããã°ã©ãã³ã°èšèªã
*[[Julia]]ïŒç§åŠæè¡èšç®ãæ°å€è§£æãããŒã¿è§£æãªã©ã«ç¹åããé«éãªããã°ã©ãã³ã°èšèªã
*[[Dart]]ïŒGoogleãéçºããã¯ã©ã€ã¢ã³ããµã€ãã¢ããªã±ãŒã·ã§ã³ã®éçºã«é©ããããã°ã©ãã³ã°èšèªã
*[[Scratch]]ïŒæè²çšããã°ã©ãã³ã°èšèªã§ãããžã¥ã¢ã«ããã°ã©ãã³ã°ã«ãã£ãŠã³ãŒãã£ã³ã°ã®åºæ¬ãåŠã¶ããšãã§ããŸãã
*[[CobolScript]]ïŒCOBOLèšèªãã¹ã¯ãªããèšèªãšããŠäœ¿çšããããšãã§ããããã°ã©ãã³ã°èšèªã
{{ã³ã©ã |ããã°ã©ãã³ã°ååŠè
ã®åŠç¿ã«é©ããããã°ã©ãã³ã°èšèª|2=ããã°ã©ãã³ã°ã®åŠç¿ã«ã¯ãããã€ãã®ããã°ã©ãã³ã°èšèªãé©ããŠããŸãã以äžã«ããã€ãã®åè£ã瀺ããããããã®èšèªãé©ããŠããçç±ãšå®äŸã瀺ããŸãã
;Python
:Pythonã¯ãååŠè
ã«ãšã£ãŠéåžžã«åªããèšèªã§ããèªã¿ããããæžãããããå€ãã®ã©ã€ãã©ãªãå©çšå¯èœã§ãæ©æ¢°åŠç¿ãWebéçºãããŒã¿åæãèªç¶èšèªåŠçãªã©ã®çšéã«ãé©ããŠããŸãã
:;Hello world:<syntaxhighlight lang=python3>
print("Hello, world!")
</syntaxhighlight>
:;ãã£ããããé¢æ°:<syntaxhighlight lang=python3>
def fibonacci(n):
if n <= 1:
return n
else:
return fibonacci(n-1) + fibonacci(n-2)
</syntaxhighlight>
;Java
:Javaã¯ããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®æŠå¿µãåŠã¶ããã«é©ããŠããŸããJavaã¯ãããžãã¹ã¢ããªã±ãŒã·ã§ã³ãWebã¢ããªã±ãŒã·ã§ã³ãAndroidã¢ããªã±ãŒã·ã§ã³ãªã©ãããŸããŸãªåéã§äœ¿çšãããŠããŸãã
:;Hello world:<syntaxhighlight lang=java>
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, world!");
}
}
</syntaxhighlight>
:;ãã£ããããé¢æ°:<syntaxhighlight lang=java>
public class Fibonacci {
public static int fibonacci(int n) {
if (n <= 1) {
return n;
} else {
return fibonacci(n-1) + fibonacci(n-2);
}
}
}
</syntaxhighlight>
;JavaScript
:JavaScriptã¯ãWebéçºã«é©ããŠããŸããJavaScriptã¯ãã¯ã©ã€ã¢ã³ããµã€ããšãµãŒããµã€ãã®äž¡æ¹ã§äœ¿çšãããŠããŸãããŸããããã³ããšã³ããã¬ãŒã ã¯ãŒã¯ïŒ[[JavaScript/React|React]]ã[[JavaScript/Vue.js|Vue.js]]ã[[JavaScript/AngularJS|AngularJS]]ãªã©ïŒãããã¯ãšã³ããã¬ãŒã ã¯ãŒã¯ïŒNode.jsãExpressãKoaãªã©ïŒããããŸãã
:;Hello world:<syntaxhighlight lang=js>
console.log("Hello, world!");
</syntaxhighlight>
:;ãã£ããããé¢æ°:<syntaxhighlight lang=js>
function fibonacci(n) {
if (n <= 1) {
return n;
} else {
return fibonacci(n-1) + fibonacci(n-2);
}
}
</syntaxhighlight>
ãããã¯ãããŸã§ãäŸã§ãããåŠç¿ã®ç®çã«åãããŠéžæãããå¿
èŠããããŸãã
}}
=== ããã°ã©ã ã®å®è¡æ¹æ³ ===
ããã°ã©ã ã®å®è¡æ¹æ³ã¯ãããã°ã©ã ã®çš®é¡ãšå®è¡ãããã©ãããã©ãŒã ã«ãã£ãŠç°ãªããŸãããäžè¬çãªæé ã¯ä»¥äžã®éãã§ãã
#ããã°ã©ã ãããŠã³ããŒããŸãã¯äœæããïŒããã°ã©ã ãããŠã³ããŒãããå Žåã¯ãã€ã³ã¿ãŒãããäžããããŠã³ããŒããããããœãããŠã§ã¢ã®ãã£ã¹ã¯ã賌å
¥ããŠã€ã³ã¹ããŒã«ããŸãããŸããèªåã§ããã°ã©ã ãäœæããå Žåã¯ãããã¹ããšãã£ã¿ãéçºç°å¢ã䜿çšããŠã³ãŒããæžããŸãã
#ããã°ã©ã ãã³ã³ãã€ã«ããïŒã³ã³ãã€ã«ãšã¯ãããã°ã©ã ãå®è¡å¯èœãªåœ¢åŒã«å€æããäœæ¥ã§ããå€ãã®ããã°ã©ã ã¯ãã³ã³ãã€ã«ãå¿
èŠã§ããããã°ã©ã ãã³ã³ãã€ã«ããã«ã¯ãéçºç°å¢ãã¿ãŒããã«ã§ã³ã³ãã€ã«ã³ãã³ããå®è¡ããŸãã
#ããã°ã©ã ãå®è¡ããïŒã³ã³ãã€ã«ãããããã°ã©ã ã¯ãå®è¡å¯èœãã¡ã€ã«ãšããŠä¿åãããŸãããã®å®è¡å¯èœãã¡ã€ã«ãããã«ã¯ãªãã¯ããããšã§ãããã°ã©ã ãå®è¡ã§ããŸãããŸããã¿ãŒããã«ã§ããã°ã©ã åãå
¥åããŠå®è¡ããããšãã§ããŸãã
ãã ããããã°ã©ã ã®çš®é¡ã«ãã£ãŠã¯ãäžèšã®æé ãšç°ãªãå ŽåããããŸããããšãã°ãWebã¢ããªã±ãŒã·ã§ã³ã¯ããŠã§ããµãŒããŒäžã§å®è¡ãããŸãããŸããã¹ã¯ãªããèšèªã®ããã°ã©ã ã¯ãã³ã³ãã€ã«ããå¿
èŠããªããçŽæ¥å®è¡ã§ããŸãã
=== ããã°ã©ãã³ã°ã®å¿çšäŸ ===
ããã°ã©ãã³ã°ã¯ãæ§ã
ãªåéã§å¿çšãããŠããŸãã以äžã«ããã€ãã®äŸãæããŸãã
#ãœãããŠã§ã¢éçºïŒããã°ã©ãã³ã°ã¯ããœãããŠã§ã¢ã®éçºã«æ¬ ãããªãæè¡ã§ããããã°ã©ãã³ã°èšèªã䜿ã£ãŠããŠã§ãã¢ããªã±ãŒã·ã§ã³ããã¹ã¯ãããã¢ããªã±ãŒã·ã§ã³ãã¢ãã€ã«ã¢ããªã±ãŒã·ã§ã³ãªã©ãéçºããããšãã§ããŸãã
#ããŒã¿ãµã€ãšã³ã¹ïŒããã°ã©ãã³ã°ã¯ãããŒã¿åæãæ©æ¢°åŠç¿ã®åéã§ãéèŠãªåœ¹å²ãæ
ã£ãŠããŸããPythonãRãªã©ã®ããã°ã©ãã³ã°èšèªã䜿ã£ãŠãããŒã¿ã®åŠçãåæãå¯èŠåãªã©ãè¡ããŸãã
#ã²ãŒã éçºïŒããã°ã©ãã³ã°ã¯ãã²ãŒã éçºã«ãæ¬ ãããªãæè¡ã§ããã²ãŒã ãšã³ãžã³ãã²ãŒã ããã°ã©ã ãäœæããããã«ãC++ãC#ãªã©ã®èšèªã䜿çšããŸãã
#ãŠã§ãéçºïŒãŠã§ããµã€ãããŠã§ãã¢ããªã±ãŒã·ã§ã³ãéçºããããã«ãHTMLãCSSãªã©ã®ããŒã¯ã¢ããèšèªãJavaScriptãPHPãRubyãªã©ã®ããã°ã©ãã³ã°èšèªã䜿çšããŸãã
#èªååïŒããã°ã©ãã³ã°ã¯ãäœæ¥ã®èªååã«ã䜿ãããŸããäŸãã°ããããåŠçãã¹ã¯ãªãããæžãããšã§ãç¹°ãè¿ãäœæ¥ãèªååããããšãã§ããŸãã
#IoTïŒããã°ã©ãã³ã°ã¯ãã€ã³ã¿ãŒãããã»ãªãã»ã·ã³ã°ã¹ïŒIoTïŒã®åéã§ã䜿çšãããŸããäŸãã°ããã€ã¯ãã³ã³ãããŒã©ãããã°ã©ãã³ã°ããŠãã»ã³ãµãŒããŒã¿ã®åéãã¢ã¯ãã¥ãšãŒã¿ã®å¶åŸ¡ãè¡ãããšãã§ããŸãã
#ã³ã³ãã¥ãŒã¿ãŒã°ã©ãã£ãã¯ã¹ïŒããã°ã©ãã³ã°ã¯ãã³ã³ãã¥ãŒã¿ãŒã°ã©ãã£ãã¯ã¹ã®åéã§ã䜿çšãããŸããOpenGLãDirectXãªã©ã®ã©ã€ãã©ãªã䜿çšããŠã3Dã°ã©ãã£ãã¯ã¹ãã¢ãã¡ãŒã·ã§ã³ã®äœæãã§ããŸãã
ãããã¯ãããã°ã©ãã³ã°ã®å¿çšäŸã®äžéšã§ããããã°ã©ãã³ã°ã¯ãããããåéã§äœ¿çšãããæ±çšæè¡ã§ãããå€ãã®å¯èœæ§ãç§ããŠããŸãã
== ããã°ã©ã ã®åºæ¬æ§é ==
{{Main|ããã°ã©ãã³ã°/å€æ°}}
=== å€æ° ===
å€æ°ã¯ãããã°ã©ã ã§äœ¿çšãããå€ãæ ŒçŽããããã®ã¡ã¢ãªã®å Žæã瀺ãèå¥åã§ããèå¥åãšããŠæå¹ãªååã¯ããã°ã©ãã³ã°èšèªã«ãã£ãŠç°ãªããŸãã
åçåä»ãèšèªã§ã¯ãå®è¡æã«å€æ°ã®åã決å®ãããŸããã€ãŸããå€æ°ã«è¡šç€ºãããå€ã¯ã代å
¥ããããšãã«ãã®åã«é¢é£ããåçã«æ±ºå®ãããåæ
å ±ãæã£ãŠããŸãã
éçåä»ãèšèªã§ã¯ãå€æ°ãå®çŸ©ããããšãã«å€æ°ã®åã決ãŸãããã®å以å€ã®å€ã¯ä»£å
¥ã§ããŸãããã€ãŸããå€æ°ã®åã¯å®è¡åã«æ±ºå®ãããŸãã
代å
¥ã®æå³è«äžã®éãã¯ãå€æ°ã«ä»£å
¥ã§ããå€ã®åã«é¢é£ããŠããŸããåçåä»ãã§ã¯ãåãå®è¡æã«æ±ºå®ããããããããåã®å€ãå¥ã®åã®å€æ°ã«ä»£å
¥ãããããšãã§ããŸããäžæ¹ãéçåä»ãã§ã¯ãå€æ°ãå®çŸ©ããããšãã«å€æ°ã®åã決å®ããã以éã¯åãåã®å€ãã代å
¥ã§ããŸããã
äŸãã°ãåçåä»ãèšèªã§ã¯ã以äžã®ãããªã³ãŒããæå¹ã§ãã
x = 1
x = "hello"
ããããéçåä»ãèšèªã§ã¯ãåãã³ãŒãã¯ãšã©ãŒãè¿ããŸãã
=== å®æ° ===
å®æ°ãšã¯ãããã°ã©ã äžã§ååãæã¡ããã®å€ãåžžã«å€ãããªãå€æ°ã®ããšãæããŸããäŸãã°ãæ°å€ãæååãªã©ãå®æ°ãšããŠäœ¿çšãããŸãã
å®æ°ã¯ãããã°ã©ã å
ã§å€æ°å䜿çšãããå€ãè¡šããšãã«ç¹ã«åœ¹ç«ã¡ãŸããå®æ°ã䜿çšããããšã§ãããã°ã©ã ãããç解ãããããã¡ã³ããã³ã¹ã容æã«ãªããŸãããŸãã誀ã£ãŠå€ãå€æŽããŠããŸãããšããªãããããã°ãæžããããšãã§ããŸãã
ããã°ã©ã äžã§å®æ°ã宣èšããæ¹æ³ã¯ãããã°ã©ãã³ã°èšèªã«ãã£ãŠç°ãªããŸãããå€ãã®ããã°ã©ãã³ã°èšèªã§ã¯ãå®æ°ã«ã¯èå¥åãä»ããåæå€ãå²ãåœãŠãããšã«ãã£ãŠå®£èšããŸãã
{{ã³ã©ã |éçåä»ãèšèªãšåçåä»ãèšèª|2=éçåä»ãèšèªãšåçåä»ãèšèªã¯ãããã°ã©ãã³ã°èšèªã®ã¿ã€ãã®2ã€ã®äž»èŠãªã«ããŽãªãŒã§ãã
éçåä»ãèšèªã¯ãããã°ã©ã ãå®è¡ãããåã«ãã¹ãŠã®å€æ°ã«åãå²ãåœãŠãããã³ã³ãã€ã«æã«åãšã©ãŒãæ€åºããããšãã§ããŸããããã¯ãå€æ°ã®å€ãäºæããªãåã§ããå Žåã«ã³ã³ãã€ã©ããšã©ãŒãåºåããå®è¡æãšã©ãŒãåé¿ããããšãã§ãããããããã°ã©ã ã®å®å
šæ§ãé«ããããšãã§ããŸãã代衚çãªèšèªãšããŠCãJavaãC#ãTypeScriptãªã©ãæããããŸãã
äžæ¹ãåçåä»ãèšèªã¯ãå€æ°ã®åãå®è¡æã«æ±ºå®ãããŸããã€ãŸããå€æ°ã«å€ãå²ãåœãŠãéã«ããã®å€ã®åã«å¿ããŠå€æ°ã®åã決ãŸããŸããããã«ãããæè»æ§ãé«ããéçºè
ãããçŽ æ©ãã³ãŒããèšè¿°ã§ããŸãããã ããåãšã©ãŒãå®è¡æã«æ€åºããããããéçºè
ãèªåã§ãã§ãã¯ããå¿
èŠããããŸãã代衚çãªèšèªãšããŠPythonãRubyãJavaScriptãPHPãPerlãªã©ãæããããŸãã
éçåä»ãèšèªãšåçåä»ãèšèªã¯ãããããã®å©ç¹ãšæ¬ ç¹ããããéçºè
ã䜿çšããèšèªãéžæããéã«ã¯ããããžã§ã¯ãã®æ§è³ªãèŠä»¶ã«å¿ããŠå€æããå¿
èŠããããŸãã}}
=== åºæ¬çãªããŒã¿å ===
以äžã¯ãããã°ã©ãã³ã°ã«ãããŠäžè¬çã«äœ¿çšãããåºæ¬çãªããŒã¿åã§ãã
* æŽæ° (int) - æŽæ°å€ãè¡šããŸãã
* æµ®åå°æ°ç¹æ° (float) - å®æ°å€ãè¡šããŸãã
* æåå (str) - æååãè¡šããŸãã
* çåœå€ (bool) - çãŸãã¯åœã®å€ãè¡šããŸãã
* é
å (array) - è€æ°ã®å€ãé åºä»ããŠæ ŒçŽããããŒã¿åã§ãã
* é£æ³é
å (hash) - ããŒãšå€ã®ãã¢ãæ ŒçŽããããŒã¿åã§ãã
ãããã®ããŒã¿åã¯ãããã°ã©ã ãã¢ããªã±ãŒã·ã§ã³ã§äœ¿çšãããããŒã¿ãè¡šãããã«éåžžã«åœ¹ç«ã¡ãŸãã
=== åŒãšæŒç®å ===
ãåŒãã¯ãèšç®ãè¡šããã®ã§ãããäžé£ã®ãæŒç®åããšããªãã©ã³ãããšåŒã°ããå€ãå«ã¿ãŸãã æŒç®åã«ã¯ãç®è¡æŒç®åïŒå ç®ãæžç®ãä¹ç®ãé€ç®ãªã©ïŒãæ¯èŒæŒç®åããããæŒç®åãè«çæŒç®åãªã©ããããŸãã ãªãã©ã³ãã¯ãæŒç®åã«ãã£ãŠå®è¡ãããèšç®ã®å¯Ÿè±¡ãšãªãå€ãè¡šããå€æ°ãå®æ°ãé¢æ°åŒã³åºããªã©ãå«ãŸããŸãã
äžé£ã®æŒç®åã䜿çšããŠãåŒãçµã¿åãããŠè€éãªåŒãäœæããããšãã§ããŸãã ãããã®åŒã¯ãããã°ã©ã å
ã®åçš®ã¿ã¹ã¯ãäŸãã°èšç®ãæ¯èŒãè«çæŒç®ãæ¡ä»¶åå²ãªã©ã«äœ¿çšãããŸãã
=== å¶åŸ¡æ§é ===
å¶åŸ¡æ§é ãšã¯ãããã°ã©ã ã®æµããå¶åŸ¡ããããã®ä»çµã¿ã®ããšã§ããããã°ã©ãã³ã°ã§ã¯ãæ¡ä»¶åå²ãç¹°ãè¿ãã®åŠçãªã©ãå¶åŸ¡æ§é ã®äžäŸã§ãã
æ¡ä»¶åå²ãšã¯ãããæ¡ä»¶ãæºãããããšãã«ç¹å®ã®åŠçãå®è¡ããä»çµã¿ã§ããäŸãã°ãããæ°ã0ãã倧ããå Žåã«ã¯ãæ£ã®æ°ã§ãããšè¡šç€ºãã0以äžã®å Žåã«ã¯ã0ãŸãã¯è² ã®æ°ã§ãããšè¡šç€ºãããããªåŠçããæ¡ä»¶åå²ã䜿ã£ãŠæžãããšãã§ããŸãã
ç¹°ãè¿ãã®åŠçãšã¯ãåãåŠçãç¹°ãè¿ãä»çµã¿ã§ããäŸãã°ã1ãã10ãŸã§ã®æ°ãå
šãŠè¡šç€ºãããããªåŠçããç¹°ãè¿ãã®åŠçã䜿ã£ãŠæžãããšãã§ããŸãã
ããã°ã©ãã³ã°èšèªã«ãã£ãŠã¯ãifæãforæãªã©ã®å
·äœçãªæ§æãçšæãããŠãããããããçµã¿åãããŠå¶åŸ¡æ§é ãå®çŸããŸãããŸããé¢æ°ããªããžã§ã¯ãæåããã°ã©ãã³ã°ãªã©ã®ææ³ããå¶åŸ¡æ§é ã®å®çŸã«åœ¹ç«ã¡ãŸãã
{{ã³ã©ã |ããã°ã©ãã³ã°èšèªãšä»£æ°åŠã®é¡äŒŒç¹ãšå·®ç°ã«ã€ããŠ|2=ããã°ã©ãã³ã°èšèªãšä»£æ°åŠã«ã¯ãããã€ãã®é¡äŒŒç¹ãšå·®ç°ããããŸãã
é¡äŒŒç¹ïŒ
;èšå·ãæ§æã«äŸåãã:äž¡æ¹ãšããç¹å®ã®èšå·ãæ§æã«äŸåããŠããŸãã代æ°åŠã§ã¯ãèšå·ã®é
眮ãšæŒç®åã®äœ¿çšãéèŠã§ããããã°ã©ãã³ã°èšèªã§ãåæ§ã§ãç¹å®ã®æ§æã䜿çšããŠãåŠçãè¡ããŸãã
;è«ççãªæŒç®ãå¿
èŠ:代æ°åŠã§ã¯ãè«ççãªæŒç®ãå¿
èŠã§ããããã°ã©ãã³ã°èšèªã§ããå¶åŸ¡ãããŒãå¶åŸ¡ããããã«è«ççãªæŒç®ãå¿
èŠã«ãªããŸãã
;èšç®çµæã«åºã¥ãåŠç:äž¡æ¹ãšããèšç®çµæã«åºã¥ããŠåŠçãè¡ããŸãã代æ°åŠã§ã¯ãèšç®çµæã次ã®æŒç®ã«äœ¿çšããããšãã§ããŸããããã°ã©ãã³ã°èšèªã§ãåæ§ã§ãã
;å€æ°:ããã°ã©ãã³ã°èšèªãšä»£æ°åŠã®äž¡æ¹ã§ãå€æ°ã¯å€ãæ ŒçŽããããã«äœ¿çšãããŸããå€æ°ã«ã¯ãæ°å€ãæååãçåœå€ãªã©ãç°ãªãããŒã¿åã®å€ãæ ŒçŽã§ããŸãã
;é¢æ°:ããã°ã©ãã³ã°èšèªãšä»£æ°åŠã®äž¡æ¹ã§ãé¢æ°ã¯äžé£ã®åœä»€ãŸãã¯åŒã®ã°ã«ãŒãã§ãããå
¥åãšåºåãååŸããããšãã§ããŸãã代æ°åŠã§ã¯ãé¢æ°ã¯äžè¬ã«æ°åŠçãªåŒã§è¡šãããäžé£ã®å
¥åå€ãåãåããåºåå€ãçæããŸããããã°ã©ãã³ã°èšèªã§ã¯ãé¢æ°ã¯ã³ãŒãå
ã§å®çŸ©ãããäžé£ã®å
¥åå€ãåãåããåºåå€ãè¿ãããšãã§ããŸãã
;代å
¥:ããã°ã©ãã³ã°èšèªãšä»£æ°åŠã®äž¡æ¹ã§ã代å
¥ã¯å€æ°ã«å€ãå²ãåœãŠãããã«äœ¿çšãããŸãã
;åŒ:ããã°ã©ãã³ã°èšèªãšä»£æ°åŠã®äž¡æ¹ã§ãåŒã¯æ°å€ãå€æ°ãªã©ã®èŠçŽ ãå«ãæ°åŠçãŸãã¯è«ççãªåŒã§ãããèšç®ãå®è¡ããããã«äœ¿çšãããŸãã
;æŒç®å:ããã°ã©ãã³ã°èšèªãšä»£æ°åŠã®äž¡æ¹ã§ãæŒç®åã¯åŒå
ã§äœ¿çšãããå€ãçµåããããæ¯èŒããããæäœãããããããã«äœ¿çšãããŸãã
å·®ç°ïŒ
;ç®çã®éã:代æ°åŠã¯ãæ°åŠçãªçè«ãåé¡ã解決ããããšã«çŠç¹ãåœãŠãŠããŸããããã°ã©ãã³ã°èšèªã¯ãå®éã®ã¢ããªã±ãŒã·ã§ã³ããœãããŠã§ã¢ãéçºããããšã«çŠç¹ãåœãŠãŠããŸãã
;èšèªã®çš®é¡:代æ°åŠã«ã¯ãããã€ãã®çš®é¡ã®ä»£æ°åŠããããŸããããã«å¯ŸããŠãããã°ã©ãã³ã°èšèªã«ã¯ãå€ãã®ç°ãªãçš®é¡ã®èšèªããããŸãã
;ããŒã«ã®éã:代æ°åŠã«ã¯ãçŽãšéçãé»åãå¿
èŠã§ããäžæ¹ãããã°ã©ãã³ã°èšèªã§ã¯ãã³ã³ãã¥ãŒã¿ãŒäžã§å®è¡ããããããéçºã«ã¯ã³ã³ãã¥ãŒã¿ãŒãšéçºããŒã«ãå¿
èŠã§ãã
;粟床ã®éã:代æ°åŠã¯ãå³å¯ãªæ°åŠç蚌æã«åºã¥ããŠããŸããäžæ¹ãããã°ã©ãã³ã°èšèªã¯ãè¿äŒŒå€ãå®è£
ã®éçã«åºã¥ããŠããŸãã
;åŒ:代æ°åŠã§ã¯ãæ°åŠçãªåŒã¯åžžã«çåŒã§ãããå·ŠåŽãšå³åŽãçããããšã瀺ããŸããããããããã°ã©ãã³ã°èšèªã§ã¯ãåŒã¯åã«èšç®ãè¡šãããšãã§ããŸãã
;åŒãšæŒç®å:ããã°ã©ãã³ã°èšèªã§ã¯ãåŒãšæŒç®åã¯éåžžãã³ãŒãå
ã§èšè¿°ãããæååã®åœ¢åŒã§è¡šãããŸãããããã代æ°åŠã§ã¯ãæ°åŠçãªåŒã¯äžè¬ã«èšå·ãæåã§è¡šãããŸãã
;å€æ°ãšä»£å
¥:ããã°ã©ãã³ã°èšèªã§ã¯ãå€æ°ã®åã«ãã£ãŠã代å
¥ã§ããå€ãç°ãªããŸãããããã代æ°åŠã§ã¯ãå€æ°ã«ã¯ç¹å®ã®åã¯ãããŸããã
;é¢æ°:ããã°ã©ãã³ã°èšèªã§ã¯ãé¢æ°ã¯å
¥åå€ã«å¿ããŠç°ãªãåºåãçæã§ããŸããã代æ°åŠã§ã¯ãåãå
¥åã«å¯ŸããŠåžžã«åãåºåãçæããé¢æ°ã®ã¿ãèæ
®ãããŸãã
以äžããããã°ã©ãã³ã°èšèªãšä»£æ°åŠã®é¡äŒŒç¹ãšå·®ç°ã§ãã
ããã°ã©ãã³ã°èšèªã«ãã£ãŠã¯ãããæ°åŠãããªèšèªïŒãªã©é¢æ°åããã°ã©ãã³ã°èšèªïŒããããèšèªã«ããå·®ç°ãšå
±éç¹ãç°ãªã£ãŠããŸãã
}}
== é¢æ°ãšã¢ãžã¥ãŒã« ==
=== é¢æ°ã®å®çŸ©ãšåŒã³åºã ===
=== ã¢ãžã¥ãŒã«ã®æŠå¿µ ===
=== æšæºã©ã€ãã©ãªã®å©çš ===
=== ããã°ã©ã ã®æ§é å ===
== é
åãšé£æ³é
å ==
=== é
åã®æŠå¿µãšå©çšæ¹æ³ ===
=== é£æ³é
åã®æŠå¿µãšå©çšæ¹æ³ ===
=== å€æ¬¡å
é
å ===
=== é
åã®æäœãšã¢ã«ãŽãªãºã ===
== ãªããžã§ã¯ãæåããã°ã©ãã³ã° ==
=== ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã®æŠå¿µ ===
=== ã¯ã©ã¹ãšãªããžã§ã¯ã ===
=== ç¶æ¿ãããªã¢ãŒãã£ãºã ãã«ãã»ã«å ===
=== ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã®å¿çšäŸ ===
== é¢æ°åããã°ã©ãã³ã° ==
== ãã¡ã€ã«å
¥åºå ==
=== ãã¡ã€ã«å
¥åºåã®æŠèŠ ===
=== ãã¡ã€ã«ã®çš®é¡ãšæäœæ¹æ³ ===
=== ããã¹ããã¡ã€ã«ãšãã€ããªãã¡ã€ã« ===
=== ãã¡ã€ã«å
¥åºåã®å¿çšäŸ ===
== ãããã°ãšãã¹ã ==
=== ãããã°ã®æŠèŠ ===
=== ãããã°ã®ææ³ãšããŒã« ===
=== åäœãã¹ããšçµåãã¹ã ===
=== ãã¹ãé§åéçºïŒTDDïŒã®æŠå¿µ ===
== ã¢ã«ãŽãªãºã ãšããŒã¿æ§é ==
=== ã¢ã«ãŽãªãºã ã®æŠèŠ ===
=== ãœãŒããæ¢çŽ¢ãååž° ===
=== ã¹ã¿ãã¯ããã¥ãŒããªã¹ã ===
=== ããªãŒãã°ã©ã ===
== ããã°ã©ãã³ã°ã®å¿çš ==
=== ãŠã§ãã¢ããªã±ãŒã·ã§ã³éçº ===
=== ããŒã¿ããŒã¹ãšSQL ===
=== ãããã¯ãŒã¯ããã°ã©ãã³ã° ===
=== ã²ãŒã ããã°ã©ãã³ã° ===
[[ã«ããŽãª:ããã°ã©ãã³ã°|*]] | 2023-03-06T00:41:23Z | 2024-01-25T23:50:05Z | [
"ç¹å¥:åæ¹äžèŽããŒãžäžèŠ§/ããã°ã©ãã³ã°",
"ãã³ãã¬ãŒã:---",
"ãã³ãã¬ãŒã:ã³ã©ã ",
"ãã³ãã¬ãŒã:Main"
] | https://ja.wikibooks.org/wiki/%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0/ |
37,131 | UNIXå
¥é | ãã®æç§æžã§ã¯ãUNIXãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã«ã€ããŠã®åºæ¬çãªæŠå¿µãšæäœæ¹æ³ã«ã€ããŠèª¬æããŸããUNIXã¯ãå€ãã®ããã°ã©ããŒããšã³ãžãã¢ã«ãã£ãŠåºã䜿çšãããŠãããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§ãããç¹ã«ã³ãã³ãã©ã€ã³ã§ã®äœæ¥ã«é·ããŠããŸãããã®æç§æžãéããŠãããªãã¯UNIXã®åºæ¬çãªæäœæ¹æ³ãåŠã³ãUNIXã䜿çšããŠã¿ã¹ã¯ãå®è¡ããããã®ã¹ãã«ã身ã«ã€ããããšãã§ããŸãã
ãUNIX/Linuxå
¥éãããããŸãã
UNIXã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®äžçš®ã§ãå€ãã®ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã§åºã䜿çšãããŠããŸããUNIXã¯ããã«ãã¿ã¹ã¯ããã«ããŠãŒã¶ãŒã®ã·ã¹ãã ã§ããããŠãŒã¶ãŒãåæã«è€æ°ã®ã¿ã¹ã¯ãå®è¡ã§ããããšãç¹åŸŽçã§ãã
UNIXã¯ãããã°ã©ããç 究è
ãªã©ã®æè¡è
ãã¡ãéçºãããã®ã§ãåæã®ããŒãžã§ã³ã¯äž»ã«å€§åŠãç 究æã§äœ¿çšãããŠããŸããããã®åŸãåçšåãããå€ãã®äŒæ¥ãUNIXãæ¡çšããçŸåšã§ã¯å€ãã®ãµãŒããŒãã¹ãŒããŒã³ã³ãã¥ãŒã¿ãŒã«äœ¿çšãããŠããŸãã
UNIXã®ç¹åŸŽã®1ã€ã¯ãã³ãã³ãã©ã€ã³ã€ã³ã¿ãã§ãŒã¹ã䜿çšããããšã§ããã³ãã³ãã©ã€ã³ã€ã³ã¿ãã§ãŒã¹ã¯ãããã¹ãããŒã¹ã®ã³ãã³ãã䜿çšããŠã·ã¹ãã ãæäœããæ¹æ³ã§ãããUNIXã®åŒ·åãªæ©èœã®1ã€ã§ãããŸããUNIXã¯ãã·ã¹ãã ãæ§æããããã®æšæºçãªããŒã«ã»ãããæäŸããŠãããã·ã¹ãã ã®ç®¡çãéçºãç°¡åã«ãªããŸãã
UNIXã¯ããããã¯ãŒã¯æ©èœã匷åã«ãµããŒãããŠãããã€ã³ã¿ãŒãããã®æé·ã«å€§ããè²¢ç®ããŠããŸãããŸããUNIXã¯ããªãŒãã³ãœãŒã¹ãœãããŠã§ã¢ã§ãããããå€ãã®ãŠãŒã¶ãŒãã·ã¹ãã ãæ¹è¯ããæ°ããã¢ããªã±ãŒã·ã§ã³ãéçºããããšãã§ããŸãã
UNIXã¯ãå€ãã®ããªãšãŒã·ã§ã³ãååšããŠãããããããç°ãªãç®çãç°å¢ã«æé©åãããŠããŸãã代衚çãªUNIXã®ããªãšãŒã·ã§ã³ã«ã¯ãFreeBSDãOpenBSDãSolarisãªã©ããããŸãã
UNIXã¯ãé«åºŠãªãŠãŒã¶ãŒã«ãšã£ãŠéåžžã«ãã¯ãã«ã§ããããåå¿è
ã¯åŠç¿ã«æéããããããšããããŸããããããUNIXãåŠç¿ããããšã¯ãããã°ã©ããŒãã·ã¹ãã 管çè
ã«ãšã£ãŠéåžžã«åœ¹ç«ã€ã¹ãã«ã§ãããã³ã³ãã¥ãŒã¿ãŒãµã€ãšã³ã¹åéã§éèŠãªåœ¹å²ãæãããŠããŸãã
ãã®ç« ã§ã¯ãUNIXã§äœ¿çšãããäžè¬çãªã³ãã³ãã«ã€ããŠèª¬æããŸããUNIXã¯ãå€ãã®ã³ãã³ããããããããã®ã³ãã³ãã¯ããã¡ã€ã«ã®æäœãããã»ã¹ã®ç®¡çãã·ã¹ãã æ
å ±ã®ååŸãªã©ã®æ§ã
ãªç®çã«äœ¿çšãããŸãããã®ç« ã§ã¯ããããã®ã³ãã³ãã«ã€ããŠè©³ãã説æããã³ãã³ãã®å®è¡æ¹æ³ãåŠã³ãŸãã
UNIXã®ãã¡ã€ã«æäœã³ãã³ãã«ã¯ã以äžã®ãããªãã®ããããŸãã
lsã³ãã³ãã¯ãæå®ããããã£ã¬ã¯ããªå
ã®ãã¡ã€ã«ããã£ã¬ã¯ããªãäžèŠ§è¡šç€ºããããã«äœ¿çšãããŸãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
cdã³ãã³ãã¯ãçŸåšã®ãã£ã¬ã¯ããªãå€æŽããããã«äœ¿çšãããŸãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
mkdirã³ãã³ãã¯ãæå®ããããã£ã¬ã¯ããªãäœæããããã«äœ¿çšãããŸãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
rmdirã³ãã³ãã¯ããã£ã¬ã¯ããªãåé€ããããã«äœ¿çšãããŸãããã ãããã®ã³ãã³ãã¯ãåé€ããããšããŠãããã£ã¬ã¯ããªã空ã§ããå Žåã«ã®ã¿æ©èœããŸãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
cpã³ãã³ãã¯ããã¡ã€ã«ããã£ã¬ã¯ããªãã³ããŒããããã«äœ¿çšãããŸãã
以äžã¯äžè¬çãªäœ¿çšäŸã§ãã
mvã³ãã³ãã¯ããã¡ã€ã«ããã£ã¬ã¯ããªã移åãŸãã¯ååãå€æŽããããã«äœ¿çšãããŸãã
以äžã¯äžè¬çãªäœ¿çšäŸã§ãã
lnã³ãã³ãã¯ããã¡ã€ã«ããã£ã¬ã¯ããªãžã®ãªã³ã¯ãäœæããããã«äœ¿çšãããŸãã
以äžã¯äžè¬çãªäœ¿çšäŸã§ãã
UNIXã®rmã³ãã³ãã¯ãæå®ããããã¡ã€ã«ããã£ã¬ã¯ããªãåé€ããããã«äœ¿çšãããŸãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
catã³ãã³ãã¯ããã¡ã€ã«ã®å
容ã衚瀺ããããã«äœ¿çšãããŸãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
touchã³ãã³ãã¯ãæ°ãã空ã®ãã¡ã€ã«ãäœæããããã«äœ¿çšãããŸãããŸããæ¢åã®ãã¡ã€ã«ã®ã¿ã€ã ã¹ã¿ã³ããæŽæ°ããããšãã§ããŸãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
UNIXã®ã·ã¹ãã 管çã³ãã³ãã«ã¯ã以äžã®ãããªãã®ããããŸãã
suã³ãã³ãã¯ãå¥ã®ãŠãŒã¶ãŒã«åãæ¿ããããã«äœ¿çšãããŸããrootãŠãŒã¶ãŒã«ãªãããã«äœ¿çšãããããšãäžè¬çã§ãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
chmodã³ãã³ãã¯ããã¡ã€ã«ãŸãã¯ãã£ã¬ã¯ããªã®ã¢ã¯ã»ã¹èš±å¯ãå€æŽããããã«äœ¿çšãããŸãããã¡ã€ã«ã·ã¹ãã ã¯ãåãã¡ã€ã«ããã£ã¬ã¯ããªã«å¯ŸããŠãææè
ãã°ã«ãŒãããã®ä»ã®ãŠãŒã¶ãŒã®ã¢ã¯ã»ã¹èš±å¯ã管çããŸãã chmodã³ãã³ãã¯ããããã®ã¢ã¯ã»ã¹èš±å¯ãå€æŽããããã«äœ¿çšãããŸãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
chownã³ãã³ãã¯ããã¡ã€ã«ãŸãã¯ãã£ã¬ã¯ããªã®ææè
ãå€æŽããããã«äœ¿çšãããŸããææè
ã¯ããã¡ã€ã«ãŸãã¯ãã£ã¬ã¯ããªãææããã³ã³ãããŒã«ãããŠãŒã¶ãŒã§ãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
chgrpã³ãã³ãã¯ããã¡ã€ã«ãŸãã¯ãã£ã¬ã¯ããªã®ã°ã«ãŒããå€æŽããããã«äœ¿çšãããŸããã°ã«ãŒãã¯ããã¡ã€ã«ãŸãã¯ãã£ã¬ã¯ããªã«ã¢ã¯ã»ã¹ããããšãã§ãããŠãŒã¶ãŒã®éåãå®çŸ©ããŸãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
UNIXã®ããã»ã¹ç®¡çã³ãã³ãã«ã¯ã以äžã®ãããªãã®ããããŸãã
psã³ãã³ãã¯ãå®è¡äžã®ããã»ã¹ã®æ
å ±ã衚瀺ããããã«äœ¿çšãããŸãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
killã³ãã³ãã¯ãå®è¡äžã®ããã»ã¹ãåæ¢ããããã«äœ¿çšãããŸãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
UNIXã«ã¯ã以äžã®ãããªãã¡ã€ã«æ€çŽ¢é¢ä¿ã®ã³ãã³ãããããŸãã
UNIXã«ã¯ããããã¯ãŒã¯é¢ä¿ã®ã³ãã³ããè±å¯ã«ãããŸãã
以äžã¯ããããã®ã³ãã³ãã®äž»ãªãŠãŒã¹ã±ãŒã¹ã®äŸã§ãã
ãããã®ã³ãã³ãã¯ããããã¯ãŒã¯ã®ãã©ãã«ã·ã¥ãŒãã£ã³ã°ãèšå®ãããã³ããŒã¿ã®è»¢éã«åœ¹ç«ã¡ãŸãã
UNIXã®ã·ã¹ãã æ
å ±é¢ä¿ã®ã³ãã³ãã«ã¯ã以äžã®ãããªãŠãŒã¹ã±ãŒã¹ããããŸãã
ãã®ç« ã§ã¯ãUNIXã§äœ¿çšãããäžè¬çãªãŠãŒãã£ãªãã£ã«ã€ããŠèª¬æããŸããUNIXã¯ãå€ãã®ãŠãŒãã£ãªãã£ãããããããã®ãŠãŒãã£ãªãã£ã¯ãã¢ãŒã«ã€ãã®æäœããã¡ã€ã«ãã¹ããªãŒã ã®å§çž®ã»äŒžé·ãªã©ã®æ§ã
ãªç®çã«äœ¿çšãããŸãããã®ç« ã§ã¯ããããã®ãŠãŒãã£ãªãã£ã«ã€ããŠè©³ãã説æãããŠãŒãã£ãªãã£ã®å®è¡æ¹æ³ãåŠã³ãŸãã
tarã¯ããã¡ã€ã«ããã£ã¬ã¯ããªãã¢ãŒã«ã€ãããå§çž®ããããã«äœ¿çšãããŸãã 以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
cpioã¯ããã¡ã€ã«ããã£ã¬ã¯ããªãã¢ãŒã«ã€ãããå§çž®ããããã«äœ¿çšãããŸãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
compress ã³ãã³ãã¯ãUãã¡ã€ã«ãå§çž®ããããã«äœ¿çšãããã³ãã³ãã§ããå§çž®ããããã¡ã€ã«ã®æ¡åŒµå㯠.Z ã«ãªããŸãã
以äžã¯ãcompress ã³ãã³ãã®äžè¬çãªäœ¿çšäŸã§ãã
å§çž®ã»äŒžé·ããµããŒãããããã°ã©ã ã¯ãUNIXã®äžéšã§ãã pack ã compress ã®ä»ã«ããµãŒãããŒãã£ããæ§ã
ãªã©ã€ã»ã³ã¹ã§é
åžãããŠããŸãã ããã§ã¯äž»èŠãªãã®ã ãæ±ããŸãã
gzip ã¯ããã¡ã€ã«ãå§çž®ããããã«äœ¿çšãããããŸããgzip ã¯UNIXã®äžéšã§ã¯ãªãGNUãããžã§ã¯ããGPLã®å
é
åžããŠããŸããå§çž®ããããã¡ã€ã«ã®æ¡åŒµå㯠.gz ã«ãªããŸãã
以äžã¯ãgzip ã®äžè¬çãªäœ¿çšäŸã§ãã
xz ã¯ããã¡ã€ã«ãå§çž®ããããã«äœ¿çšãããŸããxz ã¯UNIXã®äžéšã§ã¯ãªãLasse Collinãéçºãããããªãã¯ãã¡ã€ã³ãªãœãããŠã§ã¢ã§ããå§çž®ããããã¡ã€ã«ã®æ¡åŒµå㯠.xz ã«ãªããŸãã以äžã¯ãxz ã³ãã³ãã®äžè¬çãªäœ¿çšäŸã§ãã
å§çž®ã»äŒžé·ããµããŒãããããã°ã©ã ã¯ãå€å²ã«ãããã®ã§ããã§ã¯ååãšç¹åŸŽãåæããã«ãšã©ããŸãã
ã·ã§ã«(Shell)ã¯ãã³ã³ãã¥ãŒã¿ã®ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã äžã§åäœããã³ãã³ãã©ã€ã³ã€ã³ã¿ãŒãã§ãŒã¹ãæäŸããããã°ã©ã ã§ãããŠãŒã¶ãŒãããŒããŒãããå
¥åããã³ãã³ãã解éããŠããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®æ©èœãåŒã³åºããŸããäžè¬çã«ãã·ã§ã«ã¯UNIXããã³Linuxã·ã¹ãã ã§äœ¿çšãããŸãã
ã·ã§ã«ã¹ã¯ãªãã(Shell script)ã¯ãã·ã§ã«ã解éã§ããããã°ã©ã ã®äžçš®ã§ãããã·ã§ã«ã³ãã³ããèšè¿°ããããã¹ããã¡ã€ã«ã§ããã·ã§ã«ã¹ã¯ãªãããäœæããããšã§ãè€æ°ã®ã·ã§ã«ã³ãã³ããäžåºŠã«å®è¡ããããç¹°ãè¿ãåŠçãè¡ã£ãããæ¡ä»¶åå²ãè¡ã£ããããããšãã§ããŸããã·ã§ã«ã¹ã¯ãªããã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®èªååããããåŠçããã¹ãèªååããã°ã®è§£æãªã©ãå€ãã®ç®çã§äœ¿çšãããŸããã·ã§ã«ã¹ã¯ãªããã¯ãcshãbashãshãzshãªã©ã®ã·ã§ã«ã§å®è¡ã§ããŸãã
UNIXã®ã·ã§ã«(ã³ãã³ãã€ã³ã¿ãŒããªã¿)ã¯ã眮ãæãå¯èœã§ãå€æ°ã®ã·ã§ã«ãéçºãããŠããŸãã
以äžã«ããããã®ç¹åŸŽã説æããŸãã
以äžã®ç¹åŸŽãããéžæããã·ã§ã«ã¯ããã®ç®çãéçºã®å¿
èŠæ§ã«å¿ããŠç°ãªãå ŽåããããŸãã
ãã®ç« ã§ã¯ãUNIXã®ãã¡ã€ã«ã·ã¹ãã ãšããŒããã·ã§ã³ã«ã€ããŠèª¬æããŸããUNIXã¯ããã¡ã€ã«ã·ã¹ãã ãåºæ¬ãšããŠåäœããŠããããã¡ã€ã«ããã£ã¬ã¯ããªãæäœããããšãã§ããŸãããŸããUNIXã§ã¯ããã¡ã€ã«ããã£ã¬ã¯ããªã«å¯Ÿããã¢ã¯ã»ã¹æš©éãéèŠã§ãã
UNIXã«ãŒãã«ã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®äžæ žãšãªããœãããŠã§ã¢ã§ããããŠãŒã¶ãŒãã³ã³ãã¥ãŒã¿ãŒãæäœããããã®æ§ã
ãªæ©èœãæäŸããŸãã
以äžã«ãUNIXã«ãŒãã«ãæäŸãã代衚çãªæ©èœãããã€ãæããŸãã
ãããã®æ©èœã¯ããŠãŒã¶ãŒãã³ã³ãã¥ãŒã¿ãŒãå¹ççã«å©çšã§ããããã«ããããã«äžå¯æ¬ ã§ããUNIXã«ãŒãã«ã¯ãå€ãã®ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã«åºç€ãæäŸããŠããŸãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "ãã®æç§æžã§ã¯ãUNIXãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã«ã€ããŠã®åºæ¬çãªæŠå¿µãšæäœæ¹æ³ã«ã€ããŠèª¬æããŸããUNIXã¯ãå€ãã®ããã°ã©ããŒããšã³ãžãã¢ã«ãã£ãŠåºã䜿çšãããŠãããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§ãããç¹ã«ã³ãã³ãã©ã€ã³ã§ã®äœæ¥ã«é·ããŠããŸãããã®æç§æžãéããŠãããªãã¯UNIXã®åºæ¬çãªæäœæ¹æ³ãåŠã³ãUNIXã䜿çšããŠã¿ã¹ã¯ãå®è¡ããããã®ã¹ãã«ã身ã«ã€ããããšãã§ããŸãã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ãUNIX/Linuxå
¥éãããããŸãã",
"title": ""
},
{
"paragraph_id": 2,
"tag": "p",
"text": "UNIXã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®äžçš®ã§ãå€ãã®ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã§åºã䜿çšãããŠããŸããUNIXã¯ããã«ãã¿ã¹ã¯ããã«ããŠãŒã¶ãŒã®ã·ã¹ãã ã§ããããŠãŒã¶ãŒãåæã«è€æ°ã®ã¿ã¹ã¯ãå®è¡ã§ããããšãç¹åŸŽçã§ãã",
"title": "UNIXãšã¯"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "UNIXã¯ãããã°ã©ããç 究è
ãªã©ã®æè¡è
ãã¡ãéçºãããã®ã§ãåæã®ããŒãžã§ã³ã¯äž»ã«å€§åŠãç 究æã§äœ¿çšãããŠããŸããããã®åŸãåçšåãããå€ãã®äŒæ¥ãUNIXãæ¡çšããçŸåšã§ã¯å€ãã®ãµãŒããŒãã¹ãŒããŒã³ã³ãã¥ãŒã¿ãŒã«äœ¿çšãããŠããŸãã",
"title": "UNIXãšã¯"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "UNIXã®ç¹åŸŽã®1ã€ã¯ãã³ãã³ãã©ã€ã³ã€ã³ã¿ãã§ãŒã¹ã䜿çšããããšã§ããã³ãã³ãã©ã€ã³ã€ã³ã¿ãã§ãŒã¹ã¯ãããã¹ãããŒã¹ã®ã³ãã³ãã䜿çšããŠã·ã¹ãã ãæäœããæ¹æ³ã§ãããUNIXã®åŒ·åãªæ©èœã®1ã€ã§ãããŸããUNIXã¯ãã·ã¹ãã ãæ§æããããã®æšæºçãªããŒã«ã»ãããæäŸããŠãããã·ã¹ãã ã®ç®¡çãéçºãç°¡åã«ãªããŸãã",
"title": "UNIXãšã¯"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "UNIXã¯ããããã¯ãŒã¯æ©èœã匷åã«ãµããŒãããŠãããã€ã³ã¿ãŒãããã®æé·ã«å€§ããè²¢ç®ããŠããŸãããŸããUNIXã¯ããªãŒãã³ãœãŒã¹ãœãããŠã§ã¢ã§ãããããå€ãã®ãŠãŒã¶ãŒãã·ã¹ãã ãæ¹è¯ããæ°ããã¢ããªã±ãŒã·ã§ã³ãéçºããããšãã§ããŸãã",
"title": "UNIXãšã¯"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "UNIXã¯ãå€ãã®ããªãšãŒã·ã§ã³ãååšããŠãããããããç°ãªãç®çãç°å¢ã«æé©åãããŠããŸãã代衚çãªUNIXã®ããªãšãŒã·ã§ã³ã«ã¯ãFreeBSDãOpenBSDãSolarisãªã©ããããŸãã",
"title": "UNIXãšã¯"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "UNIXã¯ãé«åºŠãªãŠãŒã¶ãŒã«ãšã£ãŠéåžžã«ãã¯ãã«ã§ããããåå¿è
ã¯åŠç¿ã«æéããããããšããããŸããããããUNIXãåŠç¿ããããšã¯ãããã°ã©ããŒãã·ã¹ãã 管çè
ã«ãšã£ãŠéåžžã«åœ¹ç«ã€ã¹ãã«ã§ãããã³ã³ãã¥ãŒã¿ãŒãµã€ãšã³ã¹åéã§éèŠãªåœ¹å²ãæãããŠããŸãã",
"title": "UNIXãšã¯"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "ãã®ç« ã§ã¯ãUNIXã§äœ¿çšãããäžè¬çãªã³ãã³ãã«ã€ããŠèª¬æããŸããUNIXã¯ãå€ãã®ã³ãã³ããããããããã®ã³ãã³ãã¯ããã¡ã€ã«ã®æäœãããã»ã¹ã®ç®¡çãã·ã¹ãã æ
å ±ã®ååŸãªã©ã®æ§ã
ãªç®çã«äœ¿çšãããŸãããã®ç« ã§ã¯ããããã®ã³ãã³ãã«ã€ããŠè©³ãã説æããã³ãã³ãã®å®è¡æ¹æ³ãåŠã³ãŸãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "UNIXã®ãã¡ã€ã«æäœã³ãã³ãã«ã¯ã以äžã®ãããªãã®ããããŸãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "lsã³ãã³ãã¯ãæå®ããããã£ã¬ã¯ããªå
ã®ãã¡ã€ã«ããã£ã¬ã¯ããªãäžèŠ§è¡šç€ºããããã«äœ¿çšãããŸãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "cdã³ãã³ãã¯ãçŸåšã®ãã£ã¬ã¯ããªãå€æŽããããã«äœ¿çšãããŸãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 13,
"tag": "p",
"text": "以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 14,
"tag": "p",
"text": "mkdirã³ãã³ãã¯ãæå®ããããã£ã¬ã¯ããªãäœæããããã«äœ¿çšãããŸãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 15,
"tag": "p",
"text": "以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 16,
"tag": "p",
"text": "rmdirã³ãã³ãã¯ããã£ã¬ã¯ããªãåé€ããããã«äœ¿çšãããŸãããã ãããã®ã³ãã³ãã¯ãåé€ããããšããŠãããã£ã¬ã¯ããªã空ã§ããå Žåã«ã®ã¿æ©èœããŸãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 17,
"tag": "p",
"text": "以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 18,
"tag": "p",
"text": "cpã³ãã³ãã¯ããã¡ã€ã«ããã£ã¬ã¯ããªãã³ããŒããããã«äœ¿çšãããŸãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 19,
"tag": "p",
"text": "以äžã¯äžè¬çãªäœ¿çšäŸã§ãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 20,
"tag": "p",
"text": "mvã³ãã³ãã¯ããã¡ã€ã«ããã£ã¬ã¯ããªã移åãŸãã¯ååãå€æŽããããã«äœ¿çšãããŸãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 21,
"tag": "p",
"text": "以äžã¯äžè¬çãªäœ¿çšäŸã§ãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 22,
"tag": "p",
"text": "lnã³ãã³ãã¯ããã¡ã€ã«ããã£ã¬ã¯ããªãžã®ãªã³ã¯ãäœæããããã«äœ¿çšãããŸãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 23,
"tag": "p",
"text": "以äžã¯äžè¬çãªäœ¿çšäŸã§ãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 24,
"tag": "p",
"text": "UNIXã®rmã³ãã³ãã¯ãæå®ããããã¡ã€ã«ããã£ã¬ã¯ããªãåé€ããããã«äœ¿çšãããŸãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 25,
"tag": "p",
"text": "以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 26,
"tag": "p",
"text": "catã³ãã³ãã¯ããã¡ã€ã«ã®å
容ã衚瀺ããããã«äœ¿çšãããŸãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 27,
"tag": "p",
"text": "以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 28,
"tag": "p",
"text": "touchã³ãã³ãã¯ãæ°ãã空ã®ãã¡ã€ã«ãäœæããããã«äœ¿çšãããŸãããŸããæ¢åã®ãã¡ã€ã«ã®ã¿ã€ã ã¹ã¿ã³ããæŽæ°ããããšãã§ããŸãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 29,
"tag": "p",
"text": "以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 30,
"tag": "p",
"text": "UNIXã®ã·ã¹ãã 管çã³ãã³ãã«ã¯ã以äžã®ãããªãã®ããããŸãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 31,
"tag": "p",
"text": "suã³ãã³ãã¯ãå¥ã®ãŠãŒã¶ãŒã«åãæ¿ããããã«äœ¿çšãããŸããrootãŠãŒã¶ãŒã«ãªãããã«äœ¿çšãããããšãäžè¬çã§ãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 32,
"tag": "p",
"text": "以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 33,
"tag": "p",
"text": "chmodã³ãã³ãã¯ããã¡ã€ã«ãŸãã¯ãã£ã¬ã¯ããªã®ã¢ã¯ã»ã¹èš±å¯ãå€æŽããããã«äœ¿çšãããŸãããã¡ã€ã«ã·ã¹ãã ã¯ãåãã¡ã€ã«ããã£ã¬ã¯ããªã«å¯ŸããŠãææè
ãã°ã«ãŒãããã®ä»ã®ãŠãŒã¶ãŒã®ã¢ã¯ã»ã¹èš±å¯ã管çããŸãã chmodã³ãã³ãã¯ããããã®ã¢ã¯ã»ã¹èš±å¯ãå€æŽããããã«äœ¿çšãããŸãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 34,
"tag": "p",
"text": "以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 35,
"tag": "p",
"text": "chownã³ãã³ãã¯ããã¡ã€ã«ãŸãã¯ãã£ã¬ã¯ããªã®ææè
ãå€æŽããããã«äœ¿çšãããŸããææè
ã¯ããã¡ã€ã«ãŸãã¯ãã£ã¬ã¯ããªãææããã³ã³ãããŒã«ãããŠãŒã¶ãŒã§ãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 36,
"tag": "p",
"text": "以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 37,
"tag": "p",
"text": "chgrpã³ãã³ãã¯ããã¡ã€ã«ãŸãã¯ãã£ã¬ã¯ããªã®ã°ã«ãŒããå€æŽããããã«äœ¿çšãããŸããã°ã«ãŒãã¯ããã¡ã€ã«ãŸãã¯ãã£ã¬ã¯ããªã«ã¢ã¯ã»ã¹ããããšãã§ãããŠãŒã¶ãŒã®éåãå®çŸ©ããŸãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 38,
"tag": "p",
"text": "以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 39,
"tag": "p",
"text": "UNIXã®ããã»ã¹ç®¡çã³ãã³ãã«ã¯ã以äžã®ãããªãã®ããããŸãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 40,
"tag": "p",
"text": "psã³ãã³ãã¯ãå®è¡äžã®ããã»ã¹ã®æ
å ±ã衚瀺ããããã«äœ¿çšãããŸãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 41,
"tag": "p",
"text": "以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 42,
"tag": "p",
"text": "killã³ãã³ãã¯ãå®è¡äžã®ããã»ã¹ãåæ¢ããããã«äœ¿çšãããŸãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 43,
"tag": "p",
"text": "以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 44,
"tag": "p",
"text": "UNIXã«ã¯ã以äžã®ãããªãã¡ã€ã«æ€çŽ¢é¢ä¿ã®ã³ãã³ãããããŸãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 45,
"tag": "p",
"text": "UNIXã«ã¯ããããã¯ãŒã¯é¢ä¿ã®ã³ãã³ããè±å¯ã«ãããŸãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 46,
"tag": "p",
"text": "以äžã¯ããããã®ã³ãã³ãã®äž»ãªãŠãŒã¹ã±ãŒã¹ã®äŸã§ãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 47,
"tag": "p",
"text": "ãããã®ã³ãã³ãã¯ããããã¯ãŒã¯ã®ãã©ãã«ã·ã¥ãŒãã£ã³ã°ãèšå®ãããã³ããŒã¿ã®è»¢éã«åœ¹ç«ã¡ãŸãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 48,
"tag": "p",
"text": "UNIXã®ã·ã¹ãã æ
å ±é¢ä¿ã®ã³ãã³ãã«ã¯ã以äžã®ãããªãŠãŒã¹ã±ãŒã¹ããããŸãã",
"title": "ã³ãã³ã"
},
{
"paragraph_id": 49,
"tag": "p",
"text": "ãã®ç« ã§ã¯ãUNIXã§äœ¿çšãããäžè¬çãªãŠãŒãã£ãªãã£ã«ã€ããŠèª¬æããŸããUNIXã¯ãå€ãã®ãŠãŒãã£ãªãã£ãããããããã®ãŠãŒãã£ãªãã£ã¯ãã¢ãŒã«ã€ãã®æäœããã¡ã€ã«ãã¹ããªãŒã ã®å§çž®ã»äŒžé·ãªã©ã®æ§ã
ãªç®çã«äœ¿çšãããŸãããã®ç« ã§ã¯ããããã®ãŠãŒãã£ãªãã£ã«ã€ããŠè©³ãã説æãããŠãŒãã£ãªãã£ã®å®è¡æ¹æ³ãåŠã³ãŸãã",
"title": "ãŠãŒãã£ãªãã£"
},
{
"paragraph_id": 50,
"tag": "p",
"text": "tarã¯ããã¡ã€ã«ããã£ã¬ã¯ããªãã¢ãŒã«ã€ãããå§çž®ããããã«äœ¿çšãããŸãã 以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã",
"title": "ãŠãŒãã£ãªãã£"
},
{
"paragraph_id": 51,
"tag": "p",
"text": "cpioã¯ããã¡ã€ã«ããã£ã¬ã¯ããªãã¢ãŒã«ã€ãããå§çž®ããããã«äœ¿çšãããŸãã",
"title": "ãŠãŒãã£ãªãã£"
},
{
"paragraph_id": 52,
"tag": "p",
"text": "以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã",
"title": "ãŠãŒãã£ãªãã£"
},
{
"paragraph_id": 53,
"tag": "p",
"text": "compress ã³ãã³ãã¯ãUãã¡ã€ã«ãå§çž®ããããã«äœ¿çšãããã³ãã³ãã§ããå§çž®ããããã¡ã€ã«ã®æ¡åŒµå㯠.Z ã«ãªããŸãã",
"title": "ãŠãŒãã£ãªãã£"
},
{
"paragraph_id": 54,
"tag": "p",
"text": "以äžã¯ãcompress ã³ãã³ãã®äžè¬çãªäœ¿çšäŸã§ãã",
"title": "ãŠãŒãã£ãªãã£"
},
{
"paragraph_id": 55,
"tag": "p",
"text": "å§çž®ã»äŒžé·ããµããŒãããããã°ã©ã ã¯ãUNIXã®äžéšã§ãã pack ã compress ã®ä»ã«ããµãŒãããŒãã£ããæ§ã
ãªã©ã€ã»ã³ã¹ã§é
åžãããŠããŸãã ããã§ã¯äž»èŠãªãã®ã ãæ±ããŸãã",
"title": "ãŠãŒãã£ãªãã£"
},
{
"paragraph_id": 56,
"tag": "p",
"text": "gzip ã¯ããã¡ã€ã«ãå§çž®ããããã«äœ¿çšãããããŸããgzip ã¯UNIXã®äžéšã§ã¯ãªãGNUãããžã§ã¯ããGPLã®å
é
åžããŠããŸããå§çž®ããããã¡ã€ã«ã®æ¡åŒµå㯠.gz ã«ãªããŸãã",
"title": "ãŠãŒãã£ãªãã£"
},
{
"paragraph_id": 57,
"tag": "p",
"text": "以äžã¯ãgzip ã®äžè¬çãªäœ¿çšäŸã§ãã",
"title": "ãŠãŒãã£ãªãã£"
},
{
"paragraph_id": 58,
"tag": "p",
"text": "xz ã¯ããã¡ã€ã«ãå§çž®ããããã«äœ¿çšãããŸããxz ã¯UNIXã®äžéšã§ã¯ãªãLasse Collinãéçºãããããªãã¯ãã¡ã€ã³ãªãœãããŠã§ã¢ã§ããå§çž®ããããã¡ã€ã«ã®æ¡åŒµå㯠.xz ã«ãªããŸãã以äžã¯ãxz ã³ãã³ãã®äžè¬çãªäœ¿çšäŸã§ãã",
"title": "ãŠãŒãã£ãªãã£"
},
{
"paragraph_id": 59,
"tag": "p",
"text": "å§çž®ã»äŒžé·ããµããŒãããããã°ã©ã ã¯ãå€å²ã«ãããã®ã§ããã§ã¯ååãšç¹åŸŽãåæããã«ãšã©ããŸãã",
"title": "ãŠãŒãã£ãªãã£"
},
{
"paragraph_id": 60,
"tag": "p",
"text": "ã·ã§ã«(Shell)ã¯ãã³ã³ãã¥ãŒã¿ã®ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã äžã§åäœããã³ãã³ãã©ã€ã³ã€ã³ã¿ãŒãã§ãŒã¹ãæäŸããããã°ã©ã ã§ãããŠãŒã¶ãŒãããŒããŒãããå
¥åããã³ãã³ãã解éããŠããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®æ©èœãåŒã³åºããŸããäžè¬çã«ãã·ã§ã«ã¯UNIXããã³Linuxã·ã¹ãã ã§äœ¿çšãããŸãã",
"title": "ã·ã§ã«ãšã·ã§ã«ã¹ã¯ãªãã"
},
{
"paragraph_id": 61,
"tag": "p",
"text": "ã·ã§ã«ã¹ã¯ãªãã(Shell script)ã¯ãã·ã§ã«ã解éã§ããããã°ã©ã ã®äžçš®ã§ãããã·ã§ã«ã³ãã³ããèšè¿°ããããã¹ããã¡ã€ã«ã§ããã·ã§ã«ã¹ã¯ãªãããäœæããããšã§ãè€æ°ã®ã·ã§ã«ã³ãã³ããäžåºŠã«å®è¡ããããç¹°ãè¿ãåŠçãè¡ã£ãããæ¡ä»¶åå²ãè¡ã£ããããããšãã§ããŸããã·ã§ã«ã¹ã¯ãªããã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®èªååããããåŠçããã¹ãèªååããã°ã®è§£æãªã©ãå€ãã®ç®çã§äœ¿çšãããŸããã·ã§ã«ã¹ã¯ãªããã¯ãcshãbashãshãzshãªã©ã®ã·ã§ã«ã§å®è¡ã§ããŸãã",
"title": "ã·ã§ã«ãšã·ã§ã«ã¹ã¯ãªãã"
},
{
"paragraph_id": 62,
"tag": "p",
"text": "UNIXã®ã·ã§ã«(ã³ãã³ãã€ã³ã¿ãŒããªã¿)ã¯ã眮ãæãå¯èœã§ãå€æ°ã®ã·ã§ã«ãéçºãããŠããŸãã",
"title": "ã·ã§ã«ãšã·ã§ã«ã¹ã¯ãªãã"
},
{
"paragraph_id": 63,
"tag": "p",
"text": "以äžã«ããããã®ç¹åŸŽã説æããŸãã",
"title": "ã·ã§ã«ãšã·ã§ã«ã¹ã¯ãªãã"
},
{
"paragraph_id": 64,
"tag": "p",
"text": "以äžã®ç¹åŸŽãããéžæããã·ã§ã«ã¯ããã®ç®çãéçºã®å¿
èŠæ§ã«å¿ããŠç°ãªãå ŽåããããŸãã",
"title": "ã·ã§ã«ãšã·ã§ã«ã¹ã¯ãªãã"
},
{
"paragraph_id": 65,
"tag": "p",
"text": "ãã®ç« ã§ã¯ãUNIXã®ãã¡ã€ã«ã·ã¹ãã ãšããŒããã·ã§ã³ã«ã€ããŠèª¬æããŸããUNIXã¯ããã¡ã€ã«ã·ã¹ãã ãåºæ¬ãšããŠåäœããŠããããã¡ã€ã«ããã£ã¬ã¯ããªãæäœããããšãã§ããŸãããŸããUNIXã§ã¯ããã¡ã€ã«ããã£ã¬ã¯ããªã«å¯Ÿããã¢ã¯ã»ã¹æš©éãéèŠã§ãã",
"title": "ãã¡ã€ã«ã·ã¹ãã ãšããŒããã·ã§ã³"
},
{
"paragraph_id": 66,
"tag": "p",
"text": "UNIXã«ãŒãã«ã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®äžæ žãšãªããœãããŠã§ã¢ã§ããããŠãŒã¶ãŒãã³ã³ãã¥ãŒã¿ãŒãæäœããããã®æ§ã
ãªæ©èœãæäŸããŸãã",
"title": "UNIXã«ãŒãã«ã®æäŸããæ©èœ"
},
{
"paragraph_id": 67,
"tag": "p",
"text": "以äžã«ãUNIXã«ãŒãã«ãæäŸãã代衚çãªæ©èœãããã€ãæããŸãã",
"title": "UNIXã«ãŒãã«ã®æäŸããæ©èœ"
},
{
"paragraph_id": 68,
"tag": "p",
"text": "ãããã®æ©èœã¯ããŠãŒã¶ãŒãã³ã³ãã¥ãŒã¿ãŒãå¹ççã«å©çšã§ããããã«ããããã«äžå¯æ¬ ã§ããUNIXã«ãŒãã«ã¯ãå€ãã®ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã«åºç€ãæäŸããŠããŸãã",
"title": "UNIXã«ãŒãã«ã®æäŸããæ©èœ"
}
] | ãã®æç§æžã§ã¯ãUNIXãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã«ã€ããŠã®åºæ¬çãªæŠå¿µãšæäœæ¹æ³ã«ã€ããŠèª¬æããŸããUNIXã¯ãå€ãã®ããã°ã©ããŒããšã³ãžãã¢ã«ãã£ãŠåºã䜿çšãããŠãããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§ãããç¹ã«ã³ãã³ãã©ã€ã³ã§ã®äœæ¥ã«é·ããŠããŸãããã®æç§æžãéããŠãããªãã¯UNIXã®åºæ¬çãªæäœæ¹æ³ãåŠã³ãUNIXã䜿çšããŠã¿ã¹ã¯ãå®è¡ããããã®ã¹ãã«ã身ã«ã€ããããšãã§ããŸãã ãUNIX/Linuxå
¥éãããããŸãã | ãã®æç§æžã§ã¯ãUNIXãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã«ã€ããŠã®åºæ¬çãªæŠå¿µãšæäœæ¹æ³ã«ã€ããŠèª¬æããŸããUNIXã¯ãå€ãã®ããã°ã©ããŒããšã³ãžãã¢ã«ãã£ãŠåºã䜿çšãããŠãããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§ãããç¹ã«ã³ãã³ãã©ã€ã³ã§ã®äœæ¥ã«é·ããŠããŸãããã®æç§æžãéããŠãããªãã¯UNIXã®åºæ¬çãªæäœæ¹æ³ãåŠã³ãUNIXã䜿çšããŠã¿ã¹ã¯ãå®è¡ããããã®ã¹ãã«ã身ã«ã€ããããšãã§ããŸãã
ã[[UNIX/Linuxå
¥é]]ãããããŸãã
== UNIXãšã¯ ==
UNIXã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®äžçš®ã§ãå€ãã®ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã§åºã䜿çšãããŠããŸããUNIXã¯ããã«ãã¿ã¹ã¯ããã«ããŠãŒã¶ãŒã®ã·ã¹ãã ã§ããããŠãŒã¶ãŒãåæã«è€æ°ã®ã¿ã¹ã¯ãå®è¡ã§ããããšãç¹åŸŽçã§ãã
UNIXã¯ãããã°ã©ããç 究è
ãªã©ã®æè¡è
ãã¡ãéçºãããã®ã§ãåæã®ããŒãžã§ã³ã¯äž»ã«å€§åŠãç 究æã§äœ¿çšãããŠããŸããããã®åŸãåçšåãããå€ãã®äŒæ¥ãUNIXãæ¡çšããçŸåšã§ã¯å€ãã®ãµãŒããŒãã¹ãŒããŒã³ã³ãã¥ãŒã¿ãŒã«äœ¿çšãããŠããŸãã
UNIXã®ç¹åŸŽã®1ã€ã¯ãã³ãã³ãã©ã€ã³ã€ã³ã¿ãã§ãŒã¹ã䜿çšããããšã§ããã³ãã³ãã©ã€ã³ã€ã³ã¿ãã§ãŒã¹ã¯ãããã¹ãããŒã¹ã®ã³ãã³ãã䜿çšããŠã·ã¹ãã ãæäœããæ¹æ³ã§ãããUNIXã®åŒ·åãªæ©èœã®1ã€ã§ãããŸããUNIXã¯ãã·ã¹ãã ãæ§æããããã®æšæºçãªããŒã«ã»ãããæäŸããŠãããã·ã¹ãã ã®ç®¡çãéçºãç°¡åã«ãªããŸãã
UNIXã¯ããããã¯ãŒã¯æ©èœã匷åã«ãµããŒãããŠãããã€ã³ã¿ãŒãããã®æé·ã«å€§ããè²¢ç®ããŠããŸãããŸããUNIXã¯ããªãŒãã³ãœãŒã¹ãœãããŠã§ã¢ã§ãããããå€ãã®ãŠãŒã¶ãŒãã·ã¹ãã ãæ¹è¯ããæ°ããã¢ããªã±ãŒã·ã§ã³ãéçºããããšãã§ããŸãã
UNIXã¯ãå€ãã®ããªãšãŒã·ã§ã³ãååšããŠãããããããç°ãªãç®çãç°å¢ã«æé©åãããŠããŸãã代衚çãªUNIXã®ããªãšãŒã·ã§ã³ã«ã¯ãFreeBSDãOpenBSDãSolarisãªã©ããããŸãã
UNIXã¯ãé«åºŠãªãŠãŒã¶ãŒã«ãšã£ãŠéåžžã«ãã¯ãã«ã§ããããåå¿è
ã¯åŠç¿ã«æéããããããšããããŸããããããUNIXãåŠç¿ããããšã¯ãããã°ã©ããŒãã·ã¹ãã 管çè
ã«ãšã£ãŠéåžžã«åœ¹ç«ã€ã¹ãã«ã§ãããã³ã³ãã¥ãŒã¿ãŒãµã€ãšã³ã¹åéã§éèŠãªåœ¹å²ãæãããŠããŸãã
== ã³ãã³ã ==
ãã®ç« ã§ã¯ãUNIXã§äœ¿çšãããäžè¬çãªã³ãã³ãã«ã€ããŠèª¬æããŸããUNIXã¯ãå€ãã®ã³ãã³ããããããããã®ã³ãã³ãã¯ããã¡ã€ã«ã®æäœãããã»ã¹ã®ç®¡çãã·ã¹ãã æ
å ±ã®ååŸãªã©ã®æ§ã
ãªç®çã«äœ¿çšãããŸãããã®ç« ã§ã¯ããããã®ã³ãã³ãã«ã€ããŠè©³ãã説æããã³ãã³ãã®å®è¡æ¹æ³ãåŠã³ãŸãã
=== ãã¡ã€ã«æäœ ===
UNIXã®ãã¡ã€ã«æäœã³ãã³ãã«ã¯ã以äžã®ãããªãã®ããããŸãã
==== ls ====
lsã³ãã³ãã¯ãæå®ããããã£ã¬ã¯ããªå
ã®ãã¡ã€ã«ããã£ã¬ã¯ããªãäžèŠ§è¡šç€ºããããã«äœ¿çšãããŸãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
# <code>ls </code>ïŒ ã«ã¬ã³ããã£ã¬ã¯ããªå
ã®ãã¡ã€ã«ãšãã£ã¬ã¯ããªã®äžèŠ§ã衚瀺ããã
# <code>ls -l </code>ïŒ è©³çŽ°ãªæ
å ±ïŒãã¡ã€ã«ã®ææè
ããµã€ãºãæŽæ°æ¥æãªã©ïŒãå«ããã«ã¬ã³ããã£ã¬ã¯ããªå
ã®ãã¡ã€ã«ãšãã£ã¬ã¯ããªã®äžèŠ§ã衚瀺ããã
# <code>ls -a </code>ïŒ ã«ã¬ã³ããã£ã¬ã¯ããªå
ã®é ããã¡ã€ã«ãå«ãããã¹ãŠã®ãã¡ã€ã«ãšãã£ã¬ã¯ããªã衚瀺ããã
==== cd ====
cdã³ãã³ãã¯ãçŸåšã®ãã£ã¬ã¯ããªãå€æŽããããã«äœ¿çšãããŸãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
# <code>cd /path/to/directory</code>ïŒ/path/to/directoryã«ç§»åããŸãã
# <code>cd ..</code>ïŒçŸåšã®ãã£ã¬ã¯ããªã®èŠªãã£ã¬ã¯ããªã«ç§»åããŸãã
# <code>cd ~</code>ïŒãŠãŒã¶ãŒã®ããŒã ãã£ã¬ã¯ããªã«ç§»åããŸãã
# <code>cd </code>ïŒãŠãŒã¶ãŒã®ããŒã ãã£ã¬ã¯ããªã«ç§»åããŸãã
==== pwd ====
==== mkdir ====
mkdirã³ãã³ãã¯ãæå®ããããã£ã¬ã¯ããªãäœæããããã«äœ¿çšãããŸãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
# <code>mkdir test </code>ïŒ ã«ã¬ã³ããã£ã¬ã¯ããªã« "test" ãšããååã®æ°ãããã£ã¬ã¯ããªãäœæããã
# <code>mkdir -p test1/test2 </code>ïŒ "test1" ãã£ã¬ã¯ããªãååšããªãå Žåãæ°ãã "test1" ãã£ã¬ã¯ããªãšãã®ãµããã£ã¬ã¯ã㪠"test2" ãäœæããã
==== rmdir ====
rmdirã³ãã³ãã¯ããã£ã¬ã¯ããªãåé€ããããã«äœ¿çšãããŸãããã ãããã®ã³ãã³ãã¯ãåé€ããããšããŠãããã£ã¬ã¯ããªã空ã§ããå Žåã«ã®ã¿æ©èœããŸãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
# rmdir /path/to/directoryïŒ/path/to/directoryã«ãã空ã®ãã£ã¬ã¯ããªãåé€ããŸãã
==== cp ====
cpã³ãã³ãã¯ããã¡ã€ã«ããã£ã¬ã¯ããªãã³ããŒããããã«äœ¿çšãããŸãã
以äžã¯äžè¬çãªäœ¿çšäŸã§ãã
# cp file1 file2ïŒfile1ãfile2ã«ã³ããŒããŸãã
# cp -r dir1 dir2ïŒãã£ã¬ã¯ããªdir1ãååž°çã«dir2ã«ã³ããŒããŸãã
# cp -p file1 dir1ïŒfile1ãdir1ã«ã³ããŒããå
ã®ãã¡ã€ã«ã®ããŒããã·ã§ã³ãç¶æããŸãã
==== mv ====
mvã³ãã³ãã¯ããã¡ã€ã«ããã£ã¬ã¯ããªã移åãŸãã¯ååãå€æŽããããã«äœ¿çšãããŸãã
以äžã¯äžè¬çãªäœ¿çšäŸã§ãã
# mv file1 file2ïŒfile1ãfile2ã«ç§»åãŸãã¯ååãå€æŽããŸãã
# mv -r dir1 dir2ïŒãã£ã¬ã¯ããªdir1ãååž°çã«dir2ã«ç§»åãŸãã¯ååãå€æŽããŸãã
# mv -i file1 dir1ïŒfile1ãdir1ã«ç§»åãŸãã¯ååãå€æŽããååã®ãã¡ã€ã«ãããå Žåã¯äžæžããããã©ããã確èªããŸãã
==== ln ====
lnã³ãã³ãã¯ããã¡ã€ã«ããã£ã¬ã¯ããªãžã®ãªã³ã¯ãäœæããããã«äœ¿çšãããŸãã
以äžã¯äžè¬çãªäœ¿çšäŸã§ãã
# ln -s file1 file2ïŒfile1ãžã®ã·ã³ããªãã¯ãªã³ã¯ãfile2ã«äœæããŸãã
# ln file1 file2ïŒfile1ãžã®ããŒããªã³ã¯ãfile2ã«äœæããŸãã
# ln -s dir1 dir2ïŒdir1ãžã®ã·ã³ããªãã¯ãªã³ã¯ãdir2ã«äœæããŸãã
==== rm ====
UNIXã®rmã³ãã³ãã¯ãæå®ããããã¡ã€ã«ããã£ã¬ã¯ããªãåé€ããããã«äœ¿çšãããŸãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
# <code>rm file.txt </code>ïŒ ã«ã¬ã³ããã£ã¬ã¯ããªå
ã® "file.txt" ãšããååã®ãã¡ã€ã«ãåé€ããã
# <code>rm -r directory </code>ïŒ "directory" ãšããååã®ãã£ã¬ã¯ããªãšãã®äžã®ãã¹ãŠã®ãã¡ã€ã«ãååž°çã«åé€ããã
==== cat ====
catã³ãã³ãã¯ããã¡ã€ã«ã®å
容ã衚瀺ããããã«äœ¿çšãããŸãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
# cat /path/to/fileïŒ/path/to/fileã®å
容ã衚瀺ããŸãã
==== touch ====
touchã³ãã³ãã¯ãæ°ãã空ã®ãã¡ã€ã«ãäœæããããã«äœ¿çšãããŸãããŸããæ¢åã®ãã¡ã€ã«ã®ã¿ã€ã ã¹ã¿ã³ããæŽæ°ããããšãã§ããŸãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
# touch /path/to/fileïŒ/path/to/fileã«æ°ãã空ã®ãã¡ã€ã«ãäœæããŸãã touch -a /path/to/fileïŒ/path/to/fileã®æçµã¢ã¯ã»ã¹æå»ãæŽæ°ããŸãã
# touch -m /path/to/fileïŒ/path/to/fileã®æçµæŽæ°æå»ãæŽæ°ããŸãã
=== ã·ã¹ãã 管ç ===
UNIXã®ã·ã¹ãã 管çã³ãã³ãã«ã¯ã以äžã®ãããªãã®ããããŸãã
==== su ====
suã³ãã³ãã¯ãå¥ã®ãŠãŒã¶ãŒã«åãæ¿ããããã«äœ¿çšãããŸããrootãŠãŒã¶ãŒã«ãªãããã«äœ¿çšãããããšãäžè¬çã§ãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
# suïŒrootãŠãŒã¶ãŒã«ãªããŸãã
# su usernameïŒusernameãŠãŒã¶ãŒã«ãªããŸãã
==== chmod ====
chmodã³ãã³ãã¯ããã¡ã€ã«ãŸãã¯ãã£ã¬ã¯ããªã®ã¢ã¯ã»ã¹èš±å¯ãå€æŽããããã«äœ¿çšãããŸãããã¡ã€ã«ã·ã¹ãã ã¯ãåãã¡ã€ã«ããã£ã¬ã¯ããªã«å¯ŸããŠãææè
ãã°ã«ãŒãããã®ä»ã®ãŠãŒã¶ãŒã®ã¢ã¯ã»ã¹èš±å¯ã管çããŸãã chmodã³ãã³ãã¯ããããã®ã¢ã¯ã»ã¹èš±å¯ãå€æŽããããã«äœ¿çšãããŸãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
# chmod u+r file.txtïŒææè
ã«èªã¿åãã¢ã¯ã»ã¹èš±å¯ãäžããŸãã chmod g+w directoryïŒã°ã«ãŒãã«æžã蟌ã¿ã¢ã¯ã»ã¹èš±å¯ãäžããŸãã
# chmod o-x file.txtïŒãã®ä»ã®ãŠãŒã¶ãŒããå®è¡ã¢ã¯ã»ã¹èš±å¯ãåé€ããŸãã
# chmod 755 script.shïŒææè
ã«ã¯èªã¿åããæžã蟌ã¿ãå®è¡ã¢ã¯ã»ã¹èš±å¯ãäžããã°ã«ãŒããšãã®ä»ã®ãŠãŒã¶ãŒã«ã¯èªã¿åãããã³å®è¡ã¢ã¯ã»ã¹èš±å¯ãäžããŸãã
==== chown ====
chownã³ãã³ãã¯ããã¡ã€ã«ãŸãã¯ãã£ã¬ã¯ããªã®ææè
ãå€æŽããããã«äœ¿çšãããŸããææè
ã¯ããã¡ã€ã«ãŸãã¯ãã£ã¬ã¯ããªãææããã³ã³ãããŒã«ãããŠãŒã¶ãŒã§ãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
# chown user1 file.txtïŒææè
ãuser1ã«å€æŽããŸãã
# chown user1:group1 directoryïŒææè
ãuser1ã«ãã°ã«ãŒããgroup1ã«å€æŽããŸãã
# chown :group2 file.txtïŒã°ã«ãŒããgroup2ã«å€æŽããŸãã
# chown -R user1:group1 directoryïŒååž°çã«ããã£ã¬ã¯ããªãšãã®ãµããã£ã¬ã¯ããªå
ã®ãã¹ãŠã®ãã¡ã€ã«ãšãã£ã¬ã¯ããªã®ææè
ãuser1ã«ãã°ã«ãŒããgroup1ã«å€æŽããŸãã
==== chgrp ====
chgrpã³ãã³ãã¯ããã¡ã€ã«ãŸãã¯ãã£ã¬ã¯ããªã®ã°ã«ãŒããå€æŽããããã«äœ¿çšãããŸããã°ã«ãŒãã¯ããã¡ã€ã«ãŸãã¯ãã£ã¬ã¯ããªã«ã¢ã¯ã»ã¹ããããšãã§ãããŠãŒã¶ãŒã®éåãå®çŸ©ããŸãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
# chgrp group1 file.txtïŒã°ã«ãŒããgroup1ã«å€æŽããŸãã
# chgrp -R group1 directoryïŒååž°çã«ããã£ã¬ã¯ããªãšãã®ãµããã£ã¬ã¯ããªå
ã®ãã¹ãŠã®ãã¡ã€ã«ãšãã£ã¬ã¯ããªã®ã°ã«ãŒããgroup1ã«å€æŽããŸãã
# chgrp :group2 file.txtïŒã°ã«ãŒããgroup2ã«å€æŽããŸãã
=== ããã»ã¹ç®¡ç ===
UNIXã®ããã»ã¹ç®¡çã³ãã³ãã«ã¯ã以äžã®ãããªãã®ããããŸãã
==== ps ====
psã³ãã³ãã¯ãå®è¡äžã®ããã»ã¹ã®æ
å ±ã衚瀺ããããã«äœ¿çšãããŸãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
# <code>ps</code>ïŒçŸåšå®è¡äžã®ããã»ã¹ããªã¹ã衚瀺ããŸãã
# <code>ps -ef</code>ïŒå
šãŠã®ããã»ã¹ã衚瀺ããŸãã
# <code>ps -aux</code>ïŒå®è¡äžã®å
šãŠã®ããã»ã¹ããŠãŒã¶ãŒåã®è¡šç€ºãå«ããŠè¡šç€ºããŸãã
==== kill ====
killã³ãã³ãã¯ãå®è¡äžã®ããã»ã¹ãåæ¢ããããã«äœ¿çšãããŸãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
# <code>kill [PID]</code>ïŒPIDã§æå®ãããããã»ã¹ãåæ¢ããŸãã
# <code>kill -9 [PID]</code>ïŒåŒ·å¶çã«PIDã§æå®ãããããã»ã¹ãåæ¢ããŸãã
=== ãã¡ã€ã«æ€çŽ¢ ===
UNIXã«ã¯ã以äžã®ãããªãã¡ã€ã«æ€çŽ¢é¢ä¿ã®ã³ãã³ãããããŸãã
# <code>find</code>ïŒ ãã£ã¬ã¯ããªããªãŒã®äžãããæå®ãããæ¡ä»¶ã«åèŽãããã¡ã€ã«ãæ€çŽ¢ããããšãã§ããŸããããšãã°ãååãããæååãå«ããã¡ã€ã«ãããæ¥ä»ä»¥éã«æŽæ°ããããã¡ã€ã«ããããµã€ãºä»¥äžã®ãã¡ã€ã«ãªã©ãæ€çŽ¢ããããšãã§ããŸãã
# <code>locate</code>ïŒ ã·ã¹ãã å
šäœãããæå®ãããæååã«ããããããã¡ã€ã«ãé«éã«æ€çŽ¢ããããšãã§ããŸãããã®ã³ãã³ãã¯ããããããäœæãããã€ã³ããã¯ã¹ã䜿çšãããããfindã³ãã³ããããé«éã§ãããæ€çŽ¢çµæããªã¢ã«ã¿ã€ã ã§ã¯ãªãããšãæ¬ ç¹ã§ãã
# <code>grep</code>ïŒ æå®ãããæååãå«ããã¡ã€ã«ãæ€çŽ¢ããããšãã§ããŸãããã®ã³ãã³ãã¯ãæ€çŽ¢å¯Ÿè±¡ã®ãã¡ã€ã«ãæå®ããå¿
èŠããããŸãããæ£èŠè¡šçŸã䜿çšããããšã§ãæ€çŽ¢ãã¿ãŒã³ãæè»ã«æå®ããããšãã§ããŸãã
# <code>which</code>ïŒ å®è¡å¯èœãã¡ã€ã«ã®ãã¹ãæ€çŽ¢ããããšãã§ããŸããããšãã°ãã³ãã³ãã©ã€ã³ããå®è¡ããã³ãã³ããã©ã®ãã£ã¬ã¯ããªã«ãããã調ã¹ãããšãã§ããŸãã
# <code>whereis</code>ïŒ æå®ãããã³ãã³ãããã¡ã€ã«ã®å Žæãæ€çŽ¢ããããšãã§ããŸãã
=== ãããã¯ãŒã¯ ===
UNIXã«ã¯ããããã¯ãŒã¯é¢ä¿ã®ã³ãã³ããè±å¯ã«ãããŸãã
以äžã¯ããããã®ã³ãã³ãã®äž»ãªãŠãŒã¹ã±ãŒã¹ã®äŸã§ãã
# <code>ping</code>ïŒ ãã¹ãåãŸãã¯IPã¢ãã¬ã¹ã«å¯ŸããŠããããã¯ãŒã¯æ¥ç¶ããã¹ãããããã«äœ¿çšãããŸããpingã³ãã³ãã¯ãæå®ãããã¹ãã«å°éã§ãããã©ããã確èªããããã«ãICMPã¡ãã»ãŒãžãéä¿¡ããå¿çãåŸ
ã¡ãŸãã
# <code>netstat</code>ïŒ ãããã¯ãŒã¯æ¥ç¶ãšãããã¯ãŒã¯ã€ã³ã¿ãã§ãŒã¹ã®ç¶æ
ã衚瀺ããããã«äœ¿çšãããŸãããã®ã³ãã³ãã¯ãTCPãUDPã®ããŒãçªå·ãã¢ãã¬ã¹ãããã³ç¶æ
ã衚瀺ããããšãã§ããŸãã
# <code>ifconfig</code>ïŒ ãããã¯ãŒã¯ã€ã³ã¿ãã§ãŒã¹ãèšå®ããããã«äœ¿çšãããŸãããã®ã³ãã³ãã¯ãIPã¢ãã¬ã¹ããµãããããã¹ã¯ãMACã¢ãã¬ã¹ãããã³ãããã¯ãŒã¯ã€ã³ã¿ãã§ãŒã¹ã®ç¶æ
ã衚瀺ããããšãã§ããŸãã
# <code>traceroute</code>ïŒ ãã±ãããã©ã®ããã«ã«ãŒãã£ã³ã°ããããã瀺ãããã«äœ¿çšãããŸãããã®ã³ãã³ãã¯ããããã®æ°ãIPã¢ãã¬ã¹ãããã³æéã衚瀺ããããšãã§ããŸãã
# <code>ssh</code>ïŒ ãªã¢ãŒããã¹ãã«å®å
šã«ãã°ã€ã³ããããã«äœ¿çšãããŸãããã®ã³ãã³ãã¯ãSSHãããã³ã«ã䜿çšããŠããªã¢ãŒããã¹ãã«æ¥ç¶ããŸãã
# <code>scp</code>ïŒ ãªã¢ãŒããã¹ãéã§ãã¡ã€ã«ã転éããããã«äœ¿çšãããŸãããã®ã³ãã³ãã¯ãSSHãããã³ã«ã䜿çšããŠããªã¢ãŒããã¹ãã«ãã¡ã€ã«ã転éããŸãã
ãããã®ã³ãã³ãã¯ããããã¯ãŒã¯ã®ãã©ãã«ã·ã¥ãŒãã£ã³ã°ãèšå®ãããã³ããŒã¿ã®è»¢éã«åœ¹ç«ã¡ãŸãã
=== ã·ã¹ãã æ
å ± ===
UNIXã®ã·ã¹ãã æ
å ±é¢ä¿ã®ã³ãã³ãã«ã¯ã以äžã®ãããªãŠãŒã¹ã±ãŒã¹ããããŸãã
# <code>uname</code>ïŒã·ã¹ãã ã®çš®é¡ãããŒããŠã§ã¢ã®çš®é¡ãOSã®ããŒãžã§ã³ãªã©ãã«ãŒãã«ã®æ
å ±ã衚瀺ããã³ãã³ãã§ããäŸãã°ã<code>uname -a</code>ãå®è¡ãããšãã·ã¹ãã ã®ãã¹ãŠã®æ
å ±ã衚瀺ãããŸãã
# <code>top</code>ïŒå®è¡äžã®ããã»ã¹ãç£èŠããããã®ã³ãã³ãã§ããCPUãã¡ã¢ãªã®äœ¿çšç¶æ³ãããã»ã¹ã®ç¶æ
ãããã»ã¹ã®IDãªã©ã衚瀺ãããŸãã<code>top</code>ãå®è¡ãããšãçŸåšå®è¡ãããŠããããã»ã¹ã®ãªã¹ãã衚瀺ãããŸãã
# <code>ps</code>ïŒå®è¡äžã®ããã»ã¹ã®æ
å ±ã衚瀺ããã³ãã³ãã§ãã<code>ps</code>ãå®è¡ãããšãçŸåšå®è¡ãããŠããããã»ã¹ã®ãªã¹ãã衚瀺ãããŸãããŸããç¹å®ã®ããã»ã¹ã®æ
å ±ã衚瀺ããããã«ãããã»ã¹IDãæå®ããããšãã§ããŸãã
# <code>df</code>ïŒãã£ã¹ã¯ã®äœ¿çšç¶æ³ã確èªããããã®ã³ãã³ãã§ãã<code>df</code>ãå®è¡ãããšã䜿çšå¯èœãªãã£ã¹ã¯ã¹ããŒã¹ããã¡ã€ã«ã·ã¹ãã ã®çš®é¡ãããŠã³ããããå Žæãªã©ã衚瀺ãããŸãã
# <code>du</code>ïŒãã£ã¹ã¯äœ¿çšéã確èªããããã®ã³ãã³ãã§ãã<code>du</code>ãå®è¡ãããšãæå®ãããã£ã¬ã¯ããªã®äœ¿çšéã衚瀺ãããŸããããã«ããµããã£ã¬ã¯ããªã®äœ¿çšéã衚瀺ãããã®ã§ãã©ã®ãã¡ã€ã«ãæãå€ãã®ãã£ã¹ã¯ã¹ããŒã¹ãå æããŠããããç¹å®ããããšãã§ããŸãã
# <code>vmstat</code>ïŒã¡ã¢ãªäœ¿çšç¶æ³ã確èªããããã®ã³ãã³ãã§ãã<code>vmstat</code>ãå®è¡ãããšã䜿çšäžã®ã¡ã¢ãªã空ãã¡ã¢ãªããããã¡ãã£ãã·ã¥ãªã©ã®æ
å ±ã衚瀺ãããŸãã
== ãŠãŒãã£ãªã㣠==
ãã®ç« ã§ã¯ãUNIXã§äœ¿çšãããäžè¬çãªãŠãŒãã£ãªãã£ã«ã€ããŠèª¬æããŸããUNIXã¯ãå€ãã®ãŠãŒãã£ãªãã£ãããããããã®ãŠãŒãã£ãªãã£ã¯ãã¢ãŒã«ã€ãã®æäœããã¡ã€ã«ãã¹ããªãŒã ã®å§çž®ã»äŒžé·ãªã©ã®æ§ã
ãªç®çã«äœ¿çšãããŸãããã®ç« ã§ã¯ããããã®ãŠãŒãã£ãªãã£ã«ã€ããŠè©³ãã説æãããŠãŒãã£ãªãã£ã®å®è¡æ¹æ³ãåŠã³ãŸãã
=== ã¢ãŒã«ã€ãã®æäœ ===
==== tar ====
tarã¯ããã¡ã€ã«ããã£ã¬ã¯ããªãã¢ãŒã«ã€ãããå§çž®ããããã«äœ¿çšãããŸãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
# tar -cvf archive.tar file1 file2 file3ïŒãã¡ã€ã«ã®ã¢ãŒã«ã€ãããã¡ã€ã«1ããã¡ã€ã«2ããã¡ã€ã«3ãã¢ãŒã«ã€ãããã
# tar -cvf archive.tar directoryïŒãã£ã¬ã¯ããªã®ã¢ãŒã«ã€ãããã£ã¬ã¯ããªãã¢ãŒã«ã€ãããã
# tar -xvf archive.tarïŒã¢ãŒã«ã€ããã¡ã€ã«ã®å±éãã¢ãŒã«ã€ããå±éããã
# tar -czvf archive.tar.gz file1 file2 file3ïŒã¢ãŒã«ã€ããã¡ã€ã«ã®å§çž®ããã¡ã€ã«1ããã¡ã€ã«2ããã¡ã€ã«3ãã¢ãŒã«ã€ãããŠãgzipã§å§çž®ããã
# tar -xzvf archive.tar.gzïŒã¢ãŒã«ã€ããã¡ã€ã«ã®è§£åãšå±éãgzipã§å§çž®ãããã¢ãŒã«ã€ãã解åããŠãå±éããã
==== cpio ====
cpioã¯ããã¡ã€ã«ããã£ã¬ã¯ããªãã¢ãŒã«ã€ãããå§çž®ããããã«äœ¿çšãããŸãã
以äžã¯ãäžè¬çãªäœ¿çšäŸã§ãã
# find . -depth -print | cpio -ov > archive.cpioïŒãã¡ã€ã«ã®ã¢ãŒã«ã€ããã«ã¬ã³ããã£ã¬ã¯ããªä»¥äžã®ãã¹ãŠã®ãã¡ã€ã«ãã¢ãŒã«ã€ãããã
# find directory -depth -print | cpio -ov > archive.cpioïŒãã£ã¬ã¯ããªã®ã¢ãŒã«ã€ãããã£ã¬ã¯ããªãã¢ãŒã«ã€ãããã
# cpio -ivd < archive.cpioïŒã¢ãŒã«ã€ããã¡ã€ã«ã®å±éãã¢ãŒã«ã€ããå±éããã
# find . -depth -print | cpio -ov | gzip > archive.cpio.gzïŒã¢ãŒã«ã€ããã¡ã€ã«ã®å§çž®ãã«ã¬ã³ããã£ã¬ã¯ããªä»¥äžã®ãã¹ãŠã®ãã¡ã€ã«ãã¢ãŒã«ã€ãããŠãgzipã§å§çž®ããã
# gzip -d < archive.cpio.gz | cpio -ivdïŒã¢ãŒã«ã€ããã¡ã€ã«ã®è§£åãšå±éãgzipã§å§çž®ãããã¢ãŒã«ã€ãã解åããŠãå±éããã
=== å§çž®ã»äŒžé· ===
==== compress ====
compress ã³ãã³ãã¯ãUãã¡ã€ã«ãå§çž®ããããã«äœ¿çšãããã³ãã³ãã§ããå§çž®ããããã¡ã€ã«ã®æ¡åŒµå㯠.Z ã«ãªããŸãã
以äžã¯ãcompress ã³ãã³ãã®äžè¬çãªäœ¿çšäŸã§ãã
# ãã¡ã€ã«ãå§çž®ãã: <code>compress filename</code> : filename ãå§çž®ããŠãfilename.Z ãšããååã®å§çž®ãã¡ã€ã«ãäœæãã
# å§çž®ããããã¡ã€ã«ãå±éãã: <code>uncompress filename.Z</code> : filename.Z ãå±éããŠãfilename ãšããååã®ãã¡ã€ã«ãäœæãã
==== ãµãŒãããŒãã£ã®ããã°ã©ãã³ã° ====
å§çž®ã»äŒžé·ããµããŒãããããã°ã©ã ã¯ãUNIXã®äžéšã§ãã pack ã compress ã®ä»ã«ããµãŒãããŒãã£ããæ§ã
ãªã©ã€ã»ã³ã¹ã§é
åžãããŠããŸãã
ããã§ã¯äž»èŠãªãã®ã ãæ±ããŸãã
===== gzip =====
gzip ã¯ããã¡ã€ã«ãå§çž®ããããã«äœ¿çšãããããŸããgzip ã¯UNIXã®äžéšã§ã¯ãªãGNUãããžã§ã¯ããGPLã®å
é
åžããŠããŸããå§çž®ããããã¡ã€ã«ã®æ¡åŒµå㯠.gz ã«ãªããŸãã
以äžã¯ãgzip ã®äžè¬çãªäœ¿çšäŸã§ãã
# ãã¡ã€ã«ãå§çž®ãã: <code>gzip filename</code> : filename ãå§çž®ããŠãfilename.gz ãšããååã®å§çž®ãã¡ã€ã«ãäœæãã
# å§çž®ããããã¡ã€ã«ãå±éãã: <code>gzip -d filename.gz</code> : filename.gz ãå±éããŠãfilename ãšããååã®ãã¡ã€ã«ãäœæãã
===== xz =====
xz ã¯ããã¡ã€ã«ãå§çž®ããããã«äœ¿çšãããŸããxz ã¯UNIXã®äžéšã§ã¯ãªãLasse Collinãéçºãããããªãã¯ãã¡ã€ã³ãªãœãããŠã§ã¢ã§ããå§çž®ããããã¡ã€ã«ã®æ¡åŒµå㯠.xz ã«ãªããŸãã以äžã¯ãxz ã³ãã³ãã®äžè¬çãªäœ¿çšäŸã§ãã
# ãã¡ã€ã«ãå§çž®ãã: <code>xz filename</code> : filename ãå§çž®ããŠãfilename.xz ãšããååã®å§çž®ãã¡ã€ã«ãäœæãã
# å§çž®ããããã¡ã€ã«ãå±éãã: <code>xz -d filename.xz</code> : filename.xz ãå±éããŠãfilename ãšããååã®ãã¡ã€ã«ãäœæãã
# å§çž®ã¬ãã«ãæå®ããŠãã¡ã€ã«ãå§çž®ãã: <code>xz -9 filename</code> : å§çž®ã¬ãã«ãæ倧ãŸã§æå®ããŠãfilename ãå§çž®ãããçµæãšã㊠filename.xz ãšããååã®ãã¡ã€ã«ãäœæãããã
===== ãã®ä» =====
å§çž®ã»äŒžé·ããµããŒãããããã°ã©ã ã¯ãå€å²ã«ãããã®ã§ããã§ã¯ååãšç¹åŸŽãåæããã«ãšã©ããŸãã
# bzip2 - ãããã¯ãœãŒãã¢ã«ãŽãªãºã ã䜿çšããå§çž®ããã°ã©ã ã
# lz4 - éåžžã«é«éãªLZ77ããŒã¹ã®ããŒã¿å§çž®ã¢ã«ãŽãªãºã ã䜿çšããå§çž®ããã°ã©ã ã
# Zstd - Facebookãéçºããéåžžã«é«éãªå§çž®ã¢ã«ãŽãªãºã ã䜿çšããå§çž®ããã°ã©ã ã
# lzo - ã€ã³ã¡ã¢ãªããŒã¿å§çž®/䌞é·ã¢ã«ãŽãªãºã ã䜿çšããå§çž®ããã°ã©ã ã
# snappy - Googleãéçºããéåžžã«é«éãªå§çž®ã¢ã«ãŽãªãºã ã䜿çšããå§çž®ããã°ã©ã ã
== ã·ã§ã«ãšã·ã§ã«ã¹ã¯ãªãã ==
ã·ã§ã«ïŒShellïŒã¯ãã³ã³ãã¥ãŒã¿ã®ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã äžã§åäœããã³ãã³ãã©ã€ã³ã€ã³ã¿ãŒãã§ãŒã¹ãæäŸããããã°ã©ã ã§ãããŠãŒã¶ãŒãããŒããŒãããå
¥åããã³ãã³ãã解éããŠããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®æ©èœãåŒã³åºããŸããäžè¬çã«ãã·ã§ã«ã¯UNIXããã³Linuxã·ã¹ãã ã§äœ¿çšãããŸãã
ã·ã§ã«ã¹ã¯ãªããïŒShell scriptïŒã¯ãã·ã§ã«ã解éã§ããããã°ã©ã ã®äžçš®ã§ãããã·ã§ã«ã³ãã³ããèšè¿°ããããã¹ããã¡ã€ã«ã§ããã·ã§ã«ã¹ã¯ãªãããäœæããããšã§ãè€æ°ã®ã·ã§ã«ã³ãã³ããäžåºŠã«å®è¡ããããç¹°ãè¿ãåŠçãè¡ã£ãããæ¡ä»¶åå²ãè¡ã£ããããããšãã§ããŸããã·ã§ã«ã¹ã¯ãªããã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®èªååããããåŠçããã¹ãèªååããã°ã®è§£æãªã©ãå€ãã®ç®çã§äœ¿çšãããŸããã·ã§ã«ã¹ã¯ãªããã¯ãcshãbashãshãzshãªã©ã®ã·ã§ã«ã§å®è¡ã§ããŸãã
=== ã·ã§ã«ã®ç¹åŸŽãšéžã³æ¹ ===
UNIXã®ã·ã§ã«ïŒã³ãã³ãã€ã³ã¿ãŒããªã¿ïŒã¯ã眮ãæãå¯èœã§ãå€æ°ã®ã·ã§ã«ãéçºãããŠããŸãã
以äžã«ããããã®ç¹åŸŽã説æããŸãã
# bshïŒBourne ShellïŒïŒ
#* æåã«ãªãªãŒã¹ãããUNIXã·ã§ã«
#* çµã¿èŸŒã¿ã³ãã³ããå°ãªãã§ãããããã§ã匷åã§ã·ã³ãã«ãªã¹ã¯ãªããèšèªã§ãã
#cshïŒC ShellïŒïŒ
#* Cèšèªã«äŒŒãã·ã³ã¿ãã¯ã¹ã䜿çšããããçŽæçã§ãŠãŒã¶ãŒãã¬ã³ããªãŒãªã€ã³ã¿ãŒãã§ãŒã¹ãæäŸããŸãã
#* ãã¹ããªãŒæ©èœãåªããŠããããŠãŒã¶ãŒã¯éå»ã®ã³ãã³ãããã°ããåå©çšã§ããŸãã
#* ãžã§ãã³ã³ãããŒã«æ©èœãæåã«ãµããŒãããŸããã
#* ã·ã§ã«ã¹ã¯ãªãããäœãã®ã«ã¯é©ããŸãã
#bashïŒBourne-Again ShellïŒïŒ
#* GNUãããžã§ã¯ãã®äžéšãšããŠéçºãããŸããã
#* Bourne Shellã®åŒ·åãªæ©èœã«å ããŠãå€æ°ã®çµã¿èŸŒã¿ã³ãã³ãããããé«åºŠãªã·ã§ã«ã¹ã¯ãªãããäœæã§ããŸãã
#* ãã¡ã€ã«åã®å±éããã¿ãŒã³ãããã³ã°ãªã©ã®åŒ·åãªæ©èœãæã€
#kshïŒKorn ShellïŒïŒ
#* Bourne ShellãšC Shellã®çµã¿åãããšããŠéçºãããã·ã§ã«ã§ãPOSIXæºæ ã®åºæºãšããŠæ©èœããŸã
#* C Shellã®çŽæçãªæ§æãšBourne Shellã®é«åºŠãªæ©èœãçµã¿åããããã®ã§ãã¹ã¯ãªããã®éçºã«é©ããŠããŸãã
以äžã®ç¹åŸŽãããéžæããã·ã§ã«ã¯ããã®ç®çãéçºã®å¿
èŠæ§ã«å¿ããŠç°ãªãå ŽåããããŸãã
== ãã¡ã€ã«ã·ã¹ãã ãšããŒããã·ã§ã³ ==
ãã®ç« ã§ã¯ãUNIXã®ãã¡ã€ã«ã·ã¹ãã ãšããŒããã·ã§ã³ã«ã€ããŠèª¬æããŸããUNIXã¯ããã¡ã€ã«ã·ã¹ãã ãåºæ¬ãšããŠåäœããŠããããã¡ã€ã«ããã£ã¬ã¯ããªãæäœããããšãã§ããŸãããŸããUNIXã§ã¯ããã¡ã€ã«ããã£ã¬ã¯ããªã«å¯Ÿããã¢ã¯ã»ã¹æš©éãéèŠã§ãã
== UNIXã«ãŒãã«ã®æäŸããæ©èœ ==
UNIXã«ãŒãã«ã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®äžæ žãšãªããœãããŠã§ã¢ã§ããããŠãŒã¶ãŒãã³ã³ãã¥ãŒã¿ãŒãæäœããããã®æ§ã
ãªæ©èœãæäŸããŸãã
以äžã«ãUNIXã«ãŒãã«ãæäŸãã代衚çãªæ©èœãããã€ãæããŸãã
* ããã»ã¹ç®¡çïŒUNIXã«ãŒãã«ã¯ãããã»ã¹ã®äœæãåé€ãã¹ã±ãžã¥ãŒãªã³ã°ãéä¿¡ãåæãªã©ã®æ©èœãæäŸããŸãã
* ã¡ã¢ãªç®¡çïŒUNIXã«ãŒãã«ã¯ãã¡ã¢ãªã®å²ãåœãŠã解æŸãä¿è·ãä»®æ³ã¡ã¢ãªãã¹ã¯ããã³ã°ãªã©ã®æ©èœãæäŸããŸãã
* ãã¡ã€ã«ã·ã¹ãã ïŒUNIXã«ãŒãã«ã¯ããã¡ã€ã«ã®äœæãåé€ã移åãã³ããŒãæ€çŽ¢ãªã©ã®æ©èœãæäŸããŸãããŸãããã¡ã€ã«ã®ä¿è·ãã¢ã¯ã»ã¹å¶åŸ¡ãªã©ãè¡ããŸãã
* ãããã¯ãŒã¯ïŒUNIXã«ãŒãã«ã¯ããããã¯ãŒã¯éä¿¡ãå¯èœã«ããæ©èœãæäŸããŸããTCP/IPãããã³ã«ã¹ã¿ãã¯ããœã±ããã€ã³ã¿ãã§ãŒã¹ããããã¯ãŒã¯ãã©ã€ããªã©ãå«ãŸããŸãã
* ããã€ã¹ç®¡çïŒUNIXã«ãŒãã«ã¯ãããã€ã¹ã®å¶åŸ¡ããã©ã€ãã®ç®¡çãããŒããŠã§ã¢ãªãœãŒã¹ã®å²ãåœãŠãªã©ã®æ©èœãæäŸããŸãã
* ã»ãã¥ãªãã£ç®¡çïŒUNIXã«ãŒãã«ã¯ãã»ãã¥ãªãã£äžã®åé¡ãæ€ç¥ããããåé¿ãããããæ©èœãæäŸããŸããäŸãã°ãã¢ã¯ã»ã¹å¶åŸ¡ããã¹ã¯ãŒã管çãæå·åãªã©ãå«ãŸããŸãã
ãããã®æ©èœã¯ããŠãŒã¶ãŒãã³ã³ãã¥ãŒã¿ãŒãå¹ççã«å©çšã§ããããã«ããããã«äžå¯æ¬ ã§ããUNIXã«ãŒãã«ã¯ãå€ãã®ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã«åºç€ãæäŸããŠããŸãã
[[ã«ããŽãª:UNIX|ã«ãããã]] | 2023-03-07T04:26:30Z | 2023-07-25T06:20:52Z | [] | https://ja.wikibooks.org/wiki/UNIX%E5%85%A5%E9%96%80 |
37,138 | FreeBSD | FreeBSDã¯é«æ§èœãã€ä¿¡é Œæ§ã®é«ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§ãããããã°ã©ãã«ãšã£ãŠéåžžã«é
åçãªãã©ãããã©ãŒã ã§ããæ¬æžã§ã¯ãFreeBSDã®åºæ¬çãªæŠå¿µããå§ãŸããã·ã¹ãã 管çããããã¯ãŒãã³ã°ãããã°ã©ãã³ã°ç°å¢ã®ã»ããã¢ãããèšèªå¥ã®éçºããããã°ãã¢ãžã¥ãŒã«éçºãªã©ãåºç¯ãã€å®è·µçãªãããã¯ãã«ããŒããŸããåããŠã®ãŠãŒã¶ãŒã«ã¯ã€ã³ã¹ããŒã«ãšåºæ¬èšå®ããå§ããããçµéšè±å¯ãªããã°ã©ãã«ã¯é«åºŠãªããŒããŸã§å¹
åºãæ±ããŸããè±å¯ãªã€ã©ã¹ããæé ã®èª¬æãå
·äœçãªã³ãŒãäŸã亀ããèªè
ãç解ãæ·±ããªããå®éã®ãããžã§ã¯ãã§FreeBSDã掻çšã§ããããã«ãµããŒãããŸããæ¬æžã¯FreeBSDã®ç解ãšå©çšã«ãããŠæ¬ ãããªããªãœãŒã¹ãšãªãããšã§ãããã
FreeBSDã¯ãé«æ§èœã§å®å®æ§ãããããªãŒãã³ãœãŒã¹ã®Unixç³»ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§ããããã¯ãå¹
åºãçšéã«é©ããã«ãŒãã«ãšãŠãŒã¶ãŒã©ã³ãããã°ã©ã ã§æ§æãããŠãããå€ãã®ããã°ã©ããã·ã¹ãã 管çè
ã«æ¯æãããŠããŸãã
FreeBSDã¯ãBerkeley Software Distribution (BSD) ãã掟çãããªãŒãã³ãœãŒã¹ã®Unixç³»ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§ããããã®æŽå²ã¯é·ããã®ã§ãã以äžã«FreeBSDã®äž»ãªæŽå²çãªåºæ¥äºãèŠçŽããŸãã
FreeBSDã®ã€ã³ã¹ããŒã«ã¯çŽæçã§ããã以äžã®æé ã«åŸã£ãŠããŸãã
åºæ¬èšå®: èšèªãããŒããŒãããããã¯ãŒã¯èšå®ãªã©ãåºæ¬çãªèšå®ãè¡ããŸãã
ããã«ãããåºæ¬çãªFreeBSDã·ã¹ãã ãæ§ç¯ãããå©çšãéå§ããããšãã§ããŸãã
FreeBSDã®æ§æã¯ãã«ãŒãã«ãšãŠãŒã¶ãŒã©ã³ãã«åãããŠããŸããã«ãŒãã«ã¯ã·ã¹ãã ã®äžæ žã§ãããããŒããŠã§ã¢ã®å¶åŸ¡ãäœã¬ãã«ã®ã·ã¹ãã ãªãœãŒã¹ãžã®ã¢ã¯ã»ã¹ãæ
åœããŸããäžæ¹ããŠãŒã¶ãŒã©ã³ãã¯ãŠãŒã¶ãŒã¢ããªã±ãŒã·ã§ã³ããŠãŒã¶ãŒãå®è¡ããããã°ã©ã ãåäœããé åã§ããããŠãŒã¶ãŒãšå¯Ÿè©±ããã€ã³ã¿ãŒãã§ãŒã¹ãæäŸããŸãã
ããã»ã¹ã¯å®è¡äžã®ããã°ã©ã ã®ã€ã³ã¹ã¿ã³ã¹ã§ãããã¡ã¢ãªããªãœãŒã¹ãç¬ç«ããŠæã¡ãŸããããã«å¯ŸããŠãã¹ã¬ããã¯ããã»ã¹å
ã§åäœãã軜éãªå®è¡åäœã§ãåãããã»ã¹å
ã®ã¹ã¬ããã¯ã¡ã¢ãªãå
±æããŸããFreeBSDã¯ãã«ãã¹ã¬ããããµããŒãããŠãããå¹ççãªãã«ãã³ã¢åŠçãå¯èœã§ãã
FreeBSDã¯è€æ°ã®ãã¡ã€ã«ã·ã¹ãã ããµããŒãããZFS(Zettabyte File System)ãªã©ãç¹ã«æ³šç®ãããŠããŸããããã«ãããé«åºŠãªããŒã¿ç®¡çãèé害æ§ãå®çŸã§ããŸããã¹ãã¬ãŒãžã¯ãã£ã¹ã¯ãä»ã®ã¡ãã£ã¢ãæããFreeBSDã¯æ§ã
ãªã¹ãã¬ãŒãžããã€ã¹ãå¹æçã«æ±ããŸãã
FreeBSDã¯åŒ·åãªãããã¯ãŒãã³ã°æ©èœãåããŠãããTCP/IPã¹ã¿ãã¯ã®å®è£
ãé«åºŠãªãããã¯ãŒã¯ãµãŒãã¹ãæäŸããŸãããããã¯ãŒãã³ã°ã¯ã·ã¹ãã ã®äžå¿çãªèŠçŽ ã§ãããFreeBSDã¯ãããå¹æçãã€æè»ã«æ±ããŸãããããã¯ãŒãã³ã°æ©èœã¯ã·ã¹ãã ã®å®å®æ§ãæ§èœã«çŽçµããŠãããããããã°ã©ãã«ãšã£ãŠéèŠãªæŠå¿µã§ãã ãããã®åºæ¬æŠå¿µãç解ããããšã¯ãFreeBSDäžã§ããã°ã©ã ãéçºããéã®åºç€ãšãªããŸããããããã®æŠå¿µã«ã€ããŠæ·±ãç解ããå®è·µçãªã³ãŒãã£ã³ã°ãã·ã¹ãã 管çã«æŽ»ããããšãéèŠã§ãã
FreeBSDã§ã¯ããœãããŠã§ã¢ã®ç®¡çã« Ports ãš Pkgs ãšãã2ã€ã®ä»çµã¿ããããŸãã
pkg install software </syntaxhighlight>
ã©ã¡ãã®æ¹æ³ãå©çšã§ããç¶æ³ãèŠä»¶ã«å¿ããŠäœ¿ãåããããšãã§ããŸããPortsã¯æè»æ§ãé«ããPkgsã¯æ軜ã§å¹ççã§ããFreeBSDã§ã¯ãããã®ä»çµã¿ãé§äœ¿ããŠãã·ã¹ãã ãæè»ã«æ§ç¯ã»ç®¡çããããšãå¯èœã§ãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "FreeBSDã¯é«æ§èœãã€ä¿¡é Œæ§ã®é«ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§ãããããã°ã©ãã«ãšã£ãŠéåžžã«é
åçãªãã©ãããã©ãŒã ã§ããæ¬æžã§ã¯ãFreeBSDã®åºæ¬çãªæŠå¿µããå§ãŸããã·ã¹ãã 管çããããã¯ãŒãã³ã°ãããã°ã©ãã³ã°ç°å¢ã®ã»ããã¢ãããèšèªå¥ã®éçºããããã°ãã¢ãžã¥ãŒã«éçºãªã©ãåºç¯ãã€å®è·µçãªãããã¯ãã«ããŒããŸããåããŠã®ãŠãŒã¶ãŒã«ã¯ã€ã³ã¹ããŒã«ãšåºæ¬èšå®ããå§ããããçµéšè±å¯ãªããã°ã©ãã«ã¯é«åºŠãªããŒããŸã§å¹
åºãæ±ããŸããè±å¯ãªã€ã©ã¹ããæé ã®èª¬æãå
·äœçãªã³ãŒãäŸã亀ããèªè
ãç解ãæ·±ããªããå®éã®ãããžã§ã¯ãã§FreeBSDã掻çšã§ããããã«ãµããŒãããŸããæ¬æžã¯FreeBSDã®ç解ãšå©çšã«ãããŠæ¬ ãããªããªãœãŒã¹ãšãªãããšã§ãããã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "FreeBSDã¯ãé«æ§èœã§å®å®æ§ãããããªãŒãã³ãœãŒã¹ã®Unixç³»ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§ããããã¯ãå¹
åºãçšéã«é©ããã«ãŒãã«ãšãŠãŒã¶ãŒã©ã³ãããã°ã©ã ã§æ§æãããŠãããå€ãã®ããã°ã©ããã·ã¹ãã 管çè
ã«æ¯æãããŠããŸãã",
"title": "ã¯ããã«"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "FreeBSDã¯ãBerkeley Software Distribution (BSD) ãã掟çãããªãŒãã³ãœãŒã¹ã®Unixç³»ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§ããããã®æŽå²ã¯é·ããã®ã§ãã以äžã«FreeBSDã®äž»ãªæŽå²çãªåºæ¥äºãèŠçŽããŸãã",
"title": "ã¯ããã«"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "FreeBSDã®ã€ã³ã¹ããŒã«ã¯çŽæçã§ããã以äžã®æé ã«åŸã£ãŠããŸãã",
"title": "ã¯ããã«"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "åºæ¬èšå®: èšèªãããŒããŒãããããã¯ãŒã¯èšå®ãªã©ãåºæ¬çãªèšå®ãè¡ããŸãã",
"title": "ã¯ããã«"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "ããã«ãããåºæ¬çãªFreeBSDã·ã¹ãã ãæ§ç¯ãããå©çšãéå§ããããšãã§ããŸãã",
"title": "ã¯ããã«"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "FreeBSDã®æ§æã¯ãã«ãŒãã«ãšãŠãŒã¶ãŒã©ã³ãã«åãããŠããŸããã«ãŒãã«ã¯ã·ã¹ãã ã®äžæ žã§ãããããŒããŠã§ã¢ã®å¶åŸ¡ãäœã¬ãã«ã®ã·ã¹ãã ãªãœãŒã¹ãžã®ã¢ã¯ã»ã¹ãæ
åœããŸããäžæ¹ããŠãŒã¶ãŒã©ã³ãã¯ãŠãŒã¶ãŒã¢ããªã±ãŒã·ã§ã³ããŠãŒã¶ãŒãå®è¡ããããã°ã©ã ãåäœããé åã§ããããŠãŒã¶ãŒãšå¯Ÿè©±ããã€ã³ã¿ãŒãã§ãŒã¹ãæäŸããŸãã",
"title": "FreeBSDã®åºæ¬æŠå¿µ"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "ããã»ã¹ã¯å®è¡äžã®ããã°ã©ã ã®ã€ã³ã¹ã¿ã³ã¹ã§ãããã¡ã¢ãªããªãœãŒã¹ãç¬ç«ããŠæã¡ãŸããããã«å¯ŸããŠãã¹ã¬ããã¯ããã»ã¹å
ã§åäœãã軜éãªå®è¡åäœã§ãåãããã»ã¹å
ã®ã¹ã¬ããã¯ã¡ã¢ãªãå
±æããŸããFreeBSDã¯ãã«ãã¹ã¬ããããµããŒãããŠãããå¹ççãªãã«ãã³ã¢åŠçãå¯èœã§ãã",
"title": "FreeBSDã®åºæ¬æŠå¿µ"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "FreeBSDã¯è€æ°ã®ãã¡ã€ã«ã·ã¹ãã ããµããŒãããZFS(Zettabyte File System)ãªã©ãç¹ã«æ³šç®ãããŠããŸããããã«ãããé«åºŠãªããŒã¿ç®¡çãèé害æ§ãå®çŸã§ããŸããã¹ãã¬ãŒãžã¯ãã£ã¹ã¯ãä»ã®ã¡ãã£ã¢ãæããFreeBSDã¯æ§ã
ãªã¹ãã¬ãŒãžããã€ã¹ãå¹æçã«æ±ããŸãã",
"title": "FreeBSDã®åºæ¬æŠå¿µ"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "FreeBSDã¯åŒ·åãªãããã¯ãŒãã³ã°æ©èœãåããŠãããTCP/IPã¹ã¿ãã¯ã®å®è£
ãé«åºŠãªãããã¯ãŒã¯ãµãŒãã¹ãæäŸããŸãããããã¯ãŒãã³ã°ã¯ã·ã¹ãã ã®äžå¿çãªèŠçŽ ã§ãããFreeBSDã¯ãããå¹æçãã€æè»ã«æ±ããŸãããããã¯ãŒãã³ã°æ©èœã¯ã·ã¹ãã ã®å®å®æ§ãæ§èœã«çŽçµããŠãããããããã°ã©ãã«ãšã£ãŠéèŠãªæŠå¿µã§ãã ãããã®åºæ¬æŠå¿µãç解ããããšã¯ãFreeBSDäžã§ããã°ã©ã ãéçºããéã®åºç€ãšãªããŸããããããã®æŠå¿µã«ã€ããŠæ·±ãç解ããå®è·µçãªã³ãŒãã£ã³ã°ãã·ã¹ãã 管çã«æŽ»ããããšãéèŠã§ãã",
"title": "FreeBSDã®åºæ¬æŠå¿µ"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "FreeBSDã§ã¯ããœãããŠã§ã¢ã®ç®¡çã« Ports ãš Pkgs ãšãã2ã€ã®ä»çµã¿ããããŸãã",
"title": "PortsãšPkgs"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "pkg install software </syntaxhighlight>",
"title": "PortsãšPkgs"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "ã©ã¡ãã®æ¹æ³ãå©çšã§ããç¶æ³ãèŠä»¶ã«å¿ããŠäœ¿ãåããããšãã§ããŸããPortsã¯æè»æ§ãé«ããPkgsã¯æ軜ã§å¹ççã§ããFreeBSDã§ã¯ãããã®ä»çµã¿ãé§äœ¿ããŠãã·ã¹ãã ãæè»ã«æ§ç¯ã»ç®¡çããããšãå¯èœã§ãã",
"title": "PortsãšPkgs"
}
] | FreeBSDã¯é«æ§èœãã€ä¿¡é Œæ§ã®é«ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§ãããããã°ã©ãã«ãšã£ãŠéåžžã«é
åçãªãã©ãããã©ãŒã ã§ããæ¬æžã§ã¯ãFreeBSDã®åºæ¬çãªæŠå¿µããå§ãŸããã·ã¹ãã 管çããããã¯ãŒãã³ã°ãããã°ã©ãã³ã°ç°å¢ã®ã»ããã¢ãããèšèªå¥ã®éçºããããã°ãã¢ãžã¥ãŒã«éçºãªã©ãåºç¯ãã€å®è·µçãªãããã¯ãã«ããŒããŸããåããŠã®ãŠãŒã¶ãŒã«ã¯ã€ã³ã¹ããŒã«ãšåºæ¬èšå®ããå§ããããçµéšè±å¯ãªããã°ã©ãã«ã¯é«åºŠãªããŒããŸã§å¹
åºãæ±ããŸããè±å¯ãªã€ã©ã¹ããæé ã®èª¬æãå
·äœçãªã³ãŒãäŸã亀ããèªè
ãç解ãæ·±ããªããå®éã®ãããžã§ã¯ãã§FreeBSDã掻çšã§ããããã«ãµããŒãããŸããæ¬æžã¯FreeBSDã®ç解ãšå©çšã«ãããŠæ¬ ãããªããªãœãŒã¹ãšãªãããšã§ãããã | FreeBSDã¯é«æ§èœãã€ä¿¡é Œæ§ã®é«ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§ãããããã°ã©ãã«ãšã£ãŠéåžžã«é
åçãªãã©ãããã©ãŒã ã§ããæ¬æžã§ã¯ãFreeBSDã®åºæ¬çãªæŠå¿µããå§ãŸããã·ã¹ãã 管çããããã¯ãŒãã³ã°ãããã°ã©ãã³ã°ç°å¢ã®ã»ããã¢ãããèšèªå¥ã®éçºããããã°ãã¢ãžã¥ãŒã«éçºãªã©ãåºç¯ãã€å®è·µçãªãããã¯ãã«ããŒããŸããåããŠã®ãŠãŒã¶ãŒã«ã¯ã€ã³ã¹ããŒã«ãšåºæ¬èšå®ããå§ããããçµéšè±å¯ãªããã°ã©ãã«ã¯é«åºŠãªããŒããŸã§å¹
åºãæ±ããŸããè±å¯ãªã€ã©ã¹ããæé ã®èª¬æãå
·äœçãªã³ãŒãäŸã亀ããèªè
ãç解ãæ·±ããªããå®éã®ãããžã§ã¯ãã§FreeBSDã掻çšã§ããããã«ãµããŒãããŸããæ¬æžã¯FreeBSDã®ç解ãšå©çšã«ãããŠæ¬ ãããªããªãœãŒã¹ãšãªãããšã§ãããã
== ã¯ããã« ==
=== FreeBSDãšã¯ ===
FreeBSDã¯ãé«æ§èœã§å®å®æ§ãããããªãŒãã³ãœãŒã¹ã®Unixç³»ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§ããããã¯ãå¹
åºãçšéã«é©ããã«ãŒãã«ãšãŠãŒã¶ãŒã©ã³ãããã°ã©ã ã§æ§æãããŠãããå€ãã®ããã°ã©ããã·ã¹ãã 管çè
ã«æ¯æãããŠããŸãã
=== ç¹åŸŽãšå©ç¹ ===
;é«ãæ§èœãšå®å®æ§: FreeBSDã¯åªããããã©ãŒãã³ã¹ãšä¿¡é Œæ§ãæäŸãã倧èŠæš¡ãªã·ã¹ãã ããçµã¿èŸŒã¿ããã€ã¹ãŸã§æ§ã
ãªç°å¢ã§å©çšãããŠããŸãã
;ãªãŒãã³ãœãŒã¹: FreeBSDã¯ã[[W:BSDã©ã€ã»ã³ã¹#äžæ¡é
BSDã©ã€ã»ã³ã¹|äžæ¡é
BSDã©ã€ã»ã³ã¹]] (3-clause BSD license) ãããæžé¢äžã®èš±å¯ãªãéçºè
ã®å称ã掟çç©ã®æšå¥šã販売ä¿é²ã«äœ¿çšããªãããšããæ¡é
ãåé€ãã'''[[W:BSDã©ã€ã»ã³ã¹#äºæ¡é
BSDã©ã€ã»ã³ã¹|äºæ¡é
BSDã©ã€ã»ã³ã¹]]''' (2-clause BSD license) ãã®äžã§æäŸãããã³ãã¥ããã£ã«ãã£ãŠéçºã»ã¡ã³ããã³ã¹ãããŠããŸããããã«ããããŠãŒã¶ãŒã¯ãœãŒã¹ã³ãŒãã«ã¢ã¯ã»ã¹ããèªç±ã«å€æŽãã«ã¹ã¿ãã€ãºãå¯èœã§ãã
;匷åãªãããã¯ãŒãã³ã°æ©èœ: FreeBSDã¯ãããã¯ãŒãã³ã°ã«ç¹åããŠãããé«åºŠãªãããã¯ãŒã¯ãµãŒãã¹ãã»ãã¥ãªãã£æ©èœãæäŸããŸãã
=== FreeBSDã®æŽå² ===
FreeBSDã¯ãBerkeley Software Distribution (BSD) ãã掟çãããªãŒãã³ãœãŒã¹ã®Unixç³»ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§ããããã®æŽå²ã¯é·ããã®ã§ãã以äžã«FreeBSDã®äž»ãªæŽå²çãªåºæ¥äºãèŠçŽããŸãã
:{| class=wikitable
|+ FreeBSDã®æŽå²
|-
!style="width:8em"|幎
|äºè±¡
|-
!1974幎
|ã«ãªãã©ã«ãã¢å€§åŠããŒã¯ã¬ãŒæ ¡ã®Bob FabryææãAT&TããUnixã®ãœãŒã¹ã©ã€ã»ã³ã¹ãååŸãDARPAã®æ¯æŽãåããŠãComputer Systems Research GroupãAT&T Research Unixãæ¹è¯ãããBerkeley UnixããŸãã¯ãBerkeley Software DistributionãïŒBSDïŒãšåŒã°ããããã«ãªãã
|-
!1976幎
|Bill Joyã«ãã£ãŠBSDãããžã§ã¯ããèšç«ãBSDã¯AT&T Unixã®ã³ãŒããå«ãã§ããããã䜿çšããããã«ã¯ãŸãAT&Tããã©ã€ã»ã³ã¹ãååŸããå¿
èŠããã£ãã
|-
!1989幎6æ
|"Networking Release 1"ãŸãã¯åã«Net/1 - æåã®BSDã®å
¬éããŒãžã§ã³ããªãªãŒã¹ãããã
|-
!1991幎
|"Networking Release 2"ïŒNet/2ïŒãAT&Tã®ã³ãŒããäžéšæ®ããŠãªãªãŒã¹ãããã
|-
!1992幎
|Net/2ã®æ°ã¶æåŸãWilliamãšLynne JolitzãAT&Tã®6ã€ã®ãã¡ã€ã«ã®ä»£æ¿ç©ãäœæããBSDãIntel 80386ããŒã¹ã®ãã€ã¯ãããã»ããµã«ç§»æ€ã386BSDãšããŠãªãªãŒã¹ãããã
|-
!1992幎1æ
|Berkeley Software Design Inc.ïŒBSDiïŒãBSD/386ïŒåŸã®BSD/OSïŒããªãªãŒã¹ãAT&Tã¯BSDiã«å¯ŸããAT&Tã®ãœãŒã¹ã³ãŒãã®é
åžãã©ã€ã»ã³ã¹éåã§ãããšããŠèšŽèšãèµ·ããã
|-
!1993幎
|FreeBSDãããžã§ã¯ãããžã§ãŒãã³ã»ãããŒããRod GrimesãDavid Greenmanã«ãã£ãŠã¹ã¿ãŒãã
|-
!1993幎6æ19æ¥
|FreeBSDã®éçºéå§ãã¢ããŠã³ã¹ãããã
|-
!1993幎12æ
|FreeBSD 1.0ãæåã®ãªãªãŒã¹ã
|-
!1994幎1æ
|ããã«ãšã«ãªãã©ã«ãã¢å€§åŠããŒã¯ã¬ãŒæ ¡ãšã®UNIX蚎èšã®å解ãæç«ã4.3BSD Net/2ã«UNIXã®ã©ã€ã»ã³ã¹ã«æµè§Šããéšåãèªããããã
|-
!1994幎
|BSDiãšAT&Tã®èšŽèšã¯å解ããå
·äœçãªæ¡ä»¶ã¯å
¬éãããªãã£ãããBSDiã¯ãœãŒã¹ããŒã¹ãæ°ãã4.4BSD-Lite2ã«ç§»è¡ããããšãåæã
|-
!1994幎5æ
|FreeBSD 1.1ããªãªãŒã¹ã
|-
!1994幎7æ
|FreeBSD 1.1.5.1ãæåŸã®4.3BSD Net/2ããŒã¹ã®éçºãšããŠãªãªãŒã¹ã
|-
!1994幎11æ
|FreeBSDãããžã§ã¯ãã4.4BSD-LiteãããŒã¹ã«ããŠFreeBSDã®éçºãåéããFreeBSD 2.0ããªãªãŒã¹ãããã
|-
!1994幎以é
|FreeBSDã¯é 調ã«çºå±ãç¶ããæšæºã®X Window Systemã«ã€ããŠXFree86ããX.Orgãžã®ç§»è¡ãè¡ãããïŒFreeBSD 5.3以éïŒã
|}
:;2024幎çŸåš: FreeBSDã¯åºç¯ãªçšéã§å©çšãããé«ãæ§èœãä¿¡é Œæ§ãæè»æ§ãè©äŸ¡ãããŠããŸããWebãµãŒããã«ãŒã¿ããã¡ã€ã¢ãŠã©ãŒã«ãçµã¿èŸŒã¿ã·ã¹ãã ããããŠNintendo Switchãªã©ãããŸããŸãªãã©ãããã©ãŒã ã§åäœããŠããŸããã³ãã¥ããã£ãšéçºè
ã«ãã£ãŠç¶ç¶çã«ã¡ã³ããã³ã¹ãè¡ãããææ°ã®æè¡ã«ãè¿œéããŠããŸãã
<!--
;1964幎é :Multicsãããžã§ã¯ããå§ãŸããAT&Tãã«ç 究æãšGEãåå ã
;1969幎:ã±ã³ã»ãã³ããœã³ãããã¹ã»ãªãããŒããMulticsããé¢ããã·ã³ãã«ã§äœ¿ããããOSã®éçºã«çæã
;1970幎代:PDP-7äžã§åæã®UNIXã®éçºãè¡ãããCèšèªãéçºãããã
;1980幎é :DECãVAX-11ãçºå£²ãAT&TãVAX-11ã«UNIXã移æ€ããããä»®æ³èšæ¶ã«é察å¿ãã«ãªãã©ã«ãã¢å€§åŠããŒã¯ã¬ãŒæ ¡ãä»®æ³èšæ¶å¯Ÿå¿UNIXãçºè¡šããBSDã®å§ãŸãã
;1983幎:ãªãã£ãŒãã»ã¹ããŒã«ãã³ãGNUãããžã§ã¯ããç«ã¡äžãã
;1984幎:X/OpenãUNIXæšæºåå§å¡äŒãç«ã¡äžããã
;1980幎代äžé :AT&T/SUNã°ã«ãŒããUNIX System V Release 4ãçºè¡šãOSFãšUIãçµæãããUNIXæŠäºãåçºã
;1991幎:ã«ãªãã©ã«ãã¢å€§åŠããŒã¯ã¬ãŒæ ¡ãNetworking Release 2(Net/2)ããªãªãŒã¹ãBSD蚎èšãçºçã
;1992幎:BSDiã«å¯ŸããŠAT&Tãèäœæš©äŸµå®³ã®èšŽèšãèµ·ããã
;1994幎:ã«ãªãã©ã«ãã¢å€§åŠããŒã¯ã¬ãŒæ ¡ãBSD4.4-LiteãšAT&Tç±æ¥ã®ã³ãŒããå«ã2ã€ã®ããŒãžã§ã³ããªãªãŒã¹ã
;1990幎代:UNIXæŠäºãX/OpenãšOSFãšUIã®å䜵ã§çµæ¯ãUNIXã®èäœæš©ã¯ããã«ã«æž¡ããSCOã«äžéšç§»åã
;2003幎:SCOãLinuxãUNIXã®æš©å©ã䟵害ããŠãããšããŠèšŽèšãèµ·ãããSCO蚎èšãå§ãŸãã7幎éç¶ãã
;2010幎代:SCO蚎èšã®çµæ«ããSCOã¯ããã«ããUNIXã®æš©å©ãããã£ãŠããªãããšãªããUNIXæŠäºãçµçµã
-->
=== ã€ã³ã¹ããŒã«ãšåºæ¬çãªèšå® ===
FreeBSDã®ã€ã³ã¹ããŒã«ã¯çŽæçã§ããã以äžã®æé ã«åŸã£ãŠããŸãã
#ã€ã³ã¹ããŒã«ã¡ãã£ã¢ã®äœæ: å
¬åŒãŠã§ããµã€ãããææ°ã®ã€ã³ã¹ããŒã«ã€ã¡ãŒãžãããŠã³ããŒãããCDãUSBã«æžã蟌ãã§èµ·åã¡ãã£ã¢ãäœæããŸãã
#ã€ã³ã¹ããŒã«ããã»ã¹ã®éå§: èµ·åã¡ãã£ã¢ããã³ã³ãã¥ãŒã¿ãèµ·åããã€ã³ã¹ããŒã«ããã»ã¹ãéå§ããŸãã
#åºæ¬èšå®: èšèªãããŒããŒãããããã¯ãŒã¯èšå®ãªã©ãåºæ¬çãªèšå®ãè¡ããŸãã
#ãã£ã¹ã¯ã®ããŒãã£ã·ã§ã³ãšã€ã³ã¹ããŒã«: ã€ã³ã¹ããŒã«å
ã®ãã£ã¹ã¯ãéžæããããŒãã£ã·ã§ã³èšå®ãè¡ã£ãŠãããFreeBSDãéžæãããã£ã¹ã¯ã«ã€ã³ã¹ããŒã«ããŸãã
#ããŒãããŒããŒã®èšå®: ã€ã³ã¹ããŒã«ãå®äºããããããŒãããŒããŒã®èšå®ãè¡ããŸãã
ããã«ãããåºæ¬çãªFreeBSDã·ã¹ãã ãæ§ç¯ãããå©çšãéå§ããããšãã§ããŸãã
== FreeBSDã®åºæ¬æŠå¿µ ==
=== ã«ãŒãã«ãšãŠãŒã¶ãŒã©ã³ã ===
==== ã«ãŒãã« ====
FreeBSDã®ã¢ãŒããã¯ãã£ã¯ãã«ãŒãã«ãšãŠãŒã¶ãŒã©ã³ããšãã2ã€ã®äž»èŠãªã³ã³ããŒãã³ãã«åãããŠããŸããã«ãŒãã«ã¯ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®äžæ žã§ãããã·ã¹ãã å
šäœã®ç®¡çãšå¶åŸ¡ãæ
åœããŸãã以äžã«ãFreeBSDã®ã«ãŒãã«ã«é¢é£ããéèŠãªæŠå¿µã玹ä»ããŸãã
; ããŒããŠã§ã¢å¶åŸ¡
: ã«ãŒãã«ã¯ããŒããŠã§ã¢ãšçŽæ¥ããåãããåçš®ããã€ã¹ïŒããã»ããµãã¡ã¢ãªããã£ã¹ã¯ããããã¯ãŒã¯ã€ã³ã¿ãŒãã§ãŒã¹ãªã©ïŒãå¶åŸ¡ããŸããããã«ãããããŒããŠã§ã¢è³æºãå¹æçã«å©çšããã·ã¹ãã ã®åºæ¬çãªæ©èœãæäŸããŸãã
; ã·ã¹ãã ã³ãŒã«
: ã«ãŒãã«ã¯ãŠãŒã¶ãŒã©ã³ãã®ããã°ã©ã ãããŒããŠã§ã¢ãªãœãŒã¹ã«ã¢ã¯ã»ã¹ã§ããããã«ãã·ã¹ãã ã³ãŒã«ãšåŒã°ããç¹å®ã®ã€ã³ã¿ãŒãã§ãŒã¹ãæäŸããŸããããã«ããããŠãŒã¶ãŒã©ã³ãã®ã¢ããªã±ãŒã·ã§ã³ã¯æš©éã®ããæäœãå®è¡ã§ããŸãã
; ããã»ã¹ç®¡ç
: ã«ãŒãã«ã¯ããã»ã¹ã®çæãã¹ã±ãžã¥ãŒãªã³ã°ãçµäºãªã©ãããã»ã¹ã®ã©ã€ããµã€ã¯ã«å
šè¬ã管çããŸããããã«ããããã«ãã¿ã¹ã¯ç°å¢ã§è€æ°ã®ããã°ã©ã ãåæã«å®è¡ãããŸãã
==== ãŠãŒã¶ãŒã©ã³ã ====
ãŠãŒã¶ãŒã©ã³ãã¯ããŠãŒã¶ãŒã¢ããªã±ãŒã·ã§ã³ãããã°ã©ã ãåäœããé åã§ãããŠãŒã¶ãŒã©ã³ãã¯ä»¥äžã®èŠçŽ ã§æ§æãããŠããŸãã
; ãŠãŒã¶ãŒã¢ããªã±ãŒã·ã§ã³
: ãŠãŒã¶ãŒã©ã³ãã«ã¯ããŠãŒã¶ãŒãçŽæ¥æäœããããã®ã¢ããªã±ãŒã·ã§ã³ãå«ãŸããŸããããã«ã¯ããã¹ããšãã£ã¿ããŠã§ããã©ãŠã¶ãã¡ãŒã«ã¯ã©ã€ã¢ã³ããªã©ããããŸãã
; ã·ã§ã«
: ãŠãŒã¶ãŒãšã·ã¹ãã ãšã®å¯Ÿè©±ãå¯èœã«ããã³ãã³ãã©ã€ã³ã€ã³ã¿ãŒãã§ãŒã¹ïŒã·ã§ã«ïŒããŠãŒã¶ãŒã©ã³ãã«å±ããŸããã·ã§ã«ã¯ãŠãŒã¶ãŒãã³ãã³ããå
¥åããããã解éããŠã«ãŒãã«ã«äŒããŸãã
; ã·ã¹ãã ã©ã€ãã©ãª
: ãŠãŒã¶ãŒã©ã³ãã®ããã°ã©ã ãå©çšããæšæºã©ã€ãã©ãªãã·ã¹ãã ã³ãŒã«ã®åŒã³åºãã€ã³ã¿ãŒãã§ãŒã¹ãæäŸãããŸããããã«ãããããã°ã©ãã¯é«åºŠãªæ©èœãæ軜ã«å©çšã§ããŸãã
==== ã«ãŒãã«ãšãŠãŒã¶ãŒã©ã³ãã®é£æº ====
ã«ãŒãã«ãšãŠãŒã¶ãŒã©ã³ãã¯å¯æ¥ã«é£æºããŠåäœããŸãããŠãŒã¶ãŒã©ã³ãã®ããã°ã©ã ã¯ã·ã¹ãã ã³ãŒã«ãéããŠã«ãŒãã«ã«ãªã¯ãšã¹ããéããã«ãŒãã«ã¯ããã«å¿ããŠããŒããŠã§ã¢ãã·ã¹ãã ãªãœãŒã¹ãå¶åŸ¡ããŸãããã®é£æºã«ãããå®å®æ§ãšå¹çæ§ãä¿ã¡ãªãããæ§ã
ãªã¢ããªã±ãŒã·ã§ã³ãå®è¡ãããã®ã§ãã
==== FreeBSDã®ãœãŒã¹ã³ãŒã管ç ====
FreeBSDã®ãœãŒã¹ã³ãŒãã¯ãã«ãŒãã«ãšãŠãŒã¶ãŒã©ã³ãã®äž¡æ¹ãäžå
管çãããããããã®ãœãŒã¹ã³ãŒã㯠<code>/usr/src/</code> ãã£ã¬ã¯ããªã«æ ŒçŽãããŠããŸãããã®çµ±äžããã管çäœå¶ã¯ãã·ã¹ãã å
šäœã®äžè²«æ§ãšå¹ççãªéçºããã»ã¹ã確ä¿ãã圹å²ãæãããŠããŸãã
以äžããœãŒã¹ããªãŒã®äžã§ä»£è¡šçãªãã®ãããã€ã玹ä»ããŸãã
; ã«ãŒãã«ã®ãœãŒã¹ã³ãŒã (/usr/src/sys) : ã«ãŒãã«ã®ãœãŒã¹ã³ãŒã㯠<code>/usr/src/sys</code> ãã£ã¬ã¯ããªå
ã«é
眮ãããŠããŸãããã®ãã£ã¬ã¯ããªã«ã¯ãæ§ã
ãªããŒããŠã§ã¢ã¢ãŒããã¯ãã£ãããã€ã¹ãã©ã€ããã·ã¹ãã ã³ãŒã«ãªã©ãFreeBSDã«ãŒãã«ã®èŠçŽ ãå«ãŸããŠããŸãã
:; ã¢ãŒããã¯ãã£ããšã®ãã£ã¬ã¯ã㪠: ã«ãŒãã«ã®ãœãŒã¹ã³ãŒãã¯ããµããŒããããŠããç°ãªãããŒããŠã§ã¢ã¢ãŒããã¯ãã£ã«å¯Ÿå¿ãããããããããã®ã¢ãŒããã¯ãã£ããšã«ãã£ã¬ã¯ããªãçšæãããŠããŸããäŸãã°ãamd64ã¢ãŒããã¯ãã£åãã®ãœãŒã¹ã³ãŒã㯠<code>/usr/src/sys/amd64/</code> 以äžã«é
眮ãããŠããŸãã
:; ããã€ã¹ãã©ã€ã : ã«ãŒãã«ã®äžã«ã¯æ§ã
ãªããã€ã¹ãå¶åŸ¡ããããã®ããã€ã¹ãã©ã€ããå«ãŸããŠããŸãããããã®ããã€ã¹ãã©ã€ãã®ãœãŒã¹ã³ãŒã㯠<code>/usr/src/sys/dev/</code> ãã£ã¬ã¯ããªä»¥äžã«é
眮ãããŠããŸãã
:; ã·ã¹ãã ã³ãŒã«ãšã«ãŒãã«æ©èœ : ã·ã¹ãã ã³ãŒã«ãã«ãŒãã«ã®åºæ¬çãªæ©èœã«é¢é£ãããœãŒã¹ã³ãŒã㯠<code>/usr/src/sys/kern/</code> ãã£ã¬ã¯ããªã«æ ŒçŽãããŠããŸããããã«ã¯ããã»ã¹ç®¡çãã¡ã¢ãªç®¡çããã¡ã€ã«ã·ã¹ãã ãªã©ãã«ãŒãã«ã®äžæ žçãªæ©èœãå«ãŸããŠããŸãã
; ãŠãŒã¶ãŒã©ã³ãã®ãœãŒã¹ã³ãŒã (/usr/src/usr) : ãŠãŒã¶ãŒã©ã³ãã®ãœãŒã¹ã³ãŒã㯠<code>/usr/src/usr</code> ãã£ã¬ã¯ããªå
ã«é
眮ãããŠããŸãããã®ãã£ã¬ã¯ããªã«ã¯ããŠãŒã¶ãŒã¢ããªã±ãŒã·ã§ã³ãã·ã§ã«ãã·ã¹ãã ããŒã«ãã©ã€ãã©ãªãªã©ãå«ãŸããŠããŸãã
; ãŠãŒã¶ãŒã¢ããªã±ãŒã·ã§ã³ : ãŠãŒã¶ãŒã¢ããªã±ãŒã·ã§ã³ã®ãœãŒã¹ã³ãŒã㯠<code>/usr/src/usr.bin/</code> ãã£ã¬ã¯ããªä»¥äžã«ååšããŸããããã«ã¯äžè¬çãªã³ãã³ãã©ã€ã³ããŒã«ããŠãŒã¶ãŒãçŽæ¥å©çšããããã°ã©ã ãæ ŒçŽãããŠããŸãã
; ã·ã§ã« : ã·ã§ã«ã®ãœãŒã¹ã³ãŒã㯠<code>/usr/src/bin/sh/</code> ãã£ã¬ã¯ããªã«é
眮ãããŠããŸããã·ã§ã«ã¯ãŠãŒã¶ãŒãã³ãã³ããå
¥åããŠå¯Ÿè©±ããããã®ç°å¢ãæäŸããŸãã
; ã·ã¹ãã ã©ã€ãã©ãª : ãŠãŒã¶ãŒã¢ããªã±ãŒã·ã§ã³ãå©çšããã·ã¹ãã ã©ã€ãã©ãªã®ãœãŒã¹ã³ãŒã㯠<code>/usr/src/lib/</code> ãã£ã¬ã¯ããªä»¥äžã«äœçœ®ããŠããŸãããããã®ã©ã€ãã©ãªã¯ãããã°ã©ã ã®éçºãå®è¡ã«å¿
èŠãªåºæ¬çãªæ©èœãæäŸããŸãã
ãã®ããã«ãFreeBSDã®ãœãŒã¹ã³ãŒãã¯å¹æçã«æŽçãããéçºè
ãç¹å®ã®é åã«çŠç¹ãåœãŠãŠäœæ¥ããããšã容æã«ããŠããŸãã
=== ããã»ã¹ãšã¹ã¬ãã ===
ããã»ã¹ã¯å®è¡äžã®ããã°ã©ã ã®ã€ã³ã¹ã¿ã³ã¹ã§ãããã¡ã¢ãªããªãœãŒã¹ãç¬ç«ããŠæã¡ãŸããããã«å¯ŸããŠãã¹ã¬ããã¯ããã»ã¹å
ã§åäœãã軜éãªå®è¡åäœã§ãåãããã»ã¹å
ã®ã¹ã¬ããã¯ã¡ã¢ãªãå
±æããŸããFreeBSDã¯ãã«ãã¹ã¬ããããµããŒãããŠãããå¹ççãªãã«ãã³ã¢åŠçãå¯èœã§ãã
=== ãã¡ã€ã«ã·ã¹ãã ãšã¹ãã¬ãŒãž ===
FreeBSDã¯è€æ°ã®ãã¡ã€ã«ã·ã¹ãã ããµããŒãããZFSïŒZettabyte File SystemïŒãªã©ãç¹ã«æ³šç®ãããŠããŸããããã«ãããé«åºŠãªããŒã¿ç®¡çãèé害æ§ãå®çŸã§ããŸããã¹ãã¬ãŒãžã¯ãã£ã¹ã¯ãä»ã®ã¡ãã£ã¢ãæããFreeBSDã¯æ§ã
ãªã¹ãã¬ãŒãžããã€ã¹ãå¹æçã«æ±ããŸãã
=== ãããã¯ãŒãã³ã° ===
FreeBSDã¯åŒ·åãªãããã¯ãŒãã³ã°æ©èœãåããŠãããTCP/IPã¹ã¿ãã¯ã®å®è£
ãé«åºŠãªãããã¯ãŒã¯ãµãŒãã¹ãæäŸããŸãããããã¯ãŒãã³ã°ã¯ã·ã¹ãã ã®äžå¿çãªèŠçŽ ã§ãããFreeBSDã¯ãããå¹æçãã€æè»ã«æ±ããŸãããããã¯ãŒãã³ã°æ©èœã¯ã·ã¹ãã ã®å®å®æ§ãæ§èœã«çŽçµããŠãããããããã°ã©ãã«ãšã£ãŠéèŠãªæŠå¿µã§ãã
ãããã®åºæ¬æŠå¿µãç解ããããšã¯ãFreeBSDäžã§ããã°ã©ã ãéçºããéã®åºç€ãšãªããŸããããããã®æŠå¿µã«ã€ããŠæ·±ãç解ããå®è·µçãªã³ãŒãã£ã³ã°ãã·ã¹ãã 管çã«æŽ»ããããšãéèŠã§ãã
== PortsãšPkgs ==
FreeBSDã§ã¯ããœãããŠã§ã¢ã®ç®¡çã« Ports ãš Pkgs ãšãã2ã€ã®ä»çµã¿ããããŸãã
;Ports
:Ports ã¯ããœãŒã¹ã³ãŒããããœãããŠã§ã¢ããã«ãã»ã€ã³ã¹ããŒã«ããããã®ãã¬ãŒã ã¯ãŒã¯ã§ããåãœãããŠã§ã¢ã¯å°çšã®ãã£ã¬ã¯ããªïŒããŒãïŒå
ã«é
眮ããããã®ãã£ã¬ã¯ããªå
ã«ã¯ãã«ããã€ã³ã¹ããŒã«ã«å¿
èŠãªæé ãèšè¿°ãããŠããŸããããŒãã䜿çšããããšã§ããŠãŒã¶ãŒã¯ãœãŒã¹ã³ãŒãããæé©ãªãã€ããªããã«ãããã«ã¹ã¿ãã€ãºã§ããŸããããã¯ç¹ã«ãç¹å®ã®ãªãã·ã§ã³ãã©ã€ãã©ãªã®å€æŽãå¿
èŠãªå Žåã«æçšã§ãã
:; portsã®ãã£ã¬ã¯ããªã«ç§»åããŠãç¹å®ã®ãœãããŠã§ã¢ããã«ãã»ã€ã³ã¹ããŒã«ããäŸ
::<syntaxhighlight lang=tcsh>
cd /usr/ports/category/software
make install clean
</syntaxhighlight>
;Pkgs
:ïœkgs ã¯ããã«ãæžã¿ã®ãã€ããªããã±ãŒãžãå©çšããä»çµã¿ã§ããPortsãšã¯ç°ãªãããŠãŒã¶ãŒã¯ãœãããŠã§ã¢ã®ãã«ãæé ãæ°ã«ããããšãªããæ¢ã«ãã«ããããããã±ãŒãžãç°¡åã«ã€ã³ã¹ããŒã«ã§ããŸããããã«ãããæ軜ãã€è¿
éã«ãœãããŠã§ã¢ãå°å
¥ã§ããŸãã
:; pkgsã䜿çšããŠãœãããŠã§ã¢ãã€ã³ã¹ããŒã«ããäŸ
::<syntaxhighlight lang=tcsh></syntaxhighlight>
pkg install software
</syntaxhighlight>
ã©ã¡ãã®æ¹æ³ãå©çšã§ããç¶æ³ãèŠä»¶ã«å¿ããŠäœ¿ãåããããšãã§ããŸããPortsã¯æè»æ§ãé«ããPkgsã¯æ軜ã§å¹ççã§ããFreeBSDã§ã¯ãããã®ä»çµã¿ãé§äœ¿ããŠãã·ã¹ãã ãæè»ã«æ§ç¯ã»ç®¡çããããšãå¯èœã§ãã
== ã·ã¹ãã 管ç ==
=== ãŠãŒã¶ãŒãšã°ã«ãŒã管ç ===
=== ããã»ã¹ç®¡çãšã¿ã¹ã¯ã¹ã±ãžã¥ãŒãªã³ã° ===
=== ã·ã¹ãã ãã°ãšç£èŠ ===
=== ããã©ãŒãã³ã¹ãã¥ãŒãã³ã° ===
== ãããã¯ãŒãã³ã°ãšéä¿¡ ==
=== ãããã¯ãŒã¯èšå®ãšæ§æ ===
=== ã€ã³ã¿ãŒããããµãŒãã¹ã®èšå® (SSH, FTP, DNS, etc.) ===
=== ãã¡ã€ã¢ãŠã©ãŒã«ãšã»ãã¥ãªã㣠===
== ããã°ã©ãã³ã°ç°å¢ã®ã»ããã¢ãã ==
=== ã³ã³ãã€ã©ãšãã«ãããŒã« ===
=== ã©ã€ãã©ãªãšããããŒãã¡ã€ã« ===
=== ããã±ãŒãžç®¡ç ===
== ããã°ã©ãã³ã°èšèªãšéçº ==
=== Cèšèªéçº ===
=== ã·ã§ã«ã¹ã¯ãªãã ===
=== ä»ã®ãµããŒããããŠããèšèª ===
== ãããã°ãšãããã¡ã€ãªã³ã° ==
=== gdbãçšãããããã° ===
=== ããã©ãŒãã³ã¹ãããã¡ã€ãªã³ã°ã®åºæ¬ ===
== ããã€ã¹ãšããŒããŠã§ã¢ã®æäœ ==
=== ãã©ã€ãã®éçº ===
=== ããã€ã¹ã®ç®¡çãšèšå® ===
== ã«ãŒãã«ã¢ãžã¥ãŒã«ã®éçº ==
=== ã«ãŒãã«ã¢ãžã¥ãŒã«ã®åºæ¬ ===
=== ã«ãŒãã«ã®æ¡åŒµãšã«ã¹ã¿ãã€ãº ===
== ãããžã§ã¯ããšå®è·µçãªã¢ããªã±ãŒã·ã§ã³ ==
=== å®éã®ãããžã§ã¯ãäŸ ===
=== ã³ãŒãã®æé©åãšä¿å® ===
== ãªãœãŒã¹ ==
* FreeBSD å
¬åŒãµã€ã (https://www.freebsd.org/) {{---}} FreeBSD ã®ããŠã³ããŒããããã¥ã¡ã³ããFAQãã»ãã¥ãªãã£æ
å ±ãã¢ããããŒããéçºè
ãªãœãŒã¹ãªã©ãããŸããŸãªæ
å ±ãæäŸããŠããŸãã
* FreeBSD ãã©ãŒã©ã (https://forums.freebsd.org/) {{---}} FreeBSD ã«é¢ãã質åãæèŠäº€æãã§ãããã©ãŒã©ã ã§ããå€ãã®ãŠãŒã¶ãŒãã¢ã¯ãã£ãã«åå ããŠããŸãã
* FreeBSD ããã¥ã¡ã³ããŒã·ã§ã³ãããžã§ã¯ã (https://docs.freebsd.org/) {{---}} FreeBSD ã®ããã¥ã¡ã³ãããŸãšããããŠãããããžã§ã¯ãã§ããã·ã¹ãã 管çããããã¯ãŒã¯ãã»ãã¥ãªãã£ãéçºãªã©ã®ãããã¯ãã«ããŒãããŠããŸãã
* FreeBSD Ports (https://www.freshports.org/) {{---}} FreeBSD Ports ã¯ãFreeBSD çšã®ãœãããŠã§ã¢ããã±ãŒãžã管çããã·ã¹ãã ã§ããFreshPorts ã¯ãææ°ã®æŽæ°æ
å ±ãæ°ãããœãããŠã§ã¢ããã±ãŒãžãªã©ãæäŸããŸãã
* BSD Now (https://www.bsdnow.tv/) {{---}} BSD Now ã¯ãFreeBSD ãå«ã BSD ç³»ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã«é¢ãããã¥ãŒã¹ãæ
å ±ããã¥ãŒããªã¢ã«ãã€ã³ã¿ãã¥ãŒãªã©ãæäŸãããŠã§ããµã€ãã§ããPodcast ãé
ä¿¡ãããŠãããå®æçã«ææ°ã® BSD ç³»ã·ã¹ãã ã«ã€ããŠã®è©±é¡ãåãäžããããŠããŸãã
* FreeBSD Handbook (https://www.freebsd.org/doc/handbook/) {{---}} FreeBSD Handbook ã¯ãFreeBSD ã·ã¹ãã ã®æäœæ¹æ³ãèšå®æ¹æ³ãããã°ã©ã ã®ãã«ãæ¹æ³ãªã©ã«ã€ããŠè©³çŽ°ã«èª¬æããããã¥ã¡ã³ãã§ããåå¿è
ããäžçŽè
ãŸã§ãå¹
åºããŠãŒã¶ãŒã«åœ¹ç«ã€å
容ãå«ãŸããŠããŸãã
* FreeBSD æ¥æ¬èªãããžã§ã¯ã (https://www.jp.freebsd.org/) {{---}} FreeBSD æ¥æ¬èªãããžã§ã¯ãã¯ãæ¥æ¬èªãŠãŒã¶ãŒåãã« FreeBSD ã®æ
å ±ããµããŒããæäŸããã³ãã¥ããã£ã§ããæ¥æ¬èªããã¥ã¡ã³ãããã©ãŒã©ã ãã¡ãŒãªã³ã°ãªã¹ããªã©ããããåå¿è
ã§ãå®å¿ããŠå©çšã§ããŸãã
== èèš» ==
<references />
[[ã«ããŽãª:ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ]] | 2023-03-07T10:41:24Z | 2024-01-20T15:50:30Z | [
"ãã³ãã¬ãŒã:---"
] | https://ja.wikibooks.org/wiki/FreeBSD |
37,139 | åæ³ç¬¬600æ¡ | æ³åŠ>æ°äºæ³>åæ³>ã³ã³ã¡ã³ã¿ãŒã«åæ³>第2ç·š åè¡çº (ã³ã³ã¡ã³ã¿ãŒã«åæ³)>åæ³ç¬¬600æ¡
(åè·èšŒåžã®äº€ä»çŸ©å)
2018幎æ¹æ£ã«ãŠä»¥äžã®æ¡é
ãçµ±åãç¶æ¿ã
第598æ¡
第627æ¡ | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ°äºæ³>åæ³>ã³ã³ã¡ã³ã¿ãŒã«åæ³>第2ç·š åè¡çº (ã³ã³ã¡ã³ã¿ãŒã«åæ³)>åæ³ç¬¬600æ¡",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "(åè·èšŒåžã®äº€ä»çŸ©å)",
"title": "æ¡æ"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "2018幎æ¹æ£ã«ãŠä»¥äžã®æ¡é
ãçµ±åãç¶æ¿ã",
"title": "æ¡æ"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "第598æ¡",
"title": "æ¡æ"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "第627æ¡",
"title": "æ¡æ"
}
] | æ³åŠïŒæ°äºæ³ïŒåæ³ïŒã³ã³ã¡ã³ã¿ãŒã«åæ³ïŒç¬¬2ç·š åè¡çº (ã³ã³ã¡ã³ã¿ãŒã«åæ³)ïŒåæ³ç¬¬600æ¡ | [[æ³åŠ]]ïŒ[[æ°äºæ³]]ïŒ[[åæ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«åæ³]]ïŒ[[第2ç·š åè¡çº (ã³ã³ã¡ã³ã¿ãŒã«åæ³)]]ïŒ[[åæ³ç¬¬600æ¡]]
==æ¡æ==
(åè·èšŒåžã®äº€ä»çŸ©å)
;第600æ¡
:[[å庫å¶æ¥]]è
ã¯ã[[å¯èš]]è
ã®è«æ±ã«ãããå¯èšç©ã®[[åè·èšŒåž]]ã亀ä»ããªããã°ãªããªãã
===æ¹æ£çµç·¯===
2018幎æ¹æ£ã«ãŠä»¥äžã®æ¡é
ãçµ±åãç¶æ¿ã
第598æ¡
: [[å庫å¶æ¥]]è
ã[[å¯èš]]è
ãè«æ±ãå ãªå¯èšç©ã[[é 蚌åž]]åã[[質å
¥èšŒåž]]ã²äº€ä»ã¹ã«ã³ãã²èŠã¹
第627æ¡
# [[å庫å¶æ¥]]è
ãå¯èšè
ãè«æ±ã¢ã«ããã[[é 蚌åž]]åã[[質å
¥èšŒåž]]ã代ãã[[åè·èšŒåž]]ã²äº€ä»ã¹ã«ã³ãã²èŠã¹
# åè·èšŒåžããé 蚌åžãé¢ã¹ã«èŠå®ã²æºçšã¹
==解説==
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«åæ³|åæ³]]
|[[第2ç·š åè¡çº (ã³ã³ã¡ã³ã¿ãŒã«åæ³)|第2ç·š åè¡çº]]<br>
[[第2ç·š åè¡çº (ã³ã³ã¡ã³ã¿ãŒã«åæ³)#9|第9ç« å¯èš]]<br>
第2ç¯ãå庫å¶æ¥
|[[åæ³ç¬¬599æ¡]]<br>(å®çŸ©)
|[[åæ³ç¬¬601æ¡]]<br>(åè·èšŒåžã®èšèŒäºé
)
}}
{{stub|law}}
[[category:åæ³|600]]
[[category:åæ³ 2018幎æ¹æ£|600]] | 2023-03-07T19:05:35Z | 2023-03-07T19:05:35Z | [
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E5%95%86%E6%B3%95%E7%AC%AC600%E6%9D%A1 |
37,150 | ããã°ã©ãã³ã°/æµ®åå°æ°ç¹æ° | ããã°ã©ãã³ã°ã«ãããŠãæ°å€ãæ±ãããšã¯éåžžã«éèŠã§ããããããæ°å€ã®è¡šçŸã«ã¯ããã€ãã®çš®é¡ããããããããã«ç¹åŸŽããããŸããæ¬ç« ã§ã¯ããã®äžã§ãç¹ã«éèŠãªæµ®åå°æ°ç¹æ°ã«ã€ããŠè§£èª¬ããŸãã
æµ®åå°æ°ç¹æ°ãšã¯ãå°æ°ç¹ä»¥äžã®æ°å€ããåºå®ãããæ¡æ°ã§è¡šçŸãããã®ã§ã¯ãªããææ°éšãšä»®æ°éšã®åœ¢åŒã§è¡šçŸãããæ°å€ã®ããšãæããŸãã ãã®ãããªè¡šçŸæ¹æ³ã«ãããéåžžã«åºãç¯å²ã®æ°å€ãè¡šçŸããããšãã§ããŸãã
æµ®åå°æ°ç¹æ°ã䜿çšããçç±ã«ã¯ãããã€ãã®å©ç¹ããããŸãã
ãŸããæµ®åå°æ°ç¹æ°ã¯å€æ§ãªå€ãè¡šçŸã§ãããããæŽæ°ã ãã§ãªãå°æ°ãéåžžã«å€§ããªå€ãå°ããªå€ãªã©ãæ§ã
ãªå€ãæ£ç¢ºã«è¡šçŸããããšãã§ããŸãããã®ãããçŸå®äžçã®å€ãã®åé¡ã«å¯ŸããŠããæ£ç¢ºãªæ°å€èšç®ãè¡ãããšãã§ããŸãã
ãŸããæµ®åå°æ°ç¹æ°ã䜿çšãããšæ°å€èšç®ãå¹ççã«å®è¡ããããšãã§ããŸããããã¯ãå€ãã®å Žåãã³ã³ãã¥ãŒã¿ãŒã®ããŒããŠã§ã¢ãæµ®åå°æ°ç¹æ°ã®èšç®ãæé©åããããã«èšèšãããŠããããã§ãã
ããã«ãæµ®åå°æ°ç¹æ°ã¯ãšã©ãŒãæžå°ãããããšãã§ããŸããããšãã°ãæ°å€ãéåžžã«å€§ããªå€ã«ãªããšæŽæ°ã§ã¯ãªãŒããŒãããŒããå¯èœæ§ããããŸãããæµ®åå°æ°ç¹æ°ã§ã¯æ£ç¢ºã«è¡šçŸããããšãã§ããŸãã
æµ®åå°æ°ç¹æ°ã¯IEEE 754èŠæ Œã«åºã¥ããŠæšæºåãããŠãããããŸããŸãªããã°ã©ã ãã·ã¹ãã ã§åãæ¹æ³ã§æ°å€èšç®ãå®è¡ããããšãã§ããŸãã
以äžã®ããã«ãæµ®åå°æ°ç¹æ°ã¯æ£ç¢ºãªæ°å€èšç®ãå¹ççãªæ°å€èšç®ããšã©ãŒã®æžå°ãæšæºåãããæ°å€è¡šçŸãªã©ãå€ãã®å©ç¹ãæã£ãŠããŸãããããã®çç±ãããããã°ã©ãã³ã°ã«ãããŠæµ®åå°æ°ç¹æ°ã䜿çšããããšãäžè¬çã«ãªã£ãŠããŸãã
æµ®åå°æ°ç¹æ°ã«ã¯ãIEEE 754èŠæ Œã«ããè¡šçŸæ¹æ³ãäžè¬çã§ãããã®èŠæ Œã§ã¯ãæµ®åå°æ°ç¹æ°ã32ããããŸãã¯64ãããã®äºé²æ°ã§è¡šçŸããããšãã§ããŸãã IEEE 754èŠæ Œã§ã¯ãæµ®åå°æ°ç¹æ°ãè¡šçŸããããã«ã笊å·ããããææ°éšãä»®æ°éšã®3ã€ã®èŠçŽ ã䜿çšãããŸãã笊å·ãããã¯ãæµ®åå°æ°ç¹æ°ãæ£ãŸãã¯è² ã§ãããã瀺ãããã«äœ¿çšãããŸããææ°éšã¯ãæµ®åå°æ°ç¹æ°ã®äœçœ®ã決å®ããããã«äœ¿çšãããä»®æ°éšã¯ãå®éã®æ°å€ãè¡šçŸããããã«äœ¿çšãããŸãã
æµ®åå°æ°ç¹æ°ã®è¡šçŸæ¹æ³ã«ã¯ããã€ãã®çš®é¡ãããã代衚çãªãã®ã«ã¯ä»¥äžã®ãã®ããããŸãã
IEEE 754èŠæ Œã§ã¯ãæµ®åå°æ°ç¹æ°ã®æ£ç¢ºæ§ãå¶éããããšããããŸããããšãã°ã32ãããã®æµ®åå°æ°ç¹æ°ã§ã¯ãæå¹æ¡æ°ã¯çŽ7æ¡ãã9æ¡ã§ããã64ãããã®æµ®åå°æ°ç¹æ°ã§ã¯ãæå¹æ¡æ°ã¯çŽ15æ¡ãã17æ¡ã§ãããã®å¶éã¯ãæµ®åå°æ°ç¹æ°ãéåžžã«å€§ããªå€ãŸãã¯éåžžã«å°ããªå€ãè¡šãå Žåã«ç¹ã«åé¡ããããŸãã
ãããã£ãŠãããã°ã©ãã¯ãæµ®åå°æ°ç¹æ°ã䜿çšããåã«ããã®å¶éãç解ããæµ®åå°æ°ç¹æ°ã®è¡šçŸæ¹æ³ãæ£ç¢ºã«ã©ã®ããã«æ©èœããããç解ããå¿
èŠããããŸãããŸããèšç®ã®çµæãæµ®åå°æ°ç¹æ°ãšããŠè¡šçŸãããå Žåããã®å¶éãèæ
®ããŠãæ£ç¢ºãªçµæãåŸãããã«é©åãªåŠçãè¡ãå¿
èŠããããŸãã
æµ®åå°æ°ç¹æ°ã¯ãã³ã³ãã¥ãŒã¿ã«ãããŠå®æ°ãæ±ãããã®æ¹åŒã®äžã€ã§ããå®æ°ã¯æéæ¡ã®æ°å€ãããã¯æçæ°ã§è¡šçŸãããŸãããæéã®æ¡æ°ã§ã¯æ£ç¢ºã«è¡šçŸã§ããªãæ°ããããŸãããã®ãããæµ®åå°æ°ç¹æ°ã§ã¯æå¹æ¡æ°ãéå®ããè¿äŒŒçã«å®æ°ãè¡šçŸããŸãã
æµ®åå°æ°ç¹æ°ã¯ã笊å·ãä»®æ°ãææ°ã®3ã€ã®èŠçŽ ããæ§æãããŸãã笊å·ã¯æ£ãŸãã¯è² ãè¡šããä»®æ°ã¯å°æ°éšåããææ°ã¯10ã®ã¹ãä¹ãè¡šããŸãããããã®èŠçŽ ãçµã¿åãããŠãå®æ°ãè¡šçŸããŸãã
æµ®åå°æ°ç¹æ°ã¯ãIEEE 754èŠæ Œã«åºã¥ããŠæšæºåãããŠããŸãããã®èŠæ Œã§ã¯ã32ããããŸãã¯64ãããã®ãããåã䜿ã£ãŠæµ®åå°æ°ç¹æ°ãè¡šçŸããŸãã32ãããã®å Žåã笊å·ã¯1ããããææ°ã¯8ããããä»®æ°ã¯23ãããã§è¡šçŸãããŸãã64ãããã®å Žåã¯ã笊å·ã¯1ããããææ°ã¯11ããããä»®æ°ã¯52ãããã§è¡šçŸãããŸãã
æµ®åå°æ°ç¹æ°ã¯ãå®æ°ãè¿äŒŒçã«è¡šçŸãããããæŒç®èª€å·®ãçããå¯èœæ§ããããŸããäŸãã°ã0.1ãšããæ°å€ã¯10é²æ°ã§æ£ç¢ºã«è¡šçŸã§ããŸããã2é²æ°ã§è¡šçŸããå Žåã«ã¯åŸªç°å°æ°ã«ãªããŸãããã®ãããæµ®åå°æ°ç¹æ°ã§ã¯0.1ãå®å
šã«è¡šçŸããããšãã§ãããè¿äŒŒå€ã§è¡šçŸããããšã«ãªããŸãããã®ãããªæŒç®èª€å·®ãèæ
®ããªãããããã°ã©ãã³ã°ã§æµ®åå°æ°ç¹æ°ãæ±ãããšãéèŠã§ãã
æµ®åå°æ°ç¹æ°ãç解ããããã«ã¯ã10é²æ°ãš2é²æ°ã®å€æãç解ããããšãå¿
èŠã§ãã以äžã¯ããã®åºæ¬æŠå¿µã«ã€ããŠèª¬æããŸãã
10é²æ°ãšã¯ã0ãã9ãŸã§ã®æ°åã䜿ã£ãŠæ°ãè¡šçŸããæ¹æ³ã§ããäŸãã°ã123ã3.14ã®ãããªæ°ã¯ã10é²æ°ã§è¡šçŸãããŸãã
äžæ¹ã2é²æ°ãšã¯ã0ãš1ã®2ã€ã®æ°åã䜿ã£ãŠæ°ãè¡šçŸããæ¹æ³ã§ããäŸãã°ã10é²æ°ã®5ã¯2é²æ°ã§101ãšè¡šçŸãããŸãã
10é²æ°ãã2é²æ°ãžã®å€ææ¹æ³ã¯ã以äžã®ããã«ãªããŸãã
äžèšã®æé ãåã0ã«ãªããŸã§ç¹°ãè¿ãã
äŸãã°ã10é²æ°ã®5ã2é²æ°ã«å€æãããšã以äžã®ããã«ãªããŸãã
ãã£ãŠã10é²æ°ã®5ã¯2é²æ°ã§101ãšè¡šçŸãããŸãã
2é²æ°ãã10é²æ°ãžã®å€ææ¹æ³ã¯ã以äžã®ããã«ãªããŸãã
äŸãã°ã2é²æ°ã®101ã10é²æ°ã«å€æãããšã以äžã®ããã«ãªããŸãã
ãã£ãŠã2é²æ°ã®101ã¯10é²æ°ã®5ã«çžåœããŸãã
æµ®åå°æ°ç¹æ°ã¯ãèšç®æ©ç§åŠã«ãããæ°å€è¡šçŸã®äžçš®ã§ãããéæŽæ°ã®æ°å€ãè¡šãããã«çšããããŸããæµ®åå°æ°ç¹æ°ã¯ãä»®æ°éšãšææ°éšã«åããããã以äžã®ãããªåœ¢åŒã§è¡šçŸãããŸãã
äŸãã°ã以äžã®ãããªæ°å€ããã£ãå Žåãæµ®åå°æ°ç¹æ°ã®åœ¢åŒã§è¡šçŸããããšãã§ããŸãã
ãã®æ°å€ã2é²æ°ã§è¡šçŸãããšã
ãšãªããŸãããã®æ°å€ãæµ®åå°æ°ç¹æ°ã®åœ¢åŒã§è¡šçŸãããšã
ãšãªããŸãããã®å Žåã笊å·ã0ã§ããããæ£æ°ãè¡šããä»®æ°éšã¯1011010111100000101000111101011100001010010100011111ãææ°éšã¯2ã®-10ä¹ãè¡šããŸãã
IEEE 754èŠæ Œã«åºã¥ãæµ®åå°æ°ç¹æ°ã®è¡šçŸã¯ãæµ®åå°æ°ç¹æ°ãããããã¿ãŒã³ã§è¡šçŸããããã®æšæºçãªæ¹æ³ã§ãããã®èŠæ Œã¯ãã»ãšãã©ã®ã³ã³ãã¥ãŒã¿ãããã°ã©ãã³ã°èšèªã§æ¡çšãããŠãããæµ®åå°æ°ç¹æ°ã®è¡šçŸã«é¢ããäžè²«æ§ãæäŸããŠããŸãã
æµ®åå°æ°ç¹æ°ã¯ã笊å·ããããææ°ããããä»®æ°ãããã§æ§æãããŸãã笊å·ãããã¯ãæ£ã®æ°ã®å Žåã¯0ãè² ã®æ°ã®å Žåã¯1ã«ãªããŸããææ°ãããã¯ãæµ®åå°æ°ç¹æ°ã®ææ°ãè¡šçŸããããã«äœ¿çšãããŸããä»®æ°ãããã¯ãæµ®åå°æ°ç¹æ°ã®ä»®æ°ãè¡šçŸããããã«äœ¿çšãããŸãã
æµ®åå°æ°ç¹æ°ã®è¡šçŸã«ã¯ãæ£èŠåãããè¡šçŸãšéæ£èŠåãããè¡šçŸããããŸããæ£èŠåãããè¡šçŸã¯ãä»®æ°ã®å
é ãããã1ã§ããå Žåã«äœ¿çšãããææ°éšã®æ倧å€ãšæå°å€ãæã€ããšãã§ããŸããéæ£èŠåãããè¡šçŸã¯ãä»®æ°ã®å
é ãããã0ã§ããå Žåã«äœ¿çšãããææ°éšãæå°å€ã®å Žåã«ã®ã¿è¡šçŸã§ããŸãã
ãŸããIEEE 754èŠæ Œã§ã¯ãã±ãè¡šçŸãšåŒã°ããç¹å¥ãªå€ãå®çŸ©ãããŠããŸããããã«ã¯ãæ£ã®ç¡é倧ãè² ã®ç¡é倧ãNaN(éæ°)ãªã©ãå«ãŸããŸããæ£ã®ç¡é倧ã¯ãææ°éšãæ倧å€ã§ãä»®æ°éšããã¹ãŠã®ãããã1ã§ããç¹å¥ãªå€ã§ããè² ã®ç¡é倧ã¯ã笊å·ãããã1ã§ãææ°éšãæ倧å€ã§ãä»®æ°éšããã¹ãŠã®ãããã1ã§ããç¹å¥ãªå€ã§ããNaNã¯ãç¡å¹ãªæŒç®ã®çµæãšããŠçæãããç¹å¥ãªå€ã§ãææ°éšãæ倧å€ã§ãä»®æ°éšã®å
é ãããã1ã§ããå Žåã«å®çŸ©ãããŸãã
æåŸã«ãæµ®åå°æ°ç¹æ°ã®è¡šçŸã«ã¯ãé ãã0ãšããæŠå¿µããããŸããããã¯ãæ£èŠåãããè¡šçŸã®å Žåã«ãä»®æ°éšã®å
é ã«1ãããããšãæå³ããŸããã€ãŸããä»®æ°éšã®å
é ã®1ã¯ãå®éã«ã¯æµ®åå°æ°ç¹æ°ã®è¡šçŸã«å«ãŸããŠããªããããé ãã0ãšåŒã°ããŸãã
æµ®åå°æ°ç¹æ°ã¯ãèšç®æ©ç§åŠã«ãããæ°å€è¡šçŸã®äžçš®ã§ãå®æ°ãè¿äŒŒçã«è¡šçŸããããã«äœ¿çšãããŸããæµ®åå°æ°ç¹æ°ã¯ãæŽæ°éšãšå°æ°éšãæã¡ãåºæ¬çã«ã¯æ¬¡ã®åœ¢åŒã§è¡šãããŸãã
ããã§ãa ã¯ä»®æ°éšãb ã¯åºæ°ãc ã¯ææ°ã§ããããã¯ã10é²æ°ã§è¡šãããæ°å€ã§ããã2é²æ°ã§è¡šçŸãããå ŽåããããŸãã
æµ®åå°æ°ç¹æ°ã®ç²ŸåºŠã«ã€ããŠãæµ®åå°æ°ç¹æ°ã¯æéæ¡æ°ã§è¡šçŸããããããå®æ°ãå®å
šã«è¡šçŸããããšã¯ã§ããŸãããæµ®åå°æ°ç¹æ°ã¯ãæéæ¡æ°ã§è¿äŒŒçã«è¡šçŸããããããæ°å€è¡šçŸã®ç²ŸåºŠãéå®ãããŸããã€ãŸããå°æ°ç¹ä»¥äžã®æ¡æ°ãå€ããªãã»ã©ãæµ®åå°æ°ç¹æ°ã®ç²ŸåºŠã¯äœäžããŸãã
äžžã誀差ãšæ¡èœã¡èª€å·®ã¯ãæµ®åå°æ°ç¹æ°è¡šçŸã®èª€å·®ã®äž»ãªåå ã§ããäžžã誀差ã¯ãæµ®åå°æ°ç¹æ°ã®è¡šçŸã«ãããŠãæéæ¡æ°ã§è¡šçŸããããããæ£ç¢ºãªå€ãšè¿äŒŒå€ãšã®å·®ã«ãã£ãŠçããŸããæ¡èœã¡èª€å·®ã¯ãéåžžã«å€§ããªæ°å€ãšéåžžã«å°ããªæ°å€ãåŒããå Žåã«çããŸãããã®å Žåãå°æ°ç¹ä»¥äžã®æ¡ã倱ããã粟床ãäœäžããŸãã
æµ®åå°æ°ç¹æ°ã®èª€å·®ãæå°åããæ¹æ³ã«ã¯ãããã€ãã®æ¹æ³ããããŸããäŸãã°ãèšç®ãå®è¡ããåã«ãããŒã¿åãšå€æ°ã®éžæã«åå泚æãæããå¿
èŠãªç²ŸåºŠã確ä¿ããããšãéèŠã§ãããŸããäžžã誀差ãæå°éã«æããããã«ã¯ãæ°å€è¡šçŸã®æ¡æ°ãå¢ããããšãã§ããŸããæåŸã«ãæ¡èœã¡èª€å·®ãæå°éã«æããããã«ã¯ã代ããã«å ç®ãè¡ãããšãã§ããŸããå
·äœçã«ã¯ã代æ°çå€åœ¢ã䜿çšããŠãå€ãè¡šçŸããããã«äœ¿çšãããåŒãå€æŽããããšãã§ããŸãã
æµ®åå°æ°ç¹æ°ã¯ãèšç®æ©äžã§æ°å€ãè¡šçŸããããã®æ¹æ³ã®1ã€ã§ãããå®æ°ãè¿äŒŒããŠè¡šçŸããŸããæµ®åå°æ°ç¹æ°ã®ååæŒç®ã«ã¯ã以äžã®åºæ¬ååããããŸãã
以äžããæµ®åå°æ°ç¹æ°ã®ååæŒç®ã®åºæ¬ååã§ããæµ®åå°æ°ç¹æ°ãæ±ãéã«ã¯ããããã®ååã«æ³šæããŠãæ£ç¢ºãªèšç®ãè¡ãããã«ããŸãããã
æµ®åå°æ°ç¹æ°ã®æŒç®çµæã¯ãäžžãã¢ãŒãã«ãã£ãŠç°ãªãå¯èœæ§ããããŸããäžžãã¢ãŒãã«ã¯ã次ã®4ã€ã®ã¢ãŒãããããŸãã
æè¿æ¥äžžãã¯ãæŒç®çµæãæãè¿ãæŽæ°ã«äžžããŸãããã®ã¢ãŒããæãäžè¬çã«äœ¿çšãããŸãããŒãã«åãã£ãŠäžžããå Žåãçµæã¯æŒç®ã«ãã£ãŠåŸãããæ倧ã®æŽæ°ãŸãã¯æå°ã®æŽæ°ã«ãªããŸããæ£ã®ç¡é倧ãŸãã¯è² ã®ç¡é倧ã«åãã£ãŠäžžããå Žåãçµæã¯æ£ã®ç¡é倧ãŸãã¯è² ã®ç¡é倧ã«ãªããŸãã
æµ®åå°æ°ç¹æ°ã®ç¹æ®ãªå€ã«ã¯ä»¥äžã®ãããªãã®ããããŸãã
NaN (Not a Number)ã¯ãæ°å€ãšããŠè§£éã§ããªãå€ãè¡šãããã«äœ¿çšãããŸãã 0/0 ã â/â ãªã©ã®äžå®åœ¢ãæªå®çŸ©ã®æ°å€æŒç®ã®çµæããŸãã¯å®æ°ã§è¡šçŸã§ããªãæ°å€ãäŸãã° â-1 ãªã©ãå«ãŸããŸãã NaN ã¯ãæ°å€ã«å¯ŸããæŒç®ã®çµæãšããŠãåŸãããããšããããŸãã NaN ã¯ãã©ã®ãããªæŒç®ãããŠã NaN ãè¿ããŸãã NaN ã¯ãæµ®åå°æ°ç¹æ°ã®æ¯èŒæŒç®ã«ãããŠã¯åžžã« false ãšããŠæ±ãããŸãã
NaNã«ã¯ã"quiet NaN"ãš "signaling NaN"ã®2çš®é¡ããããŸãã
"quiet NaN"ã¯ãç®è¡æŒç®ã«äœ¿çšããŠã·ã°ãã«ãçºçããªãNaNå€ã§ããéåžžãåæåãããŠããªãå€ãæªå®çŸ©ã®å€ãè¡šãå Žåããäžç¢ºå®ãªèšç®çµæãè¡šãå Žåã«äœ¿çšãããŸãã
äžæ¹ã"signaling NaN" ã¯ãç®è¡æŒç®ã«äœ¿çšããããšãã«ã·ã°ãã«ãçºçããNaNå€ã§ãããã®ã·ã°ãã«ã¯ãäžæ£ãªæŒç®ãå¢çå€ã¡ã¢ãªã¢ã¯ã»ã¹ãªã©ã®åé¡ãããã°ã©ã ã«èŠåããããã«äœ¿çšããããšãã§ããã
äžè¬ã«ã"quiet NaN" 㯠"signaling NaN" ããã䜿çšé »åºŠãé«ããããã°ã©ã ã«ãããŠäºæãã¬åäœãåŒãèµ·ããå¯èœæ§ãäœãããã§ããããããã©ã¡ãã®NaNãæµ®åå°æ°ç¹æŒç®ã®ãšã©ãŒãæ€åºãåŠçããããã«éèŠã§ãã
NaNã®ãã€ããŒããšã¯ãNaNãå«ãããŒã¿ã®è¡šçŸæ¹æ³ã®ããšã§ããIEEE 754èŠæ Œã«åŸã£ãæµ®åå°æ°ç¹æ°ã§ã¯ãNaNãè¡šãããã«ç¹å¥ãªããããã¿ãŒã³ãå®çŸ©ãããŠããŸããããã¯ãææ°éšãå
šãŠ1ã§ãããä»®æ°éšã0ã§ãªãä»»æã®ããããã¿ãŒã³ã§ãããšãããã®ã§ãããã®ããããã¿ãŒã³ã¯ãNaNãè¡šãããã«äœ¿çšãããŸãã
äŸãã°ã64ãããã®æµ®åå°æ°ç¹æ°ã®NaNã®ãã€ããŒãã¯ã次ã®ããã«è¡šãããŸãã
ãã®ããã«ãNaNã¯ç¹æ®ãªå€ã§ããããã®ãã€ããŒããç¹æ®ãªããããã¿ãŒã³ã§è¡šãããŸãã
ããã°ã©ãã³ã°èšèªã¯ãNaNãã©ã®ããã«æ±ããã«ã€ããŠç°ãªãæ¹æ³ãåãããšããããŸãã以äžã¯ãäžéšã®ããã°ã©ãã³ã°èšèªã®NaNã®æ±ãã«é¢ããæŠèŠã§ãã
ãããã®ããã°ã©ãã³ã°èšèªã¯ãNaNãæ±ãããã®é¢æ°ãæŒç®åãæäŸããŠããããšããããŸããäŸãã°ãPythonã§ã¯math.isnan(x)é¢æ°ã䜿çšããŠãxãNaNãã©ããããã§ãã¯ã§ããŸãããŸããC/C++ã§ã¯isnan(x)ãã¯ãã䜿çšããŠãxãNaNãã©ããããã§ãã¯ã§ããŸãã
Inf (Infinity)ã¯ãæ£ã®ç¡é倧ãè¡šãããã«äœ¿çšãããŸããäŸãã°ã1/0 ã®ãããªæŒç®ã®çµæã Inf ã«ãªããŸããInf ã¯ãã©ã®ãããªæ°å€ãšãæ¯èŒæŒç®ãã§ããŸãããInf ãš NaN ãæ¯èŒããããšã¯ã§ããŸããã
-Inf (Negative Infinity)ã¯ãè² ã®ç¡é倧ãè¡šãããã«äœ¿çšãããŸããäŸãã°ã-1/0 ã®ãããªæŒç®ã®çµæã -Inf ã«ãªããŸãã-Inf ã Inf ãšåæ§ã«æ±ãããŸãã
-0 (Negative zero)ã¯ãè² ã®å€ããŒãã«äžžããå Žåã«åŸãããŸãã -0 ã¯ã0 ãšæ¯èŒæŒç®ããããšçãããªããŸãããäžæ¹ã§è² ã®æ°ãšããŠæ±ãããŸãã ããšãã°ã1/-0ã¯-Inf(è² ã®ç¡é倧)ã§ãã
0 (Positive zero)ã¯ãæ£ã®å€ããŒãã«äžžããå Žåã«åŸãããæ£ã®æ°ãšããŠæ±ãããŸãã ããšãã°ã1/0ã¯Inf(æ£ã®ç¡é倧)ã§ãã
ãããã®ç¹æ®ãªå€ã¯ãããã°ã©ã ã®å®è¡äžã«ç¹å¥ãªæå³ãæã¡ãŸããNaN ã¯ãç¹å¥ãªãšã©ãŒç¶æ
ã瀺ãããã«äœ¿çšãããããšããããŸããInf ãš -Inf ã¯ãç¡é倧ãè¡šãããã«äœ¿çšãããèšç®çµæãéããªã倧ãããªã£ãå Žåã«è¿ãããŸãããŸãã0 ãš -0 ã¯ãæ°å€èšç®ã«ãããŠç¹å®ã®æ¡ä»¶åå²ã«äœ¿ãããããšããããŸãã
æµ®åå°æ°ç¹æ°ã¯ãæ§ã
ãªåéã§åºã䜿çšãããŠããŸãã以äžã«ãæµ®åå°æ°ç¹æ°ã䜿çšãããäž»ãªåéãšãã®å¿çšäŸã玹ä»ããŸãã
æµ®åå°æ°ç¹æ°ã¯ãå€ãã®ããã°ã©ãã³ã°èšèªã§ãµããŒããããŠããŸãã
以äžã«ã代衚çãªããã°ã©ãã³ã°èšèªã®æµ®åå°æ°ç¹æ°ã®ãµããŒãç¶æ³ãšãã®ç¹åŸŽã玹ä»ããŸãã
æµ®åå°æ°ç¹æ°ãšæŽæ°ãæ¯èŒããå Žåã«ã¯ãäž¡è
ã®è¡šçŸæ¹æ³ã®éãã«ãããæãã¬çµæã«ãªãããšããããŸããäŸãã°ã次ã®ãããªã³ãŒããèããŠã¿ãŸãããã
ãã®ã³ãŒããå®è¡ãããšãäºæ³éãããa and b are equalããšããçµæã衚瀺ãããã¯ãã§ããããããå®éã«ã¯ã次ã®ããã«ãa and b are not equalããšè¡šç€ºãããããšããããŸãããã®åå ã¯ã0.1ã0.3ãšãã£ãæ°å€ãæµ®åå°æ°ç¹æ°ãšããŠè¡šçŸãããéã«ãå®å
šãªå€ãšããŠè¡šçŸã§ããªããããèšç®çµæã«èª€å·®ãçããããšã«ãããŸãã
ãã®åé¡ãåé¿ããããã«ã¯ãæµ®åå°æ°ç¹æ°ã®æ¯èŒã«ã¯èª€å·®ã蚱容ããæ¹æ³ã䜿ãå¿
èŠããããŸããããšãã°ã次ã®ããã«æžãæããããšãã§ããŸãã
math.isclose()é¢æ°ã䜿ãããšã§ã2ã€ã®æ°ã粟床ã®ç¯å²ã§äžèŽæ§ã確èªã§ããŸãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "ããã°ã©ãã³ã°ã«ãããŠãæ°å€ãæ±ãããšã¯éåžžã«éèŠã§ããããããæ°å€ã®è¡šçŸã«ã¯ããã€ãã®çš®é¡ããããããããã«ç¹åŸŽããããŸããæ¬ç« ã§ã¯ããã®äžã§ãç¹ã«éèŠãªæµ®åå°æ°ç¹æ°ã«ã€ããŠè§£èª¬ããŸãã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "æµ®åå°æ°ç¹æ°ãšã¯ãå°æ°ç¹ä»¥äžã®æ°å€ããåºå®ãããæ¡æ°ã§è¡šçŸãããã®ã§ã¯ãªããææ°éšãšä»®æ°éšã®åœ¢åŒã§è¡šçŸãããæ°å€ã®ããšãæããŸãã ãã®ãããªè¡šçŸæ¹æ³ã«ãããéåžžã«åºãç¯å²ã®æ°å€ãè¡šçŸããããšãã§ããŸãã",
"title": "å°å
¥"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "æµ®åå°æ°ç¹æ°ã䜿çšããçç±ã«ã¯ãããã€ãã®å©ç¹ããããŸãã",
"title": "å°å
¥"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "ãŸããæµ®åå°æ°ç¹æ°ã¯å€æ§ãªå€ãè¡šçŸã§ãããããæŽæ°ã ãã§ãªãå°æ°ãéåžžã«å€§ããªå€ãå°ããªå€ãªã©ãæ§ã
ãªå€ãæ£ç¢ºã«è¡šçŸããããšãã§ããŸãããã®ãããçŸå®äžçã®å€ãã®åé¡ã«å¯ŸããŠããæ£ç¢ºãªæ°å€èšç®ãè¡ãããšãã§ããŸãã",
"title": "å°å
¥"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "ãŸããæµ®åå°æ°ç¹æ°ã䜿çšãããšæ°å€èšç®ãå¹ççã«å®è¡ããããšãã§ããŸããããã¯ãå€ãã®å Žåãã³ã³ãã¥ãŒã¿ãŒã®ããŒããŠã§ã¢ãæµ®åå°æ°ç¹æ°ã®èšç®ãæé©åããããã«èšèšãããŠããããã§ãã",
"title": "å°å
¥"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "ããã«ãæµ®åå°æ°ç¹æ°ã¯ãšã©ãŒãæžå°ãããããšãã§ããŸããããšãã°ãæ°å€ãéåžžã«å€§ããªå€ã«ãªããšæŽæ°ã§ã¯ãªãŒããŒãããŒããå¯èœæ§ããããŸãããæµ®åå°æ°ç¹æ°ã§ã¯æ£ç¢ºã«è¡šçŸããããšãã§ããŸãã",
"title": "å°å
¥"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "æµ®åå°æ°ç¹æ°ã¯IEEE 754èŠæ Œã«åºã¥ããŠæšæºåãããŠãããããŸããŸãªããã°ã©ã ãã·ã¹ãã ã§åãæ¹æ³ã§æ°å€èšç®ãå®è¡ããããšãã§ããŸãã",
"title": "å°å
¥"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "以äžã®ããã«ãæµ®åå°æ°ç¹æ°ã¯æ£ç¢ºãªæ°å€èšç®ãå¹ççãªæ°å€èšç®ããšã©ãŒã®æžå°ãæšæºåãããæ°å€è¡šçŸãªã©ãå€ãã®å©ç¹ãæã£ãŠããŸãããããã®çç±ãããããã°ã©ãã³ã°ã«ãããŠæµ®åå°æ°ç¹æ°ã䜿çšããããšãäžè¬çã«ãªã£ãŠããŸãã",
"title": "å°å
¥"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "æµ®åå°æ°ç¹æ°ã«ã¯ãIEEE 754èŠæ Œã«ããè¡šçŸæ¹æ³ãäžè¬çã§ãããã®èŠæ Œã§ã¯ãæµ®åå°æ°ç¹æ°ã32ããããŸãã¯64ãããã®äºé²æ°ã§è¡šçŸããããšãã§ããŸãã IEEE 754èŠæ Œã§ã¯ãæµ®åå°æ°ç¹æ°ãè¡šçŸããããã«ã笊å·ããããææ°éšãä»®æ°éšã®3ã€ã®èŠçŽ ã䜿çšãããŸãã笊å·ãããã¯ãæµ®åå°æ°ç¹æ°ãæ£ãŸãã¯è² ã§ãããã瀺ãããã«äœ¿çšãããŸããææ°éšã¯ãæµ®åå°æ°ç¹æ°ã®äœçœ®ã決å®ããããã«äœ¿çšãããä»®æ°éšã¯ãå®éã®æ°å€ãè¡šçŸããããã«äœ¿çšãããŸãã",
"title": "å°å
¥"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "æµ®åå°æ°ç¹æ°ã®è¡šçŸæ¹æ³ã«ã¯ããã€ãã®çš®é¡ãããã代衚çãªãã®ã«ã¯ä»¥äžã®ãã®ããããŸãã",
"title": "å°å
¥"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "IEEE 754èŠæ Œã§ã¯ãæµ®åå°æ°ç¹æ°ã®æ£ç¢ºæ§ãå¶éããããšããããŸããããšãã°ã32ãããã®æµ®åå°æ°ç¹æ°ã§ã¯ãæå¹æ¡æ°ã¯çŽ7æ¡ãã9æ¡ã§ããã64ãããã®æµ®åå°æ°ç¹æ°ã§ã¯ãæå¹æ¡æ°ã¯çŽ15æ¡ãã17æ¡ã§ãããã®å¶éã¯ãæµ®åå°æ°ç¹æ°ãéåžžã«å€§ããªå€ãŸãã¯éåžžã«å°ããªå€ãè¡šãå Žåã«ç¹ã«åé¡ããããŸãã",
"title": "å°å
¥"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "ãããã£ãŠãããã°ã©ãã¯ãæµ®åå°æ°ç¹æ°ã䜿çšããåã«ããã®å¶éãç解ããæµ®åå°æ°ç¹æ°ã®è¡šçŸæ¹æ³ãæ£ç¢ºã«ã©ã®ããã«æ©èœããããç解ããå¿
èŠããããŸãããŸããèšç®ã®çµæãæµ®åå°æ°ç¹æ°ãšããŠè¡šçŸãããå Žåããã®å¶éãèæ
®ããŠãæ£ç¢ºãªçµæãåŸãããã«é©åãªåŠçãè¡ãå¿
èŠããããŸãã",
"title": "å°å
¥"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "æµ®åå°æ°ç¹æ°ã¯ãã³ã³ãã¥ãŒã¿ã«ãããŠå®æ°ãæ±ãããã®æ¹åŒã®äžã€ã§ããå®æ°ã¯æéæ¡ã®æ°å€ãããã¯æçæ°ã§è¡šçŸãããŸãããæéã®æ¡æ°ã§ã¯æ£ç¢ºã«è¡šçŸã§ããªãæ°ããããŸãããã®ãããæµ®åå°æ°ç¹æ°ã§ã¯æå¹æ¡æ°ãéå®ããè¿äŒŒçã«å®æ°ãè¡šçŸããŸãã",
"title": "åºæ¬æŠå¿µ"
},
{
"paragraph_id": 13,
"tag": "p",
"text": "æµ®åå°æ°ç¹æ°ã¯ã笊å·ãä»®æ°ãææ°ã®3ã€ã®èŠçŽ ããæ§æãããŸãã笊å·ã¯æ£ãŸãã¯è² ãè¡šããä»®æ°ã¯å°æ°éšåããææ°ã¯10ã®ã¹ãä¹ãè¡šããŸãããããã®èŠçŽ ãçµã¿åãããŠãå®æ°ãè¡šçŸããŸãã",
"title": "åºæ¬æŠå¿µ"
},
{
"paragraph_id": 14,
"tag": "p",
"text": "æµ®åå°æ°ç¹æ°ã¯ãIEEE 754èŠæ Œã«åºã¥ããŠæšæºåãããŠããŸãããã®èŠæ Œã§ã¯ã32ããããŸãã¯64ãããã®ãããåã䜿ã£ãŠæµ®åå°æ°ç¹æ°ãè¡šçŸããŸãã32ãããã®å Žåã笊å·ã¯1ããããææ°ã¯8ããããä»®æ°ã¯23ãããã§è¡šçŸãããŸãã64ãããã®å Žåã¯ã笊å·ã¯1ããããææ°ã¯11ããããä»®æ°ã¯52ãããã§è¡šçŸãããŸãã",
"title": "åºæ¬æŠå¿µ"
},
{
"paragraph_id": 15,
"tag": "p",
"text": "æµ®åå°æ°ç¹æ°ã¯ãå®æ°ãè¿äŒŒçã«è¡šçŸãããããæŒç®èª€å·®ãçããå¯èœæ§ããããŸããäŸãã°ã0.1ãšããæ°å€ã¯10é²æ°ã§æ£ç¢ºã«è¡šçŸã§ããŸããã2é²æ°ã§è¡šçŸããå Žåã«ã¯åŸªç°å°æ°ã«ãªããŸãããã®ãããæµ®åå°æ°ç¹æ°ã§ã¯0.1ãå®å
šã«è¡šçŸããããšãã§ãããè¿äŒŒå€ã§è¡šçŸããããšã«ãªããŸãããã®ãããªæŒç®èª€å·®ãèæ
®ããªãããããã°ã©ãã³ã°ã§æµ®åå°æ°ç¹æ°ãæ±ãããšãéèŠã§ãã",
"title": "åºæ¬æŠå¿µ"
},
{
"paragraph_id": 16,
"tag": "p",
"text": "æµ®åå°æ°ç¹æ°ãç解ããããã«ã¯ã10é²æ°ãš2é²æ°ã®å€æãç解ããããšãå¿
èŠã§ãã以äžã¯ããã®åºæ¬æŠå¿µã«ã€ããŠèª¬æããŸãã",
"title": "åºæ¬æŠå¿µ"
},
{
"paragraph_id": 17,
"tag": "p",
"text": "10é²æ°ãšã¯ã0ãã9ãŸã§ã®æ°åã䜿ã£ãŠæ°ãè¡šçŸããæ¹æ³ã§ããäŸãã°ã123ã3.14ã®ãããªæ°ã¯ã10é²æ°ã§è¡šçŸãããŸãã",
"title": "åºæ¬æŠå¿µ"
},
{
"paragraph_id": 18,
"tag": "p",
"text": "äžæ¹ã2é²æ°ãšã¯ã0ãš1ã®2ã€ã®æ°åã䜿ã£ãŠæ°ãè¡šçŸããæ¹æ³ã§ããäŸãã°ã10é²æ°ã®5ã¯2é²æ°ã§101ãšè¡šçŸãããŸãã",
"title": "åºæ¬æŠå¿µ"
},
{
"paragraph_id": 19,
"tag": "p",
"text": "10é²æ°ãã2é²æ°ãžã®å€ææ¹æ³ã¯ã以äžã®ããã«ãªããŸãã",
"title": "åºæ¬æŠå¿µ"
},
{
"paragraph_id": 20,
"tag": "p",
"text": "äžèšã®æé ãåã0ã«ãªããŸã§ç¹°ãè¿ãã",
"title": "åºæ¬æŠå¿µ"
},
{
"paragraph_id": 21,
"tag": "p",
"text": "äŸãã°ã10é²æ°ã®5ã2é²æ°ã«å€æãããšã以äžã®ããã«ãªããŸãã",
"title": "åºæ¬æŠå¿µ"
},
{
"paragraph_id": 22,
"tag": "p",
"text": "ãã£ãŠã10é²æ°ã®5ã¯2é²æ°ã§101ãšè¡šçŸãããŸãã",
"title": "åºæ¬æŠå¿µ"
},
{
"paragraph_id": 23,
"tag": "p",
"text": "2é²æ°ãã10é²æ°ãžã®å€ææ¹æ³ã¯ã以äžã®ããã«ãªããŸãã",
"title": "åºæ¬æŠå¿µ"
},
{
"paragraph_id": 24,
"tag": "p",
"text": "äŸãã°ã2é²æ°ã®101ã10é²æ°ã«å€æãããšã以äžã®ããã«ãªããŸãã",
"title": "åºæ¬æŠå¿µ"
},
{
"paragraph_id": 25,
"tag": "p",
"text": "ãã£ãŠã2é²æ°ã®101ã¯10é²æ°ã®5ã«çžåœããŸãã",
"title": "åºæ¬æŠå¿µ"
},
{
"paragraph_id": 26,
"tag": "p",
"text": "æµ®åå°æ°ç¹æ°ã¯ãèšç®æ©ç§åŠã«ãããæ°å€è¡šçŸã®äžçš®ã§ãããéæŽæ°ã®æ°å€ãè¡šãããã«çšããããŸããæµ®åå°æ°ç¹æ°ã¯ãä»®æ°éšãšææ°éšã«åããããã以äžã®ãããªåœ¢åŒã§è¡šçŸãããŸãã",
"title": "åºæ¬æŠå¿µ"
},
{
"paragraph_id": 27,
"tag": "p",
"text": "äŸãã°ã以äžã®ãããªæ°å€ããã£ãå Žåãæµ®åå°æ°ç¹æ°ã®åœ¢åŒã§è¡šçŸããããšãã§ããŸãã",
"title": "åºæ¬æŠå¿µ"
},
{
"paragraph_id": 28,
"tag": "p",
"text": "ãã®æ°å€ã2é²æ°ã§è¡šçŸãããšã",
"title": "åºæ¬æŠå¿µ"
},
{
"paragraph_id": 29,
"tag": "p",
"text": "ãšãªããŸãããã®æ°å€ãæµ®åå°æ°ç¹æ°ã®åœ¢åŒã§è¡šçŸãããšã",
"title": "åºæ¬æŠå¿µ"
},
{
"paragraph_id": 30,
"tag": "p",
"text": "ãšãªããŸãããã®å Žåã笊å·ã0ã§ããããæ£æ°ãè¡šããä»®æ°éšã¯1011010111100000101000111101011100001010010100011111ãææ°éšã¯2ã®-10ä¹ãè¡šããŸãã",
"title": "åºæ¬æŠå¿µ"
},
{
"paragraph_id": 31,
"tag": "p",
"text": "IEEE 754èŠæ Œã«åºã¥ãæµ®åå°æ°ç¹æ°ã®è¡šçŸã¯ãæµ®åå°æ°ç¹æ°ãããããã¿ãŒã³ã§è¡šçŸããããã®æšæºçãªæ¹æ³ã§ãããã®èŠæ Œã¯ãã»ãšãã©ã®ã³ã³ãã¥ãŒã¿ãããã°ã©ãã³ã°èšèªã§æ¡çšãããŠãããæµ®åå°æ°ç¹æ°ã®è¡šçŸã«é¢ããäžè²«æ§ãæäŸããŠããŸãã",
"title": "åºæ¬æŠå¿µ"
},
{
"paragraph_id": 32,
"tag": "p",
"text": "æµ®åå°æ°ç¹æ°ã¯ã笊å·ããããææ°ããããä»®æ°ãããã§æ§æãããŸãã笊å·ãããã¯ãæ£ã®æ°ã®å Žåã¯0ãè² ã®æ°ã®å Žåã¯1ã«ãªããŸããææ°ãããã¯ãæµ®åå°æ°ç¹æ°ã®ææ°ãè¡šçŸããããã«äœ¿çšãããŸããä»®æ°ãããã¯ãæµ®åå°æ°ç¹æ°ã®ä»®æ°ãè¡šçŸããããã«äœ¿çšãããŸãã",
"title": "åºæ¬æŠå¿µ"
},
{
"paragraph_id": 33,
"tag": "p",
"text": "æµ®åå°æ°ç¹æ°ã®è¡šçŸã«ã¯ãæ£èŠåãããè¡šçŸãšéæ£èŠåãããè¡šçŸããããŸããæ£èŠåãããè¡šçŸã¯ãä»®æ°ã®å
é ãããã1ã§ããå Žåã«äœ¿çšãããææ°éšã®æ倧å€ãšæå°å€ãæã€ããšãã§ããŸããéæ£èŠåãããè¡šçŸã¯ãä»®æ°ã®å
é ãããã0ã§ããå Žåã«äœ¿çšãããææ°éšãæå°å€ã®å Žåã«ã®ã¿è¡šçŸã§ããŸãã",
"title": "åºæ¬æŠå¿µ"
},
{
"paragraph_id": 34,
"tag": "p",
"text": "ãŸããIEEE 754èŠæ Œã§ã¯ãã±ãè¡šçŸãšåŒã°ããç¹å¥ãªå€ãå®çŸ©ãããŠããŸããããã«ã¯ãæ£ã®ç¡é倧ãè² ã®ç¡é倧ãNaN(éæ°)ãªã©ãå«ãŸããŸããæ£ã®ç¡é倧ã¯ãææ°éšãæ倧å€ã§ãä»®æ°éšããã¹ãŠã®ãããã1ã§ããç¹å¥ãªå€ã§ããè² ã®ç¡é倧ã¯ã笊å·ãããã1ã§ãææ°éšãæ倧å€ã§ãä»®æ°éšããã¹ãŠã®ãããã1ã§ããç¹å¥ãªå€ã§ããNaNã¯ãç¡å¹ãªæŒç®ã®çµæãšããŠçæãããç¹å¥ãªå€ã§ãææ°éšãæ倧å€ã§ãä»®æ°éšã®å
é ãããã1ã§ããå Žåã«å®çŸ©ãããŸãã",
"title": "åºæ¬æŠå¿µ"
},
{
"paragraph_id": 35,
"tag": "p",
"text": "æåŸã«ãæµ®åå°æ°ç¹æ°ã®è¡šçŸã«ã¯ãé ãã0ãšããæŠå¿µããããŸããããã¯ãæ£èŠåãããè¡šçŸã®å Žåã«ãä»®æ°éšã®å
é ã«1ãããããšãæå³ããŸããã€ãŸããä»®æ°éšã®å
é ã®1ã¯ãå®éã«ã¯æµ®åå°æ°ç¹æ°ã®è¡šçŸã«å«ãŸããŠããªããããé ãã0ãšåŒã°ããŸãã",
"title": "åºæ¬æŠå¿µ"
},
{
"paragraph_id": 36,
"tag": "p",
"text": "æµ®åå°æ°ç¹æ°ã¯ãèšç®æ©ç§åŠã«ãããæ°å€è¡šçŸã®äžçš®ã§ãå®æ°ãè¿äŒŒçã«è¡šçŸããããã«äœ¿çšãããŸããæµ®åå°æ°ç¹æ°ã¯ãæŽæ°éšãšå°æ°éšãæã¡ãåºæ¬çã«ã¯æ¬¡ã®åœ¢åŒã§è¡šãããŸãã",
"title": "粟床ãšèª€å·®"
},
{
"paragraph_id": 37,
"tag": "p",
"text": "ããã§ãa ã¯ä»®æ°éšãb ã¯åºæ°ãc ã¯ææ°ã§ããããã¯ã10é²æ°ã§è¡šãããæ°å€ã§ããã2é²æ°ã§è¡šçŸãããå ŽåããããŸãã",
"title": "粟床ãšèª€å·®"
},
{
"paragraph_id": 38,
"tag": "p",
"text": "æµ®åå°æ°ç¹æ°ã®ç²ŸåºŠã«ã€ããŠãæµ®åå°æ°ç¹æ°ã¯æéæ¡æ°ã§è¡šçŸããããããå®æ°ãå®å
šã«è¡šçŸããããšã¯ã§ããŸãããæµ®åå°æ°ç¹æ°ã¯ãæéæ¡æ°ã§è¿äŒŒçã«è¡šçŸããããããæ°å€è¡šçŸã®ç²ŸåºŠãéå®ãããŸããã€ãŸããå°æ°ç¹ä»¥äžã®æ¡æ°ãå€ããªãã»ã©ãæµ®åå°æ°ç¹æ°ã®ç²ŸåºŠã¯äœäžããŸãã",
"title": "粟床ãšèª€å·®"
},
{
"paragraph_id": 39,
"tag": "p",
"text": "äžžã誀差ãšæ¡èœã¡èª€å·®ã¯ãæµ®åå°æ°ç¹æ°è¡šçŸã®èª€å·®ã®äž»ãªåå ã§ããäžžã誀差ã¯ãæµ®åå°æ°ç¹æ°ã®è¡šçŸã«ãããŠãæéæ¡æ°ã§è¡šçŸããããããæ£ç¢ºãªå€ãšè¿äŒŒå€ãšã®å·®ã«ãã£ãŠçããŸããæ¡èœã¡èª€å·®ã¯ãéåžžã«å€§ããªæ°å€ãšéåžžã«å°ããªæ°å€ãåŒããå Žåã«çããŸãããã®å Žåãå°æ°ç¹ä»¥äžã®æ¡ã倱ããã粟床ãäœäžããŸãã",
"title": "粟床ãšèª€å·®"
},
{
"paragraph_id": 40,
"tag": "p",
"text": "æµ®åå°æ°ç¹æ°ã®èª€å·®ãæå°åããæ¹æ³ã«ã¯ãããã€ãã®æ¹æ³ããããŸããäŸãã°ãèšç®ãå®è¡ããåã«ãããŒã¿åãšå€æ°ã®éžæã«åå泚æãæããå¿
èŠãªç²ŸåºŠã確ä¿ããããšãéèŠã§ãããŸããäžžã誀差ãæå°éã«æããããã«ã¯ãæ°å€è¡šçŸã®æ¡æ°ãå¢ããããšãã§ããŸããæåŸã«ãæ¡èœã¡èª€å·®ãæå°éã«æããããã«ã¯ã代ããã«å ç®ãè¡ãããšãã§ããŸããå
·äœçã«ã¯ã代æ°çå€åœ¢ã䜿çšããŠãå€ãè¡šçŸããããã«äœ¿çšãããåŒãå€æŽããããšãã§ããŸãã",
"title": "粟床ãšèª€å·®"
},
{
"paragraph_id": 41,
"tag": "p",
"text": "æµ®åå°æ°ç¹æ°ã¯ãèšç®æ©äžã§æ°å€ãè¡šçŸããããã®æ¹æ³ã®1ã€ã§ãããå®æ°ãè¿äŒŒããŠè¡šçŸããŸããæµ®åå°æ°ç¹æ°ã®ååæŒç®ã«ã¯ã以äžã®åºæ¬ååããããŸãã",
"title": "æŒç®"
},
{
"paragraph_id": 42,
"tag": "p",
"text": "以äžããæµ®åå°æ°ç¹æ°ã®ååæŒç®ã®åºæ¬ååã§ããæµ®åå°æ°ç¹æ°ãæ±ãéã«ã¯ããããã®ååã«æ³šæããŠãæ£ç¢ºãªèšç®ãè¡ãããã«ããŸãããã",
"title": "æŒç®"
},
{
"paragraph_id": 43,
"tag": "p",
"text": "æµ®åå°æ°ç¹æ°ã®æŒç®çµæã¯ãäžžãã¢ãŒãã«ãã£ãŠç°ãªãå¯èœæ§ããããŸããäžžãã¢ãŒãã«ã¯ã次ã®4ã€ã®ã¢ãŒãããããŸãã",
"title": "æŒç®"
},
{
"paragraph_id": 44,
"tag": "p",
"text": "æè¿æ¥äžžãã¯ãæŒç®çµæãæãè¿ãæŽæ°ã«äžžããŸãããã®ã¢ãŒããæãäžè¬çã«äœ¿çšãããŸãããŒãã«åãã£ãŠäžžããå Žåãçµæã¯æŒç®ã«ãã£ãŠåŸãããæ倧ã®æŽæ°ãŸãã¯æå°ã®æŽæ°ã«ãªããŸããæ£ã®ç¡é倧ãŸãã¯è² ã®ç¡é倧ã«åãã£ãŠäžžããå Žåãçµæã¯æ£ã®ç¡é倧ãŸãã¯è² ã®ç¡é倧ã«ãªããŸãã",
"title": "æŒç®"
},
{
"paragraph_id": 45,
"tag": "p",
"text": "æµ®åå°æ°ç¹æ°ã®ç¹æ®ãªå€ã«ã¯ä»¥äžã®ãããªãã®ããããŸãã",
"title": "æŒç®"
},
{
"paragraph_id": 46,
"tag": "p",
"text": "NaN (Not a Number)ã¯ãæ°å€ãšããŠè§£éã§ããªãå€ãè¡šãããã«äœ¿çšãããŸãã 0/0 ã â/â ãªã©ã®äžå®åœ¢ãæªå®çŸ©ã®æ°å€æŒç®ã®çµæããŸãã¯å®æ°ã§è¡šçŸã§ããªãæ°å€ãäŸãã° â-1 ãªã©ãå«ãŸããŸãã NaN ã¯ãæ°å€ã«å¯ŸããæŒç®ã®çµæãšããŠãåŸãããããšããããŸãã NaN ã¯ãã©ã®ãããªæŒç®ãããŠã NaN ãè¿ããŸãã NaN ã¯ãæµ®åå°æ°ç¹æ°ã®æ¯èŒæŒç®ã«ãããŠã¯åžžã« false ãšããŠæ±ãããŸãã",
"title": "æŒç®"
},
{
"paragraph_id": 47,
"tag": "p",
"text": "NaNã«ã¯ã\"quiet NaN\"ãš \"signaling NaN\"ã®2çš®é¡ããããŸãã",
"title": "æŒç®"
},
{
"paragraph_id": 48,
"tag": "p",
"text": "\"quiet NaN\"ã¯ãç®è¡æŒç®ã«äœ¿çšããŠã·ã°ãã«ãçºçããªãNaNå€ã§ããéåžžãåæåãããŠããªãå€ãæªå®çŸ©ã®å€ãè¡šãå Žåããäžç¢ºå®ãªèšç®çµæãè¡šãå Žåã«äœ¿çšãããŸãã",
"title": "æŒç®"
},
{
"paragraph_id": 49,
"tag": "p",
"text": "äžæ¹ã\"signaling NaN\" ã¯ãç®è¡æŒç®ã«äœ¿çšããããšãã«ã·ã°ãã«ãçºçããNaNå€ã§ãããã®ã·ã°ãã«ã¯ãäžæ£ãªæŒç®ãå¢çå€ã¡ã¢ãªã¢ã¯ã»ã¹ãªã©ã®åé¡ãããã°ã©ã ã«èŠåããããã«äœ¿çšããããšãã§ããã",
"title": "æŒç®"
},
{
"paragraph_id": 50,
"tag": "p",
"text": "äžè¬ã«ã\"quiet NaN\" 㯠\"signaling NaN\" ããã䜿çšé »åºŠãé«ããããã°ã©ã ã«ãããŠäºæãã¬åäœãåŒãèµ·ããå¯èœæ§ãäœãããã§ããããããã©ã¡ãã®NaNãæµ®åå°æ°ç¹æŒç®ã®ãšã©ãŒãæ€åºãåŠçããããã«éèŠã§ãã",
"title": "æŒç®"
},
{
"paragraph_id": 51,
"tag": "p",
"text": "NaNã®ãã€ããŒããšã¯ãNaNãå«ãããŒã¿ã®è¡šçŸæ¹æ³ã®ããšã§ããIEEE 754èŠæ Œã«åŸã£ãæµ®åå°æ°ç¹æ°ã§ã¯ãNaNãè¡šãããã«ç¹å¥ãªããããã¿ãŒã³ãå®çŸ©ãããŠããŸããããã¯ãææ°éšãå
šãŠ1ã§ãããä»®æ°éšã0ã§ãªãä»»æã®ããããã¿ãŒã³ã§ãããšãããã®ã§ãããã®ããããã¿ãŒã³ã¯ãNaNãè¡šãããã«äœ¿çšãããŸãã",
"title": "æŒç®"
},
{
"paragraph_id": 52,
"tag": "p",
"text": "äŸãã°ã64ãããã®æµ®åå°æ°ç¹æ°ã®NaNã®ãã€ããŒãã¯ã次ã®ããã«è¡šãããŸãã",
"title": "æŒç®"
},
{
"paragraph_id": 53,
"tag": "p",
"text": "ãã®ããã«ãNaNã¯ç¹æ®ãªå€ã§ããããã®ãã€ããŒããç¹æ®ãªããããã¿ãŒã³ã§è¡šãããŸãã",
"title": "æŒç®"
},
{
"paragraph_id": 54,
"tag": "p",
"text": "",
"title": "æŒç®"
},
{
"paragraph_id": 55,
"tag": "p",
"text": "ããã°ã©ãã³ã°èšèªã¯ãNaNãã©ã®ããã«æ±ããã«ã€ããŠç°ãªãæ¹æ³ãåãããšããããŸãã以äžã¯ãäžéšã®ããã°ã©ãã³ã°èšèªã®NaNã®æ±ãã«é¢ããæŠèŠã§ãã",
"title": "æŒç®"
},
{
"paragraph_id": 56,
"tag": "p",
"text": "ãããã®ããã°ã©ãã³ã°èšèªã¯ãNaNãæ±ãããã®é¢æ°ãæŒç®åãæäŸããŠããããšããããŸããäŸãã°ãPythonã§ã¯math.isnan(x)é¢æ°ã䜿çšããŠãxãNaNãã©ããããã§ãã¯ã§ããŸãããŸããC/C++ã§ã¯isnan(x)ãã¯ãã䜿çšããŠãxãNaNãã©ããããã§ãã¯ã§ããŸãã",
"title": "æŒç®"
},
{
"paragraph_id": 57,
"tag": "p",
"text": "Inf (Infinity)ã¯ãæ£ã®ç¡é倧ãè¡šãããã«äœ¿çšãããŸããäŸãã°ã1/0 ã®ãããªæŒç®ã®çµæã Inf ã«ãªããŸããInf ã¯ãã©ã®ãããªæ°å€ãšãæ¯èŒæŒç®ãã§ããŸãããInf ãš NaN ãæ¯èŒããããšã¯ã§ããŸããã",
"title": "æŒç®"
},
{
"paragraph_id": 58,
"tag": "p",
"text": "-Inf (Negative Infinity)ã¯ãè² ã®ç¡é倧ãè¡šãããã«äœ¿çšãããŸããäŸãã°ã-1/0 ã®ãããªæŒç®ã®çµæã -Inf ã«ãªããŸãã-Inf ã Inf ãšåæ§ã«æ±ãããŸãã",
"title": "æŒç®"
},
{
"paragraph_id": 59,
"tag": "p",
"text": "-0 (Negative zero)ã¯ãè² ã®å€ããŒãã«äžžããå Žåã«åŸãããŸãã -0 ã¯ã0 ãšæ¯èŒæŒç®ããããšçãããªããŸãããäžæ¹ã§è² ã®æ°ãšããŠæ±ãããŸãã ããšãã°ã1/-0ã¯-Inf(è² ã®ç¡é倧)ã§ãã",
"title": "æŒç®"
},
{
"paragraph_id": 60,
"tag": "p",
"text": "0 (Positive zero)ã¯ãæ£ã®å€ããŒãã«äžžããå Žåã«åŸãããæ£ã®æ°ãšããŠæ±ãããŸãã ããšãã°ã1/0ã¯Inf(æ£ã®ç¡é倧)ã§ãã",
"title": "æŒç®"
},
{
"paragraph_id": 61,
"tag": "p",
"text": "ãããã®ç¹æ®ãªå€ã¯ãããã°ã©ã ã®å®è¡äžã«ç¹å¥ãªæå³ãæã¡ãŸããNaN ã¯ãç¹å¥ãªãšã©ãŒç¶æ
ã瀺ãããã«äœ¿çšãããããšããããŸããInf ãš -Inf ã¯ãç¡é倧ãè¡šãããã«äœ¿çšãããèšç®çµæãéããªã倧ãããªã£ãå Žåã«è¿ãããŸãããŸãã0 ãš -0 ã¯ãæ°å€èšç®ã«ãããŠç¹å®ã®æ¡ä»¶åå²ã«äœ¿ãããããšããããŸãã",
"title": "æŒç®"
},
{
"paragraph_id": 62,
"tag": "p",
"text": "æµ®åå°æ°ç¹æ°ã¯ãæ§ã
ãªåéã§åºã䜿çšãããŠããŸãã以äžã«ãæµ®åå°æ°ç¹æ°ã䜿çšãããäž»ãªåéãšãã®å¿çšäŸã玹ä»ããŸãã",
"title": "å®è·µçãªäœ¿çšäŸ"
},
{
"paragraph_id": 63,
"tag": "p",
"text": "æµ®åå°æ°ç¹æ°ã¯ãå€ãã®ããã°ã©ãã³ã°èšèªã§ãµããŒããããŠããŸãã",
"title": "代衚çãªããã°ã©ãã³ã°èšèªã®æµ®åå°æ°ç¹æ°ã®ãµããŒãç¶æ³ãšãã®ç¹åŸŽ"
},
{
"paragraph_id": 64,
"tag": "p",
"text": "以äžã«ã代衚çãªããã°ã©ãã³ã°èšèªã®æµ®åå°æ°ç¹æ°ã®ãµããŒãç¶æ³ãšãã®ç¹åŸŽã玹ä»ããŸãã",
"title": "代衚çãªããã°ã©ãã³ã°èšèªã®æµ®åå°æ°ç¹æ°ã®ãµããŒãç¶æ³ãšãã®ç¹åŸŽ"
},
{
"paragraph_id": 65,
"tag": "p",
"text": "æµ®åå°æ°ç¹æ°ãšæŽæ°ãæ¯èŒããå Žåã«ã¯ãäž¡è
ã®è¡šçŸæ¹æ³ã®éãã«ãããæãã¬çµæã«ãªãããšããããŸããäŸãã°ã次ã®ãããªã³ãŒããèããŠã¿ãŸãããã",
"title": "æµ®åå°æ°ç¹æ°ã®æ³šæç¹"
},
{
"paragraph_id": 66,
"tag": "p",
"text": "ãã®ã³ãŒããå®è¡ãããšãäºæ³éãããa and b are equalããšããçµæã衚瀺ãããã¯ãã§ããããããå®éã«ã¯ã次ã®ããã«ãa and b are not equalããšè¡šç€ºãããããšããããŸãããã®åå ã¯ã0.1ã0.3ãšãã£ãæ°å€ãæµ®åå°æ°ç¹æ°ãšããŠè¡šçŸãããéã«ãå®å
šãªå€ãšããŠè¡šçŸã§ããªããããèšç®çµæã«èª€å·®ãçããããšã«ãããŸãã",
"title": "æµ®åå°æ°ç¹æ°ã®æ³šæç¹"
},
{
"paragraph_id": 67,
"tag": "p",
"text": "ãã®åé¡ãåé¿ããããã«ã¯ãæµ®åå°æ°ç¹æ°ã®æ¯èŒã«ã¯èª€å·®ã蚱容ããæ¹æ³ã䜿ãå¿
èŠããããŸããããšãã°ã次ã®ããã«æžãæããããšãã§ããŸãã",
"title": "æµ®åå°æ°ç¹æ°ã®æ³šæç¹"
},
{
"paragraph_id": 68,
"tag": "p",
"text": "math.isclose()é¢æ°ã䜿ãããšã§ã2ã€ã®æ°ã粟床ã®ç¯å²ã§äžèŽæ§ã確èªã§ããŸãã",
"title": "æµ®åå°æ°ç¹æ°ã®æ³šæç¹"
}
] | ããã°ã©ãã³ã°ã«ãããŠãæ°å€ãæ±ãããšã¯éåžžã«éèŠã§ããããããæ°å€ã®è¡šçŸã«ã¯ããã€ãã®çš®é¡ããããããããã«ç¹åŸŽããããŸããæ¬ç« ã§ã¯ããã®äžã§ãç¹ã«éèŠãªæµ®åå°æ°ç¹æ°ã«ã€ããŠè§£èª¬ããŸãã | ããã°ã©ãã³ã°ã«ãããŠãæ°å€ãæ±ãããšã¯éåžžã«éèŠã§ããããããæ°å€ã®è¡šçŸã«ã¯ããã€ãã®çš®é¡ããããããããã«ç¹åŸŽããããŸããæ¬ç« ã§ã¯ããã®äžã§ãç¹ã«éèŠãªæµ®åå°æ°ç¹æ°ã«ã€ããŠè§£èª¬ããŸãã
== å°å
¥ ==
=== æµ®åå°æ°ç¹æ°ãšã¯ ===
æµ®åå°æ°ç¹æ°ã¯ãã³ã³ãã¥ãŒã¿ãŒã§å®æ°ãè¡šçŸããããã®æ¹æ³ã®äžã€ã§ãã
ãã®è¡šçŸæ¹æ³ã§ã¯ãæ°å€ãã笊å·ããä»®æ°ããšãææ°ãã®äžã€ã®éšåã«åãããããããåºå®ã®ãããæ°ã§è¡šãããŸãã
æµ®åå°æ°ç¹æ°ã¯ãéæŽæ°ã®æ°å€ãéåžžã«å€§ããªæ°å€ãå°ããªæ°å€ãå¹ççã«è¡šçŸããããšãã§ããç§åŠæè¡èšç®ãã°ã©ãã£ãã¯ã¹ãéèãªã©å¹
åºãåéã§å©çšãããŠããŸãã
=== æµ®åå°æ°ç¹æ°ã䜿ãçç± ===
æµ®åå°æ°ç¹æ°ã䜿çšããçç±ã«ã¯ãããã€ãã®å©ç¹ããããŸãã
ãŸããæµ®åå°æ°ç¹æ°ã¯å€æ§ãªå€ãè¡šçŸã§ãããããæŽæ°ã ãã§ãªãå°æ°ãéåžžã«å€§ããªå€ãå°ããªå€ãªã©ãæ§ã
ãªå€ãæ£ç¢ºã«è¡šçŸããããšãã§ããŸãããã®ãããçŸå®äžçã®å€ãã®åé¡ã«å¯ŸããŠããæ£ç¢ºãªæ°å€èšç®ãè¡ãããšãã§ããŸãã
ãŸããæµ®åå°æ°ç¹æ°ã䜿çšãããšæ°å€èšç®ãå¹ççã«å®è¡ããããšãã§ããŸããããã¯ãå€ãã®å Žåãã³ã³ãã¥ãŒã¿ãŒã®ããŒããŠã§ã¢ãæµ®åå°æ°ç¹æ°ã®èšç®ãæé©åããããã«èšèšãããŠããããã§ãã
ããã«ãæµ®åå°æ°ç¹æ°ã¯ãšã©ãŒãæžå°ãããããšãã§ããŸããããšãã°ãæ°å€ãéåžžã«å€§ããªå€ã«ãªããšæŽæ°ã§ã¯ãªãŒããŒãããŒããå¯èœæ§ããããŸãããæµ®åå°æ°ç¹æ°ã§ã¯æ£ç¢ºã«è¡šçŸããããšãã§ããŸãã
æµ®åå°æ°ç¹æ°ã¯IEEE 754èŠæ Œã«åºã¥ããŠæšæºåãããŠãããããŸããŸãªããã°ã©ã ãã·ã¹ãã ã§åãæ¹æ³ã§æ°å€èšç®ãå®è¡ããããšãã§ããŸãã
以äžã®ããã«ãæµ®åå°æ°ç¹æ°ã¯æ£ç¢ºãªæ°å€èšç®ãå¹ççãªæ°å€èšç®ããšã©ãŒã®æžå°ãæšæºåãããæ°å€è¡šçŸãªã©ãå€ãã®å©ç¹ãæã£ãŠããŸãããããã®çç±ãããããã°ã©ãã³ã°ã«ãããŠæµ®åå°æ°ç¹æ°ã䜿çšããããšãäžè¬çã«ãªã£ãŠããŸãã
{{ã³ã©ã |IEEE 754|2=ããã°ã©ãã³ã°ã«ãããŠãæµ®åå°æ°ç¹æŒç®ã¯éåžžã«éèŠãªæ©èœã§ããããããæ§ã
ãªæµ®åå°æ°ç¹å®è£
ã«ã¯ä¿¡é Œæ§ãšç§»æ€æ§ã«æ¬ ããåé¡ããããŸãããããã§1985幎ã«é»æ°é»ååŠäŒïŒIEEEïŒã«ãã£ãŠçå®ãããæè¡çæšæºãIEEE 754ããç»å ŽããŸããããã®æšæºã¯ãæéæ°ãç¡é倧ãããã³ç¹å¥ãªéæ°ïŒNaNïŒã®å€ã§æ§æãããäºé²æ°ããã³10é²æ°ã®æµ®åå°æ°ç¹ããŒã¿ã®ç®è¡ãã©ãŒããããå®çŸ©ããæµ®åå°æ°ç¹ããŒã¿ã亀æããããã®å¹ççã§ã³ã³ãã¯ããªãšã³ã³ãŒãã£ã³ã°ãæäŸããŠããŸãããŸããç®è¡ãã©ãŒãããäžã§ã®ç®è¡æŒç®ãå€æäžã«æ°å€ãåæšäºå
¥ããéã«æºããã¹ãããããã£ã§ããäžžãã«ãŒã«ãªã©ãå®çŸ©ãããŠããŸãã
çŸåšãå€ãã®ããŒããŠã§ã¢æµ®åå°æ°ç¹ãŠããããIEEE 754æšæºãæ¡çšããŠããŸãã2008幎ã«çºè¡šãããIEEE 754-2008ã«ã¯ãåºæ°ã«äŸåããªãæµ®åå°æ°ç¹æŒç®ã®IEEE 854-1987èŠæ Œãè¿œå ãããæµ®åå°æ°ç¹æŒç®ã«é¢ããæšæºãäžå±€å
å®ããŸããããããŠã2019幎7æã«çºè¡šãããIEEE 754-2019ã¯ãåã®ããŒãžã§ã³ã®å°èŠæš¡ãªæ¹èšçã§ãæ確åãæ¬ é¥ä¿®æ£ãããã³æ°ããæšå¥šæäœãå«ãŸããŠããŸããIEEE 754æšæºã¯ãæµ®åå°æ°ç¹æŒç®ã®ä¿¡é Œæ§ãšç§»æ€æ§ãåäžãããããã°ã©ãã«ãšã£ãŠéåžžã«åœ¹ç«ã€èŠæ Œãšãªã£ãŠããŸãã}}
=== æµ®åå°æ°ç¹æ°ã®çš®é¡ ===
æµ®åå°æ°ç¹æ°ã«ã¯ãIEEE 754èŠæ Œã«ããè¡šçŸæ¹æ³ãäžè¬çã§ãã
IEEE 754èŠæ Œã§ã¯ãæµ®åå°æ°ç¹æ°ãè¡šçŸããããã«ã笊å·ããããææ°éšãä»®æ°éšã®3ã€ã®èŠçŽ ã䜿çšãããŸãã笊å·ãããã¯ãæµ®åå°æ°ç¹æ°ãæ£ãŸãã¯è² ã§ãããã瀺ãããã«äœ¿çšãããŸããææ°éšã¯ãæµ®åå°æ°ç¹æ°ã®äœçœ®ã決å®ããããã«äœ¿çšãããä»®æ°éšã¯ãå®éã®æ°å€ãè¡šçŸããããã«äœ¿çšãããŸãã
æµ®åå°æ°ç¹æ°ã®è¡šçŸæ¹æ³ã«ã¯ããã€ãã®çš®é¡ãããã代衚çãªãã®ã«ã¯ä»¥äžã®ãã®ããããŸãã
* binary16ïŒå粟床浮åå°æ°ç¹æ°ïŒïŒ16ãããã§è¡šçŸããã笊å·1ããããææ°éš5ããããä»®æ°éš10ãããã§æ§æãããŸãã
* '''binary32'''ïŒ'''å粟床浮åå°æ°ç¹æ°'''ïŒïŒ32ãããã§è¡šçŸããã笊å·1ããããææ°éš8ããããä»®æ°éš23ãããã§æ§æãããŸãã
* '''binary64'''ïŒ'''å粟床浮åå°æ°ç¹æ°'''ïŒïŒ64ãããã§è¡šçŸããã笊å·1ããããææ°éš11ããããä»®æ°éš52ãããã§æ§æãããŸãã
* binary128ïŒåå粟床浮åå°æ°ç¹æ°ïŒïŒ128ãããã§è¡šçŸããã笊å·1ããããææ°éš15ããããä»®æ°éš112ãããã§æ§æãããŸãã
* decimal32ïŒ32ãããã§è¡šçŸããã笊å·1ããããä»®æ°éš7æ¡ãææ°éš5ãããã§æ§æãããŸãã10é²æ°ã®æµ®åå°æ°ç¹æ°ãè¡šçŸããããã®åœ¢åŒã§ãã
* decimal64ïŒ64ãããã§è¡šçŸããã笊å·1ããããä»®æ°éš16æ¡ãææ°éš7ãããã§æ§æãããŸãã10é²æ°ã®æµ®åå°æ°ç¹æ°ãè¡šçŸããããã®åœ¢åŒã§ãã
* decimal128ïŒ128ãããã§è¡šçŸããã笊å·1ããããä»®æ°éš34æ¡ãææ°éš10ãããã§æ§æãããŸãã10é²æ°ã®æµ®åå°æ°ç¹æ°ãè¡šçŸããããã®åœ¢åŒã§ãã
: 2024幎3ææç¹ã§ã¯ãbinary128ããã³binary64ãäžè¬çã§ã10é²æ°ã®æµ®åå°æ°ç¹æ°ããµããŒãããŠããèšèªåŠçç³»ãšããŒããŠã§ã¢ã¯æ®åéäžã«ãããŸãã
IEEE 754èŠæ Œã§ã¯ãæµ®åå°æ°ç¹æ°ã®æ£ç¢ºæ§ãå¶éããããšããããŸããããšãã°ã32ãããã®æµ®åå°æ°ç¹æ°ã§ã¯ãæå¹æ¡æ°ã¯çŽ7æ¡ãã9æ¡ã§ããã64ãããã®æµ®åå°æ°ç¹æ°ã§ã¯ãæå¹æ¡æ°ã¯çŽ15æ¡ãã17æ¡ã§ãããã®å¶éã¯ãæµ®åå°æ°ç¹æ°ãéåžžã«å€§ããªå€ãŸãã¯éåžžã«å°ããªå€ãè¡šãå Žåã«ç¹ã«åé¡ããããŸãã
ãããã£ãŠãããã°ã©ãã¯ãæµ®åå°æ°ç¹æ°ã䜿çšããåã«ããã®å¶éãç解ããæµ®åå°æ°ç¹æ°ã®è¡šçŸæ¹æ³ãæ£ç¢ºã«ã©ã®ããã«æ©èœããããç解ããå¿
èŠããããŸãããŸããèšç®ã®çµæãæµ®åå°æ°ç¹æ°ãšããŠè¡šçŸãããå Žåããã®å¶éãèæ
®ããŠãæ£ç¢ºãªçµæãåŸãããã«é©åãªåŠçãè¡ãå¿
èŠããããŸãã
{{ã³ã©ã |bfloat16ã«ã€ããŠ|2=bfloat16ã¯ã16ãããã®æµ®åå°æ°ç¹æ°åœ¢åŒã§ã深局åŠç¿ã人工ç¥èœåéã«ãããŠãç¹ã«Googleã®Tensor Processing UnitïŒTPUïŒã§äœ¿çšãããŠããŸããbfloat16ã¯ãå粟床浮åå°æ°ç¹æ°ã§ããbinary16ãšåæ§ã«ãã¡ã¢ãªäœ¿çšéãåæžããé«éæŒç®ãå¯èœã«ããŸãããbinary16ãšæ¯ã¹ãŠè¡šçŸå¯èœãªå€ã®ç¯å²ãåºãããŸãã
以äžã«bfloat16ã®ããããã£ãŒã«ãã®äœ¿ãæ¹ã説æããŸãã
(S) (Exponent) (Mantissa)
*S: 笊å·ãããã0ã¯æ£ã®æ°ã1ã¯è² ã®æ°ãè¡šããŸãã
*Exponent: 8ãããã®ææ°éšããã€ã¢ã¹ã127ãšããŠè¡šçŸããã-126ãã127ãŸã§ã®ç¯å²ã®ææ°ãè¡šããŸããææ°éšã¯ãä»®æ°éšã®å€ã2ã®äœä¹åãããã瀺ããŸãã
*Mantissa: ä»®æ°éšã7ãããã®æå¹æ¡æ°ãæã¡ãå°æ°ç¹ä»¥äžã®å€ãè¡šããŸããæäžäœãããã¯æé»çã«1ãšãªã£ãŠããŸãã
bfloat16ã¯ãäž»ã«æ·±å±€åŠç¿ã¢ã«ãŽãªãºã ã®æŒç®ã§äœ¿çšãããŠãããè¡šçŸå¯èœãªå€ã®ç¯å²ãbinary16ãããåºããããããæ£ç¢ºãªã¢ãã«ã®åŠç¿ãå¯èœã§ãã
ãŸããTPUãªã©ã®ç¹å®ã®ããŒããŠã§ã¢ã¢ãŒããã¯ãã£ã§ã¯ãbfloat16ãæé©ãªæŒç®åœ¢åŒã§ãããããé«éãªæŒç®ãå¯èœã«ããããšãã§ããŸãã
}}
== åºæ¬æŠå¿µ ==
æµ®åå°æ°ç¹æ°ã¯ãã³ã³ãã¥ãŒã¿ã«ãããŠå®æ°ãæ±ãããã®æ¹åŒã®äžã€ã§ããå®æ°ã¯æéæ¡ã®æ°å€ãããã¯æçæ°ã§è¡šçŸãããŸãããæéã®æ¡æ°ã§ã¯æ£ç¢ºã«è¡šçŸã§ããªãæ°ããããŸãããã®ãããæµ®åå°æ°ç¹æ°ã§ã¯æå¹æ¡æ°ãéå®ããè¿äŒŒçã«å®æ°ãè¡šçŸããŸãã
æµ®åå°æ°ç¹æ°ã¯ã笊å·ãä»®æ°ãææ°ã®3ã€ã®èŠçŽ ããæ§æãããŸãã笊å·ã¯æ£ãŸãã¯è² ãè¡šããä»®æ°ã¯å°æ°éšåããææ°ã¯10ã®ã¹ãä¹ãè¡šããŸãããããã®èŠçŽ ãçµã¿åãããŠãå®æ°ãè¡šçŸããŸãã
æµ®åå°æ°ç¹æ°ã¯ãIEEE 754èŠæ Œã«åºã¥ããŠæšæºåãããŠããŸãããã®èŠæ Œã§ã¯ã32ããããŸãã¯64ãããã®ãããåã䜿ã£ãŠæµ®åå°æ°ç¹æ°ãè¡šçŸããŸãã32ãããã®å Žåã笊å·ã¯1ããããææ°ã¯8ããããä»®æ°ã¯23ãããã§è¡šçŸãããŸãã64ãããã®å Žåã¯ã笊å·ã¯1ããããææ°ã¯11ããããä»®æ°ã¯52ãããã§è¡šçŸãããŸãã
æµ®åå°æ°ç¹æ°ã¯ãå®æ°ãè¿äŒŒçã«è¡šçŸãããããæŒç®èª€å·®ãçããå¯èœæ§ããããŸããäŸãã°ã0.1ãšããæ°å€ã¯10é²æ°ã§æ£ç¢ºã«è¡šçŸã§ããŸããã2é²æ°ã§è¡šçŸããå Žåã«ã¯åŸªç°å°æ°ã«ãªããŸãããã®ãããæµ®åå°æ°ç¹æ°ã§ã¯0.1ãå®å
šã«è¡šçŸããããšãã§ãããè¿äŒŒå€ã§è¡šçŸããããšã«ãªããŸãããã®ãããªæŒç®èª€å·®ãèæ
®ããªãããããã°ã©ãã³ã°ã§æµ®åå°æ°ç¹æ°ãæ±ãããšãéèŠã§ãã
=== 10é²æ°ãš2é²æ°ã®å€æ ===
<!--ããã°ã©ãã³ã°ã®æç§æžã®ãæµ®åå°æ°ç¹æ°ãã®ç« ã®ãåºæ¬æŠå¿µãã®ç¯ã®ã10é²æ°ãš2é²æ°ã®å€æ ãã®é
ç®-->
æµ®åå°æ°ç¹æ°ãç解ããããã«ã¯ã10é²æ°ãš2é²æ°ã®å€æãç解ããããšãå¿
èŠã§ãã以äžã¯ããã®åºæ¬æŠå¿µã«ã€ããŠèª¬æããŸãã
10é²æ°ãšã¯ã0ãã9ãŸã§ã®æ°åã䜿ã£ãŠæ°ãè¡šçŸããæ¹æ³ã§ããäŸãã°ã123ã3.14ã®ãããªæ°ã¯ã10é²æ°ã§è¡šçŸãããŸãã
äžæ¹ã2é²æ°ãšã¯ã0ãš1ã®2ã€ã®æ°åã䜿ã£ãŠæ°ãè¡šçŸããæ¹æ³ã§ããäŸãã°ã10é²æ°ã®5ã¯2é²æ°ã§101ãšè¡šçŸãããŸãã
10é²æ°ãã2é²æ°ãžã®å€ææ¹æ³ã¯ã以äžã®ããã«ãªããŸãã
#å€æããã10é²æ°ã2ã§å²ããåãšäœããæ±ããã
#æ±ããäœããäžçªå³ã®æ¡ã«æžãã
#åã2ã§å²ããåãšäœããæ±ããã
#æ±ããäœãã次ã®æ¡ã«æžãã
äžèšã®æé ãåã0ã«ãªããŸã§ç¹°ãè¿ãã
äŸãã°ã10é²æ°ã®5ã2é²æ°ã«å€æãããšã以äžã®ããã«ãªããŸãã
:5 ÷ 2 = 2 äœã 1 2 ÷ 2 = 1 äœã 0 1 ÷ 2 = 0 äœã 1
ãã£ãŠã10é²æ°ã®5ã¯2é²æ°ã§101ãšè¡šçŸãããŸãã
2é²æ°ãã10é²æ°ãžã®å€ææ¹æ³ã¯ã以äžã®ããã«ãªããŸãã
#2é²æ°ã®äžçªå·Šã®æ¡ããå§ããŠãå³ã«åãã£ãŠæ¡ãèŠãŠããã
#åæ¡ã«ã€ããŠããã®æ¡ã®æ°å€ã«2ã®ã¹ãä¹ããããå€ãèšç®ãããäžçªå·Šã®æ¡ã¯2^0ã次ã®æ¡ã¯2^1ããã®æ¬¡ã®æ¡ã¯2^2ããšããããã«ãå³ã«åãã£ãŠ2ã®ã¹ãä¹ã®ææ°ã1ãã€å¢ãããŠããã
#åæ¡ã§èšç®ããå€ã足ãåãããã
äŸãã°ã2é²æ°ã®101ã10é²æ°ã«å€æãããšã以äžã®ããã«ãªããŸãã
:1 Ã 2^2 + 0 Ã 2^1 + 1 Ã 2^0 = 4 + 0 + 1 = 5
ãã£ãŠã2é²æ°ã®101ã¯10é²æ°ã®5ã«çžåœããŸãã
=== æµ®åå°æ°ç¹æ°ã®è¡šçŸæ¹æ³ ===
æµ®åå°æ°ç¹æ°ã¯ãèšç®æ©ç§åŠã«ãããæ°å€è¡šçŸã®äžçš®ã§ãããéæŽæ°ã®æ°å€ãè¡šãããã«çšããããŸããæµ®åå°æ°ç¹æ°ã¯ãä»®æ°éšãšææ°éšã«åããããã以äžã®ãããªåœ¢åŒã§è¡šçŸãããŸãã
(sign) (mantissa) x (base)^exponent
* <code>(sign)</code> : 笊å·ãè¡šããŸãã0ãŸãã¯1ã§ã0ã¯æ£æ°ã1ã¯è² æ°ãè¡šããŸãã
* <code>(mantissa)</code> : ä»®æ°éšãè¡šããŸããå°æ°ç¹ä»¥äžã®æ°å€ãè¡šãããã«äœ¿ãããäžå®ã®æ¡æ°ã§è¡šçŸãããŸãã
* <code>(base)</code> : åºæ°ãè¡šããŸããéåžžã2ãŸãã¯10ã䜿ãããŸãã
* <code>(exponent)</code> : ææ°éšãè¡šããŸããæµ®åå°æ°ç¹æ°ã®å€ãè¡šãããã«å¿
èŠãªæ¡æ°ãè¡šçŸããŸãã
äŸãã°ã以äžã®ãããªæ°å€ããã£ãå Žåãæµ®åå°æ°ç¹æ°ã®åœ¢åŒã§è¡šçŸããããšãã§ããŸãã
0.00123
ãã®æ°å€ã2é²æ°ã§è¡šçŸãããšã
0.00000000000101101011110000010100011110101110000101001...
ãšãªããŸãããã®æ°å€ãæµ®åå°æ°ç¹æ°ã®åœ¢åŒã§è¡šçŸãããšã
0 1011010111100000101000111101011100001010010100011111 2^-10
ãšãªããŸãããã®å Žåã笊å·ã0ã§ããããæ£æ°ãè¡šããä»®æ°éšã¯1011010111100000101000111101011100001010010100011111ãææ°éšã¯2ã®-10ä¹ãè¡šããŸãã
=== IEEE 754èŠæ Œã«åºã¥ãæµ®åå°æ°ç¹æ°ã®è¡šçŸ ===
IEEE 754èŠæ Œã«åºã¥ãæµ®åå°æ°ç¹æ°ã®è¡šçŸã¯ãæµ®åå°æ°ç¹æ°ãããããã¿ãŒã³ã§è¡šçŸããããã®æšæºçãªæ¹æ³ã§ãããã®èŠæ Œã¯ãã»ãšãã©ã®ã³ã³ãã¥ãŒã¿ãããã°ã©ãã³ã°èšèªã§æ¡çšãããŠãããæµ®åå°æ°ç¹æ°ã®è¡šçŸã«é¢ããäžè²«æ§ãæäŸããŠããŸãã
æµ®åå°æ°ç¹æ°ã¯ã笊å·ããããææ°éšãä»®æ°éšã§æ§æãããŸãã笊å·ãããã¯ãæ£ã®æ°ã®å Žåã¯0ãè² ã®æ°ã®å Žåã¯1ã«ãªããŸããææ°éšã¯ãæµ®åå°æ°ç¹æ°ã®ææ°ãè¡šçŸããããã«äœ¿çšãããŸããä»®æ°éšã¯ãæµ®åå°æ°ç¹æ°ã®ä»®æ°ãè¡šçŸããããã«äœ¿çšãããŸãã
æµ®åå°æ°ç¹æ°ã®è¡šçŸã«ã¯ãæ£èŠåãããè¡šçŸãšéæ£èŠåãããè¡šçŸããããŸããæ£èŠåãããè¡šçŸã¯ãä»®æ°ã®å
é ãããã1ã§ããå Žåã«äœ¿çšãããææ°éšã®æ倧å€ãšæå°å€ãæã€ããšãã§ããŸããéæ£èŠåãããè¡šçŸã¯ãä»®æ°ã®å
é ãããã0ã§ããå Žåã«äœ¿çšãããææ°éšãæå°å€ã®å Žåã«ã®ã¿è¡šçŸã§ããŸãã
; ä»®æ°éšã®é ãããã
æ£èŠåãããæ°ã«ãããŠãæãéèŠãªæ¡ã¯åžžã«éãŒãã§ããäºé²æ°ã§äœæ¥ããéããã®å¶çŽã«ãã£ãŠãã®æ¡ã¯åžžã«1ã«ãªããŸãããããã£ãŠãããã¯æ瀺çã«æ ŒçŽãããã'''é ãããã'''ãšåŒã°ããŸãã
æå¹æ°åã¯ãïŒäºé²æ°ã®ïŒæ¡æ°ã§ç¹åŸŽä»ããããæèã«ãã£ãŠã¯ãé ãããããå¹
ã«å«ãŸããå Žåãšå«ãŸããªãå ŽåããããŸããããšãã°ãåãIEEE 754å粟床圢åŒã¯ãé ãããããå«ã53ãããã®æå¹æ°åãŸãã¯é ãããããé€ãã52ãããã®æå¹æ°åãšããŠäžè¬çã«èª¬æãããŸããIEEE 754ã§ã¯ã粟床pãæå¹æ°åå
ã®æ¡æ°ãšå®çŸ©ããæé»ã®å
é ããããå«ãæå¹æ°åã®æ°ïŒããšãã°ãå粟床圢åŒã®å Žåã¯p = 53ïŒã瀺ãããã®çšèªãå®çŸ©ããŠããŸãããããã£ãŠã笊å·åæ¹æ³ããç¬ç«ããŠããã笊å·åããããã®ãè¡šçŸããçšèªïŒã€ãŸããå
é ããããå«ãŸãªãæå¹æ°åïŒã¯åŸç¶ã®æå¹æ°åãã£ãŒã«ããšåŒã°ããŸãã
; ææ°éšã®äžé§å±¥ã
IEEE 754ã«ãããææ°éšã®ãäžé§å±¥ã (biasing)ããšã¯ãææ°éšã®å€ã調æŽããããã®ææ³ã§ããIEEE 754ã§ã¯ãæµ®åå°æ°ç¹æ°ã®ææ°éšãè² ã®å€ãæ±ããããã«ãææ°éšã«åºå®ã®ãªãã»ããïŒãã€ã¢ã¹ïŒãå ããŠè¡šçŸããŸããããã«ãããææ°éšãè² ã®å€ã§ãæ£ã®å€ãšåæ§ã®è¡šçŸãå¯èœã«ãªããŸãã
å
·äœçã«ã¯ãææ°éšã«ãã€ã¢ã¹ãå ããããšã§ãææ°éšã®å®éã®å€ãšå
éšè¡šçŸã®å€ãšã®éã«ãªãã»ãããçããŸãããã®ãã€ã¢ã¹ã®å€ã¯ãææ°éšã®ãããæ°ã«ãã£ãŠç°ãªããŸããäŸãã°ãå粟床浮åå°æ°ç¹æ°ã§ã¯8ãããã®ææ°éšãæã¡ãææ°éšã®ç¯å²ã-127ãã+128ãŸã§ãªã®ã§ããã€ã¢ã¹ã¯127ãšãªããŸããææ°éšã0ã®ãšãã«ã¯ãã€ã¢ã¹ãåŒãããšã§ææ°ã-127ã«ãªããæå°ã®ææ°ãè¡šçŸã§ããŸãã
ãã®ãã€ã¢ã¹ãå©çšããããšã§ãææ°éšã®ç¬Šå·ãæã€éšåããªããããææ°éšã®å€§å°æ¯èŒãåçŽåãããæµ®åå°æ°ç¹æ°ã®æŒç®ãããå¹ççã«è¡ããããã«ãªããæ£èŠåãããè¡šçŸã§ããã°æŽæ°ãšããŠæ¯èŒããŠãæ£ããçµæãåŸãããŸãã
{{ã³ã©ã |IEEE 754以å€ã®æµ®åå°æ°ç¹æ°è¡šçŸ|2=IEEE 754ã¯ãæµ®åå°æ°ç¹æ°ã®æšæºçãªè¡šçŸåœ¢åŒãšããŠåºã䜿çšãããŠããŸãããIEEE 754以å€ã®æµ®åå°æ°ç¹æ°è¡šçŸãååšããŸããããã§ã¯ãIBMãDECã®äŸã玹ä»ããŸãã
IBMã®æµ®åå°æ°ç¹æ°è¡šçŸã¯ãIBM System/360ããã®åŸç¶ã®ã¡ã€ã³ãã¬ãŒã ã³ã³ãã¥ãŒã¿ã§äœ¿çšãããŠããŸããIBMã®æµ®åå°æ°ç¹æ°è¡šçŸã¯ã3ã€ã®éšåã§æ§æãããŠããŸããæåã®éšåã¯ç¬Šå·ãããã§ããã1ãããã§è¡šãããŸãã次ã®éšåã¯ææ°ãã£ãŒã«ãã§ããã8ããããŸãã¯11ãããã§è¡šãããŸããæåŸã®éšåã¯ä»®æ°ãã£ãŒã«ãã§ããã23ããããŸãã¯52ãããã§è¡šãããŸããIBMã®æµ®åå°æ°ç¹æ°è¡šçŸã¯ãIEEE 754ãšã¯ç°ãªããææ°ãã£ãŒã«ãã«ãã€ã¢ã¹ãå ããã®ã§ã¯ãªããçã®ææ°ãè¡šããŸãã
DECã®æµ®åå°æ°ç¹æ°è¡šçŸã¯ãDEC PDP-11ãVAXã³ã³ãã¥ãŒã¿ã§äœ¿çšãããŠããŸããDECã®æµ®åå°æ°ç¹æ°è¡šçŸã¯ã3ã€ã®éšåã§æ§æãããŠããŸããæåã®éšåã¯ç¬Šå·ãããã§ããã1ãããã§è¡šãããŸãã次ã®éšåã¯ææ°ãã£ãŒã«ãã§ããã8ããããŸãã¯11ãããã§è¡šãããŸããæåŸã®éšåã¯ä»®æ°ãã£ãŒã«ãã§ããã23ããããŸãã¯52ãããã§è¡šãããŸããDECã®æµ®åå°æ°ç¹æ°è¡šçŸã¯ãIBMãšåæ§ã«ãçã®ææ°ãè¡šããŸãã
ä»ã«ããæµ®åå°æ°ç¹æ°è¡šçŸãšããŠã¯ãBfloat16ãPositãFixed-pointãªã©ããããŸããBfloat16ã¯ãGoogleãéçºããæµ®åå°æ°ç¹æ°è¡šçŸã§ããã16ãããã®ä»®æ°ãã£ãŒã«ããæã¡ãŸããPositã¯ãJohn Gustafsonãæå±ããæµ®åå°æ°ç¹æ°è¡šçŸã§ãããé«ã粟床ãæã€ããšãã§ããŸããFixed-pointã¯ãæŽæ°åã®è¡šçŸåœ¢åŒãæ¡åŒµããŠãå°æ°ç¹ä»¥äžã®æ°å€ãè¡šçŸããæ¹æ³ã§ãã
ãããã®æµ®åå°æ°ç¹æ°è¡šçŸã¯ãããããã®ç¹æ§ãæã¡ãç¹å®ã®çšéã«é©ããè¡šçŸåœ¢åŒãéžæããããšãéèŠã§ãã}}
== 粟床ãšèª€å·® ==
æµ®åå°æ°ç¹æ°ã¯ãèšç®æ©ç§åŠã«ãããæ°å€è¡šçŸã®äžçš®ã§ãå®æ°ãè¿äŒŒçã«è¡šçŸããããã«äœ¿çšãããŸãã
æµ®åå°æ°ç¹æ°ã¯ãæŽæ°éšãšå°æ°éšãæã¡ãåºæ¬çã«ã¯æ¬¡ã®åœ¢åŒã§è¡šãããŸãã
:<math>\pm a \cdot b^c</math>
ããã§ã<math>a</math> ã¯ä»®æ°éšã<math>b</math> ã¯åºæ°ã<math>c</math> ã¯ææ°ã§ãã
æµ®åå°æ°ç¹æ°ã®ç²ŸåºŠã«ã€ããŠãæµ®åå°æ°ç¹æ°ã¯æéæ¡æ°ã§è¡šçŸããããããå®æ°ãå®å
šã«è¡šçŸããããšã¯ã§ããŸãããæµ®åå°æ°ç¹æ°ã¯ãæéæ¡æ°ã§è¿äŒŒçã«è¡šçŸããããããæ°å€è¡šçŸã®ç²ŸåºŠãéå®ãããŸããã€ãŸããå°æ°ç¹ä»¥äžã®æ¡æ°ãå€ããªãã»ã©ãæµ®åå°æ°ç¹æ°ã®ç²ŸåºŠã¯äœäžããŸãã
äžžã誀差ãšæ¡èœã¡èª€å·®ã¯ãæµ®åå°æ°ç¹æ°è¡šçŸã®èª€å·®ã®äž»ãªåå ã§ããäžžã誀差ã¯ãæµ®åå°æ°ç¹æ°ã®è¡šçŸã«ãããŠãæéæ¡æ°ã§è¡šçŸããããããæ£ç¢ºãªå€ãšè¿äŒŒå€ãšã®å·®ã«ãã£ãŠçããŸããæ¡èœã¡èª€å·®ã¯ãè¿ãæ°å€å士ã®åŒãç®ã§çããŸãããã®å Žåãä»®æ°éšã®äžäœã®å€ãã0ãšãªããæ£èŠåããããšåçã«ç²ŸåºŠãäœäžããŸãã
æµ®åå°æ°ç¹æ°ã®èª€å·®ãæå°åããæ¹æ³ã«ã¯ãããã€ãã®æ¹æ³ããããŸããäŸãã°ãèšç®ãå®è¡ããåã«ãããŒã¿åãšå€æ°ã®éžæã«åå泚æãæããå¿
èŠãªç²ŸåºŠã確ä¿ããããšãéèŠã§ãããŸããäžžã誀差ãæå°éã«æããããã«ã¯ãæ°å€è¡šçŸã®æ¡æ°ãå¢ããããšãã§ããŸããæåŸã«ãæ¡èœã¡èª€å·®ãæå°éã«æããããã«ã¯ã代ããã«å ç®ãè¡ãããšãã§ããŸããå
·äœçã«ã¯ã代æ°çå€åœ¢ã䜿çšããŠãå€ãè¡šçŸããããã«äœ¿çšãããåŒãå€æŽããããšãã§ããŸãã
== æŒç® ==
=== æµ®åå°æ°ç¹æŒç®ã®åºæ¬æŠå¿µ ===
æµ®åå°æ°ç¹æ°ã¯ãèšç®æ©äžã§æ°å€ãè¡šçŸããããã®æ¹æ³ã®1ã€ã§ãããå®æ°ãè¿äŒŒããŠè¡šçŸããŸãã
æµ®åå°æ°ç¹æŒç®ã«ã¯ã以äžã®åºæ¬æŠå¿µããããŸãã
==== å ç® ====
æµ®åå°æ°ç¹æ°ã®å ç®ã¯ã以äžã®æé ã«ãªããŸãã
# ææ°éšã®æã
#: å ç®ãã2ã€ã®æµ®åå°æ°ç¹æ°ã®ææ°éšãåãããå¿
èŠããããŸããããã¯ãåãäœã®æ¡å士ãå ç®ã§ããããã«ããããã§ãã
#: ææ°éšã®å°ããæ¹ã®æ°ãä»®æ°éšããããã·ããããŠèª¿æŽããŸãã
# ä»®æ°éšã®å ç®
#: ææ°éšãæããåŸãä»®æ°éšã®å ç®ãè¡ããŸãã
#: ä»®æ°éšã¯ãããåãªã®ã§ããããåäœã§ã®å ç®ãšãªããŸãã
# çµæã®æ£èŠå
#: å ç®çµæãæ£èŠåããŸããã€ãŸããä»®æ°éšã®äžäœãããã1ã«ãªããããããã·ããããææ°éšã調æŽããŸãã
#: ãã®æãååŠçã§ã®ææ°éšã®èª¿æŽãšçžæ®ºãããŸãã
# äŸå€åŠç
#: å ç®çµæãææ°éšãä»®æ°éšã®ç¯å²ãè¶
ããå Žåã¯ããªãŒããŒãããŒãã¢ã³ããŒãããŒãªã©ã®äŸå€åŠçãè¡ãããŸãã
# äžžãåŠç
#: æ£èŠååŸã®ä»®æ°éšãæå¹æ¡æ°ãè¶
ããŠããå Žåã¯ãäžžãåŠçãè¡ãããŸããããã«ã¯è€æ°ã®äžžãæ¹åŒããããŸãã
å ç®ã¯ãææ°éšã®æããä»®æ°éšã®å ç®ãæ£èŠåãäŸå€åŠçãäžžãã®äžé£ã®åŠçãå¿
èŠã«ãªããããä»ã®æŒç®ããè€éã«ãªããŸãã
ãŸãããã£ãªãŒã®çºçãæ¡èœã¡ãªã©ã®åœ±é¿ã§ã誀差ãçãããããªããŸãã
==== æžç® ====
æµ®åå°æ°ç¹æ°ã®æžç®ãåºæ¬çã«ã¯å ç®ãšåãæµãã«ãªããŸãã
æžç®ã®æé ã¯ä»¥äžã®éãã§ãã
# ææ°éšã®æã
#: å ç®ãšåæ§ã«ã2ã€ã®ãªãã©ã³ãã®ææ°éšãåãããå¿
èŠããããŸããææ°ã®å°ããæ¹ã®æ°ãä»®æ°éšã§ãããã·ããããŠèª¿æŽããŸãã
# ä»®æ°éšã®æžç®
#: ææ°éšãæããåŸãä»®æ°éšå士ã®'''æžç®'''ãè¡ããŸããããããããåäœã§ã®æžç®èšç®ã«ãªããŸãã
# çµæã®æ£èŠå
#: æžç®çµæãæ£èŠåããŸããä»®æ°éšã®äžäœãããã1ã«ãªããããããã·ããããææ°éšã調æŽããŸãã
# äŸå€åŠç
#: æžç®çµæããªãŒããŒãããŒãã¢ã³ããŒãããŒãç¡é倧ãªã©ã®äŸå€ã®ç¯å²ã«å
¥ãå Žåã¯ãé©åãªäŸå€åŠçãè¡ããŸãã
# äžžãåŠç
#: æ£èŠååŸã®ä»®æ°éšãæå¹æ¡æ°ãè¶
ããŠããå Žåã¯ãäžžãåŠçãè¡ããŸãã
æžç®ã§ã¯ã笊å·ãç°ãªãå Žåã«ãå®è³ªçãªå ç®ãè¡ãããç¹ãå ç®ãšã®éãã§ãããåºæ¬çãªæµãã¯å
±éããŠããŸãã
æžç®æããã£ãªãŒãæ¡èœã¡ã®åœ±é¿ã§èª€å·®ãçããå¯èœæ§ãããã泚æãå¿
èŠã§ãã
ãŸãããªãã©ã³ãã®å€ã«ãã£ãŠã¯ãå ç®æã«èµ·ããããªãäŸå€(äŸãã°ã¢ã³ããŒãããŒ)ãçºçããå¯èœæ§ããããŸãã
==== ä¹ç® ====
æµ®åå°æ°ç¹æ°ã®ä¹ç®ã¯ã以äžã®æé ã«ãªããŸãã
# ä»®æ°éšã®ä¹ç®
#: 2ã€ã®æµ®åå°æ°ç¹æ°ã®ä»®æ°éš(æå¹æ°åéšå)å士ãæŽæ°ã®æãç®ãšåãããã«æãç®ããŸãã
# ææ°éšã®å ç®
#: 2ã€ã®ææ°éšãå ç®ããŸããããã«ãããæãç®ã®çµæã®ææ°éšãæ±ããããŸãã
# çµæã®æ£èŠå
#: ä»®æ°éšã®æãç®çµæãæ£èŠåããŸããã€ãŸããä»®æ°éšã®å
é ã1ã«ãªãããã«ãããã·ãããããã®åææ°éšã®å€ã調æŽããŸãã
# äŸå€åŠç
#: ææ°éšãä»®æ°éšãããããã®è¡šçŸç¯å²ãè¶
ããå Žåã¯ããªãŒããŒãããŒãã¢ã³ããŒãããŒãç¡é倧ã®äŸå€åŠçãè¡ããŸãã
# äžžãåŠç
#: æ£èŠååŸã®ä»®æ°éšããæå¹æ¡æ°ãè¶
ããŠããå Žåã¯äžžãåŠçãè¡ããŸãã
#: ç©ã¯ãä¹æ°ïŒããã³è¢«ä¹æ°ïŒã®åã®æ¡æ°ã«ãªãã®ã§ãå€ãã®æ¡ã倱ãããŸãã
ä¹ç®ã¯å æžç®ãšæ¯ã¹ãŠãä»®æ°éšãšææ°éšã®èšç®ãåé¢ãããŠããã®ã§ãæ¯èŒçåçŽãªåŠçã«ãªããŸãããã ããä»®æ°éšã®æãç®ãé·ãæ¡æ°ã«ãªããããæŒç®ãéããªãå¯èœæ§ããããŸãã
ãŸããä¹ç®ã§ã¯ææ°éšã®å ç®ã«ãããææ°ããªãŒããŒãããŒãã¢ã³ããŒãããŒã®ç¯å²ã«å
¥ãããããªããšããæ§è³ªããããŸãããã®ãããäŸå€åŠçãžã®å¯Ÿå¿ãéèŠã«ãªã£ãŠããŸãã
以äžãæµ®åå°æ°ç¹æ°ã®ä¹ç®ã®åºæ¬çãªæµãã«ãªããŸããé©åãªæ£èŠåãäŸå€åŠçãäžžãåŠçãè¡ãããšã§ã誀差ãæå°éã«æããçµæãåŸãããšãã§ããŸãã
==== é€ç® ====
æµ®åå°æ°ç¹æ°ã®é€ç®ã¯ã以äžã®æé ã«ãªããŸãã
# ä»®æ°éšã®é€ç®
#: 被é€æ°ã®ä»®æ°éšãé€æ°ã®ä»®æ°éšã§å²ããŸããããã¯æŽæ°ã®é€ç®ãšåæ§ã®ãããæŒç®ã«ãªããŸãã
# ææ°éšã®æžç®
#: 被é€æ°ã®ææ°éšããé€æ°ã®ææ°éšãåŒããŸããããã«ãããåã®ææ°éšãæ±ããããŸãã
# çµæã®æ£èŠå
#: é€ç®çµæã®ä»®æ°éšãæ£èŠåããŸããã€ãŸããä»®æ°éšã®å
é ã1ã«ãªããããããã·ãããããã®åææ°éšã調æŽããŸãã
# äŸå€åŠç
#: ææ°éšãä»®æ°éšãè¡šçŸç¯å²ãè¶
ããå Žåã¯ããªãŒããŒãããŒãã¢ã³ããŒãããŒããŒãé€ç®ã®äŸå€åŠçãè¡ããŸãã
# äžžãåŠç
#: æ£èŠååŸã®ä»®æ°éšãæå¹æ¡æ°ãè¶
ããŠããå Žåã¯ãäžžãåŠçãè¡ããŸãã
é€ç®ã¯ä¹ç®ãšã¯éã®æäœã«ãªããŸãããåºæ¬çãªæµãã¯äŒŒãŠããŸããä»®æ°éšã®é€ç®ãææ°éšã®æžç®ãæ£èŠåãäŸå€åŠçãäžžãåŠçã®äžé£ã®åŠçãè¡ããŸãã
é€ç®ã§ã¯ãç¹ã«'''é€æ°ã0ã®å Žåã®äŸå€åŠç'''ãéèŠã«ãªããŸããããã«ãé€ç®ã¯æŠããŠèª€å·®ãçããããæŒç®ãªã®ã§ãäžžãåŠçã®åœ±é¿ã«ã泚æãå¿
èŠã§ãã
ãŸããããŒããŠã§ã¢ã¬ãã«ã§ã®é€ç®ã¯é
ãæŒç®ãªã®ã§ããœãããŠã§ã¢çãªå·¥å€«ãæ±ããããå ŽåããããŸãã
以äžãæµ®åå°æ°ç¹æ°ã®é€ç®ã®åºæ¬çãªåŠçã®æµããšãªããŸããé©åãªäŸå€åŠçãšäžžãåŠçãè¡ãããšã§ãå¯èœãªéã誀差ã®å°ãªãåãæ±ããããšãã§ããŸãã
==== èåç©åæŒç® ====
èåç©åæŒç®(Fused Multiply-Add)ãšã¯ã(A à B) + Cã®èšç®ã1ã¹ãããã§è¡ãæŒç®ã®ããšã§ããéåžžã®æµ®åå°æ°ç¹æŒç®ã§ã¯ãD = A à BãšC + Dãå¥ã
ã«èšç®ããæåŸã«å ç®ããŸãããèåç©åæŒç®ã§ã¯ãã®2ã¹ãããã1ã¹ãããã«ãŸãšããŠè¡ããŸãã
èåç©åæŒç®ã®å
·äœçãªæé ã¯ä»¥äžã®éãã§ãã
# ä»®æ°éšã®ç©ç®
#:AãšBã®ä»®æ°éšãæãç®ããŸãã
# ææ°éšã®å ç®
#: AãšBã®ææ°éšãå ç®ããç©ã®ææ°éšãæ±ããŸãã
# äžéçµæã®å ç®
#: ã¹ããã1ã§åŸãç©ã®ä»®æ°éšã«ãCã®ä»®æ°éšãå ç®ããŸãããã®æãææ°éšãåãããå¿
èŠããããŸãã
# çµæã®æ£èŠå
#: å ç®çµæãæ£èŠåããæçµçãªèåç©åã®å€ãæ±ããŸãã
# äŸå€åŠçãšäžžã
#: å¿
èŠã«å¿ããŠäŸå€åŠç(ãªãŒããŒãããŒç)ãšäžžãåŠçãè¡ããŸãã
#: äžžãåŠçã¯ãã®ïŒåããè¡ãããŸããã
ä¹ç®ãšå ç®ãïŒåã«åããŠå®è¡ãããšäžžãåŠçãïŒåè¡ãããŸããããã«å¯Ÿãèåç©åæŒç®ã§ã¯ä¹ç®åŸã®äžžãåŠçã¯è¡ããå ç®åŸã«1床ã ãäžžãåŠçãè¡ãããšã§ãé«éãã€ç²ŸåºŠã®é«ãèšç®ãå¯èœã§ãã
èåç©åæŒç®ã¯ãäžéšã®ããã»ããµãŒã¢ãŒããã¯ãã£ãŒã§ããŒããŠã§ã¢ã¬ãã«ã§ãµããŒããããŠãããäžéšã®ããã°ã©ãã³ã°èšèªïŒäŸïŒCãC++ïŒã§ã¯ãFMAæ©èœãå©çšããããã®ç¹å¥ãªé¢æ°ãæäŸãããŠããŸãã
ç©åæŒç®ã¯ãç·åœ¢ä»£æ°ãè¡åèšç®ã幟äœèšç®ãªã©ã§å€çšãããŠãããèšç®ç²ŸåºŠãšæŒç®é床ã®äž¡ç«ãå³ãäžã§éèŠãªæŒç®ãšèšããŸãã
äžæ¹ã§ãäžéçµæã®äžžããïŒåºŠããçºçããªã粟床ãé«ããçŽ æŽã«ä¹ç®ãšå ç®ã®çµã¿åãããå Žåãšçµæãéãå Žåãããããšã«æ³šæãå¿
èŠã§ãïŒèåç©åæŒç®ã®ã»ããçžå¯Ÿçã«é«ç²ŸåºŠïŒã
==== æ°å€ã®æ¯èŒ ====
IEEE 754èŠæ Œã®æµ®åå°æ°ç¹æ°ã§ããã°ãNaNãInfã®äŸå€åŠçãè¡ã£ãåŸã¯ãåçŽã«æŽæ°ã®æ¯èŒæŒç®ãé©çšããããšã§ãæ£ããå€ã®å€§å°é¢ä¿ãå€æã§ããŸãã
ã€ãŸãã以äžã®æé ã«ãªããŸãã
# NaNãInfãªã©ã®äŸå€å€ããã§ãã¯ããé©åã«åŠçãã
# äŸå€å€ã§ã¯ãªãå Žåããããè¡šçŸããã®ãŸãŸç¬Šå·ä»ãæŽæ°ãšããŠæ¯èŒãã
#: ããã¯
#:# 笊å·ãæ¯èŒãããç°ãªãã°ç¬Šå·ãç«ã£ãŠããïŒè² ã®ïŒæ°ãå°ãã
#:# 笊å·ãäžèŽãªããææ°ãæ¯èŒããç°ãªãã°ææ°ã絶察å€ãšããŠæ¯èŒçµæãè¿ã
#:# ææ°ãäžèŽãªããä»®æ°ã絶察å€ãšããŠæ¯èŒçµæãè¿ã
#: ãšç䟡ãªçµæããããããŸã
ãã®ããã«ç°¡æœã§ãããæ¬è³ªçãªæ¯èŒæ¹æ³ãçšããããšãã§ããŸãã
ææ°éšãä»®æ°éšãåºå¥ããŠåå¥ã«æ¯èŒããå¿
èŠã¯ãªããIEEE 754ã§èŠå®ããããããè¡šçŸãã®ãã®ãæŽæ°æ¯èŒããã°ãæ£ãã倧å°é¢ä¿ãåŸããããšããããšã§ãã
æµ®åå°æ°ç¹æ°ã¯ãæ°å€ã®è¡šçŸæ¹æ³ã«ãã£ãŠèª€å·®ãçãããããçãããã©ãããå€å®ããå Žåã¯ãããçšåºŠã®èª€å·®ã蚱容ããå¿
èŠããããŸãã
==== æµ®åå°æ°ç¹æ°ã®æŒç®ãšæ£èŠå ====
æµ®åå°æ°ç¹æ°ã®å æžç®ãªã©ã®æŒç®ãè¡ãéãçµæãšããŠåŸãããå€ã¯å¿
ãããæ£èŠåããã圢åŒã«ã¯ãªã£ãŠããŸãããã€ãŸããä»®æ°éšã®æäžäœãããã1ã«ãªããªãå ŽåããããŸãã
äŸãã°ãå粟床浮åå°æ°ç¹æ°ã§1.0ã2ã§å²ããšãçµæã¯0.5ã«ãªããŸãããããã¯
;0.1000...0 Ã 2<sup>0</sup>
ãšè¡šçŸãããŸãã
ãã®ããã«ãæŒç®çµæã¯äžæçã«éæ£èŠåæ°ã«ãªãå¯èœæ§ããããŸããããããæçµçã«æµ®åå°æ°ç¹æ°ãšããŠè¡šçŸããéã¯ããã®éæ£èŠåæ°ãæ£èŠåããå¿
èŠããããŸãã
æ£èŠåãšã¯ã以äžã®2ã¹ãããã§è¡ãããŸãã
# ä»®æ°éšããããã·ããããŠãæäžäœãããã1ã«ãã
# ææ°éšã®å€ããã¹ããã1ã®ã·ããéå調æŽãã
ã€ãŸããäžã®0.5ã®äŸã§ã¯
;1.000...0 Ã 2<sup>-1</sup>
ãšæ£èŠåè¡šçŸã«çŽãããŸãã
ãã®ããã«ãæµ®åå°æ°ç¹æ°ã®æŒç®ã§ã¯ãŸãèšç®ãè¡ãããæåŸã«æ£èŠåãããŠæšæºçãªè¡šçŸåœ¢åŒã«ãªããŸãããã®æ£èŠåã¯ãäŸå€çãª0ãç¡é倧ã®å Žåãé€ããŠãå¿
ãè¡ãããŸãã
æŒç®æã«äžæçã«éæ£èŠåæ°ã«ãªããããæŒç®ã®éçšã§æ
å ±ã倱ãããå¯èœæ§ããããŸãããæçµçã«ã¯æ£èŠåã«ããã§ããéã粟床ãä¿æããããšãã§ããŸãã
==== äžžã誀差 ====
æµ®åå°æ°ç¹æ°ã®ååæŒç®ã«ã¯ãäžžã誀差ãšåŒã°ããçŸè±¡ããããŸããäžžã誀差ã¯ãæµ®åå°æ°ç¹æ°ã䜿çšããèšç®ã§ãæ£ç¢ºãªçµæãåŸãããªãããšãæããŸããããã¯ãæµ®åå°æ°ç¹æ°ãæéã®ç²ŸåºŠã§è¡šçŸãããããã§ãã
ããšãã°ã0.1ã10å足ãåããããšãæåŸ
ãããçµæã¯1.0ã§ãããå®éã«ã¯1.0000000000000002ãšãªãå ŽåããããŸããããã¯ã0.1ãæµ®åå°æ°ç¹æ°ãšããŠæ£ç¢ºã«è¡šçŸã§ããªãããã§ãããã®ãããªäžžã誀差ã¯ãæµ®åå°æ°ç¹æ°ã䜿çšããèšç®ã§åžžã«çºçããå¯èœæ§ããããŸãã
==== æ¡èœã¡ ====
æ¡èœã¡ãšã¯ã絶察å€ã®ã»ãŒçããäºã€ã®æ°å€ã§æžç®ãè¡ã£ããšãã«ãæå¹æ¡æ°ãæžå°ããããšã«ããçºçãã誀差ã®ããšã§ãããã®èª€å·®ã¯ãå°æ°ç¹ä»¥äžã®æ¡æ°ãå€ãã»ã©é¡èã«ãªããŸãã
ããšãã°ã以äžã®ãããªäŸãèããããŸããæ°å€ x = 0.123456789 ãš y = 0.123456788 ãåŒããå Žåãæ£ç¢ºãªçã㯠0.000000001 ã§ãããããããã®èšç®ãè¡ãéã«ã¯ãx ãš y ã®å·®ãéåžžã«å°ãããæå¹æ¡æ°ãæžå°ããããã誀差ãçããå¯èœæ§ããããŸããå®éã«ãå€ãã®ããã°ã©ã èšèªã§ã¯ããã®èšç®ãè¡ããšãçµæ㯠0.000000000 ã«ãªãããšããããŸãã
ãã®ãããªæ¡èœã¡ã®åé¡ãåé¿ããã«ã¯ãæ°å€ã®æ¡æ°ãæžããåã«ãæ¡æ°ã®å€ãæ°å€ããæ¡æ°ã®å°ãªãæ°å€ãåŒããŠãçµæã®ç²ŸåºŠãç¶æããããšãéèŠã§ãããŸããèšç®ã«ãã誀差ãæå°éã«æããããã«ãæµ®åå°æ°ç¹æ°ã䜿çšããå Žåã¯ãå¯èœãªéãå粟床ã®æ°å€ã䜿çšããããšãæšå¥šããŸãã
==== æ¡æº¢ã ====
æµ®åå°æ°ç¹æŒç®ã«ãããæ¡æº¢ãïŒãªãŒããŒãããŒïŒã¯ãèšç®çµæãæµ®åå°æ°ç¹æ°ã®è¡šçŸç¯å²ãè¶
ããå Žåã«çºçããŸããããã¯ãæŒç®çµæãã³ã³ãã¥ãŒã¿ãè¡šçŸã§ããæ倧ã®æ°å€ãè¶
ããå Žåã«çºçããŸããå
·äœçã«ã¯ãæŒç®çµæãææ°éšãä»®æ°éšã®æå¹æ¡æ°ãè¶
ããæå¹æ°åã倱ãããããšã§èµ·ãããŸãã
æ¡æº¢ãã¯ãèšç®çµæãäžæ£ç¢ºã«ãªãã ãã§ãªããããã°ã©ã ã®å®å®æ§ãä¿¡é Œæ§ã«ã圱é¿ãäžããå¯èœæ§ããããŸããç¹ã«ãæ°å€èšç®ã®ã¢ã«ãŽãªãºã ãã·ãã¥ã¬ãŒã·ã§ã³ã«ãããŠãæ¡æº¢ããèµ·ãããšäºæãã¬çµæãçããå¯èœæ§ããããŸãã
æ¡æº¢ããåé¿ããããã«ã¯ã次ã®ãããªæ¹æ³ããããŸãïŒ
# å
¥åå€ã®ç¯å²ãå¶éããïŒå
¥åå€ã®ç¯å²ãé©åã«å¶éããããšã§ãèšç®çµæãæµ®åå°æ°ç¹æ°ã®è¡šçŸç¯å²ãè¶
ããå¯èœæ§ãæžããããšãã§ããŸãããã®æ¹æ³ã¯ãåé¡ã®æ§è³ªã«å¿ããŠé©åãªå
¥åå€ã®ç¯å²ãå®ããããšã§ãæ¡æº¢ããåé¿ããã®ã«åœ¹ç«ã¡ãŸãã
# æŒç®ã®é åºã工倫ããïŒèšç®ã®é åºãé©åã«å·¥å€«ããããšã§ãæ¡æº¢ããåé¿ããããšãã§ããŸããäŸãã°ãå ç®ãä¹ç®ã®é åºãå€ããããšã§ãèšç®çµæãè¡šçŸç¯å²ãè¶
ããå¯èœæ§ãæžããããšãã§ããŸãã
# ãªãŒããŒãããŒãæ€åºããïŒèšç®çµæããªãŒããŒãããŒããå¯èœæ§ãããå Žåãäºåã«ãªãŒããŒãããŒãæ€åºããé©åãªåŠçãè¡ãããšã§æ¡æº¢ããåé¿ããããšãã§ããŸããäŸãã°ãæ¡ä»¶åå²ãäŸå€åŠçã䜿çšããŠããªãŒããŒãããŒãæ€åºããé©åãªå¯ŸåŠãè¡ãããšãã§ããŸãã
ãããã®æ¹æ³ãçµã¿åãããããšã§ãæµ®åå°æ°ç¹æŒç®ã«ãããæ¡æº¢ããå¹æçã«åé¿ããããšãã§ããŸãã
==== NaNãšç¡é倧 ====
æµ®åå°æ°ç¹æ°ã®ååæŒç®ã§ã¯ãNaNãšç¡é倧ã®æ±ãã«æ³šæããå¿
èŠããããŸããNaNã¯ãèšç®çµæãå®çŸ©ã§ããªãå Žåã«çºçããç¹æ®ãªå€ã§ããNaNãšä»ã®å€ãæŒç®ãããšãçµæã¯NaNã«ãªããŸããç¡é倧ã¯ãæµ®åå°æ°ç¹æ°ã®æ倧å€ãè¶
ããå Žåã«çºçããŸããç¡é倧ãšä»ã®å€ãæŒç®ãããšãçµæã¯ç¡é倧ã«ãªããŸããç¡é倧å士ã§æŒç®ãããšçµæã¯NaNã«ãªããŸãã
以äžããæµ®åå°æ°ç¹æ°ã®ååæŒç®ã®åºæ¬ååã§ããæµ®åå°æ°ç¹æ°ãæ±ãéã«ã¯ããããã®ååã«æ³šæããŠãæ£ç¢ºãªèšç®ãè¡ãããã«ããŸãããã
=== äžžãã¢ãŒããšãã®åœ±é¿ ===
æµ®åå°æ°ç¹æ°ã®æŒç®çµæã¯ãäžžãã¢ãŒãã«ãã£ãŠç°ãªãå¯èœæ§ããããŸããäžžãã¢ãŒãã«ã¯ã次ã®4ã€ã®ã¢ãŒãããããŸãã
#round to nearestïŒæè¿æ¥äžžãïŒ
#round towards zeroïŒãŒãã«åãã£ãŠäžžãïŒ
#round towards positive infinityïŒæ£ã®ç¡é倧ã«åãã£ãŠäžžãïŒ
#round towards negative infinityïŒè² ã®ç¡é倧ã«åãã£ãŠäžžãïŒ
æè¿æ¥äžžãã¯ãæŒç®çµæãæãè¿ãæŽæ°ã«äžžããŸãããã®ã¢ãŒããæãäžè¬çã«äœ¿çšãããŸãããŒãã«åãã£ãŠäžžããå Žåãçµæã¯æŒç®ã«ãã£ãŠåŸãããæ倧ã®æŽæ°ãŸãã¯æå°ã®æŽæ°ã«ãªããŸããæ£ã®ç¡é倧ãŸãã¯è² ã®ç¡é倧ã«åãã£ãŠäžžããå Žåãçµæã¯æ£ã®ç¡é倧ãŸãã¯è² ã®ç¡é倧ã«ãªããŸãã
=== ç¹æ®ãªå€ã®åãæ±ãæ¹æ³ ===
æµ®åå°æ°ç¹æ°ã®ç¹æ®ãªå€ã«ã¯ä»¥äžã®ãããªãã®ããããŸãã
==== NaNïŒéæ°ïŒ ====
NaN (Not a Number)ã¯ãæ°å€ãšããŠè§£éã§ããªãå€ãè¡šãããã«äœ¿çšãããŸãã
0.0/0.0 ã Inf/Inf ãªã©ã®äžå®åœ¢ãæªå®çŸ©ã®æ°å€æŒç®ã®çµæããŸãã¯å®æ°ã§è¡šçŸã§ããªãæ°å€ãäŸãã° â-1 ãªã©ãå«ãŸããŸãã
NaN ã¯ãæ°å€ã«å¯ŸããæŒç®ã®çµæãšããŠãåŸãããããšããããŸãã
NaN ã¯ãã©ã®ãããªæŒç®ãããŠã NaN ãè¿ããŸãã
NaN ã¯ãæµ®åå°æ°ç¹æ°ã®æ¯èŒæŒç®ã«ãããŠã¯åžžã« false ãšããŠæ±ãããŸãã
===== quiet NaN ãš signaling NaN =====
NaNã«ã¯ã"quiet NaN"ãš "signaling NaN"ã®2çš®é¡ããããŸãã
"quiet NaN"ã¯ãç®è¡æŒç®ã«äœ¿çšããŠã·ã°ãã«ãçºçããªãNaNå€ã§ããéåžžãåæåãããŠããªãå€ãæªå®çŸ©ã®å€ãè¡šãå Žåããäžç¢ºå®ãªèšç®çµæãè¡šãå Žåã«äœ¿çšãããŸãã
äžæ¹ã"signaling NaN" ã¯ãç®è¡æŒç®ã«äœ¿çšããããšãã«ã·ã°ãã«ãçºçããNaNå€ã§ãããã®ã·ã°ãã«ã¯ãäžæ£ãªæŒç®ãå¢çå€ã¡ã¢ãªã¢ã¯ã»ã¹ãªã©ã®åé¡ãããã°ã©ã ã«èŠåããããã«äœ¿çšããããšãã§ããã
äžè¬ã«ã"quiet NaN" 㯠"signaling NaN" ããã䜿çšé »åºŠãé«ããããã°ã©ã ã«ãããŠäºæãã¬åäœãåŒãèµ·ããå¯èœæ§ãäœãããã§ããããããã©ã¡ãã®NaNãæµ®åå°æ°ç¹æŒç®ã®ãšã©ãŒãæ€åºãåŠçããããã«éèŠã§ãã
===== NaNã®ãã€ããŒã =====
NaNã®ãã€ããŒããšã¯ãNaNãå«ãããŒã¿ã®è¡šçŸæ¹æ³ã®ããšã§ããIEEE 754èŠæ Œã«åŸã£ãæµ®åå°æ°ç¹æ°ã§ã¯ãNaNãè¡šãããã«ç¹å¥ãªããããã¿ãŒã³ãå®çŸ©ãããŠããŸããããã¯ãææ°éšãå
šãŠ1ã§ãããä»®æ°éšã0ã§ãªãä»»æã®ããããã¿ãŒã³ã§ãããšãããã®ã§ãããã®ããããã¿ãŒã³ã¯ãNaNãè¡šãããã«äœ¿çšãããŸãã
äŸãã°ã64ãããã®æµ®åå°æ°ç¹æ°ã®NaNã®ãã€ããŒãã¯ã次ã®ããã«è¡šãããŸãã
: 笊å·ããã: 1ããã
: ææ°éš: 11ããããã¹ãŠã1
: ä»®æ°éš: 53ãããã®ãã¡ä»»æã®ããããã¿ãŒã³
ãã®ããã«ãNaNã¯ç¹æ®ãªå€ã§ããããã®ãã€ããŒããç¹æ®ãªããããã¿ãŒã³ã§è¡šãããŸãã
===== ããã°ã©ãã³ã°ããšã®ãµããŒãã®éã =====
ããã°ã©ãã³ã°èšèªã¯ãNaNãã©ã®ããã«æ±ããã«ã€ããŠç°ãªãæ¹æ³ãåãããšããããŸãã以äžã¯ãäžéšã®ããã°ã©ãã³ã°èšèªã®NaNã®æ±ãã«é¢ããæŠèŠã§ãã
#C/C++: IEEE 754ã®èŠæ Œã«åŸããNaNã¯ãquiet NaNããšãsignaling NaNãã«åé¡ãããŸããC/C++ã§ã¯ãNaNãæ¯èŒããŠãåžžã«falseã«ãªããŸãã
#Java: IEEE 754ã®èŠæ Œã«åŸããNaNã¯ä»ã®ã©ã®å€ãšãç°ãªããããNaN == NaNã®æ¯èŒã¯falseã«ãªããŸããJavaã§ã¯ãDouble.NaNãšFloat.NaNã䜿çšããŠãããããdoubleããã³floatã®NaNå€ãè¡šçŸããŸãã
#Python: IEEE 754ã®èŠæ Œã«åŸããNaNã¯ä»ã®ã©ã®å€ãšãç°ãªããããNaN == NaNã®æ¯èŒã¯falseã«ãªããŸããPythonã§ã¯ãmath.nanã䜿çšããŠãfloatã®NaNå€ãè¡šçŸããŸãã
#JavaScript: IEEE 754ã®èŠæ Œã«åŸããNaNã¯ä»ã®ã©ã®å€ãšãç°ãªããããNaN == NaNã®æ¯èŒã¯falseã«ãªããŸããJavaScriptã§ã¯ãNaNãçŽæ¥äœ¿çšããŠãæ°å€åã®NaNå€ãè¡šçŸããŸãã
#Ruby: IEEE 754ã®èŠæ Œã«åŸããNaNã¯ä»ã®ã©ã®å€ãšãç°ãªããããNaN == NaNã®æ¯èŒã¯falseã«ãªããŸããRubyã§ã¯ãFloat::NANãšããå®æ°ã䜿çšããŠãfloatã®NaNå€ãè¡šçŸããŸãã
#MATLAB: IEEE 754ã®èŠæ Œã«åŸããNaNã¯ä»ã®ã©ã®å€ãšãç°ãªããããNaN == NaNã®æ¯èŒã¯falseã«ãªããŸããMATLABã§ã¯ãNaNãçŽæ¥äœ¿çšããŠãæ°å€åã®NaNå€ãè¡šçŸããŸãã
ãããã®ããã°ã©ãã³ã°èšèªã¯ãNaNãæ±ãããã®é¢æ°ãæŒç®åãæäŸããŠããããšããããŸããäŸãã°ãPythonã§ã¯math.isnan(x)é¢æ°ã䜿çšããŠãxãNaNãã©ããããã§ãã¯ã§ããŸãããŸããC/C++ã§ã¯isnan(x)ãã¯ãã䜿çšããŠãxãNaNãã©ããããã§ãã¯ã§ããŸãã
==== InfïŒæ£ã®ç¡éå€§ïŒ ====
Inf (Infinity)ã¯ãæ£ã®ç¡é倧ãè¡šãããã«äœ¿çšãããŸããäŸãã°ã1.0/0.0 ã®ãããªæŒç®ã®çµæã Inf ã«ãªããŸããInf ã¯ãã©ã®ãããªæ°å€ãšãæ¯èŒæŒç®ãã§ããŸãããInf ãš NaN ãæ¯èŒããããšã¯ã§ããŸããã
==== -InfïŒè² ã®ç¡éå€§ïŒ ====
-Inf (Negative Infinity)ã¯ãè² ã®ç¡é倧ãè¡šãããã«äœ¿çšãããŸããäŸãã°ã-1.0/0.0 ã®ãããªæŒç®ã®çµæã -Inf ã«ãªããŸãã-Inf ã Inf ãšåæ§ã«æ±ãããŸãã
==== -0ïŒè² ã®ãŒãïŒ ====
-0.0 (Negative zero)ã¯ãè² ã®å€ããŒãã«äžžããå Žåã«åŸãããŸãã
-0.0 ã¯ã0.0 ãšæ¯èŒæŒç®ããããšçãããªããŸãããäžæ¹ã§è² ã®æ°ãšããŠæ±ãããŸãã
ããšãã°ã1.0/-0.0ã¯-InfïŒè² ã®ç¡é倧ïŒã§ãã
==== 0ïŒæ£ã®ãŒãïŒ ====
0.0 (Positive zero)ã¯ãæ£ã®å€ããŒãã«äžžããå Žåã«åŸãããæ£ã®æ°ãšããŠæ±ãããŸãã
ããšãã°ã1.0/0.0ã¯InfïŒæ£ã®ç¡é倧ïŒã§ãã
ãããã®ç¹æ®ãªå€ã¯ãããã°ã©ã ã®å®è¡äžã«ç¹å¥ãªæå³ãæã¡ãŸããNaN ã¯ãç¹å¥ãªãšã©ãŒç¶æ
ã瀺ãããã«äœ¿çšãããããšããããŸããInf ãš -Inf ã¯ãç¡é倧ãè¡šãããã«äœ¿çšãããèšç®çµæãéããªã倧ãããªã£ãå Žåã«è¿ãããŸãããŸãã0.0 ãš -0.0 ã¯ãæ°å€èšç®ã«ãããŠç¹å®ã®æ¡ä»¶åå²ã«äœ¿ãããããšããããŸãã
== å®è·µçãªäœ¿çšäŸ ==
=== æµ®åå°æ°ç¹æ°ã®å¿çšäŸ ===
æµ®åå°æ°ç¹æ°ã¯ãæ§ã
ãªåéã§åºã䜿çšãããŠããŸãã以äžã«ãæµ®åå°æ°ç¹æ°ã䜿çšãããäž»ãªåéãšãã®å¿çšäŸã玹ä»ããŸãã
*ã°ã©ãã£ãã¯ã¹åŠç: ã³ã³ãã¥ãŒã¿ãŒã²ãŒã ãæ ç»ãªã©ã§äœ¿çšããã3Dã°ã©ãã£ãã¯ã¹ã®æç»ã§ã¯ãæµ®åå°æ°ç¹æ°ãåºã䜿çšãããŠããŸããæµ®åå°æ°ç¹æ°ã¯ãç¹ãç·ãå€è§åœ¢ãªã©ã®åº§æšãè¡šçŸããã®ã«æé©ãªåœ¢åŒã§ãããé«ç²ŸåºŠã®èšç®ãå¿
èŠãªå Žåã«ãé©ããŠããŸãã
*ç©çã·ãã¥ã¬ãŒã·ã§ã³: ç©ççŸè±¡ã®ã·ãã¥ã¬ãŒã·ã§ã³ã«ã¯ãæµ®åå°æ°ç¹æ°ãé »ç¹ã«äœ¿çšãããŸããäŸãã°ãè¡çªæ€åºãåäœååŠã®ã·ãã¥ã¬ãŒã·ã§ã³ã§ã¯ããªããžã§ã¯ãã®é床ãäœçœ®ãèšç®ããå¿
èŠããããŸãããŸããæµäœååŠã®ã·ãã¥ã¬ãŒã·ã§ã³ã«ãæµ®åå°æ°ç¹æ°ã䜿çšãããŸãã
*éèåæ: 蚌åžååŒãéèåæã«ãããŠããæµ®åå°æ°ç¹æ°ã¯åºã䜿çšãããŠããŸããæ ªäŸ¡ãçºæ¿ã¬ãŒãã®å€åãè¡šãã®ã«æé©ãªåœ¢åŒã§ãããé«ç²ŸåºŠã®èšç®ãå¿
èŠãªå Žåã«ãé©ããŠããŸãã
== 代衚çãªããã°ã©ãã³ã°èšèªã®æµ®åå°æ°ç¹æ°ã®ãµããŒãç¶æ³ãšãã®ç¹åŸŽ ==
æµ®åå°æ°ç¹æ°ã¯ãå€ãã®ããã°ã©ãã³ã°èšèªã§ãµããŒããããŠããŸãã
以äžã«ã代衚çãªããã°ã©ãã³ã°èšèªã®æµ®åå°æ°ç¹æ°ã®ãµããŒãç¶æ³ãšãã®ç¹åŸŽã玹ä»ããŸãã
*Cèšèª: Cèšèªã¯ãæµ®åå°æ°ç¹æ°ããµããŒãããŠããŸããCèšèªã®æµ®åå°æ°ç¹æ°ã¯ãIEEE 754èŠæ Œã«æºæ ããŠãããå粟床浮åå°æ°ç¹æ°ã¯floatåãå粟床浮åå°æ°ç¹æ°ã¯doubleåã§è¡šçŸãããŸãã
*Java: Javaã¯ãæµ®åå°æ°ç¹æ°ããµããŒãããŠããŸããJavaã®æµ®åå°æ°ç¹æ°ããIEEE 754èŠæ Œã«æºæ ããŠãããå粟床浮åå°æ°ç¹æ°ã¯floatåãå粟床浮åå°æ°ç¹æ°ã¯doubleåã§è¡šçŸãããŸãã
*Python: Pythonã¯ãæµ®åå°æ°ç¹æ°ããµããŒãããŠããŸããPythonã®æµ®åå°æ°ç¹æ°ã¯ãCèšèªã®doubleåãšåçã®å粟床浮åå°æ°ç¹æ°ã§ãããIEEE 754èŠæ Œã«æºæ ããŠããŸãã
*JavaScript: JavaScriptã¯ãæŽæ°ããµããŒãããæµ®åå°æ°ç¹æ°ã®ã¿ãµããŒãããŠããŸããIEEE 754èŠæ Œã«æºæ ããŠãããNumberåã¯å粟床浮åå°æ°ç¹æ°ã§è¡šçŸãããŸãã
*Ruby: Rubyã¯ãæµ®åå°æ°ç¹æ°ããµããŒãããŠããŸããRubyã®æµ®åå°æ°ç¹æ°ã¯ãCèšèªã®doubleåãšåçã®å粟床浮åå°æ°ç¹æ°ã§ãããIEEE 754èŠæ Œã«æºæ ããŠããŸããRubyã§ã¯ãFloatã¯ã©ã¹ã䜿çšããŠæµ®åå°æ°ç¹æ°ãè¡šçŸããŸãã
*Go: Goã¯ãæµ®åå°æ°ç¹æ°ããµããŒãããŠããŸããGoã®æµ®åå°æ°ç¹æ°ããIEEE 754èŠæ Œã«æºæ ããŠãããå粟床浮åå°æ°ç¹æ°ã¯float32åãå粟床浮åå°æ°ç¹æ°ã¯float64åã§è¡šçŸãããŸãã
*PHP: PHPã¯ãæµ®åå°æ°ç¹æ°ããµããŒãããŠããŸããPHPã®æµ®åå°æ°ç¹æ°ããCèšèªã®doubleåãšåçã®å粟床浮åå°æ°ç¹æ°ã§ãããIEEE 754èŠæ Œã«æºæ ããŠããŸããPHPã§ã¯ãfloatãŸãã¯doubleåã䜿çšããŠæµ®åå°æ°ç¹æ°ãè¡šçŸããŸãã
== æµ®åå°æ°ç¹æ°ã®æ³šæç¹ ==
=== æµ®åå°æ°ç¹æ°ãæ±ãäžã§ã®åé¡ç¹ãšãã®åé¿ç ===
* æµ®åå°æ°ç¹æ°ã®ç²ŸåºŠã«ãã誀差ïŒæµ®åå°æ°ç¹æ°ã¯å®æ°ãè¿äŒŒçã«è¡šçŸãããããèšç®ã®ãã³ã«èª€å·®ãèç©ãããŸãããã®åé¡ãåé¿ããããã«ã¯ãèšç®ã®éäžçµæãã§ããã ãå°æ°ç¹ä»¥äžã®æ¡æ°ãæžãããŠä¿åããå¿
èŠã«å¿ããŠé©åã«äžžããããšãéèŠã§ãã
* æµ®åå°æ°ç¹æ°ã®è¡šçŸç¯å²ã«ããåé¡ïŒæµ®åå°æ°ç¹æ°ã¯ãããçšåºŠã®ç¯å²ãŸã§ããè¡šçŸã§ããŸããã極端ã«å€§ããªæ°ã極端ã«å°ããªæ°ãè¡šçŸããå Žåã«ã¯ã誀差ã倧ãããªãããšããããŸãããã®åé¡ãåé¿ããããã«ã¯ãå¿
èŠã«å¿ããŠå€ã®ã¹ã±ãŒã«ãå€æŽããããæŽæ°ã®æŒç®ãè¡ã£ãããããªã©ã®å¯Ÿçããšãå¿
èŠããããŸãã
=== æµ®åå°æ°ç¹æ°ãšæŽæ°ã®æ¯èŒã®åé¡ç¹ãšãã®è§£æ±ºç ===
æµ®åå°æ°ç¹æ°ãšæŽæ°ãæ¯èŒããå Žåã«ã¯ãäž¡è
ã®è¡šçŸæ¹æ³ã®éãã«ãããæãã¬çµæã«ãªãããšããããŸããäŸãã°ã次ã®ãããªã³ãŒããèããŠã¿ãŸãããã
:<syntaxhighlight lang=Python3>
a = 0.1 + 0.1 + 0.1
b = 0.3
if a == b:
print("a and b are equal")
else:
print("a and b are not equal")
</syntaxhighlight>
ãã®ã³ãŒããå®è¡ãããšãäºæ³éãããa and b are equalããšããçµæã衚瀺ãããã¯ãã§ããããããå®éã«ã¯ã次ã®ããã«ãa and b are not equalããšè¡šç€ºãããããšããããŸãããã®åå ã¯ã0.1ã0.3ãšãã£ãæ°å€ãæµ®åå°æ°ç¹æ°ãšããŠè¡šçŸãããéã«ãå®å
šãªå€ãšããŠè¡šçŸã§ããªããããèšç®çµæã«èª€å·®ãçããããšã«ãããŸãã
ãã®åé¡ãåé¿ããããã«ã¯ãæµ®åå°æ°ç¹æ°ã®æ¯èŒã«ã¯èª€å·®ã蚱容ããæ¹æ³ã䜿ãå¿
èŠããããŸããããšãã°ã次ã®ããã«æžãæããããšãã§ããŸãã
:<syntaxhighlight lang=Python3>
import math
a = 0.1 + 0.1 + 0.1
b = 0.3
if math.isclose(a, b):
print("a and b are equal")
else:
print("a and b are not equal")
</syntaxhighlight>
math.isclose()é¢æ°ã䜿ãããšã§ã2ã€ã®æ°ã粟床ã®ç¯å²ã§äžèŽæ§ã確èªã§ããŸãã
== ç·æ¬ãšãŸãšã ==
=== æµ®åå°æ°ç¹æ°ã®éèŠæ§ãšä»åŸã®å±æ ===
=== æµ®åå°æ°ç¹æ°ã®å©çšäžã®çæç¹ ===
=== ãŸãšã ===
[[ã«ããŽãª:ããã°ã©ãã³ã°|ãµãšãããããããŠããã]] | 2023-03-08T07:13:00Z | 2024-03-15T01:29:57Z | [
"ãã³ãã¬ãŒã:ã³ã©ã "
] | https://ja.wikibooks.org/wiki/%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0/%E6%B5%AE%E5%8B%95%E5%B0%8F%E6%95%B0%E7%82%B9%E6%95%B0 |
37,158 | äžåŠæ ¡å®¶åº/åã©ãã«ãšã£ãŠã®å®¶æ | åäŸãè²ã€å ŽæãšããŠã家åºãããã«éèŠããç解ããŸãããã
家æå
šäœã®ç«å ŽããåäŸã«ã€ããŠèãã話ããŸãããã
家æã¯ãåäŸãèªç«ãã瀟äŒäººãšãªãããã«å€§åãªåœ¹å²ãæ
ã£ãŠããŸãããã®çç±ãšããŠæ¬¡ã®2ã€ãæããããŸãã
ãããã£ãŠã家æã¯åäŸã«ãšã£ãŠæ¬ ãããªãã®ã§ãã©ã®ãããªæ°æã¡ã§åäŸãšåãåã£ãŠãããããåäŸã®æé·ã«å€§ãã圱é¿ããŸãããŸããåäŸãæã€ãšã家æãç©ããã«ãªããªã©ãæ§ã
ãªå¹æããããŸãã
èªå·±è¯å®æãšã¯ãèªåã¯å€§åãªååšã ãããåšãã®äººããèªããŠããããããšæãæ°æã¡ã§ããèªå·±è¯å®æã¯ãèªåãããæããåé¡ãä¹ãè¶ããä»äººãæãããããã®åå°ãšãªããŸãã
芪ãããé¢çœãã£ããããæãã£ããããšèšãããŠãå®å¿ããçµéšã¯ãããŸããã?åäŸã¯ãèªåã®æ©ã¿ãå¿é
äºãåãå
¥ããããå¿æŽããã人ããæããã倧åã«ããããšã幞ãã«ãªããŸãã
家æã身è¿ãªäººãä¿¡é Œåºæ¥ãç°å¢ãåäŸã®æé·ã«æ¬ ãããŸããããŸããä¿¡é Œãã人ã®èšèãè¡åãç䌌ãããããã®äººãå¿æŽããåšå²ã®äººãšé¢ãããªãããåäŸã¯æé·ããŠãããŸããåäŸã®å¥ãããªæé·ã«ã¯ã家æã®äžã§ä¿¡é Œé¢ä¿ãç¯ããææ
ã泚ããªããã°ãªããŸããã
äžåŠçã®çããã¯ããã®ãããªçµéšãçµãŠãããã«äžçãåºããæ§ã
ãªäººãšã®é¢ãããæã€ããã«ãªã£ãŠããã§ããããããããåºäŒã人ãšä¿¡é Œé¢ä¿ãç¯ããŠãããŸãããã
â»ä»¥äžã®é
ç®ã¯ãé«æ ¡çã®å®¶åºç§ã§ç¿ããŸãããäžåŠæ ¡ã®å®¶åºç§æç§æžã«ãèšèŒãããŠããã®ã§ã解説ããŸãã
æè¿ãåè²ãŠæ¯æŽãå¿
èŠãšãã人ãå¢ããŠããŸãããã®çç±ãšããŠãå°ååã»å®¶ææ§æã®å€åã»éœåžåã»å
±åã倫婊ã®å¢å ãªã©ãæããããŸãããã®ãããåè²ãŠæ¯æŽãå¹
åºãè¡ãããããã«ãªããŸããã
乳幌å
å°çšä¿è²æã»å¹Œçšåã»èªå®ãã©ãåããããŸãããŸããå°èŠæš¡ä¿è²æœèšãäŒæ¥å
ä¿è²æããããŸããããã«ãåè²ãŠæ¯æŽã»ã³ã¿ãŒãå
ç«¥çžè«æãªã©ããããŸããåè²ãŠæ¯æŽã»ã³ã¿ãŒãå
ç«¥çžè«æã§ã¯ãåè²ãŠã«é¢ããçžè«ãåããããæ
å ±ãæäŸãããããŸããå¥åº·ãå®ãæœèšã«ã¯ãä¿å¥æãä¿å¥ã»ã³ã¿ãŒãç
é¢ãªã©ããããŸãããã®ã»ãã亀æµã®å ŽæãšããŠãå
童通ãå
ç«¥éåãäœãããŠããŸããã©ã®æœèšã§ããå°åã®äººãšã®æ¯ãåãã倧åã«ããŠããŸãã
åäŸã»åè²ãŠæ¯æŽæ°å¶åºŠã¯ã幌å
ææè²ã»ä¿è²ã»å°åã®åè²ãŠæ¯æŽã®éãšè³ªãåäžãããããã«å¶å®ãããŸãããåäŸã®æé·ãšåè²ãŠãæ¯æŽãããããèªå®åã©ãåã®æŽåãé²ããå°ååä¿è²ã®åµèšãªã©ã«åãçµã¿ãŸãã
èªå®ãã©ãåã¯ãå°±åŠåã®åäŸã«å¹Œå
æè²ãšä¿è²ã®äž¡æ¹ãæäŸããªãããå°åã®åè²ãŠæ¯æŽãè¡ãå Žæã§ãã幌ä¿é£æºåã»å¹Œçšååã»ä¿è²æåã»å°æ¹è£éåããããŸãã芪ãåããŠããŠããååã®å¯Ÿå¿æ¬¡ç¬¬ã§3æ³ãã5æ³ãŸã§ã®å
ç«¥ãå
¥æåºæ¥ãŸãã
ãã¡ããªãŒã»ãµããŒãã»ã»ã³ã¿ãŒã¯ãå°åäœæ°å士ã®åè²ãŠæ¯æŽãè¡ãå£äœã§ããè²å
ã®æ¯æŽãå¿
èŠãªæ¹ãè²å
ã®æ¯æŽãåžæãããæ¹ã¯ãã¡ããªãŒã»ãµããŒãã»ã»ã³ã¿ãŒã®äŒå¡ã«ãªããŸããäŒå¡ã¯ãã¡ããªãŒã»ãµããŒãã»ã»ã³ã¿ãŒãéããŠäºãã«å©ãåã£ãŠããŸãã
åäŸã®å¥åº·ã§å¹žããªæé·ãå¿æŽãã瀟äŒæœèšã¯æ°å€ããããŸããã©ã®ãããªå Žåã§ããå
ç«¥æ²ç« åæãå
ç«¥çŠç¥æ³ã®ç·åã®åºæ¬çãªæ±ºãŸãã«åŸã£ãŠåè²ãŠããªããã°ãªããŸããã
ãŸããå
ç«¥ã®æš©å©ã«é¢ããæ¡çŽã§ããåäŸã¯èªåãæããäžè©±ããã家åºã§æé·ããªããã°ãªããªããšå®ããããŠããŸãããããŠã家æãåè²ãŠã«æ©ãã§ãããã瀟äŒå
šäœãåäŸãšå®¶æãå©ããªããã°ãªããŸããã
å
ç«¥ã®æš©å©ã«é¢ããæ¡çŽã¯åœéé£åãäœãã54æ¡é
ãããªã£ãŠããŸããå
ç«¥ã®æš©å©æ¡çŽã¯ãåœå
å€é¢ä¿ãªã18æ³æªæºã®å
ç«¥ã®äººæš©ãå®ãã倧åã«ããããšããå
容ã§ãã人éã®çåœã倧åã«ããªãããæåãç掻ãç¹ã«å¹Žéœ¢ã«åã£ãéã³ãããæš©å©ã倧åã«ããªããã°ãªããŸãããæ¥æ¬ã§ã¯1994幎4æ22æ¥ã«æ¿èªãããŸããã
å
ç«¥æ²ç« ã¯ãåäŸã®æš©å©ãšå¹žããå®ãããããã«ããããã«å€§äººãããªããã°ãªããªãå
容ãå®ããŠããŸãã1951幎5æ5æ¥ã«æœè¡ãããŸããã
å
ç«¥çŠç¥æ³ã¯ãå
ç«¥ã«é¢ããå
šãŠã®å
容ãå«ãã éèŠãªæ³åŸã§ããå
šãŠã®åäŸã¯å
ç«¥çŠç¥æ³ã®ç·åã«æããããæš©å©ãæã£ãŠããŸãããŸããåäŸã®æé·ã«æã責任ãããã®ã¯ä¿è·è
ãšããããã®è²¬ä»»ã¯åœã»å°æ¹å
Œ
±å£äœã»ä¿è·è
ãå
šè²¬ä»»ãè² ããšãããŠããŸãã
åœéé£åå
ç«¥åºé(United Nations Children's Fund:UNICEF)ã¯ãæŠäºã§èŠããåäŸéãå©ããããã«ã1946幎ã«èšç«ãããŸãããåäŸã®æš©å©æ¡çŽã¯ã貧ããåäŸã飢ããåäŸãç
æ°ã®åäŸãå©ããããã«äœãããªããã°ãªããªãã®ããæããŠããŸãããŸãã女æ§ã®æš©å©æ¡å€§ãç®æããŠããŸãã
ä¹³å
æã®èµ€ã¡ããã¯æ³£ããŠã°ããã§äœãåºæ¥ãªãååšã ãšæã£ãŠããŸããã?ããããèµ€ã¡ããã¯æ³å以äžã«å€ãã®å
容ãæããã«ããŠããŸãã
ãããŸã§ã®æµããèŠãŠã¿ãŸãããããŸããèµ€ã¡ããã®ãã°ã«ããããã£ãšè¿ãã§èŠãŠã¿ãŸãããã
èµ€ã¡ããã®é¢åãèŠã芪ã¯ãèµ€ã¡ããã®æ°æã¡ãåãã£ãŠãåªãããäžå¯§ã«æ¥ããŠãããªããã°ãªããŸããããã®ããã«ããåããããã¡ã«äººãä¿¡é Œåºæ¥ãããã«ãªãããã®ä¿¡é Œãå
ã«äžã®äžããã倧ããèŠããããã«ãªããŸãã
äœã®70~80%ã¯æ°Žåã§åºæ¥ãŠããŸãããã®ããèµ€ã¡ããã®èããšãŠãè¥ãèŠããŸããéåžžãé ã¯èžãã倧ããã足ã¯æ²ãã£ãŠããããè
¹ã¯èšããã§ããŸãã
èªåã®åšå²ã«ããç©ã倧人ã®è©±ã声ãªã©ã®ããã«ãå€ããã®åºæ¿ã¯å
šãŠèµ€ã¡ããã«ãšã£ãŠåããŠãªã®ã§ãåŠã¶æ©äŒã«ãªããŸãããã®ãããæŸãã ç®ãšå¿ã§ãã£ãããšèŠãŠããŸãããã®ããã«ã倧人ã®åœ±é¿ãç掻ç°å¢ã¯ãšãŠãéèŠã§ãèµ€ã¡ããã«å€§ããªåœ±é¿ãäžããŸãã
èµ€ã¡ããã¯è©±ããªãã®ã§ãæ³£ããªããæ°æã¡ãäŒããã®ãäžå¿ã§ããç²ããŠããããåãæžããŠããããã³ã£ããããæãæ³£ããªããæ§åãèŠããããã«ããŠããŸãã
ãæ¯ããã®ãè
¹ã®äžã®æž©åºŠã¯å€ãããŸãããããããçãŸãããšæž©åºŠãå€ãããŸããèµ€ã¡ããã¯ãã®ãããªå€åãå
šèº«ã§åãããããæ°æž©ãäžãããšäœæž©ãäžãããŸãããã®ããã颚éªãåŒãããç±ãåºããããããããªããŸããããããããããçµéšãããèªåã®äœã®åããå°ããã€å€ããããããã«ãªããŸãã
èµ€ã¡ããã®äœã®æºåãæŽããèªç«åºæ¥ããã«ãªã£ãããç«ã¡äžããããã«æ瀺ãåºããªããŠãæ§ããŸãããç§éãšåãããã«ãèµ€ã¡ããããšãããããã£ãŠã¿ãå€ã€ããã®ãã³ãã¿ã€ããæ
éã¿ã€ããããŸãããã®ãããèµ€ã¡ããã1人ã§ç«ãŠãããã«ãªãææãæ¡ä»¶ã¯æ§ã
ã§ãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "åäŸãè²ã€å ŽæãšããŠã家åºãããã«éèŠããç解ããŸãããã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "家æå
šäœã®ç«å ŽããåäŸã«ã€ããŠèãã話ããŸãããã",
"title": ""
},
{
"paragraph_id": 2,
"tag": "p",
"text": "家æã¯ãåäŸãèªç«ãã瀟äŒäººãšãªãããã«å€§åãªåœ¹å²ãæ
ã£ãŠããŸãããã®çç±ãšããŠæ¬¡ã®2ã€ãæããããŸãã",
"title": "åäŸãšå®¶æ"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "ãããã£ãŠã家æã¯åäŸã«ãšã£ãŠæ¬ ãããªãã®ã§ãã©ã®ãããªæ°æã¡ã§åäŸãšåãåã£ãŠãããããåäŸã®æé·ã«å€§ãã圱é¿ããŸãããŸããåäŸãæã€ãšã家æãç©ããã«ãªããªã©ãæ§ã
ãªå¹æããããŸãã",
"title": "åäŸãšå®¶æ"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "èªå·±è¯å®æãšã¯ãèªåã¯å€§åãªååšã ãããåšãã®äººããèªããŠããããããšæãæ°æã¡ã§ããèªå·±è¯å®æã¯ãèªåãããæããåé¡ãä¹ãè¶ããä»äººãæãããããã®åå°ãšãªããŸãã",
"title": "åäŸãšå®¶æ"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "芪ãããé¢çœãã£ããããæãã£ããããšèšãããŠãå®å¿ããçµéšã¯ãããŸããã?åäŸã¯ãèªåã®æ©ã¿ãå¿é
äºãåãå
¥ããããå¿æŽããã人ããæããã倧åã«ããããšã幞ãã«ãªããŸãã",
"title": "家æãšã®ä¿¡é Œé¢ä¿"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "家æã身è¿ãªäººãä¿¡é Œåºæ¥ãç°å¢ãåäŸã®æé·ã«æ¬ ãããŸããããŸããä¿¡é Œãã人ã®èšèãè¡åãç䌌ãããããã®äººãå¿æŽããåšå²ã®äººãšé¢ãããªãããåäŸã¯æé·ããŠãããŸããåäŸã®å¥ãããªæé·ã«ã¯ã家æã®äžã§ä¿¡é Œé¢ä¿ãç¯ããææ
ã泚ããªããã°ãªããŸããã",
"title": "家æãšã®ä¿¡é Œé¢ä¿"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "äžåŠçã®çããã¯ããã®ãããªçµéšãçµãŠãããã«äžçãåºããæ§ã
ãªäººãšã®é¢ãããæã€ããã«ãªã£ãŠããã§ããããããããåºäŒã人ãšä¿¡é Œé¢ä¿ãç¯ããŠãããŸãããã",
"title": "家æãšã®ä¿¡é Œé¢ä¿"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "â»ä»¥äžã®é
ç®ã¯ãé«æ ¡çã®å®¶åºç§ã§ç¿ããŸãããäžåŠæ ¡ã®å®¶åºç§æç§æžã«ãèšèŒãããŠããã®ã§ã解説ããŸãã",
"title": "家æãšã®ä¿¡é Œé¢ä¿"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "æè¿ãåè²ãŠæ¯æŽãå¿
èŠãšãã人ãå¢ããŠããŸãããã®çç±ãšããŠãå°ååã»å®¶ææ§æã®å€åã»éœåžåã»å
±åã倫婊ã®å¢å ãªã©ãæããããŸãããã®ãããåè²ãŠæ¯æŽãå¹
åºãè¡ãããããã«ãªããŸããã",
"title": "åè²ãŠããããçŸç¶"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "乳幌å
å°çšä¿è²æã»å¹Œçšåã»èªå®ãã©ãåããããŸãããŸããå°èŠæš¡ä¿è²æœèšãäŒæ¥å
ä¿è²æããããŸããããã«ãåè²ãŠæ¯æŽã»ã³ã¿ãŒãå
ç«¥çžè«æãªã©ããããŸããåè²ãŠæ¯æŽã»ã³ã¿ãŒãå
ç«¥çžè«æã§ã¯ãåè²ãŠã«é¢ããçžè«ãåããããæ
å ±ãæäŸãããããŸããå¥åº·ãå®ãæœèšã«ã¯ãä¿å¥æãä¿å¥ã»ã³ã¿ãŒãç
é¢ãªã©ããããŸãããã®ã»ãã亀æµã®å ŽæãšããŠãå
童通ãå
ç«¥éåãäœãããŠããŸããã©ã®æœèšã§ããå°åã®äººãšã®æ¯ãåãã倧åã«ããŠããŸãã",
"title": "åè²ãŠããããçŸç¶"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "åäŸã»åè²ãŠæ¯æŽæ°å¶åºŠã¯ã幌å
ææè²ã»ä¿è²ã»å°åã®åè²ãŠæ¯æŽã®éãšè³ªãåäžãããããã«å¶å®ãããŸãããåäŸã®æé·ãšåè²ãŠãæ¯æŽãããããèªå®åã©ãåã®æŽåãé²ããå°ååä¿è²ã®åµèšãªã©ã«åãçµã¿ãŸãã",
"title": "åè²ãŠããããçŸç¶"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "èªå®ãã©ãåã¯ãå°±åŠåã®åäŸã«å¹Œå
æè²ãšä¿è²ã®äž¡æ¹ãæäŸããªãããå°åã®åè²ãŠæ¯æŽãè¡ãå Žæã§ãã幌ä¿é£æºåã»å¹Œçšååã»ä¿è²æåã»å°æ¹è£éåããããŸãã芪ãåããŠããŠããååã®å¯Ÿå¿æ¬¡ç¬¬ã§3æ³ãã5æ³ãŸã§ã®å
ç«¥ãå
¥æåºæ¥ãŸãã",
"title": "åè²ãŠããããçŸç¶"
},
{
"paragraph_id": 13,
"tag": "p",
"text": "ãã¡ããªãŒã»ãµããŒãã»ã»ã³ã¿ãŒã¯ãå°åäœæ°å士ã®åè²ãŠæ¯æŽãè¡ãå£äœã§ããè²å
ã®æ¯æŽãå¿
èŠãªæ¹ãè²å
ã®æ¯æŽãåžæãããæ¹ã¯ãã¡ããªãŒã»ãµããŒãã»ã»ã³ã¿ãŒã®äŒå¡ã«ãªããŸããäŒå¡ã¯ãã¡ããªãŒã»ãµããŒãã»ã»ã³ã¿ãŒãéããŠäºãã«å©ãåã£ãŠããŸãã",
"title": "åè²ãŠããããçŸç¶"
},
{
"paragraph_id": 14,
"tag": "p",
"text": "åäŸã®å¥åº·ã§å¹žããªæé·ãå¿æŽãã瀟äŒæœèšã¯æ°å€ããããŸããã©ã®ãããªå Žåã§ããå
ç«¥æ²ç« åæãå
ç«¥çŠç¥æ³ã®ç·åã®åºæ¬çãªæ±ºãŸãã«åŸã£ãŠåè²ãŠããªããã°ãªããŸããã",
"title": "åäŸãå®ãæ¡çŽãæ³åŸ"
},
{
"paragraph_id": 15,
"tag": "p",
"text": "ãŸããå
ç«¥ã®æš©å©ã«é¢ããæ¡çŽã§ããåäŸã¯èªåãæããäžè©±ããã家åºã§æé·ããªããã°ãªããªããšå®ããããŠããŸãããããŠã家æãåè²ãŠã«æ©ãã§ãããã瀟äŒå
šäœãåäŸãšå®¶æãå©ããªããã°ãªããŸããã",
"title": "åäŸãå®ãæ¡çŽãæ³åŸ"
},
{
"paragraph_id": 16,
"tag": "p",
"text": "å
ç«¥ã®æš©å©ã«é¢ããæ¡çŽã¯åœéé£åãäœãã54æ¡é
ãããªã£ãŠããŸããå
ç«¥ã®æš©å©æ¡çŽã¯ãåœå
å€é¢ä¿ãªã18æ³æªæºã®å
ç«¥ã®äººæš©ãå®ãã倧åã«ããããšããå
容ã§ãã人éã®çåœã倧åã«ããªãããæåãç掻ãç¹ã«å¹Žéœ¢ã«åã£ãéã³ãããæš©å©ã倧åã«ããªããã°ãªããŸãããæ¥æ¬ã§ã¯1994幎4æ22æ¥ã«æ¿èªãããŸããã",
"title": "åäŸãå®ãæ¡çŽãæ³åŸ"
},
{
"paragraph_id": 17,
"tag": "p",
"text": "å
ç«¥æ²ç« ã¯ãåäŸã®æš©å©ãšå¹žããå®ãããããã«ããããã«å€§äººãããªããã°ãªããªãå
容ãå®ããŠããŸãã1951幎5æ5æ¥ã«æœè¡ãããŸããã",
"title": "åäŸãå®ãæ¡çŽãæ³åŸ"
},
{
"paragraph_id": 18,
"tag": "p",
"text": "å
ç«¥çŠç¥æ³ã¯ãå
ç«¥ã«é¢ããå
šãŠã®å
容ãå«ãã éèŠãªæ³åŸã§ããå
šãŠã®åäŸã¯å
ç«¥çŠç¥æ³ã®ç·åã«æããããæš©å©ãæã£ãŠããŸãããŸããåäŸã®æé·ã«æã責任ãããã®ã¯ä¿è·è
ãšããããã®è²¬ä»»ã¯åœã»å°æ¹å
Œ
±å£äœã»ä¿è·è
ãå
šè²¬ä»»ãè² ããšãããŠããŸãã",
"title": "åäŸãå®ãæ¡çŽãæ³åŸ"
},
{
"paragraph_id": 19,
"tag": "p",
"text": "",
"title": "åäŸãå®ãæ¡çŽãæ³åŸ"
},
{
"paragraph_id": 20,
"tag": "p",
"text": "åœéé£åå
ç«¥åºé(United Nations Children's Fund:UNICEF)ã¯ãæŠäºã§èŠããåäŸéãå©ããããã«ã1946幎ã«èšç«ãããŸãããåäŸã®æš©å©æ¡çŽã¯ã貧ããåäŸã飢ããåäŸãç
æ°ã®åäŸãå©ããããã«äœãããªããã°ãªããªãã®ããæããŠããŸãããŸãã女æ§ã®æš©å©æ¡å€§ãç®æããŠããŸãã",
"title": "ãŠãã»ãã®æŽ»å"
},
{
"paragraph_id": 21,
"tag": "p",
"text": "ä¹³å
æã®èµ€ã¡ããã¯æ³£ããŠã°ããã§äœãåºæ¥ãªãååšã ãšæã£ãŠããŸããã?ããããèµ€ã¡ããã¯æ³å以äžã«å€ãã®å
容ãæããã«ããŠããŸãã",
"title": "èµ€ã¡ããïœäººéã®è²ã¡ã®å§ãŸãïœ"
},
{
"paragraph_id": 22,
"tag": "p",
"text": "ãããŸã§ã®æµããèŠãŠã¿ãŸãããããŸããèµ€ã¡ããã®ãã°ã«ããããã£ãšè¿ãã§èŠãŠã¿ãŸãããã",
"title": "èµ€ã¡ããïœäººéã®è²ã¡ã®å§ãŸãïœ"
},
{
"paragraph_id": 23,
"tag": "p",
"text": "èµ€ã¡ããã®é¢åãèŠã芪ã¯ãèµ€ã¡ããã®æ°æã¡ãåãã£ãŠãåªãããäžå¯§ã«æ¥ããŠãããªããã°ãªããŸããããã®ããã«ããåããããã¡ã«äººãä¿¡é Œåºæ¥ãããã«ãªãããã®ä¿¡é Œãå
ã«äžã®äžããã倧ããèŠããããã«ãªããŸãã",
"title": "èµ€ã¡ããïœäººéã®è²ã¡ã®å§ãŸãïœ"
},
{
"paragraph_id": 24,
"tag": "p",
"text": "äœã®70~80%ã¯æ°Žåã§åºæ¥ãŠããŸãããã®ããèµ€ã¡ããã®èããšãŠãè¥ãèŠããŸããéåžžãé ã¯èžãã倧ããã足ã¯æ²ãã£ãŠããããè
¹ã¯èšããã§ããŸãã",
"title": "èµ€ã¡ããïœäººéã®è²ã¡ã®å§ãŸãïœ"
},
{
"paragraph_id": 25,
"tag": "p",
"text": "èªåã®åšå²ã«ããç©ã倧人ã®è©±ã声ãªã©ã®ããã«ãå€ããã®åºæ¿ã¯å
šãŠèµ€ã¡ããã«ãšã£ãŠåããŠãªã®ã§ãåŠã¶æ©äŒã«ãªããŸãããã®ãããæŸãã ç®ãšå¿ã§ãã£ãããšèŠãŠããŸãããã®ããã«ã倧人ã®åœ±é¿ãç掻ç°å¢ã¯ãšãŠãéèŠã§ãèµ€ã¡ããã«å€§ããªåœ±é¿ãäžããŸãã",
"title": "èµ€ã¡ããïœäººéã®è²ã¡ã®å§ãŸãïœ"
},
{
"paragraph_id": 26,
"tag": "p",
"text": "èµ€ã¡ããã¯è©±ããªãã®ã§ãæ³£ããªããæ°æã¡ãäŒããã®ãäžå¿ã§ããç²ããŠããããåãæžããŠããããã³ã£ããããæãæ³£ããªããæ§åãèŠããããã«ããŠããŸãã",
"title": "èµ€ã¡ããïœäººéã®è²ã¡ã®å§ãŸãïœ"
},
{
"paragraph_id": 27,
"tag": "p",
"text": "ãæ¯ããã®ãè
¹ã®äžã®æž©åºŠã¯å€ãããŸãããããããçãŸãããšæž©åºŠãå€ãããŸããèµ€ã¡ããã¯ãã®ãããªå€åãå
šèº«ã§åãããããæ°æž©ãäžãããšäœæž©ãäžãããŸãããã®ããã颚éªãåŒãããç±ãåºããããããããªããŸããããããããããçµéšãããèªåã®äœã®åããå°ããã€å€ããããããã«ãªããŸãã",
"title": "èµ€ã¡ããïœäººéã®è²ã¡ã®å§ãŸãïœ"
},
{
"paragraph_id": 28,
"tag": "p",
"text": "èµ€ã¡ããã®äœã®æºåãæŽããèªç«åºæ¥ããã«ãªã£ãããç«ã¡äžããããã«æ瀺ãåºããªããŠãæ§ããŸãããç§éãšåãããã«ãèµ€ã¡ããããšãããããã£ãŠã¿ãå€ã€ããã®ãã³ãã¿ã€ããæ
éã¿ã€ããããŸãããã®ãããèµ€ã¡ããã1人ã§ç«ãŠãããã«ãªãææãæ¡ä»¶ã¯æ§ã
ã§ãã",
"title": "èµ€ã¡ããïœäººéã®è²ã¡ã®å§ãŸãïœ"
}
] | åäŸãè²ã€å ŽæãšããŠã家åºãããã«éèŠããç解ããŸãããã 家æå
šäœã®ç«å ŽããåäŸã«ã€ããŠèãã話ããŸãããã | [[å°åŠæ ¡ã»äžåŠæ ¡ã»é«çåŠæ ¡ã®åŠç¿]]>[[äžåŠæ ¡ã®åŠç¿]]>[[äžåŠæ ¡å®¶åº]]>åã©ãã«ãšã£ãŠã®å®¶æ
åäŸãè²ã€å ŽæãšããŠã家åºãããã«éèŠããç解ããŸãããã
家æå
šäœã®ç«å ŽããåäŸã«ã€ããŠèãã話ããŸãããã
== åäŸãšå®¶æ ==
家æã¯ãåäŸãèªç«ãã瀟äŒäººãšãªãããã«å€§åãªåœ¹å²ãæ
ã£ãŠããŸãããã®çç±ãšããŠæ¬¡ã®ïŒã€ãæããããŸãã
* åäŸã®å°æ¥åãæããé¢åãèŠãªãããææ
ãæ¯ããããç掻ç¿æ
£ãæããäžã§ã粟ç¥ãè²ãŠãããã§ãã
* 家æã¯åäŸãç
æ°ãæªæãããªãããã«æ°ã䜿ããªããã°ãªããªãããã§ãã
ãããã£ãŠã家æã¯åäŸã«ãšã£ãŠæ¬ ãããªãã®ã§ãã©ã®ãããªæ°æã¡ã§åäŸãšåãåã£ãŠãããããåäŸã®æé·ã«å€§ãã圱é¿ããŸãããŸããåäŸãæã€ãšã家æãç©ããã«ãªããªã©ãæ§ã
ãªå¹æããããŸãã
èªå·±è¯å®æãšã¯ãèªåã¯å€§åãªååšã ãããåšãã®äººããèªããŠããããããšæãæ°æã¡ã§ããèªå·±è¯å®æã¯ãèªåãããæããåé¡ãä¹ãè¶ããä»äººãæãããããã®åå°ãšãªããŸãã
== 家æãšã®ä¿¡é Œé¢ä¿ ==
芪ãããé¢çœãã£ããããæãã£ããããšèšãããŠãå®å¿ããçµéšã¯ãããŸãããïŒåäŸã¯ãèªåã®æ©ã¿ãå¿é
äºãåãå
¥ããããå¿æŽããã人ããæããã倧åã«ããããšã幞ãã«ãªããŸãã
家æã身è¿ãªäººãä¿¡é Œåºæ¥ãç°å¢ãåäŸã®æé·ã«æ¬ ãããŸããããŸããä¿¡é Œãã人ã®èšèãè¡åãç䌌ãããããã®äººãå¿æŽããåšå²ã®äººãšé¢ãããªãããåäŸã¯æé·ããŠãããŸããåäŸã®å¥ãããªæé·ã«ã¯ã家æã®äžã§'''ä¿¡é Œé¢ä¿'''ãç¯ããææ
ã泚ããªããã°ãªããŸããã
äžåŠçã®çããã¯ããã®ãããªçµéšãçµãŠãããã«äžçãåºããæ§ã
ãªäººãšã®é¢ãããæã€ããã«ãªã£ãŠããã§ããããããããåºäŒã人ãšä¿¡é Œé¢ä¿ãç¯ããŠãããŸãããã{{ã³ã©ã |ããªãã¯ã¿ããªã®å®ç©ïŒåéäºåžåããïŒ|äžåŠçã®çããã¯ã家æã身è¿ãªäººã®äžã§èŒããŠããŸããå°ãããŠã©ããããããªãåœããã家æã身è¿ãªäººã倧åã«ææ
ãæã£ãŠè²ãŠãŠããŸãããæ°ããåºäŒããèªåã§èããŠè¡ååºæ¥ãããã«ãªããæé·ããŠãã姿ãèŠãŠã家æã身è¿ãªäººãåãã§ãããããããŸãããçããã¯ã家æã身è¿ãªäººã ãã§ã¯ãªããå°æ¥ã®ç€ŸäŒãæ¯ããååšã§ããä»åŸãå€ãã®åºäŒããããªããæé·ãããŠããããšæããŸãã家æã®æ¯ãããã£ãããäžåŠçã«ãªããããã«ã倧人ã«ãªã£ãŠããèªåäžäººã§ã¯çããŠãããŸãããçžæãçããŠããããã«å¿
èŠã§ããçããã幎霢ãéãããã家æã倧åã«ããã®ãšåãããã«ãåºäŒã人ã倧åã«ããŠãã ããã}}
â»ä»¥äžã®é
ç®ã¯ãé«æ ¡çã®å®¶åºç§ã§ç¿ããŸãããäžåŠæ ¡ã®å®¶åºç§æç§æžã«ãèšèŒãããŠããã®ã§ã解説ããŸãã
== åè²ãŠããããçŸç¶ ==
æè¿ãåè²ãŠæ¯æŽãå¿
èŠãšãã人ãå¢ããŠããŸãããã®çç±ãšããŠãå°ååã»å®¶ææ§æã®å€åã»éœåžåã»å
±åã倫婊ã®å¢å ãªã©ãæããããŸãããã®ãããåè²ãŠæ¯æŽãå¹
åºãè¡ãããããã«ãªããŸããã
乳幌å
å°çšä¿è²æã»å¹Œçšåã»[https://www8.cao.go.jp/shoushi/kodomoen/gaiyou.html èªå®ãã©ãå]ããããŸãããŸããå°èŠæš¡ä¿è²æœèšãäŒæ¥å
ä¿è²æããããŸããããã«ãåè²ãŠæ¯æŽã»ã³ã¿ãŒãå
ç«¥çžè«æãªã©ããããŸããåè²ãŠæ¯æŽã»ã³ã¿ãŒãå
ç«¥çžè«æã§ã¯ãåè²ãŠã«é¢ããçžè«ãåããããæ
å ±ãæäŸãããããŸããå¥åº·ãå®ãæœèšã«ã¯ãä¿å¥æãä¿å¥ã»ã³ã¿ãŒãç
é¢ãªã©ããããŸãããã®ã»ãã亀æµã®å ŽæãšããŠãå
童通ãå
ç«¥éåãäœãããŠããŸããã©ã®æœèšã§ããå°åã®äººãšã®æ¯ãåãã倧åã«ããŠããŸãã
[https://www8.cao.go.jp/shoushi/shinseido/ åäŸã»åè²ãŠæ¯æŽæ°å¶åºŠ]ã¯ã幌å
ææè²ã»ä¿è²ã»å°åã®åè²ãŠæ¯æŽã®éãšè³ªãåäžãããããã«å¶å®ãããŸãããåäŸã®æé·ãšåè²ãŠãæ¯æŽãããããèªå®åã©ãåã®æŽåãé²ããå°ååä¿è²ã®åµèšãªã©ã«åãçµã¿ãŸãã
èªå®ãã©ãåã¯ãå°±åŠåã®åäŸã«å¹Œå
æè²ãšä¿è²ã®äž¡æ¹ãæäŸããªãããå°åã®åè²ãŠæ¯æŽãè¡ãå Žæã§ãã幌ä¿é£æºåã»å¹Œçšååã»ä¿è²æåã»å°æ¹è£éåããããŸãã芪ãåããŠããŠããååã®å¯Ÿå¿æ¬¡ç¬¬ã§ïŒæ³ããïŒæ³ãŸã§ã®å
ç«¥ãå
¥æåºæ¥ãŸãã
=== ãã¡ããªãŒã»ãµããŒãã»ã»ã³ã¿ãŒ ===
[https://www.cfa.go.jp/assets/contents/node/basic_page/field_ref_resources/e18b0699-53bd-4d02-bd42-f7ebb30c362b/37a4ffe3/20230401_policies_kosodateshien_family-support_03.pdf ãã¡ããªãŒã»ãµããŒãã»ã»ã³ã¿ãŒ]ã¯ãå°åäœæ°å士ã®åè²ãŠæ¯æŽãè¡ãå£äœã§ããè²å
ã®æ¯æŽãå¿
èŠãªæ¹ãè²å
ã®æ¯æŽãåžæãããæ¹ã¯ãã¡ããªãŒã»ãµããŒãã»ã»ã³ã¿ãŒã®äŒå¡ã«ãªããŸããäŒå¡ã¯ãã¡ããªãŒã»ãµããŒãã»ã»ã³ã¿ãŒãéããŠäºãã«å©ãåã£ãŠããŸãã
== åäŸãå®ãæ¡çŽãæ³åŸ ==
åäŸã®å¥åº·ã§å¹žããªæé·ãå¿æŽãã瀟äŒæœèšã¯æ°å€ããããŸããã©ã®ãããªå Žåã§ããå
ç«¥æ²ç« åæãå
ç«¥çŠç¥æ³ã®ç·åã®åºæ¬çãªæ±ºãŸãã«åŸã£ãŠåè²ãŠããªããã°ãªããŸããã
ãŸããå
ç«¥ã®æš©å©ã«é¢ããæ¡çŽã§ããåäŸã¯èªåãæããäžè©±ããã家åºã§æé·ããªããã°ãªããªããšå®ããããŠããŸãããããŠã家æãåè²ãŠã«æ©ãã§ãããã瀟äŒå
šäœãåäŸãšå®¶æãå©ããªããã°ãªããŸããã
=== å
ç«¥ã®æš©å©ã«é¢ããæ¡çŽïŒåäŸã®æš©å©æ¡çŽïŒ ===
[[ãã¡ã€ã«:ïŒã€ã®æš©å©.jpg|ãµã ãã€ã«|461x461ãã¯ã»ã«|ãåäŸã®æš©å©æ¡çŽãã«ç€ºãããïŒã€ã®æš©å©]]
å
ç«¥ã®æš©å©ã«é¢ããæ¡çŽã¯åœéé£åãäœããïŒïŒæ¡é
ãããªã£ãŠããŸããå
ç«¥ã®æš©å©æ¡çŽã¯ãåœå
å€é¢ä¿ãªãïŒïŒæ³æªæºã®å
ç«¥ã®äººæš©ãå®ãã倧åã«ããããšããå
容ã§ãã人éã®çåœã倧åã«ããªãããæåãç掻ãç¹ã«å¹Žéœ¢ã«åã£ãéã³ãããæš©å©ã倧åã«ããªããã°ãªããŸãããæ¥æ¬ã§ã¯ïŒïŒïŒïŒå¹ŽïŒæïŒïŒæ¥ã«æ¿èªãããŸããã
{| class="wikitable"
!å
ç«¥æ²ç« ãåæ
|-
|å
ç«¥ã¯äººéãšããŠã®æ¬æ¥ã®å§¿ã倧åã«ãããŸãã
å
ç«¥ã¯ç€ŸäŒã®äžã§è²Žéãªååšã§ãã
å
ç«¥ã¯å®å
šã§å¥åº·ãªç°å¢ã§è²ãŠãããŸãã
|}
å
ç«¥æ²ç« ã¯ãåäŸã®æš©å©ãšå¹žããå®ãããããã«ããããã«å€§äººãããªããã°ãªããªãå
容ãå®ããŠããŸããïŒïŒïŒïŒå¹ŽïŒæïŒæ¥ã«æœè¡ãããŸããã
{| class="wikitable"
!å
ç«¥çŠç¥æ³ãç·åã第ïŒæ¡
|-
|å
ç«¥ã®æš©å©ã«é¢ããæ¡çŽã®ç²Ÿç¥ã«åºã¥ããŠãå
šãŠã®å
ç«¥ã¯ãããããçŠç¥ãçããä¿éãããæš©å©ãæã£ãŠããŸããäŸãã°ãå¿
èŠãªé€è²ãåããæš©å©ã»ç掻ãä¿éãããæš©å©ã»æããä¿è·ãããæš©å©ã»ç²Ÿç¥ãšèº«äœãå¥ããã«æé·ããçºéãããæš©å©ã»èªå·±ã®äžè©±ãããæš©å©ãªã©ã§ãã
|}
å
ç«¥çŠç¥æ³ã¯ãå
ç«¥ã«é¢ããå
šãŠã®å
容ãå«ãã éèŠãªæ³åŸã§ããå
šãŠã®åäŸã¯å
ç«¥çŠç¥æ³ã®ç·åã«æããããæš©å©ãæã£ãŠããŸãããŸããåäŸã®æé·ã«æã責任ãããã®ã¯ä¿è·è
ãšããããã®è²¬ä»»ã¯åœã»å°æ¹å
Œ
±å£äœã»ä¿è·è
ãå
šè²¬ä»»ãè² ããšãããŠããŸãã
:ïŒâ» å
¬æ°ã®ç¯å²ïŒæ¥æ¬ã§ã¯2022幎ããåã©ãåºæ¬æ³ããå¶å®ãããŸãã<ref>[https://www.tokyo-shoseki.co.jp/img/text/information-j/shakai-koumin/r4-5_j_koumin.pdf æ±äº¬æžç± èšæ£å
容äžèŠ§ æ°ãã瀟äŒãå
¬æ°ïŒä»€å3幎床çïŒ]</ref>ã
== ãŠãã»ãã®æŽ»å ==
[[w:åœéé£åå
ç«¥åºé|åœéé£åå
ç«¥åºé]]ïŒUnited Nations Children's FundïŒUNICEFïŒã¯ãæŠäºã§èŠããåäŸéãå©ããããã«ãïŒïŒïŒïŒå¹Žã«èšç«ãããŸãããåäŸã®æš©å©æ¡çŽã¯ã貧ããåäŸã飢ããåäŸãç
æ°ã®åäŸãå©ããããã«äœãããªããã°ãªããªãã®ããæããŠããŸãããŸãã女æ§ã®æš©å©æ¡å€§ãç®æããŠããŸãã
== èµ€ã¡ããïœäººéã®è²ã¡ã®å§ãŸãïœ ==
ä¹³å
æã®èµ€ã¡ããã¯æ³£ããŠã°ããã§äœãåºæ¥ãªãååšã ãšæã£ãŠããŸãããïŒããããèµ€ã¡ããã¯æ³å以äžã«å€ãã®å
容ãæããã«ããŠããŸãã
ãããŸã§ã®æµããèŠãŠã¿ãŸãããããŸããèµ€ã¡ããã®ãã°ã«ããããã£ãšè¿ãã§èŠãŠã¿ãŸãããã
èµ€ã¡ããã®é¢åãèŠã芪ã¯ãèµ€ã¡ããã®æ°æã¡ãåãã£ãŠãåªãããäžå¯§ã«æ¥ããŠãããªããã°ãªããŸããããã®ããã«ããåããããã¡ã«äººãä¿¡é Œåºæ¥ãããã«ãªãããã®ä¿¡é Œãå
ã«äžã®äžããã倧ããèŠããããã«ãªããŸãã
=== èµ€ã¡ããã£ãŠãããããã ===
äœã®ïŒïŒïœïŒïŒïŒ
ã¯æ°Žåã§åºæ¥ãŠããŸãããã®ããèµ€ã¡ããã®èããšãŠãè¥ãèŠããŸããéåžžãé ã¯èžãã倧ããã足ã¯æ²ãã£ãŠããããè
¹ã¯èšããã§ããŸãã
=== èµ€ã¡ããã£ãŠãç¥ãããã ===
èªåã®åšå²ã«ããç©ã倧人ã®è©±ã声ãªã©ã®ããã«ãå€ããã®åºæ¿ã¯å
šãŠèµ€ã¡ããã«ãšã£ãŠåããŠãªã®ã§ãåŠã¶æ©äŒã«ãªããŸãããã®ãããæŸãã ç®ãšå¿ã§ãã£ãããšèŠãŠããŸãããã®ããã«ã倧人ã®åœ±é¿ãç掻ç°å¢ã¯ãšãŠãéèŠã§ãèµ€ã¡ããã«å€§ããªåœ±é¿ãäžããŸãã
=== èµ€ã¡ããã£ãŠå
æ°äžæ¯ ===
èµ€ã¡ããã¯è©±ããªãã®ã§ãæ³£ããªããæ°æã¡ãäŒããã®ãäžå¿ã§ããç²ããŠããããåãæžããŠããããã³ã£ããããæãæ³£ããªããæ§åãèŠããããã«ããŠããŸãã
=== èµ€ã¡ããã£ãŠããããã ===
ãæ¯ããã®ãè
¹ã®äžã®æž©åºŠã¯å€ãããŸãããããããçãŸãããšæž©åºŠãå€ãããŸããèµ€ã¡ããã¯ãã®ãããªå€åãå
šèº«ã§åãããããæ°æž©ãäžãããšäœæž©ãäžãããŸãããã®ããã颚éªãåŒãããç±ãåºããããããããªããŸããããããããããçµéšãããèªåã®äœã®åããå°ããã€å€ããããããã«ãªããŸãã
=== èµ€ã¡ããã£ãŠäžæè° ===
èµ€ã¡ããã®äœã®æºåãæŽããèªç«åºæ¥ããã«ãªã£ãããç«ã¡äžããããã«æ瀺ãåºããªããŠãæ§ããŸãããç§éãšåãããã«ãèµ€ã¡ããããšãããããã£ãŠã¿ãå€ã€ããã®ãã³ãã¿ã€ããæ
éã¿ã€ããããŸãããã®ãããèµ€ã¡ãããïŒäººã§ç«ãŠãããã«ãªãææãæ¡ä»¶ã¯æ§ã
ã§ãã
[[ã«ããŽãª:äžåŠæ ¡å®¶åºç§]]
[[ã«ããŽãª:åäŸ]]
[[ã«ããŽãª:家æ]] | 2023-03-08T19:55:45Z | 2023-08-11T08:28:31Z | [
"ãã³ãã¬ãŒã:ã³ã©ã "
] | https://ja.wikibooks.org/wiki/%E4%B8%AD%E5%AD%A6%E6%A0%A1%E5%AE%B6%E5%BA%AD/%E5%AD%90%E3%81%A9%E3%82%82%E3%81%AB%E3%81%A8%E3%81%A3%E3%81%A6%E3%81%AE%E5%AE%B6%E6%97%8F |
37,186 | ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒ | ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã¯ãã³ã³ãã¥ãŒã¿ãŒã®åºç€çãªä»çµã¿ãšèšèšã«é¢ããåéã§ãã ãã®åéã§ã¯ãã³ã³ãã¥ãŒã¿ãŒã®æ§æèŠçŽ ãããŒã¿ã®è¡šçŸæ¹æ³ãããã°ã©ãã³ã°èšèªãåœä»€ã»ããã¢ãŒããã¯ãã£ãŒ(ISA)ããã€ã¯ã¢ãŒããã¯ãã£ãŒããã€ãã©ã€ã³åŠçãã¡ã¢ãªãŒéå±€ãå
¥åºåã·ã¹ãã ã䞊ååŠçãããã³è€æ°ã®ããã»ããµãŒã«ãããã«ãããã»ãã·ã³ã°ã«é¢ãããããã¯ãæ±ããŸãã
æ¬æžã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã«é¢ããå¹
åºããããã¯ã網çŸ
ããããããç解ããããã«å¿
èŠãªåºç€ç¥èãæäŸããŸãããŸããæ¬æžã§ã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®èšèšãšå®è£
ã«é¢ããéèŠãªåé¡ã«çŠç¹ãåœãŠãææ°ã®æè¡ããã¬ã³ãã玹ä»ããŸãã
ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã¯ãã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®èšèšãšæ©èœã®æŠèŠãå®çŸ©ããåéã§ããã€ãŸããã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã¯ãã³ã³ãã¥ãŒã¿ãŒå
éšã§ããŒã¿ãã©ã®ããã«åŠçãããã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ãã©ã®ããã«æ©èœãããã«ã€ããŠãç©ççãªèŠ³ç¹ãã説æãããã®ã§ãã
ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã«ã¯ãããã»ããµãã¡ã¢ãªãŒãå
¥åºåããã€ã¹ãªã©ã®ã³ã³ããŒãã³ããå«ãŸããŸãããããã®ã³ã³ããŒãã³ãã¯ãããŒã¿ãåŠçããããã«å調ããŠåäœããŸãã
ãŸããã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã¯ããœãããŠã§ã¢ãšããŒããŠã§ã¢ã®çžäºäœçšã«ãéç¹ã眮ããŠããŸãããœãããŠã§ã¢ã¯ãã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®åäœãå¶åŸ¡ããããŒããŠã§ã¢ã¯ãœãããŠã§ã¢ã®èŠæ±ã«å¿ããŠãå¿
èŠãªæ©èœãæäŸããŸãã
ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®èšèšã«ã¯ãæ§èœãä¿¡é Œæ§ãã»ãã¥ãªãã£ãªã©ã®èŠçŽ ããããŸããæ§èœã«ã€ããŠã¯ãåŠçé床ãã¡ã¢ãªãŒã¢ã¯ã»ã¹é床ãå
¥åºåããã€ã¹ã®ã¹ã«ãŒããããªã©ãéèŠã§ããä¿¡é Œæ§ã«ã€ããŠã¯ãã·ã¹ãã ã®æ
éçãããã¯ã¢ããã·ã¹ãã ã®èšèšããšã©ãŒæ€åºãšä¿®æ£ã®æ¹æ³ãªã©ãèæ
®ãããŸããã»ãã¥ãªãã£ã«ã€ããŠã¯ãã·ã¹ãã ã®è匱æ§ãã¢ã¯ã»ã¹å¶åŸ¡ãããŒã¿ä¿è·ãªã©ãéèŠã§ãã
ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã¯ãã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®åºç€ã§ãããã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®æ§èœãæ©èœãæé©åããããã«éèŠã§ããã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®ç解ãæ·±ããããšã§ãé«éã§ä¿¡é Œæ§ã®é«ãã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ãèšèšããããšãã§ããŸãã
æ¬æžã§ã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®åºç€ãããé²åãå¿çšåéãŸã§ãåºç¯ãªç¯å²ãæ±ããŸããèªè
ã¯ãã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®æ§æèŠçŽ ãæ§èœææšãåœä»€ã»ããã¢ãŒããã¯ãã£ãŒãCPUã®æ§æãåäœãã¡ã¢ãªãŒãå
¥åºåã·ã¹ãã ã®æ§æãåäœããããŠã»ãã¥ãªãã£ãå¿çšåéã«ã€ããŠåŠã¶ããšãã§ããŸãã
ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ãšã¯ãæ
å ±åŠçãè¡ãããã«å¿
èŠãªããŒããŠã§ã¢ããœãããŠã§ã¢ããããã¯ãŒã¯ã人éãªã©ã®èŠçŽ ãçµã¿åããã£ãŠæ§æãããã·ã¹ãã ã®ããšã§ãããã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã¯ãå
¥åãåŠçãåºåã®3ã€ã®åºæ¬æ©èœãæã¡ããããã®æ©èœãå®çŸããããã«å¿
èŠãªæ§æèŠçŽ ãååšããã
ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã¯ã以äžã®ãããªæ§æèŠçŽ ããæ§æãããŠããã
ãããã®æ§æèŠçŽ ã¯å¯æ¥ã«é¢é£ããçžäºã«åœ±é¿ãåã£ãŠããã
ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã¯ãããŒããŠã§ã¢ãšãœãããŠã§ã¢ã®çµã¿åããã«ãã£ãŠæ§æãããŠããŸããããŒããŠã§ã¢ã¯ãäžå€®åŠçè£
眮(CPU)ãã¡ã¢ãªãå
¥åºå(I/O)æ©åšãªã©ãç©ççãªæ©åšãéšåã§æ§æãããŸããäžæ¹ããœãããŠã§ã¢ã¯ãããã°ã©ã ãããŒã¿ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãªã©ãã³ã³ãã¥ãŒã¿ãŒãå®è¡ããããã®åœä»€ãæ
å ±ã§ãã
ãœãããŠã§ã¢ã¯ãããŒããŠã§ã¢äžã§åäœããããã«å¿
èŠãªåœä»€ãå«ãã§ããŸãããããã®åœä»€ã¯ãCPUã«ãã£ãŠå®è¡ãããŸãããŸãããœãããŠã§ã¢ã¯ãããŒããŠã§ã¢ã«å¯ŸããŠãããŒã¿ã®èªã¿æžããå
¥åºåã®å¶åŸ¡ãªã©ã®æäœãæ瀺ããŸããããŒããŠã§ã¢ã¯ããœãããŠã§ã¢ã«ãã£ãŠå¶åŸ¡ãããããšã§ãã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã å
šäœãåäœããŸãã
ããŒããŠã§ã¢ãšãœãããŠã§ã¢ã¯ããäºãã«å¯æ¥ã«é¢é£ããŠããŸããããšãã°ããœãããŠã§ã¢ã¯ãCPUãã¡ã¢ãªãªã©ã®ããŒããŠã§ã¢è³æºãå¿
èŠãšããŸãããŸããããŒããŠã§ã¢ã®æ§èœã¯ããœãããŠã§ã¢ã®æ§èœã«åœ±é¿ãäžããŸããã€ãŸããããŒããŠã§ã¢ãšãœãããŠã§ã¢ã¯ãã·ã¹ãã å
šäœã®æ§èœã«åœ±é¿ãäžãããããäž¡æ¹ãæé©åããããšãéèŠã§ãã
ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®æ§èœã枬å®ããããã«ã¯ãæ§ã
ãªææšããããŸãã以äžã§ã¯ãäž»èŠãªæ§èœææšã«ã€ããŠèª¬æããŸãã
åœä»€ã»ããã¢ãŒããã¯ãã£ãŒã¯ãã³ã³ãã¥ãŒã¿ã®ããŒããŠã§ã¢ãšãœãããŠã§ã¢ã®äž¡æ¹ãèšèšããäžã§éèŠãªåœ¹å²ãæããã¢ãŒããã¯ãã£ãŒã®äžã€ã§ããåœä»€ã»ããã¢ãŒããã¯ãã£ãŒã¯ãããã»ããµãå®è¡ã§ããåœä»€ã®ã»ãããå®çŸ©ãããã®åœä»€ãã©ã®ããã«åŠçããããå®çŸ©ããŸãã
åœä»€ã»ããã®æŠèŠã§ã¯ãåœä»€ã»ããã¢ãŒããã¯ãã£ãŒã«é¢ããåºæ¬çãªæ
å ±ãæäŸããŸãããã®ç« ã§ã¯ãåœä»€ã»ããã®æŠèŠãåœä»€ã»ããã®éèŠãªæŠå¿µãåœä»€ã»ããã®çš®é¡ãããã³åœä»€ã»ããã®åºæ¬çãªæ©èœã«ã€ããŠèª¬æããŸãã
åœä»€ã®çš®é¡ãšãã©ãŒãããã§ã¯ãåœä»€ã»ããã¢ãŒããã¯ãã£ãŒã«ãããåœä»€ã®çš®é¡ãšãã®ãã©ãŒãããã«ã€ããŠè©³ãã説æããŸãããã®ç« ã§ã¯ãåœä»€ã®çš®é¡ãšããŠç®è¡ãè«çãæ¯èŒããžã£ã³ããªã©ãå«ãŸããŸãããŸããåœä»€ã®ãã©ãŒãããã«ã€ããŠã説æãããããã©ã®ããã«ããã»ããµã§å®è¡ããããã«ã€ããŠã説æããŸãããã®ç« ã§ã¯ãåœä»€ã®æå³ã䜿ãæ¹ãåœä»€ã®ãã€ãæ°ããªãã©ã³ãã®æ°ãããã³ãã®ãªãã©ã³ãã®åã«ã€ããŠã説æããŸãã
åœä»€ã»ãããšã¯ãã³ã³ãã¥ãŒã¿ããã€ã¯ãããã»ããµãå®è¡ã§ããåœä»€ã®éåã§ããã³ã³ãã¥ãŒã¿ããã€ã¯ãããã»ããµã¯ãããã°ã©ã ãå®è¡ãããéã«ãåœä»€ã»ããã«å«ãŸããåœä»€ã1ã€ãã€è§£éããŠå®è¡ããŸãã
åœä»€ã»ããã«ã¯ãç®è¡æŒç®ãè«çæŒç®ãã¡ã¢ãªã¢ã¯ã»ã¹ããžã£ã³ããªã©ã®åºæ¬çãªæäœãå«ãŸããŠããŸãããŸããåœä»€ã»ããã¯ãã³ã³ãã¥ãŒã¿ã®ã¢ãŒããã¯ãã£ã«ãã£ãŠç°ãªããŸããäŸãã°ãx86ã¢ãŒããã¯ãã£çšã®åœä»€ã»ããã¯ãARMã¢ãŒããã¯ãã£çšã®åœä»€ã»ãããšç°ãªããŸãã
åœä»€ã»ããã¯ãããã°ã©ããã³ã³ãã¥ãŒã¿ããã€ã¯ãããã»ããµã«å¯ŸããŠçŽæ¥æäœããããšãã§ããããã§ã¯ãããŸããããããã°ã©ãã³ã°èšèªãã³ã³ãã€ã©ãªã©ã®ãœãããŠã§ã¢ã«ãã£ãŠãåœä»€ã»ããã䜿çšããããã°ã©ãã³ã°ãå¯èœã«ãªããŸãã
åœä»€ã®çš®é¡ã¯ãã³ã³ãã¥ãŒã¿ã®ã¢ãŒããã¯ãã£ã«ãã£ãŠç°ãªããŸãããåºæ¬çã«ã¯ç®è¡åœä»€ãè«çåœä»€ããžã£ã³ãåœä»€ãåå²åœä»€ãããŒã¿è»¢éåœä»€ãªã©ããããŸããåœä»€ãã©ãŒãããã¯ãåœä»€ãè¡šãããã®ãããã®ãã¿ãŒã³ã§ããåœä»€ãã©ãŒãããã«ã¯ããªãã³ãŒã(æäœã³ãŒã)ããªãã©ã³ã(æäœå¯Ÿè±¡)ãªã©ãå«ãŸããŸããåœä»€ãã©ãŒãããã¯ãããã°ã©ã ãã³ã³ãã€ã«ãããšãã«äœ¿çšãããã³ã³ãã€ã©ã®éèŠãªèŠçŽ ã§ãããããã°ã©ã ã®å®è¡å¹çãé床ã«åœ±é¿ãäžããŸãã
äŸãã°ãX86ãšARMã¯ç°ãªãã¢ãŒããã¯ãã£ã§ãããåœä»€ã»ããã¢ãŒããã¯ãã£(ISA)ãç°ãªããããã ãŒãåœä»€ã®ããŒã¢ããã¯ãšãã€ããã©ãŒããããç°ãªããŸãã
以äžã«ããããã®ã¢ãŒããã¯ãã£ã«ãããã ãŒãåœä»€ã®äŸã瀺ããŸãã
X86ã®å Žåãã ãŒãåœä»€ã«ã¯MOVããããŸããäžè¬çãªMOVåœä»€ã®åœ¢åŒã¯ã以äžã®ããã«ãªããŸãã
destinationã«ã¯ã移åå
ã®ãªãã©ã³ããæå®ããŸããsourceã«ã¯ã移åå
ã®ãªãã©ã³ããæå®ããŸãã
äŸãã°ã以äžã®åœä»€ã¯ãã¬ãžã¹ã¿eaxã«å€0x1234ãããŒãããŸãã
ãã®åœä»€ã®ãã€ããã©ãŒãããã¯ã以äžã®éãã§ãã
ARMã®å Žåããã ãŒãåœä»€ã«ã¯MOVããããŸããARMã®MOVåœä»€ã¯ã以äžã®ããã«ãªããŸãã
destinationã«ã¯ã移åå
ã®ã¬ãžã¹ã¿ãæå®ããŸããsourceã«ã¯ã移åå
ã®ã¬ãžã¹ã¿ãŸãã¯å³å€ãæå®ããŸãã
äŸãã°ã以äžã®åœä»€ã¯ãã¬ãžã¹ã¿r0ã«å€0x1234ãããŒãããŸãã
ãã®åœä»€ã®ãã€ããã©ãŒãããã¯ã以äžã®éãã§ãã
åœä»€ã®å®è¡ãµã€ã¯ã«ãšå¶åŸ¡æ¹åŒã«ã€ããŠåŠã¶ããšã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®åºç€çãªæŠå¿µã®äžã€ã§ãããã®ãããã¯ã§ã¯ãããã»ããµãåœä»€ãå®è¡ããããã®ãµã€ã¯ã«ããå¶åŸ¡æ¹åŒã«ã€ããŠåŠã³ãŸãã
åœä»€ã®å®è¡ãµã€ã¯ã«ã¯ãåœä»€ãå®è¡ããããã«å¿
èŠãªæé ã®äžé£ã®ããšãæããŸããäžè¬çã«ãåœä»€å®è¡ãµã€ã¯ã«ã«ã¯ããã§ãã(åœä»€ã®ååŸ)ããã³ãŒã(åœä»€ã解èª)ãå®è¡(åœä»€ãå®è¡)ã®3ã€ã®æ®µéããããŸãããããã®ã¹ãããã¯ãããã»ããµãåœä»€ãå®è¡ããããã«å¿
èŠãªããã»ã¹ã§ãããããã»ããµå
ã®åéšåãæ£ç¢ºã«åæããŠåäœããå¿
èŠããããŸãã
å¶åŸ¡æ¹åŒã¯ãåœä»€ãå®è¡ããããã®ããã»ããµå
ã®åéšåã®åäœãå¶åŸ¡ããããã«äœ¿çšãããæ¹æ³ãæããŸããããã»ããµã®å¶åŸ¡æ¹åŒã«ã¯ããã€ã¯ãããã°ã©ã æ¹åŒãšããŒããŠã§ã¢æ¹åŒã®2ã€ããããŸãããã€ã¯ãããã°ã©ã æ¹åŒã¯ãåœä»€ã®å®è¡ã決å®ããããã«ãåœä»€ã»ããã¢ãŒããã¯ãã£ã®ãã€ã¯ãããã°ã©ã ã䜿çšããŸããäžæ¹ãããŒããŠã§ã¢æ¹åŒã¯ãå¶åŸ¡åè·¯ã«ãã£ãŠå®è¡ããããããããé«éãªå®è¡ãå¯èœã§ãã
ãã€ã¯ãã¢ãŒããã¯ãã£ãŒãšã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®èšèšã®ãã¡ãããã»ããµãŒã®å
éšæ§é ãæ©èœãå®çŸããããã®èšèšãæããŸããã€ãŸãããã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ãããã»ããµãŒã®åœä»€ã»ããã¢ãŒããã¯ãã£ãŒ(ISA)ãå®éã«å®è£
ããæ¹æ³ãå®çŸ©ãããã®ã§ãã
ãã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ãããã»ããµãŒã®åŠçèœåãæ¶è²»é»åãããã³ãã®ä»ã®ç¹æ§ã«åœ±é¿ãäžããŸãããããã£ãŠããã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ãããã»ããµãŒã®æ§èœãåäžãããããã«æé©åããããšãã§ããŸãã
ãã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ãããã€ãã®éšåã§æ§æãããŸããäŸãã°ãã¢ãã¬ã¹çæãŠããã(AGU)ã¯ãããã»ããµãŒãã¢ãã¬ã¹ãçæããããã®åè·¯ã§ãããæŒç®ãŠãããã¯ãç®è¡æŒç®ãè«çæŒç®ãå®è¡ããããã®åè·¯ã§ãããŸããã¬ãžã¹ã¿ãã¡ã€ã«ã¯ãããã»ããµãŒãããŒã¿ãä¿åããããã®åè·¯ã§ããããã£ãã·ã¥ã¯ãããã»ããµãŒããã䜿çšããããŒã¿ãé«éã«ã¢ã¯ã»ã¹ããããã®åè·¯ã§ãã
ãã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ãISAã«ãã£ãŠå®çŸ©ãããåœä»€ãå®è¡ããããã«ãåœä»€ãã³ãŒãåè·¯ã䜿çšããŸããåœä»€ãã³ãŒãåè·¯ã¯ãISAã§å®çŸ©ãããåœä»€ã解éãããããå®éã®ããã»ããµãŒåè·¯ã§å®è¡ããããã«å¿
èŠãªå¶åŸ¡ä¿¡å·ãçæããŸãã
ãã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ãããã»ããµãŒã®æ§èœãšæ¶è²»é»åã®äž¡æ¹ãæ¹åããããã«æé©åããããšãã§ããŸããäŸãã°ããã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ã䞊ååŠçã䜿çšããŠè€æ°ã®åœä»€ãåæã«å®è¡ããããšãã§ããŸãããŸãããã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ãããå¹ççãªãã£ãã·ã¥ããã€ãã©ã€ã³ãªã©ã®åè·¯ã䜿çšããŠãããã»ããµãŒã®æ§èœãåäžãããããšãã§ããŸãã
æè¿ã®ãã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ãçé»ååã泚ç®ãããŠããŸãããã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ãã¹ãªãŒãã¢ãŒããåçé»å§ã¹ã±ãŒãªã³ã°ãªã©ã®æè¡ã䜿çšããŠãããã»ããµãŒã®æ¶è²»é»åã®äœæžãå³ã£ãŠããŸãã
ãã€ã¯ãã³ãŒãã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã«ãããŠéåžžã«éèŠãªåœ¹å²ãæããæŠå¿µã®äžã€ã§ãããã€ã¯ãã³ãŒãã¯ãããã»ããµãåœä»€ãå®è¡ããããã®å
éšåäœã決å®ããããã®åœä»€ã»ããã§ãããäœã¬ãã«ã®åœä»€ãé«ã¬ãã«ã®åœä»€ã«å€æããããã«äœ¿çšãããŸãã
ãã€ã¯ãã³ãŒãã¯ãããã»ããµã®ããŒããŠã§ã¢ãšãœãããŠã§ã¢ã®äžéã«äœçœ®ããã¬ãã«ã§åäœããŸãããã€ã¯ãã³ãŒãã¯ãããã»ããµã®ååœä»€ã®åäœãå®çŸ©ããäžé£ã®ãã€ã¯ãåœä»€ã§æ§æãããŸãããããã®ãã€ã¯ãåœä»€ã¯ãåºæ¬çã«ã¯ãããã»ããµå
ã®ã¬ãžã¹ã¿ãŒãã¢ã«ãŽãªãºã ãªã©ã®èŠçŽ ãå¶åŸ¡ããããã®åœä»€ã§ãã
ãã€ã¯ãã³ãŒãã¯ãããã»ããµã®èšèšã«ãããŠå€ãã®å©ç¹ããããããŸããæãéèŠãªå©ç¹ã¯ããã€ã¯ãã³ãŒãã䜿çšããããšã§ãããã»ããµã®èšèšãç°¡ç¥åã§ããããšã§ããããã»ããµã®èšèšè
ã¯ãé«ã¬ãã«ã®åœä»€ãå®è¡ããããã«å¿
èŠãªãã¹ãŠã®äœã¬ãã«ã®åœä»€ãæžãå¿
èŠããªãã代ããã«ãã€ã¯ãã³ãŒãã«ãã£ãŠãããã®äœã¬ãã«ã®åœä»€ãå®è¡ããããšãã§ããŸãã
ãŸãããã€ã¯ãã³ãŒãã¯ãããã»ããµã®åœä»€ã»ãããå€æŽããããã«ã䜿çšã§ããŸããããã«ãããæ°ããåœä»€ã»ãããç°¡åã«è¿œå ããããšãã§ããããã»ããµã®æ©èœãæ¡åŒµããããšãã§ããŸãã
ãããããã€ã¯ãã³ãŒãã䜿çšããããšã«ã¯ããã€ãã®æ¬ ç¹ããããŸããæãéèŠãªæ¬ ç¹ã¯ããã€ã¯ãã³ãŒããåœä»€ã®å®è¡é床ã«åœ±é¿ãäžããå¯èœæ§ãããããšã§ãããã€ã¯ãã³ãŒãã®åŠçã«æéããããå Žåãããã»ããµã®æ§èœãäœäžããå¯èœæ§ããããŸãããã®ãããããã»ããµã®èšèšè
ã¯ããã€ã¯ãã³ãŒããå¹ççã«åŠçããããã«èšèšããå¿
èŠããããŸãã
CPUã¯ãå¶åŸ¡ãŠããããæŒç®ãŠããããã¬ãžã¹ã¿ããã¹ãã¯ããã¯ãªã©ã®æ§æèŠçŽ ã§æ§æãããŸããå¶åŸ¡ãŠãããã¯ãããã°ã©ã ã«ãŠã³ã¿ãã次ã®åœä»€ãåãåºããŠãåœä»€ã解èªããæŒç®ãŠãããã«åœä»€ãéä¿¡ãã圹å²ãæã¡ãŸããæŒç®ãŠãããã¯ãç®è¡æŒç®ãè«çæŒç®ãå®è¡ããçµæãã¬ãžã¹ã¿ã«ä¿åããŸããã¬ãžã¹ã¿ã¯ãCPUå
ã®äžæçãªèšæ¶è£
眮ã§ãããããŒã¿ãä¿æããããã«äœ¿çšãããŸãããã¹ã¯ãCPUãšä»ã®ã³ã³ããŒãã³ã(ã¡ã¢ãªãå
¥åºåè£
眮ãªã©)ã®éã§ããŒã¿ã転éããããã«äœ¿çšãããŸããã¯ããã¯ã¯ãCPUå
ã®åã³ã³ããŒãã³ããåæããŠåäœããããã«å¿
èŠãªã¿ã€ãã³ã°ä¿¡å·ãçæããŸãã
CPUã®åŠçé床ãåäžãããããã«ããã€ãã©ã€ã³åŠçãã¹ãŒããŒã¹ã«ã©ãŒåŠçã䜿çšãããŸãããã€ãã©ã€ã³åŠçã¯ãè€æ°ã®åœä»€ãåæã«å®è¡ããããšãã§ãããããCPUã®æ§èœãåäžãããããšãã§ããŸããã¹ãŒããŒã¹ã«ã©ãŒåŠçã¯ã1ã€ã®åœä»€ãè€æ°ã®æŒç®ãŠãããã§åæã«å®è¡ããããšãã§ãããããããé«éãªåŠçãå®çŸããããšãã§ããŸãã
ãã€ãã©ã€ã³åŠçã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã«ãããéèŠãªæŠå¿µã®1ã€ã§ãããè€æ°ã®åœä»€ãåæã«å®è¡ããããšã§åŠçé床ãé«éåããæ¹æ³ã§ãããã€ãã©ã€ã³åŠçã¯ãåœä»€ã®å®è¡ã«å¿
èŠãªã¹ããããè€æ°ã®æ®µéã«åå²ããåã¹ããããåæã«å®è¡ããããšã«ãã£ãŠå®çŸãããŸãã
ãã€ãã©ã€ã³åŠçã«ã¯ã以äžã®5ã€ã®æ®µéããããŸãã
åã¹ãããã¯ãåã®ã¹ããããå®äºãããšåæã«éå§ãããŸããã€ãŸããååŸã¹ããŒãžãå§ãŸããšåæã«ããã³ãŒãã¹ããŒãžãå§ãŸããŸããããã«ãããè€æ°ã®åœä»€ãåæã«åŠçããããããåŠçé床ãåäžããŸãã
ãã ãããã€ãã©ã€ã³åŠçã«ã¯ããã€ãã®èª²é¡ããããŸããäŸãã°ãåœä»€éã®äŸåé¢ä¿ãããå Žåã次ã®åœä»€ãå®è¡ãããåã«åã®åœä»€ãå®äºãããŸã§åŸ
ããªããã°ãªããªãããããã€ãã©ã€ã³åŠçã®å¹æãæžå°ããŸãããŸããåå²åœä»€ã®å Žåãã©ã¡ãã®åå²ãå®è¡ããããããããªãããããã€ãã©ã€ã³åŠçãéäžã§äžæããåŠçé床ãäœäžããããšããããŸãã
ãããã®èª²é¡ã解決ããããã«ããã€ãã©ã€ã³åŠçã«ã¯ããã€ãã®æ¹åçããããŸããäŸãã°ãã¢ãŠãã»ãªãã»ãªãŒããŒå®è¡(Out-of-Order Execution)ãåå²äºæž¬(Branch Prediction)ãªã©ããããŸããã¢ãŠãã»ãªãã»ãªãŒããŒå®è¡ã¯ãåœä»€ãå®è¡ããé åºãå€æŽããããšã§äŸåé¢ä¿ã解決ããåå²äºæž¬ã¯ãåå²åœä»€ã®å®è¡å
ãäºæž¬ããããšã§ãã€ãã©ã€ã³åŠçãéäžã§äžæããåæ°ãæžããããšãã§ããŸãã
ã¹ãŒããŒãã€ãã©ã€ã³ãšããææ³ã§ã¯ãæãæéã®ããããã€ãã©ã€ã³ã®ã¹ããŒãžã2ã€ä»¥äžã«åå²ããããšã§ãã¯ããã¯åšæ³¢æ°ã®äžéãåŒãäžããããšãã§ããŸãã ãã ããã¹ããŒãžæ°ãç¡å¶éã«å¢ãããšãåå²ãçºçããå Žåã®ããã«ãã£ãå¢å€§ãããããæ
éã«èæ
®ããå¿
èŠããããŸãããŸããã¯ããã¯åšæ³¢æ°ãäžããããšã§æ¶è²»é»åãå¢å ãããããé»åæ¶è²»ã«ãé
æ
®ããå¿
èŠããããŸãã
ã¹ãŒããŒã¹ã«ã©ãŒããã»ããµãŒã¯ãã·ã³ã°ã«ããã»ããµå
ã§ã®åœä»€ã¬ãã«äžŠåæ§ãšåŒã°ãã圢åŒã®äžŠåæ§ãå®è£
ããCPUã§ããã¹ã«ã©ãŒããã»ããµãŒã¯ã1ã€ã®ã¯ããã¯ãµã€ã¯ã«ãããæ倧1ã€ã®åäžã®åœä»€ããå®è¡ã§ããªãã®ã«å¯Ÿããã¹ãŒããŒã¹ã«ã©ãŒããã»ããµãŒã¯ãåæã«è€æ°ã®åœä»€ãããã»ããµå
ã®ç°ãªãå®è¡ãŠãããã«éä¿¡ããããšã§ã1ã€ã®ã¯ããã¯ãµã€ã¯ã«äžã«è€æ°ã®åœä»€ãå®è¡ã§ããŸãããã®ãããäžããããã¯ããã¯ã¬ãŒãã§å¯èœãªå Žåãããã¹ã«ãŒããã(åäœæéãããã«å®è¡ã§ããåœä»€æ°)ãé«ããªããŸããåå®è¡ãŠãããã¯ãCPUå
ã®åäžã®ç®è¡è«çæŒç®è£
眮ã®ãããªãå¥ã
ã®ããã»ããµ(ãŸãã¯ãã«ãã³ã¢ããã»ããµã®å Žåã¯ã³ã¢)ã§ã¯ãããŸããã
ã·ã³ã°ã«ã³ã¢ã®ã¹ãŒããŒã¹ã«ã©ãŒããã»ããµãŒã¯ãSISDããã»ããµãŒ(ã·ã³ã°ã«åœä»€ã¹ããªãŒã ãã·ã³ã°ã«ããŒã¿ã¹ããªãŒã )ãšåé¡ãããŸãããçããã¯ãã«æŒç®ããµããŒãããã·ã³ã°ã«ã³ã¢ã®ã¹ãŒããŒã¹ã«ã©ãŒããã»ããµãŒã¯ãSIMD(ã·ã³ã°ã«åœä»€ã¹ããªãŒã ããã«ãããŒã¿ã¹ããªãŒã )ãšåé¡ãããå¯èœæ§ããããŸãããã«ãã³ã¢ã®ã¹ãŒããŒã¹ã«ã©ãŒããã»ããµãŒã¯ãMIMDããã»ããµãŒ(ãã«ããã«åœä»€ã¹ããªãŒã ããã«ããã«ããŒã¿ã¹ããªãŒã )ãšåé¡ãããŸãã ã¹ãŒããŒã¹ã«ã©ãŒCPUã¯éåžžãã€ãã©ã€ã³åŠçãè¡ãããŠããŸãããã¹ãŒããŒã¹ã«ã©ãŒåŠçãšãã€ãã©ã€ã³åŠçã¯ç°ãªãããã©ãŒãã³ã¹åäžæè¡ãšèããããŠããŸããåè
ã¯è€æ°ã®å®è¡ãŠãããã䜿çšããŠè€æ°ã®åœä»€ã䞊åã«å®è¡ããåŸè
ã¯å®è¡ãŠããããç°ãªããã§ãŒãºã«åå²ããŠåãå®è¡ãŠãããã§è€æ°ã®åœä»€ã䞊åã«å®è¡ããŸãã
ã¹ãŒããŒã¹ã«ã©ãŒãã¯ããã¯ã¯ãé垞以äžã®ç¹åŸŽãšé¢é£ä»ããããŸã:
ãã¶ãŒããšã¯ãã³ã³ãã¥ãŒã¿ã¢ãŒããã¯ãã£ã«ãããŠãåœä»€å®è¡ã®é åºã«é¢ããåé¡ã®ããšãæããŸãããã¶ãŒããçºçãããšãæ£ããçµæãåŸãããã«å¿
èŠãªåœä»€å®è¡ã®é åºãä¹±ããŠããŸãããšããããŸãã
äŸãã°ãããåœä»€ãå®è¡ãããåã«ããã®åœä»€ãå¿
èŠãšããããŒã¿ããŸã çšæãããŠããªãå Žåããã¶ãŒããçºçããŸãããã®å Žåãå¿
èŠãªããŒã¿ãçšæããããŸã§ãåœä»€ã®å®è¡ãåŸ
ããªããã°ãªãããå®è¡é床ãé
ããªãå¯èœæ§ããããŸãã
ãã¶ãŒãã解決ããããã«ã¯ãããã€ãã®æ¹æ³ããããŸããäŸãã°ãåœä»€ã®å®è¡é åºãå€æŽããããšãåœä»€ã®å®è¡ã«å¿
èŠãªããŒã¿ãäºåã«çšæããããšãåœä»€å®è¡ã®éäžã§ä»ã®åœä»€ãå®è¡ããããšãªã©ããããŸãã
ãã¶ãŒãã®çš®é¡ã«ã¯ãããŒã¿ãã¶ãŒããå¶åŸ¡ãã¶ãŒããæ§é ãã¶ãŒããªã©ããããŸããããŒã¿ãã¶ãŒãã¯ãåœä»€ãå¿
èŠãšããããŒã¿ããŸã çšæãããŠããªãå Žåã«çºçããŸããå¶åŸ¡ãã¶ãŒãã¯ãåå²åœä»€ãªã©ã®å¶åŸ¡ãããŒãå€æŽããåœä»€ã®å®è¡ã«ãã£ãŠçºçããŸããæ§é ãã¶ãŒãã¯ãè€æ°ã®åœä»€ãåæã«å®è¡ãããããšã«ãã£ãŠãå®è¡ãŠããããªã©ã®ãªãœãŒã¹ã競åããããšã§çºçããŸãã
ãã¶ãŒããçºçãããšãããã°ã©ã ã®å®è¡é床ãé
ããªããããé«éãªã³ã³ãã¥ãŒã¿ã¢ãŒããã¯ãã£ãèšèšããå Žåã«ã¯ããã¶ãŒãã®è§£æ±ºæ¹æ³ã«ã€ããŠååã«èæ
®ããå¿
èŠããããŸãã
ææ©å®è¡ãšã¯ãã³ã³ãã¥ãŒã¿ãŒã®ããã»ããµãŒã«ãããŠãããã°ã©ã ã®åœä»€ãäºåã«å®è¡ããããšã§ãåŠçé床ãé«éåããæè¡ã§ãã
ãã®æè¡ã¯ã次ã«å®è¡ãããå¯èœæ§ãé«ãåœä»€ãäºæž¬ãããã®åœä»€ã®å®è¡ãäºåã«éå§ããŸãããã®éãäºæž¬ãæ£ããå Žåã¯ãå®éã®å®è¡ã«ç§»è¡ããåŠçé床ãé«éåãããŸããäžæ¹ãäºæž¬ã誀ã£ãŠããå Žåã¯ããã®åŠççµæãç Žæ£ããŠãæ£ããåœä»€ã®å®è¡ã«ç§»è¡ããŸãã
ææ©å®è¡ã¯ãè€éãªããã°ã©ã ãåŠçããéã«éåžžã«æå¹ã§ãããæè¿ã§ã¯ãMeltdownãSpectreãªã©ã®ã»ãã¥ãªãã£äžã®è匱æ§ãçºèŠããããããã»ãã¥ãªãã£äžã®åé¡ãææãããŠããŸãã
ã¢ãŠãã»ãªãã»ãªãŒããŒå®è¡(Out-of-order execution)ã¯ãã³ã³ãã¥ãŒã¿ã®åœä»€å®è¡æ¹åŒã®äžã€ã§ãããã®æ¹åŒã§ã¯ãããã»ããµãåœä»€ãçŽåã«å®è¡ãã代ããã«ãå®è¡å¯èœãªåœä»€ãèŠã€ã次第ãå®è¡é åºãå€æŽããŠãããã°ã©ã ãå¹ççã«å®è¡ããŸãã
éåžžãã³ã³ãã¥ãŒã¿ã®ããã»ããµã¯ãããã°ã©ã ã®åœä»€ãé çªã«å®è¡ããŸããããããããåœä»€ãå®è¡ããããã«å¿
èŠãªããŒã¿ããŸã èšç®ãããŠããªãã£ãããã¡ã¢ãªããèªã¿èŸŒãŸããŠããªãã£ãå Žåãããã»ããµã¯æ¬¡ã®åœä»€ãå®è¡ããå¿
èŠããããŸãããã®ãããåœä»€ã®å®è¡é åºãå
¥ãæ¿ããããšããããŸãã
ã¢ãŠãã»ãªãã»ãªãŒããŒå®è¡ã§ã¯ãããã»ããµã¯æªå®è¡ã®åœä»€ããããã¡ã«æ ŒçŽããå®è¡å¯èœã«ãªã£ãããå®è¡é åºãå€æŽããŠå®è¡ããŸãããã®æ¹æ³ã«ãããããã»ããµã¯ããå€ãã®åœä»€ãåæã«å®è¡ã§ããããã°ã©ã ã®å®è¡å¹çãåäžããŸãããã ããå®è¡é åºãå
¥ãæ¿ãããããããã°ã©ã ã®çµæãäºæ³éãã§ãªãå¯èœæ§ããããŸãã
ã¢ãŠãã»ãªãã»ãªãŒããŒå®è¡ã¯ãçŸä»£ã®é«éããã»ããµã§åºã䜿çšãããŠãããããã°ã©ã ã®å®è¡é床ãåäžãããããã®éèŠãªæè¡ã®äžã€ãšãªã£ãŠããŸãã
ãã¯ãã«ããã»ããµãšã¯ããã¯ãã«æŒç®ã«ç¹åããã³ã³ãã¥ãŒã¿ããã»ããµã®ããšã§ãããã¯ãã«æŒç®ã¯ãå€ãã®æ°å€æŒç®åŠçã«ãããŠéèŠãªåœ¹å²ãæãããŸããããšãã°ã3Dã°ã©ãã£ãã¯ã¹ãç©çã·ãã¥ã¬ãŒã·ã§ã³ãç§åŠæè¡èšç®ã人工ç¥èœãªã©ããããŸãã
ãã¯ãã«ããã»ããµã¯ã1ã€ã®åœä»€ã§åãåã®å€æ°ã®ããŒã¿èŠçŽ ãåæã«åŠçããããšãã§ããŸããããã«ãããåäžã®åœä»€ã§èšå€§ãªéã®ããŒã¿ãåŠçããããšãã§ããŸãããã¯ãã«ããã»ããµã¯ãã¹ã«ã©ãŒããã»ããµãšæ¯èŒããŠé«éã§ããããã¯ãã«æŒç®ã«ç¹åããŠãããããè€éãªæŒç®ãè¡ãããšãã§ããŸãã
ãã¯ãã«ããã»ããµã¯ã倧éã®ããŒã¿ãåŠçããå Žåã«ç¹ã«æçšã§ããããšãã°ãæ°è±¡äºå ±ãã·ãã¥ã¬ãŒã·ã§ã³ãåååååŠãªã©ã®åéã§äœ¿çšãããŸãããŸãããã¯ãã«ããã»ããµã¯ãGPUãªã©ã®ä»ã®ç¹æ®çšéããã»ããµãšçµã¿åãããŠäœ¿çšãããããšããããŸãã
æè¿ã®äžè¬çãªCPUã¯ããã¯ãã«æŒç®ããµããŒãããããšãã§ããããããã¯ãã«ããã»ããµã¯ããŸãäžè¬çã§ã¯ãããŸããããç¹å®ã®åéã«ãããŠã¯ããŸã éèŠãªåœ¹å²ãæãããŠããŸãã
Single Instruction, Multiple Data (SIMD) ã¯ã1ã€ã®åœä»€ãè€æ°ã®ããŒã¿ãåæã«åŠçããã³ã³ãã¥ãŒã¿ã®ã¢ãŒããã¯ãã£ã§ãã
ããã¯ããã¯ãã«åŠçãšããŠãç¥ãããŠãããåãæäœãå€æ°ã®ããŒã¿ã«é©çšããããšãã§ããŸããäŸãã°ãSIMDããã»ããµã¯ãåãæ°åŒã䜿çšããŠå€æ°ã®ç»åãã¯ã»ã«ãäžåºŠã«åŠçããããšãã§ããŸãã
SIMDã¯ãCPUãGPUãDSPãªã©ãæ§ã
ãªçš®é¡ã®ããã»ããµã§äœ¿çšãããŸããããã¯ããã¯ãã«åŠçãç¹å®ã®ã¿ã¹ã¯ã«å¯ŸããŠé«ãå¹çãçºæ®ããããã§ããSIMDã¯ãç»ååŠçããããªåŠçãé³å£°åŠçãç§åŠçã·ãã¥ã¬ãŒã·ã§ã³ãªã©ãå€ãã®åéã§äœ¿çšãããŠããŸãã
SIMDã¯ã1ã€ã®åœä»€ã§å€æ°ã®ããŒã¿ãåŠçãããããããã°ã©ããæ瀺çã«ã«ãŒããæžãå¿
èŠããªããªããããã°ã©ã ã®å®è¡é床ãåäžããå ŽåããããŸããããããSIMDã䜿çšããããã«ã¯ãã¢ããªã±ãŒã·ã§ã³ããã¯ãã«åŠçããµããŒãããå¿
èŠããããŸãããŸããããŒã¿ã®äŸåé¢ä¿ãããå Žåã«ã¯ãSIMDã䜿çšããããšãã§ããªãå ŽåããããŸãã
ãã«ãã¹ã¬ããã£ã³ã°ã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ã®äžçš®ã§ãããè€æ°ã®ã¹ã¬ãããåæã«å®è¡ãããããšãå¯èœã«ããæè¡ã§ãã
ã¹ã¬ããã¯ãããã°ã©ã å
ã§ç¬ç«ããŠå®è¡ãããå®è¡åäœã§ãããããã°ã©ã ã®å®è¡ãããå¹ççã«è¡ãããšãã§ããŸãããã«ãã¹ã¬ããã£ã³ã°ã¯ãããã°ã©ã å
ã®è€æ°ã®ã¹ã¬ãããåæã«å®è¡ãããããšã«ãããããã°ã©ã ã®ããã©ãŒãã³ã¹ãåäžãããããšãã§ããŸãã
å
·äœçã«ã¯ããã«ãã¹ã¬ããã£ã³ã°ã«ãããè€æ°ã®ã¿ã¹ã¯ãåæã«å®è¡ã§ãããããã·ã¹ãã ã®ã¬ã¹ãã³ã¹æéãççž®ããããšãã§ããŸãããŸãããã«ãã¹ã¬ããã£ã³ã°ã¯ã䞊ååŠçãå¯èœã«ãããããè€æ°ã®CPUã³ã¢ãæ倧éã«æŽ»çšããããšãã§ããŸãã
äžæ¹ã§ããã«ãã¹ã¬ããã£ã³ã°ãå®è£
ããã«ã¯ãã¹ã¬ããå士ã®ç«¶åç¶æ
ããã¹ã¬ããéã§ã®ããŒã¿ã®å
±æãªã©ãããã€ãã®èª²é¡ããããŸãããã®ãããé©åã«å®è£
ããªããšãããã°ã©ã ã®åäœãäžå®å®ã«ãªã£ãããå¹çãæªåããããšããããŸãã
ãã«ãã¹ã¬ããã£ã³ã°ã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ã®äžã§ãéèŠãªæè¡ã®äžã€ã§ãããçŸä»£ã®å€ãã®ããã°ã©ã ã§å©çšãããŠããŸãã
Simultaneous Multithreading(SMT)ãšã¯ãCPUã®åœä»€å®è¡ããã»ã¹ãå¹ççã«è¡ãããã®æè¡ã§ãããã®æè¡ã¯ãCPUã®ç©ççãªã³ã¢æ°ãå¢ãããã«ãè€æ°ã®ã¹ã¬ãããåæã«å®è¡ããããšãã§ããŸãã
éåžžãCPUã¯1ã€ã®åœä»€ãå®è¡ããããã«1ã€ã®ãã€ãã©ã€ã³ã䜿çšããŸããããããSMTã§ã¯ãè€æ°ã®åœä»€ãåæã«å®è¡ããããšãã§ããŸããããã¯ãè€æ°ã®ã¹ã¬ãããåæã«å®è¡ããããšã§éæãããŸããåã¹ã¬ããã¯ãç¬èªã®ã¬ãžã¹ã¿ãŒã»ãããšåœä»€ãã§ããã£ãŒãæã¡ãåãç©ççãªã³ã¢ãå
±æããŸãã
SMTã®å©ç¹ã¯ãCPUã®åŠçèœåãåäžãããããšãã§ããããšã§ããè€æ°ã®ã¹ã¬ãããåæã«å®è¡ããããšã§ãCPUãåœä»€ãå®è¡ããããã®åŸ
ã¡æéãæžãããCPUã®çšŒåçãé«ããããšãã§ããŸãããŸããSMTã¯ãCPUã®æ§èœãåäžã¹ã¬ããã®å Žåã«æ¯ã¹ãŠåäžããå ŽåããããŸãã
ãã ããSMTã¯ãã¹ãŠã®ã¢ããªã±ãŒã·ã§ã³ã«ãšã£ãŠå¹æçã§ã¯ãããŸãããSMTã¯ãè€æ°ã®ã¹ã¬ãããåæã«å®è¡ãããŠããå Žåã«éããCPUã®æ§èœãåäžããŸãããããã£ãŠãSMTã¯ããã«ãã¹ã¬ããã¢ããªã±ãŒã·ã§ã³ããåæã«è€æ°ã®ã¿ã¹ã¯ãå®è¡ããããšãã§ããã¢ããªã±ãŒã·ã§ã³ã§æãå¹æçã§ãã
ãã¬ã«ããã»ããµ(è±: Barrel processor)ã¯ãè€æ°ã®æŒç®åšããã€ãã©ã€ã³çã«æ¥ç¶ããåæã«è€æ°ã®åœä»€ãå®è¡ããããšãã§ããããã»ããµã®äžçš®ã§ãããã¬ã«ã·ãã¿(è±: Barrel shifter)ãšãåŒã°ããŸãã
ãã¬ã«ããã»ããµã¯ã1ã€ã®åœä»€ãå®è¡ããããã«å¿
èŠãªã¯ããã¯ãµã€ã¯ã«æ°ãæžããããšãã§ããããã»ããµã®åŠçé床ãåäžãããããšãã§ããŸãããã¬ã«ããã»ããµã¯ãäž»ã«ãããªåŠçãããžã¿ã«ä¿¡å·åŠçãªã©ã®åéã§äœ¿çšãããŠããŸãã
ãã¬ã«ããã»ããµã¯ãè€æ°ã®æŒç®åšãçŽåã«æ¥ç¶ããããšã§ã1ã€ã®åœä»€ãå®è¡ããããã«å¿
èŠãªã¯ããã¯ãµã€ã¯ã«æ°ãæžããããšãã§ããŸãããŸããè€æ°ã®åœä»€ãåæã«å®è¡ããããšãã§ãããããåŠçé床ãåäžããŸãã
ãã¬ã«ããã»ããµã¯ãäž»ã«å ç®åšãä¹ç®åšãã·ãã¿ãªã©ã®æŒç®åšã䜿çšããŠããŸãããã¬ã«ã·ãã¿ã¯ããããã·ããæŒç®ãé«éã«å®è¡ããããšãã§ããŸãããã¬ã«ããã»ããµã¯ãé»åãèšç®æ©ãé³å£°åŠçæ©åšãªã©ã«åºã䜿çšãããŠããŸãã
CPUã«ã¯ããŠãŒã¶ãŒã¢ãŒããšã«ãŒãã«ã¢ãŒãã®2ã€ã®åäœã¢ãŒãããããŸãããŠãŒã¶ãŒã¢ãŒãã§ã¯ãäžè¬ãŠãŒã¶ãŒã䜿çšããã¢ããªã±ãŒã·ã§ã³ãå®è¡ãããŸããäžæ¹ãã«ãŒãã«ã¢ãŒãã§ã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãå®è¡ãããã·ã¹ãã ã®ç®¡çãä¿è·ãè¡ããŸããå²ã蟌ã¿åŠçã¯ãå€éšããã®ä¿¡å·(å²ã蟌ã¿)ãçºçããå Žåã«ãCPUãçŸåšå®è¡ããŠããããã°ã©ã ãäžæåæ¢ããŠãå²ã蟌ã¿åŠçãå®è¡ããããšã§ãã
ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã«ãããã¡ã¢ãªãŒã¯ãããŒã¿ãããã°ã©ã ãä¿æããéèŠãªèŠçŽ ã§ããããã®ç« ã§ã¯ãã¡ã¢ãªãŒã®çš®é¡ãšéå±€æ§é ãã¡ã¢ãªãŒã¢ã¯ã»ã¹ã®æ¹æ³ãšé床ãããã³ãã£ãã·ã¥ã¡ã¢ãªãŒã®åçãšèšèšã«ã€ããŠèª¬æããã
ããDRAMã¯å€§å®¹éã®ã¡ã¢ãªãŒãšããŠäœ¿çšãããSRAMã¯é«éãªãã£ãã·ã¥ã¡ã¢ãªãŒãšããŠäœ¿çšããããã¡ã¢ãªãŒã¯ãéå±€çãªæ§é ãæã¡ãããé«éã§å°å®¹éã®ã¡ã¢ãªãŒãCPUã«è¿ããããäœéã§å€§å®¹éã®ã¡ã¢ãªãŒãé ãã«é
眮ãããã
ã¡ã¢ãªãŒã¢ã¯ã»ã¹ã«ã¯ãçŽæ¥ã¢ã¯ã»ã¹(ã©ã³ãã ã¢ã¯ã»ã¹)ãšã·ãŒã±ã³ã·ã£ã«ã¢ã¯ã»ã¹ããããçŽæ¥ã¢ã¯ã»ã¹ã¯ãã©ã³ãã ã¢ã¯ã»ã¹ã¡ã¢ãªãŒ(RAM)ã§äœ¿çšãããäžè¬çãªã¢ã¯ã»ã¹æ¹æ³ã§ãããã¢ãã¬ã¹ãæå®ããŠçŽæ¥ã¢ã¯ã»ã¹ãããäžæ¹ãã·ãŒã±ã³ã·ã£ã«ã¢ã¯ã»ã¹ã¯ãããŒããç£æ°ãã£ã¹ã¯ãªã©ã®ã¹ãã¬ãŒãžã¡ãã£ã¢ã§äœ¿çšãããæ¹æ³ã§ãããé çªã«ã¢ã¯ã»ã¹ãããã¡ã¢ãªãŒã¢ã¯ã»ã¹é床ã¯ãã¢ã¯ã»ã¹æéãã¬ã€ãã³ã·ãŒãšåŒã°ãããã®ã§æž¬å®ããããã£ãã·ã¥ã¡ã¢ãªãŒãªã©ã®é«éãªã¡ã¢ãªãŒã¯ãããäœãã¢ã¯ã»ã¹æéãæã€ã
ãã£ãã·ã¥ã¡ã¢ãªãŒã¯ãããé«éã§å°å®¹éã®ã¡ã¢ãªãŒã§ãããCPUã«è¿ãé
眮ãããããã£ãã·ã¥ã¡ã¢ãªãŒã¯ãæè¿ã¢ã¯ã»ã¹ãããããŒã¿ãä¿æããCPUãå床ã¢ã¯ã»ã¹ããå¯èœæ§ãé«ãå Žåã«ãé«éã«ã¢ã¯ã»ã¹ã§ããããã«ããããã£ãã·ã¥ã¡ã¢ãªãŒã¯ã2ã€ã®äž»èŠãªã¿ã€ãã§ãããçŽæ¥ããããã£ãã·ã¥ãšã»ããã¢ãœã·ã¢ãã£ããã£ãã·ã¥ã«åé¡ãããé©åãªèšèšãéèŠã§ããã
å
¥åºåã·ã¹ãã ã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®äžéšã§ãããã³ã³ãã¥ãŒã¿ãŒãšãŠãŒã¶ãŒãŸãã¯ä»ã®ããã€ã¹ãšã®éã®ããŒã¿è»¢éãæ
åœããŸãããã®ç« ã§ã¯ãå
¥åºåã·ã¹ãã ã®åºæ¬çãªèŠçŽ ã«çŠç¹ãåœãŠãŸãã
å
¥åºåããã€ã¹ã¯ãããŒã¿ãåä¿¡ãŸãã¯éä¿¡ããããã«äœ¿çšãããæ©åšã§ããäŸãã°ãããŠã¹ãããŒããŒããããŒããã£ã¹ã¯ãããªã³ã¿ãã¹ããŒã«ãŒãªã©ãæããããŸãããããã®ããã€ã¹ã¯ãç°ãªãçš®é¡ã®æ¥ç¶æ¹åŒã䜿çšããŠãã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã«æ¥ç¶ãããŸããäŸãã°ãUSBãPS/2ãSerialãParallelãEthernetãªã©ã§ãã
å
¥åºåå¶åŸ¡æ¹åŒã¯ãå
¥åºåããã€ã¹ãšã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®éã§ããŒã¿ã転éããããã«äœ¿çšãããŸããã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã¯ãããã°ã©ã ã«ãã£ãŠå¶åŸ¡ãããããã€ã¹ãã©ã€ãã䜿çšããŠãå
¥åºåå¶åŸ¡æ¹åŒãèšå®ããŸããäž»ãªå
¥åºåå¶åŸ¡æ¹åŒã«ã¯ãããã°ã©ã å¶åŸ¡ãããŒãªã³ã°å¶åŸ¡ãå²ã蟌ã¿å¶åŸ¡ããããŸãã
DMAã¯ãDirect Memory Accessã®ç¥èªã§ãå
¥åºåå¶åŸ¡æ¹åŒã®äžã€ã§ããDMAã䜿çšãããšãããã€ã¹ãšã¡ã¢ãªã®éã§ããŒã¿ã転éããããã«ãCPUã䜿çšããå¿
èŠããªããªããŸããããã«ãããCPUãä»ã®åŠçãå®è¡ã§ãããããããŒã¿è»¢éé床ãåäžããŸããDMAã«ãã£ãŠé«éãªããŒã¿è»¢éãå¯èœã«ãªãããããªãŒãã£ãªããããªãªã©ã®ãªã¢ã«ã¿ã€ã åŠçãå¿
èŠãªã¢ããªã±ãŒã·ã§ã³ã§ãã䜿çšãããŸãã
ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã«ãããŠãä»®æ³èšæ¶ãšä»®æ³ãã·ã³ã¯éåžžã«éèŠãªæŠå¿µã§ãã
ä»®æ³èšæ¶ã«ãã£ãŠã倧ããªããã°ã©ã ãå®è¡ããããšãå¯èœã«ãªããŸããããã°ã©ã ã¯ãç©çã¡ã¢ãªäžã«å¿
èŠãªéšåã ããããŒãããŠå®è¡ããå¿
èŠãªéšåã ããç©çã¡ã¢ãªããè£å©èšæ¶è£
眮ã«ã¹ã¯ããã¢ãŠãããããšãã§ããŸãããã®ããã«ããããšã§ãç©çã¡ã¢ãªã®å®¹é以äžã®ããã°ã©ã ãå®è¡ããããšãã§ããŸãã
ä»®æ³ãã·ã³ã¯ããœãããŠã§ã¢ã«ãã£ãŠç©çã³ã³ãã¥ãŒã¿ãŒãšåçã®æ©èœãå®çŸã§ããŸããç©çã³ã³ãã¥ãŒã¿ãŒã¯ãããã»ããµãã¡ã¢ãªãã¹ãã¬ãŒãžããã€ã¹ããããã¯ãŒã¯ã€ã³ã¿ãŒãã§ã€ã¹ãªã©ã®ããŒããŠã§ã¢ã§æ§æãããŠããŸããäžæ¹ãä»®æ³ãã·ã³ã¯ããœãããŠã§ã¢ã§ç©çã³ã³ãã¥ãŒã¿ãŒã®ããŒããŠã§ã¢ãåçŸããŸãã
ä»®æ³ãã·ã³ã«ã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãšã¢ããªã±ãŒã·ã§ã³ãå®è¡ããããã«å¿
èŠãªãã¹ãŠã®æ©èœãå«ãŸããŸãããããã®æ©èœã¯ãç©çã³ã³ãã¥ãŒã¿ãŒã®ããŒããŠã§ã¢ãšåçã®æ©èœãæäŸããŸããä»®æ³ãã·ã³ã¯ãã³ã³ãã¥ãŒã¿ãŒã®ãã¡ã€ã«ãšããŠååšããç©çã³ã³ãã¥ãŒã¿ãŒäžã§å®è¡ãããŸããç©çã³ã³ãã¥ãŒã¿ãŒã¯ãä»®æ³ãã·ã³ãšåæ§ã«åäœããä»®æ³ãã·ã³ã¯ç©çã³ã³ãã¥ãŒã¿ãŒãåçŸããããã«èšèšãããŠããŸãã
ä»®æ³ãã·ã³ã«ã¯å€ãã®å©ç¹ããããŸããäŸãã°ãã¢ããªã±ãŒã·ã§ã³ãç¹å®ã®ãã©ãããã©ãŒã ã«äŸåããå¿
èŠããªããªããŸããä»®æ³ãã·ã³ã¯ãæé©åãããæ§æã§ã¢ããªã±ãŒã·ã§ã³ãå®è¡ã§ãããããããå¹ççã«å®è¡ããããšãã§ããŸãããŸããä»®æ³åæè¡ã«ãã£ãŠè€æ°ã®ä»®æ³ãã·ã³ãåãç©çã³ã³ãã¥ãŒã¿ãŒäžã§å®è¡ããããšãã§ããŸãã
ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®æç§æžã®ãããã»ããµã®æ§èœåäžã®æŽå²ãã®ç« ãæ¥æ¬èªã§å·çããŠãã ãããã³ã³ãã¯ãã«ããŠãã ãããä¿¡é Œã«è¶³ãæ
å ±æºãåºå
žãšããŠæåŸã«ç€ºããŠãã ããã
ããã»ããµã®æ§èœã¯ããã®æŽå²ã®äžã§åçãªåäžãéããŠããŸããããã®é²åã¯ãããã€ãã®äž»èŠãªæè¡é©æ°ã«ãã£ãŠå¯èœã«ãªããŸããã
æåã®ã³ã³ãã¥ãŒã¿ã¯ãåœä»€ã1ã€ãã€å®è¡ãããã·ã³ã°ã«ã¹ããªãŒã ã¢ãŒããã¯ãã£ããæ¡çšããŠããŸããããã®åŸããã€ãã©ã€ã³åŠçãã¹ãŒããŒã¹ã«ã©ãŒåŠçãããã³ãã«ãããã»ããµåŠçãªã©ã®æè¡ãç»å Žããæ§èœãé£èºçã«åäžãããŸããããŸããããé«éãªã¯ããã¯é床ããã£ãã·ã¥ã¡ã¢ãªãããã³æµ®åå°æ°ç¹æŒç®ãŠãããã®å®è£
ã倧ããªåœ¹å²ãæãããŸããã
ããããæ§èœã®åäžã«ã¯ç©ççãªéçããããŸããé«éãªã¯ããã¯é床ãå®çŸããããã«ã¯ãé«åºŠãªå·åŽæè¡ãå¿
èŠã§ããããã«ããšãã«ã®ãŒæ¶è²»éãå¢å ãããããçãšãã«ã®ãŒã®èŠæ±ãå¢ããŠããŸãã
ä»åŸã¯ãããå¹ççãªããã»ããµã¢ãŒããã¯ãã£ã®æ¢æ±ãæ°ããçŽ æãããã€ã¹ã®éçºãããã³äººå·¥ç¥èœãªã©ã®æ°ããåéã®èŠä»¶ã«å¯Ÿå¿ããããã®ç¹åãæ±ããããŸãã
åºå
ž:John L. Hennessy, David A. Patterson. (2017). Computer Architecture: A Quantitative Approach. Sixth Edition.
ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã¯ãã³ã³ãã¥ãŒã¿ãŒã®å
éšæ§é ãããŒã¿åŠçã®æ¹åŒã決ããèšèšã®ããšã§ããã ãã®ã¢ãŒããã¯ãã£ãŒã¯ãæ代ãšãšãã«é²åãéããŠããã以äžã«ãã®å¹Žè¡šããŸãšããã
ãã©ã³ã»ãã€ãã³ã¢ãŒããã¯ãã£ãŒã¯ãçŸä»£ã®ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®åºç€ãšãªã£ãŠããèšèšåçã®äžã€ã§ãããã®ã¢ãŒããã¯ãã£ãŒã¯ãã³ã³ãã¥ãŒã¿ãŒã®ããã°ã©ã ãšããŒã¿ãåãã¡ã¢ãªç©ºéã«æ ŒçŽããããã°ã©ã ãšããŒã¿ãåãããã«æ±ãããšãã§ããŸãããŸããããã°ã©ã ãå€æŽããããšã§ãã³ã³ãã¥ãŒã¿ãŒãå®è¡ããã¿ã¹ã¯ãç°¡åã«å€æŽã§ããŸãã
ãã©ã³ã»ãã€ãã³ã¢ãŒããã¯ãã£ãŒã¯ã1945幎ã«ãžã§ã³ã»ãã©ã³ã»ãã€ãã³ã«ãã£ãŠæå±ãããEDVACã³ã³ãã¥ãŒã¿ãŒã®èšèšã«äœ¿çšãããŸããããã®åŸãå€ãã®ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒããã®èšèšåçã«åºã¥ããŠéçºãããçŸä»£ã®ã³ã³ãã¥ãŒã¿ãŒã«è³ããŸã§åœ±é¿ãäžããŠããŸãã
åºå
ž:A.S. Tanenbaum and H. Bos, "Computer Organization and Architecture: Designing for Performance," Pearson, 2006.
ã³ã³ãã¥ãŒã¿ãŒã®æŽå²ãæ¯ãè¿ããšãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®çºå±ããã®é²åã®äžå¿ã«ãªã£ãŠããŸããã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒãšã¯ãã³ã³ãã¥ãŒã¿ãŒã®æ§é ãšèšèšã®ããšã§ãããã³ã³ãã¥ãŒã¿ãŒãã©ã®ããã«åäœãããã«å€§ãã圱é¿ãäžããŸãããã®èšäºã§ã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®é»ææãæ¯ãè¿ãããã®çºå±ãè¿œããŸãã
ãã®åŸã1943幎ã«ENIACãéçºãããŸãããENIACã¯ã倧èŠæš¡ãªç空管ã䜿çšããŠãããããéåžžã«é«äŸ¡ã§ããã巚倧ã§ãã£ããENIACã¯ãããã°ã©ã ãããã°ã©ã ããã«ããæåã§å
¥åããå¿
èŠããããŸããããã®ããšããããã°ã©ãã³ã°ãéåžžã«å°é£ã§ãã£ãåå ã®äžã€ã§ãã
1950幎代ã«ãªããšãã³ã³ãã¥ãŒã¿ãŒã¯åŸã
ã«å°ååããããã©ã³ãžã¹ã¿ãŒæè¡ãå°å
¥ãããŸããããã©ã³ãžã¹ã¿ãŒæè¡ã¯ãç空管ã«æ¯ã¹ãŠå°åã§ä¿¡é Œæ§ãé«ããã³ã³ãã¥ãŒã¿ãŒã®èšèšãšã¢ãŒããã¯ãã£ãŒã«å€§ããªåœ±é¿ãäžããŸããã
1956幎ã«ã¯ãIBMãæåã®ãã£ã¹ã¯ãã©ã€ããçºå£²ããŸãããããã¯ã倧éã®ããŒã¿ãæ ŒçŽããé«éã«ã¢ã¯ã»ã¹ã§ããããã«ãªããŸããããŸããåã幎ã«ã¯ãFORTRANãšããæåã®é«æ°Žæºããã°ã©ãã³ã°èšèªãéçºãããŸãããããã«ãããããã°ã©ããŒã¯ããã°ã©ã ãããå¹ççã«éçºããããšãã§ããããã«ãªããŸããã
1960幎代ã«ã¯ãã³ã³ãã¥ãŒã¿ãŒã®ã¢ãŒããã¯ãã£ãŒãæŽã«é²åããŸãããIBM System/360ã¯ã倧èŠæš¡ãªã³ã³ãã¥ãŒã¿ãŒåžå Žã«åå
¥ããå瀟ã®æåãæ¯ããŸããããã®ææã«ã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãéçºãããã³ã³ãã¥ãŒã¿ãŒã®æäœæ§ãåäžããŸããã
ã³ã³ãã¥ãŒã¿ãŒã®æŽå²ã«ãããŠãã¡ã€ã³ãã¬ãŒã ã¯éèŠãªäœçœ®ãå ããŠããŸããã¡ã€ã³ãã¬ãŒã ã¯ãèšå€§ãªããŒã¿åŠçãå¯èœã«ããé«æ§èœã³ã³ãã¥ãŒã¿ãŒã§ãããããžãã¹ãç£æ¥åéã§åºã䜿çšãããŠããŸããããã§ã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡šã«ã€ããŠãã¡ã€ã³ãã¬ãŒã ã®æŽå²ãçŽè§£ããŠã¿ãŸãããã
1950幎代ã«ã¯ãåæã®ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒãéçºãããŸãããIBMã®æåã®ã¡ã€ã³ãã¬ãŒã ã³ã³ãã¥ãŒã¿ãŒã§ããIBM 700ã·ãªãŒãºã¯ã1952幎ã«ãªãªãŒã¹ãããŸãããããã¯ãç£æ°ã³ã¢ã¡ã¢ãªã䜿çšããåæã®ã³ã³ãã¥ãŒã¿ãŒã®äžäŸã§ãã
1960幎代ã«ã¯ãã¡ã€ã³ãã¬ãŒã ã®æ§èœãšæ©èœãåäžããŸãããIBM System/360ã¯ã1964幎ã«ãªãªãŒã¹ãããIBMã®ã¡ã€ã³ãã¬ãŒã åžå Žã«ãããæ¯é
çãªå°äœã確ç«ããŸãããSystem/360ã¯ãç°ãªãããã»ããµãŒãåšèŸºæ©åšã䜿çšããè€æ°ã®ã¢ãã«ã§æ§æãããéåžžã«æ¡åŒµæ§ãé«ãããšãç¹åŸŽã§ããã
1970幎代ã«ã¯ãã¡ã€ã³ãã¬ãŒã ã®æ§èœã倧å¹
ã«åäžããé«åºŠãªæäœã·ã¹ãã ãã¢ããªã±ãŒã·ã§ã³ãéçºãããŸããããŸãããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®æšæºåãé²ã¿ãIBMã¯OS/VS1ãOS/VS2ãšãã£ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ããªãªãŒã¹ããŸããã
1980幎代ã«ã¯ãã¡ã€ã³ãã¬ãŒã ã¯äž»ã«ããžãã¹çšéã«äœ¿çšãããããã«ãªããŸãããIBMã¯ãSystem/370ããã³System/390ããªãªãŒã¹ããé«åºŠãªã»ãã¥ãªãã£æ©èœãããŒã¿ããŒã¹ã·ã¹ãã ãè¿œå ããŸããã
1990幎代以éãã¡ã€ã³ãã¬ãŒã ã¯ãã€ã³ã¿ãŒããããã¯ã©ãŠãã³ã³ãã¥ãŒãã£ã³ã°ãªã©ã®æ°ããæè¡ãšãšãã«é²åããŸãããIBMã¯ãSystem zã·ãªãŒãºããªãªãŒã¹ããããžãã¹ãéèæ©é¢ãªã©ã§åºã䜿çšãããŠããŸãã
ã¡ã€ã³ãã¬ãŒã ã¯ãããŒã¿åŠçããã©ã³ã¶ã¯ã·ã§ã³åŠçãªã©ã®éèŠãªæ¥åã«å¿
èŠãªé«æ§èœãªã³ã³ãã¥ãŒã¿ãŒã§ããã¡ã€ã³ãã¬ãŒã ã¯ãããžãã¹ãç£æ¥åéã§åºã䜿ãããŠããã倧éã®ããŒã¿ãåŠçããããšãã§ããŸãããŸããé«åºŠãªã»ãã¥ãªãã£æ©èœãå¯çšæ§ã®é«ããæ±ããããæ¥åã«ã察å¿ã§ããŸãã
çŸåšã§ã¯ãã¯ã©ãŠãã³ã³ãã¥ãŒãã£ã³ã°ãããã°ããŒã¿è§£æãªã©ã®åéã«ãããŠããã¡ã€ã³ãã¬ãŒã ã¯éèŠãªåœ¹å²ãæ
ã£ãŠããŸããã¡ã€ã³ãã¬ãŒã ã¯ããšã³ã¿ãŒãã©ã€ãºã·ã¹ãã ã®äžå¿çãªåœ¹å²ãæãããããžãã¹ã®åºç€ãšãªãéèŠãªã€ã³ãã©ã¹ãã©ã¯ãã£ãŒãšããŠäžå¯æ¬ ã§ãã
ä»åŸããã¡ã€ã³ãã¬ãŒã ã¯æ°ããæè¡ãããŒãºã«åãããŠé²åãç¶ããããžãã¹ãç£æ¥åéã®çºå±ã«è²¢ç®ããŠããããšãæåŸ
ãããŠããŸãã
1964幎ãIBMã¯System/360ãçºè¡šããŸãããããã¯ãåäžã®ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãããŒã¹ã«ãç°ãªããµã€ãºãé床ã®æ©çš®ã補é ã§ããããã«ãããã®ã§ãããSystem/360ã¯ããããŸã§ã®IBMã®ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ãšã¯å
šãç°ãªããã®ã§ãããæ¥çã«å€§ããªåœ±é¿ãäžããŸããã
ãã®åŸãIBMã¯System/370ãSystem/390ãzSeriesããããŠçŸåšã¯IBM Zãšããååã§ç¥ããããé·ãã·ãªãŒãºã®ã¡ã€ã³ãã¬ãŒã ã³ã³ãã¥ãŒã¿ãŒãçºè¡šããŠããŸããããããã®ã·ã¹ãã ã¯ãæåã®System/360ãšäºææ§ãããããŸããæ°ããæè¡ãæ©èœãè¿œå ãããçŸä»£ã®ããžãã¹ãç§åŠæè¡ã«å¯Ÿå¿ã§ããããã«ãªã£ãŠããŸãã
1980幎代ã«ã¯ãIBM以å€ã®äŒæ¥ãIBMäºææ©ã®è£œé ãéå§ããŸããããããã®è£œåã¯ãIBMã®ã·ã¹ãã ãšäºææ§ããããäœã³ã¹ãã§æäŸãããŠããŸãããããã«ãããããžãã¹ãæ¿åºæ©é¢ãªã©ãå€ãã®çµç¹ãIBMäºææ©ãå°å
¥ããã¡ã€ã³ãã¬ãŒã åžå Žãæ¡å€§ããŸããã
çŸåšãIBM Zã¯ãé«ãã»ãã¥ãªãã£ãšä¿¡é Œæ§ãæäŸããããã«ãããžãã¹ãéèæ©é¢ãæ¿åºæ©é¢ããããŠç§åŠæè¡ã®åéã§åºãå©çšãããŠããŸãããŸããIBM Zã¯ããªãŒãã³ãœãŒã¹ãã¯ã©ãŠãã³ã³ãã¥ãŒãã£ã³ã°ã®æè¡ãçµ±åããããšã§ãçŸä»£ã®ã¢ããªã±ãŒã·ã§ã³éçºãããŒã¿åæã®ããŒãºã«ã察å¿ã§ããããã«ãªã£ãŠããŸãã
IBMã®ã¡ã€ã³ãã¬ãŒã ã³ã³ãã¥ãŒã¿ãŒã¯ãã³ã³ãã¥ãŒã¿ãŒã®æŽå²ã«ãããŠéèŠãªäœçœ®ãå ããŠããŸãããã®é²åãè¿œãããšã§ãããžãã¹ãç§åŠæè¡ãã©ã®ããã«é²åããŠããããç解ããããšãã§ããŸãã
1951幎ãã¢ã¡ãªã«åè¡åœã®é»åæ©åšã¡ãŒã«ãŒãBurroughs Corporation(ãããŒã¹ç€Ÿ)ã¯ãæåã®åçšé»ååŒããžã¿ã«ã³ã³ãã¥ãŒã¿ãŒã§ããB5000ãçºå£²ããŸãããB5000ã¯ãããŒããŠã§ã¢ãšãœãããŠã§ã¢ãå¯æ¥ã«çµ±åãããæåã®ã³ã³ãã¥ãŒã¿ãŒã§ããããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã«å¯ŸããŠé«ãä¿¡é Œæ§ãšã»ãã¥ãªãã£ãæäŸããŸããããã®é©æ°çãªã¢ãŒããã¯ãã£ã¯ãæ±çšçãªã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãšã¯ç°ãªããããã°ã©ã ãå®è¡ãããéã«ããŒããŠã§ã¢ãèªåçã«å®è¡ç°å¢ãèšå®ãããšããç¹åŸŽãæã¡ãŸãã
B5000ã®æåã«ç¶ããŠããããŒã¹ç€Ÿã¯1961幎ã«B5500ãçºå£²ããŸããããã®ã³ã³ãã¥ãŒã¿ãŒã¯ãB5000ã®ã¢ãŒããã¯ãã£ãç¶æ¿ãã€ã€ãããé«éãªåŠçé床ãå®çŸãã倧容éã®å€éšèšæ¶è£
眮ããµããŒãããŸããããŸãããããŒã¹ç€Ÿã¯1964幎ã«B6700ãçºå£²ããããã¯B5500ã®æ¡åŒµçã§ãããããé«éãªåŠçé床ãšå€§å®¹éã®èšæ¶è£
眮ãå®çŸããŸããã
1970幎代ã«å
¥ããšããããŒã¹ç€Ÿã¯ã¡ã€ã³ãã¬ãŒã ã³ã³ãã¥ãŒã¿ãŒåžå Žã§ç«¶åä»ç€Ÿãšæ¿ãã競åããŸããããã®äžã§ãã1976幎ã«çºå£²ãããB7700ã¯ãæ¥çæšæºã®ã¡ã€ã³ãã¬ãŒã ã³ã³ãã¥ãŒã¿ãŒã®ã¹ããã¯ãæã£ãŠããŸãããããã«ãB7800ã¯ãé«åºŠãªãã«ãããã»ããµãŒã¢ãŒããã¯ãã£ãæ¡çšããŠãããè€æ°ã®ããã»ããµãŒãåæã«å®è¡ããããšãã§ããŸããã
ãããã1980幎代ã«å
¥ããšããããŒã¹ç€Ÿã¯IBMãDECãªã©ã®ç«¶åä»ç€Ÿãšã®ç«¶äºã«è² ããã¡ã€ã³ãã¬ãŒã åžå Žããæ€éããŸããããã®åŸããããŒã¹ç€Ÿã¯UNIXããŒã¹ã®ãµãŒããŒè£œåãçºå£²ããçµå¶æŠç¥ã転æããŸããã1990幎代ã«å
¥ããšããããŒã¹ç€Ÿã¯ãšã¬ã¯ããããã¯ã»ããŒã¿ã»ã·ã¹ãã (EDS)ã«è²·åããããã®åŸã¯ãŠãã·ã¹ãšå䜵ããŸããã
ãããŒã¹ç€Ÿã®ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ã¯ãçŸä»£ã®ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ã®é²åã«å€å€§ãªåœ±é¿ãäžããŸãããç¹ã«B5000ã®ã¢ãŒããã¯ãã£ã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãšã®å¯æ¥ãªçµ±åã«ãã£ãŠé«ãä¿¡é Œæ§ãšã»ãã¥ãªãã£ãæäŸãããšããç¹ã§é©æ°çã§ããããã®åŸã®ã³ã³ãã¥ãŒã¿ãŒèšèšã«å€§ããªåœ±é¿ãäžããŸããããŸããB5000ã®ã¢ãŒããã¯ãã£ã«ãããããŒããŠã§ã¢ãèªåçã«å®è¡ç°å¢ãèšå®ããç¹åŸŽã¯ãçŸä»£ã®ã³ã³ãã¥ãŒã¿ãŒã®ä»®æ³åæè¡ã®åºç€ãšãªã£ãŠããŸãã
ããã«ãB5000ã®ã¢ãŒããã¯ãã£ã¯ãé«æ°Žæºèšèª(é«çŽèšèª)ãå©çšããããšãåæãšããŠãããããã°ã©ã ã®éçºå¹çã倧å¹
ã«åäžãããŸãããããã«ãããããã°ã©ããŒã¯ããé«ãæœè±¡åã¬ãã«ã§ããã°ã©ãã³ã°ãè¡ãããšãã§ããããã°ã©ã ã®å¯èªæ§ãä¿å®æ§ãåäžããŸããã
ãããŒã¹ç€Ÿã®ã³ã³ãã¥ãŒã¿ãŒèšèšã¯ãçŸä»£ã®ã³ã³ãã¥ãŒã¿ãŒç£æ¥ã«ãããŠå€§ããªåœ¹å²ãæãããŸããããã®ã¢ãŒããã¯ãã£ã¯ãã³ã³ãã¥ãŒã¿ãŒã®ä¿¡é Œæ§ãšã»ãã¥ãªãã£ãé«æ°Žæºèšèªã®å©çšãä»®æ³åæè¡ãªã©ãçŸä»£ã®ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®åºç€ãšãªã£ãŠããŸãã
ããã³ã³ãã¥ãŒã¿ãŒã¯ã1960幎代ãã1980幎代ã«ãããŠãäž»ã«äžå°èŠæš¡ã®äŒæ¥ãç 究æ©é¢ã§åºãå©çšãããã³ã³ãã¥ãŒã¿ãŒã®äžçš®ã§ããåœæã®ã¡ã€ã³ãã¬ãŒã ã³ã³ãã¥ãŒã¿ãŒãšæ¯èŒããŠãæ¯èŒçå°åã§å®äŸ¡ãªããšãç¹åŸŽã§ãããããã§ã¯ãããã³ã³ãã¥ãŒã¿ãŒã®çºå±ãšæŽå²ããäž»ãªæ©çš®ãšãšãã«å¹Žè¡šåœ¢åŒã§çŽ¹ä»ããŸãã
1960幎代ãã1980幎代ã«ãããŠãDEC(Digital Equipment Corporation)ã¯ã³ã³ãã¥ãŒã¿ã®äž»èŠãªè£œé äŒæ¥ã®1ã€ã§ããã圌ãã¯PDP(Programmed Data Processor)ã·ãªãŒãºã®å°åã³ã³ãã¥ãŒã¿ãéçºããVAX(Virtual Address eXtension)ã¢ãŒããã¯ãã£ã䜿çšãã倧åã³ã³ãã¥ãŒã¿ã補é ããŸããããããã®ã·ã¹ãã ã¯ãç§åŠãå·¥åŠãããžãã¹ãããã³æ¿åºã®å€ãã®åéã§äœ¿çšãããŸããã
1960幎代åŸåã«ã¯ãDECã¯PDP-8ãšåŒã°ããæåã®å°åã³ã³ãã¥ãŒã¿ãéçºããŸããããã®ã³ã³ãã¥ãŒã¿ã¯ãããã°ã©ã ãå®è¡ããããã«åœä»€ã解éãããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãå¿
èŠãšããŸããã§ããã1970幎代åé ã«ã¯ãããé«éãªPDP-11ãç»å Žãããã®ã³ã³ãã¥ãŒã¿ã¯ãã¡ã¢ãªã¢ã¯ã»ã¹ãšI/Oæäœã«ãããŠå€§å¹
ãªæ¹åãå®çŸããŸããã
1977幎ã«ã¯ãDECã¯VAXã·ãªãŒãºã®æåã®ã³ã³ãã¥ãŒã¿ãVAX-11/780ããªãªãŒã¹ããŸãããããã¯ã32ãããã®ä»®æ³ã¢ãã¬ã¹ç©ºéãæã€æåã®ã³ã³ãã¥ãŒã¿ã§ãããDECã®äž»å補åãšããŠé·å¹Žã«ããã£ãŠè²©å£²ãããŸãããVAXã¢ãŒããã¯ãã£ã¯ãã³ã³ãã¥ãŒã¿ã®é«æ§èœãšæ¡åŒµæ§ãè¿œæ±ããããã«èšèšãããå€ãã®å Žåã倧åŠãç 究æ©é¢ãæ¿åºæ©é¢ãªã©ã®å€§èŠæš¡ãªã³ã³ãã¥ãŒã¿ç°å¢ã§äœ¿çšãããŸããã
ãã€ã¯ãããã»ããµãŒã¯ãçŸä»£ã®ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã«ãããŠæ¬ ãããªãæè¡ã®äžã€ã§ãã1971幎ã«ã€ã³ãã«ç€Ÿãçºè¡šãã4004ãç®åãã«ããã®åŸãæ§ã
ãªã¡ãŒã«ãŒããå€ãã®ãã€ã¯ãããã»ããµãŒãçºå£²ãããã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®æ§èœåäžãã³ã¹ãåæžã«å€§ããè²¢ç®ããŠããŸãããããã§ã¯ããã€ã¯ãããã»ããµãŒã®æŽå²ãæ¯ãè¿ãã€ã€ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®é²åãèŠãŠãããŸãã
ãã€ã¯ãããã»ããµã¯ãçŸä»£ã®ã³ã³ãã¥ãŒã¿ã«æ¬ ãããªãéšåã®äžã€ã§ãããã®äžã§ãX86/X64ã¢ãŒããã¯ãã£ã¯ãããŒãœãã«ã³ã³ãã¥ãŒã¿ããµãŒããŒãªã©ãå¹
åºãåéã§äœ¿çšãããŠããŸããä»åã¯ãX86/X64ã¢ãŒããã¯ãã£ã®ãã€ã¯ãããã»ããµã«ã€ããŠã幎衚圢åŒã§çŽ¹ä»ããŸãã
ãã€ã¯ãããã»ããµã¯ãçŸä»£ã®ã³ã³ãã¥ãŒã¿ã®äžæ žããªãéšåã§ãããé«åºŠãªæ©èœãæã€å€ãã®ããã€ã¹ã®å¶åŸ¡ã«äœ¿çšãããŠããŸãããã€ã¯ãããã»ããµã®æŽå²ã¯éåžžã«èå³æ·±ããããã§ã¯Intelã®ãã€ã¯ãããã»ããµã®çºå±ã®å¹Žè¡šã説æããŸãã
ãã€ã¯ãããã»ããµã¯çŸä»£ã®ããžã¿ã«æè¡ã®åºç€ã§ãããç§ãã¡ãæ®æ®µäœ¿ã£ãŠããã¹ããŒããã©ã³ãã³ã³ãã¥ãŒã¿ãŒãªã©ã®ããã€ã¹ã«ãæèŒãããŠããŸãããã®äžã§ããã¢ãããŒã©ã¯ãã€ã¯ãããã»ããµã®å
é§ããšããŠãåºãç¥ãããŠããŸããããã§ä»åã¯ãããã€ã¯ãããã»ããµå¹Žè¡š (ã¢ãããŒã©ç·š)ããããŒãã«ãã¢ãããŒã©ã®ãã€ã¯ãããã»ããµã®æŽå²ãæ¯ãè¿ã£ãŠã¿ãããšæããŸãã
ãã®åŸããã¢ãããŒã©ã¯ãã€ã¯ãããã»ããµã®éçºãç¶ãã2003幎ã«ã¯ãPowerPC 970FXãçºå£²ããŸãããPowerPC 970FXã¯ãAppleã®Power Mac G5ã«æ¡çšãããé«æ§èœãªåŠçãå®çŸããŸããã
ã¢ãããŒã©ã®ãã€ã¯ãããã»ããµã¯ããã®æŽå²ãéããŠãé«éåŠçãé«æ§èœãªããã€ã¹ã«è²¢ç®ããŸãããç¹ã«ãMC68000ãPowerPCã¢ãŒããã¯ãã£ãæ¡çšãããã€ã¯ãããã»ããµã¯ãã³ã³ãã¥ãŒã¿ãŒã®é²åã«å€§ããªåœ±é¿ãäžããŸããã
ããããçŸåšã§ã¯ã¢ãããŒã©ã¯ãã€ã¯ãããã»ããµã®éçºããæ€éããä»ç€Ÿããã®å°äœãåŒãç¶ãã§ããŸããããã§ããã¢ãããŒã©ã®ãã€ã¯ãããã»ããµã¯ãããžã¿ã«æè¡ã®é²åã«ãããŠéèŠãªåœ¹å²ãæãããä»åŸããã®åœ±é¿ã¯ç¶ããŠããããšã§ãããã
1970幎代ãã1980幎代ã«ãããŠãã³ã³ãã¥ãŒã¿æ¥çã¯æ¥éã«çºå±ãããã®äžã§ããã€ã¯ãããã»ããµã®çºæã¯ãã³ã³ãã¥ãŒã¿æè¡ã®çºå±ã«å€§ããè²¢ç®ããŸãããæ¬èšäºã§ã¯ã1978幎ã«ã¢ãããŒã©ãçºå£²ããMC6809ãšã1984幎ã«ç»å ŽããMC68030ãäžå¿ã«ããã®åŸç¶è£œå矀ãšããŠç»å Žãããã€ã¯ãããã»ããµã«ã€ããŠçŽ¹ä»ããŸãã
MC6809ã¯ã8ããããã€ã¯ãããã»ããµã®äžçš®ã§ã1978幎ã«ã¢ãããŒã©ã«ãã£ãŠçºå£²ãããŸãããMC6809ã¯ãããããã£ãŒã«ããæ§é äœããã€ã³ã¿ãªã©ã®æ©èœãåããŠãããããã¢ã»ã³ããªèšèªã®ã³ãŒãã£ã³ã°ã容æã«ãªããŸããããŸããMC6809ã¯ãæ©èœãå€åœ©ã§ãããªãããäœã³ã¹ãã§ããããšãç¹åŸŽã§ãããããã¯ãåœæã®ã³ã³ãã¥ãŒã¿ç£æ¥ã«ãšã£ãŠå€§ããªé©æ°ã§ãããå€ãã®äŒæ¥ãMC6809ãæ¡çšããŸããã
1984幎ã«ã¯ãMC68030ãç»å ŽããŸãããMC68030ã¯ã32ããããã€ã¯ãããã»ããµã§ãããMC68000ã®åŸç¶æ©çš®ãšããŠéçºãããŸãããMC68030ã¯ãé«éãªåœä»€åŠçèœåãæã¡ãé«ãæ§èœãçºæ®ããããšãã§ããŸããããŸããMC68030ã¯ãFPU(æµ®åå°æ°ç¹æŒç®ãŠããã)ãå
èµããŠãããã³ã³ãã¥ãŒã¿ã°ã©ãã£ãã¯ã¹ããµãŠã³ãåŠçãªã©ãé«åºŠãªåŠçãå¿
èŠãšããã¢ããªã±ãŒã·ã§ã³ã«é©ããŠããŸããã
MC68030ã®åŸç¶æ©çš®ãšããŠã¯ãMC68040ãMC68060ããããŸãããããã®ãã€ã¯ãããã»ããµã¯ãæ§èœãæ©èœã®åäžãå³ãããç¹ã«MC68060ã¯é«éãªã¯ããã¯åšæ³¢æ°ãšå€§éã®ãã£ãã·ã¥ã¡ã¢ãªãåããŠãããé«ãåŠçèœåãçºæ®ããããšãã§ããŸããã
ããã«ãMC88000ãç»å ŽããŸãããMC88000ã¯ã32ããããã€ã¯ãããã»ããµã§ãããUNIXãOS-9ãªã©ã®ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã«å¯Ÿå¿ããŠããŸãããMC88000ã¯ãè€æ°ã®å®è¡ã¢ãŒããåããŠãããé«ãæ§èœãçºæ®ããããšãã§ããŸããã
以äžã®ããã«ãMC6809ããMC68030ãã¯ãããšãããã®åŸç¶è£œå矀ãMC88000ãŸã§ããã€ã¯ãããã»ããµæè¡ã¯é²åãç¶ããã³ã³ãã¥ãŒã¿ã®æ§èœãåäžãããããšã«è²¢ç®ããŸãããMC6809ãMC68030ãªã©ãã¢ãããŒã©ã®ãã€ã¯ãããã»ããµã¯ããã®åŸãå€ãã®äŒæ¥ã«æ¡çšãããã³ã³ãã¥ãŒã¿æ¥çã«ãããŠå€§ããªåœ¹å²ãæãããŸããã
ãŸããMC88000ã¯ãUNIXãOS-9ãªã©ã®ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã«å¯Ÿå¿ããŠãããããçµã¿èŸŒã¿ã·ã¹ãã ããµãŒããŒãªã©ãæ§ã
ãªåéã§æ¡çšãããŸãããMC88000ã¯ãæ§èœãé«ããä¿¡é Œæ§ã«ãåªããŠãããã³ã³ãã¥ãŒã¿æ¥çã«ãããŠå€å€§ãªè©äŸ¡ãåããŸããã
çŸåšã§ã¯ãMC6809ãMC68030ãªã©ã®å€ããã€ã¯ãããã»ããµã¯ãæ°ããæè¡ã«åã£ãŠä»£ããããŠããŸãããããããããã®ãã€ã¯ãããã»ããµãã³ã³ãã¥ãŒã¿æ¥çã«äžãã圱é¿ã¯å€§ããããã®æè¡ã¯ä»ããªãçºå±ãç¶ããŠããŸããä»åŸãããã€ã¯ãããã»ããµã®é²åãã³ã³ãã¥ãŒã¿ã®æ§èœåäžã«è²¢ç®ããæ°ããªæè¡é©æ°ãçã¿åºããŠããããšãæåŸ
ãããŸãã
ARMã¯ãçŸä»£ã®ã³ã³ãã¥ãŒãã£ã³ã°ã«ãããŠæ¥µããŠéèŠãªåœ¹å²ãæãããŠãããã€ã¯ãããã»ããµã¢ãŒããã¯ãã£ã®äžã€ã§ããARMãåããŠç»å Žããã®ã¯ã1985幎ã®ããšã§ããã以æ¥ãARMã¯ãæºåž¯é»è©±ãã¹ããŒããã©ã³ãã¿ãã¬ãããè»èŒæ
å ±ã·ã¹ãã ããããã¯ãŒã¯æ©åšãã¹ããŒãã¹ããŒã«ãŒãIoTããã€ã¹ãªã©ãæ§ã
ãªåéã®ã³ã³ãã¥ãŒã¿ã·ã¹ãã ã«æ¡çšãããäžçäžã§å©çšãããŠããŸãã
以äžã§ã¯ãARMã®æŽå²ããã©ã圢ã§ããã€ã¯ãããã»ããµå¹Žè¡šãäœæããŠã¿ãŸããã
ARMã¢ãŒããã¯ãã£ã¯ãã³ã³ãã¥ãŒã¿ã·ã¹ãã ã®é²åã«äŒŽããåžžã«ææ°ã®æè¡ãæ©èœãåãå
¥ããªããçºå±ããŠããŸãããä»åŸãARMã¯ãæ§ã
ãªåéã§éèŠãªåœ¹å²ãæããç¶ããããšãæåŸ
ãããŠããŸãã
ARM64ã¯ãARMããŒã«ãã£ã³ã°ã¹ãèšèšãã64ãããã¢ãŒããã¯ãã£ã®ãã€ã¯ãããã»ããµã§ãããã¹ããŒããã©ã³ãã¿ãã¬ãããããŒãããœã³ã³ããµãŒããŒãªã©ãå€æ§ãªããã€ã¹ã§äœ¿çšãããŠããŸãã以äžã§ã¯ãARM64ã®çºå±ã幎衚圢åŒã§æ¯ãè¿ããŸãã
ARM Cortex-A57ã¯ãARM64ã¢ãŒããã¯ãã£ã®æåã®ããã»ããµã®1ã€ã§ãããã¹ããŒããã©ã³ãã¿ãã¬ãããªã©ã®ã¢ãã€ã«ããã€ã¹ã§ã®äœ¿çšãæ³å®ããŠèšèšãããŸãããCortex-A57ã¯ãåŸæ¥ã®32ãããããã»ããµã«æ¯ã¹ãŠã倧å¹
ãªæ§èœåäžãšçé»ååãå¯èœã«ãªããŸããã
Apple A7ããã»ããµã¯ãiPhone 5sã«åããŠæ¡çšããããäžçåã®ARM64ããŒã¹ã®ãã€ã¯ãããã»ããµã§ããA7ã¯ãCortex-A57ãããŒã¹ã«Appleãç¬èªã«ã«ã¹ã¿ãã€ãºãããã®ã§ãåœæã®ã¢ãã€ã«ããã»ããµãšããŠã¯é«ãæ§èœãèªããŸããã
Snapdragon 810ã¯ãã¹ããŒããã©ã³åžå Žã«ãããŠãåããŠARM64ã¢ãŒããã¯ãã£ãæ¡çšããããã»ããµã®1ã€ã§ãã810ã¯ãCortex-A57ãšCortex-A53ã®ããã°.LITTLEã¢ãŒããã¯ãã£ãæ¡çšããé«ãæ§èœãšçé»åæ§ãå
ŒãåããŸããã
Cortex-A72ã¯ãARM64ã¢ãŒããã¯ãã£ã®äžã§ãé«æ§èœãªããã»ããµã®1ã€ã§ãããã¹ããŒããã©ã³ãã¿ãã¬ããããããŠãµãŒããŒãªã©ã®åéã§äœ¿çšãããŸãããCortex-A72ã¯ãCortex-A57ã«æ¯ã¹ãŠæ§èœãåäžããçé»ååãé²ãã ãšãããŠããŸãã
Snapdragon 835ã¯ãã¹ããŒããã©ã³åžå Žã«ãããŠåããŠ10nmããã»ã¹æè¡ãæ¡çšããããã»ããµã§ãããARM64ã¢ãŒããã¯ãã£ãæ¡çšããããã»ããµãšããŠã¯ãé«ãæ§èœãšçé»åæ§ãäž¡ç«ãããã®ã§ãããSnapdragon 835ã¯ãåœæã®ãããã¯ã©ã¹ã®ã¹ããŒããã©ã³ã«æ¡çšãããé«ãè©äŸ¡ãåŸãŸããã
Cortex-A76ã¯ãARM64ã¢ãŒããã¯ãã£ã®äžã§ãé«æ§èœãªããã»ããµã®1ã€ã§ãããã¹ããŒããã©ã³ãã¿ãã¬ããããããŠãµãŒããŒãªã©ã®åéã§äœ¿çšãããŸãããCortex-A76ã¯ãCortex-A72ãCortex-A73ã«æ¯ã¹ãŠæ§èœãåäžããåæã«çé»ååãé²ãã ãšãããŠããŸãã
Snapdragon 855ã¯ãã¹ããŒããã©ã³åžå Žã«ãããŠåããŠ7nmããã»ã¹æè¡ãæ¡çšããããã»ããµã§ãããARM64ã¢ãŒããã¯ãã£ãæ¡çšããããã»ããµãšããŠã¯ãé«ãæ§èœãšçé»åæ§ãäž¡ç«ãããã®ã§ãããSnapdragon 855ã¯ãåœæã®ãããã¯ã©ã¹ã®ã¹ããŒããã©ã³ã«æ¡çšãããé«ãè©äŸ¡ãåŸãŸããã
Apple M1ããã»ããµã¯ãMacã«æ¡çšãããäžçåã®ARM64ããŒã¹ã®ãã€ã¯ãããã»ããµã§ãããé«ãæ§èœãšçé»åæ§ãå
ŒãåããŠããŸããM1ã¯ãCortex-A78ãCortex-X1ã«æ¯ã¹ãŠæ§èœãåäžããåæã«çé»ååãé²ãã ãšãããŠããŸãã
Snapdragon 888ã¯ãã¹ããŒããã©ã³åžå Žã«ãããŠåããŠ5nmããã»ã¹æè¡ãæ¡çšããããã»ããµã§ãããARM64ã¢ãŒããã¯ãã£ãæ¡çšããããã»ããµãšããŠã¯ãé«ãæ§èœãšçé»åæ§ãäž¡ç«ãããã®ã§ãããSnapdragon 888ã¯ãåœæã®ãããã¯ã©ã¹ã®ã¹ããŒããã©ã³ã«æ¡çšãããé«ãè©äŸ¡ãåŸãŸããã
以äžããARM64ã¢ãŒããã¯ãã£ã®ãã€ã¯ãããã»ããµã®çºå±ãæ¯ãè¿ã£ã幎衚ã§ããä»åŸããARM64ã¢ãŒããã¯ãã£ãæ¡çšããããã»ããµã®éçºãé²ã¿ããããªãæ§èœåäžãçé»ååãæåŸ
ãããŸãã
ããã§ã¯ãã¢ããã³ã¹ãã»ãã€ã¯ãã»ããã€ã»ãº(AMD)瀟ããªãªãŒã¹ãããã€ã¯ãããã»ããµã®æŽå²ã«ã€ããŠå¹Žè¡šåœ¢åŒã§ãŸãšããŠãããŸããAMD瀟ã¯ãIntel瀟ãšäžŠã¶äžççãªåå°äœã¡ãŒã«ãŒã§ããããã€ã¯ãããã»ããµåžå Žã§ãé«ãã·ã§ã¢ãæã£ãŠããŸãããããªAMD瀟ããããŸã§ã«ãªãªãŒã¹ããŠãããã€ã¯ãããã»ããµã®é²åã®è»è·¡ã蟿ã£ãŠãããŸãããã
AMD瀟ã¯ãIntel瀟ã®ãã€ã¯ãããã»ããµã8080ãã®äºæåãšããŠãAm9080ãããªãªãŒã¹ããŸãããAm9080ã¯ãåœæã®8080ãšåãåœä»€ã»ãããæã£ãŠããããã8080åãã®ãœãããŠã§ã¢ããã®ãŸãŸåäœã§ãããšããå©ç¹ããããŸããã
AMD瀟ã¯ãIntel瀟ã®ãã€ã¯ãããã»ããµã8086ãã®äºæåãšããŠãAm9086ãããªãªãŒã¹ããŸãããAm9086ã¯ã8086ãšåã16ãããã®åœä»€ã»ãããæã£ãŠãããIBM PCãªã©ã®ã³ã³ãã¥ãŒã¿ã«ãæèŒãããŸããã
AMD瀟ã¯ãIntel瀟ã®ãã€ã¯ãããã»ããµã80286ãã®äºæåãšããŠãAm80286ãããªãªãŒã¹ããŸãããAm80286ã¯ã16ããããã32ãããã«ã¢ããã°ã¬ãŒããããåœä»€ã»ãããæã£ãŠãããé«éåãå³ãããŸããã
AMD瀟ã¯ãIntel瀟ã®ãã€ã¯ãããã»ããµã80486ãã®äºæåãšããŠãAm486ãããªãªãŒã¹ããŸãããAm486ã¯ã64ãããã®ããŒã¿ãã¹ãåããŠãããé«éåŠçãå¯èœã§ããã
AMD瀟ã¯ãèªç€Ÿåã®ãªãªãžãã«ãã€ã¯ãããã»ããµãK5ãããªãªãŒã¹ããŸãããK5ã¯ãIntel瀟ã®ãPentiumãã·ãªãŒãºãšã®ç«¶åã«ãªãããšãç®çã«éçºãããŸããã
AMD瀟ã¯ãèªç€Ÿåã®x86ã¢ãŒããã¯ãã£ãæ¡çšããªããã€ã¯ãããã»ããµãAthlonãããªãªãŒã¹ããŸãããAthlonã¯ãåœæã®Intel瀟ã®è£œåããé«éãªåŠçæ§èœãæã¡ãAMD瀟ã«ãšã£ãŠå€§ããªæåãšãªããŸããã
AMD瀟ã¯ã64ãããã®x86ã¢ãŒããã¯ãã£ãæ¡çšãããAthlon 64ãããªãªãŒã¹ããŸãããAthlon 64ã¯ãåœæã®åžå Žã§å¯äžã®64ããããã€ã¯ãããã»ããµã§ãããé«éãªåŠçæ§èœãšæ¡åŒµæ§ãæã¡ãããžãã¹ããã€ãšã³ãã®ã³ã³ãã¥ãŒã¿åãã«é«ãè©äŸ¡ãåããŸããã
AMD瀟ã¯ã2ã€ã®ã³ã¢ãæã€ãã€ã¯ãããã»ããµãAthlon X2ãããªãªãŒã¹ããŸãããAthlon X2ã¯ããã«ãã¿ã¹ã¯åŠçã«åªããé«éã§å®å®ããããã©ãŒãã³ã¹ãçºæ®ããã²ãŒã ãåç»ç·šéãªã©ã«åãã補åãšããŠäººæ°ãåããŸããã
AMD瀟ã¯ãåœæææ°ã®x86ã¢ãŒããã¯ãã£ãæ¡çšãããBulldozerãããªãªãŒã¹ããŸãããBulldozerã¯ãæ倧8ã€ã®ã³ã¢ãæã¡ãé«éãªæŒç®æ§èœãçºæ®ããã¯ãŒã¯ã¹ããŒã·ã§ã³ããµãŒããŒåãã«æ³šç®ãããŸããã
AMD瀟ã¯ãZenã¢ãŒããã¯ãã£ãæ¡çšãããã€ã¯ãããã»ããµãRyzenãããªãªãŒã¹ããŸãããRyzenã¯ãé«éãªãã«ãã¿ã¹ã¯åŠçãã³ã³ãã³ãã®å¶äœãã²ãŒã ãªã©ã®å¹
åºãçšéã«åãã補åãšããŠé«ãè©äŸ¡ãåŸãŸããã
AMD瀟ã¯ãZen 3ã¢ãŒããã¯ãã£ãæ¡çšãããRyzen 5000ãã·ãªãŒãºããªãªãŒã¹ããŸãããRyzen 5000ã¯ãé«ãã¯ããã¯é床ãšå€§å®¹éãã£ãã·ã¥ã«ãããé«éã§å®å®ããããã©ãŒãã³ã¹ãçºæ®ããã²ãŒã ãã¯ãªãšã€ãã£ããªäœæ¥ã«åãã補åãšããŠè©±é¡ã«ãªããŸããã
AMD瀟ã¯ãZen 3+ã¢ãŒããã¯ãã£ãæ¡çšãããRyzen 6000ãã·ãªãŒãºããªãªãŒã¹ããäºå®ã§ããRyzen 6000ã·ãªãŒãºã¯ãAMDã2021幎ã«çºè¡šããæ°ãããã€ã¯ãã¢ãŒããã¯ãã£ãZen 3+ããæ¡çšããŠãããæŽã«é«éãªæŒç®æ§èœãAIæ§èœã®åäžãæåŸ
ãããŸãã
ãŸãã2021幎ã«ã¯ãAMDãã°ã©ãã£ãã¯ã¹ã«ãŒãåžå Žã§ã泚ç®ãéããŸãããå瀟ã¯ãRDNA2ã¢ãŒããã¯ãã£ãæ¡çšãããRadeon RX 6000ãã·ãªãŒãºããªãªãŒã¹ããNVIDIA瀟ãšç«¶åãã圢ã§åžå Žã«åå
¥ããŸããã
以äžããAMD瀟ã®ãã€ã¯ãããã»ããµã®æŽå²ã幎衚圢åŒã§ãŸãšããå
容ã§ããAMD瀟ã¯ãIntel瀟ãšã®ç«¶äºãéããŠåžžã«é²åãç¶ããé«ãæ§èœãšã³ã¹ãããã©ãŒãã³ã¹ã®äž¡ç«ãå®çŸããŠããŸããä»åŸããAMD瀟ã®æè¡é©æ°ã«æ³šç®ããŠãããããšããã§ãã
MD2901/AMD2916/AMD29000ãšãããã€ã¯ãããã»ããµã¯ãã¢ããã³ã¹ãã»ãã€ã¯ãã»ããã€ã»ãº(AMD)ã«ãã£ãŠéçºããããéèŠãªãã€ã¯ãããã»ããµã®äžã€ã§ããæ¬èšäºã§ã¯ãAMD2901/AMD2916/AMD29000ã®å¹Žè¡šã«ã€ããŠè§£èª¬ããŠãããŸãã
以äžããAMD2901/AMD2916/AMD29000ã®äž»èŠãªå¹Žè¡šã§ãããAMD2901ã¯ãåæã®ãã€ã¯ãããã»ããµã®äžã€ãšããŠãããŒãœãã«ã³ã³ãã¥ãŒã¿ã®çºå±ã«è²¢ç®ãããAMD2916ã¯ãAMD2901ã®åŸç¶ãšããŠã16ãããã®åŠçèœåãæã€ãã€ã¯ãããã»ããµãšããŠãç£æ¥å¶åŸ¡ãèšç®æ©æ¯æŽèšèšãéä¿¡ãªã©ã®åéã§å©çšããããAMD29000ã¯ãRISCã¢ãŒããã¯ãã£ãæ¡çšããããšã«ãããé«éã§å¹ççãªæŒç®ãå¯èœã§ãããé«æ§èœã³ã³ãã¥ãŒã¿ãã¯ãŒã¯ã¹ããŒã·ã§ã³ãªã©ã®åéã§å©çšãããã
ãã€ã³ãããã¯ã·ã§ã³ã
ããŒãœãã«ã³ã³ãã¥ãŒã¿ãã¹ããŒããã©ã³ãã²ãŒã æ©ããµãŒããŒãã¹ãŒããŒã³ã³ãã¥ãŒã¿ãŒãªã©ãç§ãã¡ãæ¥ã
䜿çšããæ©åšã®äžã«ã¯ããã€ã¯ãããã»ããµãšåŒã°ããå°åã®CPUãæèŒãããŠããŸããä»åã¯ããã®äžã§ããPower/PowerPCããšåŒã°ãããã€ã¯ãããã»ããµã®æŽå²ã幎衚圢åŒã§æ¯ãè¿ãããã®ç¹åŸŽã掻èºããåéã«ã€ããŠçŽ¹ä»ããŸãã
ããã€ã¯ãããã»ããµå¹Žè¡š (Power/PowerPCç·š)ã
ç¹åŸŽ:åœä»€ã»ãããç°¡çŽ åãããŠãããé«éãªæŒç®åŠçãå¯èœã
ç¹åŸŽ:POWER1ã®æè¡ãããŒã¹ã«ãAppleãæ¡çšããMacintoshã·ãªãŒãºã®CPUãšããŠæ¡çšãããé«ãæ§èœãå®çŸã
ç¹åŸŽ:é«åºŠãªã¹ãŒããŒã¹ã«ã©ãŒæ¹åŒãæ¡çšããé«æ§èœåãå³ã£ãã
ç¹åŸŽ:çé»åæ§ã«åªããäœäŸ¡æ Œã§æäŸãããããšããããšã³ããããæ©åšã«ãæ¡çšãããã
ç¹åŸŽ:64ãããã¢ãŒããã¯ãã£ãæ¡çšããé«ãæŒç®æ§èœãšä¿¡é Œæ§ãå®çŸã
ç¹åŸŽ:AltivecãšåŒã°ãããã¯ãã«æŒç®æ©èœãæèŒããç»ååŠçãé³å£°åŠçãªã©ã®åéã§é«ãè©äŸ¡ãåããã
ç¹åŸŽ:ãã«ãããã»ãã·ã³ã°ã«å¯Ÿå¿ããã¹ãŒããŒã³ã³ãã¥ãŒã¿ãŒããµãŒããŒã§ã®äœ¿çšã«åããé«æ§èœCPUã
ç¹åŸŽ:ãã«ãã¹ã¬ããæè¡ãæ¡çšããè€æ°ã®åŠçãåæã«å®è¡å¯èœãšããã
ç¹åŸŽ:é«åºŠãªãšã©ãŒã³ã¬ã¯ã·ã§ã³æ©èœãåããä¿¡é Œæ§ãæŽã«åäžãããããŸããåçãªé»å管çæ©èœãæ¡çšããããšã§ãçé»åæ§ãåäžããã
ç¹åŸŽ:é«éãªãã£ãã·ã¥ã¡ã¢ãªãšãé«åºŠãªãã«ãã¹ã¬ããæè¡ãæ¡çšããé«ãæŒç®åŠçèœåãšä¿¡é Œæ§ãå®çŸããã
ç¹åŸŽ:è€æ°ã®ã³ã¢ãæèŒããé«ããã«ãã¹ã¬ããåŠçèœåãšäžŠååŠçèœåãåããããŸããOpenPOWER Foundationãèšç«ãããªãŒãã³ãªã¢ãŒããã¯ãã£ãæšé²ããã
ç¹åŸŽ:é«ãæŒç®æ§èœãšãAIããã£ãŒãã©ãŒãã³ã°ãªã©ã®é«åºŠãªåéã«ã察å¿ããæ©èœãæèŒããããŸããOpenCAPIãšåŒã°ããé«éãªæ¥ç¶èŠæ Œãæ¡çšããããšã§ãé«éãªããŒã¿è»¢éãå¯èœãšãªã£ãã
ããŸãšãã
ãPower/PowerPCãã¯ãIBMãAppleãMotorolaãªã©ãå
±åã§éçºãããã€ã¯ãããã»ããµã§ãããé«ãæ§èœãçé»åæ§ãä¿¡é Œæ§ãªã©ã®ç¹åŸŽãæã¡ãã¹ãŒããŒã³ã³ãã¥ãŒã¿ãŒããµãŒããŒããšã³ããããæ©åšããããŠäžææã¯Macintoshã·ãªãŒãºã®CPUãšããŠã䜿çšãããŸããããã®æŽå²ãæ¯ãè¿ãããšã§ããã€ã¯ãããã»ããµã®é²åãæè¡é©æ°ã®æŽå²ãç解ããããšãã§ããŸãã
ä»ãã40幎ã»ã©åããµã³ã»ãã€ã¯ãã·ã¹ãã ãºç€Ÿãèšç«ãããç¬èªã®ããã»ããµã¢ãŒããã¯ãã£ãSPARCããéçºããŸããããã®åŸãSPARCã¯äžçäžã®äŒæ¥ãç 究æ©é¢ã§å©çšãããå€ãã®ã·ã¹ãã ããµãŒããŒã§æ¡çšãããŸããã
以äžã§ã¯ãSPARCã¢ãŒããã¯ãã£ãäžå¿ã«ãããã€ã¯ãããã»ããµã®é²åãæ¯ãè¿ããŸãã
ãµã³ã»ãã€ã¯ãã·ã¹ãã ãºç€ŸãåããŠãªãªãŒã¹ããSPARCã¢ãŒããã¯ãã£ã®ããã»ããµã¯ãSPARCstation 1ã«æèŒãããŸãããåœæã¯25MHzã§åäœãã32ãããã®åœä»€ã»ãããæ¡çšããŠããŸããã
æ¥æ¬ã®å¯å£«é瀟ãéçºããSPARC64ã¯ãåœææãé«éãªããã»ããµã®1ã€ã§ãããå代ã®SPARC64ã¯æ倧150MHzã§åäœããæ§èœã®é¢ã§SPARCstation 10ããã®ããŸããã
SPARCstation 20ã¯ãåããŠå¯Ÿç§°ãã«ãããã»ãã·ã³ã°(SMP)ããµããŒãããSPARCã·ã¹ãã ã§ãããããã«ãããè€æ°ã®ããã»ããµã1ã€ã®ã·ã¹ãã ã§åæã«åäœãããããšãå¯èœã«ãªããŸããã
ãµã³ã»ãã€ã¯ãã·ã¹ãã ãºç€ŸããªãªãŒã¹ããUltraSPARC IIIã¯ãåããŠã®64ãããã®SPARCããã»ããµã§ãããåœææéã®ã¯ããã¯åšæ³¢æ°1.2GHzãèªããé«ãæ§èœãçºæ®ããŸããã
UltraSPARC T1ã¯ãåœææãé²ãã ãã«ãã¹ã¬ããæè¡ãæ¡çšããããã»ããµã§ãããåœæã®ããã»ããµã¯1ã€ã®ã³ã¢ã§1ã€ã®ã¹ã¬ããããåŠçã§ããŸããã§ããããUltraSPARC T1ã¯1ã€ã®ã³ã¢ã§æ倧32ã¹ã¬ãããåŠçããããšãã§ããŸããã
SPARC T3ã¯ãUltraSPARC T1ã®åŸç¶ã¢ãã«ã§ã16ã³ã¢ã®ããã»ããµãšæ倧128ã¹ã¬ããããµããŒãããŸããããã®ããã»ããµã¯ãããžãã¹ã¯ãªãã£ã«ã«ãªã¢ããªã±ãŒã·ã§ã³ãããŒã¿ããŒã¹ã·ã¹ãã ãªã©ã®åŠçã«é©ããŠããŸããã
SPARC M8ã¯ãææ°ã®SPARCããã»ããµã§ãæ倧8ãœã±ããã®ã·ã¹ãã ã§åäœããããšãã§ããŸããé«éã§å®å®ããæ§èœãçºæ®ãã倧èŠæš¡ãªããŒã¿åŠçãä»®æ³åãªã©ã®çšéã«é©ããŠããŸãããŸããSPARC M8ã¯ã»ãã¥ãªãã£ã«ã泚åããæå·åãã¡ã¢ãªä¿è·æ©èœãªã©ã匷åãããŠããŸãã
以äžããSPARCã¢ãŒããã¯ãã£ã®äž»ãªããã»ããµã®é²åã®æŽå²ã§ããä»åŸããSPARCã¢ãŒããã¯ãã£ã¯å€§èŠæš¡ãªã·ã¹ãã ããµãŒããŒãªã©ã§æŽ»èºãç¶ããããšãæåŸ
ãããŸãã
ãã¯ããã«ã
ãã€ã¯ãããã»ããµã®æŽå²ã¯ãçŸä»£ã®æ
å ±æè¡ã«ãããŠæ¥µããŠéèŠãªäœçœ®ãå ããŠããŸãããã®äžã§ãDEC/Alphaã¯ã1990幎代ã«ç»å Žããé«æ§èœãã€ä¿¡é Œæ§ã®é«ããµãŒããŒãã¯ãŒã¯ã¹ããŒã·ã§ã³ã«å©çšãããŸãããæ¬èšäºã§ã¯ãDEC/Alphaã®ãã€ã¯ãããã»ããµã®æŽå²ã幎衚圢åŒã§ãŸãšãããã®ç¹åŸŽãå瞟ã«ã€ããŠè§£èª¬ããŸãã
ããã€ã¯ãããã»ããµå¹Žè¡š (DEC/Alphaç·š)ã
DEC/Alphaã®æåã®ãã€ã¯ãããã»ããµãšããŠç»å Žãåœä»€ãã€ãã©ã€ã³ãå©çšããŠé«éãªåŠçãå¯èœã§ãããRISCã¢ãŒããã¯ãã£ãæ¡çšããŠããã
åœä»€ãã€ãã©ã€ã³ãããé«éåããããã«ããã£ãŒããã€ãã©ã€ã³ãå°å
¥ããããŸãã64ãããã¢ãŒããã¯ãã£ãæ¡çšããããšã§ã倧容éã®ã¡ã¢ãªãæ±ãããšãã§ããããã«ãªã£ãã
åœä»€ãã€ãã©ã€ã³ã18段ã«æ¡å€§ããããšã§ãé«æ§èœåãå³ã£ãããŸãããã¹åž¯åå¹
ã倧å¹
ã«å¢ãããã·ã¹ãã å
šäœã®åŠçé床ãåäžãããã
é«éåãšä¿¡é Œæ§ã®åäžãç®çã«ã2ã€ã®ããã»ããµã1ã€ã®ãããã«éç©ãããããã«ã»ãã€ãã©ã€ã³ã»ã¢ãŒããã¯ãã£ããæ¡çšããããŸããé«éãªã¡ã¢ãªãŒã¢ã¯ã»ã¹ãå®çŸãããã±ãŒã¹ãŒãã»ã€ã³ã¿ãªãŒããæè¡ãå°å
¥ããã
DEC/Alphaããã»ããµã®çç£ãçµäºãã補åã®ãµããŒããçµäºããããšãçºè¡šããããDEC/Alphaã¯ãé«æ§èœãã€ä¿¡é Œæ§ã®é«ããµãŒããŒãã¯ãŒã¯ã¹ããŒã·ã§ã³ã«å©çšããããã®æ§èœã¯åœæã®æ
å ±æè¡ã«ãããŠäžå®ã®å°äœãç¯ããã
ãDEC/Alphaã®ç¹åŸŽãšå瞟ã
DEC/Alphaã¯ãRISCã¢ãŒããã¯ãã£ãæ¡çšããé«éãªåŠçãå¯èœã§ããããšãç¹åŸŽã§ãããŸãã64ãããã¢ãŒããã¯ãã£ãæ¡çšããããšã§ã倧容éã®ã¡ã¢ãªãæ±ãããšãã§ããããã«ãªããŸãããããã«ãåœä»€ãã€ãã©ã€ã³ããã£ãŒããã€ãã©ã€ã³ãããã«ã»ãã€ãã©ã€ã³ã»ã¢ãŒããã¯ãã£ãã±ãŒã¹ãŒãã»ã€ã³ã¿ãªãŒããªã©ã®æè¡ãå°å
¥ããé«æ§èœãã€ä¿¡é Œæ§ã®é«ããµãŒããŒãã¯ãŒã¯ã¹ããŒã·ã§ã³ãå®çŸããŸããã
DEC/Alphaã¯ã1990幎代ã«ç»å Žãããããåœæã®æ
å ±æè¡ã«ãããŠäžå®ã®å°äœãç¯ããŸãããç¹ã«ãé«æ§èœãªåŠçèœåãæã¡ã倧èŠæš¡ãªããŒã¿åŠçãé«è² è·ãªã¢ããªã±ãŒã·ã§ã³ãåŠçããããšãã§ããããããµãŒããŒãã¯ãŒã¯ã¹ããŒã·ã§ã³ã«åºãå©çšãããŸããã
ãŸããDEC/Alphaã¯ããªãŒãã³ãªã¢ãŒããã¯ãã£ãæ¡çšããŠãããããä»ç€Ÿã®è£œåãšã®äºææ§ãé«ããå€æ°ã®ãœãããŠã§ã¢ãéçºãããŸããããã®ãããDEC/Alphaã¯ãæ¥çæšæºãšããŠåºãèªç¥ãããå€ãã®äŒæ¥ãç 究æ©é¢ã§å©çšãããŸããã
DEC/Alphaã¯ã2001幎ã«çç£çµäºãçºè¡šããã補åã®ãµããŒããçµäºããŸãããããã®å瞟ã¯çŸåšã§ãé«ãè©äŸ¡ãããŠããŸããDEC/Alphaã®æè¡ã¯ãåŸã®ããã»ããµã®éçºã«åœ±é¿ãäžããçŸä»£ã®æ
å ±æè¡ã«ãããŠãéèŠãªäœçœ®ãå ããŠããŸãã
ãã€ã¯ãããã»ããµã®äžçã«ãããŠãHP/PA-RISCã¯éèŠãªäœçœ®ãå ããŠããŸãããã®èšäºã§ã¯ãHP/PA-RISCãã€ã¯ãããã»ããµã®æŽå²ãæ¯ãè¿ããªããããã®ç¹åŸŽã圱é¿åã«ã€ããŠçŽ¹ä»ããŸãã
HP/PA-RISCãšã¯
HP/PA-RISCã¯ãHewlett-Packard (HP) 瀟ãéçºããRISCã¢ãŒããã¯ãã£ã®ãã€ã¯ãããã»ããµã§ããPA-RISCã¯ããPrecision Architecture Reduced Instruction Set Computingãã®ç¥ç§°ã§ãé«åºŠãªèšç®èœåãæã¡ãªãããåœä»€ã»ãããã·ã³ãã«ãªç¹åŸŽãæã£ãŠããŸãã
HP/PA-RISCã®æŽå²
HP/PA-RISCã®æŽå²ã¯ã1980幎代åé ã«é¡ããŸããåœæãHPã¯èªç€Ÿã®ã³ã³ãã¥ãŒã¿äºæ¥ã«ãããŠãIBMãDECãªã©ã®ã©ã€ãã«äŒæ¥ã«è¿œãã€ãããšãç®æããŠããŸãããããã§ãHPã¯èªç€Ÿç¬èªã®ãã€ã¯ãããã»ããµãéçºããããšã決å®ããŸããã
æåã®PA-RISCããã»ããµã¯ã1986幎ã«ãªãªãŒã¹ãããPA-7100ã§ããããã®ããã»ããµã¯ã16MHzã§åäœãã32ãããã¢ãŒããã¯ãã£ã16Kã®ãã£ãã·ã¥ã¡ã¢ãªãåããŠããŸãããPA-7100ã¯ãHPã®é«æ§èœã¯ãŒã¯ã¹ããŒã·ã§ã³ã§ããHP 9000ã·ãªãŒãºã§äœ¿çšãããåœæã®ç«¶å補åã«æ¯ã¹ãŠé«éãã€é«æ§èœãªåŠçãå®çŸããŸããã
ãã®åŸãHPã¯PA-RISCã¢ãŒããã¯ãã£ãé²åãããããé«éã§é«æ§èœãªããã»ããµãéçºãç¶ããŸããã1992幎ã«ãªãªãŒã¹ãããPA-8000ã¯ãã¯ããã¯åšæ³¢æ°ã100MHzã«ãŸã§éããè¶
ã¹ã«ã©ãŒæ¹åŒã«ããåœä»€å®è¡ãæ¡çšãããªã©ãåœæã®æå
端ã®æè¡ãçã蟌ãŸããããã»ããµã§ããã
HP/PA-RISCã®ç¹åŸŽãšåœ±é¿å
HP/PA-RISCã¯ãã·ã³ãã«ãªåœä»€ã»ãããæ¡çšããããšã§ãé«éãªåŠçèœåãå®çŸããŸããããŸããPA-RISCã¯é«åºŠãªãã€ãã©ã€ã³åŠçãã¢ãŠãã»ãªãã»ãªãŒããŒå®è¡æ©èœãåããŠãããé«æ§èœãµãŒããŒãã¯ãŒã¯ã¹ããŒã·ã§ã³ãªã©ã®éèŠãªæ¥åã·ã¹ãã ã«ãããŠãé«éãã€å®å®ããåŠçãæäŸããŸããã
HP/PA-RISCã®éçºã«ãã£ãŠãRISCã¢ãŒããã¯ãã£ãæ®åããå¥æ©ãšãªã£ãããšã泚ç®ãã¹ãç¹ã§ããåœæã®ã³ã³ãã¥ãŒã¿åžå Žã«ãããŠãäž»æµã§ãã£ãCISCã¢ãŒããã¯ãã£ã«æ¯ã¹ãRISCã¢ãŒããã¯ãã£ã¯ã·ã³ãã«ãªåœä»€ã»ãããšé«éãªåŠçèœåãç¹åŸŽã§ãããHP/PA-RISCã®æåã«ãã£ãŠãRISCã¢ãŒããã¯ãã£ã¯äžè¬çã«èªç¥ãããããã«ãªãããã®åŸã®CPUã®éçºã«å€§ããªåœ±é¿ãäžããŸããã
HP 64000ã¯ãåœæã®ãã€ã¯ãããã»ããµã®éçºç°å¢ãšããŠã¯éåžžã«å
é²çã§ããããã®ã·ã¹ãã ã¯ãCPUãã¡ã¢ãªããã£ã¹ã¯ãã©ã€ããå
¥åºåã€ã³ã¿ãã§ãŒã¹ããããã°ããŒã«ãªã©ãçµ±åãããã€ã¯ãããã»ããµã®èšèšãã補é ãŸã§ã®äžé£ã®ããã»ã¹ããµããŒãããŸããã
HP 64000ã¯ã1979幎ã«çºå£²ãããåœæã¯äŸ¡æ Œãéåžžã«é«ãã£ããããäžéšã®å€§æäŒæ¥ã倧åŠã®ç 究宀ãªã©ã§ããå©çšãããŸããã§ããããããããã®é«åºŠãªæ©èœãšä¿¡é Œæ§ã«ããããã€ã¯ãããã»ããµã®éçºã«æºãã人ã
ããã¯é«ãè©äŸ¡ãåããŸããã
ãŸããHP 64000ã®ç»å Žã«ããããã€ã¯ãããã»ããµã®éçºããã容æã«ãªãããããŸã§ã®ç
©éãªäœæ¥ã倧å¹
ã«ç°¡ç¥åããããšãã§ããããã«ãªããŸããããã®ããšããåŸã«ã³ã³ãã¥ãŒã¿ãŒç£æ¥ã®æ¥éãªçºå±ã«ç¹ããããšã«ãªããŸãã
HP 64000ã¯ãåœåã¯Intel 8085ãMotorola 6800ãªã©ã®ãã€ã¯ãããã»ããµã«å¯Ÿå¿ããŠããŸããããåŸã«Zilog Z80ãIntel 8086ãªã©ã®æ°ãããã€ã¯ãããã»ããµã«ã察å¿ããããã«ãªããŸããã
ãŸããHPã¯åŸã«ãHP 64000ãæ¡åŒµãããHP 64000Aãããããé«æ§èœãªãã€ã¯ãããã»ããµçšéçºã·ã¹ãã ãHP 9000 Series 200ããªã©ãããã«é«åºŠãªã·ã¹ãã ãçºå£²ããŸããããããã®ã·ã¹ãã ã¯ããã倧èŠæš¡ãªãããžã§ã¯ããé«åºŠãªèšèšã«å¿
èŠãªæ©èœãæäŸããããšãã§ããå€ãã®äŒæ¥ã倧åŠã§å©çšãããããã«ãªããŸããã
ããã«ãHPã¯1983幎ã«ããã€ã¯ãããã»ããµã®éçºã«å¿
èŠãªãœãããŠã§ã¢éçºããŒã«ã®äžã€ã§ãããHP-UXããçºè¡šããŸãããããã¯ãUnixãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãåºã«ãããã®ã§ãé«ãæ±çšæ§ãšä¿¡é Œæ§ãæã¡ãå€ãã®éçºè
ã«æçšãããŸããã
ãããã1990幎代ã«å
¥ããšã競åä»ç€Ÿã®å°é ããPCã®æ®åã«ãã£ãŠãHPã®ãã€ã¯ãããã»ããµéçºã·ã¹ãã ã®åžå Žã·ã§ã¢ã¯äœäžããŠãããŸãã2000幎代ã«å
¥ããšãHPã¯ãã€ã¯ãããã»ããµéçºã·ã¹ãã ããæ€éããä»ã®äºæ¥ã«æ³šåããããšã«ãªããŸããã
ããããªãããHP 64000ã¯ããã®åŸããã€ã¯ãããã»ããµã®æŽå²ã«ãããŠéèŠãªåœ¹å²ãæããç¶ããŸãããå€ãã®éçºè
ãã¡ã«ãã£ãŠå©çšããã次äžä»£ã®ãã€ã¯ãããã»ããµã®éçºã«è²¢ç®ããŸããã
ãŸããHP 64000ã®æåã¯ãä»æ¥ã®ã³ã³ãã¥ãŒã¿ãŒç£æ¥ã«ãããŠããã€ã¯ãããã»ããµéçºã«æºãã人ã
ã«ãšã£ãŠã®è²ŽéãªçµéšãšãªããŸããããã®ã·ã¹ãã ã«è§Šããããšããã人ã
ã¯ããã®åŸãèªãã®éçºã«åœ¹ç«ãŠãããšãã§ããã®ã§ãã
ä»æ¥ããã€ã¯ãããã»ããµã®éçºã¯ããããªãé«åºŠåãšå€æ§åãé²ãã§ããŸããæ°ãããã¯ãããžãŒã®ç»å Žã«ããããããŸã§ã«ãªãé«æ§èœãªãã€ã¯ãããã»ããµãçã¿åºãããŠããŸãããããããã®åºç€ãšãªãéçºç°å¢ã¯ãHP 64000ããå§ãŸã£ãæŽå²ããããŸãã
ãã€ã¯ãããã»ããµã¯ãçŸä»£ã®ããžã¿ã«ãã¯ãããžãŒã«ãšã£ãŠäžå¯æ¬ ãªåœ¹å²ãæãããŠããŸããç¹ã«ãMIPS/MIPS64ã¯é«æ§èœã³ã³ãã¥ãŒã¿ãŒãçµã¿èŸŒã¿ã·ã¹ãã ã®åéã§éèŠãªåœ¹å²ãæãããŠããŸãããããã§ã¯ãMIPS/MIPS64ã®æŽå²ã«ã€ããŠçŽ¹ä»ãããã®éèŠæ§ã«ã€ããŠèå¯ããŠã¿ãŸãããã
MIPS/MIPS64ã®æŽå²
MIPS (Microprocessor without Interlocked Pipeline Stages)ã¯ã1980幎代åé ã«ã¹ã¿ã³ãã©ãŒã倧åŠã§éçºãããRISC (Reduced Instruction Set Computing)ã¢ãŒããã¯ãã£ã®ãã€ã¯ãããã»ããµã§ããMIPSã¯ãåœä»€ã»ããã®ç°¡çŽ åãšãã€ãã©ã€ã³åŠçã®æé©åã«ãã£ãŠé«éãªåŠçãå®çŸããçµã¿èŸŒã¿ã·ã¹ãã ãé«æ§èœã³ã³ãã¥ãŒã¿ãŒã®åéã§åºãå©çšãããããã«ãªããŸããã
MIPS/MIPS64ã®éèŠæ§
MIPS/MIPS64ã¯ãé«æ§èœã³ã³ãã¥ãŒã¿ãŒã®åéã§ç¹ã«éèŠãªåœ¹å²ãæãããŠããŸããå€ãã®ã¹ãŒããŒã³ã³ãã¥ãŒã¿ãŒããµãŒããŒã«æ¡çšãããé«éãªããŒã¿åŠçãèšç®åŠçãå®çŸããŠããŸãããŸããçµã¿èŸŒã¿ã·ã¹ãã ã®åéã§ããMIPS/MIPS64ã¯åºãæ¡çšãããŠããŸãã家é»è£œåãè»èŒã·ã¹ãã ããããã¯ãŒã¯æ©åšãªã©ãæ§ã
ãªåéã§å©çšãããŠããŸãã
MIPS/MIPS64ã®ã¢ãŒããã¯ãã£ã¯ãRISCã¢ãŒããã¯ãã£ã®åºæ¬ææ³ãåãç¶ãã§ãããåœä»€ã»ãããç°¡æœã§å¹ççãªãããé«éãªåŠçãå¯èœã§ãããŸããMIPS/MIPS64ã¯ããªãŒãã³ã¢ãŒããã¯ãã£ã§ãããããå€ãã®ããŒããŠã§ã¢ã¡ãŒã«ãŒããœãããŠã§ã¢éçºè
ã«ãã£ãŠãµããŒããããŠããŸãããã®ãããMIPS/MIPS64ãæ¡çšããã·ã¹ãã ã¯ããã¬ãã·ãã«ã§æ¡åŒµæ§ãé«ããã³ã¹ãããã©ãŒãã³ã¹ã«åªããŠãããšèšããŸãã
ããã«ãMIPS/MIPS64ã¯ããšãã«ã®ãŒå¹çã«ãåªããŠããŸããåœä»€ã»ãããç°¡æœã§ãããããå®è¡ã«å¿
èŠãªåè·¯ãå°ãªããé»åæ¶è²»ãå°ãªããŠæžãããã§ãããã®ãããã¢ãã€ã«ããã€ã¹ãIoTæ©åšãªã©ãããããªãŒé§åã®ã·ã¹ãã ã§ãåºãå©çšãããŠããŸãã
æè¿ã§ã¯ãMIPSã¢ãŒããã¯ãã£ãæã€äŒæ¥ãæ°å€ããããŸããäŸãã°ãäžåœã®é»åæ©åšã¡ãŒã«ãŒã§ããLoongson Technology Corporationã¯ãMIPSã¢ãŒããã¯ãã£ãæ¡çšããŠèªç€Ÿè£œåãéçºããŠããŸãããŸããã·ã³ã¬ããŒã«ã®AIäŒæ¥ã§ããHailoã¯ãMIPS64ã¢ãŒããã¯ãã£ãæ¡çšãããšããžAIããã»ããµãŒãéçºããŠããŸãããããã®äŒæ¥ã¯ãMIPS/MIPS64ã®åªããæ§èœãšãšãã«ã®ãŒå¹çã«çç®ããŠã次äžä»£ã®æè¡ãéçºããŠãããšèšããŸãã
çµè«ãšããŠãMIPS/MIPS64ã¯ãé«æ§èœãªåŠçèœåãšãšãã«ã®ãŒå¹çã«åªããã¢ãŒããã¯ãã£ã§ãããçŸä»£ã®ããžã¿ã«ãã¯ãããžãŒã«äžå¯æ¬ ãªååšã§ããããŸããŸãªåéã§åºãæ¡çšãããå€ãã®äŒæ¥ãMIPS/MIPS64ãæ¡çšãã補åãéçºããŠããŸããä»åŸããMIPS/MIPS64ã®é²åãšçºå±ãæåŸ
ãããŸãã
ãã€ã¯ãããã»ããµãšã¯ãã³ã³ãã¥ãŒã¿ãŒã«ãããŠäžå€®åŠçè£
眮 (CPU) ã®æ©èœãå®çŸããéç©åè·¯ã®ããšã§ããä»åã¯ãäžåœã®ããŒã«ã«ãªãã€ã¯ãããã»ããµã¡ãŒã«ãŒã§ããéŸè¯ (Loongson) ã®å¹Žè¡šãåãäžãããã®æŽå²ãçºå±ã«ã€ããŠçŽ¹ä»ããŸãã
éŸè¯ (Loongson) ã¯ãäžåœã®åœå®¶éç¹é«æè¡äŒæ¥ã§ããäžåœé»åæè¡éå£ (CETC) ã®äžéšéã§ããã2002幎ã«åµç«ãããŸãããåœå㯠MIPS ã¢ãŒããã¯ãã£ãããŒã¹ã«ããããã»ããµãŒãéçºããŠããŸããããçŸåšã¯ RISC-V ã¢ãŒããã¯ãã£ãæ¡çšããŠããŸãã
以äžã¯ãéŸè¯ã®äž»ãªãã€ã«ã¹ããŒã³ãæ¯ãè¿ããã€ã¯ãããã»ããµå¹Žè¡šã§ãã
éŸè¯æè¡æéå
¬åžãèšç«ããã
Loongson-1A ããã»ããµããªãªãŒã¹
äžå€®æ¿åºããéŸè¯èšç»ããçºè¡šããããŒã«ã«ãªãã€ã¯ãããã»ããµç£æ¥ã®çºå±ãæ¯æŽããããšãè¡šæ
Loongson-2E ããã»ããµããªãªãŒã¹
Loongson-2F ããã»ããµããªãªãŒã¹
Loongson-3 ããã»ããµããªãªãŒã¹ Lenovo ã Loongson-2F ããã»ããµãæèŒããããŒãããœã³ã³ãçºè¡š
Loongson-3A ããã»ããµããªãªãŒã¹
Loongson-3B ããã»ããµããªãªãŒã¹ Dawning Information Industry ã Loongson-3B ããã»ããµãæèŒããã¹ãã³ã³ãçºè¡š
Loongson-3C ããã»ããµããªãªãŒã¹
Loongson-3H ããã»ããµããªãªãŒã¹ Loongson Technology Europe ãèšç«ããã欧å·åžå Žã§ã®ããžãã¹ãéå§
Loongson-3B2000 ããã»ããµããªãªãŒã¹
Loongson-3A4000 ããã»ããµããªãªãŒã¹
Loongson-3B3000 ããã»ããµããªãªãŒã¹ äžåœç§åŠé¢ã Loongson-3B ããã»ããµãæèŒããã¹ãã³ã³ãçºè¡š
Loongson-3B4000 ããã»ããµããªãªãŒã¹
Loongson-3A5000 ããã»ããµããªãªãŒã¹
Loongson-3A5000 ããã»ããµãæèŒããããŒãããœã³ã³ãçºå£²ããã
Loongson-3A5000 ããã»ããµãæèŒããããŒãããœã³ã³ãæ¹è¯ãããããé«ãæ§èœãæäŸããããã«ãªã
éŸè¯ã¯ãLoongArch ã¢ãŒããã¯ãã£ã®æåã®ããŒãžã§ã³ã§ãã LoongArch1 ãçºè¡šããRISC-V ã¢ãŒããã¯ãã£ã«ç§»è¡ããããšã宣èš
以äžããéŸè¯ã®äž»ãªãã€ã«ã¹ããŒã³ãšãªããŸããéŸè¯ã¯ãããŒã«ã«ãªãã€ã¯ãããã»ããµã¡ãŒã«ãŒãšããŠãäžåœã®ITç£æ¥ã«ãããŠéèŠãªåœ¹å²ãæãããŠããŸããä»åŸããé«æ§èœã§äœäŸ¡æ Œãªããã»ããµãŒã®éçºã«æ³šåããäžåœã®ITç£æ¥ã®çºå±ãæ¯æŽããããšãæåŸ
ãããŸãã
ãã€ã¯ãããã»ããµæè¡ã¯ãçŸä»£ã®ããããé»åæ©åšã«äžå¯æ¬ ãªèŠçŽ ã§ãããããŠãRISC-VãšåŒã°ãããªãŒãã³ãœãŒã¹ã¢ãŒããã¯ãã£ã®é²åã¯ããã®åéã«é©æ°ããããããŠããŸãã以äžã§ã¯ãRISC-Vã¢ãŒããã¯ãã£ã®æŽå²ãšé²åã«ã€ããŠå¹Žè¡šã§æ¯ãè¿ããŸãã
UC Berkeleyã®ããããã»ãã¿ãŒãœã³æ°ãšKrste AsanoviÄæ°ã«ãã£ãŠããªãŒãã³ãœãŒã¹ã®ããŒããŠã§ã¢ããã³ãœãããŠã§ã¢ãããžã§ã¯ãã§ããRISC-VãéçºãããŸãããRISC-Vã¯ãæšæºåãããåœä»€ã»ããã¢ãŒããã¯ãã£(ISA)ãæäŸãããã¿ãŒãœã³æ°ãéçºããRISCã¢ãŒããã¯ãã£ã®ååã«åºã¥ããŠããŸãã
SiFiveã¯ãRISC-Vã¢ãŒããã¯ãã£ã®æ®åã«æ³šåããäŒæ¥ãšããŠèšç«ãããŸãããå瀟ã¯ããªãŒãã³ãœãŒã¹ã®RISC-Vã³ã¢ã䜿ã£ãããã»ããµã®éçºãããµããŒããæäŸããŠããŸãã
RISC-Vãã¡ãŠã³ããŒã·ã§ã³ã¯ããªãŒãã³ãœãŒã¹ã®RISC-Vã¢ãŒããã¯ãã£ã®éçºãæ®åãç®çãšããŠèšç«ãããŸãããåãã¡ãŠã³ããŒã·ã§ã³ã«ã¯ããœãããŠã§ã¢ãããŒããŠã§ã¢ã®äŒæ¥ãåå ããŠãããRISC-Vã¢ãŒããã¯ãã£ã®æ®åã«åããæ§ã
ãªæŽ»åãå±éããŠããŸãã
Googleã¯ãRISC-Vãããžã§ã¯ãã«åå ãããªãŒãã³ãœãŒã¹ã®RISC-Vããã»ããµã®éçºã«æ³šåããŠããŸããå瀟ã¯ãRISC-Vã䜿ã£ãAIãããã®éçºãããµãŒããŒåãã®ããã»ããµã®éçºãªã©ãé²ããŠããŸãã
NVIDIAã¯ãRISC-Vãããžã§ã¯ãã«åå ãããªãŒãã³ãœãŒã¹ã®RISC-Vã³ã¢ã䜿ã£ãããã»ããµã®éçºã«æ³šåããŠããŸããå瀟ã¯ããšããžããã€ã¹åãã®ããã»ããµã®éçºãªã©ãé²ããŠããŸãã
Western Digitalã¯ãã¹ãã¬ãŒãžããã€ã¹åãã®RISC-Vããã»ããµãæ¡çšããå瀟ã®è£œåã«çµã¿èŸŒãããšãçºè¡šããŸãããå瀟ã¯ãé«æ§èœãã€äœæ¶è²»é»åãªããã»ããµãå¿
èŠãªã¹ãã¬ãŒãžåžå Žã§ãRISC-Vãæ¡çšããããšã§ç«¶äºåãé«ããŠããŸãã
Amazonã¯ãRISC-Vãããžã§ã¯ãã«åå ããå瀟ã®AWSã¯ã©ãŠãåãã«RISC-Vããã»ããµãéçºããããšãçºè¡šããŸãããå瀟ã¯ãã«ã¹ã¿ãã€ãºãããããã»ããµã«ãã£ãŠã¯ã©ãŠãã®ããã©ãŒãã³ã¹ãåäžãããããšãç®æããŠããŸãã
Appleã¯ãèªç€Ÿã®è£œåã«ãããŠRISC-Væè¡ãæ¡çšããããšãæããã«ããŸãããå瀟ã¯ãRISC-Vã䜿ã£ãããããéçºããAppleã®è£œåã«çµã¿èŸŒãããšã§ãé«æ§èœãã€äœæ¶è²»é»åãªè£œåãæäŸããããšãç®æããŠããŸãã
RISC-Vã¯ãäœæ¶è²»é»åã§å°åãªIoTããã€ã¹ã«é©ããããã»ããµãšããŠæ³šç®ãéããŠããŸããå幎ãRISC-Vãæ¡çšããIoTããã€ã¹ã®æ°ãæ¥éã«å¢å ããRISC-Vã¢ãŒããã¯ãã£ãIoTåžå Žã§ã®ããã»ããµã®æšæºã«ãªãå¯èœæ§ãé«ãŸã£ãŠããŸãã
RISC-Vã¯ããªãŒãã³ãœãŒã¹ã§ãããããå€ãã®äŒæ¥ãéçºè
ãåå ããé²åãç¶ããŠããŸããä»åŸããRISC-Vã¢ãŒããã¯ãã£ã¯æ§ã
ãªåéã§ã®é©æ°ãããããããã€ã¯ãããã»ããµæè¡ã®çºå±ã«å¯äžããããšãæåŸ
ãããŸãã
ãZ80ã®èªçã
ãZ80ã®æåã
Z80ã¯ãåœåã¯ãã¬ãã®ãªã¢ã³ã³ãé»åãªã©ã®å°å家é»è£œåã«äœ¿ãããããšãæ³å®ããŠããŸããããåŸã«ã³ã³ãã¥ãŒã¿ãŒç£æ¥ã«ãããŠã倧ããªæåãåããŸãããZ80ãæèŒããã³ã³ãã¥ãŒã¿ãŒã¯ãåœæã®ããžãã¹åžå Žã«ãããŠå€§ããªåœ¹å²ãæãããCP/MãšåŒã°ãããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®æšæºçãªåäœç°å¢ãšãªããŸããããŸããZ80ã¯ã¢ãŒã±ãŒãã²ãŒã æ©ã«ãåºã䜿ãããåœæã®äººã
ã«ãšã£ãŠäžå¯æ¬ ãªãšã³ã¿ãŒãã€ã¡ã³ãã®äžã€ãšãªããŸããã
ãZ80ã®åŸç¶ã
Z80ã¯ããã®åŸãæ¹è¯ãç¶ããããZ180ãZ280ãšãã£ãåŸç¶è£œåããªãªãŒã¹ãããŸããããŸããZilog瀟ã¯Z80ã®ã©ã€ã»ã³ã¹ãå€æ°ã®äŒæ¥ã«æäŸããããšã§ãåºç¯ãªåžå Žãç²åŸããããšã«æåããŸãããããã«ãZilog瀟ã¯MCU(ãã€ã¯ãã³ã³ãããŒã©ãŠããã)ã«ãé²åºããçŸåšã§ãå¹
åºãåéã§æŽ»èºããŠããŸãã
ããŸãšãã
Zilog瀟ããªãªãŒã¹ããZ80ã¯ããã€ã¯ãããã»ããµæè¡ã®æŽå²ã«ãããŠéèŠãªäœçœ®ãå ããŠããŸããZ80ã¯ãå€ãã®åéã«ãããŠå
é²çãªæ§èœãçºæ®ããã³ã³ãã¥ãŒã¿ãŒç£æ¥ã«å€§ããªåœ±é¿ãäžããŸããããŸããZilog瀟ã¯Z80ã®æåãèæ¯ã«ãMCUåžå Žã§ã掻èºããããã«ãªããŸãããä»åŸããZilog瀟ãæäŸããæè¡ãäžçãå€ããå¯èœæ§ããããšèšããŸãã
ãã€ã¯ãããã»ããµãšã¯ãã³ã³ãã¥ãŒã¿ã®äžæ žãšãªãéšåã§ãããçŸä»£ã®ããžã¿ã«æ©åšã«æ¬ ãããªããã®ãšãªã£ãŠããŸããä»åã¯ããã®äžã§ãæ¥æ¬ã§è£œé ããããã€ã¯ãããã»ããµã«çŠç¹ãåœãŠããã€ã¯ãããã»ããµã®é²åãæ¯ãè¿ã£ãŠãããããšæããŸãã
æ¥æ¬ã®é»æ°é信倧åŠã®ç³äºè±äžéææããIntel瀟ã®4004ã«çæ³ãåŸãŠãåã®æ¥æ¬è£œãã€ã¯ãããã»ããµã§ãããTCM1000ããéçºãããããåžå Žã«ã¯æµžéããªãã£ãã
æŸäžé»åšç£æ¥(çŸã»ãããœããã¯)ãã4ããããã€ã¯ãããã»ããµãMN1610ããéçºãäž»ã«å®¶é»è£œåã®å¶åŸ¡ã«äœ¿ãããã
æ¥ç«è£œäœæã16ããããã€ã¯ãããã»ããµãHD64180ããéçºãåœæã¯æ¥æ¬è£œã®16ããããã€ã¯ãããã»ããµã¯ååšããã倧ããªæ³šç®ãéããã
æ¥æ¬é»æ°(NEC)ã16ããããã€ã¯ãããã»ããµãV30ããéçºãIntel瀟ã®ã8086ãäºæåã§ãããIBMã®PC/ATäºææ©åãã«æ¡çšãããã
å¯å£«éã32ããããã€ã¯ãããã»ããµãMB86900ããéçºãUNIXãµãŒããã¯ãŒã¯ã¹ããŒã·ã§ã³ã§äœ¿ãããã
æ¥ç«è£œäœæã32ããããã€ã¯ãããã»ããµãSH-1ããéçºãããŒããŠã§ã¢æµ®åå°æ°ç¹æŒç®åšãæèŒããããžã¿ã«ã«ã¡ã©ãæºåž¯é»è©±ãªã©ã«åºã䜿ãããã
ã«ããµã¹ãšã¬ã¯ãããã¯ã¹(æ§ã»æ¥æ¬é»æ°åå°äœ)ãã32ããããã€ã¯ãããã»ããµãV850ããéçºãèªåè»å¶åŸ¡ã·ã¹ãã ãªã©ã«åºã䜿ãããŠããã
å¯å£«éãšæ±èãå
±åéçºãã64ããããã€ã¯ãããã»ããµãSPARC64 VãããUNIXãµãŒããã¹ãŒããŒã³ã³ãã¥ãŒã¿ãªã©ã«æ¡çšãããã
以äžããæ¥æ¬è£œãã€ã¯ãããã»ããµã®äž»ãªå¹Žè¡šã§ããæ¥æ¬è£œã®ãã€ã¯ãããã»ããµã¯ãããããã®ç¹åŸŽã掻ãããŠå€æ§ãªçšéã§å©çšãããŠããŸããããã®äžã§ãç¹çãã¹ãã¯ãèªåè»å¶åŸ¡ã·ã¹ãã ãããžã¿ã«ã«ã¡ã©ãæºåž¯é»è©±ãšãã£ãå°åæ©åšã«äœ¿ãããŠããããšã§ãããããã®æ©åšã«ã¯ãçé»åãé«éåŠçãšãã£ãèŠçŽ ãæ±ããããŸããæ¥æ¬è£œã®ãã€ã¯ãããã»ããµã¯ãããããã®åéã§é«ãè©äŸ¡ãåŸãŠããŸãã
ãŸããæ¥æ¬ã®ãã€ã¯ãããã»ããµã¡ãŒã«ãŒã¯ã競äºåãç¶æããããã«ãæ°ããæè¡ã®éçºã«æ³šåããŠããŸããäŸãã°ãã«ããµã¹ãšã¬ã¯ãããã¯ã¹ã¯ãèªåè»çšã®é«ééä¿¡æè¡ãCAN-FDãã«å¯Ÿå¿ãããã€ã¯ãããã»ããµãéçºããŠããŸãããŸããæ±èã¯ãçé»åæè¡ãSpursEngineããæèŒãããã€ã¯ãããã»ããµãéçºããŠããŸãã
æ¥æ¬ã®ãã€ã¯ãããã»ããµã¡ãŒã«ãŒã¯ãä»åŸãäžçã«éçšããæè¡ãéçºããåœå
å€ã®æ§ã
ãªåéã§æŽ»èºããããšãæåŸ
ãããŸãã
ãã€ã¯ãããã»ããµã¯ãçŸä»£ã®é»åæ©åšã®ããã¯ããŒã³ã圢æããéèŠãªã³ã³ããŒãã³ãã§ããi432ãi860ãi960ãã€ã¯ãããã»ããµã¯ãä»æ¥ã®é«æ§èœããã»ããµã®çºå±ãæããé©åœçãªãããã§ãã
i432ã¯ãã€ã³ãã«ãéçºããåã®32ãããããã»ããµã§ããã1978幎ã«çºå£²ãããŸãããi432ã¯ãåœä»€ã»ããã¢ãŒããã¯ãã£(ISA)ã®èšèšãè€éã§ãæ§èœãäœãããšãåé¡ã§ããããã®ãããi432ã¯åæ¥çã«æåããããšã¯ãããŸããã§ããã
i860ã¯ã1989幎ã«ãªãªãŒã¹ãããRISC(Reduced Instruction Set Computing)ãã€ã¯ãããã»ããµã§ãããi860ã¯ãã°ã©ãã£ãã¯ã¹ãä¿¡å·åŠçãªã©ã®é«åºŠãªã¢ããªã±ãŒã·ã§ã³åãã«èšèšãããŠãããå€æ°ã®ããã»ããµãæèŒããã·ã¹ãã ã«äœ¿çšãããŸããã
i960ã¯ãi860ã®åŸç¶ãšããŠ1990幎ã«ãªãªãŒã¹ãããŸãããi960ã¯ãé«æ§èœãªãã«ãã¿ã¹ã¯åŠçèœåãåããã°ã©ãã£ãã¯ã¹ãä¿¡å·åŠçãªã©ã®ã¢ããªã±ãŒã·ã§ã³ã«æé©ã§ãããi960ã¯ãããŸããŸãªåéã§äœ¿çšãããç¹ã«ãããã¯ãŒã¯æ©åšãçµã¿èŸŒã¿ã·ã¹ãã ã«é©ããŠããŸããã
ããããIntelã®i960ã·ãªãŒãºã¯ã競åä»ç€Ÿã®è£œåãšæ¯èŒããŠé«äŸ¡ã§ãããšããåé¡ããããæåããªãã£ããšèããããŠããŸãã
Intelã¯ã2001幎ã«Itaniumããã»ããµããªãªãŒã¹ããŸãããItaniumã¯ãIntelã®64ãããããã»ããµã§ãããé«æ§èœã§ä¿¡é Œæ§ã®é«ããµãŒããŒåãã«èšèšãããŠããŸãããItaniumã¯ãè€æ°ã®ã³ã¢ãæèŒããé«åºŠãªäžŠååŠçèœåãæã¡ãé«åºŠãªã¡ã¢ãªã¢ãŒããã¯ãã£ãåããŠããŸããã
Itaniumã¯ãæåã¯é«ãæåŸ
ãå¯ããããŠããŸãããããœãããŠã§ã¢ã®äºææ§ã®åé¡ããããåžå Žã«æµžéããããšã¯ã§ããŸããã§ããã競åããx86ã¢ãŒããã¯ãã£ã«æ¯ã¹ãŠé«äŸ¡ã§ãããItaniumã«æé©åããããœãããŠã§ã¢ãäžè¶³ããŠããããšãäž»ãªèŠå ãšãããŠããŸãã
以äžã®ããã«ãi432ãi860ãi960ãItaniumã¯ãããããã®æ代ã«ãããŠé©æ°çãªãã€ã¯ãããã»ããµã§ãã£ããã®ã®ãããã€ãã®åé¡ã«ããåæ¥çã«æåããããšãã§ããŸããã§ããããããããããã®ããã»ããµã¯ãçŸä»£ã®ããã»ããµã®é²åãæ¯ããæè¡ã®åºç€ãšãªããã³ã³ãã¥ãŒã¿ç§åŠã®çºå±ã«å€§ããªåœ±é¿ãäžãããšèšããŸãã
ããã»ããµã¯ãã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®äžå¿çãªåœ¹å²ãæããéšåã§ãããæŒç®åŠçãããŒã¿åŠçãæ
åœããŠããŸããããã»ããµã®çš®é¡ãæ§èœã¯ãã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®æ§èœãæ©èœæ§ã«å€§ããªåœ±é¿ãäžããŸãã
RISCããã»ããµãŒãšCISCããã»ããµãŒã¯ãã³ã³ãã¥ãŒã¿ãŒããã»ããµãŒã®ã¢ãŒããã¯ãã£ã®èšèšæ¹æ³è«ãè¡šãçšèªã§ãããã»ããµãŒãå®è¡ããåœä»€ã®çš®é¡ãæ©èœãããã³ããã»ããµãŒå
éšã§ãããã®åœä»€ãåŠçããæ¹æ³ã«é¢ããéãã«åºã¥ããŠããŸãã
CISCããã»ããµãŒã¯ãå€æ§ãªåœä»€ã»ãããæã€ããšãç¹åŸŽã§ãã¡ã¢ãªã¢ã¯ã»ã¹ãæ¡ä»¶åå²ãç®è¡æŒç®ãããã³ãã®ä»ã®æ©èœãå«ã¿ãŸããCISCããã»ããµãŒã¯ãé«åºŠãªæ©èœãå®çŸããããã«å€æ§ãªåœä»€ãæã£ãŠãããè€éãªèšç®ãåŠçãå¿
èŠãªå Žåã«ã¯é«éã«åŠçãè¡ãããšãã§ããŸãããåœä»€ã»ããã®è€éããšé«åºŠãªæ©èœã«ãããããã»ããµãŒã®èšèšãšè£œé ã«å€§ããªã³ã¹ãããããå¯èœæ§ããããŸãã
äžæ¹ãRISCããã»ããµãŒã¯ãåçŽãªåœä»€ã»ãããæã€ããšãç¹åŸŽã§ãåºæ¬çãªç®è¡æŒç®ããããæŒç®ãããŒã/ã¹ãã¢æäœãããã³æ¡ä»¶åå²ãå«ã¿ãŸããRISCããã»ããµãŒã¯ãååœä»€ãå®è¡ãããéã«åäžã®ãµã€ã¯ã«ããå¿
èŠãšããªãå Žåãã»ãšãã©ã§ãåœä»€ã»ãããæ¯èŒçç°¡çŽ ã§ãããããããã»ããµãŒã®èšèšãšè£œé ã«äœãã³ã¹ãããããå¯èœæ§ããããŸãã
CISCãšRISCã®éãã«é¢ããè°è«ã¯ãããã»ããµãŒèšèšã®åéã§é·å¹Žç¶ããŠããŸãããšã³ãžãã¢ã®äžã«ã¯ãRISCã®ã¢ãããŒããã·ã³ãã«ã§ãããå¹ççãªããã»ããµãŒãèšèšããããšãã§ãããšäž»åŒµãã人ãããŸãããCISCã®ã¢ãããŒããå€æ§ãªæ©èœããµããŒãããããã«å¿
èŠã§ãããé«åºŠãªããã»ããµãŒãèšèšããããšãã§ãããšäž»åŒµãã人ãããŸãã
æè¿ã®ããã»ããµã§ã¯ãCISCãšRISCã®ç¹åŸŽãçµã¿åããããã€ããªããã¢ãŒããã¯ãã£ãæ¡çšãããããšããããŸããããã«ãããé«åºŠãªæ©èœãå®çŸãã€ã€ãé«éã§å¹ççãªåŠçãå¯èœã«ãªããŸãããã ãããã€ããªããã¢ãŒããã¯ãã£ã¯è€éãªãããèšèšãéçºã«æéããããå¯èœæ§ããããŸã
VLIW(Very Long Instruction Word)ã¯ãè€æ°ã®åœä»€ã1ã€ã®é·ãåœä»€ã¯ãŒãã«ãŸãšããŠåæã«å®è¡ã§ããã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ã§ããããã«ãããè€æ°ã®åœä»€ãåæã«åŠçããããšã§ãããã»ããµã®æ§èœãåäžãããããšãã§ããŸãã
VLIWããã»ããµã¯ãè€æ°ã®åœä»€ãåæã«å®è¡ããããšãã§ããããããã€ãã©ã€ã³åŠçã容æã«ãªããŸãããããŠãåœä»€ããã€ãã©ã€ã³åŠçããããã®ä»çµã¿ãæã£ãŠãããããåœä»€ãé«éãã€å¹ççã«åŠçããããšãã§ããŸãã
ãã ããVLIWããã»ããµã¯ãåœä»€ã1ã€ã®é·ãã¯ãŒãã«ããã¯ãããããåæã«å®è¡ã§ããåœä»€ã®æ°ãå¶éãããŸãããŸããåœä»€ãæé©ã«ããã¯ããå¿
èŠããããããããã°ã©ããŒã«å¶çŽããããŸããããã«ãããã»ããµããšã«æé©ãªåœä»€ã®ããã¯æ¹æ³ãç°ãªããããããã°ã©ããŒã¯ããã»ããµããšã«æé©ãªåœä»€ã®ããã¯æ¹æ³ãæ¢ãå¿
èŠããããŸãã
VLIWããã»ããµã¯ãäžè¬çã«çµã¿èŸŒã¿ã·ã¹ãã ãã°ã©ãã£ãã¯ã¹åŠçãªã©ã®ç¹å®ã®ã¢ããªã±ãŒã·ã§ã³ã«äœ¿çšãããŸãããããã®ã¢ããªã±ãŒã·ã§ã³ã§ã¯ãé«éãªåŠçãå¿
èŠã§ãããVLIWããã»ããµãåªããæ§èœãçºæ®ããããšããããŸãã
VLIWã¢ãŒããã¯ãã£ã®éçºè
ã¯ãåœä»€ã»ããã¢ãŒããã¯ãã£(ISA)ã®èšèšè
ãšååããå¿
èŠããããŸããISAã®èšèšè
ã¯ãããã°ã©ããŒãæé©ãªåœä»€ã®ããã¯æ¹æ³ãæ¢ãããã®æ
å ±ãæäŸããå¿
èŠããããŸãããŸããISAã®èšèšè
ã¯ãVLIWã¢ãŒããã¯ãã£ã«æé©ãªåœä»€ã»ãããèšèšããããšãæ±ããããŸãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã¯ãã³ã³ãã¥ãŒã¿ãŒã®åºç€çãªä»çµã¿ãšèšèšã«é¢ããåéã§ãã ãã®åéã§ã¯ãã³ã³ãã¥ãŒã¿ãŒã®æ§æèŠçŽ ãããŒã¿ã®è¡šçŸæ¹æ³ãããã°ã©ãã³ã°èšèªãåœä»€ã»ããã¢ãŒããã¯ãã£ãŒ(ISA)ããã€ã¯ã¢ãŒããã¯ãã£ãŒããã€ãã©ã€ã³åŠçãã¡ã¢ãªãŒéå±€ãå
¥åºåã·ã¹ãã ã䞊ååŠçãããã³è€æ°ã®ããã»ããµãŒã«ãããã«ãããã»ãã·ã³ã°ã«é¢ãããããã¯ãæ±ããŸãã",
"title": "ã¯ããã«"
},
{
"paragraph_id": 1,
"tag": "p",
"text": "æ¬æžã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã«é¢ããå¹
åºããããã¯ã網çŸ
ããããããç解ããããã«å¿
èŠãªåºç€ç¥èãæäŸããŸãããŸããæ¬æžã§ã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®èšèšãšå®è£
ã«é¢ããéèŠãªåé¡ã«çŠç¹ãåœãŠãææ°ã®æè¡ããã¬ã³ãã玹ä»ããŸãã",
"title": "ã¯ããã«"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã¯ãã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®èšèšãšæ©èœã®æŠèŠãå®çŸ©ããåéã§ããã€ãŸããã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã¯ãã³ã³ãã¥ãŒã¿ãŒå
éšã§ããŒã¿ãã©ã®ããã«åŠçãããã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ãã©ã®ããã«æ©èœãããã«ã€ããŠãç©ççãªèŠ³ç¹ãã説æãããã®ã§ãã",
"title": "ã¯ããã«"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã«ã¯ãããã»ããµãã¡ã¢ãªãŒãå
¥åºåããã€ã¹ãªã©ã®ã³ã³ããŒãã³ããå«ãŸããŸãããããã®ã³ã³ããŒãã³ãã¯ãããŒã¿ãåŠçããããã«å調ããŠåäœããŸãã",
"title": "ã¯ããã«"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "ãŸããã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã¯ããœãããŠã§ã¢ãšããŒããŠã§ã¢ã®çžäºäœçšã«ãéç¹ã眮ããŠããŸãããœãããŠã§ã¢ã¯ãã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®åäœãå¶åŸ¡ããããŒããŠã§ã¢ã¯ãœãããŠã§ã¢ã®èŠæ±ã«å¿ããŠãå¿
èŠãªæ©èœãæäŸããŸãã",
"title": "ã¯ããã«"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®èšèšã«ã¯ãæ§èœãä¿¡é Œæ§ãã»ãã¥ãªãã£ãªã©ã®èŠçŽ ããããŸããæ§èœã«ã€ããŠã¯ãåŠçé床ãã¡ã¢ãªãŒã¢ã¯ã»ã¹é床ãå
¥åºåããã€ã¹ã®ã¹ã«ãŒããããªã©ãéèŠã§ããä¿¡é Œæ§ã«ã€ããŠã¯ãã·ã¹ãã ã®æ
éçãããã¯ã¢ããã·ã¹ãã ã®èšèšããšã©ãŒæ€åºãšä¿®æ£ã®æ¹æ³ãªã©ãèæ
®ãããŸããã»ãã¥ãªãã£ã«ã€ããŠã¯ãã·ã¹ãã ã®è匱æ§ãã¢ã¯ã»ã¹å¶åŸ¡ãããŒã¿ä¿è·ãªã©ãéèŠã§ãã",
"title": "ã¯ããã«"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã¯ãã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®åºç€ã§ãããã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®æ§èœãæ©èœãæé©åããããã«éèŠã§ããã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®ç解ãæ·±ããããšã§ãé«éã§ä¿¡é Œæ§ã®é«ãã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ãèšèšããããšãã§ããŸãã",
"title": "ã¯ããã«"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "æ¬æžã§ã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®åºç€ãããé²åãå¿çšåéãŸã§ãåºç¯ãªç¯å²ãæ±ããŸããèªè
ã¯ãã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®æ§æèŠçŽ ãæ§èœææšãåœä»€ã»ããã¢ãŒããã¯ãã£ãŒãCPUã®æ§æãåäœãã¡ã¢ãªãŒãå
¥åºåã·ã¹ãã ã®æ§æãåäœããããŠã»ãã¥ãªãã£ãå¿çšåéã«ã€ããŠåŠã¶ããšãã§ããŸãã",
"title": "ã¯ããã«"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ãšã¯ãæ
å ±åŠçãè¡ãããã«å¿
èŠãªããŒããŠã§ã¢ããœãããŠã§ã¢ããããã¯ãŒã¯ã人éãªã©ã®èŠçŽ ãçµã¿åããã£ãŠæ§æãããã·ã¹ãã ã®ããšã§ãããã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã¯ãå
¥åãåŠçãåºåã®3ã€ã®åºæ¬æ©èœãæã¡ããããã®æ©èœãå®çŸããããã«å¿
èŠãªæ§æèŠçŽ ãååšããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®åºç€"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã¯ã以äžã®ãããªæ§æèŠçŽ ããæ§æãããŠããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®åºç€"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "ãããã®æ§æèŠçŽ ã¯å¯æ¥ã«é¢é£ããçžäºã«åœ±é¿ãåã£ãŠããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®åºç€"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã¯ãããŒããŠã§ã¢ãšãœãããŠã§ã¢ã®çµã¿åããã«ãã£ãŠæ§æãããŠããŸããããŒããŠã§ã¢ã¯ãäžå€®åŠçè£
眮(CPU)ãã¡ã¢ãªãå
¥åºå(I/O)æ©åšãªã©ãç©ççãªæ©åšãéšåã§æ§æãããŸããäžæ¹ããœãããŠã§ã¢ã¯ãããã°ã©ã ãããŒã¿ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãªã©ãã³ã³ãã¥ãŒã¿ãŒãå®è¡ããããã®åœä»€ãæ
å ±ã§ãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®åºç€"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "ãœãããŠã§ã¢ã¯ãããŒããŠã§ã¢äžã§åäœããããã«å¿
èŠãªåœä»€ãå«ãã§ããŸãããããã®åœä»€ã¯ãCPUã«ãã£ãŠå®è¡ãããŸãããŸãããœãããŠã§ã¢ã¯ãããŒããŠã§ã¢ã«å¯ŸããŠãããŒã¿ã®èªã¿æžããå
¥åºåã®å¶åŸ¡ãªã©ã®æäœãæ瀺ããŸããããŒããŠã§ã¢ã¯ããœãããŠã§ã¢ã«ãã£ãŠå¶åŸ¡ãããããšã§ãã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã å
šäœãåäœããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®åºç€"
},
{
"paragraph_id": 13,
"tag": "p",
"text": "ããŒããŠã§ã¢ãšãœãããŠã§ã¢ã¯ããäºãã«å¯æ¥ã«é¢é£ããŠããŸããããšãã°ããœãããŠã§ã¢ã¯ãCPUãã¡ã¢ãªãªã©ã®ããŒããŠã§ã¢è³æºãå¿
èŠãšããŸãããŸããããŒããŠã§ã¢ã®æ§èœã¯ããœãããŠã§ã¢ã®æ§èœã«åœ±é¿ãäžããŸããã€ãŸããããŒããŠã§ã¢ãšãœãããŠã§ã¢ã¯ãã·ã¹ãã å
šäœã®æ§èœã«åœ±é¿ãäžãããããäž¡æ¹ãæé©åããããšãéèŠã§ãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®åºç€"
},
{
"paragraph_id": 14,
"tag": "p",
"text": "ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®æ§èœã枬å®ããããã«ã¯ãæ§ã
ãªææšããããŸãã以äžã§ã¯ãäž»èŠãªæ§èœææšã«ã€ããŠèª¬æããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®åºç€"
},
{
"paragraph_id": 15,
"tag": "p",
"text": "åœä»€ã»ããã¢ãŒããã¯ãã£ãŒã¯ãã³ã³ãã¥ãŒã¿ã®ããŒããŠã§ã¢ãšãœãããŠã§ã¢ã®äž¡æ¹ãèšèšããäžã§éèŠãªåœ¹å²ãæããã¢ãŒããã¯ãã£ãŒã®äžã€ã§ããåœä»€ã»ããã¢ãŒããã¯ãã£ãŒã¯ãããã»ããµãå®è¡ã§ããåœä»€ã®ã»ãããå®çŸ©ãããã®åœä»€ãã©ã®ããã«åŠçããããå®çŸ©ããŸãã",
"title": "åœä»€ã»ããã¢ãŒããã¯ãã£ãŒ"
},
{
"paragraph_id": 16,
"tag": "p",
"text": "åœä»€ã»ããã®æŠèŠã§ã¯ãåœä»€ã»ããã¢ãŒããã¯ãã£ãŒã«é¢ããåºæ¬çãªæ
å ±ãæäŸããŸãããã®ç« ã§ã¯ãåœä»€ã»ããã®æŠèŠãåœä»€ã»ããã®éèŠãªæŠå¿µãåœä»€ã»ããã®çš®é¡ãããã³åœä»€ã»ããã®åºæ¬çãªæ©èœã«ã€ããŠèª¬æããŸãã",
"title": "åœä»€ã»ããã¢ãŒããã¯ãã£ãŒ"
},
{
"paragraph_id": 17,
"tag": "p",
"text": "åœä»€ã®çš®é¡ãšãã©ãŒãããã§ã¯ãåœä»€ã»ããã¢ãŒããã¯ãã£ãŒã«ãããåœä»€ã®çš®é¡ãšãã®ãã©ãŒãããã«ã€ããŠè©³ãã説æããŸãããã®ç« ã§ã¯ãåœä»€ã®çš®é¡ãšããŠç®è¡ãè«çãæ¯èŒããžã£ã³ããªã©ãå«ãŸããŸãããŸããåœä»€ã®ãã©ãŒãããã«ã€ããŠã説æãããããã©ã®ããã«ããã»ããµã§å®è¡ããããã«ã€ããŠã説æããŸãããã®ç« ã§ã¯ãåœä»€ã®æå³ã䜿ãæ¹ãåœä»€ã®ãã€ãæ°ããªãã©ã³ãã®æ°ãããã³ãã®ãªãã©ã³ãã®åã«ã€ããŠã説æããŸãã",
"title": "åœä»€ã»ããã¢ãŒããã¯ãã£ãŒ"
},
{
"paragraph_id": 18,
"tag": "p",
"text": "åœä»€ã»ãããšã¯ãã³ã³ãã¥ãŒã¿ããã€ã¯ãããã»ããµãå®è¡ã§ããåœä»€ã®éåã§ããã³ã³ãã¥ãŒã¿ããã€ã¯ãããã»ããµã¯ãããã°ã©ã ãå®è¡ãããéã«ãåœä»€ã»ããã«å«ãŸããåœä»€ã1ã€ãã€è§£éããŠå®è¡ããŸãã",
"title": "åœä»€ã»ããã¢ãŒããã¯ãã£ãŒ"
},
{
"paragraph_id": 19,
"tag": "p",
"text": "åœä»€ã»ããã«ã¯ãç®è¡æŒç®ãè«çæŒç®ãã¡ã¢ãªã¢ã¯ã»ã¹ããžã£ã³ããªã©ã®åºæ¬çãªæäœãå«ãŸããŠããŸãããŸããåœä»€ã»ããã¯ãã³ã³ãã¥ãŒã¿ã®ã¢ãŒããã¯ãã£ã«ãã£ãŠç°ãªããŸããäŸãã°ãx86ã¢ãŒããã¯ãã£çšã®åœä»€ã»ããã¯ãARMã¢ãŒããã¯ãã£çšã®åœä»€ã»ãããšç°ãªããŸãã",
"title": "åœä»€ã»ããã¢ãŒããã¯ãã£ãŒ"
},
{
"paragraph_id": 20,
"tag": "p",
"text": "åœä»€ã»ããã¯ãããã°ã©ããã³ã³ãã¥ãŒã¿ããã€ã¯ãããã»ããµã«å¯ŸããŠçŽæ¥æäœããããšãã§ããããã§ã¯ãããŸããããããã°ã©ãã³ã°èšèªãã³ã³ãã€ã©ãªã©ã®ãœãããŠã§ã¢ã«ãã£ãŠãåœä»€ã»ããã䜿çšããããã°ã©ãã³ã°ãå¯èœã«ãªããŸãã",
"title": "åœä»€ã»ããã¢ãŒããã¯ãã£ãŒ"
},
{
"paragraph_id": 21,
"tag": "p",
"text": "åœä»€ã®çš®é¡ã¯ãã³ã³ãã¥ãŒã¿ã®ã¢ãŒããã¯ãã£ã«ãã£ãŠç°ãªããŸãããåºæ¬çã«ã¯ç®è¡åœä»€ãè«çåœä»€ããžã£ã³ãåœä»€ãåå²åœä»€ãããŒã¿è»¢éåœä»€ãªã©ããããŸããåœä»€ãã©ãŒãããã¯ãåœä»€ãè¡šãããã®ãããã®ãã¿ãŒã³ã§ããåœä»€ãã©ãŒãããã«ã¯ããªãã³ãŒã(æäœã³ãŒã)ããªãã©ã³ã(æäœå¯Ÿè±¡)ãªã©ãå«ãŸããŸããåœä»€ãã©ãŒãããã¯ãããã°ã©ã ãã³ã³ãã€ã«ãããšãã«äœ¿çšãããã³ã³ãã€ã©ã®éèŠãªèŠçŽ ã§ãããããã°ã©ã ã®å®è¡å¹çãé床ã«åœ±é¿ãäžããŸãã",
"title": "åœä»€ã»ããã¢ãŒããã¯ãã£ãŒ"
},
{
"paragraph_id": 22,
"tag": "p",
"text": "äŸãã°ãX86ãšARMã¯ç°ãªãã¢ãŒããã¯ãã£ã§ãããåœä»€ã»ããã¢ãŒããã¯ãã£(ISA)ãç°ãªããããã ãŒãåœä»€ã®ããŒã¢ããã¯ãšãã€ããã©ãŒããããç°ãªããŸãã",
"title": "åœä»€ã»ããã¢ãŒããã¯ãã£ãŒ"
},
{
"paragraph_id": 23,
"tag": "p",
"text": "以äžã«ããããã®ã¢ãŒããã¯ãã£ã«ãããã ãŒãåœä»€ã®äŸã瀺ããŸãã",
"title": "åœä»€ã»ããã¢ãŒããã¯ãã£ãŒ"
},
{
"paragraph_id": 24,
"tag": "p",
"text": "X86ã®å Žåãã ãŒãåœä»€ã«ã¯MOVããããŸããäžè¬çãªMOVåœä»€ã®åœ¢åŒã¯ã以äžã®ããã«ãªããŸãã",
"title": "åœä»€ã»ããã¢ãŒããã¯ãã£ãŒ"
},
{
"paragraph_id": 25,
"tag": "p",
"text": "destinationã«ã¯ã移åå
ã®ãªãã©ã³ããæå®ããŸããsourceã«ã¯ã移åå
ã®ãªãã©ã³ããæå®ããŸãã",
"title": "åœä»€ã»ããã¢ãŒããã¯ãã£ãŒ"
},
{
"paragraph_id": 26,
"tag": "p",
"text": "äŸãã°ã以äžã®åœä»€ã¯ãã¬ãžã¹ã¿eaxã«å€0x1234ãããŒãããŸãã",
"title": "åœä»€ã»ããã¢ãŒããã¯ãã£ãŒ"
},
{
"paragraph_id": 27,
"tag": "p",
"text": "ãã®åœä»€ã®ãã€ããã©ãŒãããã¯ã以äžã®éãã§ãã",
"title": "åœä»€ã»ããã¢ãŒããã¯ãã£ãŒ"
},
{
"paragraph_id": 28,
"tag": "p",
"text": "ARMã®å Žåããã ãŒãåœä»€ã«ã¯MOVããããŸããARMã®MOVåœä»€ã¯ã以äžã®ããã«ãªããŸãã",
"title": "åœä»€ã»ããã¢ãŒããã¯ãã£ãŒ"
},
{
"paragraph_id": 29,
"tag": "p",
"text": "destinationã«ã¯ã移åå
ã®ã¬ãžã¹ã¿ãæå®ããŸããsourceã«ã¯ã移åå
ã®ã¬ãžã¹ã¿ãŸãã¯å³å€ãæå®ããŸãã",
"title": "åœä»€ã»ããã¢ãŒããã¯ãã£ãŒ"
},
{
"paragraph_id": 30,
"tag": "p",
"text": "äŸãã°ã以äžã®åœä»€ã¯ãã¬ãžã¹ã¿r0ã«å€0x1234ãããŒãããŸãã",
"title": "åœä»€ã»ããã¢ãŒããã¯ãã£ãŒ"
},
{
"paragraph_id": 31,
"tag": "p",
"text": "ãã®åœä»€ã®ãã€ããã©ãŒãããã¯ã以äžã®éãã§ãã",
"title": "åœä»€ã»ããã¢ãŒããã¯ãã£ãŒ"
},
{
"paragraph_id": 32,
"tag": "p",
"text": "åœä»€ã®å®è¡ãµã€ã¯ã«ãšå¶åŸ¡æ¹åŒã«ã€ããŠåŠã¶ããšã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®åºç€çãªæŠå¿µã®äžã€ã§ãããã®ãããã¯ã§ã¯ãããã»ããµãåœä»€ãå®è¡ããããã®ãµã€ã¯ã«ããå¶åŸ¡æ¹åŒã«ã€ããŠåŠã³ãŸãã",
"title": "åœä»€ã»ããã¢ãŒããã¯ãã£ãŒ"
},
{
"paragraph_id": 33,
"tag": "p",
"text": "åœä»€ã®å®è¡ãµã€ã¯ã«ã¯ãåœä»€ãå®è¡ããããã«å¿
èŠãªæé ã®äžé£ã®ããšãæããŸããäžè¬çã«ãåœä»€å®è¡ãµã€ã¯ã«ã«ã¯ããã§ãã(åœä»€ã®ååŸ)ããã³ãŒã(åœä»€ã解èª)ãå®è¡(åœä»€ãå®è¡)ã®3ã€ã®æ®µéããããŸãããããã®ã¹ãããã¯ãããã»ããµãåœä»€ãå®è¡ããããã«å¿
èŠãªããã»ã¹ã§ãããããã»ããµå
ã®åéšåãæ£ç¢ºã«åæããŠåäœããå¿
èŠããããŸãã",
"title": "åœä»€ã»ããã¢ãŒããã¯ãã£ãŒ"
},
{
"paragraph_id": 34,
"tag": "p",
"text": "å¶åŸ¡æ¹åŒã¯ãåœä»€ãå®è¡ããããã®ããã»ããµå
ã®åéšåã®åäœãå¶åŸ¡ããããã«äœ¿çšãããæ¹æ³ãæããŸããããã»ããµã®å¶åŸ¡æ¹åŒã«ã¯ããã€ã¯ãããã°ã©ã æ¹åŒãšããŒããŠã§ã¢æ¹åŒã®2ã€ããããŸãããã€ã¯ãããã°ã©ã æ¹åŒã¯ãåœä»€ã®å®è¡ã決å®ããããã«ãåœä»€ã»ããã¢ãŒããã¯ãã£ã®ãã€ã¯ãããã°ã©ã ã䜿çšããŸããäžæ¹ãããŒããŠã§ã¢æ¹åŒã¯ãå¶åŸ¡åè·¯ã«ãã£ãŠå®è¡ããããããããé«éãªå®è¡ãå¯èœã§ãã",
"title": "åœä»€ã»ããã¢ãŒããã¯ãã£ãŒ"
},
{
"paragraph_id": 35,
"tag": "p",
"text": "ãã€ã¯ãã¢ãŒããã¯ãã£ãŒãšã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®èšèšã®ãã¡ãããã»ããµãŒã®å
éšæ§é ãæ©èœãå®çŸããããã®èšèšãæããŸããã€ãŸãããã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ãããã»ããµãŒã®åœä»€ã»ããã¢ãŒããã¯ãã£ãŒ(ISA)ãå®éã«å®è£
ããæ¹æ³ãå®çŸ©ãããã®ã§ãã",
"title": "ãã€ã¯ã¢ãŒããã¯ãã£ãŒ"
},
{
"paragraph_id": 36,
"tag": "p",
"text": "ãã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ãããã»ããµãŒã®åŠçèœåãæ¶è²»é»åãããã³ãã®ä»ã®ç¹æ§ã«åœ±é¿ãäžããŸãããããã£ãŠããã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ãããã»ããµãŒã®æ§èœãåäžãããããã«æé©åããããšãã§ããŸãã",
"title": "ãã€ã¯ã¢ãŒããã¯ãã£ãŒ"
},
{
"paragraph_id": 37,
"tag": "p",
"text": "ãã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ãããã€ãã®éšåã§æ§æãããŸããäŸãã°ãã¢ãã¬ã¹çæãŠããã(AGU)ã¯ãããã»ããµãŒãã¢ãã¬ã¹ãçæããããã®åè·¯ã§ãããæŒç®ãŠãããã¯ãç®è¡æŒç®ãè«çæŒç®ãå®è¡ããããã®åè·¯ã§ãããŸããã¬ãžã¹ã¿ãã¡ã€ã«ã¯ãããã»ããµãŒãããŒã¿ãä¿åããããã®åè·¯ã§ããããã£ãã·ã¥ã¯ãããã»ããµãŒããã䜿çšããããŒã¿ãé«éã«ã¢ã¯ã»ã¹ããããã®åè·¯ã§ãã",
"title": "ãã€ã¯ã¢ãŒããã¯ãã£ãŒ"
},
{
"paragraph_id": 38,
"tag": "p",
"text": "ãã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ãISAã«ãã£ãŠå®çŸ©ãããåœä»€ãå®è¡ããããã«ãåœä»€ãã³ãŒãåè·¯ã䜿çšããŸããåœä»€ãã³ãŒãåè·¯ã¯ãISAã§å®çŸ©ãããåœä»€ã解éãããããå®éã®ããã»ããµãŒåè·¯ã§å®è¡ããããã«å¿
èŠãªå¶åŸ¡ä¿¡å·ãçæããŸãã",
"title": "ãã€ã¯ã¢ãŒããã¯ãã£ãŒ"
},
{
"paragraph_id": 39,
"tag": "p",
"text": "ãã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ãããã»ããµãŒã®æ§èœãšæ¶è²»é»åã®äž¡æ¹ãæ¹åããããã«æé©åããããšãã§ããŸããäŸãã°ããã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ã䞊ååŠçã䜿çšããŠè€æ°ã®åœä»€ãåæã«å®è¡ããããšãã§ããŸãããŸãããã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ãããå¹ççãªãã£ãã·ã¥ããã€ãã©ã€ã³ãªã©ã®åè·¯ã䜿çšããŠãããã»ããµãŒã®æ§èœãåäžãããããšãã§ããŸãã",
"title": "ãã€ã¯ã¢ãŒããã¯ãã£ãŒ"
},
{
"paragraph_id": 40,
"tag": "p",
"text": "æè¿ã®ãã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ãçé»ååã泚ç®ãããŠããŸãããã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ãã¹ãªãŒãã¢ãŒããåçé»å§ã¹ã±ãŒãªã³ã°ãªã©ã®æè¡ã䜿çšããŠãããã»ããµãŒã®æ¶è²»é»åã®äœæžãå³ã£ãŠããŸãã",
"title": "ãã€ã¯ã¢ãŒããã¯ãã£ãŒ"
},
{
"paragraph_id": 41,
"tag": "p",
"text": "ãã€ã¯ãã³ãŒãã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã«ãããŠéåžžã«éèŠãªåœ¹å²ãæããæŠå¿µã®äžã€ã§ãããã€ã¯ãã³ãŒãã¯ãããã»ããµãåœä»€ãå®è¡ããããã®å
éšåäœã決å®ããããã®åœä»€ã»ããã§ãããäœã¬ãã«ã®åœä»€ãé«ã¬ãã«ã®åœä»€ã«å€æããããã«äœ¿çšãããŸãã",
"title": "ãã€ã¯ãã³ãŒã"
},
{
"paragraph_id": 42,
"tag": "p",
"text": "ãã€ã¯ãã³ãŒãã¯ãããã»ããµã®ããŒããŠã§ã¢ãšãœãããŠã§ã¢ã®äžéã«äœçœ®ããã¬ãã«ã§åäœããŸãããã€ã¯ãã³ãŒãã¯ãããã»ããµã®ååœä»€ã®åäœãå®çŸ©ããäžé£ã®ãã€ã¯ãåœä»€ã§æ§æãããŸãããããã®ãã€ã¯ãåœä»€ã¯ãåºæ¬çã«ã¯ãããã»ããµå
ã®ã¬ãžã¹ã¿ãŒãã¢ã«ãŽãªãºã ãªã©ã®èŠçŽ ãå¶åŸ¡ããããã®åœä»€ã§ãã",
"title": "ãã€ã¯ãã³ãŒã"
},
{
"paragraph_id": 43,
"tag": "p",
"text": "ãã€ã¯ãã³ãŒãã¯ãããã»ããµã®èšèšã«ãããŠå€ãã®å©ç¹ããããããŸããæãéèŠãªå©ç¹ã¯ããã€ã¯ãã³ãŒãã䜿çšããããšã§ãããã»ããµã®èšèšãç°¡ç¥åã§ããããšã§ããããã»ããµã®èšèšè
ã¯ãé«ã¬ãã«ã®åœä»€ãå®è¡ããããã«å¿
èŠãªãã¹ãŠã®äœã¬ãã«ã®åœä»€ãæžãå¿
èŠããªãã代ããã«ãã€ã¯ãã³ãŒãã«ãã£ãŠãããã®äœã¬ãã«ã®åœä»€ãå®è¡ããããšãã§ããŸãã",
"title": "ãã€ã¯ãã³ãŒã"
},
{
"paragraph_id": 44,
"tag": "p",
"text": "ãŸãããã€ã¯ãã³ãŒãã¯ãããã»ããµã®åœä»€ã»ãããå€æŽããããã«ã䜿çšã§ããŸããããã«ãããæ°ããåœä»€ã»ãããç°¡åã«è¿œå ããããšãã§ããããã»ããµã®æ©èœãæ¡åŒµããããšãã§ããŸãã",
"title": "ãã€ã¯ãã³ãŒã"
},
{
"paragraph_id": 45,
"tag": "p",
"text": "ãããããã€ã¯ãã³ãŒãã䜿çšããããšã«ã¯ããã€ãã®æ¬ ç¹ããããŸããæãéèŠãªæ¬ ç¹ã¯ããã€ã¯ãã³ãŒããåœä»€ã®å®è¡é床ã«åœ±é¿ãäžããå¯èœæ§ãããããšã§ãããã€ã¯ãã³ãŒãã®åŠçã«æéããããå Žåãããã»ããµã®æ§èœãäœäžããå¯èœæ§ããããŸãããã®ãããããã»ããµã®èšèšè
ã¯ããã€ã¯ãã³ãŒããå¹ççã«åŠçããããã«èšèšããå¿
èŠããããŸãã",
"title": "ãã€ã¯ãã³ãŒã"
},
{
"paragraph_id": 46,
"tag": "p",
"text": "CPUã¯ãå¶åŸ¡ãŠããããæŒç®ãŠããããã¬ãžã¹ã¿ããã¹ãã¯ããã¯ãªã©ã®æ§æèŠçŽ ã§æ§æãããŸããå¶åŸ¡ãŠãããã¯ãããã°ã©ã ã«ãŠã³ã¿ãã次ã®åœä»€ãåãåºããŠãåœä»€ã解èªããæŒç®ãŠãããã«åœä»€ãéä¿¡ãã圹å²ãæã¡ãŸããæŒç®ãŠãããã¯ãç®è¡æŒç®ãè«çæŒç®ãå®è¡ããçµæãã¬ãžã¹ã¿ã«ä¿åããŸããã¬ãžã¹ã¿ã¯ãCPUå
ã®äžæçãªèšæ¶è£
眮ã§ãããããŒã¿ãä¿æããããã«äœ¿çšãããŸãããã¹ã¯ãCPUãšä»ã®ã³ã³ããŒãã³ã(ã¡ã¢ãªãå
¥åºåè£
眮ãªã©)ã®éã§ããŒã¿ã転éããããã«äœ¿çšãããŸããã¯ããã¯ã¯ãCPUå
ã®åã³ã³ããŒãã³ããåæããŠåäœããããã«å¿
èŠãªã¿ã€ãã³ã°ä¿¡å·ãçæããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 47,
"tag": "p",
"text": "CPUã®åŠçé床ãåäžãããããã«ããã€ãã©ã€ã³åŠçãã¹ãŒããŒã¹ã«ã©ãŒåŠçã䜿çšãããŸãããã€ãã©ã€ã³åŠçã¯ãè€æ°ã®åœä»€ãåæã«å®è¡ããããšãã§ãããããCPUã®æ§èœãåäžãããããšãã§ããŸããã¹ãŒããŒã¹ã«ã©ãŒåŠçã¯ã1ã€ã®åœä»€ãè€æ°ã®æŒç®ãŠãããã§åæã«å®è¡ããããšãã§ãããããããé«éãªåŠçãå®çŸããããšãã§ããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 48,
"tag": "p",
"text": "ãã€ãã©ã€ã³åŠçã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã«ãããéèŠãªæŠå¿µã®1ã€ã§ãããè€æ°ã®åœä»€ãåæã«å®è¡ããããšã§åŠçé床ãé«éåããæ¹æ³ã§ãããã€ãã©ã€ã³åŠçã¯ãåœä»€ã®å®è¡ã«å¿
èŠãªã¹ããããè€æ°ã®æ®µéã«åå²ããåã¹ããããåæã«å®è¡ããããšã«ãã£ãŠå®çŸãããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 49,
"tag": "p",
"text": "ãã€ãã©ã€ã³åŠçã«ã¯ã以äžã®5ã€ã®æ®µéããããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 50,
"tag": "p",
"text": "åã¹ãããã¯ãåã®ã¹ããããå®äºãããšåæã«éå§ãããŸããã€ãŸããååŸã¹ããŒãžãå§ãŸããšåæã«ããã³ãŒãã¹ããŒãžãå§ãŸããŸããããã«ãããè€æ°ã®åœä»€ãåæã«åŠçããããããåŠçé床ãåäžããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 51,
"tag": "p",
"text": "ãã ãããã€ãã©ã€ã³åŠçã«ã¯ããã€ãã®èª²é¡ããããŸããäŸãã°ãåœä»€éã®äŸåé¢ä¿ãããå Žåã次ã®åœä»€ãå®è¡ãããåã«åã®åœä»€ãå®äºãããŸã§åŸ
ããªããã°ãªããªãããããã€ãã©ã€ã³åŠçã®å¹æãæžå°ããŸãããŸããåå²åœä»€ã®å Žåãã©ã¡ãã®åå²ãå®è¡ããããããããªãããããã€ãã©ã€ã³åŠçãéäžã§äžæããåŠçé床ãäœäžããããšããããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 52,
"tag": "p",
"text": "ãããã®èª²é¡ã解決ããããã«ããã€ãã©ã€ã³åŠçã«ã¯ããã€ãã®æ¹åçããããŸããäŸãã°ãã¢ãŠãã»ãªãã»ãªãŒããŒå®è¡(Out-of-Order Execution)ãåå²äºæž¬(Branch Prediction)ãªã©ããããŸããã¢ãŠãã»ãªãã»ãªãŒããŒå®è¡ã¯ãåœä»€ãå®è¡ããé åºãå€æŽããããšã§äŸåé¢ä¿ã解決ããåå²äºæž¬ã¯ãåå²åœä»€ã®å®è¡å
ãäºæž¬ããããšã§ãã€ãã©ã€ã³åŠçãéäžã§äžæããåæ°ãæžããããšãã§ããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 53,
"tag": "p",
"text": "ã¹ãŒããŒãã€ãã©ã€ã³ãšããææ³ã§ã¯ãæãæéã®ããããã€ãã©ã€ã³ã®ã¹ããŒãžã2ã€ä»¥äžã«åå²ããããšã§ãã¯ããã¯åšæ³¢æ°ã®äžéãåŒãäžããããšãã§ããŸãã ãã ããã¹ããŒãžæ°ãç¡å¶éã«å¢ãããšãåå²ãçºçããå Žåã®ããã«ãã£ãå¢å€§ãããããæ
éã«èæ
®ããå¿
èŠããããŸãããŸããã¯ããã¯åšæ³¢æ°ãäžããããšã§æ¶è²»é»åãå¢å ãããããé»åæ¶è²»ã«ãé
æ
®ããå¿
èŠããããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 54,
"tag": "p",
"text": "ã¹ãŒããŒã¹ã«ã©ãŒããã»ããµãŒã¯ãã·ã³ã°ã«ããã»ããµå
ã§ã®åœä»€ã¬ãã«äžŠåæ§ãšåŒã°ãã圢åŒã®äžŠåæ§ãå®è£
ããCPUã§ããã¹ã«ã©ãŒããã»ããµãŒã¯ã1ã€ã®ã¯ããã¯ãµã€ã¯ã«ãããæ倧1ã€ã®åäžã®åœä»€ããå®è¡ã§ããªãã®ã«å¯Ÿããã¹ãŒããŒã¹ã«ã©ãŒããã»ããµãŒã¯ãåæã«è€æ°ã®åœä»€ãããã»ããµå
ã®ç°ãªãå®è¡ãŠãããã«éä¿¡ããããšã§ã1ã€ã®ã¯ããã¯ãµã€ã¯ã«äžã«è€æ°ã®åœä»€ãå®è¡ã§ããŸãããã®ãããäžããããã¯ããã¯ã¬ãŒãã§å¯èœãªå Žåãããã¹ã«ãŒããã(åäœæéãããã«å®è¡ã§ããåœä»€æ°)ãé«ããªããŸããåå®è¡ãŠãããã¯ãCPUå
ã®åäžã®ç®è¡è«çæŒç®è£
眮ã®ãããªãå¥ã
ã®ããã»ããµ(ãŸãã¯ãã«ãã³ã¢ããã»ããµã®å Žåã¯ã³ã¢)ã§ã¯ãããŸããã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 55,
"tag": "p",
"text": "ã·ã³ã°ã«ã³ã¢ã®ã¹ãŒããŒã¹ã«ã©ãŒããã»ããµãŒã¯ãSISDããã»ããµãŒ(ã·ã³ã°ã«åœä»€ã¹ããªãŒã ãã·ã³ã°ã«ããŒã¿ã¹ããªãŒã )ãšåé¡ãããŸãããçããã¯ãã«æŒç®ããµããŒãããã·ã³ã°ã«ã³ã¢ã®ã¹ãŒããŒã¹ã«ã©ãŒããã»ããµãŒã¯ãSIMD(ã·ã³ã°ã«åœä»€ã¹ããªãŒã ããã«ãããŒã¿ã¹ããªãŒã )ãšåé¡ãããå¯èœæ§ããããŸãããã«ãã³ã¢ã®ã¹ãŒããŒã¹ã«ã©ãŒããã»ããµãŒã¯ãMIMDããã»ããµãŒ(ãã«ããã«åœä»€ã¹ããªãŒã ããã«ããã«ããŒã¿ã¹ããªãŒã )ãšåé¡ãããŸãã ã¹ãŒããŒã¹ã«ã©ãŒCPUã¯éåžžãã€ãã©ã€ã³åŠçãè¡ãããŠããŸãããã¹ãŒããŒã¹ã«ã©ãŒåŠçãšãã€ãã©ã€ã³åŠçã¯ç°ãªãããã©ãŒãã³ã¹åäžæè¡ãšèããããŠããŸããåè
ã¯è€æ°ã®å®è¡ãŠãããã䜿çšããŠè€æ°ã®åœä»€ã䞊åã«å®è¡ããåŸè
ã¯å®è¡ãŠããããç°ãªããã§ãŒãºã«åå²ããŠåãå®è¡ãŠãããã§è€æ°ã®åœä»€ã䞊åã«å®è¡ããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 56,
"tag": "p",
"text": "ã¹ãŒããŒã¹ã«ã©ãŒãã¯ããã¯ã¯ãé垞以äžã®ç¹åŸŽãšé¢é£ä»ããããŸã:",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 57,
"tag": "p",
"text": "ãã¶ãŒããšã¯ãã³ã³ãã¥ãŒã¿ã¢ãŒããã¯ãã£ã«ãããŠãåœä»€å®è¡ã®é åºã«é¢ããåé¡ã®ããšãæããŸãããã¶ãŒããçºçãããšãæ£ããçµæãåŸãããã«å¿
èŠãªåœä»€å®è¡ã®é åºãä¹±ããŠããŸãããšããããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 58,
"tag": "p",
"text": "äŸãã°ãããåœä»€ãå®è¡ãããåã«ããã®åœä»€ãå¿
èŠãšããããŒã¿ããŸã çšæãããŠããªãå Žåããã¶ãŒããçºçããŸãããã®å Žåãå¿
èŠãªããŒã¿ãçšæããããŸã§ãåœä»€ã®å®è¡ãåŸ
ããªããã°ãªãããå®è¡é床ãé
ããªãå¯èœæ§ããããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 59,
"tag": "p",
"text": "ãã¶ãŒãã解決ããããã«ã¯ãããã€ãã®æ¹æ³ããããŸããäŸãã°ãåœä»€ã®å®è¡é åºãå€æŽããããšãåœä»€ã®å®è¡ã«å¿
èŠãªããŒã¿ãäºåã«çšæããããšãåœä»€å®è¡ã®éäžã§ä»ã®åœä»€ãå®è¡ããããšãªã©ããããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 60,
"tag": "p",
"text": "ãã¶ãŒãã®çš®é¡ã«ã¯ãããŒã¿ãã¶ãŒããå¶åŸ¡ãã¶ãŒããæ§é ãã¶ãŒããªã©ããããŸããããŒã¿ãã¶ãŒãã¯ãåœä»€ãå¿
èŠãšããããŒã¿ããŸã çšæãããŠããªãå Žåã«çºçããŸããå¶åŸ¡ãã¶ãŒãã¯ãåå²åœä»€ãªã©ã®å¶åŸ¡ãããŒãå€æŽããåœä»€ã®å®è¡ã«ãã£ãŠçºçããŸããæ§é ãã¶ãŒãã¯ãè€æ°ã®åœä»€ãåæã«å®è¡ãããããšã«ãã£ãŠãå®è¡ãŠããããªã©ã®ãªãœãŒã¹ã競åããããšã§çºçããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 61,
"tag": "p",
"text": "ãã¶ãŒããçºçãããšãããã°ã©ã ã®å®è¡é床ãé
ããªããããé«éãªã³ã³ãã¥ãŒã¿ã¢ãŒããã¯ãã£ãèšèšããå Žåã«ã¯ããã¶ãŒãã®è§£æ±ºæ¹æ³ã«ã€ããŠååã«èæ
®ããå¿
èŠããããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 62,
"tag": "p",
"text": "ææ©å®è¡ãšã¯ãã³ã³ãã¥ãŒã¿ãŒã®ããã»ããµãŒã«ãããŠãããã°ã©ã ã®åœä»€ãäºåã«å®è¡ããããšã§ãåŠçé床ãé«éåããæè¡ã§ãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 63,
"tag": "p",
"text": "ãã®æè¡ã¯ã次ã«å®è¡ãããå¯èœæ§ãé«ãåœä»€ãäºæž¬ãããã®åœä»€ã®å®è¡ãäºåã«éå§ããŸãããã®éãäºæž¬ãæ£ããå Žåã¯ãå®éã®å®è¡ã«ç§»è¡ããåŠçé床ãé«éåãããŸããäžæ¹ãäºæž¬ã誀ã£ãŠããå Žåã¯ããã®åŠççµæãç Žæ£ããŠãæ£ããåœä»€ã®å®è¡ã«ç§»è¡ããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 64,
"tag": "p",
"text": "ææ©å®è¡ã¯ãè€éãªããã°ã©ã ãåŠçããéã«éåžžã«æå¹ã§ãããæè¿ã§ã¯ãMeltdownãSpectreãªã©ã®ã»ãã¥ãªãã£äžã®è匱æ§ãçºèŠããããããã»ãã¥ãªãã£äžã®åé¡ãææãããŠããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 65,
"tag": "p",
"text": "ã¢ãŠãã»ãªãã»ãªãŒããŒå®è¡(Out-of-order execution)ã¯ãã³ã³ãã¥ãŒã¿ã®åœä»€å®è¡æ¹åŒã®äžã€ã§ãããã®æ¹åŒã§ã¯ãããã»ããµãåœä»€ãçŽåã«å®è¡ãã代ããã«ãå®è¡å¯èœãªåœä»€ãèŠã€ã次第ãå®è¡é åºãå€æŽããŠãããã°ã©ã ãå¹ççã«å®è¡ããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 66,
"tag": "p",
"text": "éåžžãã³ã³ãã¥ãŒã¿ã®ããã»ããµã¯ãããã°ã©ã ã®åœä»€ãé çªã«å®è¡ããŸããããããããåœä»€ãå®è¡ããããã«å¿
èŠãªããŒã¿ããŸã èšç®ãããŠããªãã£ãããã¡ã¢ãªããèªã¿èŸŒãŸããŠããªãã£ãå Žåãããã»ããµã¯æ¬¡ã®åœä»€ãå®è¡ããå¿
èŠããããŸãããã®ãããåœä»€ã®å®è¡é åºãå
¥ãæ¿ããããšããããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 67,
"tag": "p",
"text": "ã¢ãŠãã»ãªãã»ãªãŒããŒå®è¡ã§ã¯ãããã»ããµã¯æªå®è¡ã®åœä»€ããããã¡ã«æ ŒçŽããå®è¡å¯èœã«ãªã£ãããå®è¡é åºãå€æŽããŠå®è¡ããŸãããã®æ¹æ³ã«ãããããã»ããµã¯ããå€ãã®åœä»€ãåæã«å®è¡ã§ããããã°ã©ã ã®å®è¡å¹çãåäžããŸãããã ããå®è¡é åºãå
¥ãæ¿ãããããããã°ã©ã ã®çµæãäºæ³éãã§ãªãå¯èœæ§ããããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 68,
"tag": "p",
"text": "ã¢ãŠãã»ãªãã»ãªãŒããŒå®è¡ã¯ãçŸä»£ã®é«éããã»ããµã§åºã䜿çšãããŠãããããã°ã©ã ã®å®è¡é床ãåäžãããããã®éèŠãªæè¡ã®äžã€ãšãªã£ãŠããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 69,
"tag": "p",
"text": "ãã¯ãã«ããã»ããµãšã¯ããã¯ãã«æŒç®ã«ç¹åããã³ã³ãã¥ãŒã¿ããã»ããµã®ããšã§ãããã¯ãã«æŒç®ã¯ãå€ãã®æ°å€æŒç®åŠçã«ãããŠéèŠãªåœ¹å²ãæãããŸããããšãã°ã3Dã°ã©ãã£ãã¯ã¹ãç©çã·ãã¥ã¬ãŒã·ã§ã³ãç§åŠæè¡èšç®ã人工ç¥èœãªã©ããããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 70,
"tag": "p",
"text": "ãã¯ãã«ããã»ããµã¯ã1ã€ã®åœä»€ã§åãåã®å€æ°ã®ããŒã¿èŠçŽ ãåæã«åŠçããããšãã§ããŸããããã«ãããåäžã®åœä»€ã§èšå€§ãªéã®ããŒã¿ãåŠçããããšãã§ããŸãããã¯ãã«ããã»ããµã¯ãã¹ã«ã©ãŒããã»ããµãšæ¯èŒããŠé«éã§ããããã¯ãã«æŒç®ã«ç¹åããŠãããããè€éãªæŒç®ãè¡ãããšãã§ããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 71,
"tag": "p",
"text": "ãã¯ãã«ããã»ããµã¯ã倧éã®ããŒã¿ãåŠçããå Žåã«ç¹ã«æçšã§ããããšãã°ãæ°è±¡äºå ±ãã·ãã¥ã¬ãŒã·ã§ã³ãåååååŠãªã©ã®åéã§äœ¿çšãããŸãããŸãããã¯ãã«ããã»ããµã¯ãGPUãªã©ã®ä»ã®ç¹æ®çšéããã»ããµãšçµã¿åãããŠäœ¿çšãããããšããããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 72,
"tag": "p",
"text": "æè¿ã®äžè¬çãªCPUã¯ããã¯ãã«æŒç®ããµããŒãããããšãã§ããããããã¯ãã«ããã»ããµã¯ããŸãäžè¬çã§ã¯ãããŸããããç¹å®ã®åéã«ãããŠã¯ããŸã éèŠãªåœ¹å²ãæãããŠããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 73,
"tag": "p",
"text": "Single Instruction, Multiple Data (SIMD) ã¯ã1ã€ã®åœä»€ãè€æ°ã®ããŒã¿ãåæã«åŠçããã³ã³ãã¥ãŒã¿ã®ã¢ãŒããã¯ãã£ã§ãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 74,
"tag": "p",
"text": "ããã¯ããã¯ãã«åŠçãšããŠãç¥ãããŠãããåãæäœãå€æ°ã®ããŒã¿ã«é©çšããããšãã§ããŸããäŸãã°ãSIMDããã»ããµã¯ãåãæ°åŒã䜿çšããŠå€æ°ã®ç»åãã¯ã»ã«ãäžåºŠã«åŠçããããšãã§ããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 75,
"tag": "p",
"text": "SIMDã¯ãCPUãGPUãDSPãªã©ãæ§ã
ãªçš®é¡ã®ããã»ããµã§äœ¿çšãããŸããããã¯ããã¯ãã«åŠçãç¹å®ã®ã¿ã¹ã¯ã«å¯ŸããŠé«ãå¹çãçºæ®ããããã§ããSIMDã¯ãç»ååŠçããããªåŠçãé³å£°åŠçãç§åŠçã·ãã¥ã¬ãŒã·ã§ã³ãªã©ãå€ãã®åéã§äœ¿çšãããŠããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 76,
"tag": "p",
"text": "SIMDã¯ã1ã€ã®åœä»€ã§å€æ°ã®ããŒã¿ãåŠçãããããããã°ã©ããæ瀺çã«ã«ãŒããæžãå¿
èŠããªããªããããã°ã©ã ã®å®è¡é床ãåäžããå ŽåããããŸããããããSIMDã䜿çšããããã«ã¯ãã¢ããªã±ãŒã·ã§ã³ããã¯ãã«åŠçããµããŒãããå¿
èŠããããŸãããŸããããŒã¿ã®äŸåé¢ä¿ãããå Žåã«ã¯ãSIMDã䜿çšããããšãã§ããªãå ŽåããããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 77,
"tag": "p",
"text": "ãã«ãã¹ã¬ããã£ã³ã°ã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ã®äžçš®ã§ãããè€æ°ã®ã¹ã¬ãããåæã«å®è¡ãããããšãå¯èœã«ããæè¡ã§ãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 78,
"tag": "p",
"text": "ã¹ã¬ããã¯ãããã°ã©ã å
ã§ç¬ç«ããŠå®è¡ãããå®è¡åäœã§ãããããã°ã©ã ã®å®è¡ãããå¹ççã«è¡ãããšãã§ããŸãããã«ãã¹ã¬ããã£ã³ã°ã¯ãããã°ã©ã å
ã®è€æ°ã®ã¹ã¬ãããåæã«å®è¡ãããããšã«ãããããã°ã©ã ã®ããã©ãŒãã³ã¹ãåäžãããããšãã§ããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 79,
"tag": "p",
"text": "å
·äœçã«ã¯ããã«ãã¹ã¬ããã£ã³ã°ã«ãããè€æ°ã®ã¿ã¹ã¯ãåæã«å®è¡ã§ãããããã·ã¹ãã ã®ã¬ã¹ãã³ã¹æéãççž®ããããšãã§ããŸãããŸãããã«ãã¹ã¬ããã£ã³ã°ã¯ã䞊ååŠçãå¯èœã«ãããããè€æ°ã®CPUã³ã¢ãæ倧éã«æŽ»çšããããšãã§ããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 80,
"tag": "p",
"text": "äžæ¹ã§ããã«ãã¹ã¬ããã£ã³ã°ãå®è£
ããã«ã¯ãã¹ã¬ããå士ã®ç«¶åç¶æ
ããã¹ã¬ããéã§ã®ããŒã¿ã®å
±æãªã©ãããã€ãã®èª²é¡ããããŸãããã®ãããé©åã«å®è£
ããªããšãããã°ã©ã ã®åäœãäžå®å®ã«ãªã£ãããå¹çãæªåããããšããããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 81,
"tag": "p",
"text": "ãã«ãã¹ã¬ããã£ã³ã°ã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ã®äžã§ãéèŠãªæè¡ã®äžã€ã§ãããçŸä»£ã®å€ãã®ããã°ã©ã ã§å©çšãããŠããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 82,
"tag": "p",
"text": "Simultaneous Multithreading(SMT)ãšã¯ãCPUã®åœä»€å®è¡ããã»ã¹ãå¹ççã«è¡ãããã®æè¡ã§ãããã®æè¡ã¯ãCPUã®ç©ççãªã³ã¢æ°ãå¢ãããã«ãè€æ°ã®ã¹ã¬ãããåæã«å®è¡ããããšãã§ããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 83,
"tag": "p",
"text": "éåžžãCPUã¯1ã€ã®åœä»€ãå®è¡ããããã«1ã€ã®ãã€ãã©ã€ã³ã䜿çšããŸããããããSMTã§ã¯ãè€æ°ã®åœä»€ãåæã«å®è¡ããããšãã§ããŸããããã¯ãè€æ°ã®ã¹ã¬ãããåæã«å®è¡ããããšã§éæãããŸããåã¹ã¬ããã¯ãç¬èªã®ã¬ãžã¹ã¿ãŒã»ãããšåœä»€ãã§ããã£ãŒãæã¡ãåãç©ççãªã³ã¢ãå
±æããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 84,
"tag": "p",
"text": "SMTã®å©ç¹ã¯ãCPUã®åŠçèœåãåäžãããããšãã§ããããšã§ããè€æ°ã®ã¹ã¬ãããåæã«å®è¡ããããšã§ãCPUãåœä»€ãå®è¡ããããã®åŸ
ã¡æéãæžãããCPUã®çšŒåçãé«ããããšãã§ããŸãããŸããSMTã¯ãCPUã®æ§èœãåäžã¹ã¬ããã®å Žåã«æ¯ã¹ãŠåäžããå ŽåããããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 85,
"tag": "p",
"text": "ãã ããSMTã¯ãã¹ãŠã®ã¢ããªã±ãŒã·ã§ã³ã«ãšã£ãŠå¹æçã§ã¯ãããŸãããSMTã¯ãè€æ°ã®ã¹ã¬ãããåæã«å®è¡ãããŠããå Žåã«éããCPUã®æ§èœãåäžããŸãããããã£ãŠãSMTã¯ããã«ãã¹ã¬ããã¢ããªã±ãŒã·ã§ã³ããåæã«è€æ°ã®ã¿ã¹ã¯ãå®è¡ããããšãã§ããã¢ããªã±ãŒã·ã§ã³ã§æãå¹æçã§ãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 86,
"tag": "p",
"text": "ãã¬ã«ããã»ããµ(è±: Barrel processor)ã¯ãè€æ°ã®æŒç®åšããã€ãã©ã€ã³çã«æ¥ç¶ããåæã«è€æ°ã®åœä»€ãå®è¡ããããšãã§ããããã»ããµã®äžçš®ã§ãããã¬ã«ã·ãã¿(è±: Barrel shifter)ãšãåŒã°ããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 87,
"tag": "p",
"text": "ãã¬ã«ããã»ããµã¯ã1ã€ã®åœä»€ãå®è¡ããããã«å¿
èŠãªã¯ããã¯ãµã€ã¯ã«æ°ãæžããããšãã§ããããã»ããµã®åŠçé床ãåäžãããããšãã§ããŸãããã¬ã«ããã»ããµã¯ãäž»ã«ãããªåŠçãããžã¿ã«ä¿¡å·åŠçãªã©ã®åéã§äœ¿çšãããŠããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 88,
"tag": "p",
"text": "ãã¬ã«ããã»ããµã¯ãè€æ°ã®æŒç®åšãçŽåã«æ¥ç¶ããããšã§ã1ã€ã®åœä»€ãå®è¡ããããã«å¿
èŠãªã¯ããã¯ãµã€ã¯ã«æ°ãæžããããšãã§ããŸãããŸããè€æ°ã®åœä»€ãåæã«å®è¡ããããšãã§ãããããåŠçé床ãåäžããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 89,
"tag": "p",
"text": "ãã¬ã«ããã»ããµã¯ãäž»ã«å ç®åšãä¹ç®åšãã·ãã¿ãªã©ã®æŒç®åšã䜿çšããŠããŸãããã¬ã«ã·ãã¿ã¯ããããã·ããæŒç®ãé«éã«å®è¡ããããšãã§ããŸãããã¬ã«ããã»ããµã¯ãé»åãèšç®æ©ãé³å£°åŠçæ©åšãªã©ã«åºã䜿çšãããŠããŸãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 90,
"tag": "p",
"text": "CPUã«ã¯ããŠãŒã¶ãŒã¢ãŒããšã«ãŒãã«ã¢ãŒãã®2ã€ã®åäœã¢ãŒãããããŸãããŠãŒã¶ãŒã¢ãŒãã§ã¯ãäžè¬ãŠãŒã¶ãŒã䜿çšããã¢ããªã±ãŒã·ã§ã³ãå®è¡ãããŸããäžæ¹ãã«ãŒãã«ã¢ãŒãã§ã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãå®è¡ãããã·ã¹ãã ã®ç®¡çãä¿è·ãè¡ããŸããå²ã蟌ã¿åŠçã¯ãå€éšããã®ä¿¡å·(å²ã蟌ã¿)ãçºçããå Žåã«ãCPUãçŸåšå®è¡ããŠããããã°ã©ã ãäžæåæ¢ããŠãå²ã蟌ã¿åŠçãå®è¡ããããšã§ãã",
"title": "CPUã®æ§æãšåäœ"
},
{
"paragraph_id": 91,
"tag": "p",
"text": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã«ãããã¡ã¢ãªãŒã¯ãããŒã¿ãããã°ã©ã ãä¿æããéèŠãªèŠçŽ ã§ããããã®ç« ã§ã¯ãã¡ã¢ãªãŒã®çš®é¡ãšéå±€æ§é ãã¡ã¢ãªãŒã¢ã¯ã»ã¹ã®æ¹æ³ãšé床ãããã³ãã£ãã·ã¥ã¡ã¢ãªãŒã®åçãšèšèšã«ã€ããŠèª¬æããã",
"title": "ã¡ã¢ãªãŒã®æ§æãšåäœ"
},
{
"paragraph_id": 92,
"tag": "p",
"text": "ããDRAMã¯å€§å®¹éã®ã¡ã¢ãªãŒãšããŠäœ¿çšãããSRAMã¯é«éãªãã£ãã·ã¥ã¡ã¢ãªãŒãšããŠäœ¿çšããããã¡ã¢ãªãŒã¯ãéå±€çãªæ§é ãæã¡ãããé«éã§å°å®¹éã®ã¡ã¢ãªãŒãCPUã«è¿ããããäœéã§å€§å®¹éã®ã¡ã¢ãªãŒãé ãã«é
眮ãããã",
"title": "ã¡ã¢ãªãŒã®æ§æãšåäœ"
},
{
"paragraph_id": 93,
"tag": "p",
"text": "ã¡ã¢ãªãŒã¢ã¯ã»ã¹ã«ã¯ãçŽæ¥ã¢ã¯ã»ã¹(ã©ã³ãã ã¢ã¯ã»ã¹)ãšã·ãŒã±ã³ã·ã£ã«ã¢ã¯ã»ã¹ããããçŽæ¥ã¢ã¯ã»ã¹ã¯ãã©ã³ãã ã¢ã¯ã»ã¹ã¡ã¢ãªãŒ(RAM)ã§äœ¿çšãããäžè¬çãªã¢ã¯ã»ã¹æ¹æ³ã§ãããã¢ãã¬ã¹ãæå®ããŠçŽæ¥ã¢ã¯ã»ã¹ãããäžæ¹ãã·ãŒã±ã³ã·ã£ã«ã¢ã¯ã»ã¹ã¯ãããŒããç£æ°ãã£ã¹ã¯ãªã©ã®ã¹ãã¬ãŒãžã¡ãã£ã¢ã§äœ¿çšãããæ¹æ³ã§ãããé çªã«ã¢ã¯ã»ã¹ãããã¡ã¢ãªãŒã¢ã¯ã»ã¹é床ã¯ãã¢ã¯ã»ã¹æéãã¬ã€ãã³ã·ãŒãšåŒã°ãããã®ã§æž¬å®ããããã£ãã·ã¥ã¡ã¢ãªãŒãªã©ã®é«éãªã¡ã¢ãªãŒã¯ãããäœãã¢ã¯ã»ã¹æéãæã€ã",
"title": "ã¡ã¢ãªãŒã®æ§æãšåäœ"
},
{
"paragraph_id": 94,
"tag": "p",
"text": "ãã£ãã·ã¥ã¡ã¢ãªãŒã¯ãããé«éã§å°å®¹éã®ã¡ã¢ãªãŒã§ãããCPUã«è¿ãé
眮ãããããã£ãã·ã¥ã¡ã¢ãªãŒã¯ãæè¿ã¢ã¯ã»ã¹ãããããŒã¿ãä¿æããCPUãå床ã¢ã¯ã»ã¹ããå¯èœæ§ãé«ãå Žåã«ãé«éã«ã¢ã¯ã»ã¹ã§ããããã«ããããã£ãã·ã¥ã¡ã¢ãªãŒã¯ã2ã€ã®äž»èŠãªã¿ã€ãã§ãããçŽæ¥ããããã£ãã·ã¥ãšã»ããã¢ãœã·ã¢ãã£ããã£ãã·ã¥ã«åé¡ãããé©åãªèšèšãéèŠã§ããã",
"title": "ã¡ã¢ãªãŒã®æ§æãšåäœ"
},
{
"paragraph_id": 95,
"tag": "p",
"text": "å
¥åºåã·ã¹ãã ã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®äžéšã§ãããã³ã³ãã¥ãŒã¿ãŒãšãŠãŒã¶ãŒãŸãã¯ä»ã®ããã€ã¹ãšã®éã®ããŒã¿è»¢éãæ
åœããŸãããã®ç« ã§ã¯ãå
¥åºåã·ã¹ãã ã®åºæ¬çãªèŠçŽ ã«çŠç¹ãåœãŠãŸãã",
"title": "å
¥åºåã·ã¹ãã "
},
{
"paragraph_id": 96,
"tag": "p",
"text": "å
¥åºåããã€ã¹ã¯ãããŒã¿ãåä¿¡ãŸãã¯éä¿¡ããããã«äœ¿çšãããæ©åšã§ããäŸãã°ãããŠã¹ãããŒããŒããããŒããã£ã¹ã¯ãããªã³ã¿ãã¹ããŒã«ãŒãªã©ãæããããŸãããããã®ããã€ã¹ã¯ãç°ãªãçš®é¡ã®æ¥ç¶æ¹åŒã䜿çšããŠãã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã«æ¥ç¶ãããŸããäŸãã°ãUSBãPS/2ãSerialãParallelãEthernetãªã©ã§ãã",
"title": "å
¥åºåã·ã¹ãã "
},
{
"paragraph_id": 97,
"tag": "p",
"text": "å
¥åºåå¶åŸ¡æ¹åŒã¯ãå
¥åºåããã€ã¹ãšã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®éã§ããŒã¿ã転éããããã«äœ¿çšãããŸããã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã¯ãããã°ã©ã ã«ãã£ãŠå¶åŸ¡ãããããã€ã¹ãã©ã€ãã䜿çšããŠãå
¥åºåå¶åŸ¡æ¹åŒãèšå®ããŸããäž»ãªå
¥åºåå¶åŸ¡æ¹åŒã«ã¯ãããã°ã©ã å¶åŸ¡ãããŒãªã³ã°å¶åŸ¡ãå²ã蟌ã¿å¶åŸ¡ããããŸãã",
"title": "å
¥åºåã·ã¹ãã "
},
{
"paragraph_id": 98,
"tag": "p",
"text": "DMAã¯ãDirect Memory Accessã®ç¥èªã§ãå
¥åºåå¶åŸ¡æ¹åŒã®äžã€ã§ããDMAã䜿çšãããšãããã€ã¹ãšã¡ã¢ãªã®éã§ããŒã¿ã転éããããã«ãCPUã䜿çšããå¿
èŠããªããªããŸããããã«ãããCPUãä»ã®åŠçãå®è¡ã§ãããããããŒã¿è»¢éé床ãåäžããŸããDMAã«ãã£ãŠé«éãªããŒã¿è»¢éãå¯èœã«ãªãããããªãŒãã£ãªããããªãªã©ã®ãªã¢ã«ã¿ã€ã åŠçãå¿
èŠãªã¢ããªã±ãŒã·ã§ã³ã§ãã䜿çšãããŸãã",
"title": "å
¥åºåã·ã¹ãã "
},
{
"paragraph_id": 99,
"tag": "p",
"text": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã«ãããŠãä»®æ³èšæ¶ãšä»®æ³ãã·ã³ã¯éåžžã«éèŠãªæŠå¿µã§ãã",
"title": "ä»®æ³èšæ¶ãšä»®æ³ãã·ã³"
},
{
"paragraph_id": 100,
"tag": "p",
"text": "ä»®æ³èšæ¶ã«ãã£ãŠã倧ããªããã°ã©ã ãå®è¡ããããšãå¯èœã«ãªããŸããããã°ã©ã ã¯ãç©çã¡ã¢ãªäžã«å¿
èŠãªéšåã ããããŒãããŠå®è¡ããå¿
èŠãªéšåã ããç©çã¡ã¢ãªããè£å©èšæ¶è£
眮ã«ã¹ã¯ããã¢ãŠãããããšãã§ããŸãããã®ããã«ããããšã§ãç©çã¡ã¢ãªã®å®¹é以äžã®ããã°ã©ã ãå®è¡ããããšãã§ããŸãã",
"title": "ä»®æ³èšæ¶ãšä»®æ³ãã·ã³"
},
{
"paragraph_id": 101,
"tag": "p",
"text": "ä»®æ³ãã·ã³ã¯ããœãããŠã§ã¢ã«ãã£ãŠç©çã³ã³ãã¥ãŒã¿ãŒãšåçã®æ©èœãå®çŸã§ããŸããç©çã³ã³ãã¥ãŒã¿ãŒã¯ãããã»ããµãã¡ã¢ãªãã¹ãã¬ãŒãžããã€ã¹ããããã¯ãŒã¯ã€ã³ã¿ãŒãã§ã€ã¹ãªã©ã®ããŒããŠã§ã¢ã§æ§æãããŠããŸããäžæ¹ãä»®æ³ãã·ã³ã¯ããœãããŠã§ã¢ã§ç©çã³ã³ãã¥ãŒã¿ãŒã®ããŒããŠã§ã¢ãåçŸããŸãã",
"title": "ä»®æ³èšæ¶ãšä»®æ³ãã·ã³"
},
{
"paragraph_id": 102,
"tag": "p",
"text": "ä»®æ³ãã·ã³ã«ã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãšã¢ããªã±ãŒã·ã§ã³ãå®è¡ããããã«å¿
èŠãªãã¹ãŠã®æ©èœãå«ãŸããŸãããããã®æ©èœã¯ãç©çã³ã³ãã¥ãŒã¿ãŒã®ããŒããŠã§ã¢ãšåçã®æ©èœãæäŸããŸããä»®æ³ãã·ã³ã¯ãã³ã³ãã¥ãŒã¿ãŒã®ãã¡ã€ã«ãšããŠååšããç©çã³ã³ãã¥ãŒã¿ãŒäžã§å®è¡ãããŸããç©çã³ã³ãã¥ãŒã¿ãŒã¯ãä»®æ³ãã·ã³ãšåæ§ã«åäœããä»®æ³ãã·ã³ã¯ç©çã³ã³ãã¥ãŒã¿ãŒãåçŸããããã«èšèšãããŠããŸãã",
"title": "ä»®æ³èšæ¶ãšä»®æ³ãã·ã³"
},
{
"paragraph_id": 103,
"tag": "p",
"text": "ä»®æ³ãã·ã³ã«ã¯å€ãã®å©ç¹ããããŸããäŸãã°ãã¢ããªã±ãŒã·ã§ã³ãç¹å®ã®ãã©ãããã©ãŒã ã«äŸåããå¿
èŠããªããªããŸããä»®æ³ãã·ã³ã¯ãæé©åãããæ§æã§ã¢ããªã±ãŒã·ã§ã³ãå®è¡ã§ãããããããå¹ççã«å®è¡ããããšãã§ããŸãããŸããä»®æ³åæè¡ã«ãã£ãŠè€æ°ã®ä»®æ³ãã·ã³ãåãç©çã³ã³ãã¥ãŒã¿ãŒäžã§å®è¡ããããšãã§ããŸãã",
"title": "ä»®æ³èšæ¶ãšä»®æ³ãã·ã³"
},
{
"paragraph_id": 104,
"tag": "p",
"text": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®æç§æžã®ãããã»ããµã®æ§èœåäžã®æŽå²ãã®ç« ãæ¥æ¬èªã§å·çããŠãã ãããã³ã³ãã¯ãã«ããŠãã ãããä¿¡é Œã«è¶³ãæ
å ±æºãåºå
žãšããŠæåŸã«ç€ºããŠãã ããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®é²å"
},
{
"paragraph_id": 105,
"tag": "p",
"text": "ããã»ããµã®æ§èœã¯ããã®æŽå²ã®äžã§åçãªåäžãéããŠããŸããããã®é²åã¯ãããã€ãã®äž»èŠãªæè¡é©æ°ã«ãã£ãŠå¯èœã«ãªããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®é²å"
},
{
"paragraph_id": 106,
"tag": "p",
"text": "æåã®ã³ã³ãã¥ãŒã¿ã¯ãåœä»€ã1ã€ãã€å®è¡ãããã·ã³ã°ã«ã¹ããªãŒã ã¢ãŒããã¯ãã£ããæ¡çšããŠããŸããããã®åŸããã€ãã©ã€ã³åŠçãã¹ãŒããŒã¹ã«ã©ãŒåŠçãããã³ãã«ãããã»ããµåŠçãªã©ã®æè¡ãç»å Žããæ§èœãé£èºçã«åäžãããŸããããŸããããé«éãªã¯ããã¯é床ããã£ãã·ã¥ã¡ã¢ãªãããã³æµ®åå°æ°ç¹æŒç®ãŠãããã®å®è£
ã倧ããªåœ¹å²ãæãããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®é²å"
},
{
"paragraph_id": 107,
"tag": "p",
"text": "ããããæ§èœã®åäžã«ã¯ç©ççãªéçããããŸããé«éãªã¯ããã¯é床ãå®çŸããããã«ã¯ãé«åºŠãªå·åŽæè¡ãå¿
èŠã§ããããã«ããšãã«ã®ãŒæ¶è²»éãå¢å ãããããçãšãã«ã®ãŒã®èŠæ±ãå¢ããŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®é²å"
},
{
"paragraph_id": 108,
"tag": "p",
"text": "ä»åŸã¯ãããå¹ççãªããã»ããµã¢ãŒããã¯ãã£ã®æ¢æ±ãæ°ããçŽ æãããã€ã¹ã®éçºãããã³äººå·¥ç¥èœãªã©ã®æ°ããåéã®èŠä»¶ã«å¯Ÿå¿ããããã®ç¹åãæ±ããããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®é²å"
},
{
"paragraph_id": 109,
"tag": "p",
"text": "åºå
ž:John L. Hennessy, David A. Patterson. (2017). Computer Architecture: A Quantitative Approach. Sixth Edition.",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®é²å"
},
{
"paragraph_id": 110,
"tag": "p",
"text": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã¯ãã³ã³ãã¥ãŒã¿ãŒã®å
éšæ§é ãããŒã¿åŠçã®æ¹åŒã決ããèšèšã®ããšã§ããã ãã®ã¢ãŒããã¯ãã£ãŒã¯ãæ代ãšãšãã«é²åãéããŠããã以äžã«ãã®å¹Žè¡šããŸãšããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 111,
"tag": "p",
"text": "ãã©ã³ã»ãã€ãã³ã¢ãŒããã¯ãã£ãŒã¯ãçŸä»£ã®ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®åºç€ãšãªã£ãŠããèšèšåçã®äžã€ã§ãããã®ã¢ãŒããã¯ãã£ãŒã¯ãã³ã³ãã¥ãŒã¿ãŒã®ããã°ã©ã ãšããŒã¿ãåãã¡ã¢ãªç©ºéã«æ ŒçŽããããã°ã©ã ãšããŒã¿ãåãããã«æ±ãããšãã§ããŸãããŸããããã°ã©ã ãå€æŽããããšã§ãã³ã³ãã¥ãŒã¿ãŒãå®è¡ããã¿ã¹ã¯ãç°¡åã«å€æŽã§ããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 112,
"tag": "p",
"text": "ãã©ã³ã»ãã€ãã³ã¢ãŒããã¯ãã£ãŒã¯ã1945幎ã«ãžã§ã³ã»ãã©ã³ã»ãã€ãã³ã«ãã£ãŠæå±ãããEDVACã³ã³ãã¥ãŒã¿ãŒã®èšèšã«äœ¿çšãããŸããããã®åŸãå€ãã®ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒããã®èšèšåçã«åºã¥ããŠéçºãããçŸä»£ã®ã³ã³ãã¥ãŒã¿ãŒã«è³ããŸã§åœ±é¿ãäžããŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 113,
"tag": "p",
"text": "åºå
ž:A.S. Tanenbaum and H. Bos, \"Computer Organization and Architecture: Designing for Performance,\" Pearson, 2006.",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 114,
"tag": "p",
"text": "ã³ã³ãã¥ãŒã¿ãŒã®æŽå²ãæ¯ãè¿ããšãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®çºå±ããã®é²åã®äžå¿ã«ãªã£ãŠããŸããã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒãšã¯ãã³ã³ãã¥ãŒã¿ãŒã®æ§é ãšèšèšã®ããšã§ãããã³ã³ãã¥ãŒã¿ãŒãã©ã®ããã«åäœãããã«å€§ãã圱é¿ãäžããŸãããã®èšäºã§ã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®é»ææãæ¯ãè¿ãããã®çºå±ãè¿œããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 115,
"tag": "p",
"text": "ãã®åŸã1943幎ã«ENIACãéçºãããŸãããENIACã¯ã倧èŠæš¡ãªç空管ã䜿çšããŠãããããéåžžã«é«äŸ¡ã§ããã巚倧ã§ãã£ããENIACã¯ãããã°ã©ã ãããã°ã©ã ããã«ããæåã§å
¥åããå¿
èŠããããŸããããã®ããšããããã°ã©ãã³ã°ãéåžžã«å°é£ã§ãã£ãåå ã®äžã€ã§ãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 116,
"tag": "p",
"text": "1950幎代ã«ãªããšãã³ã³ãã¥ãŒã¿ãŒã¯åŸã
ã«å°ååããããã©ã³ãžã¹ã¿ãŒæè¡ãå°å
¥ãããŸããããã©ã³ãžã¹ã¿ãŒæè¡ã¯ãç空管ã«æ¯ã¹ãŠå°åã§ä¿¡é Œæ§ãé«ããã³ã³ãã¥ãŒã¿ãŒã®èšèšãšã¢ãŒããã¯ãã£ãŒã«å€§ããªåœ±é¿ãäžããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 117,
"tag": "p",
"text": "1956幎ã«ã¯ãIBMãæåã®ãã£ã¹ã¯ãã©ã€ããçºå£²ããŸãããããã¯ã倧éã®ããŒã¿ãæ ŒçŽããé«éã«ã¢ã¯ã»ã¹ã§ããããã«ãªããŸããããŸããåã幎ã«ã¯ãFORTRANãšããæåã®é«æ°Žæºããã°ã©ãã³ã°èšèªãéçºãããŸãããããã«ãããããã°ã©ããŒã¯ããã°ã©ã ãããå¹ççã«éçºããããšãã§ããããã«ãªããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 118,
"tag": "p",
"text": "1960幎代ã«ã¯ãã³ã³ãã¥ãŒã¿ãŒã®ã¢ãŒããã¯ãã£ãŒãæŽã«é²åããŸãããIBM System/360ã¯ã倧èŠæš¡ãªã³ã³ãã¥ãŒã¿ãŒåžå Žã«åå
¥ããå瀟ã®æåãæ¯ããŸããããã®ææã«ã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãéçºãããã³ã³ãã¥ãŒã¿ãŒã®æäœæ§ãåäžããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 119,
"tag": "p",
"text": "ã³ã³ãã¥ãŒã¿ãŒã®æŽå²ã«ãããŠãã¡ã€ã³ãã¬ãŒã ã¯éèŠãªäœçœ®ãå ããŠããŸããã¡ã€ã³ãã¬ãŒã ã¯ãèšå€§ãªããŒã¿åŠçãå¯èœã«ããé«æ§èœã³ã³ãã¥ãŒã¿ãŒã§ãããããžãã¹ãç£æ¥åéã§åºã䜿çšãããŠããŸããããã§ã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡šã«ã€ããŠãã¡ã€ã³ãã¬ãŒã ã®æŽå²ãçŽè§£ããŠã¿ãŸãããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 120,
"tag": "p",
"text": "1950幎代ã«ã¯ãåæã®ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒãéçºãããŸãããIBMã®æåã®ã¡ã€ã³ãã¬ãŒã ã³ã³ãã¥ãŒã¿ãŒã§ããIBM 700ã·ãªãŒãºã¯ã1952幎ã«ãªãªãŒã¹ãããŸãããããã¯ãç£æ°ã³ã¢ã¡ã¢ãªã䜿çšããåæã®ã³ã³ãã¥ãŒã¿ãŒã®äžäŸã§ãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 121,
"tag": "p",
"text": "1960幎代ã«ã¯ãã¡ã€ã³ãã¬ãŒã ã®æ§èœãšæ©èœãåäžããŸãããIBM System/360ã¯ã1964幎ã«ãªãªãŒã¹ãããIBMã®ã¡ã€ã³ãã¬ãŒã åžå Žã«ãããæ¯é
çãªå°äœã確ç«ããŸãããSystem/360ã¯ãç°ãªãããã»ããµãŒãåšèŸºæ©åšã䜿çšããè€æ°ã®ã¢ãã«ã§æ§æãããéåžžã«æ¡åŒµæ§ãé«ãããšãç¹åŸŽã§ããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 122,
"tag": "p",
"text": "1970幎代ã«ã¯ãã¡ã€ã³ãã¬ãŒã ã®æ§èœã倧å¹
ã«åäžããé«åºŠãªæäœã·ã¹ãã ãã¢ããªã±ãŒã·ã§ã³ãéçºãããŸããããŸãããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®æšæºåãé²ã¿ãIBMã¯OS/VS1ãOS/VS2ãšãã£ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ããªãªãŒã¹ããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 123,
"tag": "p",
"text": "1980幎代ã«ã¯ãã¡ã€ã³ãã¬ãŒã ã¯äž»ã«ããžãã¹çšéã«äœ¿çšãããããã«ãªããŸãããIBMã¯ãSystem/370ããã³System/390ããªãªãŒã¹ããé«åºŠãªã»ãã¥ãªãã£æ©èœãããŒã¿ããŒã¹ã·ã¹ãã ãè¿œå ããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 124,
"tag": "p",
"text": "1990幎代以éãã¡ã€ã³ãã¬ãŒã ã¯ãã€ã³ã¿ãŒããããã¯ã©ãŠãã³ã³ãã¥ãŒãã£ã³ã°ãªã©ã®æ°ããæè¡ãšãšãã«é²åããŸãããIBMã¯ãSystem zã·ãªãŒãºããªãªãŒã¹ããããžãã¹ãéèæ©é¢ãªã©ã§åºã䜿çšãããŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 125,
"tag": "p",
"text": "ã¡ã€ã³ãã¬ãŒã ã¯ãããŒã¿åŠçããã©ã³ã¶ã¯ã·ã§ã³åŠçãªã©ã®éèŠãªæ¥åã«å¿
èŠãªé«æ§èœãªã³ã³ãã¥ãŒã¿ãŒã§ããã¡ã€ã³ãã¬ãŒã ã¯ãããžãã¹ãç£æ¥åéã§åºã䜿ãããŠããã倧éã®ããŒã¿ãåŠçããããšãã§ããŸãããŸããé«åºŠãªã»ãã¥ãªãã£æ©èœãå¯çšæ§ã®é«ããæ±ããããæ¥åã«ã察å¿ã§ããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 126,
"tag": "p",
"text": "çŸåšã§ã¯ãã¯ã©ãŠãã³ã³ãã¥ãŒãã£ã³ã°ãããã°ããŒã¿è§£æãªã©ã®åéã«ãããŠããã¡ã€ã³ãã¬ãŒã ã¯éèŠãªåœ¹å²ãæ
ã£ãŠããŸããã¡ã€ã³ãã¬ãŒã ã¯ããšã³ã¿ãŒãã©ã€ãºã·ã¹ãã ã®äžå¿çãªåœ¹å²ãæãããããžãã¹ã®åºç€ãšãªãéèŠãªã€ã³ãã©ã¹ãã©ã¯ãã£ãŒãšããŠäžå¯æ¬ ã§ãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 127,
"tag": "p",
"text": "ä»åŸããã¡ã€ã³ãã¬ãŒã ã¯æ°ããæè¡ãããŒãºã«åãããŠé²åãç¶ããããžãã¹ãç£æ¥åéã®çºå±ã«è²¢ç®ããŠããããšãæåŸ
ãããŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 128,
"tag": "p",
"text": "1964幎ãIBMã¯System/360ãçºè¡šããŸãããããã¯ãåäžã®ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãããŒã¹ã«ãç°ãªããµã€ãºãé床ã®æ©çš®ã補é ã§ããããã«ãããã®ã§ãããSystem/360ã¯ããããŸã§ã®IBMã®ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ãšã¯å
šãç°ãªããã®ã§ãããæ¥çã«å€§ããªåœ±é¿ãäžããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 129,
"tag": "p",
"text": "ãã®åŸãIBMã¯System/370ãSystem/390ãzSeriesããããŠçŸåšã¯IBM Zãšããååã§ç¥ããããé·ãã·ãªãŒãºã®ã¡ã€ã³ãã¬ãŒã ã³ã³ãã¥ãŒã¿ãŒãçºè¡šããŠããŸããããããã®ã·ã¹ãã ã¯ãæåã®System/360ãšäºææ§ãããããŸããæ°ããæè¡ãæ©èœãè¿œå ãããçŸä»£ã®ããžãã¹ãç§åŠæè¡ã«å¯Ÿå¿ã§ããããã«ãªã£ãŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 130,
"tag": "p",
"text": "1980幎代ã«ã¯ãIBM以å€ã®äŒæ¥ãIBMäºææ©ã®è£œé ãéå§ããŸããããããã®è£œåã¯ãIBMã®ã·ã¹ãã ãšäºææ§ããããäœã³ã¹ãã§æäŸãããŠããŸãããããã«ãããããžãã¹ãæ¿åºæ©é¢ãªã©ãå€ãã®çµç¹ãIBMäºææ©ãå°å
¥ããã¡ã€ã³ãã¬ãŒã åžå Žãæ¡å€§ããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 131,
"tag": "p",
"text": "çŸåšãIBM Zã¯ãé«ãã»ãã¥ãªãã£ãšä¿¡é Œæ§ãæäŸããããã«ãããžãã¹ãéèæ©é¢ãæ¿åºæ©é¢ããããŠç§åŠæè¡ã®åéã§åºãå©çšãããŠããŸãããŸããIBM Zã¯ããªãŒãã³ãœãŒã¹ãã¯ã©ãŠãã³ã³ãã¥ãŒãã£ã³ã°ã®æè¡ãçµ±åããããšã§ãçŸä»£ã®ã¢ããªã±ãŒã·ã§ã³éçºãããŒã¿åæã®ããŒãºã«ã察å¿ã§ããããã«ãªã£ãŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 132,
"tag": "p",
"text": "IBMã®ã¡ã€ã³ãã¬ãŒã ã³ã³ãã¥ãŒã¿ãŒã¯ãã³ã³ãã¥ãŒã¿ãŒã®æŽå²ã«ãããŠéèŠãªäœçœ®ãå ããŠããŸãããã®é²åãè¿œãããšã§ãããžãã¹ãç§åŠæè¡ãã©ã®ããã«é²åããŠããããç解ããããšãã§ããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 133,
"tag": "p",
"text": "1951幎ãã¢ã¡ãªã«åè¡åœã®é»åæ©åšã¡ãŒã«ãŒãBurroughs Corporation(ãããŒã¹ç€Ÿ)ã¯ãæåã®åçšé»ååŒããžã¿ã«ã³ã³ãã¥ãŒã¿ãŒã§ããB5000ãçºå£²ããŸãããB5000ã¯ãããŒããŠã§ã¢ãšãœãããŠã§ã¢ãå¯æ¥ã«çµ±åãããæåã®ã³ã³ãã¥ãŒã¿ãŒã§ããããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã«å¯ŸããŠé«ãä¿¡é Œæ§ãšã»ãã¥ãªãã£ãæäŸããŸããããã®é©æ°çãªã¢ãŒããã¯ãã£ã¯ãæ±çšçãªã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãšã¯ç°ãªããããã°ã©ã ãå®è¡ãããéã«ããŒããŠã§ã¢ãèªåçã«å®è¡ç°å¢ãèšå®ãããšããç¹åŸŽãæã¡ãŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 134,
"tag": "p",
"text": "B5000ã®æåã«ç¶ããŠããããŒã¹ç€Ÿã¯1961幎ã«B5500ãçºå£²ããŸããããã®ã³ã³ãã¥ãŒã¿ãŒã¯ãB5000ã®ã¢ãŒããã¯ãã£ãç¶æ¿ãã€ã€ãããé«éãªåŠçé床ãå®çŸãã倧容éã®å€éšèšæ¶è£
眮ããµããŒãããŸããããŸãããããŒã¹ç€Ÿã¯1964幎ã«B6700ãçºå£²ããããã¯B5500ã®æ¡åŒµçã§ãããããé«éãªåŠçé床ãšå€§å®¹éã®èšæ¶è£
眮ãå®çŸããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 135,
"tag": "p",
"text": "1970幎代ã«å
¥ããšããããŒã¹ç€Ÿã¯ã¡ã€ã³ãã¬ãŒã ã³ã³ãã¥ãŒã¿ãŒåžå Žã§ç«¶åä»ç€Ÿãšæ¿ãã競åããŸããããã®äžã§ãã1976幎ã«çºå£²ãããB7700ã¯ãæ¥çæšæºã®ã¡ã€ã³ãã¬ãŒã ã³ã³ãã¥ãŒã¿ãŒã®ã¹ããã¯ãæã£ãŠããŸãããããã«ãB7800ã¯ãé«åºŠãªãã«ãããã»ããµãŒã¢ãŒããã¯ãã£ãæ¡çšããŠãããè€æ°ã®ããã»ããµãŒãåæã«å®è¡ããããšãã§ããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 136,
"tag": "p",
"text": "ãããã1980幎代ã«å
¥ããšããããŒã¹ç€Ÿã¯IBMãDECãªã©ã®ç«¶åä»ç€Ÿãšã®ç«¶äºã«è² ããã¡ã€ã³ãã¬ãŒã åžå Žããæ€éããŸããããã®åŸããããŒã¹ç€Ÿã¯UNIXããŒã¹ã®ãµãŒããŒè£œåãçºå£²ããçµå¶æŠç¥ã転æããŸããã1990幎代ã«å
¥ããšããããŒã¹ç€Ÿã¯ãšã¬ã¯ããããã¯ã»ããŒã¿ã»ã·ã¹ãã (EDS)ã«è²·åããããã®åŸã¯ãŠãã·ã¹ãšå䜵ããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 137,
"tag": "p",
"text": "ãããŒã¹ç€Ÿã®ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ã¯ãçŸä»£ã®ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ã®é²åã«å€å€§ãªåœ±é¿ãäžããŸãããç¹ã«B5000ã®ã¢ãŒããã¯ãã£ã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãšã®å¯æ¥ãªçµ±åã«ãã£ãŠé«ãä¿¡é Œæ§ãšã»ãã¥ãªãã£ãæäŸãããšããç¹ã§é©æ°çã§ããããã®åŸã®ã³ã³ãã¥ãŒã¿ãŒèšèšã«å€§ããªåœ±é¿ãäžããŸããããŸããB5000ã®ã¢ãŒããã¯ãã£ã«ãããããŒããŠã§ã¢ãèªåçã«å®è¡ç°å¢ãèšå®ããç¹åŸŽã¯ãçŸä»£ã®ã³ã³ãã¥ãŒã¿ãŒã®ä»®æ³åæè¡ã®åºç€ãšãªã£ãŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 138,
"tag": "p",
"text": "ããã«ãB5000ã®ã¢ãŒããã¯ãã£ã¯ãé«æ°Žæºèšèª(é«çŽèšèª)ãå©çšããããšãåæãšããŠãããããã°ã©ã ã®éçºå¹çã倧å¹
ã«åäžãããŸãããããã«ãããããã°ã©ããŒã¯ããé«ãæœè±¡åã¬ãã«ã§ããã°ã©ãã³ã°ãè¡ãããšãã§ããããã°ã©ã ã®å¯èªæ§ãä¿å®æ§ãåäžããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 139,
"tag": "p",
"text": "ãããŒã¹ç€Ÿã®ã³ã³ãã¥ãŒã¿ãŒèšèšã¯ãçŸä»£ã®ã³ã³ãã¥ãŒã¿ãŒç£æ¥ã«ãããŠå€§ããªåœ¹å²ãæãããŸããããã®ã¢ãŒããã¯ãã£ã¯ãã³ã³ãã¥ãŒã¿ãŒã®ä¿¡é Œæ§ãšã»ãã¥ãªãã£ãé«æ°Žæºèšèªã®å©çšãä»®æ³åæè¡ãªã©ãçŸä»£ã®ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®åºç€ãšãªã£ãŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 140,
"tag": "p",
"text": "ããã³ã³ãã¥ãŒã¿ãŒã¯ã1960幎代ãã1980幎代ã«ãããŠãäž»ã«äžå°èŠæš¡ã®äŒæ¥ãç 究æ©é¢ã§åºãå©çšãããã³ã³ãã¥ãŒã¿ãŒã®äžçš®ã§ããåœæã®ã¡ã€ã³ãã¬ãŒã ã³ã³ãã¥ãŒã¿ãŒãšæ¯èŒããŠãæ¯èŒçå°åã§å®äŸ¡ãªããšãç¹åŸŽã§ãããããã§ã¯ãããã³ã³ãã¥ãŒã¿ãŒã®çºå±ãšæŽå²ããäž»ãªæ©çš®ãšãšãã«å¹Žè¡šåœ¢åŒã§çŽ¹ä»ããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 141,
"tag": "p",
"text": "1960幎代ãã1980幎代ã«ãããŠãDEC(Digital Equipment Corporation)ã¯ã³ã³ãã¥ãŒã¿ã®äž»èŠãªè£œé äŒæ¥ã®1ã€ã§ããã圌ãã¯PDP(Programmed Data Processor)ã·ãªãŒãºã®å°åã³ã³ãã¥ãŒã¿ãéçºããVAX(Virtual Address eXtension)ã¢ãŒããã¯ãã£ã䜿çšãã倧åã³ã³ãã¥ãŒã¿ã補é ããŸããããããã®ã·ã¹ãã ã¯ãç§åŠãå·¥åŠãããžãã¹ãããã³æ¿åºã®å€ãã®åéã§äœ¿çšãããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 142,
"tag": "p",
"text": "1960幎代åŸåã«ã¯ãDECã¯PDP-8ãšåŒã°ããæåã®å°åã³ã³ãã¥ãŒã¿ãéçºããŸããããã®ã³ã³ãã¥ãŒã¿ã¯ãããã°ã©ã ãå®è¡ããããã«åœä»€ã解éãããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãå¿
èŠãšããŸããã§ããã1970幎代åé ã«ã¯ãããé«éãªPDP-11ãç»å Žãããã®ã³ã³ãã¥ãŒã¿ã¯ãã¡ã¢ãªã¢ã¯ã»ã¹ãšI/Oæäœã«ãããŠå€§å¹
ãªæ¹åãå®çŸããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 143,
"tag": "p",
"text": "1977幎ã«ã¯ãDECã¯VAXã·ãªãŒãºã®æåã®ã³ã³ãã¥ãŒã¿ãVAX-11/780ããªãªãŒã¹ããŸãããããã¯ã32ãããã®ä»®æ³ã¢ãã¬ã¹ç©ºéãæã€æåã®ã³ã³ãã¥ãŒã¿ã§ãããDECã®äž»å補åãšããŠé·å¹Žã«ããã£ãŠè²©å£²ãããŸãããVAXã¢ãŒããã¯ãã£ã¯ãã³ã³ãã¥ãŒã¿ã®é«æ§èœãšæ¡åŒµæ§ãè¿œæ±ããããã«èšèšãããå€ãã®å Žåã倧åŠãç 究æ©é¢ãæ¿åºæ©é¢ãªã©ã®å€§èŠæš¡ãªã³ã³ãã¥ãŒã¿ç°å¢ã§äœ¿çšãããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 144,
"tag": "p",
"text": "ãã€ã¯ãããã»ããµãŒã¯ãçŸä»£ã®ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã«ãããŠæ¬ ãããªãæè¡ã®äžã€ã§ãã1971幎ã«ã€ã³ãã«ç€Ÿãçºè¡šãã4004ãç®åãã«ããã®åŸãæ§ã
ãªã¡ãŒã«ãŒããå€ãã®ãã€ã¯ãããã»ããµãŒãçºå£²ãããã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®æ§èœåäžãã³ã¹ãåæžã«å€§ããè²¢ç®ããŠããŸãããããã§ã¯ããã€ã¯ãããã»ããµãŒã®æŽå²ãæ¯ãè¿ãã€ã€ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®é²åãèŠãŠãããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 145,
"tag": "p",
"text": "ãã€ã¯ãããã»ããµã¯ãçŸä»£ã®ã³ã³ãã¥ãŒã¿ã«æ¬ ãããªãéšåã®äžã€ã§ãããã®äžã§ãX86/X64ã¢ãŒããã¯ãã£ã¯ãããŒãœãã«ã³ã³ãã¥ãŒã¿ããµãŒããŒãªã©ãå¹
åºãåéã§äœ¿çšãããŠããŸããä»åã¯ãX86/X64ã¢ãŒããã¯ãã£ã®ãã€ã¯ãããã»ããµã«ã€ããŠã幎衚圢åŒã§çŽ¹ä»ããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 146,
"tag": "p",
"text": "ãã€ã¯ãããã»ããµã¯ãçŸä»£ã®ã³ã³ãã¥ãŒã¿ã®äžæ žããªãéšåã§ãããé«åºŠãªæ©èœãæã€å€ãã®ããã€ã¹ã®å¶åŸ¡ã«äœ¿çšãããŠããŸãããã€ã¯ãããã»ããµã®æŽå²ã¯éåžžã«èå³æ·±ããããã§ã¯Intelã®ãã€ã¯ãããã»ããµã®çºå±ã®å¹Žè¡šã説æããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 147,
"tag": "p",
"text": "ãã€ã¯ãããã»ããµã¯çŸä»£ã®ããžã¿ã«æè¡ã®åºç€ã§ãããç§ãã¡ãæ®æ®µäœ¿ã£ãŠããã¹ããŒããã©ã³ãã³ã³ãã¥ãŒã¿ãŒãªã©ã®ããã€ã¹ã«ãæèŒãããŠããŸãããã®äžã§ããã¢ãããŒã©ã¯ãã€ã¯ãããã»ããµã®å
é§ããšããŠãåºãç¥ãããŠããŸããããã§ä»åã¯ãããã€ã¯ãããã»ããµå¹Žè¡š (ã¢ãããŒã©ç·š)ããããŒãã«ãã¢ãããŒã©ã®ãã€ã¯ãããã»ããµã®æŽå²ãæ¯ãè¿ã£ãŠã¿ãããšæããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 148,
"tag": "p",
"text": "ãã®åŸããã¢ãããŒã©ã¯ãã€ã¯ãããã»ããµã®éçºãç¶ãã2003幎ã«ã¯ãPowerPC 970FXãçºå£²ããŸãããPowerPC 970FXã¯ãAppleã®Power Mac G5ã«æ¡çšãããé«æ§èœãªåŠçãå®çŸããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 149,
"tag": "p",
"text": "ã¢ãããŒã©ã®ãã€ã¯ãããã»ããµã¯ããã®æŽå²ãéããŠãé«éåŠçãé«æ§èœãªããã€ã¹ã«è²¢ç®ããŸãããç¹ã«ãMC68000ãPowerPCã¢ãŒããã¯ãã£ãæ¡çšãããã€ã¯ãããã»ããµã¯ãã³ã³ãã¥ãŒã¿ãŒã®é²åã«å€§ããªåœ±é¿ãäžããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 150,
"tag": "p",
"text": "ããããçŸåšã§ã¯ã¢ãããŒã©ã¯ãã€ã¯ãããã»ããµã®éçºããæ€éããä»ç€Ÿããã®å°äœãåŒãç¶ãã§ããŸããããã§ããã¢ãããŒã©ã®ãã€ã¯ãããã»ããµã¯ãããžã¿ã«æè¡ã®é²åã«ãããŠéèŠãªåœ¹å²ãæãããä»åŸããã®åœ±é¿ã¯ç¶ããŠããããšã§ãããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 151,
"tag": "p",
"text": "1970幎代ãã1980幎代ã«ãããŠãã³ã³ãã¥ãŒã¿æ¥çã¯æ¥éã«çºå±ãããã®äžã§ããã€ã¯ãããã»ããµã®çºæã¯ãã³ã³ãã¥ãŒã¿æè¡ã®çºå±ã«å€§ããè²¢ç®ããŸãããæ¬èšäºã§ã¯ã1978幎ã«ã¢ãããŒã©ãçºå£²ããMC6809ãšã1984幎ã«ç»å ŽããMC68030ãäžå¿ã«ããã®åŸç¶è£œå矀ãšããŠç»å Žãããã€ã¯ãããã»ããµã«ã€ããŠçŽ¹ä»ããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 152,
"tag": "p",
"text": "MC6809ã¯ã8ããããã€ã¯ãããã»ããµã®äžçš®ã§ã1978幎ã«ã¢ãããŒã©ã«ãã£ãŠçºå£²ãããŸãããMC6809ã¯ãããããã£ãŒã«ããæ§é äœããã€ã³ã¿ãªã©ã®æ©èœãåããŠãããããã¢ã»ã³ããªèšèªã®ã³ãŒãã£ã³ã°ã容æã«ãªããŸããããŸããMC6809ã¯ãæ©èœãå€åœ©ã§ãããªãããäœã³ã¹ãã§ããããšãç¹åŸŽã§ãããããã¯ãåœæã®ã³ã³ãã¥ãŒã¿ç£æ¥ã«ãšã£ãŠå€§ããªé©æ°ã§ãããå€ãã®äŒæ¥ãMC6809ãæ¡çšããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 153,
"tag": "p",
"text": "1984幎ã«ã¯ãMC68030ãç»å ŽããŸãããMC68030ã¯ã32ããããã€ã¯ãããã»ããµã§ãããMC68000ã®åŸç¶æ©çš®ãšããŠéçºãããŸãããMC68030ã¯ãé«éãªåœä»€åŠçèœåãæã¡ãé«ãæ§èœãçºæ®ããããšãã§ããŸããããŸããMC68030ã¯ãFPU(æµ®åå°æ°ç¹æŒç®ãŠããã)ãå
èµããŠãããã³ã³ãã¥ãŒã¿ã°ã©ãã£ãã¯ã¹ããµãŠã³ãåŠçãªã©ãé«åºŠãªåŠçãå¿
èŠãšããã¢ããªã±ãŒã·ã§ã³ã«é©ããŠããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 154,
"tag": "p",
"text": "MC68030ã®åŸç¶æ©çš®ãšããŠã¯ãMC68040ãMC68060ããããŸãããããã®ãã€ã¯ãããã»ããµã¯ãæ§èœãæ©èœã®åäžãå³ãããç¹ã«MC68060ã¯é«éãªã¯ããã¯åšæ³¢æ°ãšå€§éã®ãã£ãã·ã¥ã¡ã¢ãªãåããŠãããé«ãåŠçèœåãçºæ®ããããšãã§ããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 155,
"tag": "p",
"text": "ããã«ãMC88000ãç»å ŽããŸãããMC88000ã¯ã32ããããã€ã¯ãããã»ããµã§ãããUNIXãOS-9ãªã©ã®ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã«å¯Ÿå¿ããŠããŸãããMC88000ã¯ãè€æ°ã®å®è¡ã¢ãŒããåããŠãããé«ãæ§èœãçºæ®ããããšãã§ããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 156,
"tag": "p",
"text": "以äžã®ããã«ãMC6809ããMC68030ãã¯ãããšãããã®åŸç¶è£œå矀ãMC88000ãŸã§ããã€ã¯ãããã»ããµæè¡ã¯é²åãç¶ããã³ã³ãã¥ãŒã¿ã®æ§èœãåäžãããããšã«è²¢ç®ããŸãããMC6809ãMC68030ãªã©ãã¢ãããŒã©ã®ãã€ã¯ãããã»ããµã¯ããã®åŸãå€ãã®äŒæ¥ã«æ¡çšãããã³ã³ãã¥ãŒã¿æ¥çã«ãããŠå€§ããªåœ¹å²ãæãããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 157,
"tag": "p",
"text": "ãŸããMC88000ã¯ãUNIXãOS-9ãªã©ã®ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã«å¯Ÿå¿ããŠãããããçµã¿èŸŒã¿ã·ã¹ãã ããµãŒããŒãªã©ãæ§ã
ãªåéã§æ¡çšãããŸãããMC88000ã¯ãæ§èœãé«ããä¿¡é Œæ§ã«ãåªããŠãããã³ã³ãã¥ãŒã¿æ¥çã«ãããŠå€å€§ãªè©äŸ¡ãåããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 158,
"tag": "p",
"text": "çŸåšã§ã¯ãMC6809ãMC68030ãªã©ã®å€ããã€ã¯ãããã»ããµã¯ãæ°ããæè¡ã«åã£ãŠä»£ããããŠããŸãããããããããã®ãã€ã¯ãããã»ããµãã³ã³ãã¥ãŒã¿æ¥çã«äžãã圱é¿ã¯å€§ããããã®æè¡ã¯ä»ããªãçºå±ãç¶ããŠããŸããä»åŸãããã€ã¯ãããã»ããµã®é²åãã³ã³ãã¥ãŒã¿ã®æ§èœåäžã«è²¢ç®ããæ°ããªæè¡é©æ°ãçã¿åºããŠããããšãæåŸ
ãããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 159,
"tag": "p",
"text": "ARMã¯ãçŸä»£ã®ã³ã³ãã¥ãŒãã£ã³ã°ã«ãããŠæ¥µããŠéèŠãªåœ¹å²ãæãããŠãããã€ã¯ãããã»ããµã¢ãŒããã¯ãã£ã®äžã€ã§ããARMãåããŠç»å Žããã®ã¯ã1985幎ã®ããšã§ããã以æ¥ãARMã¯ãæºåž¯é»è©±ãã¹ããŒããã©ã³ãã¿ãã¬ãããè»èŒæ
å ±ã·ã¹ãã ããããã¯ãŒã¯æ©åšãã¹ããŒãã¹ããŒã«ãŒãIoTããã€ã¹ãªã©ãæ§ã
ãªåéã®ã³ã³ãã¥ãŒã¿ã·ã¹ãã ã«æ¡çšãããäžçäžã§å©çšãããŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 160,
"tag": "p",
"text": "以äžã§ã¯ãARMã®æŽå²ããã©ã圢ã§ããã€ã¯ãããã»ããµå¹Žè¡šãäœæããŠã¿ãŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 161,
"tag": "p",
"text": "ARMã¢ãŒããã¯ãã£ã¯ãã³ã³ãã¥ãŒã¿ã·ã¹ãã ã®é²åã«äŒŽããåžžã«ææ°ã®æè¡ãæ©èœãåãå
¥ããªããçºå±ããŠããŸãããä»åŸãARMã¯ãæ§ã
ãªåéã§éèŠãªåœ¹å²ãæããç¶ããããšãæåŸ
ãããŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 162,
"tag": "p",
"text": "ARM64ã¯ãARMããŒã«ãã£ã³ã°ã¹ãèšèšãã64ãããã¢ãŒããã¯ãã£ã®ãã€ã¯ãããã»ããµã§ãããã¹ããŒããã©ã³ãã¿ãã¬ãããããŒãããœã³ã³ããµãŒããŒãªã©ãå€æ§ãªããã€ã¹ã§äœ¿çšãããŠããŸãã以äžã§ã¯ãARM64ã®çºå±ã幎衚圢åŒã§æ¯ãè¿ããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 163,
"tag": "p",
"text": "ARM Cortex-A57ã¯ãARM64ã¢ãŒããã¯ãã£ã®æåã®ããã»ããµã®1ã€ã§ãããã¹ããŒããã©ã³ãã¿ãã¬ãããªã©ã®ã¢ãã€ã«ããã€ã¹ã§ã®äœ¿çšãæ³å®ããŠèšèšãããŸãããCortex-A57ã¯ãåŸæ¥ã®32ãããããã»ããµã«æ¯ã¹ãŠã倧å¹
ãªæ§èœåäžãšçé»ååãå¯èœã«ãªããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 164,
"tag": "p",
"text": "Apple A7ããã»ããµã¯ãiPhone 5sã«åããŠæ¡çšããããäžçåã®ARM64ããŒã¹ã®ãã€ã¯ãããã»ããµã§ããA7ã¯ãCortex-A57ãããŒã¹ã«Appleãç¬èªã«ã«ã¹ã¿ãã€ãºãããã®ã§ãåœæã®ã¢ãã€ã«ããã»ããµãšããŠã¯é«ãæ§èœãèªããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 165,
"tag": "p",
"text": "Snapdragon 810ã¯ãã¹ããŒããã©ã³åžå Žã«ãããŠãåããŠARM64ã¢ãŒããã¯ãã£ãæ¡çšããããã»ããµã®1ã€ã§ãã810ã¯ãCortex-A57ãšCortex-A53ã®ããã°.LITTLEã¢ãŒããã¯ãã£ãæ¡çšããé«ãæ§èœãšçé»åæ§ãå
ŒãåããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 166,
"tag": "p",
"text": "Cortex-A72ã¯ãARM64ã¢ãŒããã¯ãã£ã®äžã§ãé«æ§èœãªããã»ããµã®1ã€ã§ãããã¹ããŒããã©ã³ãã¿ãã¬ããããããŠãµãŒããŒãªã©ã®åéã§äœ¿çšãããŸãããCortex-A72ã¯ãCortex-A57ã«æ¯ã¹ãŠæ§èœãåäžããçé»ååãé²ãã ãšãããŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 167,
"tag": "p",
"text": "Snapdragon 835ã¯ãã¹ããŒããã©ã³åžå Žã«ãããŠåããŠ10nmããã»ã¹æè¡ãæ¡çšããããã»ããµã§ãããARM64ã¢ãŒããã¯ãã£ãæ¡çšããããã»ããµãšããŠã¯ãé«ãæ§èœãšçé»åæ§ãäž¡ç«ãããã®ã§ãããSnapdragon 835ã¯ãåœæã®ãããã¯ã©ã¹ã®ã¹ããŒããã©ã³ã«æ¡çšãããé«ãè©äŸ¡ãåŸãŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 168,
"tag": "p",
"text": "Cortex-A76ã¯ãARM64ã¢ãŒããã¯ãã£ã®äžã§ãé«æ§èœãªããã»ããµã®1ã€ã§ãããã¹ããŒããã©ã³ãã¿ãã¬ããããããŠãµãŒããŒãªã©ã®åéã§äœ¿çšãããŸãããCortex-A76ã¯ãCortex-A72ãCortex-A73ã«æ¯ã¹ãŠæ§èœãåäžããåæã«çé»ååãé²ãã ãšãããŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 169,
"tag": "p",
"text": "Snapdragon 855ã¯ãã¹ããŒããã©ã³åžå Žã«ãããŠåããŠ7nmããã»ã¹æè¡ãæ¡çšããããã»ããµã§ãããARM64ã¢ãŒããã¯ãã£ãæ¡çšããããã»ããµãšããŠã¯ãé«ãæ§èœãšçé»åæ§ãäž¡ç«ãããã®ã§ãããSnapdragon 855ã¯ãåœæã®ãããã¯ã©ã¹ã®ã¹ããŒããã©ã³ã«æ¡çšãããé«ãè©äŸ¡ãåŸãŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 170,
"tag": "p",
"text": "Apple M1ããã»ããµã¯ãMacã«æ¡çšãããäžçåã®ARM64ããŒã¹ã®ãã€ã¯ãããã»ããµã§ãããé«ãæ§èœãšçé»åæ§ãå
ŒãåããŠããŸããM1ã¯ãCortex-A78ãCortex-X1ã«æ¯ã¹ãŠæ§èœãåäžããåæã«çé»ååãé²ãã ãšãããŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 171,
"tag": "p",
"text": "Snapdragon 888ã¯ãã¹ããŒããã©ã³åžå Žã«ãããŠåããŠ5nmããã»ã¹æè¡ãæ¡çšããããã»ããµã§ãããARM64ã¢ãŒããã¯ãã£ãæ¡çšããããã»ããµãšããŠã¯ãé«ãæ§èœãšçé»åæ§ãäž¡ç«ãããã®ã§ãããSnapdragon 888ã¯ãåœæã®ãããã¯ã©ã¹ã®ã¹ããŒããã©ã³ã«æ¡çšãããé«ãè©äŸ¡ãåŸãŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 172,
"tag": "p",
"text": "以äžããARM64ã¢ãŒããã¯ãã£ã®ãã€ã¯ãããã»ããµã®çºå±ãæ¯ãè¿ã£ã幎衚ã§ããä»åŸããARM64ã¢ãŒããã¯ãã£ãæ¡çšããããã»ããµã®éçºãé²ã¿ããããªãæ§èœåäžãçé»ååãæåŸ
ãããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 173,
"tag": "p",
"text": "ããã§ã¯ãã¢ããã³ã¹ãã»ãã€ã¯ãã»ããã€ã»ãº(AMD)瀟ããªãªãŒã¹ãããã€ã¯ãããã»ããµã®æŽå²ã«ã€ããŠå¹Žè¡šåœ¢åŒã§ãŸãšããŠãããŸããAMD瀟ã¯ãIntel瀟ãšäžŠã¶äžççãªåå°äœã¡ãŒã«ãŒã§ããããã€ã¯ãããã»ããµåžå Žã§ãé«ãã·ã§ã¢ãæã£ãŠããŸãããããªAMD瀟ããããŸã§ã«ãªãªãŒã¹ããŠãããã€ã¯ãããã»ããµã®é²åã®è»è·¡ã蟿ã£ãŠãããŸãããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 174,
"tag": "p",
"text": "AMD瀟ã¯ãIntel瀟ã®ãã€ã¯ãããã»ããµã8080ãã®äºæåãšããŠãAm9080ãããªãªãŒã¹ããŸãããAm9080ã¯ãåœæã®8080ãšåãåœä»€ã»ãããæã£ãŠããããã8080åãã®ãœãããŠã§ã¢ããã®ãŸãŸåäœã§ãããšããå©ç¹ããããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 175,
"tag": "p",
"text": "AMD瀟ã¯ãIntel瀟ã®ãã€ã¯ãããã»ããµã8086ãã®äºæåãšããŠãAm9086ãããªãªãŒã¹ããŸãããAm9086ã¯ã8086ãšåã16ãããã®åœä»€ã»ãããæã£ãŠãããIBM PCãªã©ã®ã³ã³ãã¥ãŒã¿ã«ãæèŒãããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 176,
"tag": "p",
"text": "AMD瀟ã¯ãIntel瀟ã®ãã€ã¯ãããã»ããµã80286ãã®äºæåãšããŠãAm80286ãããªãªãŒã¹ããŸãããAm80286ã¯ã16ããããã32ãããã«ã¢ããã°ã¬ãŒããããåœä»€ã»ãããæã£ãŠãããé«éåãå³ãããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 177,
"tag": "p",
"text": "AMD瀟ã¯ãIntel瀟ã®ãã€ã¯ãããã»ããµã80486ãã®äºæåãšããŠãAm486ãããªãªãŒã¹ããŸãããAm486ã¯ã64ãããã®ããŒã¿ãã¹ãåããŠãããé«éåŠçãå¯èœã§ããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 178,
"tag": "p",
"text": "AMD瀟ã¯ãèªç€Ÿåã®ãªãªãžãã«ãã€ã¯ãããã»ããµãK5ãããªãªãŒã¹ããŸãããK5ã¯ãIntel瀟ã®ãPentiumãã·ãªãŒãºãšã®ç«¶åã«ãªãããšãç®çã«éçºãããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 179,
"tag": "p",
"text": "AMD瀟ã¯ãèªç€Ÿåã®x86ã¢ãŒããã¯ãã£ãæ¡çšããªããã€ã¯ãããã»ããµãAthlonãããªãªãŒã¹ããŸãããAthlonã¯ãåœæã®Intel瀟ã®è£œåããé«éãªåŠçæ§èœãæã¡ãAMD瀟ã«ãšã£ãŠå€§ããªæåãšãªããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 180,
"tag": "p",
"text": "AMD瀟ã¯ã64ãããã®x86ã¢ãŒããã¯ãã£ãæ¡çšãããAthlon 64ãããªãªãŒã¹ããŸãããAthlon 64ã¯ãåœæã®åžå Žã§å¯äžã®64ããããã€ã¯ãããã»ããµã§ãããé«éãªåŠçæ§èœãšæ¡åŒµæ§ãæã¡ãããžãã¹ããã€ãšã³ãã®ã³ã³ãã¥ãŒã¿åãã«é«ãè©äŸ¡ãåããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 181,
"tag": "p",
"text": "AMD瀟ã¯ã2ã€ã®ã³ã¢ãæã€ãã€ã¯ãããã»ããµãAthlon X2ãããªãªãŒã¹ããŸãããAthlon X2ã¯ããã«ãã¿ã¹ã¯åŠçã«åªããé«éã§å®å®ããããã©ãŒãã³ã¹ãçºæ®ããã²ãŒã ãåç»ç·šéãªã©ã«åãã補åãšããŠäººæ°ãåããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 182,
"tag": "p",
"text": "AMD瀟ã¯ãåœæææ°ã®x86ã¢ãŒããã¯ãã£ãæ¡çšãããBulldozerãããªãªãŒã¹ããŸãããBulldozerã¯ãæ倧8ã€ã®ã³ã¢ãæã¡ãé«éãªæŒç®æ§èœãçºæ®ããã¯ãŒã¯ã¹ããŒã·ã§ã³ããµãŒããŒåãã«æ³šç®ãããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 183,
"tag": "p",
"text": "AMD瀟ã¯ãZenã¢ãŒããã¯ãã£ãæ¡çšãããã€ã¯ãããã»ããµãRyzenãããªãªãŒã¹ããŸãããRyzenã¯ãé«éãªãã«ãã¿ã¹ã¯åŠçãã³ã³ãã³ãã®å¶äœãã²ãŒã ãªã©ã®å¹
åºãçšéã«åãã補åãšããŠé«ãè©äŸ¡ãåŸãŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 184,
"tag": "p",
"text": "AMD瀟ã¯ãZen 3ã¢ãŒããã¯ãã£ãæ¡çšãããRyzen 5000ãã·ãªãŒãºããªãªãŒã¹ããŸãããRyzen 5000ã¯ãé«ãã¯ããã¯é床ãšå€§å®¹éãã£ãã·ã¥ã«ãããé«éã§å®å®ããããã©ãŒãã³ã¹ãçºæ®ããã²ãŒã ãã¯ãªãšã€ãã£ããªäœæ¥ã«åãã補åãšããŠè©±é¡ã«ãªããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 185,
"tag": "p",
"text": "AMD瀟ã¯ãZen 3+ã¢ãŒããã¯ãã£ãæ¡çšãããRyzen 6000ãã·ãªãŒãºããªãªãŒã¹ããäºå®ã§ããRyzen 6000ã·ãªãŒãºã¯ãAMDã2021幎ã«çºè¡šããæ°ãããã€ã¯ãã¢ãŒããã¯ãã£ãZen 3+ããæ¡çšããŠãããæŽã«é«éãªæŒç®æ§èœãAIæ§èœã®åäžãæåŸ
ãããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 186,
"tag": "p",
"text": "ãŸãã2021幎ã«ã¯ãAMDãã°ã©ãã£ãã¯ã¹ã«ãŒãåžå Žã§ã泚ç®ãéããŸãããå瀟ã¯ãRDNA2ã¢ãŒããã¯ãã£ãæ¡çšãããRadeon RX 6000ãã·ãªãŒãºããªãªãŒã¹ããNVIDIA瀟ãšç«¶åãã圢ã§åžå Žã«åå
¥ããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 187,
"tag": "p",
"text": "以äžããAMD瀟ã®ãã€ã¯ãããã»ããµã®æŽå²ã幎衚圢åŒã§ãŸãšããå
容ã§ããAMD瀟ã¯ãIntel瀟ãšã®ç«¶äºãéããŠåžžã«é²åãç¶ããé«ãæ§èœãšã³ã¹ãããã©ãŒãã³ã¹ã®äž¡ç«ãå®çŸããŠããŸããä»åŸããAMD瀟ã®æè¡é©æ°ã«æ³šç®ããŠãããããšããã§ãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 188,
"tag": "p",
"text": "MD2901/AMD2916/AMD29000ãšãããã€ã¯ãããã»ããµã¯ãã¢ããã³ã¹ãã»ãã€ã¯ãã»ããã€ã»ãº(AMD)ã«ãã£ãŠéçºããããéèŠãªãã€ã¯ãããã»ããµã®äžã€ã§ããæ¬èšäºã§ã¯ãAMD2901/AMD2916/AMD29000ã®å¹Žè¡šã«ã€ããŠè§£èª¬ããŠãããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 189,
"tag": "p",
"text": "以äžããAMD2901/AMD2916/AMD29000ã®äž»èŠãªå¹Žè¡šã§ãããAMD2901ã¯ãåæã®ãã€ã¯ãããã»ããµã®äžã€ãšããŠãããŒãœãã«ã³ã³ãã¥ãŒã¿ã®çºå±ã«è²¢ç®ãããAMD2916ã¯ãAMD2901ã®åŸç¶ãšããŠã16ãããã®åŠçèœåãæã€ãã€ã¯ãããã»ããµãšããŠãç£æ¥å¶åŸ¡ãèšç®æ©æ¯æŽèšèšãéä¿¡ãªã©ã®åéã§å©çšããããAMD29000ã¯ãRISCã¢ãŒããã¯ãã£ãæ¡çšããããšã«ãããé«éã§å¹ççãªæŒç®ãå¯èœã§ãããé«æ§èœã³ã³ãã¥ãŒã¿ãã¯ãŒã¯ã¹ããŒã·ã§ã³ãªã©ã®åéã§å©çšãããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 190,
"tag": "p",
"text": "ãã€ã³ãããã¯ã·ã§ã³ã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 191,
"tag": "p",
"text": "ããŒãœãã«ã³ã³ãã¥ãŒã¿ãã¹ããŒããã©ã³ãã²ãŒã æ©ããµãŒããŒãã¹ãŒããŒã³ã³ãã¥ãŒã¿ãŒãªã©ãç§ãã¡ãæ¥ã
䜿çšããæ©åšã®äžã«ã¯ããã€ã¯ãããã»ããµãšåŒã°ããå°åã®CPUãæèŒãããŠããŸããä»åã¯ããã®äžã§ããPower/PowerPCããšåŒã°ãããã€ã¯ãããã»ããµã®æŽå²ã幎衚圢åŒã§æ¯ãè¿ãããã®ç¹åŸŽã掻èºããåéã«ã€ããŠçŽ¹ä»ããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 192,
"tag": "p",
"text": "ããã€ã¯ãããã»ããµå¹Žè¡š (Power/PowerPCç·š)ã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 193,
"tag": "p",
"text": "ç¹åŸŽ:åœä»€ã»ãããç°¡çŽ åãããŠãããé«éãªæŒç®åŠçãå¯èœã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 194,
"tag": "p",
"text": "ç¹åŸŽ:POWER1ã®æè¡ãããŒã¹ã«ãAppleãæ¡çšããMacintoshã·ãªãŒãºã®CPUãšããŠæ¡çšãããé«ãæ§èœãå®çŸã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 195,
"tag": "p",
"text": "ç¹åŸŽ:é«åºŠãªã¹ãŒããŒã¹ã«ã©ãŒæ¹åŒãæ¡çšããé«æ§èœåãå³ã£ãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 196,
"tag": "p",
"text": "ç¹åŸŽ:çé»åæ§ã«åªããäœäŸ¡æ Œã§æäŸãããããšããããšã³ããããæ©åšã«ãæ¡çšãããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 197,
"tag": "p",
"text": "ç¹åŸŽ:64ãããã¢ãŒããã¯ãã£ãæ¡çšããé«ãæŒç®æ§èœãšä¿¡é Œæ§ãå®çŸã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 198,
"tag": "p",
"text": "ç¹åŸŽ:AltivecãšåŒã°ãããã¯ãã«æŒç®æ©èœãæèŒããç»ååŠçãé³å£°åŠçãªã©ã®åéã§é«ãè©äŸ¡ãåããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 199,
"tag": "p",
"text": "ç¹åŸŽ:ãã«ãããã»ãã·ã³ã°ã«å¯Ÿå¿ããã¹ãŒããŒã³ã³ãã¥ãŒã¿ãŒããµãŒããŒã§ã®äœ¿çšã«åããé«æ§èœCPUã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 200,
"tag": "p",
"text": "ç¹åŸŽ:ãã«ãã¹ã¬ããæè¡ãæ¡çšããè€æ°ã®åŠçãåæã«å®è¡å¯èœãšããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 201,
"tag": "p",
"text": "ç¹åŸŽ:é«åºŠãªãšã©ãŒã³ã¬ã¯ã·ã§ã³æ©èœãåããä¿¡é Œæ§ãæŽã«åäžãããããŸããåçãªé»å管çæ©èœãæ¡çšããããšã§ãçé»åæ§ãåäžããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 202,
"tag": "p",
"text": "ç¹åŸŽ:é«éãªãã£ãã·ã¥ã¡ã¢ãªãšãé«åºŠãªãã«ãã¹ã¬ããæè¡ãæ¡çšããé«ãæŒç®åŠçèœåãšä¿¡é Œæ§ãå®çŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 203,
"tag": "p",
"text": "ç¹åŸŽ:è€æ°ã®ã³ã¢ãæèŒããé«ããã«ãã¹ã¬ããåŠçèœåãšäžŠååŠçèœåãåããããŸããOpenPOWER Foundationãèšç«ãããªãŒãã³ãªã¢ãŒããã¯ãã£ãæšé²ããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 204,
"tag": "p",
"text": "ç¹åŸŽ:é«ãæŒç®æ§èœãšãAIããã£ãŒãã©ãŒãã³ã°ãªã©ã®é«åºŠãªåéã«ã察å¿ããæ©èœãæèŒããããŸããOpenCAPIãšåŒã°ããé«éãªæ¥ç¶èŠæ Œãæ¡çšããããšã§ãé«éãªããŒã¿è»¢éãå¯èœãšãªã£ãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 205,
"tag": "p",
"text": "ããŸãšãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 206,
"tag": "p",
"text": "ãPower/PowerPCãã¯ãIBMãAppleãMotorolaãªã©ãå
±åã§éçºãããã€ã¯ãããã»ããµã§ãããé«ãæ§èœãçé»åæ§ãä¿¡é Œæ§ãªã©ã®ç¹åŸŽãæã¡ãã¹ãŒããŒã³ã³ãã¥ãŒã¿ãŒããµãŒããŒããšã³ããããæ©åšããããŠäžææã¯Macintoshã·ãªãŒãºã®CPUãšããŠã䜿çšãããŸããããã®æŽå²ãæ¯ãè¿ãããšã§ããã€ã¯ãããã»ããµã®é²åãæè¡é©æ°ã®æŽå²ãç解ããããšãã§ããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 207,
"tag": "p",
"text": "ä»ãã40幎ã»ã©åããµã³ã»ãã€ã¯ãã·ã¹ãã ãºç€Ÿãèšç«ãããç¬èªã®ããã»ããµã¢ãŒããã¯ãã£ãSPARCããéçºããŸããããã®åŸãSPARCã¯äžçäžã®äŒæ¥ãç 究æ©é¢ã§å©çšãããå€ãã®ã·ã¹ãã ããµãŒããŒã§æ¡çšãããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 208,
"tag": "p",
"text": "以äžã§ã¯ãSPARCã¢ãŒããã¯ãã£ãäžå¿ã«ãããã€ã¯ãããã»ããµã®é²åãæ¯ãè¿ããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 209,
"tag": "p",
"text": "ãµã³ã»ãã€ã¯ãã·ã¹ãã ãºç€ŸãåããŠãªãªãŒã¹ããSPARCã¢ãŒããã¯ãã£ã®ããã»ããµã¯ãSPARCstation 1ã«æèŒãããŸãããåœæã¯25MHzã§åäœãã32ãããã®åœä»€ã»ãããæ¡çšããŠããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 210,
"tag": "p",
"text": "æ¥æ¬ã®å¯å£«é瀟ãéçºããSPARC64ã¯ãåœææãé«éãªããã»ããµã®1ã€ã§ãããå代ã®SPARC64ã¯æ倧150MHzã§åäœããæ§èœã®é¢ã§SPARCstation 10ããã®ããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 211,
"tag": "p",
"text": "SPARCstation 20ã¯ãåããŠå¯Ÿç§°ãã«ãããã»ãã·ã³ã°(SMP)ããµããŒãããSPARCã·ã¹ãã ã§ãããããã«ãããè€æ°ã®ããã»ããµã1ã€ã®ã·ã¹ãã ã§åæã«åäœãããããšãå¯èœã«ãªããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 212,
"tag": "p",
"text": "ãµã³ã»ãã€ã¯ãã·ã¹ãã ãºç€ŸããªãªãŒã¹ããUltraSPARC IIIã¯ãåããŠã®64ãããã®SPARCããã»ããµã§ãããåœææéã®ã¯ããã¯åšæ³¢æ°1.2GHzãèªããé«ãæ§èœãçºæ®ããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 213,
"tag": "p",
"text": "UltraSPARC T1ã¯ãåœææãé²ãã ãã«ãã¹ã¬ããæè¡ãæ¡çšããããã»ããµã§ãããåœæã®ããã»ããµã¯1ã€ã®ã³ã¢ã§1ã€ã®ã¹ã¬ããããåŠçã§ããŸããã§ããããUltraSPARC T1ã¯1ã€ã®ã³ã¢ã§æ倧32ã¹ã¬ãããåŠçããããšãã§ããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 214,
"tag": "p",
"text": "SPARC T3ã¯ãUltraSPARC T1ã®åŸç¶ã¢ãã«ã§ã16ã³ã¢ã®ããã»ããµãšæ倧128ã¹ã¬ããããµããŒãããŸããããã®ããã»ããµã¯ãããžãã¹ã¯ãªãã£ã«ã«ãªã¢ããªã±ãŒã·ã§ã³ãããŒã¿ããŒã¹ã·ã¹ãã ãªã©ã®åŠçã«é©ããŠããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 215,
"tag": "p",
"text": "SPARC M8ã¯ãææ°ã®SPARCããã»ããµã§ãæ倧8ãœã±ããã®ã·ã¹ãã ã§åäœããããšãã§ããŸããé«éã§å®å®ããæ§èœãçºæ®ãã倧èŠæš¡ãªããŒã¿åŠçãä»®æ³åãªã©ã®çšéã«é©ããŠããŸãããŸããSPARC M8ã¯ã»ãã¥ãªãã£ã«ã泚åããæå·åãã¡ã¢ãªä¿è·æ©èœãªã©ã匷åãããŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 216,
"tag": "p",
"text": "以äžããSPARCã¢ãŒããã¯ãã£ã®äž»ãªããã»ããµã®é²åã®æŽå²ã§ããä»åŸããSPARCã¢ãŒããã¯ãã£ã¯å€§èŠæš¡ãªã·ã¹ãã ããµãŒããŒãªã©ã§æŽ»èºãç¶ããããšãæåŸ
ãããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 217,
"tag": "p",
"text": "ãã¯ããã«ã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 218,
"tag": "p",
"text": "ãã€ã¯ãããã»ããµã®æŽå²ã¯ãçŸä»£ã®æ
å ±æè¡ã«ãããŠæ¥µããŠéèŠãªäœçœ®ãå ããŠããŸãããã®äžã§ãDEC/Alphaã¯ã1990幎代ã«ç»å Žããé«æ§èœãã€ä¿¡é Œæ§ã®é«ããµãŒããŒãã¯ãŒã¯ã¹ããŒã·ã§ã³ã«å©çšãããŸãããæ¬èšäºã§ã¯ãDEC/Alphaã®ãã€ã¯ãããã»ããµã®æŽå²ã幎衚圢åŒã§ãŸãšãããã®ç¹åŸŽãå瞟ã«ã€ããŠè§£èª¬ããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 219,
"tag": "p",
"text": "ããã€ã¯ãããã»ããµå¹Žè¡š (DEC/Alphaç·š)ã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 220,
"tag": "p",
"text": "DEC/Alphaã®æåã®ãã€ã¯ãããã»ããµãšããŠç»å Žãåœä»€ãã€ãã©ã€ã³ãå©çšããŠé«éãªåŠçãå¯èœã§ãããRISCã¢ãŒããã¯ãã£ãæ¡çšããŠããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 221,
"tag": "p",
"text": "åœä»€ãã€ãã©ã€ã³ãããé«éåããããã«ããã£ãŒããã€ãã©ã€ã³ãå°å
¥ããããŸãã64ãããã¢ãŒããã¯ãã£ãæ¡çšããããšã§ã倧容éã®ã¡ã¢ãªãæ±ãããšãã§ããããã«ãªã£ãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 222,
"tag": "p",
"text": "åœä»€ãã€ãã©ã€ã³ã18段ã«æ¡å€§ããããšã§ãé«æ§èœåãå³ã£ãããŸãããã¹åž¯åå¹
ã倧å¹
ã«å¢ãããã·ã¹ãã å
šäœã®åŠçé床ãåäžãããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 223,
"tag": "p",
"text": "é«éåãšä¿¡é Œæ§ã®åäžãç®çã«ã2ã€ã®ããã»ããµã1ã€ã®ãããã«éç©ãããããã«ã»ãã€ãã©ã€ã³ã»ã¢ãŒããã¯ãã£ããæ¡çšããããŸããé«éãªã¡ã¢ãªãŒã¢ã¯ã»ã¹ãå®çŸãããã±ãŒã¹ãŒãã»ã€ã³ã¿ãªãŒããæè¡ãå°å
¥ããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 224,
"tag": "p",
"text": "DEC/Alphaããã»ããµã®çç£ãçµäºãã補åã®ãµããŒããçµäºããããšãçºè¡šããããDEC/Alphaã¯ãé«æ§èœãã€ä¿¡é Œæ§ã®é«ããµãŒããŒãã¯ãŒã¯ã¹ããŒã·ã§ã³ã«å©çšããããã®æ§èœã¯åœæã®æ
å ±æè¡ã«ãããŠäžå®ã®å°äœãç¯ããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 225,
"tag": "p",
"text": "ãDEC/Alphaã®ç¹åŸŽãšå瞟ã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 226,
"tag": "p",
"text": "DEC/Alphaã¯ãRISCã¢ãŒããã¯ãã£ãæ¡çšããé«éãªåŠçãå¯èœã§ããããšãç¹åŸŽã§ãããŸãã64ãããã¢ãŒããã¯ãã£ãæ¡çšããããšã§ã倧容éã®ã¡ã¢ãªãæ±ãããšãã§ããããã«ãªããŸãããããã«ãåœä»€ãã€ãã©ã€ã³ããã£ãŒããã€ãã©ã€ã³ãããã«ã»ãã€ãã©ã€ã³ã»ã¢ãŒããã¯ãã£ãã±ãŒã¹ãŒãã»ã€ã³ã¿ãªãŒããªã©ã®æè¡ãå°å
¥ããé«æ§èœãã€ä¿¡é Œæ§ã®é«ããµãŒããŒãã¯ãŒã¯ã¹ããŒã·ã§ã³ãå®çŸããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 227,
"tag": "p",
"text": "DEC/Alphaã¯ã1990幎代ã«ç»å Žãããããåœæã®æ
å ±æè¡ã«ãããŠäžå®ã®å°äœãç¯ããŸãããç¹ã«ãé«æ§èœãªåŠçèœåãæã¡ã倧èŠæš¡ãªããŒã¿åŠçãé«è² è·ãªã¢ããªã±ãŒã·ã§ã³ãåŠçããããšãã§ããããããµãŒããŒãã¯ãŒã¯ã¹ããŒã·ã§ã³ã«åºãå©çšãããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 228,
"tag": "p",
"text": "ãŸããDEC/Alphaã¯ããªãŒãã³ãªã¢ãŒããã¯ãã£ãæ¡çšããŠãããããä»ç€Ÿã®è£œåãšã®äºææ§ãé«ããå€æ°ã®ãœãããŠã§ã¢ãéçºãããŸããããã®ãããDEC/Alphaã¯ãæ¥çæšæºãšããŠåºãèªç¥ãããå€ãã®äŒæ¥ãç 究æ©é¢ã§å©çšãããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 229,
"tag": "p",
"text": "DEC/Alphaã¯ã2001幎ã«çç£çµäºãçºè¡šããã補åã®ãµããŒããçµäºããŸãããããã®å瞟ã¯çŸåšã§ãé«ãè©äŸ¡ãããŠããŸããDEC/Alphaã®æè¡ã¯ãåŸã®ããã»ããµã®éçºã«åœ±é¿ãäžããçŸä»£ã®æ
å ±æè¡ã«ãããŠãéèŠãªäœçœ®ãå ããŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 230,
"tag": "p",
"text": "ãã€ã¯ãããã»ããµã®äžçã«ãããŠãHP/PA-RISCã¯éèŠãªäœçœ®ãå ããŠããŸãããã®èšäºã§ã¯ãHP/PA-RISCãã€ã¯ãããã»ããµã®æŽå²ãæ¯ãè¿ããªããããã®ç¹åŸŽã圱é¿åã«ã€ããŠçŽ¹ä»ããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 231,
"tag": "p",
"text": "HP/PA-RISCãšã¯",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 232,
"tag": "p",
"text": "HP/PA-RISCã¯ãHewlett-Packard (HP) 瀟ãéçºããRISCã¢ãŒããã¯ãã£ã®ãã€ã¯ãããã»ããµã§ããPA-RISCã¯ããPrecision Architecture Reduced Instruction Set Computingãã®ç¥ç§°ã§ãé«åºŠãªèšç®èœåãæã¡ãªãããåœä»€ã»ãããã·ã³ãã«ãªç¹åŸŽãæã£ãŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 233,
"tag": "p",
"text": "HP/PA-RISCã®æŽå²",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 234,
"tag": "p",
"text": "HP/PA-RISCã®æŽå²ã¯ã1980幎代åé ã«é¡ããŸããåœæãHPã¯èªç€Ÿã®ã³ã³ãã¥ãŒã¿äºæ¥ã«ãããŠãIBMãDECãªã©ã®ã©ã€ãã«äŒæ¥ã«è¿œãã€ãããšãç®æããŠããŸãããããã§ãHPã¯èªç€Ÿç¬èªã®ãã€ã¯ãããã»ããµãéçºããããšã決å®ããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 235,
"tag": "p",
"text": "æåã®PA-RISCããã»ããµã¯ã1986幎ã«ãªãªãŒã¹ãããPA-7100ã§ããããã®ããã»ããµã¯ã16MHzã§åäœãã32ãããã¢ãŒããã¯ãã£ã16Kã®ãã£ãã·ã¥ã¡ã¢ãªãåããŠããŸãããPA-7100ã¯ãHPã®é«æ§èœã¯ãŒã¯ã¹ããŒã·ã§ã³ã§ããHP 9000ã·ãªãŒãºã§äœ¿çšãããåœæã®ç«¶å補åã«æ¯ã¹ãŠé«éãã€é«æ§èœãªåŠçãå®çŸããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 236,
"tag": "p",
"text": "ãã®åŸãHPã¯PA-RISCã¢ãŒããã¯ãã£ãé²åãããããé«éã§é«æ§èœãªããã»ããµãéçºãç¶ããŸããã1992幎ã«ãªãªãŒã¹ãããPA-8000ã¯ãã¯ããã¯åšæ³¢æ°ã100MHzã«ãŸã§éããè¶
ã¹ã«ã©ãŒæ¹åŒã«ããåœä»€å®è¡ãæ¡çšãããªã©ãåœæã®æå
端ã®æè¡ãçã蟌ãŸããããã»ããµã§ããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 237,
"tag": "p",
"text": "HP/PA-RISCã®ç¹åŸŽãšåœ±é¿å",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 238,
"tag": "p",
"text": "HP/PA-RISCã¯ãã·ã³ãã«ãªåœä»€ã»ãããæ¡çšããããšã§ãé«éãªåŠçèœåãå®çŸããŸããããŸããPA-RISCã¯é«åºŠãªãã€ãã©ã€ã³åŠçãã¢ãŠãã»ãªãã»ãªãŒããŒå®è¡æ©èœãåããŠãããé«æ§èœãµãŒããŒãã¯ãŒã¯ã¹ããŒã·ã§ã³ãªã©ã®éèŠãªæ¥åã·ã¹ãã ã«ãããŠãé«éãã€å®å®ããåŠçãæäŸããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 239,
"tag": "p",
"text": "HP/PA-RISCã®éçºã«ãã£ãŠãRISCã¢ãŒããã¯ãã£ãæ®åããå¥æ©ãšãªã£ãããšã泚ç®ãã¹ãç¹ã§ããåœæã®ã³ã³ãã¥ãŒã¿åžå Žã«ãããŠãäž»æµã§ãã£ãCISCã¢ãŒããã¯ãã£ã«æ¯ã¹ãRISCã¢ãŒããã¯ãã£ã¯ã·ã³ãã«ãªåœä»€ã»ãããšé«éãªåŠçèœåãç¹åŸŽã§ãããHP/PA-RISCã®æåã«ãã£ãŠãRISCã¢ãŒããã¯ãã£ã¯äžè¬çã«èªç¥ãããããã«ãªãããã®åŸã®CPUã®éçºã«å€§ããªåœ±é¿ãäžããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 240,
"tag": "p",
"text": "HP 64000ã¯ãåœæã®ãã€ã¯ãããã»ããµã®éçºç°å¢ãšããŠã¯éåžžã«å
é²çã§ããããã®ã·ã¹ãã ã¯ãCPUãã¡ã¢ãªããã£ã¹ã¯ãã©ã€ããå
¥åºåã€ã³ã¿ãã§ãŒã¹ããããã°ããŒã«ãªã©ãçµ±åãããã€ã¯ãããã»ããµã®èšèšãã補é ãŸã§ã®äžé£ã®ããã»ã¹ããµããŒãããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 241,
"tag": "p",
"text": "HP 64000ã¯ã1979幎ã«çºå£²ãããåœæã¯äŸ¡æ Œãéåžžã«é«ãã£ããããäžéšã®å€§æäŒæ¥ã倧åŠã®ç 究宀ãªã©ã§ããå©çšãããŸããã§ããããããããã®é«åºŠãªæ©èœãšä¿¡é Œæ§ã«ããããã€ã¯ãããã»ããµã®éçºã«æºãã人ã
ããã¯é«ãè©äŸ¡ãåããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 242,
"tag": "p",
"text": "ãŸããHP 64000ã®ç»å Žã«ããããã€ã¯ãããã»ããµã®éçºããã容æã«ãªãããããŸã§ã®ç
©éãªäœæ¥ã倧å¹
ã«ç°¡ç¥åããããšãã§ããããã«ãªããŸããããã®ããšããåŸã«ã³ã³ãã¥ãŒã¿ãŒç£æ¥ã®æ¥éãªçºå±ã«ç¹ããããšã«ãªããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 243,
"tag": "p",
"text": "HP 64000ã¯ãåœåã¯Intel 8085ãMotorola 6800ãªã©ã®ãã€ã¯ãããã»ããµã«å¯Ÿå¿ããŠããŸããããåŸã«Zilog Z80ãIntel 8086ãªã©ã®æ°ãããã€ã¯ãããã»ããµã«ã察å¿ããããã«ãªããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 244,
"tag": "p",
"text": "ãŸããHPã¯åŸã«ãHP 64000ãæ¡åŒµãããHP 64000Aãããããé«æ§èœãªãã€ã¯ãããã»ããµçšéçºã·ã¹ãã ãHP 9000 Series 200ããªã©ãããã«é«åºŠãªã·ã¹ãã ãçºå£²ããŸããããããã®ã·ã¹ãã ã¯ããã倧èŠæš¡ãªãããžã§ã¯ããé«åºŠãªèšèšã«å¿
èŠãªæ©èœãæäŸããããšãã§ããå€ãã®äŒæ¥ã倧åŠã§å©çšãããããã«ãªããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 245,
"tag": "p",
"text": "ããã«ãHPã¯1983幎ã«ããã€ã¯ãããã»ããµã®éçºã«å¿
èŠãªãœãããŠã§ã¢éçºããŒã«ã®äžã€ã§ãããHP-UXããçºè¡šããŸãããããã¯ãUnixãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãåºã«ãããã®ã§ãé«ãæ±çšæ§ãšä¿¡é Œæ§ãæã¡ãå€ãã®éçºè
ã«æçšãããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 246,
"tag": "p",
"text": "ãããã1990幎代ã«å
¥ããšã競åä»ç€Ÿã®å°é ããPCã®æ®åã«ãã£ãŠãHPã®ãã€ã¯ãããã»ããµéçºã·ã¹ãã ã®åžå Žã·ã§ã¢ã¯äœäžããŠãããŸãã2000幎代ã«å
¥ããšãHPã¯ãã€ã¯ãããã»ããµéçºã·ã¹ãã ããæ€éããä»ã®äºæ¥ã«æ³šåããããšã«ãªããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 247,
"tag": "p",
"text": "ããããªãããHP 64000ã¯ããã®åŸããã€ã¯ãããã»ããµã®æŽå²ã«ãããŠéèŠãªåœ¹å²ãæããç¶ããŸãããå€ãã®éçºè
ãã¡ã«ãã£ãŠå©çšããã次äžä»£ã®ãã€ã¯ãããã»ããµã®éçºã«è²¢ç®ããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 248,
"tag": "p",
"text": "ãŸããHP 64000ã®æåã¯ãä»æ¥ã®ã³ã³ãã¥ãŒã¿ãŒç£æ¥ã«ãããŠããã€ã¯ãããã»ããµéçºã«æºãã人ã
ã«ãšã£ãŠã®è²ŽéãªçµéšãšãªããŸããããã®ã·ã¹ãã ã«è§Šããããšããã人ã
ã¯ããã®åŸãèªãã®éçºã«åœ¹ç«ãŠãããšãã§ããã®ã§ãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 249,
"tag": "p",
"text": "ä»æ¥ããã€ã¯ãããã»ããµã®éçºã¯ããããªãé«åºŠåãšå€æ§åãé²ãã§ããŸããæ°ãããã¯ãããžãŒã®ç»å Žã«ããããããŸã§ã«ãªãé«æ§èœãªãã€ã¯ãããã»ããµãçã¿åºãããŠããŸãããããããã®åºç€ãšãªãéçºç°å¢ã¯ãHP 64000ããå§ãŸã£ãæŽå²ããããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 250,
"tag": "p",
"text": "ãã€ã¯ãããã»ããµã¯ãçŸä»£ã®ããžã¿ã«ãã¯ãããžãŒã«ãšã£ãŠäžå¯æ¬ ãªåœ¹å²ãæãããŠããŸããç¹ã«ãMIPS/MIPS64ã¯é«æ§èœã³ã³ãã¥ãŒã¿ãŒãçµã¿èŸŒã¿ã·ã¹ãã ã®åéã§éèŠãªåœ¹å²ãæãããŠããŸãããããã§ã¯ãMIPS/MIPS64ã®æŽå²ã«ã€ããŠçŽ¹ä»ãããã®éèŠæ§ã«ã€ããŠèå¯ããŠã¿ãŸãããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 251,
"tag": "p",
"text": "MIPS/MIPS64ã®æŽå²",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 252,
"tag": "p",
"text": "MIPS (Microprocessor without Interlocked Pipeline Stages)ã¯ã1980幎代åé ã«ã¹ã¿ã³ãã©ãŒã倧åŠã§éçºãããRISC (Reduced Instruction Set Computing)ã¢ãŒããã¯ãã£ã®ãã€ã¯ãããã»ããµã§ããMIPSã¯ãåœä»€ã»ããã®ç°¡çŽ åãšãã€ãã©ã€ã³åŠçã®æé©åã«ãã£ãŠé«éãªåŠçãå®çŸããçµã¿èŸŒã¿ã·ã¹ãã ãé«æ§èœã³ã³ãã¥ãŒã¿ãŒã®åéã§åºãå©çšãããããã«ãªããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 253,
"tag": "p",
"text": "MIPS/MIPS64ã®éèŠæ§",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 254,
"tag": "p",
"text": "MIPS/MIPS64ã¯ãé«æ§èœã³ã³ãã¥ãŒã¿ãŒã®åéã§ç¹ã«éèŠãªåœ¹å²ãæãããŠããŸããå€ãã®ã¹ãŒããŒã³ã³ãã¥ãŒã¿ãŒããµãŒããŒã«æ¡çšãããé«éãªããŒã¿åŠçãèšç®åŠçãå®çŸããŠããŸãããŸããçµã¿èŸŒã¿ã·ã¹ãã ã®åéã§ããMIPS/MIPS64ã¯åºãæ¡çšãããŠããŸãã家é»è£œåãè»èŒã·ã¹ãã ããããã¯ãŒã¯æ©åšãªã©ãæ§ã
ãªåéã§å©çšãããŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 255,
"tag": "p",
"text": "MIPS/MIPS64ã®ã¢ãŒããã¯ãã£ã¯ãRISCã¢ãŒããã¯ãã£ã®åºæ¬ææ³ãåãç¶ãã§ãããåœä»€ã»ãããç°¡æœã§å¹ççãªãããé«éãªåŠçãå¯èœã§ãããŸããMIPS/MIPS64ã¯ããªãŒãã³ã¢ãŒããã¯ãã£ã§ãããããå€ãã®ããŒããŠã§ã¢ã¡ãŒã«ãŒããœãããŠã§ã¢éçºè
ã«ãã£ãŠãµããŒããããŠããŸãããã®ãããMIPS/MIPS64ãæ¡çšããã·ã¹ãã ã¯ããã¬ãã·ãã«ã§æ¡åŒµæ§ãé«ããã³ã¹ãããã©ãŒãã³ã¹ã«åªããŠãããšèšããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 256,
"tag": "p",
"text": "ããã«ãMIPS/MIPS64ã¯ããšãã«ã®ãŒå¹çã«ãåªããŠããŸããåœä»€ã»ãããç°¡æœã§ãããããå®è¡ã«å¿
èŠãªåè·¯ãå°ãªããé»åæ¶è²»ãå°ãªããŠæžãããã§ãããã®ãããã¢ãã€ã«ããã€ã¹ãIoTæ©åšãªã©ãããããªãŒé§åã®ã·ã¹ãã ã§ãåºãå©çšãããŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 257,
"tag": "p",
"text": "æè¿ã§ã¯ãMIPSã¢ãŒããã¯ãã£ãæã€äŒæ¥ãæ°å€ããããŸããäŸãã°ãäžåœã®é»åæ©åšã¡ãŒã«ãŒã§ããLoongson Technology Corporationã¯ãMIPSã¢ãŒããã¯ãã£ãæ¡çšããŠèªç€Ÿè£œåãéçºããŠããŸãããŸããã·ã³ã¬ããŒã«ã®AIäŒæ¥ã§ããHailoã¯ãMIPS64ã¢ãŒããã¯ãã£ãæ¡çšãããšããžAIããã»ããµãŒãéçºããŠããŸãããããã®äŒæ¥ã¯ãMIPS/MIPS64ã®åªããæ§èœãšãšãã«ã®ãŒå¹çã«çç®ããŠã次äžä»£ã®æè¡ãéçºããŠãããšèšããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 258,
"tag": "p",
"text": "çµè«ãšããŠãMIPS/MIPS64ã¯ãé«æ§èœãªåŠçèœåãšãšãã«ã®ãŒå¹çã«åªããã¢ãŒããã¯ãã£ã§ãããçŸä»£ã®ããžã¿ã«ãã¯ãããžãŒã«äžå¯æ¬ ãªååšã§ããããŸããŸãªåéã§åºãæ¡çšãããå€ãã®äŒæ¥ãMIPS/MIPS64ãæ¡çšãã補åãéçºããŠããŸããä»åŸããMIPS/MIPS64ã®é²åãšçºå±ãæåŸ
ãããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 259,
"tag": "p",
"text": "ãã€ã¯ãããã»ããµãšã¯ãã³ã³ãã¥ãŒã¿ãŒã«ãããŠäžå€®åŠçè£
眮 (CPU) ã®æ©èœãå®çŸããéç©åè·¯ã®ããšã§ããä»åã¯ãäžåœã®ããŒã«ã«ãªãã€ã¯ãããã»ããµã¡ãŒã«ãŒã§ããéŸè¯ (Loongson) ã®å¹Žè¡šãåãäžãããã®æŽå²ãçºå±ã«ã€ããŠçŽ¹ä»ããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 260,
"tag": "p",
"text": "éŸè¯ (Loongson) ã¯ãäžåœã®åœå®¶éç¹é«æè¡äŒæ¥ã§ããäžåœé»åæè¡éå£ (CETC) ã®äžéšéã§ããã2002幎ã«åµç«ãããŸãããåœå㯠MIPS ã¢ãŒããã¯ãã£ãããŒã¹ã«ããããã»ããµãŒãéçºããŠããŸããããçŸåšã¯ RISC-V ã¢ãŒããã¯ãã£ãæ¡çšããŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 261,
"tag": "p",
"text": "以äžã¯ãéŸè¯ã®äž»ãªãã€ã«ã¹ããŒã³ãæ¯ãè¿ããã€ã¯ãããã»ããµå¹Žè¡šã§ãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 262,
"tag": "p",
"text": "éŸè¯æè¡æéå
¬åžãèšç«ããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 263,
"tag": "p",
"text": "Loongson-1A ããã»ããµããªãªãŒã¹",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 264,
"tag": "p",
"text": "äžå€®æ¿åºããéŸè¯èšç»ããçºè¡šããããŒã«ã«ãªãã€ã¯ãããã»ããµç£æ¥ã®çºå±ãæ¯æŽããããšãè¡šæ",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 265,
"tag": "p",
"text": "Loongson-2E ããã»ããµããªãªãŒã¹",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 266,
"tag": "p",
"text": "Loongson-2F ããã»ããµããªãªãŒã¹",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 267,
"tag": "p",
"text": "Loongson-3 ããã»ããµããªãªãŒã¹ Lenovo ã Loongson-2F ããã»ããµãæèŒããããŒãããœã³ã³ãçºè¡š",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 268,
"tag": "p",
"text": "Loongson-3A ããã»ããµããªãªãŒã¹",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 269,
"tag": "p",
"text": "Loongson-3B ããã»ããµããªãªãŒã¹ Dawning Information Industry ã Loongson-3B ããã»ããµãæèŒããã¹ãã³ã³ãçºè¡š",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 270,
"tag": "p",
"text": "Loongson-3C ããã»ããµããªãªãŒã¹",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 271,
"tag": "p",
"text": "Loongson-3H ããã»ããµããªãªãŒã¹ Loongson Technology Europe ãèšç«ããã欧å·åžå Žã§ã®ããžãã¹ãéå§",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 272,
"tag": "p",
"text": "Loongson-3B2000 ããã»ããµããªãªãŒã¹",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 273,
"tag": "p",
"text": "Loongson-3A4000 ããã»ããµããªãªãŒã¹",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 274,
"tag": "p",
"text": "Loongson-3B3000 ããã»ããµããªãªãŒã¹ äžåœç§åŠé¢ã Loongson-3B ããã»ããµãæèŒããã¹ãã³ã³ãçºè¡š",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 275,
"tag": "p",
"text": "Loongson-3B4000 ããã»ããµããªãªãŒã¹",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 276,
"tag": "p",
"text": "Loongson-3A5000 ããã»ããµããªãªãŒã¹",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 277,
"tag": "p",
"text": "Loongson-3A5000 ããã»ããµãæèŒããããŒãããœã³ã³ãçºå£²ããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 278,
"tag": "p",
"text": "Loongson-3A5000 ããã»ããµãæèŒããããŒãããœã³ã³ãæ¹è¯ãããããé«ãæ§èœãæäŸããããã«ãªã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 279,
"tag": "p",
"text": "éŸè¯ã¯ãLoongArch ã¢ãŒããã¯ãã£ã®æåã®ããŒãžã§ã³ã§ãã LoongArch1 ãçºè¡šããRISC-V ã¢ãŒããã¯ãã£ã«ç§»è¡ããããšã宣èš",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 280,
"tag": "p",
"text": "以äžããéŸè¯ã®äž»ãªãã€ã«ã¹ããŒã³ãšãªããŸããéŸè¯ã¯ãããŒã«ã«ãªãã€ã¯ãããã»ããµã¡ãŒã«ãŒãšããŠãäžåœã®ITç£æ¥ã«ãããŠéèŠãªåœ¹å²ãæãããŠããŸããä»åŸããé«æ§èœã§äœäŸ¡æ Œãªããã»ããµãŒã®éçºã«æ³šåããäžåœã®ITç£æ¥ã®çºå±ãæ¯æŽããããšãæåŸ
ãããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 281,
"tag": "p",
"text": "ãã€ã¯ãããã»ããµæè¡ã¯ãçŸä»£ã®ããããé»åæ©åšã«äžå¯æ¬ ãªèŠçŽ ã§ãããããŠãRISC-VãšåŒã°ãããªãŒãã³ãœãŒã¹ã¢ãŒããã¯ãã£ã®é²åã¯ããã®åéã«é©æ°ããããããŠããŸãã以äžã§ã¯ãRISC-Vã¢ãŒããã¯ãã£ã®æŽå²ãšé²åã«ã€ããŠå¹Žè¡šã§æ¯ãè¿ããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 282,
"tag": "p",
"text": "UC Berkeleyã®ããããã»ãã¿ãŒãœã³æ°ãšKrste AsanoviÄæ°ã«ãã£ãŠããªãŒãã³ãœãŒã¹ã®ããŒããŠã§ã¢ããã³ãœãããŠã§ã¢ãããžã§ã¯ãã§ããRISC-VãéçºãããŸãããRISC-Vã¯ãæšæºåãããåœä»€ã»ããã¢ãŒããã¯ãã£(ISA)ãæäŸãããã¿ãŒãœã³æ°ãéçºããRISCã¢ãŒããã¯ãã£ã®ååã«åºã¥ããŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 283,
"tag": "p",
"text": "SiFiveã¯ãRISC-Vã¢ãŒããã¯ãã£ã®æ®åã«æ³šåããäŒæ¥ãšããŠèšç«ãããŸãããå瀟ã¯ããªãŒãã³ãœãŒã¹ã®RISC-Vã³ã¢ã䜿ã£ãããã»ããµã®éçºãããµããŒããæäŸããŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 284,
"tag": "p",
"text": "RISC-Vãã¡ãŠã³ããŒã·ã§ã³ã¯ããªãŒãã³ãœãŒã¹ã®RISC-Vã¢ãŒããã¯ãã£ã®éçºãæ®åãç®çãšããŠèšç«ãããŸãããåãã¡ãŠã³ããŒã·ã§ã³ã«ã¯ããœãããŠã§ã¢ãããŒããŠã§ã¢ã®äŒæ¥ãåå ããŠãããRISC-Vã¢ãŒããã¯ãã£ã®æ®åã«åããæ§ã
ãªæŽ»åãå±éããŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 285,
"tag": "p",
"text": "Googleã¯ãRISC-Vãããžã§ã¯ãã«åå ãããªãŒãã³ãœãŒã¹ã®RISC-Vããã»ããµã®éçºã«æ³šåããŠããŸããå瀟ã¯ãRISC-Vã䜿ã£ãAIãããã®éçºãããµãŒããŒåãã®ããã»ããµã®éçºãªã©ãé²ããŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 286,
"tag": "p",
"text": "NVIDIAã¯ãRISC-Vãããžã§ã¯ãã«åå ãããªãŒãã³ãœãŒã¹ã®RISC-Vã³ã¢ã䜿ã£ãããã»ããµã®éçºã«æ³šåããŠããŸããå瀟ã¯ããšããžããã€ã¹åãã®ããã»ããµã®éçºãªã©ãé²ããŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 287,
"tag": "p",
"text": "Western Digitalã¯ãã¹ãã¬ãŒãžããã€ã¹åãã®RISC-Vããã»ããµãæ¡çšããå瀟ã®è£œåã«çµã¿èŸŒãããšãçºè¡šããŸãããå瀟ã¯ãé«æ§èœãã€äœæ¶è²»é»åãªããã»ããµãå¿
èŠãªã¹ãã¬ãŒãžåžå Žã§ãRISC-Vãæ¡çšããããšã§ç«¶äºåãé«ããŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 288,
"tag": "p",
"text": "Amazonã¯ãRISC-Vãããžã§ã¯ãã«åå ããå瀟ã®AWSã¯ã©ãŠãåãã«RISC-Vããã»ããµãéçºããããšãçºè¡šããŸãããå瀟ã¯ãã«ã¹ã¿ãã€ãºãããããã»ããµã«ãã£ãŠã¯ã©ãŠãã®ããã©ãŒãã³ã¹ãåäžãããããšãç®æããŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 289,
"tag": "p",
"text": "Appleã¯ãèªç€Ÿã®è£œåã«ãããŠRISC-Væè¡ãæ¡çšããããšãæããã«ããŸãããå瀟ã¯ãRISC-Vã䜿ã£ãããããéçºããAppleã®è£œåã«çµã¿èŸŒãããšã§ãé«æ§èœãã€äœæ¶è²»é»åãªè£œåãæäŸããããšãç®æããŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 290,
"tag": "p",
"text": "RISC-Vã¯ãäœæ¶è²»é»åã§å°åãªIoTããã€ã¹ã«é©ããããã»ããµãšããŠæ³šç®ãéããŠããŸããå幎ãRISC-Vãæ¡çšããIoTããã€ã¹ã®æ°ãæ¥éã«å¢å ããRISC-Vã¢ãŒããã¯ãã£ãIoTåžå Žã§ã®ããã»ããµã®æšæºã«ãªãå¯èœæ§ãé«ãŸã£ãŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 291,
"tag": "p",
"text": "RISC-Vã¯ããªãŒãã³ãœãŒã¹ã§ãããããå€ãã®äŒæ¥ãéçºè
ãåå ããé²åãç¶ããŠããŸããä»åŸããRISC-Vã¢ãŒããã¯ãã£ã¯æ§ã
ãªåéã§ã®é©æ°ãããããããã€ã¯ãããã»ããµæè¡ã®çºå±ã«å¯äžããããšãæåŸ
ãããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 292,
"tag": "p",
"text": "ãZ80ã®èªçã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 293,
"tag": "p",
"text": "ãZ80ã®æåã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 294,
"tag": "p",
"text": "Z80ã¯ãåœåã¯ãã¬ãã®ãªã¢ã³ã³ãé»åãªã©ã®å°å家é»è£œåã«äœ¿ãããããšãæ³å®ããŠããŸããããåŸã«ã³ã³ãã¥ãŒã¿ãŒç£æ¥ã«ãããŠã倧ããªæåãåããŸãããZ80ãæèŒããã³ã³ãã¥ãŒã¿ãŒã¯ãåœæã®ããžãã¹åžå Žã«ãããŠå€§ããªåœ¹å²ãæãããCP/MãšåŒã°ãããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®æšæºçãªåäœç°å¢ãšãªããŸããããŸããZ80ã¯ã¢ãŒã±ãŒãã²ãŒã æ©ã«ãåºã䜿ãããåœæã®äººã
ã«ãšã£ãŠäžå¯æ¬ ãªãšã³ã¿ãŒãã€ã¡ã³ãã®äžã€ãšãªããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 295,
"tag": "p",
"text": "ãZ80ã®åŸç¶ã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 296,
"tag": "p",
"text": "Z80ã¯ããã®åŸãæ¹è¯ãç¶ããããZ180ãZ280ãšãã£ãåŸç¶è£œåããªãªãŒã¹ãããŸããããŸããZilog瀟ã¯Z80ã®ã©ã€ã»ã³ã¹ãå€æ°ã®äŒæ¥ã«æäŸããããšã§ãåºç¯ãªåžå Žãç²åŸããããšã«æåããŸãããããã«ãZilog瀟ã¯MCU(ãã€ã¯ãã³ã³ãããŒã©ãŠããã)ã«ãé²åºããçŸåšã§ãå¹
åºãåéã§æŽ»èºããŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 297,
"tag": "p",
"text": "ããŸãšãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 298,
"tag": "p",
"text": "Zilog瀟ããªãªãŒã¹ããZ80ã¯ããã€ã¯ãããã»ããµæè¡ã®æŽå²ã«ãããŠéèŠãªäœçœ®ãå ããŠããŸããZ80ã¯ãå€ãã®åéã«ãããŠå
é²çãªæ§èœãçºæ®ããã³ã³ãã¥ãŒã¿ãŒç£æ¥ã«å€§ããªåœ±é¿ãäžããŸããããŸããZilog瀟ã¯Z80ã®æåãèæ¯ã«ãMCUåžå Žã§ã掻èºããããã«ãªããŸãããä»åŸããZilog瀟ãæäŸããæè¡ãäžçãå€ããå¯èœæ§ããããšèšããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 299,
"tag": "p",
"text": "ãã€ã¯ãããã»ããµãšã¯ãã³ã³ãã¥ãŒã¿ã®äžæ žãšãªãéšåã§ãããçŸä»£ã®ããžã¿ã«æ©åšã«æ¬ ãããªããã®ãšãªã£ãŠããŸããä»åã¯ããã®äžã§ãæ¥æ¬ã§è£œé ããããã€ã¯ãããã»ããµã«çŠç¹ãåœãŠããã€ã¯ãããã»ããµã®é²åãæ¯ãè¿ã£ãŠãããããšæããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 300,
"tag": "p",
"text": "æ¥æ¬ã®é»æ°é信倧åŠã®ç³äºè±äžéææããIntel瀟ã®4004ã«çæ³ãåŸãŠãåã®æ¥æ¬è£œãã€ã¯ãããã»ããµã§ãããTCM1000ããéçºãããããåžå Žã«ã¯æµžéããªãã£ãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 301,
"tag": "p",
"text": "æŸäžé»åšç£æ¥(çŸã»ãããœããã¯)ãã4ããããã€ã¯ãããã»ããµãMN1610ããéçºãäž»ã«å®¶é»è£œåã®å¶åŸ¡ã«äœ¿ãããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 302,
"tag": "p",
"text": "æ¥ç«è£œäœæã16ããããã€ã¯ãããã»ããµãHD64180ããéçºãåœæã¯æ¥æ¬è£œã®16ããããã€ã¯ãããã»ããµã¯ååšããã倧ããªæ³šç®ãéããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 303,
"tag": "p",
"text": "æ¥æ¬é»æ°(NEC)ã16ããããã€ã¯ãããã»ããµãV30ããéçºãIntel瀟ã®ã8086ãäºæåã§ãããIBMã®PC/ATäºææ©åãã«æ¡çšãããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 304,
"tag": "p",
"text": "å¯å£«éã32ããããã€ã¯ãããã»ããµãMB86900ããéçºãUNIXãµãŒããã¯ãŒã¯ã¹ããŒã·ã§ã³ã§äœ¿ãããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 305,
"tag": "p",
"text": "æ¥ç«è£œäœæã32ããããã€ã¯ãããã»ããµãSH-1ããéçºãããŒããŠã§ã¢æµ®åå°æ°ç¹æŒç®åšãæèŒããããžã¿ã«ã«ã¡ã©ãæºåž¯é»è©±ãªã©ã«åºã䜿ãããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 306,
"tag": "p",
"text": "ã«ããµã¹ãšã¬ã¯ãããã¯ã¹(æ§ã»æ¥æ¬é»æ°åå°äœ)ãã32ããããã€ã¯ãããã»ããµãV850ããéçºãèªåè»å¶åŸ¡ã·ã¹ãã ãªã©ã«åºã䜿ãããŠããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 307,
"tag": "p",
"text": "å¯å£«éãšæ±èãå
±åéçºãã64ããããã€ã¯ãããã»ããµãSPARC64 VãããUNIXãµãŒããã¹ãŒããŒã³ã³ãã¥ãŒã¿ãªã©ã«æ¡çšãããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 308,
"tag": "p",
"text": "以äžããæ¥æ¬è£œãã€ã¯ãããã»ããµã®äž»ãªå¹Žè¡šã§ããæ¥æ¬è£œã®ãã€ã¯ãããã»ããµã¯ãããããã®ç¹åŸŽã掻ãããŠå€æ§ãªçšéã§å©çšãããŠããŸããããã®äžã§ãç¹çãã¹ãã¯ãèªåè»å¶åŸ¡ã·ã¹ãã ãããžã¿ã«ã«ã¡ã©ãæºåž¯é»è©±ãšãã£ãå°åæ©åšã«äœ¿ãããŠããããšã§ãããããã®æ©åšã«ã¯ãçé»åãé«éåŠçãšãã£ãèŠçŽ ãæ±ããããŸããæ¥æ¬è£œã®ãã€ã¯ãããã»ããµã¯ãããããã®åéã§é«ãè©äŸ¡ãåŸãŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 309,
"tag": "p",
"text": "ãŸããæ¥æ¬ã®ãã€ã¯ãããã»ããµã¡ãŒã«ãŒã¯ã競äºåãç¶æããããã«ãæ°ããæè¡ã®éçºã«æ³šåããŠããŸããäŸãã°ãã«ããµã¹ãšã¬ã¯ãããã¯ã¹ã¯ãèªåè»çšã®é«ééä¿¡æè¡ãCAN-FDãã«å¯Ÿå¿ãããã€ã¯ãããã»ããµãéçºããŠããŸãããŸããæ±èã¯ãçé»åæè¡ãSpursEngineããæèŒãããã€ã¯ãããã»ããµãéçºããŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 310,
"tag": "p",
"text": "æ¥æ¬ã®ãã€ã¯ãããã»ããµã¡ãŒã«ãŒã¯ãä»åŸãäžçã«éçšããæè¡ãéçºããåœå
å€ã®æ§ã
ãªåéã§æŽ»èºããããšãæåŸ
ãããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 311,
"tag": "p",
"text": "ãã€ã¯ãããã»ããµã¯ãçŸä»£ã®é»åæ©åšã®ããã¯ããŒã³ã圢æããéèŠãªã³ã³ããŒãã³ãã§ããi432ãi860ãi960ãã€ã¯ãããã»ããµã¯ãä»æ¥ã®é«æ§èœããã»ããµã®çºå±ãæããé©åœçãªãããã§ãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 312,
"tag": "p",
"text": "i432ã¯ãã€ã³ãã«ãéçºããåã®32ãããããã»ããµã§ããã1978幎ã«çºå£²ãããŸãããi432ã¯ãåœä»€ã»ããã¢ãŒããã¯ãã£(ISA)ã®èšèšãè€éã§ãæ§èœãäœãããšãåé¡ã§ããããã®ãããi432ã¯åæ¥çã«æåããããšã¯ãããŸããã§ããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 313,
"tag": "p",
"text": "i860ã¯ã1989幎ã«ãªãªãŒã¹ãããRISC(Reduced Instruction Set Computing)ãã€ã¯ãããã»ããµã§ãããi860ã¯ãã°ã©ãã£ãã¯ã¹ãä¿¡å·åŠçãªã©ã®é«åºŠãªã¢ããªã±ãŒã·ã§ã³åãã«èšèšãããŠãããå€æ°ã®ããã»ããµãæèŒããã·ã¹ãã ã«äœ¿çšãããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 314,
"tag": "p",
"text": "i960ã¯ãi860ã®åŸç¶ãšããŠ1990幎ã«ãªãªãŒã¹ãããŸãããi960ã¯ãé«æ§èœãªãã«ãã¿ã¹ã¯åŠçèœåãåããã°ã©ãã£ãã¯ã¹ãä¿¡å·åŠçãªã©ã®ã¢ããªã±ãŒã·ã§ã³ã«æé©ã§ãããi960ã¯ãããŸããŸãªåéã§äœ¿çšãããç¹ã«ãããã¯ãŒã¯æ©åšãçµã¿èŸŒã¿ã·ã¹ãã ã«é©ããŠããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 315,
"tag": "p",
"text": "ããããIntelã®i960ã·ãªãŒãºã¯ã競åä»ç€Ÿã®è£œåãšæ¯èŒããŠé«äŸ¡ã§ãããšããåé¡ããããæåããªãã£ããšèããããŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 316,
"tag": "p",
"text": "Intelã¯ã2001幎ã«Itaniumããã»ããµããªãªãŒã¹ããŸãããItaniumã¯ãIntelã®64ãããããã»ããµã§ãããé«æ§èœã§ä¿¡é Œæ§ã®é«ããµãŒããŒåãã«èšèšãããŠããŸãããItaniumã¯ãè€æ°ã®ã³ã¢ãæèŒããé«åºŠãªäžŠååŠçèœåãæã¡ãé«åºŠãªã¡ã¢ãªã¢ãŒããã¯ãã£ãåããŠããŸããã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 317,
"tag": "p",
"text": "Itaniumã¯ãæåã¯é«ãæåŸ
ãå¯ããããŠããŸãããããœãããŠã§ã¢ã®äºææ§ã®åé¡ããããåžå Žã«æµžéããããšã¯ã§ããŸããã§ããã競åããx86ã¢ãŒããã¯ãã£ã«æ¯ã¹ãŠé«äŸ¡ã§ãããItaniumã«æé©åããããœãããŠã§ã¢ãäžè¶³ããŠããããšãäž»ãªèŠå ãšãããŠããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 318,
"tag": "p",
"text": "以äžã®ããã«ãi432ãi860ãi960ãItaniumã¯ãããããã®æ代ã«ãããŠé©æ°çãªãã€ã¯ãããã»ããµã§ãã£ããã®ã®ãããã€ãã®åé¡ã«ããåæ¥çã«æåããããšãã§ããŸããã§ããããããããããã®ããã»ããµã¯ãçŸä»£ã®ããã»ããµã®é²åãæ¯ããæè¡ã®åºç€ãšãªããã³ã³ãã¥ãŒã¿ç§åŠã®çºå±ã«å€§ããªåœ±é¿ãäžãããšèšããŸãã",
"title": "ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã -"
},
{
"paragraph_id": 319,
"tag": "p",
"text": "ããã»ããµã¯ãã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®äžå¿çãªåœ¹å²ãæããéšåã§ãããæŒç®åŠçãããŒã¿åŠçãæ
åœããŠããŸããããã»ããµã®çš®é¡ãæ§èœã¯ãã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®æ§èœãæ©èœæ§ã«å€§ããªåœ±é¿ãäžããŸãã",
"title": "ããã»ããµã®åé¡ãšçš®é¡"
},
{
"paragraph_id": 320,
"tag": "p",
"text": "RISCããã»ããµãŒãšCISCããã»ããµãŒã¯ãã³ã³ãã¥ãŒã¿ãŒããã»ããµãŒã®ã¢ãŒããã¯ãã£ã®èšèšæ¹æ³è«ãè¡šãçšèªã§ãããã»ããµãŒãå®è¡ããåœä»€ã®çš®é¡ãæ©èœãããã³ããã»ããµãŒå
éšã§ãããã®åœä»€ãåŠçããæ¹æ³ã«é¢ããéãã«åºã¥ããŠããŸãã",
"title": "ããã»ããµã®åé¡ãšçš®é¡"
},
{
"paragraph_id": 321,
"tag": "p",
"text": "CISCããã»ããµãŒã¯ãå€æ§ãªåœä»€ã»ãããæã€ããšãç¹åŸŽã§ãã¡ã¢ãªã¢ã¯ã»ã¹ãæ¡ä»¶åå²ãç®è¡æŒç®ãããã³ãã®ä»ã®æ©èœãå«ã¿ãŸããCISCããã»ããµãŒã¯ãé«åºŠãªæ©èœãå®çŸããããã«å€æ§ãªåœä»€ãæã£ãŠãããè€éãªèšç®ãåŠçãå¿
èŠãªå Žåã«ã¯é«éã«åŠçãè¡ãããšãã§ããŸãããåœä»€ã»ããã®è€éããšé«åºŠãªæ©èœã«ãããããã»ããµãŒã®èšèšãšè£œé ã«å€§ããªã³ã¹ãããããå¯èœæ§ããããŸãã",
"title": "ããã»ããµã®åé¡ãšçš®é¡"
},
{
"paragraph_id": 322,
"tag": "p",
"text": "äžæ¹ãRISCããã»ããµãŒã¯ãåçŽãªåœä»€ã»ãããæã€ããšãç¹åŸŽã§ãåºæ¬çãªç®è¡æŒç®ããããæŒç®ãããŒã/ã¹ãã¢æäœãããã³æ¡ä»¶åå²ãå«ã¿ãŸããRISCããã»ããµãŒã¯ãååœä»€ãå®è¡ãããéã«åäžã®ãµã€ã¯ã«ããå¿
èŠãšããªãå Žåãã»ãšãã©ã§ãåœä»€ã»ãããæ¯èŒçç°¡çŽ ã§ãããããããã»ããµãŒã®èšèšãšè£œé ã«äœãã³ã¹ãããããå¯èœæ§ããããŸãã",
"title": "ããã»ããµã®åé¡ãšçš®é¡"
},
{
"paragraph_id": 323,
"tag": "p",
"text": "CISCãšRISCã®éãã«é¢ããè°è«ã¯ãããã»ããµãŒèšèšã®åéã§é·å¹Žç¶ããŠããŸãããšã³ãžãã¢ã®äžã«ã¯ãRISCã®ã¢ãããŒããã·ã³ãã«ã§ãããå¹ççãªããã»ããµãŒãèšèšããããšãã§ãããšäž»åŒµãã人ãããŸãããCISCã®ã¢ãããŒããå€æ§ãªæ©èœããµããŒãããããã«å¿
èŠã§ãããé«åºŠãªããã»ããµãŒãèšèšããããšãã§ãããšäž»åŒµãã人ãããŸãã",
"title": "ããã»ããµã®åé¡ãšçš®é¡"
},
{
"paragraph_id": 324,
"tag": "p",
"text": "æè¿ã®ããã»ããµã§ã¯ãCISCãšRISCã®ç¹åŸŽãçµã¿åããããã€ããªããã¢ãŒããã¯ãã£ãæ¡çšãããããšããããŸããããã«ãããé«åºŠãªæ©èœãå®çŸãã€ã€ãé«éã§å¹ççãªåŠçãå¯èœã«ãªããŸãããã ãããã€ããªããã¢ãŒããã¯ãã£ã¯è€éãªãããèšèšãéçºã«æéããããå¯èœæ§ããããŸã",
"title": "ããã»ããµã®åé¡ãšçš®é¡"
},
{
"paragraph_id": 325,
"tag": "p",
"text": "VLIW(Very Long Instruction Word)ã¯ãè€æ°ã®åœä»€ã1ã€ã®é·ãåœä»€ã¯ãŒãã«ãŸãšããŠåæã«å®è¡ã§ããã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ã§ããããã«ãããè€æ°ã®åœä»€ãåæã«åŠçããããšã§ãããã»ããµã®æ§èœãåäžãããããšãã§ããŸãã",
"title": "ããã»ããµã®åé¡ãšçš®é¡"
},
{
"paragraph_id": 326,
"tag": "p",
"text": "VLIWããã»ããµã¯ãè€æ°ã®åœä»€ãåæã«å®è¡ããããšãã§ããããããã€ãã©ã€ã³åŠçã容æã«ãªããŸãããããŠãåœä»€ããã€ãã©ã€ã³åŠçããããã®ä»çµã¿ãæã£ãŠãããããåœä»€ãé«éãã€å¹ççã«åŠçããããšãã§ããŸãã",
"title": "ããã»ããµã®åé¡ãšçš®é¡"
},
{
"paragraph_id": 327,
"tag": "p",
"text": "ãã ããVLIWããã»ããµã¯ãåœä»€ã1ã€ã®é·ãã¯ãŒãã«ããã¯ãããããåæã«å®è¡ã§ããåœä»€ã®æ°ãå¶éãããŸãããŸããåœä»€ãæé©ã«ããã¯ããå¿
èŠããããããããã°ã©ããŒã«å¶çŽããããŸããããã«ãããã»ããµããšã«æé©ãªåœä»€ã®ããã¯æ¹æ³ãç°ãªããããããã°ã©ããŒã¯ããã»ããµããšã«æé©ãªåœä»€ã®ããã¯æ¹æ³ãæ¢ãå¿
èŠããããŸãã",
"title": "ããã»ããµã®åé¡ãšçš®é¡"
},
{
"paragraph_id": 328,
"tag": "p",
"text": "VLIWããã»ããµã¯ãäžè¬çã«çµã¿èŸŒã¿ã·ã¹ãã ãã°ã©ãã£ãã¯ã¹åŠçãªã©ã®ç¹å®ã®ã¢ããªã±ãŒã·ã§ã³ã«äœ¿çšãããŸãããããã®ã¢ããªã±ãŒã·ã§ã³ã§ã¯ãé«éãªåŠçãå¿
èŠã§ãããVLIWããã»ããµãåªããæ§èœãçºæ®ããããšããããŸãã",
"title": "ããã»ããµã®åé¡ãšçš®é¡"
},
{
"paragraph_id": 329,
"tag": "p",
"text": "VLIWã¢ãŒããã¯ãã£ã®éçºè
ã¯ãåœä»€ã»ããã¢ãŒããã¯ãã£(ISA)ã®èšèšè
ãšååããå¿
èŠããããŸããISAã®èšèšè
ã¯ãããã°ã©ããŒãæé©ãªåœä»€ã®ããã¯æ¹æ³ãæ¢ãããã®æ
å ±ãæäŸããå¿
èŠããããŸãããŸããISAã®èšèšè
ã¯ãVLIWã¢ãŒããã¯ãã£ã«æé©ãªåœä»€ã»ãããèšèšããããšãæ±ããããŸãã",
"title": "ããã»ããµã®åé¡ãšçš®é¡"
}
] | null | == ã¯ããã« ==
<!--ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®æç§æžã®ãã¯ããã«ãã®ç« -->
ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã¯ãã³ã³ãã¥ãŒã¿ãŒã®åºç€çãªä»çµã¿ãšèšèšã«é¢ããåéã§ãã
ãã®åéã§ã¯ãã³ã³ãã¥ãŒã¿ãŒã®æ§æèŠçŽ ãããŒã¿ã®è¡šçŸæ¹æ³ãããã°ã©ãã³ã°èšèªãåœä»€ã»ããã¢ãŒããã¯ãã£ãŒïŒISAïŒããã€ã¯ã¢ãŒããã¯ãã£ãŒããã€ãã©ã€ã³åŠçãã¡ã¢ãªãŒéå±€ãå
¥åºåã·ã¹ãã ã䞊ååŠçãããã³è€æ°ã®ããã»ããµãŒã«ãããã«ãããã»ãã·ã³ã°ã«é¢ãããããã¯ãæ±ããŸãã
æ¬æžã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã«é¢ããå¹
åºããããã¯ã網çŸ
ããããããç解ããããã«å¿
èŠãªåºç€ç¥èãæäŸããŸãããŸããæ¬æžã§ã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®èšèšãšå®è£
ã«é¢ããéèŠãªåé¡ã«çŠç¹ãåœãŠãææ°ã®æè¡ããã¬ã³ãã玹ä»ããŸãã
=== ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒãšã¯äœãïŒ ===
ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã¯ãã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®èšèšãšæ©èœã®æŠèŠãå®çŸ©ããåéã§ããã€ãŸããã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã¯ãã³ã³ãã¥ãŒã¿ãŒå
éšã§ããŒã¿ãã©ã®ããã«åŠçãããã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ãã©ã®ããã«æ©èœãããã«ã€ããŠãç©ççãªèŠ³ç¹ãã説æãããã®ã§ãã
ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã«ã¯ãããã»ããµãã¡ã¢ãªãŒãå
¥åºåããã€ã¹ãªã©ã®ã³ã³ããŒãã³ããå«ãŸããŸãããããã®ã³ã³ããŒãã³ãã¯ãããŒã¿ãåŠçããããã«å調ããŠåäœããŸãã
ãŸããã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã¯ããœãããŠã§ã¢ãšããŒããŠã§ã¢ã®çžäºäœçšã«ãéç¹ã眮ããŠããŸãããœãããŠã§ã¢ã¯ãã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®åäœãå¶åŸ¡ããããŒããŠã§ã¢ã¯ãœãããŠã§ã¢ã®èŠæ±ã«å¿ããŠãå¿
èŠãªæ©èœãæäŸããŸãã
ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®èšèšã«ã¯ãæ§èœãä¿¡é Œæ§ãã»ãã¥ãªãã£ãªã©ã®èŠçŽ ããããŸããæ§èœã«ã€ããŠã¯ãåŠçé床ãã¡ã¢ãªãŒã¢ã¯ã»ã¹é床ãå
¥åºåããã€ã¹ã®ã¹ã«ãŒããããªã©ãéèŠã§ããä¿¡é Œæ§ã«ã€ããŠã¯ãã·ã¹ãã ã®æ
éçãããã¯ã¢ããã·ã¹ãã ã®èšèšããšã©ãŒæ€åºãšä¿®æ£ã®æ¹æ³ãªã©ãèæ
®ãããŸããã»ãã¥ãªãã£ã«ã€ããŠã¯ãã·ã¹ãã ã®è匱æ§ãã¢ã¯ã»ã¹å¶åŸ¡ãããŒã¿ä¿è·ãªã©ãéèŠã§ãã
ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã¯ãã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®åºç€ã§ãããã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®æ§èœãæ©èœãæé©åããããã«éèŠã§ããã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®ç解ãæ·±ããããšã§ãé«éã§ä¿¡é Œæ§ã®é«ãã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ãèšèšããããšãã§ããŸãã
=== åŠç¿ç®æš ===
æ¬æžã§ã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®åºç€ãããé²åãå¿çšåéãŸã§ãåºç¯ãªç¯å²ãæ±ããŸããèªè
ã¯ãã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®æ§æèŠçŽ ãæ§èœææšãåœä»€ã»ããã¢ãŒããã¯ãã£ãŒãCPUã®æ§æãåäœãã¡ã¢ãªãŒãå
¥åºåã·ã¹ãã ã®æ§æãåäœããããŠã»ãã¥ãªãã£ãå¿çšåéã«ã€ããŠåŠã¶ããšãã§ããŸãã
== ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®åºç€ ==
ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ãšã¯ãæ
å ±åŠçãè¡ãããã«å¿
èŠãªããŒããŠã§ã¢ããœãããŠã§ã¢ããããã¯ãŒã¯ã人éãªã©ã®èŠçŽ ãçµã¿åããã£ãŠæ§æãããã·ã¹ãã ã®ããšã§ãããã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã¯ãå
¥åãåŠçãåºåã®3ã€ã®åºæ¬æ©èœãæã¡ããããã®æ©èœãå®çŸããããã«å¿
èŠãªæ§æèŠçŽ ãååšããã
=== ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®æ§æèŠçŽ ===
ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã¯ã以äžã®ãããªæ§æèŠçŽ ããæ§æãããŠããã
*ããŒããŠã§ã¢ïŒã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ãç©ççã«æ§æããæ©åšãéšåã®ããšã§ãããäž»ã«ãCPUïŒäžå€®æŒç®åŠçè£
眮ïŒãã¡ã¢ãªãå
¥åºåè£
眮ãã¹ãã¬ãŒãžè£
眮ãªã©ãããã
*ãœãããŠã§ã¢ïŒã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ãå¶åŸ¡ããããã®ããã°ã©ã ãããŒã¿ã®ããšã§ãããäž»ã«ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãã¢ããªã±ãŒã·ã§ã³ãœãããŠã§ã¢ãã·ã¹ãã ãœãããŠã§ã¢ãªã©ãããã
*ãããã¯ãŒã¯ïŒã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã å士ãæ¥ç¶ããããã®é信網ã®ããšã§ãããäž»ã«ãã€ã³ã¿ãŒããããLANïŒããŒã«ã«ãšãªã¢ãããã¯ãŒã¯ïŒãWANïŒã¯ã€ããšãªã¢ãããã¯ãŒã¯ïŒãªã©ãããã
*人éïŒã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ãæäœãã人éã®ããšã§ãããäž»ã«ããŠãŒã¶ãŒãã·ã¹ãã 管çè
ãéçºè
ãªã©ãããã
ãããã®æ§æèŠçŽ ã¯å¯æ¥ã«é¢é£ããçžäºã«åœ±é¿ãåã£ãŠããã
=== ããŒããŠã§ã¢ãšãœãããŠã§ã¢ã®é¢ä¿ ===
ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã¯ãããŒããŠã§ã¢ãšãœãããŠã§ã¢ã®çµã¿åããã«ãã£ãŠæ§æãããŠããŸããããŒããŠã§ã¢ã¯ãäžå€®åŠçè£
眮(CPU)ãã¡ã¢ãªãå
¥åºå(I/O)æ©åšãªã©ãç©ççãªæ©åšãéšåã§æ§æãããŸããäžæ¹ããœãããŠã§ã¢ã¯ãããã°ã©ã ãããŒã¿ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãªã©ãã³ã³ãã¥ãŒã¿ãŒãå®è¡ããããã®åœä»€ãæ
å ±ã§ãã
ãœãããŠã§ã¢ã¯ãããŒããŠã§ã¢äžã§åäœããããã«å¿
èŠãªåœä»€ãå«ãã§ããŸãããããã®åœä»€ã¯ãCPUã«ãã£ãŠå®è¡ãããŸãããŸãããœãããŠã§ã¢ã¯ãããŒããŠã§ã¢ã«å¯ŸããŠãããŒã¿ã®èªã¿æžããå
¥åºåã®å¶åŸ¡ãªã©ã®æäœãæ瀺ããŸããããŒããŠã§ã¢ã¯ããœãããŠã§ã¢ã«ãã£ãŠå¶åŸ¡ãããããšã§ãã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã å
šäœãåäœããŸãã
ããŒããŠã§ã¢ãšãœãããŠã§ã¢ã¯ããäºãã«å¯æ¥ã«é¢é£ããŠããŸããããšãã°ããœãããŠã§ã¢ã¯ãCPUãã¡ã¢ãªãªã©ã®ããŒããŠã§ã¢è³æºãå¿
èŠãšããŸãããŸããããŒããŠã§ã¢ã®æ§èœã¯ããœãããŠã§ã¢ã®æ§èœã«åœ±é¿ãäžããŸããã€ãŸããããŒããŠã§ã¢ãšãœãããŠã§ã¢ã¯ãã·ã¹ãã å
šäœã®æ§èœã«åœ±é¿ãäžãããããäž¡æ¹ãæé©åããããšãéèŠã§ãã
=== ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®æ§èœææš ===
ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®æ§èœã枬å®ããããã«ã¯ãæ§ã
ãªææšããããŸãã以äžã§ã¯ãäž»èŠãªæ§èœææšã«ã€ããŠèª¬æããŸãã
;ã¯ããã¯åšæ³¢æ°
:ã¯ããã¯åšæ³¢æ°ã¯ãCPUã1ç§ãããã«ããã€ã®åœä»€ãå®è¡ã§ãããã瀺ãææšã§ããã¯ããã¯åšæ³¢æ°ãé«ãã»ã©ãCPUã¯ããå€ãã®åœä»€ãå®è¡ã§ããŸãããã ããã¯ããã¯åšæ³¢æ°ãé«ãå Žåã¯ãé»åæ¶è²»éãå¢ããçºç±éã倧ãããªããããå·åŽåŠçãå¿
èŠã«ãªããŸãã
;CPIïŒåœä»€ãããã®ã¯ããã¯æ°ïŒ
:CPIã¯ã1ã€ã®åœä»€ãå®è¡ããã®ã«å¿
èŠãªã¯ããã¯æ°ã®å¹³åå€ã§ããCPIãäœãã»ã©ãCPUã¯ããå¹ççã«åœä»€ãå®è¡ã§ããŸãã
;IPCïŒã¯ããã¯ãããã®åœä»€æ°ïŒ
:IPCã¯ã1ç§ãããã«CPUãå®è¡ã§ããåœä»€æ°ã®å¹³åå€ã§ããIPCãé«ãã»ã©ãCPUã¯ããå€ãã®åœä»€ãå®è¡ã§ããŸãã
:: CPIãšIPCã¯éæ°ã®é¢ä¿ã«ããããããããã€ãã©ã€ã³ãã¹ãŒããŒã¹ã«ã©ãŒã¢ãŒããã¯ãã£ãæ¡çšãããããã«ãªããåœä»€ã®æ¬æ¥ã®å®è¡ã¯ããã¯æ°ãšå®éã«åŠçãããåœä»€æ°ã«ãºã¬ãçããããã«ãªã£ããããå®è³ªçãªåŠçèœåã«å¿ããIPCã䜿çšãããããã«ãªã£ãã
;MIPSïŒ1ç§ãããã«å®è¡ã§ããåœä»€æ°ïŒ
:MIPSã¯ãCPUã1ç§ãããã«å®è¡ã§ããåœä»€æ°ã瀺ãææšã§ããMIPSã¯ãCPUã®æ§èœã枬å®ããéã«ãã䜿çšãããŸãããåœä»€ã»ããã¢ãŒããã¯ãã£ãåœä»€ã®çš®é¡ã«ãã£ãŠç°ãªãå€ãåŸããããããåçŽãªæ¯èŒã«ã¯æ³šæãå¿
èŠã§ãã
;MFLOPSïŒ1ç§ãããã«å®è¡ã§ããæµ®åå°æ°ç¹æŒç®ã®æ°ïŒ
:MFLOPSã¯ãCPUã1ç§ãããã«å®è¡ã§ããæµ®åå°æ°ç¹æŒç®ã®æ°ã瀺ãææšã§ããMFLOPSã¯ãç§åŠæè¡èšç®ãªã©ã®åéã§ãã䜿çšãããŸãã
;ã¡ã¢ãªåž¯åå¹
:ã¡ã¢ãªåž¯åå¹
ã¯ãã¡ã¢ãªããããŒã¿ãèªã¿åãããã®åž¯åå¹
ã瀺ãææšã§ããã¡ã¢ãªåž¯åå¹
ãé«ãã»ã©ãCPUã¯ããå€ãã®ããŒã¿ãé«éã«åŠçã§ããŸãã
;CPUå©çšç
:CPUå©çšçã¯ãCPUãã¢ã€ãã«ç¶æ
ã§ãªãæéã®å²åã瀺ãææšã§ããCPUå©çšçãé«ãå Žåã¯ãCPUã«è² è·ãããã£ãŠããããšãæå³ããCPUã®æ§èœãäœäžããå¯èœæ§ããããŸãã
== åœä»€ã»ããã¢ãŒããã¯ãã£ãŒ ==
åœä»€ã»ããã¢ãŒããã¯ãã£ãŒã¯ãã³ã³ãã¥ãŒã¿ã®ããŒããŠã§ã¢ãšãœãããŠã§ã¢ã®äž¡æ¹ãèšèšããäžã§éèŠãªåœ¹å²ãæããã¢ãŒããã¯ãã£ãŒã®äžã€ã§ããåœä»€ã»ããã¢ãŒããã¯ãã£ãŒã¯ãããã»ããµãå®è¡ã§ããåœä»€ã®ã»ãããå®çŸ©ãããã®åœä»€ãã©ã®ããã«åŠçããããå®çŸ©ããŸãã
åœä»€ã»ããã®æŠèŠã§ã¯ãåœä»€ã»ããã¢ãŒããã¯ãã£ãŒã«é¢ããåºæ¬çãªæ
å ±ãæäŸããŸãããã®ç« ã§ã¯ãåœä»€ã»ããã®æŠèŠãåœä»€ã»ããã®éèŠãªæŠå¿µãåœä»€ã»ããã®çš®é¡ãããã³åœä»€ã»ããã®åºæ¬çãªæ©èœã«ã€ããŠèª¬æããŸãã
åœä»€ã®çš®é¡ãšãã©ãŒãããã§ã¯ãåœä»€ã»ããã¢ãŒããã¯ãã£ãŒã«ãããåœä»€ã®çš®é¡ãšãã®ãã©ãŒãããã«ã€ããŠè©³ãã説æããŸãããã®ç« ã§ã¯ãåœä»€ã®çš®é¡ãšããŠç®è¡ãè«çãæ¯èŒããžã£ã³ããªã©ãå«ãŸããŸãããŸããåœä»€ã®ãã©ãŒãããã«ã€ããŠã説æãããããã©ã®ããã«ããã»ããµã§å®è¡ããããã«ã€ããŠã説æããŸãããã®ç« ã§ã¯ãåœä»€ã®æå³ã䜿ãæ¹ãåœä»€ã®ãã€ãæ°ããªãã©ã³ãã®æ°ãããã³ãã®ãªãã©ã³ãã®åã«ã€ããŠã説æããŸãã
=== åœä»€ã»ããã®æŠèŠ ===
åœä»€ã»ãããšã¯ãã³ã³ãã¥ãŒã¿ããã€ã¯ãããã»ããµãå®è¡ã§ããåœä»€ã®éåã§ããã³ã³ãã¥ãŒã¿ããã€ã¯ãããã»ããµã¯ãããã°ã©ã ãå®è¡ãããéã«ãåœä»€ã»ããã«å«ãŸããåœä»€ã1ã€ãã€è§£éããŠå®è¡ããŸãã
åœä»€ã»ããã«ã¯ãç®è¡æŒç®ãè«çæŒç®ãã¡ã¢ãªã¢ã¯ã»ã¹ããžã£ã³ããªã©ã®åºæ¬çãªæäœãå«ãŸããŠããŸãããŸããåœä»€ã»ããã¯ãã³ã³ãã¥ãŒã¿ã®ã¢ãŒããã¯ãã£ã«ãã£ãŠç°ãªããŸããäŸãã°ãx86ã¢ãŒããã¯ãã£çšã®åœä»€ã»ããã¯ãARMã¢ãŒããã¯ãã£çšã®åœä»€ã»ãããšç°ãªããŸãã
åœä»€ã»ããã¯ãããã°ã©ããã³ã³ãã¥ãŒã¿ããã€ã¯ãããã»ããµã«å¯ŸããŠçŽæ¥æäœããããšãã§ããããã§ã¯ãããŸããããããã°ã©ãã³ã°èšèªãã³ã³ãã€ã©ãªã©ã®ãœãããŠã§ã¢ã«ãã£ãŠãåœä»€ã»ããã䜿çšããããã°ã©ãã³ã°ãå¯èœã«ãªããŸãã
=== åœä»€ã®çš®é¡ãšãã©ãŒããã ===
åœä»€ã®çš®é¡ã¯ãã³ã³ãã¥ãŒã¿ã®ã¢ãŒããã¯ãã£ã«ãã£ãŠç°ãªããŸãããåºæ¬çã«ã¯ç®è¡åœä»€ãè«çåœä»€ããžã£ã³ãåœä»€ãåå²åœä»€ãããŒã¿è»¢éåœä»€ãªã©ããããŸããåœä»€ãã©ãŒãããã¯ãåœä»€ãè¡šãããã®ãããã®ãã¿ãŒã³ã§ããåœä»€ãã©ãŒãããã«ã¯ããªãã³ãŒãïŒæäœã³ãŒãïŒããªãã©ã³ãïŒæäœå¯Ÿè±¡ïŒãªã©ãå«ãŸããŸããåœä»€ãã©ãŒãããã¯ãããã°ã©ã ãã³ã³ãã€ã«ãããšãã«äœ¿çšãããã³ã³ãã€ã©ã®éèŠãªèŠçŽ ã§ãããããã°ã©ã ã®å®è¡å¹çãé床ã«åœ±é¿ãäžããŸãã
äŸãã°ãX86ãšARMã¯ç°ãªãã¢ãŒããã¯ãã£ã§ãããåœä»€ã»ããã¢ãŒããã¯ãã£ïŒISAïŒãç°ãªããããã ãŒãåœä»€ã®ããŒã¢ããã¯ãšãã€ããã©ãŒããããç°ãªããŸãã
以äžã«ããããã®ã¢ãŒããã¯ãã£ã«ãããã ãŒãåœä»€ã®äŸã瀺ããŸãã
X86ã®å Žåãã ãŒãåœä»€ã«ã¯MOVããããŸããäžè¬çãªMOVåœä»€ã®åœ¢åŒã¯ã以äžã®ããã«ãªããŸãã
MOV <destination>, <source>
destinationã«ã¯ã移åå
ã®ãªãã©ã³ããæå®ããŸããsourceã«ã¯ã移åå
ã®ãªãã©ã³ããæå®ããŸãã
äŸãã°ã以äžã®åœä»€ã¯ãã¬ãžã¹ã¿eaxã«å€0x1234ãããŒãããŸãã
MOV eax, 0x1234
ãã®åœä»€ã®ãã€ããã©ãŒãããã¯ã以äžã®éãã§ãã
B8 34 12 00 00
ARMã®å Žåããã ãŒãåœä»€ã«ã¯MOVããããŸããARMã®MOVåœä»€ã¯ã以äžã®ããã«ãªããŸãã
MOV <destination>, <source>
destinationã«ã¯ã移åå
ã®ã¬ãžã¹ã¿ãæå®ããŸããsourceã«ã¯ã移åå
ã®ã¬ãžã¹ã¿ãŸãã¯å³å€ãæå®ããŸãã
äŸãã°ã以äžã®åœä»€ã¯ãã¬ãžã¹ã¿r0ã«å€0x1234ãããŒãããŸãã
MOV r0, #0x1234
ãã®åœä»€ã®ãã€ããã©ãŒãããã¯ã以äžã®éãã§ãã
20 00 13 24
=== åœä»€ã®å®è¡ãµã€ã¯ã«ãšå¶åŸ¡æ¹åŒ ===
åœä»€ã®å®è¡ãµã€ã¯ã«ãšå¶åŸ¡æ¹åŒã«ã€ããŠåŠã¶ããšã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®åºç€çãªæŠå¿µã®äžã€ã§ãããã®ãããã¯ã§ã¯ãããã»ããµãåœä»€ãå®è¡ããããã®ãµã€ã¯ã«ããå¶åŸ¡æ¹åŒã«ã€ããŠåŠã³ãŸãã
åœä»€ã®å®è¡ãµã€ã¯ã«ã¯ãåœä»€ãå®è¡ããããã«å¿
èŠãªæé ã®äžé£ã®ããšãæããŸããäžè¬çã«ãåœä»€å®è¡ãµã€ã¯ã«ã«ã¯ããã§ããïŒåœä»€ã®ååŸïŒããã³ãŒãïŒåœä»€ã解èªïŒãå®è¡ïŒåœä»€ãå®è¡ïŒã®3ã€ã®æ®µéããããŸãããããã®ã¹ãããã¯ãããã»ããµãåœä»€ãå®è¡ããããã«å¿
èŠãªããã»ã¹ã§ãããããã»ããµå
ã®åéšåãæ£ç¢ºã«åæããŠåäœããå¿
èŠããããŸãã
å¶åŸ¡æ¹åŒã¯ãåœä»€ãå®è¡ããããã®ããã»ããµå
ã®åéšåã®åäœãå¶åŸ¡ããããã«äœ¿çšãããæ¹æ³ãæããŸããããã»ããµã®å¶åŸ¡æ¹åŒã«ã¯ããã€ã¯ãããã°ã©ã æ¹åŒãšããŒããŠã§ã¢æ¹åŒã®2ã€ããããŸãããã€ã¯ãããã°ã©ã æ¹åŒã¯ãåœä»€ã®å®è¡ã決å®ããããã«ãåœä»€ã»ããã¢ãŒããã¯ãã£ã®ãã€ã¯ãããã°ã©ã ã䜿çšããŸããäžæ¹ãããŒããŠã§ã¢æ¹åŒã¯ãå¶åŸ¡åè·¯ã«ãã£ãŠå®è¡ããããããããé«éãªå®è¡ãå¯èœã§ãã
== ãã€ã¯ã¢ãŒããã¯ãã£ãŒ ==
ãã€ã¯ãã¢ãŒããã¯ãã£ãŒãšã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®èšèšã®ãã¡ãããã»ããµãŒã®å
éšæ§é ãæ©èœãå®çŸããããã®èšèšãæããŸããã€ãŸãããã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ãããã»ããµãŒã®åœä»€ã»ããã¢ãŒããã¯ãã£ãŒïŒISAïŒãå®éã«å®è£
ããæ¹æ³ãå®çŸ©ãããã®ã§ãã
ãã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ãããã»ããµãŒã®åŠçèœåãæ¶è²»é»åãããã³ãã®ä»ã®ç¹æ§ã«åœ±é¿ãäžããŸãããããã£ãŠããã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ãããã»ããµãŒã®æ§èœãåäžãããããã«æé©åããããšãã§ããŸãã
ãã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ãããã€ãã®éšåã§æ§æãããŸããäŸãã°ãã¢ãã¬ã¹çæãŠãããïŒAGUïŒã¯ãããã»ããµãŒãã¢ãã¬ã¹ãçæããããã®åè·¯ã§ãããæŒç®ãŠãããã¯ãç®è¡æŒç®ãè«çæŒç®ãå®è¡ããããã®åè·¯ã§ãããŸããã¬ãžã¹ã¿ãã¡ã€ã«ã¯ãããã»ããµãŒãããŒã¿ãä¿åããããã®åè·¯ã§ããããã£ãã·ã¥ã¯ãããã»ããµãŒããã䜿çšããããŒã¿ãé«éã«ã¢ã¯ã»ã¹ããããã®åè·¯ã§ãã
ãã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ãISAã«ãã£ãŠå®çŸ©ãããåœä»€ãå®è¡ããããã«ãåœä»€ãã³ãŒãåè·¯ã䜿çšããŸããåœä»€ãã³ãŒãåè·¯ã¯ãISAã§å®çŸ©ãããåœä»€ã解éãããããå®éã®ããã»ããµãŒåè·¯ã§å®è¡ããããã«å¿
èŠãªå¶åŸ¡ä¿¡å·ãçæããŸãã
ãã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ãããã»ããµãŒã®æ§èœãšæ¶è²»é»åã®äž¡æ¹ãæ¹åããããã«æé©åããããšãã§ããŸããäŸãã°ããã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ã䞊ååŠçã䜿çšããŠè€æ°ã®åœä»€ãåæã«å®è¡ããããšãã§ããŸãããŸãããã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ãããå¹ççãªãã£ãã·ã¥ããã€ãã©ã€ã³ãªã©ã®åè·¯ã䜿çšããŠãããã»ããµãŒã®æ§èœãåäžãããããšãã§ããŸãã
æè¿ã®ãã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ãçé»ååã泚ç®ãããŠããŸãããã€ã¯ãã¢ãŒããã¯ãã£ãŒã¯ãã¹ãªãŒãã¢ãŒããåçé»å§ã¹ã±ãŒãªã³ã°ãªã©ã®æè¡ã䜿çšããŠãããã»ããµãŒã®æ¶è²»é»åã®äœæžãå³ã£ãŠããŸãã
== ãã€ã¯ãã³ãŒã ==
ãã€ã¯ãã³ãŒãã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã«ãããŠéåžžã«éèŠãªåœ¹å²ãæããæŠå¿µã®äžã€ã§ãããã€ã¯ãã³ãŒãã¯ãããã»ããµãåœä»€ãå®è¡ããããã®å
éšåäœã決å®ããããã®åœä»€ã»ããã§ãããäœã¬ãã«ã®åœä»€ãé«ã¬ãã«ã®åœä»€ã«å€æããããã«äœ¿çšãããŸãã
ãã€ã¯ãã³ãŒãã¯ãããã»ããµã®ããŒããŠã§ã¢ãšãœãããŠã§ã¢ã®äžéã«äœçœ®ããã¬ãã«ã§åäœããŸãããã€ã¯ãã³ãŒãã¯ãããã»ããµã®ååœä»€ã®åäœãå®çŸ©ããäžé£ã®ãã€ã¯ãåœä»€ã§æ§æãããŸãããããã®ãã€ã¯ãåœä»€ã¯ãåºæ¬çã«ã¯ãããã»ããµå
ã®ã¬ãžã¹ã¿ãŒãã¢ã«ãŽãªãºã ãªã©ã®èŠçŽ ãå¶åŸ¡ããããã®åœä»€ã§ãã
ãã€ã¯ãã³ãŒãã¯ãããã»ããµã®èšèšã«ãããŠå€ãã®å©ç¹ããããããŸããæãéèŠãªå©ç¹ã¯ããã€ã¯ãã³ãŒãã䜿çšããããšã§ãããã»ããµã®èšèšãç°¡ç¥åã§ããããšã§ããããã»ããµã®èšèšè
ã¯ãé«ã¬ãã«ã®åœä»€ãå®è¡ããããã«å¿
èŠãªãã¹ãŠã®äœã¬ãã«ã®åœä»€ãæžãå¿
èŠããªãã代ããã«ãã€ã¯ãã³ãŒãã«ãã£ãŠãããã®äœã¬ãã«ã®åœä»€ãå®è¡ããããšãã§ããŸãã
ãŸãããã€ã¯ãã³ãŒãã¯ãããã»ããµã®åœä»€ã»ãããå€æŽããããã«ã䜿çšã§ããŸããããã«ãããæ°ããåœä»€ã»ãããç°¡åã«è¿œå ããããšãã§ããããã»ããµã®æ©èœãæ¡åŒµããããšãã§ããŸãã
ãããããã€ã¯ãã³ãŒãã䜿çšããããšã«ã¯ããã€ãã®æ¬ ç¹ããããŸããæãéèŠãªæ¬ ç¹ã¯ããã€ã¯ãã³ãŒããåœä»€ã®å®è¡é床ã«åœ±é¿ãäžããå¯èœæ§ãããããšã§ãããã€ã¯ãã³ãŒãã®åŠçã«æéããããå Žåãããã»ããµã®æ§èœãäœäžããå¯èœæ§ããããŸãããã®ãããããã»ããµã®èšèšè
ã¯ããã€ã¯ãã³ãŒããå¹ççã«åŠçããããã«èšèšããå¿
èŠããããŸãã
{{ã³ã©ã |æ°Žå¹³ãã€ã¯ãã³ãŒããšåçŽãã€ã¯ãã³ãŒã|2=ãã€ã¯ãã³ãŒããšã¯ãã³ã³ãã¥ãŒã¿ã®äžå€®åŠçè£
眮ïŒCPUïŒã®å¶åŸ¡ãããããã®åœä»€ã»ããã®ããšã§ãã
CPUã¯ããã€ã¯ãã³ãŒãã®åœä»€ã«åŸã£ãŠåäœããããããã€ã¯ãã³ãŒãã¯CPUã®åºæ¬çãªåäœåçãå®ããéèŠãªåœ¹å²ãæ
ã£ãŠããŸãã
ãã€ã¯ãã³ãŒãã«ã¯ãæ°Žå¹³ãã€ã¯ãã³ãŒããšåçŽãã€ã¯ãã³ãŒãã®2çš®é¡ããããŸãã
æ°Žå¹³ãã€ã¯ãã³ãŒãã¯ãCPUå
éšã®åæ©èœã«å¯Ÿå¿ããåœä»€ãæã¡ãåœä»€ã®äžã€äžã€ãCPUå
éšã®åè·¯ã«çŽæ¥ã¢ã¯ã»ã¹ããŠåäœããŸãã
äžæ¹ãåçŽãã€ã¯ãã³ãŒãã¯ãååœä»€ããã€ã¯ãããã°ã©ã ã®åœ¢ã§èšè¿°ããCPUã®å¶åŸ¡è£
眮ããã€ã¯ãããã°ã©ã ãé次å®è¡ããããšã§ãååœä»€ãå®çŸããŸãã
æ°Žå¹³ãã€ã¯ãã³ãŒãã¯ãCPUå
éšã®åè·¯ã«çŽæ¥ã¢ã¯ã»ã¹ãããããé«éãªåŠçãå¯èœã§ãããCPUã®è€éããæ©èœã®å€æŽã«ã¯å¯Ÿå¿ãã¥ãããšããæ¬ ç¹ããããŸãã
äžæ¹ãåçŽãã€ã¯ãã³ãŒãã¯ãåœä»€ããã€ã¯ãããã°ã©ã ãšããŠèšè¿°ããããšã§ãCPUã®æ©èœãå¶åŸ¡æ¹æ³ãæè»ã«å€æŽã§ãããããèšèšã®èªç±åºŠãé«ããéçºæéãçãã§ããŸãããåŠçé床ã¯æ°Žå¹³ãã€ã¯ãã³ãŒãã«æ¯ã¹ããšäœéã§ãã
ã©ã¡ãã®ãã€ã¯ãã³ãŒãã䜿çšãããã¯ãCPUã®æ©èœãèšèšç®çã«ãã£ãŠç°ãªããŸããçŸä»£ã®CPUã§ã¯ãæ°Žå¹³ãã€ã¯ãã³ãŒããšåçŽãã€ã¯ãã³ãŒããçµã¿åãããŠäœ¿çšããããšãäžè¬çã§ãã
}}
== CPUã®æ§æãšåäœ ==
=== CPUã®æ§æèŠçŽ ===
CPUã¯ãå¶åŸ¡ãŠããããæŒç®ãŠããããã¬ãžã¹ã¿ããã¹ãã¯ããã¯ãªã©ã®æ§æèŠçŽ ã§æ§æãããŸããå¶åŸ¡ãŠãããã¯ãããã°ã©ã ã«ãŠã³ã¿ãã次ã®åœä»€ãåãåºããŠãåœä»€ã解èªããæŒç®ãŠãããã«åœä»€ãéä¿¡ãã圹å²ãæã¡ãŸããæŒç®ãŠãããã¯ãç®è¡æŒç®ãè«çæŒç®ãå®è¡ããçµæãã¬ãžã¹ã¿ã«ä¿åããŸããã¬ãžã¹ã¿ã¯ãCPUå
ã®äžæçãªèšæ¶è£
眮ã§ãããããŒã¿ãä¿æããããã«äœ¿çšãããŸãããã¹ã¯ãCPUãšä»ã®ã³ã³ããŒãã³ãïŒã¡ã¢ãªãå
¥åºåè£
眮ãªã©ïŒã®éã§ããŒã¿ã転éããããã«äœ¿çšãããŸããã¯ããã¯ã¯ãCPUå
ã®åã³ã³ããŒãã³ããåæããŠåäœããããã«å¿
èŠãªã¿ã€ãã³ã°ä¿¡å·ãçæããŸãã
=== ãã€ãã©ã€ã³åŠçãšã¹ãŒããŒã¹ã«ã©ãŒåŠç ===
CPUã®åŠçé床ãåäžãããããã«ããã€ãã©ã€ã³åŠçãã¹ãŒããŒã¹ã«ã©ãŒåŠçã䜿çšãããŸãããã€ãã©ã€ã³åŠçã¯ãè€æ°ã®åœä»€ãåæã«å®è¡ããããšãã§ãããããCPUã®æ§èœãåäžãããããšãã§ããŸããã¹ãŒããŒã¹ã«ã©ãŒåŠçã¯ã1ã€ã®åœä»€ãè€æ°ã®æŒç®ãŠãããã§åæã«å®è¡ããããšãã§ãããããããé«éãªåŠçãå®çŸããããšãã§ããŸãã
==== ãã€ãã©ã€ã³åŠç ====
ãã€ãã©ã€ã³åŠçã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã«ãããéèŠãªæŠå¿µã®1ã€ã§ãããè€æ°ã®åœä»€ãåæã«å®è¡ããããšã§åŠçé床ãé«éåããæ¹æ³ã§ãããã€ãã©ã€ã³åŠçã¯ãåœä»€ã®å®è¡ã«å¿
èŠãªã¹ããããè€æ°ã®æ®µéã«åå²ããåã¹ããããåæã«å®è¡ããããšã«ãã£ãŠå®çŸãããŸãã
ãã€ãã©ã€ã³åŠçã«ã¯ã以äžã®5ã€ã®æ®µéããããŸãã
#ååŸïŒFetchïŒïŒåœä»€ãã¡ã¢ãªããååŸããã
#ãã³ãŒãïŒDecodeïŒïŒåœä»€ã解èªããå®è¡ã«å¿
èŠãªæ
å ±ãåãåºãã
#ã¡ã¢ãªèªã¿åºãïŒMemory ReadïŒïŒå¿
èŠã«å¿ããŠãã¡ã¢ãªã«ã¢ã¯ã»ã¹ããŠããŒã¿ãèªã¿åºãã
#å®è¡ïŒExecuteïŒïŒåœä»€ãå®è¡ããã
#ã¡ã¢ãªæžã蟌ã¿ïŒMemory WriteïŒïŒå¿
èŠã«å¿ããŠãã¡ã¢ãªã«ã¢ã¯ã»ã¹ããŠããŒã¿ãæžã蟌ãã
åã¹ãããã¯ãåã®ã¹ããããå®äºãããšåæã«éå§ãããŸããã€ãŸããååŸã¹ããŒãžãå§ãŸããšåæã«ããã³ãŒãã¹ããŒãžãå§ãŸããŸããããã«ãããè€æ°ã®åœä»€ãåæã«åŠçããããããåŠçé床ãåäžããŸãã
ãã ãããã€ãã©ã€ã³åŠçã«ã¯ããã€ãã®èª²é¡ããããŸããäŸãã°ãåœä»€éã®äŸåé¢ä¿ãããå Žåã次ã®åœä»€ãå®è¡ãããåã«åã®åœä»€ãå®äºãããŸã§åŸ
ããªããã°ãªããªãããããã€ãã©ã€ã³åŠçã®å¹æãæžå°ããŸãããŸããåå²åœä»€ã®å Žåãã©ã¡ãã®åå²ãå®è¡ããããããããªãããããã€ãã©ã€ã³åŠçãéäžã§äžæããåŠçé床ãäœäžããããšããããŸãã
ãããã®èª²é¡ã解決ããããã«ããã€ãã©ã€ã³åŠçã«ã¯ããã€ãã®æ¹åçããããŸããäŸãã°ãã¢ãŠãã»ãªãã»ãªãŒããŒå®è¡ïŒOut-of-Order ExecutionïŒãåå²äºæž¬ïŒBranch PredictionïŒãªã©ããããŸããã¢ãŠãã»ãªãã»ãªãŒããŒå®è¡ã¯ãåœä»€ãå®è¡ããé åºãå€æŽããããšã§äŸåé¢ä¿ã解決ããåå²äºæž¬ã¯ãåå²åœä»€ã®å®è¡å
ãäºæž¬ããããšã§ãã€ãã©ã€ã³åŠçãéäžã§äžæããåæ°ãæžããããšãã§ããŸãã
==== ã¹ãŒããŒãã€ãã©ã€ã³ ====
ã¹ãŒããŒãã€ãã©ã€ã³ãšããææ³ã§ã¯ãæãæéã®ããããã€ãã©ã€ã³ã®ã¹ããŒãžã2ã€ä»¥äžã«åå²ããããšã§ãã¯ããã¯åšæ³¢æ°ã®äžéãåŒãäžããããšãã§ããŸãã
ãã ããã¹ããŒãžæ°ãç¡å¶éã«å¢ãããšãåå²ãçºçããå Žåã®ããã«ãã£ãå¢å€§ãããããæ
éã«èæ
®ããå¿
èŠããããŸãããŸããã¯ããã¯åšæ³¢æ°ãäžããããšã§æ¶è²»é»åãå¢å ãããããé»åæ¶è²»ã«ãé
æ
®ããå¿
èŠããããŸãã
==== ã¹ãŒããŒã¹ã«ã©ãŒ ====
ã¹ãŒããŒã¹ã«ã©ãŒããã»ããµãŒã¯ãã·ã³ã°ã«ããã»ããµå
ã§ã®åœä»€ã¬ãã«äžŠåæ§ãšåŒã°ãã圢åŒã®äžŠåæ§ãå®è£
ããCPUã§ããã¹ã«ã©ãŒããã»ããµãŒã¯ã1ã€ã®ã¯ããã¯ãµã€ã¯ã«ãããæ倧1ã€ã®åäžã®åœä»€ããå®è¡ã§ããªãã®ã«å¯Ÿããã¹ãŒããŒã¹ã«ã©ãŒããã»ããµãŒã¯ãåæã«è€æ°ã®åœä»€ãããã»ããµå
ã®ç°ãªãå®è¡ãŠãããã«éä¿¡ããããšã§ã1ã€ã®ã¯ããã¯ãµã€ã¯ã«äžã«è€æ°ã®åœä»€ãå®è¡ã§ããŸãããã®ãããäžããããã¯ããã¯ã¬ãŒãã§å¯èœãªå Žåãããã¹ã«ãŒãããïŒåäœæéãããã«å®è¡ã§ããåœä»€æ°ïŒãé«ããªããŸããåå®è¡ãŠãããã¯ãCPUå
ã®åäžã®ç®è¡è«çæŒç®è£
眮ã®ãããªãå¥ã
ã®ããã»ããµïŒãŸãã¯ãã«ãã³ã¢ããã»ããµã®å Žåã¯ã³ã¢ïŒã§ã¯ãããŸããã
ã·ã³ã°ã«ã³ã¢ã®ã¹ãŒããŒã¹ã«ã©ãŒããã»ããµãŒã¯ãSISDããã»ããµãŒïŒã·ã³ã°ã«åœä»€ã¹ããªãŒã ãã·ã³ã°ã«ããŒã¿ã¹ããªãŒã ïŒãšåé¡ãããŸãããçããã¯ãã«æŒç®ããµããŒãããã·ã³ã°ã«ã³ã¢ã®ã¹ãŒããŒã¹ã«ã©ãŒããã»ããµãŒã¯ãSIMDïŒã·ã³ã°ã«åœä»€ã¹ããªãŒã ããã«ãããŒã¿ã¹ããªãŒã ïŒãšåé¡ãããå¯èœæ§ããããŸãããã«ãã³ã¢ã®ã¹ãŒããŒã¹ã«ã©ãŒããã»ããµãŒã¯ãMIMDããã»ããµãŒïŒãã«ããã«åœä»€ã¹ããªãŒã ããã«ããã«ããŒã¿ã¹ããªãŒã ïŒãšåé¡ãããŸãã
ã¹ãŒããŒã¹ã«ã©ãŒCPUã¯éåžžãã€ãã©ã€ã³åŠçãè¡ãããŠããŸãããã¹ãŒããŒã¹ã«ã©ãŒåŠçãšãã€ãã©ã€ã³åŠçã¯ç°ãªãããã©ãŒãã³ã¹åäžæè¡ãšèããããŠããŸããåè
ã¯è€æ°ã®å®è¡ãŠãããã䜿çšããŠè€æ°ã®åœä»€ã䞊åã«å®è¡ããåŸè
ã¯å®è¡ãŠããããç°ãªããã§ãŒãºã«åå²ããŠåãå®è¡ãŠãããã§è€æ°ã®åœä»€ã䞊åã«å®è¡ããŸãã
ã¹ãŒããŒã¹ã«ã©ãŒãã¯ããã¯ã¯ãé垞以äžã®ç¹åŸŽãšé¢é£ä»ããããŸãïŒ
* åœä»€ã¯ã·ãŒã±ã³ã·ã£ã«ãªåœä»€ã¹ããªãŒã ããçºè¡ããã
* CPUãå®è¡æã«åœä»€éã®ããŒã¿äŸåæ§ãåçã«ãã§ãã¯ãã
* CPUã¯1ã¯ããã¯ãããè€æ°ã®åœä»€ãå®è¡ããããšãã§ãã
=== ãã¶ãŒã ===
ãã¶ãŒããšã¯ãã³ã³ãã¥ãŒã¿ã¢ãŒããã¯ãã£ã«ãããŠãåœä»€å®è¡ã®é åºã«é¢ããåé¡ã®ããšãæããŸãããã¶ãŒããçºçãããšãæ£ããçµæãåŸãããã«å¿
èŠãªåœä»€å®è¡ã®é åºãä¹±ããŠããŸãããšããããŸãã
äŸãã°ãããåœä»€ãå®è¡ãããåã«ããã®åœä»€ãå¿
èŠãšããããŒã¿ããŸã çšæãããŠããªãå Žåããã¶ãŒããçºçããŸãããã®å Žåãå¿
èŠãªããŒã¿ãçšæããããŸã§ãåœä»€ã®å®è¡ãåŸ
ããªããã°ãªãããå®è¡é床ãé
ããªãå¯èœæ§ããããŸãã
ãã¶ãŒãã解決ããããã«ã¯ãããã€ãã®æ¹æ³ããããŸããäŸãã°ãåœä»€ã®å®è¡é åºãå€æŽããããšãåœä»€ã®å®è¡ã«å¿
èŠãªããŒã¿ãäºåã«çšæããããšãåœä»€å®è¡ã®éäžã§ä»ã®åœä»€ãå®è¡ããããšãªã©ããããŸãã
ãã¶ãŒãã®çš®é¡ã«ã¯ãããŒã¿ãã¶ãŒããå¶åŸ¡ãã¶ãŒããæ§é ãã¶ãŒããªã©ããããŸããããŒã¿ãã¶ãŒãã¯ãåœä»€ãå¿
èŠãšããããŒã¿ããŸã çšæãããŠããªãå Žåã«çºçããŸããå¶åŸ¡ãã¶ãŒãã¯ãåå²åœä»€ãªã©ã®å¶åŸ¡ãããŒãå€æŽããåœä»€ã®å®è¡ã«ãã£ãŠçºçããŸããæ§é ãã¶ãŒãã¯ãè€æ°ã®åœä»€ãåæã«å®è¡ãããããšã«ãã£ãŠãå®è¡ãŠããããªã©ã®ãªãœãŒã¹ã競åããããšã§çºçããŸãã
ãã¶ãŒããçºçãããšãããã°ã©ã ã®å®è¡é床ãé
ããªããããé«éãªã³ã³ãã¥ãŒã¿ã¢ãŒããã¯ãã£ãèšèšããå Žåã«ã¯ããã¶ãŒãã®è§£æ±ºæ¹æ³ã«ã€ããŠååã«èæ
®ããå¿
èŠããããŸãã
=== ææ©çå®è¡ ===
ææ©å®è¡ãšã¯ãã³ã³ãã¥ãŒã¿ãŒã®ããã»ããµãŒã«ãããŠãããã°ã©ã ã®åœä»€ãäºåã«å®è¡ããããšã§ãåŠçé床ãé«éåããæè¡ã§ãã
ãã®æè¡ã¯ã次ã«å®è¡ãããå¯èœæ§ãé«ãåœä»€ãäºæž¬ãããã®åœä»€ã®å®è¡ãäºåã«éå§ããŸãããã®éãäºæž¬ãæ£ããå Žåã¯ãå®éã®å®è¡ã«ç§»è¡ããåŠçé床ãé«éåãããŸããäžæ¹ãäºæž¬ã誀ã£ãŠããå Žåã¯ããã®åŠççµæãç Žæ£ããŠãæ£ããåœä»€ã®å®è¡ã«ç§»è¡ããŸãã
ææ©å®è¡ã¯ãè€éãªããã°ã©ã ãåŠçããéã«éåžžã«æå¹ã§ãããæè¿ã§ã¯ãMeltdownãSpectreãªã©ã®ã»ãã¥ãªãã£äžã®è匱æ§ãçºèŠããããããã»ãã¥ãªãã£äžã®åé¡ãææãããŠããŸãã
=== ã¢ãŠãã»ãªãã»ãªãŒããŒå®è¡ ===
ã¢ãŠãã»ãªãã»ãªãŒããŒå®è¡ïŒOut-of-order executionïŒã¯ãã³ã³ãã¥ãŒã¿ã®åœä»€å®è¡æ¹åŒã®äžã€ã§ãããã®æ¹åŒã§ã¯ãããã»ããµãåœä»€ãçŽåã«å®è¡ãã代ããã«ãå®è¡å¯èœãªåœä»€ãèŠã€ã次第ãå®è¡é åºãå€æŽããŠãããã°ã©ã ãå¹ççã«å®è¡ããŸãã
éåžžãã³ã³ãã¥ãŒã¿ã®ããã»ããµã¯ãããã°ã©ã ã®åœä»€ãé çªã«å®è¡ããŸããããããããåœä»€ãå®è¡ããããã«å¿
èŠãªããŒã¿ããŸã èšç®ãããŠããªãã£ãããã¡ã¢ãªããèªã¿èŸŒãŸããŠããªãã£ãå Žåãããã»ããµã¯æ¬¡ã®åœä»€ãå®è¡ããå¿
èŠããããŸãããã®ãããåœä»€ã®å®è¡é åºãå
¥ãæ¿ããããšããããŸãã
ã¢ãŠãã»ãªãã»ãªãŒããŒå®è¡ã§ã¯ãããã»ããµã¯æªå®è¡ã®åœä»€ããããã¡ã«æ ŒçŽããå®è¡å¯èœã«ãªã£ãããå®è¡é åºãå€æŽããŠå®è¡ããŸãããã®æ¹æ³ã«ãããããã»ããµã¯ããå€ãã®åœä»€ãåæã«å®è¡ã§ããããã°ã©ã ã®å®è¡å¹çãåäžããŸãããã ããå®è¡é åºãå
¥ãæ¿ãããããããã°ã©ã ã®çµæãäºæ³éãã§ãªãå¯èœæ§ããããŸãã
ã¢ãŠãã»ãªãã»ãªãŒããŒå®è¡ã¯ãçŸä»£ã®é«éããã»ããµã§åºã䜿çšãããŠãããããã°ã©ã ã®å®è¡é床ãåäžãããããã®éèŠãªæè¡ã®äžã€ãšãªã£ãŠããŸãã
=== ãã¯ãã«èšç®æ© ===
ãã¯ãã«ããã»ããµãšã¯ããã¯ãã«æŒç®ã«ç¹åããã³ã³ãã¥ãŒã¿ããã»ããµã®ããšã§ãããã¯ãã«æŒç®ã¯ãå€ãã®æ°å€æŒç®åŠçã«ãããŠéèŠãªåœ¹å²ãæãããŸããããšãã°ã3Dã°ã©ãã£ãã¯ã¹ãç©çã·ãã¥ã¬ãŒã·ã§ã³ãç§åŠæè¡èšç®ã人工ç¥èœãªã©ããããŸãã
ãã¯ãã«ããã»ããµã¯ã1ã€ã®åœä»€ã§åãåã®å€æ°ã®ããŒã¿èŠçŽ ãåæã«åŠçããããšãã§ããŸããããã«ãããåäžã®åœä»€ã§èšå€§ãªéã®ããŒã¿ãåŠçããããšãã§ããŸãããã¯ãã«ããã»ããµã¯ãã¹ã«ã©ãŒããã»ããµãšæ¯èŒããŠé«éã§ããããã¯ãã«æŒç®ã«ç¹åããŠãããããè€éãªæŒç®ãè¡ãããšãã§ããŸãã
ãã¯ãã«ããã»ããµã¯ã倧éã®ããŒã¿ãåŠçããå Žåã«ç¹ã«æçšã§ããããšãã°ãæ°è±¡äºå ±ãã·ãã¥ã¬ãŒã·ã§ã³ãåååååŠãªã©ã®åéã§äœ¿çšãããŸãããŸãããã¯ãã«ããã»ããµã¯ãGPUãªã©ã®ä»ã®ç¹æ®çšéããã»ããµãšçµã¿åãããŠäœ¿çšãããããšããããŸãã
æè¿ã®äžè¬çãªCPUã¯ããã¯ãã«æŒç®ããµããŒãããããšãã§ããããããã¯ãã«ããã»ããµã¯ããŸãäžè¬çã§ã¯ãããŸããããç¹å®ã®åéã«ãããŠã¯ããŸã éèŠãªåœ¹å²ãæãããŠããŸãã
=== SIMD ===
Single Instruction, Multiple Data (SIMD) ã¯ã1ã€ã®åœä»€ãè€æ°ã®ããŒã¿ãåæã«åŠçããã³ã³ãã¥ãŒã¿ã®ã¢ãŒããã¯ãã£ã§ãã
ããã¯ããã¯ãã«åŠçãšããŠãç¥ãããŠãããåãæäœãå€æ°ã®ããŒã¿ã«é©çšããããšãã§ããŸããäŸãã°ãSIMDããã»ããµã¯ãåãæ°åŒã䜿çšããŠå€æ°ã®ç»åãã¯ã»ã«ãäžåºŠã«åŠçããããšãã§ããŸãã
SIMDã¯ãCPUãGPUãDSPãªã©ãæ§ã
ãªçš®é¡ã®ããã»ããµã§äœ¿çšãããŸããããã¯ããã¯ãã«åŠçãç¹å®ã®ã¿ã¹ã¯ã«å¯ŸããŠé«ãå¹çãçºæ®ããããã§ããç»ååŠçããããªåŠçãé³å£°åŠçãç§åŠçã·ãã¥ã¬ãŒã·ã§ã³ãªã©ãå€ãã®åéã§SIMDã掻çšãããŠããŸãã
å ããŠãSIMDãå©çšããããšã§ãããã°ã©ã ã®å®è¡é床ãåäžããå ŽåããããŸããããã¯ã1ã€ã®åœä»€ã§å€æ°ã®ããŒã¿ãåŠçãããããããã°ã©ããæ瀺çã«ã«ãŒããæžãå¿
èŠããªããªãããã§ãããã ããSIMDã掻çšããããã«ã¯ãã¢ããªã±ãŒã·ã§ã³ããã¯ãã«åŠçããµããŒãããŠããå¿
èŠããããŸãããŸããããŒã¿ã®äŸåé¢ä¿ãããå Žåã«ã¯ãSIMDãé©çšããããšãå¶éãããããšããããŸãã
ããã€ãã®ããã»ããµã¢ãŒããã¯ãã£ãSIMDãæ¡çšããŠãããããããç¬èªã®åœä»€ã»ãããæã£ãŠããŸãã
äžè¬çãªSIMDãæ¡çšããåœä»€ã»ããã«ã¯ä»¥äžã®ãã®ããããŸãã
#'''x86ã®SSEïŒStreaming SIMD ExtensionsïŒ''': ã€ã³ãã«ã®x86ã¢ãŒããã¯ãã£ã«ãããSSEã¯ãSIMDãå®è£
ããåœä»€ã»ããã®äžã€ã§ããSSEã¯ãæåã®ããŒãžã§ã³ããçŸåšã®SSE4.2ãŸã§é²åããæµ®åå°æ°ç¹æŒç®ãæŽæ°æŒç®ã®SIMDåœä»€ãæäŸããŠããŸãã
#'''ARMã®NEON''': ARMã¢ãŒããã¯ãã£ã«ãããNEONããSIMDãå®è£
ããåœä»€ã»ããã§ããNEONã¯ãç»ååŠçããããªåŠçãªã©ã®ãã«ãã¡ãã£ã¢ã¢ããªã±ãŒã·ã§ã³åãã«èšèšãããŠãããæµ®åå°æ°ç¹æŒç®ãæŽæ°æŒç®ãªã©ã®SIMDåœä»€ãæäŸããŠããŸãã
#'''IBMã®AltiVec/VMX/VSX''': IBMã®PowerPCã¢ãŒããã¯ãã£ã§äœ¿çšãããŠããAltiVecïŒVMXãVSXãšããŠãç¥ãããïŒã¯ãSIMDæ¡åŒµåœä»€ã»ããã§ããAltiVecã¯ããã¯ãã«æŒç®ããµããŒãããPowerPCããŒã¹ã®ããã»ããµã§é³å£°åŠçãç»ååŠçãªã©ã«å©çšãããŠããŸãã
#'''ARMã®SVEïŒScalable Vector ExtensionïŒ''': æè¿ã®ARMv8-Aã¢ãŒããã¯ãã£ã§å°å
¥ãããSVEã¯ãå¯å€é·ãã¯ãã«ãæ±ãããã®åœä»€ã»ããæ¡åŒµã§ããSVEã¯ãåŸæ¥ã®åºå®é·ãã¯ãã«ã«æ¯ã¹ãŠæè»æ§ãé«ããããŸããŸãªãã¯ãã«é·ã§ã®æŒç®ãå¯èœã«ããŸãã
ãããã¯äžéšã®SIMDãæ¡çšããåœä»€ã»ããã§ãããããããã®ã¢ãŒããã¯ãã£ãçšéã«å¿ããŠç°ãªãç¹æ§ãæã£ãŠããŸãã
==== å
·äœçãªã³ãŒãäŸ ====
以äžã¯SSEïŒStreaming SIMD ExtensionsïŒã䜿çšããã¢ã»ã³ããªèšèªã§ã®æµ®åå°æ°ç¹æ°ã®ä¹ç®ã®äŸã§ãã
:<syntaxhighlight lang=asm>
section .data
vectorA dd 1.0, 2.0, 3.0, 4.0 ; æµ®åå°æ°ç¹æ°é
åA
vectorB dd 2.0, 2.0, 2.0, 2.0 ; æµ®åå°æ°ç¹æ°é
åB
result dd 0.0, 0.0, 0.0, 0.0 ; çµæãæ ŒçŽããé
å
section .text
global _start
_start:
movups xmm0, [vectorA] ; ãã¯ãã«AãXMM0ã¬ãžã¹ã¿ã«ããŒã
movups xmm1, [vectorB] ; ãã¯ãã«BãXMM1ã¬ãžã¹ã¿ã«ããŒã
mulps xmm0, xmm1 ; XMM0ãšXMM1ãä¹ç®ããçµæãXMM0ã«æ ŒçŽ
movups [result], xmm0 ; XMM0ã®çµæãã¡ã¢ãªã«æ ŒçŽ
; çµæã䜿çšããåŠçãããã«èšè¿°ããïŒäŸãã°ãã¡ã¢ãªã«çµæãæ ŒçŽããåŸã®åŠçïŒ
</syntaxhighlight>
ãã®äŸã§ã¯ã4ã€ã®æµ®åå°æ°ç¹æ°ãSSEã¬ãžã¹ã¿ã«ããŒãããä¹ç®ãè¡ããçµæãå¥ã®SSEã¬ãžã¹ã¿ã«æ ŒçŽããã¢ã»ã³ããªèšèªã®ã³ãŒãã瀺ããŸãã
ãã®ã¢ã»ã³ããªã³ãŒãã§ã¯ã<code>movups</code>åœä»€ã䜿çšããŠæµ®åå°æ°ç¹æ°é
åãSSEã¬ãžã¹ã¿ã«ããŒããã<code>mulps</code>åœä»€ã§ä¹ç®ãå®è¡ããŠããŸãããã®åŸã<code>movups</code>åœä»€ã䜿çšããŠçµæãã¡ã¢ãªã«æ ŒçŽããŠããŸãã
ããã¯x86ã¢ãŒããã¯ãã£ã«ãããSSEã®äŸã§ãããç¹å®ã®ãã©ãããã©ãŒã ãã¢ãŒããã¯ãã£ã«ãã£ãŠã¢ã»ã³ããªã³ãŒããç°ãªãå ŽåããããŸãã
=== ãã«ãã¹ã¬ããã£ã³ã° ===
ãã«ãã¹ã¬ããã£ã³ã°ã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ã®äžçš®ã§ãããè€æ°ã®ã¹ã¬ãããåæã«å®è¡ãããããšãå¯èœã«ããæè¡ã§ãã
ã¹ã¬ããã¯ãããã°ã©ã å
ã§ç¬ç«ããŠå®è¡ãããå®è¡åäœã§ãããããã°ã©ã ã®å®è¡ãããå¹ççã«è¡ãããšãã§ããŸãããã«ãã¹ã¬ããã£ã³ã°ã¯ãããã°ã©ã å
ã®è€æ°ã®ã¹ã¬ãããåæã«å®è¡ãããããšã«ãããããã°ã©ã ã®ããã©ãŒãã³ã¹ãåäžãããããšãã§ããŸãã
å
·äœçã«ã¯ããã«ãã¹ã¬ããã£ã³ã°ã«ãããè€æ°ã®ã¿ã¹ã¯ãåæã«å®è¡ã§ãããããã·ã¹ãã ã®ã¬ã¹ãã³ã¹æéãççž®ããããšãã§ããŸãããŸãããã«ãã¹ã¬ããã£ã³ã°ã¯ã䞊ååŠçãå¯èœã«ãããããè€æ°ã®CPUã³ã¢ãæ倧éã«æŽ»çšããããšãã§ããŸãã
äžæ¹ã§ããã«ãã¹ã¬ããã£ã³ã°ãå®è£
ããã«ã¯ãã¹ã¬ããå士ã®ç«¶åç¶æ
ããã¹ã¬ããéã§ã®ããŒã¿ã®å
±æãªã©ãããã€ãã®èª²é¡ããããŸãããã®ãããé©åã«å®è£
ããªããšãããã°ã©ã ã®åäœãäžå®å®ã«ãªã£ãããå¹çãæªåããããšããããŸãã
ãã«ãã¹ã¬ããã£ã³ã°ã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ã®äžã§ãéèŠãªæè¡ã®äžã€ã§ãããçŸä»£ã®å€ãã®ããã°ã©ã ã§å©çšãããŠããŸãã
==== SMT ====
Simultaneous MultithreadingïŒSMTïŒã¯ãCPUã®åœä»€å®è¡ããã»ã¹ãå¹ççã«è¡ãããã®æè¡ã§ãããã®æè¡ã§ã¯ãCPUã®ç©ççãªã³ã¢æ°ãå¢ãããã«è€æ°ã®ã¹ã¬ãããåæã«å®è¡ããããšãå¯èœã§ãã
éåžžãCPUã¯1ã€ã®åœä»€ãå®è¡ããããã«1ã€ã®ãã€ãã©ã€ã³ã䜿çšããŸããããããSMTã§ã¯è€æ°ã®åœä»€ãåæã«å®è¡ã§ããŸããããã¯è€æ°ã®ã¹ã¬ãããåæã«å®è¡ããããšã§éæãããŸããããããã®ã¹ã¬ããã¯ç¬èªã®ã¬ãžã¹ã¿ãŒã»ãããšåœä»€ãã§ããã£ãŒãæã¡ãåãç©ççãªã³ã¢ãå
±æããŸãã
SMTã®å©ç¹ã¯ãCPUã®åŠçèœåãåäžãããããšãã§ããç¹ã§ããè€æ°ã®ã¹ã¬ãããåæã«å®è¡ããããšã§ãCPUãåœä»€ãå®è¡ããããã®åŸ
ã¡æéãæžãããCPUã®çšŒåçãé«ããããšãã§ããŸãããŸããSMTã¯ãCPUã®æ§èœãåäžã¹ã¬ããã®å Žåã«æ¯ã¹ãŠåäžããå ŽåããããŸãã
ãã ããSMTã¯ãã¹ãŠã®ã¢ããªã±ãŒã·ã§ã³ã«ãšã£ãŠå¹æçãšã¯éããŸãããSMTã¯ãè€æ°ã®ã¹ã¬ãããåæã«å®è¡ãããŠããå Žåã«éããCPUã®æ§èœãåäžããŸãããããã£ãŠãSMTã¯ãã«ãã¹ã¬ããã¢ããªã±ãŒã·ã§ã³ãåæã«è€æ°ã®ã¿ã¹ã¯ãå®è¡ããããšãã§ããã¢ããªã±ãŒã·ã§ã³ã§æãå¹æçã§ãã
SMTãæ¡çšããå
·äœçãªã¢ãŒããã¯ãã£ã«ã¯ã以äžã®ãããªãã®ããããŸãã
#'''Intelã®Hyper-Threading TechnologyïŒHT TechnologyïŒ''': Intelããã»ããµã§æ¡çšãããŠããSMTæè¡ã§ããHT Technologyã¯ã1ã€ã®ç©çã³ã¢å
ã§è€æ°ã®ã¹ã¬ãããåæã«å®è¡ããããšãã§ããŸããããã«ãããã·ã¹ãã å
šäœã®ã¹ã«ãŒããããåäžãããè² è·ã®é«ãã¿ã¹ã¯ãå¹ççã«åŠçããããšãå¯èœã§ãã
#'''AMDã®SMTïŒSimultaneous MultithreadingïŒ''': AMDããã»ããµã¯ãSMTãæ¡çšããŠããŸãããIntelã®Hyper-Threadingãšã¯ç°ãªãå®è£
æ¹æ³ãããŠããŸããAMDã®SMTã¯ãè€æ°ã®ã¹ã¬ããã1ã€ã®ç©ççãªã³ã¢ã§åæã«å®è¡ããããšã§ãæ§èœãæé©åããŠããŸãã
#'''IBM POWERããã»ããµã®SMT''': IBMã®POWERããã»ããµãSMTãå©çšããŠãããè€æ°ã®ã¹ã¬ãããåæã«å®è¡ããŠæ§èœãåäžãããŠããŸããIBMã®POWERã¢ãŒããã¯ãã£ã¯ãé«æ§èœãªã³ã³ãã¥ãŒãã£ã³ã°ããµãŒããŒåéã§äœ¿çšãããSMTã掻çšããŠåŠçèœåãæ倧åããŠããŸãã
ãããã®ã¢ãŒããã¯ãã£ã¯ãå瀟ãç¬èªã®æ¹æ³ã§SMTãå®è£
ããŠããã1ã€ã®ç©ççãªã³ã¢å
ã§è€æ°ã®ã¹ã¬ãããåæã«å®è¡ããããšã§ãå¹ççãªåŠçèœåãå®çŸããŠããŸããåããã»ããµã¯ãç°ãªãSMTã®å®è£
æ¹æ³ãæ§èœç¹æ§ãæã£ãŠãããããããã®ã¢ãŒããã¯ãã£ã«æé©åãããSMTãæ¡çšãããŠããŸãã
==== ãã¬ã«ããã»ããµãŒ ====
ãã¬ã«ããã»ããµãŒã¯ãCPUã®äžçš®ã§ãããå®è¡ã¹ã¬ããããµã€ã¯ã«ããšã«åãæ¿ããç¹æ§ãæã¡ãŸãããã®CPUèšèšææ³ã¯ãã亀äºé
眮ïŒinterleavedïŒããŸãã¯ã埮现ç²åºŠã®æåå²ãã«ãã¹ã¬ããã£ã³ã°ïŒfine-grained temporal multithreadingïŒããšããŠãç¥ãããŠããŸããçŸä»£ã®ã¹ãŒããŒã¹ã«ã©ãŒã¢ãŒããã¯ãã£ã®åæãã«ãã¹ã¬ããã£ã³ã°ãšã¯ç°ãªããäžè¬çã«è€æ°ã®åœä»€ã1ã€ã®ãµã€ã¯ã«ã§å®è¡ããããšã¯ãããŸããã
ããªãšã³ããã£ããªãã«ãã¿ã¹ãã³ã°ã®ããã«ãåå®è¡ã¹ã¬ããã«ã¯ç¬èªã®ããã°ã©ã ã«ãŠã³ã¿ãŒãããŒããŠã§ã¢ã¬ãžã¹ã¿ïŒåã¹ã¬ããã®ã¢ãŒããã¯ãã£ç¶æ
ïŒãå²ãåœãŠãããŸãããã¬ã«ããã»ããµãŒã¯ãåã¹ã¬ãããnãµã€ã¯ã«ããšã«1ã€ã®åœä»€ãå®è¡ããããšãä¿èšŒããŸããããã«å¯ŸããŠãéåžžã®ããªãšã³ããã£ããªãã«ãã¿ã¹ãã³ã°ãã·ã³ã¯ã1ã€ã®ã¹ã¬ãããæ°åäžãµã€ã¯ã«å®è¡ããäžæ¹ã§ãä»ã®ã¹ã¬ããã¯é çªãåŸ
ã€ããšãäžè¬çã§ãã
C-slowingãšåŒã°ããææ³ã¯ãåäžã®ã¿ã¹ã¯åŠçåããã»ããµãŒèšèšãã察å¿ãããã¬ã«ããã»ããµãŒèšèšãèªåçã«çæããŸãããã®æ¹æ³ã§çæãããn-wayãã¬ã«ããã»ããµãŒã¯ãå
ã®åäžã¿ã¹ã¯åŠçåããã»ããµãŒã®nåã®åå¥ã®ãã«ãããã»ãã·ã³ã°ã³ããŒã®ããã«æ©èœãããããããå
ã®é床ã®çŽ1/nã§åäœããŸãã
=== CPUã®åäœã¢ãŒããšå²ã蟌ã¿åŠç ===
CPUã«ã¯ããŠãŒã¶ãŒã¢ãŒããšã«ãŒãã«ã¢ãŒãã®2ã€ã®åäœã¢ãŒãããããŸãããŠãŒã¶ãŒã¢ãŒãã§ã¯ãäžè¬ãŠãŒã¶ãŒã䜿çšããã¢ããªã±ãŒã·ã§ã³ãå®è¡ãããŸããäžæ¹ãã«ãŒãã«ã¢ãŒãã§ã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãå®è¡ãããã·ã¹ãã ã®ç®¡çãä¿è·ãè¡ããŸããå²ã蟌ã¿åŠçã¯ãå€éšããã®ä¿¡å·ïŒå²ã蟌ã¿ïŒãçºçããå Žåã«ãCPUãçŸåšå®è¡ããŠããããã°ã©ã ãäžæåæ¢ããŠãå²ã蟌ã¿åŠçãå®è¡ããããšã§ãã
== ã¡ã¢ãªãŒã®æ§æãšåäœ ==
ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã«ãããã¡ã¢ãªãŒã¯ãããŒã¿ãããã°ã©ã ãä¿æããéèŠãªèŠçŽ ã§ããããã®ç« ã§ã¯ãã¡ã¢ãªãŒã®çš®é¡ãšéå±€æ§é ãã¡ã¢ãªãŒã¢ã¯ã»ã¹ã®æ¹æ³ãšé床ãããã³ãã£ãã·ã¥ã¡ã¢ãªãŒã®åçãšèšèšã«ã€ããŠèª¬æããã
=== ã¡ã¢ãªãŒã®çš®é¡ãšéå±€æ§é ===
ããDRAMã¯å€§å®¹éã®ã¡ã¢ãªãŒãšããŠäœ¿çšãããSRAMã¯é«éãªãã£ãã·ã¥ã¡ã¢ãªãŒãšããŠäœ¿çšããããã¡ã¢ãªãŒã¯ãéå±€çãªæ§é ãæã¡ãããé«éã§å°å®¹éã®ã¡ã¢ãªãŒãCPUã«è¿ããããäœéã§å€§å®¹éã®ã¡ã¢ãªãŒãé ãã«é
眮ãããã
=== ã¡ã¢ãªãŒã¢ã¯ã»ã¹ã®æ¹æ³ãšé床 ===
ã¡ã¢ãªãŒã¢ã¯ã»ã¹ã«ã¯ãçŽæ¥ã¢ã¯ã»ã¹ïŒã©ã³ãã ã¢ã¯ã»ã¹ïŒãšã·ãŒã±ã³ã·ã£ã«ã¢ã¯ã»ã¹ããããçŽæ¥ã¢ã¯ã»ã¹ã¯ãã©ã³ãã ã¢ã¯ã»ã¹ã¡ã¢ãªãŒïŒRAMïŒã§äœ¿çšãããäžè¬çãªã¢ã¯ã»ã¹æ¹æ³ã§ãããã¢ãã¬ã¹ãæå®ããŠçŽæ¥ã¢ã¯ã»ã¹ãããäžæ¹ãã·ãŒã±ã³ã·ã£ã«ã¢ã¯ã»ã¹ã¯ãããŒããç£æ°ãã£ã¹ã¯ãªã©ã®ã¹ãã¬ãŒãžã¡ãã£ã¢ã§äœ¿çšãããæ¹æ³ã§ãããé çªã«ã¢ã¯ã»ã¹ãããã¡ã¢ãªãŒã¢ã¯ã»ã¹é床ã¯ãã¢ã¯ã»ã¹æéãã¬ã€ãã³ã·ãŒãšåŒã°ãããã®ã§æž¬å®ããããã£ãã·ã¥ã¡ã¢ãªãŒãªã©ã®é«éãªã¡ã¢ãªãŒã¯ãããäœãã¢ã¯ã»ã¹æéãæã€ã
=== ãã£ãã·ã¥ã¡ã¢ãªãŒã®åçãšèšèš ===
ãã£ãã·ã¥ã¡ã¢ãªãŒã¯ãããé«éã§å°å®¹éã®ã¡ã¢ãªãŒã§ãããCPUã«è¿ãé
眮ãããããã£ãã·ã¥ã¡ã¢ãªãŒã¯ãæè¿ã¢ã¯ã»ã¹ãããããŒã¿ãä¿æããCPUãå床ã¢ã¯ã»ã¹ããå¯èœæ§ãé«ãå Žåã«ãé«éã«ã¢ã¯ã»ã¹ã§ããããã«ããããã£ãã·ã¥ã¡ã¢ãªãŒã¯ã2ã€ã®äž»èŠãªã¿ã€ãã§ãããçŽæ¥ããããã£ãã·ã¥ãšã»ããã¢ãœã·ã¢ãã£ããã£ãã·ã¥ã«åé¡ãããé©åãªèšèšãéèŠã§ããã
== å
¥åºåã·ã¹ãã ==
å
¥åºåã·ã¹ãã ã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®äžéšã§ãããã³ã³ãã¥ãŒã¿ãŒãšãŠãŒã¶ãŒãŸãã¯ä»ã®ããã€ã¹ãšã®éã®ããŒã¿è»¢éãæ
åœããŸãããã®ç« ã§ã¯ãå
¥åºåã·ã¹ãã ã®åºæ¬çãªèŠçŽ ã«çŠç¹ãåœãŠãŸãã
=== å
¥åºåããã€ã¹ã®çš®é¡ãšæ¥ç¶æ¹åŒ ===
å
¥åºåããã€ã¹ã¯ãããŒã¿ãåä¿¡ãŸãã¯éä¿¡ããããã«äœ¿çšãããæ©åšã§ããäŸãã°ãããŠã¹ãããŒããŒããããŒããã£ã¹ã¯ãããªã³ã¿ãã¹ããŒã«ãŒãªã©ãæããããŸãããããã®ããã€ã¹ã¯ãç°ãªãçš®é¡ã®æ¥ç¶æ¹åŒã䜿çšããŠãã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã«æ¥ç¶ãããŸããäŸãã°ãUSBãPS/2ãSerialãParallelãEthernetãªã©ã§ãã
=== å
¥åºåå¶åŸ¡æ¹åŒ ===
å
¥åºåå¶åŸ¡æ¹åŒã¯ãå
¥åºåããã€ã¹ãšã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®éã§ããŒã¿ã転éããããã«äœ¿çšãããŸããã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã¯ãããã°ã©ã ã«ãã£ãŠå¶åŸ¡ãããããã€ã¹ãã©ã€ãã䜿çšããŠãå
¥åºåå¶åŸ¡æ¹åŒãèšå®ããŸããäž»ãªå
¥åºåå¶åŸ¡æ¹åŒã«ã¯ãããã°ã©ã å¶åŸ¡ãããŒãªã³ã°å¶åŸ¡ãå²ã蟌ã¿å¶åŸ¡ããããŸãã
=== DMAã«ããé«éãªããŒã¿è»¢é ===
DMAã¯ãDirect Memory Accessã®ç¥èªã§ãå
¥åºåå¶åŸ¡æ¹åŒã®äžã€ã§ããDMAã䜿çšãããšãããã€ã¹ãšã¡ã¢ãªã®éã§ããŒã¿ã転éããããã«ãCPUã䜿çšããå¿
èŠããªããªããŸããããã«ãããCPUãä»ã®åŠçãå®è¡ã§ãããããããŒã¿è»¢éé床ãåäžããŸããDMAã«ãã£ãŠé«éãªããŒã¿è»¢éãå¯èœã«ãªãããããªãŒãã£ãªããããªãªã©ã®ãªã¢ã«ã¿ã€ã åŠçãå¿
èŠãªã¢ããªã±ãŒã·ã§ã³ã§ãã䜿çšãããŸãã
== ä»®æ³èšæ¶ãšä»®æ³ãã·ã³ ==
ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã«ãããŠãä»®æ³èšæ¶ãšä»®æ³ãã·ã³ã¯éåžžã«éèŠãªæŠå¿µã§ãã
ä»®æ³èšæ¶ã«ãã£ãŠã倧ããªããã°ã©ã ãå®è¡ããããšãå¯èœã«ãªããŸããããã°ã©ã ã¯ãç©çã¡ã¢ãªäžã«å¿
èŠãªéšåã ããããŒãããŠå®è¡ããå¿
èŠãªéšåã ããç©çã¡ã¢ãªããè£å©èšæ¶è£
眮ã«ã¹ã¯ããã¢ãŠãããããšãã§ããŸãããã®ããã«ããããšã§ãç©çã¡ã¢ãªã®å®¹é以äžã®ããã°ã©ã ãå®è¡ããããšãã§ããŸãã
ä»®æ³ãã·ã³ã¯ããœãããŠã§ã¢ã«ãã£ãŠç©çã³ã³ãã¥ãŒã¿ãŒãšåçã®æ©èœãå®çŸã§ããŸããç©çã³ã³ãã¥ãŒã¿ãŒã¯ãããã»ããµãã¡ã¢ãªãã¹ãã¬ãŒãžããã€ã¹ããããã¯ãŒã¯ã€ã³ã¿ãŒãã§ã€ã¹ãªã©ã®ããŒããŠã§ã¢ã§æ§æãããŠããŸããäžæ¹ãä»®æ³ãã·ã³ã¯ããœãããŠã§ã¢ã§ç©çã³ã³ãã¥ãŒã¿ãŒã®ããŒããŠã§ã¢ãåçŸããŸãã
ä»®æ³ãã·ã³ã«ã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãšã¢ããªã±ãŒã·ã§ã³ãå®è¡ããããã«å¿
èŠãªãã¹ãŠã®æ©èœãå«ãŸããŸãããããã®æ©èœã¯ãç©çã³ã³ãã¥ãŒã¿ãŒã®ããŒããŠã§ã¢ãšåçã®æ©èœãæäŸããŸããä»®æ³ãã·ã³ã¯ãã³ã³ãã¥ãŒã¿ãŒã®ãã¡ã€ã«ãšããŠååšããç©çã³ã³ãã¥ãŒã¿ãŒäžã§å®è¡ãããŸããç©çã³ã³ãã¥ãŒã¿ãŒã¯ãä»®æ³ãã·ã³ãšåæ§ã«åäœããä»®æ³ãã·ã³ã¯ç©çã³ã³ãã¥ãŒã¿ãŒãåçŸããããã«èšèšãããŠããŸãã
ä»®æ³ãã·ã³ã«ã¯å€ãã®å©ç¹ããããŸããäŸãã°ãã¢ããªã±ãŒã·ã§ã³ãç¹å®ã®ãã©ãããã©ãŒã ã«äŸåããå¿
èŠããªããªããŸããä»®æ³ãã·ã³ã¯ãæé©åãããæ§æã§ã¢ããªã±ãŒã·ã§ã³ãå®è¡ã§ãããããããå¹ççã«å®è¡ããããšãã§ããŸãããŸããä»®æ³åæè¡ã«ãã£ãŠè€æ°ã®ä»®æ³ãã·ã³ãåãç©çã³ã³ãã¥ãŒã¿ãŒäžã§å®è¡ããããšãã§ããŸãã
== ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®é²å ==
=== ããã»ããµã®æ§èœåäžã®æŽå² ===
ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®æç§æžã®ãããã»ããµã®æ§èœåäžã®æŽå²ãã®ç« ãæ¥æ¬èªã§å·çããŠãã ãããã³ã³ãã¯ãã«ããŠãã ãããä¿¡é Œã«è¶³ãæ
å ±æºãåºå
žãšããŠæåŸã«ç€ºããŠãã ããã
ããã»ããµã®æ§èœã¯ããã®æŽå²ã®äžã§åçãªåäžãéããŠããŸããããã®é²åã¯ãããã€ãã®äž»èŠãªæè¡é©æ°ã«ãã£ãŠå¯èœã«ãªããŸããã
æåã®ã³ã³ãã¥ãŒã¿ã¯ãåœä»€ã1ã€ãã€å®è¡ãããã·ã³ã°ã«ã¹ããªãŒã ã¢ãŒããã¯ãã£ããæ¡çšããŠããŸããããã®åŸããã€ãã©ã€ã³åŠçãã¹ãŒããŒã¹ã«ã©ãŒåŠçãããã³ãã«ãããã»ããµåŠçãªã©ã®æè¡ãç»å Žããæ§èœãé£èºçã«åäžãããŸããããŸããããé«éãªã¯ããã¯é床ããã£ãã·ã¥ã¡ã¢ãªãããã³æµ®åå°æ°ç¹æŒç®ãŠãããã®å®è£
ã倧ããªåœ¹å²ãæãããŸããã
ããããæ§èœã®åäžã«ã¯ç©ççãªéçããããŸããé«éãªã¯ããã¯é床ãå®çŸããããã«ã¯ãé«åºŠãªå·åŽæè¡ãå¿
èŠã§ããããã«ããšãã«ã®ãŒæ¶è²»éãå¢å ãããããçãšãã«ã®ãŒã®èŠæ±ãå¢ããŠããŸãã
ä»åŸã¯ãããå¹ççãªããã»ããµã¢ãŒããã¯ãã£ã®æ¢æ±ãæ°ããçŽ æãããã€ã¹ã®éçºãããã³äººå·¥ç¥èœãªã©ã®æ°ããåéã®èŠä»¶ã«å¯Ÿå¿ããããã®ç¹åãæ±ããããŸãã
åºå
žïŒJohn L. Hennessy, David A. Patterson. (2017). Computer Architecture: A Quantitative Approach. Sixth Edition.
== ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡š - é»åèšç®æ©ã®é²åããã©ã - ==
ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã¯ãã³ã³ãã¥ãŒã¿ãŒã®å
éšæ§é ãããŒã¿åŠçã®æ¹åŒã決ããèšèšã®ããšã§ããã
ãã®ã¢ãŒããã¯ãã£ãŒã¯ãæ代ãšãšãã«é²åãéããŠããã以äžã«ãã®å¹Žè¡šããŸãšããã
* 1945幎ïŒãžã§ã³ã»ãã©ã³ã»ãã€ãã³ã®ãEDVACå ±åæžããçºè¡šãããçŸä»£ã®ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®åºç€ãšãªãããã©ã³ã»ãã€ãã³ã¢ãŒããã¯ãã£ãŒããèªçããã
* 1951幎ïŒäžçåã®åçšã³ã³ãã¥ãŒã¿ãŒãUNIVAC Iããèªçããããã®ã³ã³ãã¥ãŒã¿ãŒã¯ãæ±çšæ§ããããè€æ°ã®ããã°ã©ã ãåŠçã§ããç¹åŸŽããã£ãã
* 1964幎ïŒIBMãã¡ã€ã³ãã¬ãŒã ã³ã³ãã¥ãŒã¿ãŒãSystem/360ããçºè¡šããããã®ã³ã³ãã¥ãŒã¿ãŒã¯ãç°ãªãèŠæš¡ãæ©èœã®ã³ã³ãã¥ãŒã¿ãŒãåããœãããŠã§ã¢ãå®è¡ã§ããããã«èšèšãããŠãããã³ã³ãã¥ãŒã¿ãŒã®æšæºåãä¿ãããšã«ãªã£ãã
* 1971幎ïŒã€ã³ãã«ããã€ã¯ãããã»ããµã4004ããçºè¡šãããããã¯ãã³ã³ãã¥ãŒã¿ãŒã®CPUã1ã€ã®ãããã«ãŸãšããäžçåã®è£œåã§ãã£ãã
* 1977幎ïŒAppleããApple IIããçºå£²ããå人çšã³ã³ãã¥ãŒã¿ãŒã®æ代ãå¹ãéããããã®ã³ã³ãã¥ãŒã¿ãŒã¯ãç°¡åãªæäœãšäºææ§ã®é«ãåšèŸºæ©åšãç¹åŸŽã§ãã£ãã
* 1981幎ïŒIBMããPC XTããçºå£²ããIBM PCäºææ©ãèªçãããããã«ãããæ§ã
ãªã¡ãŒã«ãŒãIBM PCäºææ©ãçç£ããããã«ãªããããŒãœãã«ã³ã³ãã¥ãŒã¿ãŒã®æ®åãé²ãã ã
* 1991幎ïŒãã€ã¯ããœããããWindows 3.0ããçºå£²ããã°ã©ãã£ã«ã«ãªã€ã³ã¿ãŒãã§ãŒã¹ãäžè¬çã«ãªã£ãã
* 2001幎ïŒã¢ããã«ããiPodããçºå£²ããããŒã¿ãã«é³æ¥œãã¬ã€ã€ãŒåžå Žãåžå·»ããã
* 2007幎ïŒã¢ããã«ããiPhoneããçºå£²ããã¹ããŒããã©ã³åžå Žã倧ããå€é©ããããiPhoneã¯ãåŸæ¥ã®æºåž¯é»è©±ãšã¯ç°ãªãã倧ç»é¢ã»ã¿ããã¹ã¯ãªãŒã³ã»ã¢ããªã±ãŒã·ã§ã³ã®å©çšãªã©ã®æ°æ©èœãæã¡ãæ°ããã¹ããŒããã©ã³åžå Žãç¯ããã
* 2010幎ïŒã¢ããã«ããiPadããçºå£²ããã¿ãã¬ããåžå ŽãçœåŒãããiPadã¯ã軜éã§æã¡éã³ã容æã§ãããã¿ããã¹ã¯ãªãŒã³ã§ã®çŽæçãªæäœãã§ããããšãç¹åŸŽã§ããã
* 2011幎ïŒã°ãŒã°ã«ããChromebookããçºå£²ããã¯ã©ãŠãã³ã³ãã¥ãŒãã£ã³ã°ã®æ®åãä¿ãããChromebookã¯ãã€ã³ã¿ãŒãããã«æ¥ç¶ããããšã§ãã¯ã©ãŠãäžã®ã¢ããªã±ãŒã·ã§ã³ãããŒã¿ãå©çšã§ããã³ã³ãã¥ãŒã¿ãŒã§ããã
* 2015幎ïŒãã€ã¯ããœããããWindows 10ããçºå£²ããWindowsã®æ°ããããŒãžã§ã³ãç»å ŽãããWindows 10ã¯ãåŸæ¥ã®Windowsã«æ¯ã¹ãŠäœ¿ãããããã»ãã¥ãªãã£æ§ãåäžããŠãããå€ãã®ãŠãŒã¶ãŒã«æ¯æãããŠããã
* 2020幎代ïŒAIæè¡ã®é²åã«ãããã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã¯å€§ããªå€é©ãè¿ããããšãæåŸ
ãããŠãããäŸãã°ã深局åŠç¿ãçšãããã¥ãŒã©ã«ãããã¯ãŒã¯ããé«åºŠãªç»åèªèãèªç¶èšèªåŠçãªã©ã®åéã§æŽ»çšãããŠããããããã®æè¡ããŸããŸãé²åããããšã§ãã³ã³ãã¥ãŒã¿ãŒã®æ§èœãé£èºçã«åäžããå¯èœæ§ãããããŸããã¯ã©ãŠãã³ã³ãã¥ãŒãã£ã³ã°ãéåã³ã³ãã¥ãŒãã£ã³ã°ãªã©ãæ°ããåéã§ãé²åãæåŸ
ãããŠããã
==== ãã©ã³ã»ãã€ãã³ã¢ãŒããã¯ãã£ãŒ ====
ãã©ã³ã»ãã€ãã³ã¢ãŒããã¯ãã£ãŒã¯ãçŸä»£ã®ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®åºç€ãšãªã£ãŠããèšèšåçã®äžã€ã§ãããã®ã¢ãŒããã¯ãã£ãŒã¯ãã³ã³ãã¥ãŒã¿ãŒã®ããã°ã©ã ãšããŒã¿ãåãã¡ã¢ãªç©ºéã«æ ŒçŽããããã°ã©ã ãšããŒã¿ãåãããã«æ±ãããšãã§ããŸãããŸããããã°ã©ã ãå€æŽããããšã§ãã³ã³ãã¥ãŒã¿ãŒãå®è¡ããã¿ã¹ã¯ãç°¡åã«å€æŽã§ããŸãã
ãã©ã³ã»ãã€ãã³ã¢ãŒããã¯ãã£ãŒã¯ã1945幎ã«ãžã§ã³ã»ãã©ã³ã»ãã€ãã³ã«ãã£ãŠæå±ãããEDVACã³ã³ãã¥ãŒã¿ãŒã®èšèšã«äœ¿çšãããŸããããã®åŸãå€ãã®ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒããã®èšèšåçã«åºã¥ããŠéçºãããçŸä»£ã®ã³ã³ãã¥ãŒã¿ãŒã«è³ããŸã§åœ±é¿ãäžããŠããŸãã
åºå
ž:A.S. Tanenbaum and H. Bos, "Computer Organization and Architecture: Designing for Performance," Pearson, 2006.
=== é»ææ ===
ã³ã³ãã¥ãŒã¿ãŒã®æŽå²ãæ¯ãè¿ããšãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®çºå±ããã®é²åã®äžå¿ã«ãªã£ãŠããŸããã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒãšã¯ãã³ã³ãã¥ãŒã¿ãŒã®æ§é ãšèšèšã®ããšã§ãããã³ã³ãã¥ãŒã¿ãŒãã©ã®ããã«åäœãããã«å€§ãã圱é¿ãäžããŸãããã®èšäºã§ã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®é»ææãæ¯ãè¿ãããã®çºå±ãè¿œããŸãã
* 1940幎代ã«å§ãŸã£ãã³ã³ãã¥ãŒã¿ãŒã®éçºã¯ãåœåã¯å€§èŠæš¡ã§é«äŸ¡ãªé»åæ©æ¢°ã§ããããã®ææã«ã¯ãåæã®ã³ã³ãã¥ãŒã¿ãŒã®èšèšãšã¢ãŒããã¯ãã£ãŒã確ç«ãããŸããã1941幎ã«ã¯ãAtanasoff-Berryã³ã³ãã¥ãŒã¿ãŒãåããŠäœãããŸããããã®ã³ã³ãã¥ãŒã¿ãŒã¯ãäºé²æ³ãšç空管ã䜿çšããŠããŸããã
ãã®åŸã1943幎ã«ENIACãéçºãããŸãããENIACã¯ã倧èŠæš¡ãªç空管ã䜿çšããŠãããããéåžžã«é«äŸ¡ã§ããã巚倧ã§ãã£ããENIACã¯ãããã°ã©ã ãããã°ã©ã ããã«ããæåã§å
¥åããå¿
èŠããããŸããããã®ããšããããã°ã©ãã³ã°ãéåžžã«å°é£ã§ãã£ãåå ã®äžã€ã§ãã
1950幎代ã«ãªããšãã³ã³ãã¥ãŒã¿ãŒã¯åŸã
ã«å°ååããããã©ã³ãžã¹ã¿ãŒæè¡ãå°å
¥ãããŸããããã©ã³ãžã¹ã¿ãŒæè¡ã¯ãç空管ã«æ¯ã¹ãŠå°åã§ä¿¡é Œæ§ãé«ããã³ã³ãã¥ãŒã¿ãŒã®èšèšãšã¢ãŒããã¯ãã£ãŒã«å€§ããªåœ±é¿ãäžããŸããã
1956幎ã«ã¯ãIBMãæåã®ãã£ã¹ã¯ãã©ã€ããçºå£²ããŸãããããã¯ã倧éã®ããŒã¿ãæ ŒçŽããé«éã«ã¢ã¯ã»ã¹ã§ããããã«ãªããŸããããŸããåã幎ã«ã¯ãFORTRANãšããæåã®é«æ°Žæºããã°ã©ãã³ã°èšèªãéçºãããŸãããããã«ãããããã°ã©ããŒã¯ããã°ã©ã ãããå¹ççã«éçºããããšãã§ããããã«ãªããŸããã
1960幎代ã«ã¯ãã³ã³ãã¥ãŒã¿ãŒã®ã¢ãŒããã¯ãã£ãŒãæŽã«é²åããŸãããIBM System/360ã¯ã倧èŠæš¡ãªã³ã³ãã¥ãŒã¿ãŒåžå Žã«åå
¥ããå瀟ã®æåãæ¯ããŸããããã®ææã«ã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãéçºãããã³ã³ãã¥ãŒã¿ãŒã®æäœæ§ãåäžããŸããã
=== ã¡ã€ã³ãã¬ãŒã ===
ã³ã³ãã¥ãŒã¿ãŒã®æŽå²ã«ãããŠãã¡ã€ã³ãã¬ãŒã ã¯éèŠãªäœçœ®ãå ããŠããŸããã¡ã€ã³ãã¬ãŒã ã¯ãèšå€§ãªããŒã¿åŠçãå¯èœã«ããé«æ§èœã³ã³ãã¥ãŒã¿ãŒã§ãããããžãã¹ãç£æ¥åéã§åºã䜿çšãããŠããŸããããã§ã¯ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒå¹Žè¡šã«ã€ããŠãã¡ã€ã³ãã¬ãŒã ã®æŽå²ãçŽè§£ããŠã¿ãŸãããã
* 1950幎代
1950幎代ã«ã¯ãåæã®ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒãéçºãããŸãããIBMã®æåã®ã¡ã€ã³ãã¬ãŒã ã³ã³ãã¥ãŒã¿ãŒã§ããIBM 700ã·ãªãŒãºã¯ã1952幎ã«ãªãªãŒã¹ãããŸãããããã¯ãç£æ°ã³ã¢ã¡ã¢ãªã䜿çšããåæã®ã³ã³ãã¥ãŒã¿ãŒã®äžäŸã§ãã
* 1960幎代
1960幎代ã«ã¯ãã¡ã€ã³ãã¬ãŒã ã®æ§èœãšæ©èœãåäžããŸãããIBM System/360ã¯ã1964幎ã«ãªãªãŒã¹ãããIBMã®ã¡ã€ã³ãã¬ãŒã åžå Žã«ãããæ¯é
çãªå°äœã確ç«ããŸãããSystem/360ã¯ãç°ãªãããã»ããµãŒãåšèŸºæ©åšã䜿çšããè€æ°ã®ã¢ãã«ã§æ§æãããéåžžã«æ¡åŒµæ§ãé«ãããšãç¹åŸŽã§ããã
* 1970幎代
1970幎代ã«ã¯ãã¡ã€ã³ãã¬ãŒã ã®æ§èœã倧å¹
ã«åäžããé«åºŠãªæäœã·ã¹ãã ãã¢ããªã±ãŒã·ã§ã³ãéçºãããŸããããŸãããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®æšæºåãé²ã¿ãIBMã¯OS/VS1ãOS/VS2ãšãã£ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ããªãªãŒã¹ããŸããã
* 1980幎代
1980幎代ã«ã¯ãã¡ã€ã³ãã¬ãŒã ã¯äž»ã«ããžãã¹çšéã«äœ¿çšãããããã«ãªããŸãããIBMã¯ãSystem/370ããã³System/390ããªãªãŒã¹ããé«åºŠãªã»ãã¥ãªãã£æ©èœãããŒã¿ããŒã¹ã·ã¹ãã ãè¿œå ããŸããã
* 1990幎代以é
1990幎代以éãã¡ã€ã³ãã¬ãŒã ã¯ãã€ã³ã¿ãŒããããã¯ã©ãŠãã³ã³ãã¥ãŒãã£ã³ã°ãªã©ã®æ°ããæè¡ãšãšãã«é²åããŸãããIBMã¯ãSystem zã·ãªãŒãºããªãªãŒã¹ããããžãã¹ãéèæ©é¢ãªã©ã§åºã䜿çšãããŠããŸãã
ã¡ã€ã³ãã¬ãŒã ã¯ãããŒã¿åŠçããã©ã³ã¶ã¯ã·ã§ã³åŠçãªã©ã®éèŠãªæ¥åã«å¿
èŠãªé«æ§èœãªã³ã³ãã¥ãŒã¿ãŒã§ããã¡ã€ã³ãã¬ãŒã ã¯ãããžãã¹ãç£æ¥åéã§åºã䜿ãããŠããã倧éã®ããŒã¿ãåŠçããããšãã§ããŸãããŸããé«åºŠãªã»ãã¥ãªãã£æ©èœãå¯çšæ§ã®é«ããæ±ããããæ¥åã«ã察å¿ã§ããŸãã
çŸåšã§ã¯ãã¯ã©ãŠãã³ã³ãã¥ãŒãã£ã³ã°ãããã°ããŒã¿è§£æãªã©ã®åéã«ãããŠããã¡ã€ã³ãã¬ãŒã ã¯éèŠãªåœ¹å²ãæ
ã£ãŠããŸããã¡ã€ã³ãã¬ãŒã ã¯ããšã³ã¿ãŒãã©ã€ãºã·ã¹ãã ã®äžå¿çãªåœ¹å²ãæãããããžãã¹ã®åºç€ãšãªãéèŠãªã€ã³ãã©ã¹ãã©ã¯ãã£ãŒãšããŠäžå¯æ¬ ã§ãã
ä»åŸããã¡ã€ã³ãã¬ãŒã ã¯æ°ããæè¡ãããŒãºã«åãããŠé²åãç¶ããããžãã¹ãç£æ¥åéã®çºå±ã«è²¢ç®ããŠããããšãæåŸ
ãããŠããŸãã
=== IBM System/360 ===
1964幎ãIBMã¯System/360ãçºè¡šããŸãããããã¯ãåäžã®ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãããŒã¹ã«ãç°ãªããµã€ãºãé床ã®æ©çš®ã補é ã§ããããã«ãããã®ã§ãããSystem/360ã¯ããããŸã§ã®IBMã®ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ãšã¯å
šãç°ãªããã®ã§ãããæ¥çã«å€§ããªåœ±é¿ãäžããŸããã
ãã®åŸãIBMã¯System/370ãSystem/390ãzSeriesããããŠçŸåšã¯IBM Zãšããååã§ç¥ããããé·ãã·ãªãŒãºã®ã¡ã€ã³ãã¬ãŒã ã³ã³ãã¥ãŒã¿ãŒãçºè¡šããŠããŸããããããã®ã·ã¹ãã ã¯ãæåã®System/360ãšäºææ§ãããããŸããæ°ããæè¡ãæ©èœãè¿œå ãããçŸä»£ã®ããžãã¹ãç§åŠæè¡ã«å¯Ÿå¿ã§ããããã«ãªã£ãŠããŸãã
1980幎代ã«ã¯ãIBM以å€ã®äŒæ¥ãIBMäºææ©ã®è£œé ãéå§ããŸããããããã®è£œåã¯ãIBMã®ã·ã¹ãã ãšäºææ§ããããäœã³ã¹ãã§æäŸãããŠããŸãããããã«ãããããžãã¹ãæ¿åºæ©é¢ãªã©ãå€ãã®çµç¹ãIBMäºææ©ãå°å
¥ããã¡ã€ã³ãã¬ãŒã åžå Žãæ¡å€§ããŸããã
çŸåšãIBM Zã¯ãé«ãã»ãã¥ãªãã£ãšä¿¡é Œæ§ãæäŸããããã«ãããžãã¹ãéèæ©é¢ãæ¿åºæ©é¢ããããŠç§åŠæè¡ã®åéã§åºãå©çšãããŠããŸãããŸããIBM Zã¯ããªãŒãã³ãœãŒã¹ãã¯ã©ãŠãã³ã³ãã¥ãŒãã£ã³ã°ã®æè¡ãçµ±åããããšã§ãçŸä»£ã®ã¢ããªã±ãŒã·ã§ã³éçºãããŒã¿åæã®ããŒãºã«ã察å¿ã§ããããã«ãªã£ãŠããŸãã
IBMã®ã¡ã€ã³ãã¬ãŒã ã³ã³ãã¥ãŒã¿ãŒã¯ãã³ã³ãã¥ãŒã¿ãŒã®æŽå²ã«ãããŠéèŠãªäœçœ®ãå ããŠããŸãããã®é²åãè¿œãããšã§ãããžãã¹ãç§åŠæè¡ãã©ã®ããã«é²åããŠããããç解ããããšãã§ããŸãã
=== ãããŒã¹ ===
1951幎ãã¢ã¡ãªã«åè¡åœã®é»åæ©åšã¡ãŒã«ãŒãBurroughs CorporationïŒãããŒã¹ç€ŸïŒã¯ãæåã®åçšé»ååŒããžã¿ã«ã³ã³ãã¥ãŒã¿ãŒã§ããB5000ãçºå£²ããŸãããB5000ã¯ãããŒããŠã§ã¢ãšãœãããŠã§ã¢ãå¯æ¥ã«çµ±åãããæåã®ã³ã³ãã¥ãŒã¿ãŒã§ããããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã«å¯ŸããŠé«ãä¿¡é Œæ§ãšã»ãã¥ãªãã£ãæäŸããŸããããã®é©æ°çãªã¢ãŒããã¯ãã£ã¯ãæ±çšçãªã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãšã¯ç°ãªããããã°ã©ã ãå®è¡ãããéã«ããŒããŠã§ã¢ãèªåçã«å®è¡ç°å¢ãèšå®ãããšããç¹åŸŽãæã¡ãŸãã
B5000ã®æåã«ç¶ããŠããããŒã¹ç€Ÿã¯1961幎ã«B5500ãçºå£²ããŸããããã®ã³ã³ãã¥ãŒã¿ãŒã¯ãB5000ã®ã¢ãŒããã¯ãã£ãç¶æ¿ãã€ã€ãããé«éãªåŠçé床ãå®çŸãã倧容éã®å€éšèšæ¶è£
眮ããµããŒãããŸããããŸãããããŒã¹ç€Ÿã¯1964幎ã«B6700ãçºå£²ããããã¯B5500ã®æ¡åŒµçã§ãããããé«éãªåŠçé床ãšå€§å®¹éã®èšæ¶è£
眮ãå®çŸããŸããã
1970幎代ã«å
¥ããšããããŒã¹ç€Ÿã¯ã¡ã€ã³ãã¬ãŒã ã³ã³ãã¥ãŒã¿ãŒåžå Žã§ç«¶åä»ç€Ÿãšæ¿ãã競åããŸããããã®äžã§ãã1976幎ã«çºå£²ãããB7700ã¯ãæ¥çæšæºã®ã¡ã€ã³ãã¬ãŒã ã³ã³ãã¥ãŒã¿ãŒã®ã¹ããã¯ãæã£ãŠããŸãããããã«ãB7800ã¯ãé«åºŠãªãã«ãããã»ããµãŒã¢ãŒããã¯ãã£ãæ¡çšããŠãããè€æ°ã®ããã»ããµãŒãåæã«å®è¡ããããšãã§ããŸããã
ãããã1980幎代ã«å
¥ããšããããŒã¹ç€Ÿã¯IBMãDECãªã©ã®ç«¶åä»ç€Ÿãšã®ç«¶äºã«è² ããã¡ã€ã³ãã¬ãŒã åžå Žããæ€éããŸããããã®åŸããããŒã¹ç€Ÿã¯UNIXããŒã¹ã®ãµãŒããŒè£œåãçºå£²ããçµå¶æŠç¥ã転æããŸããã1990幎代ã«å
¥ããšããããŒã¹ç€Ÿã¯ãšã¬ã¯ããããã¯ã»ããŒã¿ã»ã·ã¹ãã ïŒEDSïŒã«è²·åããããã®åŸã¯ãŠãã·ã¹ãšå䜵ããŸããã
ãããŒã¹ç€Ÿã®ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ã¯ãçŸä»£ã®ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ã®é²åã«å€å€§ãªåœ±é¿ãäžããŸãããç¹ã«B5000ã®ã¢ãŒããã¯ãã£ã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãšã®å¯æ¥ãªçµ±åã«ãã£ãŠé«ãä¿¡é Œæ§ãšã»ãã¥ãªãã£ãæäŸãããšããç¹ã§é©æ°çã§ããããã®åŸã®ã³ã³ãã¥ãŒã¿ãŒèšèšã«å€§ããªåœ±é¿ãäžããŸããããŸããB5000ã®ã¢ãŒããã¯ãã£ã«ãããããŒããŠã§ã¢ãèªåçã«å®è¡ç°å¢ãèšå®ããç¹åŸŽã¯ãçŸä»£ã®ã³ã³ãã¥ãŒã¿ãŒã®ä»®æ³åæè¡ã®åºç€ãšãªã£ãŠããŸãã
ããã«ãB5000ã®ã¢ãŒããã¯ãã£ã¯ãé«æ°ŽæºèšèªïŒé«çŽèšèªïŒãå©çšããããšãåæãšããŠãããããã°ã©ã ã®éçºå¹çã倧å¹
ã«åäžãããŸãããããã«ãããããã°ã©ããŒã¯ããé«ãæœè±¡åã¬ãã«ã§ããã°ã©ãã³ã°ãè¡ãããšãã§ããããã°ã©ã ã®å¯èªæ§ãä¿å®æ§ãåäžããŸããã
ãããŒã¹ç€Ÿã®ã³ã³ãã¥ãŒã¿ãŒèšèšã¯ãçŸä»£ã®ã³ã³ãã¥ãŒã¿ãŒç£æ¥ã«ãããŠå€§ããªåœ¹å²ãæãããŸããããã®ã¢ãŒããã¯ãã£ã¯ãã³ã³ãã¥ãŒã¿ãŒã®ä¿¡é Œæ§ãšã»ãã¥ãªãã£ãé«æ°Žæºèšèªã®å©çšãä»®æ³åæè¡ãªã©ãçŸä»£ã®ã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®åºç€ãšãªã£ãŠããŸãã
=== ããã³ã³ãã¥ãŒã¿ãŒ ===
ããã³ã³ãã¥ãŒã¿ãŒã¯ã1960幎代ãã1980幎代ã«ãããŠãäž»ã«äžå°èŠæš¡ã®äŒæ¥ãç 究æ©é¢ã§åºãå©çšãããã³ã³ãã¥ãŒã¿ãŒã®äžçš®ã§ããåœæã®ã¡ã€ã³ãã¬ãŒã ã³ã³ãã¥ãŒã¿ãŒãšæ¯èŒããŠãæ¯èŒçå°åã§å®äŸ¡ãªããšãç¹åŸŽã§ãããããã§ã¯ãããã³ã³ãã¥ãŒã¿ãŒã®çºå±ãšæŽå²ããäž»ãªæ©çš®ãšãšãã«å¹Žè¡šåœ¢åŒã§çŽ¹ä»ããŸãã
* 1960幎代
** 1960幎ïŒããžã¿ã«ã»ã€ã¯ã€ããã¡ã³ãã»ã³ãŒãã¬ãŒã·ã§ã³ (DEC) 瀟ããPDP-1ãçºè¡šãäžçåã®ããã³ã³ãã¥ãŒã¿ãŒã®1ã€ã
** 1964幎ïŒDEC瀟ãPDP-8ãçºè¡šãPDP-1ãããå°åã§ã10,000ãã«ä»¥äžã®äŸ¡æ Œã§è²©å£²ãããã
** 1965幎ïŒIBM瀟ãSystem/3ãçºè¡šãå°èŠæš¡äŒæ¥åãã®ããã³ã³ãã¥ãŒã¿ãŒãšããŠã¯åããŠã®è£œåã
* 1970幎代
** 1970幎ïŒDEC瀟ãPDP-11ãçºè¡šãåŸã«ãVAXã·ãªãŒãºã«çºå±ããã
** 1972幎ïŒãã¥ãŒã¬ããã»ããã«ãŒã (HP) 瀟ãHP 3000ãçºè¡šãå€ãã®äŒæ¥ã§å©çšãããã
** 1974幎ïŒData General瀟ãNovaãçºè¡šãPDP-11ãšç«¶åãã補åãšããŠäººæ°ãåããã
** 1975幎ïŒDEC瀟ãVAX-11/780ãçºè¡šãDECã®æãæåãã補åã®1ã€ãšãªãã
** 1978幎ïŒHP瀟ãHP 9000ãçºè¡šãUnixãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãæ¡çšããåŸã«HP-UXãšãªãã
* 1980幎代
** 1982幎ïŒCompaq瀟ãPortableãçºè¡šãæåã®IBM PCäºææ©ã®1ã€ãšããŠãç¥ãããŠããã
** 1983幎ïŒApple瀟ãLisaãçºè¡šãGUIãæèŒããæåã®åçšã¯ãŒã¯ã¹ããŒã·ã§ã³ã®1ã€ã
** 1985幎ïŒDEC瀟ãVAX-9000ãçºè¡šãæ倧4,000äžãã€ãã®ã¡ã¢ãªãŒãæèŒããæ倧8,000äžåœä»€/ç§ã®åŠçé床ãå®çŸããã
** 1987幎ïŒSun Microsystems瀟ãSPARCstation 1ãçºè¡šãUNIXã¯ãŒã¯ã¹ããŒã·ã§ã³ãšããŠå€§ããªæåãåããã
=== DEC ===
1960幎代ãã1980幎代ã«ãããŠãDECïŒDigital Equipment CorporationïŒã¯ã³ã³ãã¥ãŒã¿ã®äž»èŠãªè£œé äŒæ¥ã®1ã€ã§ããã圌ãã¯PDPïŒProgrammed Data ProcessorïŒã·ãªãŒãºã®å°åã³ã³ãã¥ãŒã¿ãéçºããVAXïŒVirtual Address eXtensionïŒã¢ãŒããã¯ãã£ã䜿çšãã倧åã³ã³ãã¥ãŒã¿ã補é ããŸããããããã®ã·ã¹ãã ã¯ãç§åŠãå·¥åŠãããžãã¹ãããã³æ¿åºã®å€ãã®åéã§äœ¿çšãããŸããã
1960幎代åŸåã«ã¯ãDECã¯PDP-8ãšåŒã°ããæåã®å°åã³ã³ãã¥ãŒã¿ãéçºããŸããããã®ã³ã³ãã¥ãŒã¿ã¯ãããã°ã©ã ãå®è¡ããããã«åœä»€ã解éãããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãå¿
èŠãšããŸããã§ããã1970幎代åé ã«ã¯ãããé«éãªPDP-11ãç»å Žãããã®ã³ã³ãã¥ãŒã¿ã¯ãã¡ã¢ãªã¢ã¯ã»ã¹ãšI/Oæäœã«ãããŠå€§å¹
ãªæ¹åãå®çŸããŸããã
1977幎ã«ã¯ãDECã¯VAXã·ãªãŒãºã®æåã®ã³ã³ãã¥ãŒã¿ãVAX-11/780ããªãªãŒã¹ããŸãããããã¯ã32ãããã®ä»®æ³ã¢ãã¬ã¹ç©ºéãæã€æåã®ã³ã³ãã¥ãŒã¿ã§ãããDECã®äž»å補åãšããŠé·å¹Žã«ããã£ãŠè²©å£²ãããŸãããVAXã¢ãŒããã¯ãã£ã¯ãã³ã³ãã¥ãŒã¿ã®é«æ§èœãšæ¡åŒµæ§ãè¿œæ±ããããã«èšèšãããå€ãã®å Žåã倧åŠãç 究æ©é¢ãæ¿åºæ©é¢ãªã©ã®å€§èŠæš¡ãªã³ã³ãã¥ãŒã¿ç°å¢ã§äœ¿çšãããŸããã
;åèæç®ïŒ
:"DEC PDP/VAX" in Computer Architecture: A Quantitative Approach, Fifth Edition by John L. Hennessy and David A. Patterson, pp. 87-88.
=== ãã€ã¯ãããã»ããµãŒ ===
ãã€ã¯ãããã»ããµãŒã¯ãçŸä»£ã®ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã«ãããŠæ¬ ãããªãæè¡ã®äžã€ã§ãã1971幎ã«ã€ã³ãã«ç€Ÿãçºè¡šãã4004ãç®åãã«ããã®åŸãæ§ã
ãªã¡ãŒã«ãŒããå€ãã®ãã€ã¯ãããã»ããµãŒãçºå£²ãããã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®æ§èœåäžãã³ã¹ãåæžã«å€§ããè²¢ç®ããŠããŸãããããã§ã¯ããã€ã¯ãããã»ããµãŒã®æŽå²ãæ¯ãè¿ãã€ã€ãã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®é²åãèŠãŠãããŸãã
* 1971幎ïŒã€ã³ãã«ç€Ÿã4ãããã®ãã€ã¯ãããã»ããµãŒã4004ããçºè¡šãåœæã¯èšç®æ©ã®å¶åŸ¡è£
眮ãªã©ã«çšããããæèšãé»åãªã©ã®å°åæ©åšã«ã䜿ãããŸããã
* 1972幎ïŒã€ã³ãã«ç€Ÿã4004ã®åŸç¶æ©çš®ãšããŠã8ãããã®ãã€ã¯ãããã»ããµãŒã8008ããçºè¡šãåœæã¯ã¡ã€ã³ãã¬ãŒã ãããã³ã³ãã¥ãŒã¿ãŒã«çšããããããšãå€ãã£ãã
* 1974幎ïŒã€ã³ãã«ç€Ÿã8008ã®åŸç¶æ©çš®ãšããŠã8ãããã®ãã€ã¯ãããã»ããµãŒã8080ããçºè¡šãåœæã¯ãå€ãã®ããŒãœãã«ã³ã³ãã¥ãŒã¿ãŒã«æ¡çšãããŸããã
* 1978幎ïŒã€ã³ãã«ç€Ÿã16ãããã®ãã€ã¯ãããã»ããµãŒã8086ããçºè¡šãIBM瀟ã®ããŒãœãã«ã³ã³ãã¥ãŒã¿ãŒãPCãã«æ¡çšãããåŸã«ãPC/ATãã§äœ¿ãããã80286ããã80386ããªã©ã®CPUãã8086ãåºæ¬ãšããŠéçºãããŸããã
* 1985幎ïŒã€ã³ãã«ç€Ÿã32ãããã®ãã€ã¯ãããã»ããµãŒã80386ããçºè¡šãé«éã§è€éãªèšç®ãè¡ãããšãã§ããã°ã©ãã£ãã¯ã¹åŠçããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®åŠçé床åäžã«è²¢ç®ããŸããã
* 1993幎ïŒã€ã³ãã«ç€Ÿã32ãããã®ãã€ã¯ãããã»ããµãŒãPentiumããçºè¡šãæµ®åå°æ°ç¹æŒç®ã«ç¹åããèšèšã§ãåœæã®é«éåŠçãå¿
èŠãšããã¢ããªã±ãŒã·ã§ã³ã«å€§ããªåœ±é¿ãäžããŸããã
* 2003幎ïŒã€ã³ãã«ç€Ÿã64ãããã®ãã€ã¯ãããã»ããµãŒãIntel 64ããçºè¡šãããã¯x86ã¢ãŒããã¯ãã£ã®64ãããçã§ããã倧容éã®ã¡ã¢ãªãé«éãªããŒã¿åŠçãå¯èœã«ãªããŸããã
* 2011幎ïŒARM瀟ãCortex-A15ãçºè¡šãããã¯ã¹ããŒããã©ã³ãã¿ãã¬ãããªã©ã®ã¢ãã€ã«ããã€ã¹åãã«éçºããããé«æ§èœãªãã€ã¯ãããã»ããµãŒã§ãããCortex-A15ã¯ãåœæã®ã¹ããŒããã©ã³ã«æ¯ã¹ãŠæ°åã®æ§èœãçºæ®ããŸããã
* 2015幎ïŒã€ã³ãã«ç€Ÿã6äžä»£ç®ã®Coreããã»ããµãŒãSkylakeããçºè¡šãããã¯ãããœã³ã³ã®æ§èœã倧å¹
ã«åäžãããããã®ã¢ãŒããã¯ãã£ãŒã§ãããé«éãªåŠçèœåãçé»ååãå³ãããŸããã
* 2020幎ïŒã¢ããã«ç€ŸãM1ããããçºè¡šãããã¯ãMacBookã·ãªãŒãºã«æ¡çšããããARMã¢ãŒããã¯ãã£ãŒã®ãã€ã¯ãããã»ããµãŒã§ãããé«éã§çé»åãªåŠçèœåããã¢ããªã±ãŒã·ã§ã³ã®é«éèµ·åãå¯èœã«ãªãã泚ç®ãéããŸããã
=== X86/AMD64 ===
ãã€ã¯ãããã»ããµã¯ãçŸä»£ã®ã³ã³ãã¥ãŒã¿ã«æ¬ ãããªãéšåã®äžã€ã§ãããã®äžã§ãX86/X64ã¢ãŒããã¯ãã£ã¯ãããŒãœãã«ã³ã³ãã¥ãŒã¿ããµãŒããŒãªã©ãå¹
åºãåéã§äœ¿çšãããŠããŸããä»åã¯ãX86/X64ã¢ãŒããã¯ãã£ã®ãã€ã¯ãããã»ããµã«ã€ããŠã幎衚圢åŒã§çŽ¹ä»ããŸãã
* 1978幎ïŒIntel 8086/8088ïŒX86ã¢ãŒããã¯ãã£ã®æåã®ãã€ã¯ãããã»ããµã§ããã16ãããã®ããã»ããµã§ãããIBM PCãªã©ãåæã®ããŒãœãã«ã³ã³ãã¥ãŒã¿ã«äœ¿çšãããŸããã
* 1982幎ïŒIntel 80286ïŒX86ã¢ãŒããã¯ãã£ã®2çªç®ã®ãã€ã¯ãããã»ããµã§ããã16ãããã®ããã»ããµã§ããã8MHzã§åäœãã1MBã®ç©çã¡ã¢ãªã«ã¢ã¯ã»ã¹å¯èœã§ããã
* 1985幎ïŒIntel 80386ïŒX86ã¢ãŒããã¯ãã£ã®3çªç®ã®ãã€ã¯ãããã»ããµã§ããã32ãããã®ããã»ããµã§ããã16MHzã§åäœãã4GBã®ç©çã¡ã¢ãªã«ã¢ã¯ã»ã¹å¯èœã§ãããä»®æ³86ã¢ãŒããªã©ãå€ãã®æ©èœãè¿œå ãããŸããã
* 1993幎ïŒIntel PentiumïŒX86ã¢ãŒããã¯ãã£ã®5çªç®ã®ãã€ã¯ãããã»ããµã§ãããæåã®ã¹ãŒããŒã¹ã«ã©ãŒããã»ããµã§ããã60MHzã§åäœããã³ãŒãåã¯"P5"ã§ããã
* 2000幎ïŒIntel Pentium 4ïŒX86ã¢ãŒããã¯ãã£ã®7çªç®ã®ãã€ã¯ãããã»ããµã§ãããNetBurstãã€ã¯ãã¢ãŒããã¯ãã£ãæ¡çšããŠããŸããã180nmããã»ã¹ã«ãŒã«ã§è£œé ãããæé«ã§3.8GHzã®ã¯ããã¯é床ãå®çŸããŸããã
* 2006幎ïŒIntel Core 2 DuoïŒX86ã¢ãŒããã¯ãã£ã®11çªç®ã®ãã€ã¯ãããã»ããµã§ãããCoreãã€ã¯ãã¢ãŒããã¯ãã£ãæ¡çšããŠããŸããã65nmããã»ã¹ã«ãŒã«ã§è£œé ãããæé«ã§3.33GHzã®ã¯ããã¯é床ãå®çŸããŸããã
* 2008幎ïŒIntel AtomïŒX86ã¢ãŒããã¯ãã£ã®12çªç®ã®ãã€ã¯ãããã»ããµã§ãããäœæ¶è²»é»åãå®çŸãããã€ã¯ãããã»ããµã§ããã45nmããã»ã¹ã«ãŒã«ã§è£œé ããã1.6GHzã®ã¯ããã¯é床ãå®çŸããŸããã
* 2011幎ïŒIntel Core i7-2600KïŒX86ã¢ãŒããã¯ãã£ã®13çªç®ã®ãã€ã¯ãããã»ããµã§ãããSandy Bridgeãã€ã¯ãã¢ãŒããã¯ãã£ãæ¡çšããŠããŸããã32nmããã»ã¹ã«ãŒã«ã§è£œé ãããæé«ã§3.8GHzã®ã¯ããã¯é床ãå®çŸããŸãããHyper-Threadingãã¯ãããžãŒãã¿ãŒãããŒã¹ããã¯ãããžãŒãªã©ã®æ°ããæ©èœãè¿œå ãããŸããã
* 2015幎ïŒIntel Core i7-6700KïŒX86ã¢ãŒããã¯ãã£ã®14çªç®ã®ãã€ã¯ãããã»ããµã§ãããSkylakeãã€ã¯ãã¢ãŒããã¯ãã£ãæ¡çšããŠããŸããã14nmããã»ã¹ã«ãŒã«ã§è£œé ãããæé«ã§4.2GHzã®ã¯ããã¯é床ãå®çŸããŸãããDDR4ã¡ã¢ãªã«å¯Ÿå¿ããThunderbolt 3ãªã©ã®æ°ããæ©èœãè¿œå ãããŸããã
* 2017幎ïŒAMD RyzenïŒX86ã¢ãŒããã¯ãã£ã®15çªç®ã®ãã€ã¯ãããã»ããµã§ãããAMDã補é ããCPUã§ããZenãã€ã¯ãã¢ãŒããã¯ãã£ãæ¡çšããŠããã14nmããã»ã¹ã«ãŒã«ã§è£œé ãããŸãããæé«ã§4.1GHzã®ã¯ããã¯é床ãå®çŸãããã«ãã¹ã¬ããæ§èœãé«ãè©äŸ¡ãããŸããã
* 2021幎ïŒIntel Core i9-11900KïŒX86ã¢ãŒããã¯ãã£ã®ææ°ã®ãã€ã¯ãããã»ããµã§ãããRocket Lakeãã€ã¯ãã¢ãŒããã¯ãã£ãæ¡çšããŠããŸãã14nmããã»ã¹ã«ãŒã«ã§è£œé ãããæé«ã§5.3GHzã®ã¯ããã¯é床ãå®çŸããŸãããPCI Express 4.0ãWi-Fi 6Eãªã©ã®æ°ããæ©èœãè¿œå ãããŠããŸãã
=== Intel ===
ãã€ã¯ãããã»ããµã¯ãçŸä»£ã®ã³ã³ãã¥ãŒã¿ã®äžæ žããªãéšåã§ãããé«åºŠãªæ©èœãæã€å€ãã®ããã€ã¹ã®å¶åŸ¡ã«äœ¿çšãããŠããŸãããã€ã¯ãããã»ããµã®æŽå²ã¯éåžžã«èå³æ·±ããããã§ã¯Intelã®ãã€ã¯ãããã»ããµã®çºå±ã®å¹Žè¡šã説æããŸãã
* 1971幎 - æåã®ãã€ã¯ãããã»ããµãIntel 4004ããçºè¡šããŸããããã®ãããã¯ãã«ã·ãªã®é»åãããªã³ã¿ãŒãªã©ãäœé»åããã€ã¹ã®å¶åŸ¡ã«äœ¿çšãããŸããã
* 1974幎 - ãIntel 8080ããçºè¡šããŸããããã®ãããã¯ãã³ã³ãã¥ãŒã¿ã®äžå€®åŠçè£
眮ïŒCPUïŒã«äœ¿çšãããã¢ããªã±ãŒã·ã§ã³ãã²ãŒã ã®å®è¡ã«å¿
èŠãªåŠçèœåãæäŸããŸããã
* 1978幎 - ãIntel 8086ããçºè¡šããŸããããã®ãããã¯ãIBM PCã«æ¡çšãããããŒãœãã«ã³ã³ãã¥ãŒã¿ã®æ®åã«è²¢ç®ããŸããã
* 1982幎 - ãIntel 80286ããçºè¡šããŸããããã®ãããã¯ãIBM PC/ATã«æ¡çšããã32ãããã¢ãŒããã¯ãã£ãæ¡çšããé«éãªåŠçèœåãæäŸããŸããã
* 1985幎 - ãIntel 80386ããçºè¡šããŸããããã®ãããã¯ããã«ãã¿ã¹ã¯ãä»®æ³èšæ¶ãªã©ã®é«åºŠãªæ©èœãåããããŒãœãã«ã³ã³ãã¥ãŒã¿ã®æ§èœã倧å¹
ã«åäžãããŸããã
* 1993幎 - ãPentiumããçºè¡šããŸããããã®ãããã¯ãã¹ãŒããŒã¹ã«ã©ãŒæ§é ãæ¡çšããé«åºŠãªåœä»€ã»ãããåããããé«éãªåŠçèœåãæäŸããŸããã
* 2000幎 - ãPentium 4ããçºè¡šããŸããããã®ãããã¯ããã€ããŒã¹ã¬ããã£ã³ã°ãã¯ãããžãŒãã¹ããªãŒãã³ã°SIMDæ¡åŒµåœä»€ãªã©ã®é«åºŠãªæ©èœãåãããã«ãã¡ãã£ã¢åŠçãªã©ã®é«åºŠãªã¢ããªã±ãŒã·ã§ã³ã«æé©åãããŸããã
* 2003幎 - AMDããAthlon 64ããçºè¡šããŸããããã®ãããã¯ã64ãããã¢ãŒããã¯ãã£ãæ¡çšããããé«åºŠãªã¡ã¢ãªã¢ã¯ã»ã¹ãèšç®åŠçèœåãæäŸããŸããã
* 2006幎 - ãCore 2 Duoããçºè¡šããŸããããã®ãããã¯ããã«ãã³ã¢æ§é ãæ¡çšããããé«ãæ§èœãšçé»åæ§ãåããå€ãã®ã³ã³ãã¥ãŒã¿ã«æ¡çšãããŸããã
* 2011幎 - AMDããBulldozerããçºè¡šããŸããããã®ãããã¯ããã«ãã³ã¢ã¢ãŒããã¯ãã£ãæ¡çšããé«éãªåŠçèœåãšçé»åæ§ãåãããã€ãšã³ãã®ããŒãœãã«ã³ã³ãã¥ãŒã¿ããµãŒããŒã«æ¡çšãããŸããã
* 2015幎 - ãSkylakeããçºè¡šããŸããããã®ãããã¯ã14nmããã»ã¹æè¡ãæ¡çšããããé«ãæ§èœãšçé»åæ§ãåããå€ãã®ã³ã³ãã¥ãŒã¿ã«æ¡çšãããŸããã
* 2020幎 - AMDããRyzen 5000ãã·ãªãŒãºãçºè¡šããŸããããã®ãããã¯ã7nmããã»ã¹æè¡ãæ¡çšããé«éãªåŠçèœåãšçé»åæ§ãåããã²ãŒã ãã¯ãªãšã€ãã£ããªäœæ¥ã«æé©åãããããã©ãŒãã³ã¹ãæäŸããŸããã
=== ã¢ãããŒã© ===
ãã€ã¯ãããã»ããµã¯çŸä»£ã®ããžã¿ã«æè¡ã®åºç€ã§ãããç§ãã¡ãæ®æ®µäœ¿ã£ãŠããã¹ããŒããã©ã³ãã³ã³ãã¥ãŒã¿ãŒãªã©ã®ããã€ã¹ã«ãæèŒãããŠããŸãããã®äžã§ããã¢ãããŒã©ã¯ãã€ã¯ãããã»ããµã®å
é§ããšããŠãåºãç¥ãããŠããŸããããã§ä»åã¯ãããã€ã¯ãããã»ããµå¹Žè¡š (ã¢ãããŒã©ç·š)ããããŒãã«ãã¢ãããŒã©ã®ãã€ã¯ãããã»ããµã®æŽå²ãæ¯ãè¿ã£ãŠã¿ãããšæããŸãã
* 1974幎ãã¢ãããŒã©ã¯åã®8ããããã€ã¯ãããã»ããµã§ããMC6800ãçºå£²ããŸãããMC6800ã¯ãã·ã³ã°ã«ãããã®ãã€ã¯ãããã»ããµãšããŠåããŠåçšçã«å©çšå¯èœã«ãªããèªåè»ç£æ¥ã家é»è£œåãªã©ã§å¹
åºãæ¡çšãããŸããã
* 1979幎ã«ã¯ãMC68000ãçºå£²ãããŸãããMC68000ã¯ã32ãããã¢ãŒããã¯ãã£ãæ¡çšããŠãããé«éã§é«æ§èœãªåŠçãå¯èœã«ããŸããããã®ãã€ã¯ãããã»ããµã¯ãåŸã«Appleã®MacintoshããAtariã®STãªã©ãå€ãã®ã³ã³ãã¥ãŒã¿ãŒã§äœ¿çšãããããšãšãªããŸããã
* 1984幎ã«ã¯ãã¢ãããŒã©ã¯MC68020ãçºå£²ããŸãããMC68020ã¯ãMC68000ã®åŸç¶ãšããŠãæŽãªãé«éåŠçãšãä»®æ³ã¡ã¢ãªç®¡çæ©èœãåããŠããŸããã
* 1994幎ã«ã¯ãPowerPCã¢ãŒããã¯ãã£ãæ¡çšããPowerPC 601ãçºå£²ãããŸãããPowerPC 601ã¯ãAppleã®Power Macintoshã«æ¡çšãããé«æ§èœãªåŠçãå®çŸããŸããã
ãã®åŸããã¢ãããŒã©ã¯ãã€ã¯ãããã»ããµã®éçºãç¶ãã2003幎ã«ã¯ãPowerPC 970FXãçºå£²ããŸãããPowerPC 970FXã¯ãAppleã®Power Mac G5ã«æ¡çšãããé«æ§èœãªåŠçãå®çŸããŸããã
ã¢ãããŒã©ã®ãã€ã¯ãããã»ããµã¯ããã®æŽå²ãéããŠãé«éåŠçãé«æ§èœãªããã€ã¹ã«è²¢ç®ããŸãããç¹ã«ãMC68000ãPowerPCã¢ãŒããã¯ãã£ãæ¡çšãããã€ã¯ãããã»ããµã¯ãã³ã³ãã¥ãŒã¿ãŒã®é²åã«å€§ããªåœ±é¿ãäžããŸããã
ããããçŸåšã§ã¯ã¢ãããŒã©ã¯ãã€ã¯ãããã»ããµã®éçºããæ€éããä»ç€Ÿããã®å°äœãåŒãç¶ãã§ããŸããããã§ããã¢ãããŒã©ã®ãã€ã¯ãããã»ããµã¯ãããžã¿ã«æè¡ã®é²åã«ãããŠéèŠãªåœ¹å²ãæãããä»åŸããã®åœ±é¿ã¯ç¶ããŠããããšã§ãããã
=== MC6809/MC68030ãšãã®åŸç¶è£œå矀/MC88000 ===
1970幎代ãã1980幎代ã«ãããŠãã³ã³ãã¥ãŒã¿æ¥çã¯æ¥éã«çºå±ãããã®äžã§ããã€ã¯ãããã»ããµã®çºæã¯ãã³ã³ãã¥ãŒã¿æè¡ã®çºå±ã«å€§ããè²¢ç®ããŸãããæ¬èšäºã§ã¯ã1978幎ã«ã¢ãããŒã©ãçºå£²ããMC6809ãšã1984幎ã«ç»å ŽããMC68030ãäžå¿ã«ããã®åŸç¶è£œå矀ãšããŠç»å Žãããã€ã¯ãããã»ããµã«ã€ããŠçŽ¹ä»ããŸãã
MC6809ã¯ã8ããããã€ã¯ãããã»ããµã®äžçš®ã§ã1978幎ã«ã¢ãããŒã©ã«ãã£ãŠçºå£²ãããŸãããMC6809ã¯ãããããã£ãŒã«ããæ§é äœããã€ã³ã¿ãªã©ã®æ©èœãåããŠãããããã¢ã»ã³ããªèšèªã®ã³ãŒãã£ã³ã°ã容æã«ãªããŸããããŸããMC6809ã¯ãæ©èœãå€åœ©ã§ãããªãããäœã³ã¹ãã§ããããšãç¹åŸŽã§ãããããã¯ãåœæã®ã³ã³ãã¥ãŒã¿ç£æ¥ã«ãšã£ãŠå€§ããªé©æ°ã§ãããå€ãã®äŒæ¥ãMC6809ãæ¡çšããŸããã
1984幎ã«ã¯ãMC68030ãç»å ŽããŸãããMC68030ã¯ã32ããããã€ã¯ãããã»ããµã§ãããMC68000ã®åŸç¶æ©çš®ãšããŠéçºãããŸãããMC68030ã¯ãé«éãªåœä»€åŠçèœåãæã¡ãé«ãæ§èœãçºæ®ããããšãã§ããŸããããŸããMC68030ã¯ãFPUïŒæµ®åå°æ°ç¹æŒç®ãŠãããïŒãå
èµããŠãããã³ã³ãã¥ãŒã¿ã°ã©ãã£ãã¯ã¹ããµãŠã³ãåŠçãªã©ãé«åºŠãªåŠçãå¿
èŠãšããã¢ããªã±ãŒã·ã§ã³ã«é©ããŠããŸããã
MC68030ã®åŸç¶æ©çš®ãšããŠã¯ãMC68040ãMC68060ããããŸãããããã®ãã€ã¯ãããã»ããµã¯ãæ§èœãæ©èœã®åäžãå³ãããç¹ã«MC68060ã¯é«éãªã¯ããã¯åšæ³¢æ°ãšå€§éã®ãã£ãã·ã¥ã¡ã¢ãªãåããŠãããé«ãåŠçèœåãçºæ®ããããšãã§ããŸããã
ããã«ãMC88000ãç»å ŽããŸãããMC88000ã¯ã32ããããã€ã¯ãããã»ããµã§ãããUNIXãOS-9ãªã©ã®ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã«å¯Ÿå¿ããŠããŸãããMC88000ã¯ãè€æ°ã®å®è¡ã¢ãŒããåããŠãããé«ãæ§èœãçºæ®ããããšãã§ããŸããã
以äžã®ããã«ãMC6809ããMC68030ãã¯ãããšãããã®åŸç¶è£œå矀ãMC88000ãŸã§ããã€ã¯ãããã»ããµæè¡ã¯é²åãç¶ããã³ã³ãã¥ãŒã¿ã®æ§èœãåäžãããããšã«è²¢ç®ããŸãããMC6809ãMC68030ãªã©ãã¢ãããŒã©ã®ãã€ã¯ãããã»ããµã¯ããã®åŸãå€ãã®äŒæ¥ã«æ¡çšãããã³ã³ãã¥ãŒã¿æ¥çã«ãããŠå€§ããªåœ¹å²ãæãããŸããã
ãŸããMC88000ã¯ãUNIXãOS-9ãªã©ã®ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã«å¯Ÿå¿ããŠãããããçµã¿èŸŒã¿ã·ã¹ãã ããµãŒããŒãªã©ãæ§ã
ãªåéã§æ¡çšãããŸãããMC88000ã¯ãæ§èœãé«ããä¿¡é Œæ§ã«ãåªããŠãããã³ã³ãã¥ãŒã¿æ¥çã«ãããŠå€å€§ãªè©äŸ¡ãåããŸããã
çŸåšã§ã¯ãMC6809ãMC68030ãªã©ã®å€ããã€ã¯ãããã»ããµã¯ãæ°ããæè¡ã«åã£ãŠä»£ããããŠããŸãããããããããã®ãã€ã¯ãããã»ããµãã³ã³ãã¥ãŒã¿æ¥çã«äžãã圱é¿ã¯å€§ããããã®æè¡ã¯ä»ããªãçºå±ãç¶ããŠããŸããä»åŸãããã€ã¯ãããã»ããµã®é²åãã³ã³ãã¥ãŒã¿ã®æ§èœåäžã«è²¢ç®ããæ°ããªæè¡é©æ°ãçã¿åºããŠããããšãæåŸ
ãããŸãã
=== ARM ===
ARMã¯ãçŸä»£ã®ã³ã³ãã¥ãŒãã£ã³ã°ã«ãããŠæ¥µããŠéèŠãªåœ¹å²ãæãããŠãããã€ã¯ãããã»ããµã¢ãŒããã¯ãã£ã®äžã€ã§ããARMãåããŠç»å Žããã®ã¯ã1985幎ã®ããšã§ããã以æ¥ãARMã¯ãæºåž¯é»è©±ãã¹ããŒããã©ã³ãã¿ãã¬ãããè»èŒæ
å ±ã·ã¹ãã ããããã¯ãŒã¯æ©åšãã¹ããŒãã¹ããŒã«ãŒãIoTããã€ã¹ãªã©ãæ§ã
ãªåéã®ã³ã³ãã¥ãŒã¿ã·ã¹ãã ã«æ¡çšãããäžçäžã§å©çšãããŠããŸãã
以äžã§ã¯ãARMã®æŽå²ããã©ã圢ã§ããã€ã¯ãããã»ããµå¹Žè¡šãäœæããŠã¿ãŸããã
* 1985幎: ARM1ïŒARM1ã¯ãåããŠã®ARMããã»ããµã§ãããã¢ã»ã³ããªèšèªã§æžããã32ãããåœä»€ã»ããã¢ãŒããã¯ãã£ãæ¡çšããŠããŸãããARM1ã¯ãAcorn Computersã®BBC Microã³ã³ãã¥ãŒã¿ã«æèŒãããŸããã
* 1991幎: ARM2ïŒARM2ã¯ãARM1ã®æ¹è¯çã§ã8MHzã§åäœããARM1ã®3åã®æ§èœãæã£ãŠããŸãããARM2ã¯ãAcorn Archimedesã³ã³ãã¥ãŒã¿ã«æèŒãããŸããã
* 1994幎: ARM6ïŒARM6ã¯ãARMã¢ãŒããã¯ãã£ã®æåã®RISCåœä»€ã»ããã¢ãŒããã¯ãã£ã§ãããARM6ã¯ãAppleã®Newton PDAã«æèŒãããŸããã
* 1996幎: ARM7ïŒARM7ã¯ãARMã¢ãŒããã¯ãã£ã®åããŠã®32ããããã€ã¯ãããã»ããµã§ãããARM2ã®åœä»€ã»ãããããŒã¹ã«ããŠããŸãããARM7ã¯ãæºåž¯é»è©±ãPDAãã²ãŒã æ©ãªã©ã®æ§ã
ãªããã€ã¹ã«æ¡çšãããŸããã
* 2001幎: ARM9ïŒARM9ã¯ãARM7ã®åŸç¶æ©çš®ã§ãäž»ã«æºåž¯é»è©±ãPDAã«æ¡çšãããŸãããARM9ã¯ãARMã¢ãŒããã¯ãã£ã®äžã§æãåºã䜿ãããŠããããã»ããµã®äžã€ã§ãã
* 2005幎: ARM11ïŒARM11ã¯ãARM9ã®æ¹è¯çã§ãããé«éãªããã»ããµã§ãã¹ããŒããã©ã³ãã¿ãã¬ãããªã©ã®æ©åšã«æ¡çšãããŸããã
* 2010幎: Cortex-AïŒCortex-Aã¯ãARMã®æãé«æ§èœãªããã»ããµãã¡ããªãŒã§ãããã¹ããŒããã©ã³ãã¿ãã¬ãããªã©ã®æ©åšã«åºãæ¡çšãããŸããã
* 2013幎: Cortex-MïŒCortex-Mã¯ãARMã®çµã¿èŸŒã¿ã·ã¹ãã åãã®ããã»ããµãã¡ããªãŒã§ãããäœã³ã¹ãã§äœæ¶è²»é»åãªããé«ãæ§èœãçºæ®ããŸããIoTããã€ã¹ã家é»è£œåãã»ã³ãµãŒãèªåè»ãªã©ã«åºãæ¡çšãããŠããŸãã
* 2016幎: Cortex-RïŒCortex-Rã¯ãARMã®ãªã¢ã«ã¿ã€ã ã·ã¹ãã åãã®ããã»ããµãã¡ããªãŒã§ãããé«ãä¿¡é Œæ§ãšå®å
šæ§ãåããŠããŸããèªåè»ãå»çæ©åšãç£æ¥å¶åŸ¡ãªã©ã®åéã«æ¡çšãããŠããŸãã
* 2020幎: Cortex-XïŒCortex-Xã¯ãARMã®ææ°ã®é«æ§èœããã»ããµãã¡ããªãŒã§ãããç¹ã«äººå·¥ç¥èœãæ©æ¢°åŠç¿ãªã©ã®åéã«æé©åãããããã»ããµã§ããææ°ã®ã¹ããŒããã©ã³ãã³ã³ãã¥ãŒã¿ãã¯ã©ãŠããµãŒããŒãªã©ã«æ¡çšãããŠããŸãã
ARMã¢ãŒããã¯ãã£ã¯ãã³ã³ãã¥ãŒã¿ã·ã¹ãã ã®é²åã«äŒŽããåžžã«ææ°ã®æè¡ãæ©èœãåãå
¥ããªããçºå±ããŠããŸãããä»åŸãARMã¯ãæ§ã
ãªåéã§éèŠãªåœ¹å²ãæããç¶ããããšãæåŸ
ãããŠããŸãã
=== ARM64 ===
ARM64ã¯ãARMããŒã«ãã£ã³ã°ã¹ãèšèšãã64ãããã¢ãŒããã¯ãã£ã®ãã€ã¯ãããã»ããµã§ãããã¹ããŒããã©ã³ãã¿ãã¬ãããããŒãããœã³ã³ããµãŒããŒãªã©ãå€æ§ãªããã€ã¹ã§äœ¿çšãããŠããŸãã以äžã§ã¯ãARM64ã®çºå±ã幎衚圢åŒã§æ¯ãè¿ããŸãã
* 2011幎: ARM Cortex-A57ã®ãªãªãŒã¹
ARM Cortex-A57ã¯ãARM64ã¢ãŒããã¯ãã£ã®æåã®ããã»ããµã®1ã€ã§ãããã¹ããŒããã©ã³ãã¿ãã¬ãããªã©ã®ã¢ãã€ã«ããã€ã¹ã§ã®äœ¿çšãæ³å®ããŠèšèšãããŸãããCortex-A57ã¯ãåŸæ¥ã®32ãããããã»ããµã«æ¯ã¹ãŠã倧å¹
ãªæ§èœåäžãšçé»ååãå¯èœã«ãªããŸããã
* 2012幎: Apple A7ããã»ããµã®çºè¡š
Apple A7ããã»ããµã¯ãiPhone 5sã«åããŠæ¡çšããããäžçåã®ARM64ããŒã¹ã®ãã€ã¯ãããã»ããµã§ããA7ã¯ãCortex-A57ãããŒã¹ã«Appleãç¬èªã«ã«ã¹ã¿ãã€ãºãããã®ã§ãåœæã®ã¢ãã€ã«ããã»ããµãšããŠã¯é«ãæ§èœãèªããŸããã
* 2014幎: Qualcomm Snapdragon 810ã®ãªãªãŒã¹
Snapdragon 810ã¯ãã¹ããŒããã©ã³åžå Žã«ãããŠãåããŠARM64ã¢ãŒããã¯ãã£ãæ¡çšããããã»ããµã®1ã€ã§ãã810ã¯ãCortex-A57ãšCortex-A53ã®ããã°.LITTLEã¢ãŒããã¯ãã£ãæ¡çšããé«ãæ§èœãšçé»åæ§ãå
ŒãåããŸããã
* 2015幎: ARM Cortex-A72ã®ãªãªãŒã¹
Cortex-A72ã¯ãARM64ã¢ãŒããã¯ãã£ã®äžã§ãé«æ§èœãªããã»ããµã®1ã€ã§ãããã¹ããŒããã©ã³ãã¿ãã¬ããããããŠãµãŒããŒãªã©ã®åéã§äœ¿çšãããŸãããCortex-A72ã¯ãCortex-A57ã«æ¯ã¹ãŠæ§èœãåäžããçé»ååãé²ãã ãšãããŠããŸãã
* 2017幎: Qualcomm Snapdragon 835ã®çºè¡š
Snapdragon 835ã¯ãã¹ããŒããã©ã³åžå Žã«ãããŠåããŠ10nmããã»ã¹æè¡ãæ¡çšããããã»ããµã§ãããARM64ã¢ãŒããã¯ãã£ãæ¡çšããããã»ããµãšããŠã¯ãé«ãæ§èœãšçé»åæ§ãäž¡ç«ãããã®ã§ãããSnapdragon 835ã¯ãåœæã®ãããã¯ã©ã¹ã®ã¹ããŒããã©ã³ã«æ¡çšãããé«ãè©äŸ¡ãåŸãŸããã
* 2018幎: ARM Cortex-A76ã®ãªãªãŒã¹
Cortex-A76ã¯ãARM64ã¢ãŒããã¯ãã£ã®äžã§ãé«æ§èœãªããã»ããµã®1ã€ã§ãããã¹ããŒããã©ã³ãã¿ãã¬ããããããŠãµãŒããŒãªã©ã®åéã§äœ¿çšãããŸãããCortex-A76ã¯ãCortex-A72ãCortex-A73ã«æ¯ã¹ãŠæ§èœãåäžããåæã«çé»ååãé²ãã ãšãããŠããŸãã
* 2019幎: Qualcomm Snapdragon 855ã®çºè¡š
Snapdragon 855ã¯ãã¹ããŒããã©ã³åžå Žã«ãããŠåããŠ7nmããã»ã¹æè¡ãæ¡çšããããã»ããµã§ãããARM64ã¢ãŒããã¯ãã£ãæ¡çšããããã»ããµãšããŠã¯ãé«ãæ§èœãšçé»åæ§ãäž¡ç«ãããã®ã§ãããSnapdragon 855ã¯ãåœæã®ãããã¯ã©ã¹ã®ã¹ããŒããã©ã³ã«æ¡çšãããé«ãè©äŸ¡ãåŸãŸããã
* 2020幎: Apple M1ããã»ããµã®çºè¡š
Apple M1ããã»ããµã¯ãMacã«æ¡çšãããäžçåã®ARM64ããŒã¹ã®ãã€ã¯ãããã»ããµã§ãããé«ãæ§èœãšçé»åæ§ãå
ŒãåããŠããŸããM1ã¯ãCortex-A78ãCortex-X1ã«æ¯ã¹ãŠæ§èœãåäžããåæã«çé»ååãé²ãã ãšãããŠããŸãã
* 2021幎: Qualcomm Snapdragon 888ã®çºè¡š
Snapdragon 888ã¯ãã¹ããŒããã©ã³åžå Žã«ãããŠåããŠ5nmããã»ã¹æè¡ãæ¡çšããããã»ããµã§ãããARM64ã¢ãŒããã¯ãã£ãæ¡çšããããã»ããµãšããŠã¯ãé«ãæ§èœãšçé»åæ§ãäž¡ç«ãããã®ã§ãããSnapdragon 888ã¯ãåœæã®ãããã¯ã©ã¹ã®ã¹ããŒããã©ã³ã«æ¡çšãããé«ãè©äŸ¡ãåŸãŸããã
以äžããARM64ã¢ãŒããã¯ãã£ã®ãã€ã¯ãããã»ããµã®çºå±ãæ¯ãè¿ã£ã幎衚ã§ããä»åŸããARM64ã¢ãŒããã¯ãã£ãæ¡çšããããã»ããµã®éçºãé²ã¿ããããªãæ§èœåäžãçé»ååãæåŸ
ãããŸãã
=== AMD ===
ããã§ã¯ãã¢ããã³ã¹ãã»ãã€ã¯ãã»ããã€ã»ãºïŒAMDïŒç€ŸããªãªãŒã¹ãããã€ã¯ãããã»ããµã®æŽå²ã«ã€ããŠå¹Žè¡šåœ¢åŒã§ãŸãšããŠãããŸããAMD瀟ã¯ãIntel瀟ãšäžŠã¶äžççãªåå°äœã¡ãŒã«ãŒã§ããããã€ã¯ãããã»ããµåžå Žã§ãé«ãã·ã§ã¢ãæã£ãŠããŸãããããªAMD瀟ããããŸã§ã«ãªãªãŒã¹ããŠãããã€ã¯ãããã»ããµã®é²åã®è»è·¡ã蟿ã£ãŠãããŸãããã
; 1975幎
AMD瀟ã¯ãIntel瀟ã®ãã€ã¯ãããã»ããµã8080ãã®äºæåãšããŠãAm9080ãããªãªãŒã¹ããŸãããAm9080ã¯ãåœæã®8080ãšåãåœä»€ã»ãããæã£ãŠããããã8080åãã®ãœãããŠã§ã¢ããã®ãŸãŸåäœã§ãããšããå©ç¹ããããŸããã
; 1979幎
AMD瀟ã¯ãIntel瀟ã®ãã€ã¯ãããã»ããµã8086ãã®äºæåãšããŠãAm9086ãããªãªãŒã¹ããŸãããAm9086ã¯ã8086ãšåã16ãããã®åœä»€ã»ãããæã£ãŠãããIBM PCãªã©ã®ã³ã³ãã¥ãŒã¿ã«ãæèŒãããŸããã
; 1982幎
AMD瀟ã¯ãIntel瀟ã®ãã€ã¯ãããã»ããµã80286ãã®äºæåãšããŠãAm80286ãããªãªãŒã¹ããŸãããAm80286ã¯ã16ããããã32ãããã«ã¢ããã°ã¬ãŒããããåœä»€ã»ãããæã£ãŠãããé«éåãå³ãããŸããã
; 1991幎
AMD瀟ã¯ãIntel瀟ã®ãã€ã¯ãããã»ããµã80486ãã®äºæåãšããŠãAm486ãããªãªãŒã¹ããŸãããAm486ã¯ã64ãããã®ããŒã¿ãã¹ãåããŠãããé«éåŠçãå¯èœã§ããã
; 1996幎
AMD瀟ã¯ãèªç€Ÿåã®ãªãªãžãã«ãã€ã¯ãããã»ããµãK5ãããªãªãŒã¹ããŸãããK5ã¯ãIntel瀟ã®ãPentiumãã·ãªãŒãºãšã®ç«¶åã«ãªãããšãç®çã«éçºãããŸããã
; 1999幎
AMD瀟ã¯ãèªç€Ÿåã®x86ã¢ãŒããã¯ãã£ãæ¡çšããªããã€ã¯ãããã»ããµãAthlonãããªãªãŒã¹ããŸãããAthlonã¯ãåœæã®Intel瀟ã®è£œåããé«éãªåŠçæ§èœãæã¡ãAMD瀟ã«ãšã£ãŠå€§ããªæåãšãªããŸããã
; 2003幎
AMD瀟ã¯ã64ãããã®x86ã¢ãŒããã¯ãã£ãæ¡çšãããAthlon 64ãããªãªãŒã¹ããŸãããAthlon 64ã¯ãåœæã®åžå Žã§å¯äžã®64ããããã€ã¯ãããã»ããµã§ãããé«éãªåŠçæ§èœãšæ¡åŒµæ§ãæã¡ãããžãã¹ããã€ãšã³ãã®ã³ã³ãã¥ãŒã¿åãã«é«ãè©äŸ¡ãåããŸããã
; 2006幎
AMD瀟ã¯ã2ã€ã®ã³ã¢ãæã€ãã€ã¯ãããã»ããµãAthlon X2ãããªãªãŒã¹ããŸãããAthlon X2ã¯ããã«ãã¿ã¹ã¯åŠçã«åªããé«éã§å®å®ããããã©ãŒãã³ã¹ãçºæ®ããã²ãŒã ãåç»ç·šéãªã©ã«åãã補åãšããŠäººæ°ãåããŸããã
; 2011幎
AMD瀟ã¯ãåœæææ°ã®x86ã¢ãŒããã¯ãã£ãæ¡çšãããBulldozerãããªãªãŒã¹ããŸãããBulldozerã¯ãæ倧8ã€ã®ã³ã¢ãæã¡ãé«éãªæŒç®æ§èœãçºæ®ããã¯ãŒã¯ã¹ããŒã·ã§ã³ããµãŒããŒåãã«æ³šç®ãããŸããã
; 2017幎
AMD瀟ã¯ãZenã¢ãŒããã¯ãã£ãæ¡çšãããã€ã¯ãããã»ããµãRyzenãããªãªãŒã¹ããŸãããRyzenã¯ãé«éãªãã«ãã¿ã¹ã¯åŠçãã³ã³ãã³ãã®å¶äœãã²ãŒã ãªã©ã®å¹
åºãçšéã«åãã補åãšããŠé«ãè©äŸ¡ãåŸãŸããã
; 2020幎
AMD瀟ã¯ãZen 3ã¢ãŒããã¯ãã£ãæ¡çšãããRyzen 5000ãã·ãªãŒãºããªãªãŒã¹ããŸãããRyzen 5000ã¯ãé«ãã¯ããã¯é床ãšå€§å®¹éãã£ãã·ã¥ã«ãããé«éã§å®å®ããããã©ãŒãã³ã¹ãçºæ®ããã²ãŒã ãã¯ãªãšã€ãã£ããªäœæ¥ã«åãã補åãšããŠè©±é¡ã«ãªããŸããã
; 2021幎
AMD瀟ã¯ãZen 3+ã¢ãŒããã¯ãã£ãæ¡çšãããRyzen 6000ãã·ãªãŒãºããªãªãŒã¹ããäºå®ã§ããRyzen 6000ã·ãªãŒãºã¯ãAMDã2021幎ã«çºè¡šããæ°ãããã€ã¯ãã¢ãŒããã¯ãã£ãZen 3+ããæ¡çšããŠãããæŽã«é«éãªæŒç®æ§èœãAIæ§èœã®åäžãæåŸ
ãããŸãã
ãŸãã2021幎ã«ã¯ãAMDãã°ã©ãã£ãã¯ã¹ã«ãŒãåžå Žã§ã泚ç®ãéããŸãããå瀟ã¯ãRDNA2ã¢ãŒããã¯ãã£ãæ¡çšãããRadeon RX 6000ãã·ãªãŒãºããªãªãŒã¹ããNVIDIA瀟ãšç«¶åãã圢ã§åžå Žã«åå
¥ããŸããã
以äžããAMD瀟ã®ãã€ã¯ãããã»ããµã®æŽå²ã幎衚圢åŒã§ãŸãšããå
容ã§ããAMD瀟ã¯ãIntel瀟ãšã®ç«¶äºãéããŠåžžã«é²åãç¶ããé«ãæ§èœãšã³ã¹ãããã©ãŒãã³ã¹ã®äž¡ç«ãå®çŸããŠããŸããä»åŸããAMD瀟ã®æè¡é©æ°ã«æ³šç®ããŠãããããšããã§ãã
=== ãã€ã¯ãããã»ããµå¹Žè¡š (AMD2901/AMD2916/AMD29000ç·š)) ===
MD2901/AMD2916/AMD29000ãšãããã€ã¯ãããã»ããµã¯ãã¢ããã³ã¹ãã»ãã€ã¯ãã»ããã€ã»ãº(AMD)ã«ãã£ãŠéçºããããéèŠãªãã€ã¯ãããã»ããµã®äžã€ã§ããæ¬èšäºã§ã¯ãAMD2901/AMD2916/AMD29000ã®å¹Žè¡šã«ã€ããŠè§£èª¬ããŠãããŸãã
* 1975幎ïŒAMDã¯ãæåã®ãã€ã¯ãããã»ããµAMD2901ãéçºãããAMD2901ã¯ã4ãããã®äžŠåã¢ãŒããã¯ãã£ãæ¡çšããŠããã
* 1983幎ïŒAMDã¯ãAMD2901ã®åŸç¶ãšããŠã16ãããã®AMD29116ãçºè¡šãããAMD29116ã¯ãAMD2901ã®ã¢ãŒããã¯ãã£ã16ãããã«æ¡åŒµãããã®ã§ããã
* 1986幎ïŒAMDã¯ãAMD29000ãçºè¡šãããAMD29000ã¯ã32ãããã®RISCã¢ãŒããã¯ãã£ãæ¡çšããé«éãã€å¹ççãªæŒç®ãå¯èœã«ããã
* 1989幎ïŒAMDã¯ãAMD29C011ã³ããã»ããµãçºè¡šãããAMD29C011ã¯ãAMD29000ãšäºææ§ã®ããæµ®åå°æ°ç¹æŒç®ãå®è¡ããããã®ã³ããã»ããµã§ããã
* 1990幎ïŒAMDã¯ãAMD29Kãã¡ããªã®æ¡åŒµãšããŠãAMD29Kãã€ã¯ãããã»ããµã®æåã®ãã«ãããã»ããµããŒãžã§ã³ã§ããAMD29K MPãçºè¡šããã
* 1991幎ïŒAMDã¯ãAMD29Kãã€ã¯ãããã»ããµã®äœæ¶è²»é»åããŒãžã§ã³ã§ããAMD29KL16ãçºè¡šããããŸããAMD29C825ã®çºè¡šã«ãããAMD29Kãšäºææ§ã®ããDMAã³ã³ãããŒã©ãæäŸããã
* 1992幎ïŒAMDã¯ãAMD29Kãã€ã¯ãããã»ããµã®é«æ§èœããŒãžã§ã³ã§ããAMD29KHPãçºè¡šããã
* 1994幎ïŒAMDã¯ãAMD29Kãã€ã¯ãããã»ããµã®ææ°ããŒãžã§ã³ã§ããAMD29KJãçºè¡šããããŸããAMD29Kãã€ã¯ãããã»ããµã®çµã¿èŸŒã¿çšéåãããŒãžã§ã³ã§ããAMD29K E1ãçºè¡šããã
* 1995幎ïŒAMDã¯ãAMD29Kãã€ã¯ãããã»ããµã®æåŸã®ããŒãžã§ã³ã§ããAMD29KMãçºè¡šããããã®åŸãAMDã¯29Kã¢ãŒããã¯ãã£ãäžæ¢ããx86ã¢ãŒããã¯ãã£ã«æ³šåããããšã決å®ããã
以äžããAMD2901/AMD2916/AMD29000ã®äž»èŠãªå¹Žè¡šã§ãããAMD2901ã¯ãåæã®ãã€ã¯ãããã»ããµã®äžã€ãšããŠãããŒãœãã«ã³ã³ãã¥ãŒã¿ã®çºå±ã«è²¢ç®ãããAMD2916ã¯ãAMD2901ã®åŸç¶ãšããŠã16ãããã®åŠçèœåãæã€ãã€ã¯ãããã»ããµãšããŠãç£æ¥å¶åŸ¡ãèšç®æ©æ¯æŽèšèšãéä¿¡ãªã©ã®åéã§å©çšããããAMD29000ã¯ãRISCã¢ãŒããã¯ãã£ãæ¡çšããããšã«ãããé«éã§å¹ççãªæŒç®ãå¯èœã§ãããé«æ§èœã³ã³ãã¥ãŒã¿ãã¯ãŒã¯ã¹ããŒã·ã§ã³ãªã©ã®åéã§å©çšãããã
=== Power/PowerPC ===
ãã€ã³ãããã¯ã·ã§ã³ã
ããŒãœãã«ã³ã³ãã¥ãŒã¿ãã¹ããŒããã©ã³ãã²ãŒã æ©ããµãŒããŒãã¹ãŒããŒã³ã³ãã¥ãŒã¿ãŒãªã©ãç§ãã¡ãæ¥ã
䜿çšããæ©åšã®äžã«ã¯ããã€ã¯ãããã»ããµãšåŒã°ããå°åã®CPUãæèŒãããŠããŸããä»åã¯ããã®äžã§ããPower/PowerPCããšåŒã°ãããã€ã¯ãããã»ããµã®æŽå²ã幎衚圢åŒã§æ¯ãè¿ãããã®ç¹åŸŽã掻èºããåéã«ã€ããŠçŽ¹ä»ããŸãã
ããã€ã¯ãããã»ããµå¹Žè¡š (Power/PowerPCç·š)ã
* 1990幎ïŒIBMãRISCã¢ãŒããã¯ãã£ãæ¡çšãããPOWER1ããçºè¡šã
ããç¹åŸŽïŒåœä»€ã»ãããç°¡çŽ åãããŠãããé«éãªæŒç®åŠçãå¯èœã
* 1993幎ïŒIBMãAppleãMotorolaã®å
±åéçºã«ãããPowerPCãã¢ãŒããã¯ãã£ãçºè¡šã
ããç¹åŸŽïŒPOWER1ã®æè¡ãããŒã¹ã«ãAppleãæ¡çšããMacintoshã·ãªãŒãºã®CPUãšããŠæ¡çšãããé«ãæ§èœãå®çŸã
* 1994幎ïŒIBMããPOWER2ããçºè¡šã
ããç¹åŸŽïŒé«åºŠãªã¹ãŒããŒã¹ã«ã©ãŒæ¹åŒãæ¡çšããé«æ§èœåãå³ã£ãã
* 1995幎ïŒMotorolaããPowerPC 603ããçºè¡šã
ããç¹åŸŽïŒçé»åæ§ã«åªããäœäŸ¡æ Œã§æäŸãããããšããããšã³ããããæ©åšã«ãæ¡çšãããã
* 1997幎ïŒIBMããPOWER3ããçºè¡šã
ããç¹åŸŽïŒ64ãããã¢ãŒããã¯ãã£ãæ¡çšããé«ãæŒç®æ§èœãšä¿¡é Œæ§ãå®çŸã
* 1999幎ïŒMotorolaããPowerPC G4ããçºè¡šã
ããç¹åŸŽïŒAltivecãšåŒã°ãããã¯ãã«æŒç®æ©èœãæèŒããç»ååŠçãé³å£°åŠçãªã©ã®åéã§é«ãè©äŸ¡ãåããã
* 2001幎ïŒIBMããPOWER4ããçºè¡šã
ããç¹åŸŽïŒãã«ãããã»ãã·ã³ã°ã«å¯Ÿå¿ããã¹ãŒããŒã³ã³ãã¥ãŒã¿ãŒããµãŒããŒã§ã®äœ¿çšã«åããé«æ§èœCPUã
* 2005幎ïŒIBMããPOWER5ããçºè¡šã
ããç¹åŸŽïŒãã«ãã¹ã¬ããæè¡ãæ¡çšããè€æ°ã®åŠçãåæã«å®è¡å¯èœãšããã
* 2006幎ïŒIBMããPOWER6ããçºè¡šã
ããç¹åŸŽïŒé«åºŠãªãšã©ãŒã³ã¬ã¯ã·ã§ã³æ©èœãåããä¿¡é Œæ§ãæŽã«åäžãããããŸããåçãªé»å管çæ©èœãæ¡çšããããšã§ãçé»åæ§ãåäžããã
* 2010幎ïŒIBMããPOWER7ããçºè¡šã
ããç¹åŸŽïŒé«éãªãã£ãã·ã¥ã¡ã¢ãªãšãé«åºŠãªãã«ãã¹ã¬ããæè¡ãæ¡çšããé«ãæŒç®åŠçèœåãšä¿¡é Œæ§ãå®çŸããã
* 2013幎ïŒIBMããPOWER8ããçºè¡šã
ããç¹åŸŽïŒè€æ°ã®ã³ã¢ãæèŒããé«ããã«ãã¹ã¬ããåŠçèœåãšäžŠååŠçèœåãåããããŸããOpenPOWER Foundationãèšç«ãããªãŒãã³ãªã¢ãŒããã¯ãã£ãæšé²ããã
* 2017幎ïŒIBMããPOWER9ããçºè¡šã
ããç¹åŸŽïŒé«ãæŒç®æ§èœãšãAIããã£ãŒãã©ãŒãã³ã°ãªã©ã®é«åºŠãªåéã«ã察å¿ããæ©èœãæèŒããããŸããOpenCAPIãšåŒã°ããé«éãªæ¥ç¶èŠæ Œãæ¡çšããããšã§ãé«éãªããŒã¿è»¢éãå¯èœãšãªã£ãã
ããŸãšãã
ãPower/PowerPCãã¯ãIBMãAppleãMotorolaãªã©ãå
±åã§éçºãããã€ã¯ãããã»ããµã§ãããé«ãæ§èœãçé»åæ§ãä¿¡é Œæ§ãªã©ã®ç¹åŸŽãæã¡ãã¹ãŒããŒã³ã³ãã¥ãŒã¿ãŒããµãŒããŒããšã³ããããæ©åšããããŠäžææã¯Macintoshã·ãªãŒãºã®CPUãšããŠã䜿çšãããŸããããã®æŽå²ãæ¯ãè¿ãããšã§ããã€ã¯ãããã»ããµã®é²åãæè¡é©æ°ã®æŽå²ãç解ããããšãã§ããŸãã
=== SPARC ===
ä»ãã40幎ã»ã©åããµã³ã»ãã€ã¯ãã·ã¹ãã ãºç€Ÿãèšç«ãããç¬èªã®ããã»ããµã¢ãŒããã¯ãã£ãSPARCããéçºããŸããããã®åŸãSPARCã¯äžçäžã®äŒæ¥ãç 究æ©é¢ã§å©çšãããå€ãã®ã·ã¹ãã ããµãŒããŒã§æ¡çšãããŸããã
以äžã§ã¯ãSPARCã¢ãŒããã¯ãã£ãäžå¿ã«ãããã€ã¯ãããã»ããµã®é²åãæ¯ãè¿ããŸãã
* 1987幎 - SPARCããã»ããµã®ç»å Ž
ãµã³ã»ãã€ã¯ãã·ã¹ãã ãºç€ŸãåããŠãªãªãŒã¹ããSPARCã¢ãŒããã¯ãã£ã®ããã»ããµã¯ãSPARCstation 1ã«æèŒãããŸãããåœæã¯25MHzã§åäœãã32ãããã®åœä»€ã»ãããæ¡çšããŠããŸããã
* 1992幎 - SPARC64
æ¥æ¬ã®å¯å£«é瀟ãéçºããSPARC64ã¯ãåœææãé«éãªããã»ããµã®1ã€ã§ãããå代ã®SPARC64ã¯æ倧150MHzã§åäœããæ§èœã®é¢ã§SPARCstation 10ããã®ããŸããã
* 1995幎 - SPARCstation 20
SPARCstation 20ã¯ãåããŠå¯Ÿç§°ãã«ãããã»ãã·ã³ã°ïŒSMPïŒããµããŒãããSPARCã·ã¹ãã ã§ãããããã«ãããè€æ°ã®ããã»ããµã1ã€ã®ã·ã¹ãã ã§åæã«åäœãããããšãå¯èœã«ãªããŸããã
* 2001幎 - UltraSPARC III
ãµã³ã»ãã€ã¯ãã·ã¹ãã ãºç€ŸããªãªãŒã¹ããUltraSPARC IIIã¯ãåããŠã®64ãããã®SPARCããã»ããµã§ãããåœææéã®ã¯ããã¯åšæ³¢æ°1.2GHzãèªããé«ãæ§èœãçºæ®ããŸããã
* 2005幎 - UltraSPARC T1
UltraSPARC T1ã¯ãåœææãé²ãã ãã«ãã¹ã¬ããæè¡ãæ¡çšããããã»ããµã§ãããåœæã®ããã»ããµã¯1ã€ã®ã³ã¢ã§1ã€ã®ã¹ã¬ããããåŠçã§ããŸããã§ããããUltraSPARC T1ã¯1ã€ã®ã³ã¢ã§æ倧32ã¹ã¬ãããåŠçããããšãã§ããŸããã
* 2010幎 - SPARC T3
SPARC T3ã¯ãUltraSPARC T1ã®åŸç¶ã¢ãã«ã§ã16ã³ã¢ã®ããã»ããµãšæ倧128ã¹ã¬ããããµããŒãããŸããããã®ããã»ããµã¯ãããžãã¹ã¯ãªãã£ã«ã«ãªã¢ããªã±ãŒã·ã§ã³ãããŒã¿ããŒã¹ã·ã¹ãã ãªã©ã®åŠçã«é©ããŠããŸããã
* 2017幎 - SPARC M8
SPARC M8ã¯ãææ°ã®SPARCããã»ããµã§ãæ倧8ãœã±ããã®ã·ã¹ãã ã§åäœããããšãã§ããŸããé«éã§å®å®ããæ§èœãçºæ®ãã倧èŠæš¡ãªããŒã¿åŠçãä»®æ³åãªã©ã®çšéã«é©ããŠããŸãããŸããSPARC M8ã¯ã»ãã¥ãªãã£ã«ã泚åããæå·åãã¡ã¢ãªä¿è·æ©èœãªã©ã匷åãããŠããŸãã
以äžããSPARCã¢ãŒããã¯ãã£ã®äž»ãªããã»ããµã®é²åã®æŽå²ã§ããä»åŸããSPARCã¢ãŒããã¯ãã£ã¯å€§èŠæš¡ãªã·ã¹ãã ããµãŒããŒãªã©ã§æŽ»èºãç¶ããããšãæåŸ
ãããŸãã
=== DEC/Alpha ===
ãã¯ããã«ã
ãã€ã¯ãããã»ããµã®æŽå²ã¯ãçŸä»£ã®æ
å ±æè¡ã«ãããŠæ¥µããŠéèŠãªäœçœ®ãå ããŠããŸãããã®äžã§ãDEC/Alphaã¯ã1990幎代ã«ç»å Žããé«æ§èœãã€ä¿¡é Œæ§ã®é«ããµãŒããŒãã¯ãŒã¯ã¹ããŒã·ã§ã³ã«å©çšãããŸãããæ¬èšäºã§ã¯ãDEC/Alphaã®ãã€ã¯ãããã»ããµã®æŽå²ã幎衚圢åŒã§ãŸãšãããã®ç¹åŸŽãå瞟ã«ã€ããŠè§£èª¬ããŸãã
ããã€ã¯ãããã»ããµå¹Žè¡š (DEC/Alphaç·š)ã
* 1992幎: DEC/Alpha 21064
DEC/Alphaã®æåã®ãã€ã¯ãããã»ããµãšããŠç»å Žãåœä»€ãã€ãã©ã€ã³ãå©çšããŠé«éãªåŠçãå¯èœã§ãããRISCã¢ãŒããã¯ãã£ãæ¡çšããŠããã
* 1994幎: DEC/Alpha 21164
åœä»€ãã€ãã©ã€ã³ãããé«éåããããã«ããã£ãŒããã€ãã©ã€ã³ãå°å
¥ããããŸãã64ãããã¢ãŒããã¯ãã£ãæ¡çšããããšã§ã倧容éã®ã¡ã¢ãªãæ±ãããšãã§ããããã«ãªã£ãã
* 1996幎: DEC/Alpha 21264
åœä»€ãã€ãã©ã€ã³ã18段ã«æ¡å€§ããããšã§ãé«æ§èœåãå³ã£ãããŸãããã¹åž¯åå¹
ã倧å¹
ã«å¢ãããã·ã¹ãã å
šäœã®åŠçé床ãåäžãããã
* 1998幎: DEC/Alpha 21364
é«éåãšä¿¡é Œæ§ã®åäžãç®çã«ã2ã€ã®ããã»ããµã1ã€ã®ãããã«éç©ãããããã«ã»ãã€ãã©ã€ã³ã»ã¢ãŒããã¯ãã£ããæ¡çšããããŸããé«éãªã¡ã¢ãªãŒã¢ã¯ã»ã¹ãå®çŸãããã±ãŒã¹ãŒãã»ã€ã³ã¿ãªãŒããæè¡ãå°å
¥ããã
* 2001幎: DEC/Alphaããã»ããµã®çç£çµäº
DEC/Alphaããã»ããµã®çç£ãçµäºãã補åã®ãµããŒããçµäºããããšãçºè¡šããããDEC/Alphaã¯ãé«æ§èœãã€ä¿¡é Œæ§ã®é«ããµãŒããŒãã¯ãŒã¯ã¹ããŒã·ã§ã³ã«å©çšããããã®æ§èœã¯åœæã®æ
å ±æè¡ã«ãããŠäžå®ã®å°äœãç¯ããã
ãDEC/Alphaã®ç¹åŸŽãšå瞟ã
DEC/Alphaã¯ãRISCã¢ãŒããã¯ãã£ãæ¡çšããé«éãªåŠçãå¯èœã§ããããšãç¹åŸŽã§ãããŸãã64ãããã¢ãŒããã¯ãã£ãæ¡çšããããšã§ã倧容éã®ã¡ã¢ãªãæ±ãããšãã§ããããã«ãªããŸãããããã«ãåœä»€ãã€ãã©ã€ã³ããã£ãŒããã€ãã©ã€ã³ãããã«ã»ãã€ãã©ã€ã³ã»ã¢ãŒããã¯ãã£ãã±ãŒã¹ãŒãã»ã€ã³ã¿ãªãŒããªã©ã®æè¡ãå°å
¥ããé«æ§èœãã€ä¿¡é Œæ§ã®é«ããµãŒããŒãã¯ãŒã¯ã¹ããŒã·ã§ã³ãå®çŸããŸããã
DEC/Alphaã¯ã1990幎代ã«ç»å Žãããããåœæã®æ
å ±æè¡ã«ãããŠäžå®ã®å°äœãç¯ããŸãããç¹ã«ãé«æ§èœãªåŠçèœåãæã¡ã倧èŠæš¡ãªããŒã¿åŠçãé«è² è·ãªã¢ããªã±ãŒã·ã§ã³ãåŠçããããšãã§ããããããµãŒããŒãã¯ãŒã¯ã¹ããŒã·ã§ã³ã«åºãå©çšãããŸããã
ãŸããDEC/Alphaã¯ããªãŒãã³ãªã¢ãŒããã¯ãã£ãæ¡çšããŠãããããä»ç€Ÿã®è£œåãšã®äºææ§ãé«ããå€æ°ã®ãœãããŠã§ã¢ãéçºãããŸããããã®ãããDEC/Alphaã¯ãæ¥çæšæºãšããŠåºãèªç¥ãããå€ãã®äŒæ¥ãç 究æ©é¢ã§å©çšãããŸããã
DEC/Alphaã¯ã2001幎ã«çç£çµäºãçºè¡šããã補åã®ãµããŒããçµäºããŸãããããã®å瞟ã¯çŸåšã§ãé«ãè©äŸ¡ãããŠããŸããDEC/Alphaã®æè¡ã¯ãåŸã®ããã»ããµã®éçºã«åœ±é¿ãäžããçŸä»£ã®æ
å ±æè¡ã«ãããŠãéèŠãªäœçœ®ãå ããŠããŸãã
=== HP/PA-RISC ===
ãã€ã¯ãããã»ããµã®äžçã«ãããŠãHP/PA-RISCã¯éèŠãªäœçœ®ãå ããŠããŸãããã®èšäºã§ã¯ãHP/PA-RISCãã€ã¯ãããã»ããµã®æŽå²ãæ¯ãè¿ããªããããã®ç¹åŸŽã圱é¿åã«ã€ããŠçŽ¹ä»ããŸãã
HP/PA-RISCãšã¯
HP/PA-RISCã¯ãHewlett-Packard (HP) 瀟ãéçºããRISCã¢ãŒããã¯ãã£ã®ãã€ã¯ãããã»ããµã§ããPA-RISCã¯ããPrecision Architecture Reduced Instruction Set Computingãã®ç¥ç§°ã§ãé«åºŠãªèšç®èœåãæã¡ãªãããåœä»€ã»ãããã·ã³ãã«ãªç¹åŸŽãæã£ãŠããŸãã
HP/PA-RISCã®æŽå²
HP/PA-RISCã®æŽå²ã¯ã1980幎代åé ã«é¡ããŸããåœæãHPã¯èªç€Ÿã®ã³ã³ãã¥ãŒã¿äºæ¥ã«ãããŠãIBMãDECãªã©ã®ã©ã€ãã«äŒæ¥ã«è¿œãã€ãããšãç®æããŠããŸãããããã§ãHPã¯èªç€Ÿç¬èªã®ãã€ã¯ãããã»ããµãéçºããããšã決å®ããŸããã
æåã®PA-RISCããã»ããµã¯ã1986幎ã«ãªãªãŒã¹ãããPA-7100ã§ããããã®ããã»ããµã¯ã16MHzã§åäœãã32ãããã¢ãŒããã¯ãã£ã16Kã®ãã£ãã·ã¥ã¡ã¢ãªãåããŠããŸãããPA-7100ã¯ãHPã®é«æ§èœã¯ãŒã¯ã¹ããŒã·ã§ã³ã§ããHP 9000ã·ãªãŒãºã§äœ¿çšãããåœæã®ç«¶å補åã«æ¯ã¹ãŠé«éãã€é«æ§èœãªåŠçãå®çŸããŸããã
ãã®åŸãHPã¯PA-RISCã¢ãŒããã¯ãã£ãé²åãããããé«éã§é«æ§èœãªããã»ããµãéçºãç¶ããŸããã1992幎ã«ãªãªãŒã¹ãããPA-8000ã¯ãã¯ããã¯åšæ³¢æ°ã100MHzã«ãŸã§éããè¶
ã¹ã«ã©ãŒæ¹åŒã«ããåœä»€å®è¡ãæ¡çšãããªã©ãåœæã®æå
端ã®æè¡ãçã蟌ãŸããããã»ããµã§ããã
* 1996幎ã«ã¯ãPA-RISC 2.0ã¢ãŒããã¯ãã£ãå°å
¥ãããããã»ããµã®æ§èœã¯å€§å¹
ã«åäžããŸãããPA-8200ãšPA-8500ã¯ããããã550MHzã440MHzã®ã¯ããã¯åšæ³¢æ°ãèªããé«åºŠãªã¢ãŠãã»ãªãã»ãªãŒããŒå®è¡æ©èœãåããŠããŸããããããã®ããã»ããµã¯ãé«æ§èœãµãŒããŒåãã«äœ¿çšãããåœæã®ç«¶å補åã«æ¯ã¹ãŠåªããåŠçæ§èœãçºæ®ããŸããã
* 2000幎代ã«å
¥ããšãHPã¯PA-RISCã¢ãŒããã¯ãã£ãå»æ¢ããIntel Itaniumããã»ããµã«ç§»è¡ããŸãããããããPA-RISCã¢ãŒããã¯ãã£ã¯ãã®åŸãHPã®UNIXãµãŒããŒã«ãããŠããµããŒãããç¶ããŸããã
HP/PA-RISCã®ç¹åŸŽãšåœ±é¿å
HP/PA-RISCã¯ãã·ã³ãã«ãªåœä»€ã»ãããæ¡çšããããšã§ãé«éãªåŠçèœåãå®çŸããŸããããŸããPA-RISCã¯é«åºŠãªãã€ãã©ã€ã³åŠçãã¢ãŠãã»ãªãã»ãªãŒããŒå®è¡æ©èœãåããŠãããé«æ§èœãµãŒããŒãã¯ãŒã¯ã¹ããŒã·ã§ã³ãªã©ã®éèŠãªæ¥åã·ã¹ãã ã«ãããŠãé«éãã€å®å®ããåŠçãæäŸããŸããã
HP/PA-RISCã®éçºã«ãã£ãŠãRISCã¢ãŒããã¯ãã£ãæ®åããå¥æ©ãšãªã£ãããšã泚ç®ãã¹ãç¹ã§ããåœæã®ã³ã³ãã¥ãŒã¿åžå Žã«ãããŠãäž»æµã§ãã£ãCISCã¢ãŒããã¯ãã£ã«æ¯ã¹ãRISCã¢ãŒããã¯ãã£ã¯ã·ã³ãã«ãªåœä»€ã»ãããšé«éãªåŠçèœåãç¹åŸŽã§ãããHP/PA-RISCã®æåã«ãã£ãŠãRISCã¢ãŒããã¯ãã£ã¯äžè¬çã«èªç¥ãããããã«ãªãããã®åŸã®CPUã®éçºã«å€§ããªåœ±é¿ãäžããŸããã
=== HP64000 ===
* 1970幎代åŸåããã€ã¯ãããã»ããµã®æ®åãå§ãŸããæ§ã
ãªäŒæ¥ãèªç€Ÿã®è£œåã«æèŒããããšãç®æããŠããŸããããã®ææã«ãHewlett-PackardïŒä»¥äžãHPïŒã¯ãHP 64000ããšãããã€ã¯ãããã»ããµçšã®éçºã·ã¹ãã ãçºå£²ããŸãããããã¯ããœãããŠã§ã¢ãããŒããŠã§ã¢ã®éçºã«å¿
èŠãªæ©èœãäžã€ã®ã·ã¹ãã ã«ãŸãšãããã®ã§ãåœæã®ãã€ã¯ãããã»ããµéçºè
ãã¡ããé«ãè©äŸ¡ãåŸãŸããã
HP 64000ã¯ãåœæã®ãã€ã¯ãããã»ããµã®éçºç°å¢ãšããŠã¯éåžžã«å
é²çã§ããããã®ã·ã¹ãã ã¯ãCPUãã¡ã¢ãªããã£ã¹ã¯ãã©ã€ããå
¥åºåã€ã³ã¿ãã§ãŒã¹ããããã°ããŒã«ãªã©ãçµ±åãããã€ã¯ãããã»ããµã®èšèšãã補é ãŸã§ã®äžé£ã®ããã»ã¹ããµããŒãããŸããã
HP 64000ã¯ã1979幎ã«çºå£²ãããåœæã¯äŸ¡æ Œãéåžžã«é«ãã£ããããäžéšã®å€§æäŒæ¥ã倧åŠã®ç 究宀ãªã©ã§ããå©çšãããŸããã§ããããããããã®é«åºŠãªæ©èœãšä¿¡é Œæ§ã«ããããã€ã¯ãããã»ããµã®éçºã«æºãã人ã
ããã¯é«ãè©äŸ¡ãåããŸããã
ãŸããHP 64000ã®ç»å Žã«ããããã€ã¯ãããã»ããµã®éçºããã容æã«ãªãããããŸã§ã®ç
©éãªäœæ¥ã倧å¹
ã«ç°¡ç¥åããããšãã§ããããã«ãªããŸããããã®ããšããåŸã«ã³ã³ãã¥ãŒã¿ãŒç£æ¥ã®æ¥éãªçºå±ã«ç¹ããããšã«ãªããŸãã
HP 64000ã¯ãåœåã¯Intel 8085ãMotorola 6800ãªã©ã®ãã€ã¯ãããã»ããµã«å¯Ÿå¿ããŠããŸããããåŸã«Zilog Z80ãIntel 8086ãªã©ã®æ°ãããã€ã¯ãããã»ããµã«ã察å¿ããããã«ãªããŸããã
ãŸããHPã¯åŸã«ãHP 64000ãæ¡åŒµãããHP 64000Aãããããé«æ§èœãªãã€ã¯ãããã»ããµçšéçºã·ã¹ãã ãHP 9000 Series 200ããªã©ãããã«é«åºŠãªã·ã¹ãã ãçºå£²ããŸããããããã®ã·ã¹ãã ã¯ããã倧èŠæš¡ãªãããžã§ã¯ããé«åºŠãªèšèšã«å¿
èŠãªæ©èœãæäŸããããšãã§ããå€ãã®äŒæ¥ã倧åŠã§å©çšãããããã«ãªããŸããã
ããã«ãHPã¯1983幎ã«ããã€ã¯ãããã»ããµã®éçºã«å¿
èŠãªãœãããŠã§ã¢éçºããŒã«ã®äžã€ã§ãããHP-UXããçºè¡šããŸãããããã¯ãUnixãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãåºã«ãããã®ã§ãé«ãæ±çšæ§ãšä¿¡é Œæ§ãæã¡ãå€ãã®éçºè
ã«æçšãããŸããã
ãããã1990幎代ã«å
¥ããšã競åä»ç€Ÿã®å°é ããPCã®æ®åã«ãã£ãŠãHPã®ãã€ã¯ãããã»ããµéçºã·ã¹ãã ã®åžå Žã·ã§ã¢ã¯äœäžããŠãããŸãã2000幎代ã«å
¥ããšãHPã¯ãã€ã¯ãããã»ããµéçºã·ã¹ãã ããæ€éããä»ã®äºæ¥ã«æ³šåããããšã«ãªããŸããã
ããããªãããHP 64000ã¯ããã®åŸããã€ã¯ãããã»ããµã®æŽå²ã«ãããŠéèŠãªåœ¹å²ãæããç¶ããŸãããå€ãã®éçºè
ãã¡ã«ãã£ãŠå©çšããã次äžä»£ã®ãã€ã¯ãããã»ããµã®éçºã«è²¢ç®ããŸããã
ãŸããHP 64000ã®æåã¯ãä»æ¥ã®ã³ã³ãã¥ãŒã¿ãŒç£æ¥ã«ãããŠããã€ã¯ãããã»ããµéçºã«æºãã人ã
ã«ãšã£ãŠã®è²ŽéãªçµéšãšãªããŸããããã®ã·ã¹ãã ã«è§Šããããšããã人ã
ã¯ããã®åŸãèªãã®éçºã«åœ¹ç«ãŠãããšãã§ããã®ã§ãã
ä»æ¥ããã€ã¯ãããã»ããµã®éçºã¯ããããªãé«åºŠåãšå€æ§åãé²ãã§ããŸããæ°ãããã¯ãããžãŒã®ç»å Žã«ããããããŸã§ã«ãªãé«æ§èœãªãã€ã¯ãããã»ããµãçã¿åºãããŠããŸãããããããã®åºç€ãšãªãéçºç°å¢ã¯ãHP 64000ããå§ãŸã£ãæŽå²ããããŸãã
=== MIPS ===
ãã€ã¯ãããã»ããµã¯ãçŸä»£ã®ããžã¿ã«ãã¯ãããžãŒã«ãšã£ãŠäžå¯æ¬ ãªåœ¹å²ãæãããŠããŸããç¹ã«ãMIPS/MIPS64ã¯é«æ§èœã³ã³ãã¥ãŒã¿ãŒãçµã¿èŸŒã¿ã·ã¹ãã ã®åéã§éèŠãªåœ¹å²ãæãããŠããŸãããããã§ã¯ãMIPS/MIPS64ã®æŽå²ã«ã€ããŠçŽ¹ä»ãããã®éèŠæ§ã«ã€ããŠèå¯ããŠã¿ãŸãããã
MIPS/MIPS64ã®æŽå²
MIPS (Microprocessor without Interlocked Pipeline Stages)ã¯ã1980幎代åé ã«ã¹ã¿ã³ãã©ãŒã倧åŠã§éçºãããRISC (Reduced Instruction Set Computing)ã¢ãŒããã¯ãã£ã®ãã€ã¯ãããã»ããµã§ããMIPSã¯ãåœä»€ã»ããã®ç°¡çŽ åãšãã€ãã©ã€ã³åŠçã®æé©åã«ãã£ãŠé«éãªåŠçãå®çŸããçµã¿èŸŒã¿ã·ã¹ãã ãé«æ§èœã³ã³ãã¥ãŒã¿ãŒã®åéã§åºãå©çšãããããã«ãªããŸããã
* 1990幎代ã«ã¯ãMIPSã®åŠçèœåãåäžãããMIPS64ã¢ãŒããã¯ãã£ãç»å Žããé«æ§èœã³ã³ãã¥ãŒã¿ãŒããµãŒããŒãªã©ã®åéã§äœ¿çšãããããã«ãªããŸãããMIPS64ã¯ã64ãããã®ã¢ãã¬ãã·ã³ã°ããµããŒããã倧èŠæš¡ãªã¡ã¢ãªãŒã¢ãã¬ã¹ç©ºéãæ±ããããã«ãªããŸããããŸããMIPS64ã¯ãé«éãªããŒã¿åŠçãå®çŸããããã«SIMD (Single Instruction Multiple Data)åœä»€ã»ãããå°å
¥ããã°ã©ãã£ãã¯ã¹åŠçãããŒã¿ããŒã¹åŠçãªã©ã®ã¢ããªã±ãŒã·ã§ã³ã§é«ãããã©ãŒãã³ã¹ãçºæ®ããŸããã
MIPS/MIPS64ã®éèŠæ§
MIPS/MIPS64ã¯ãé«æ§èœã³ã³ãã¥ãŒã¿ãŒã®åéã§ç¹ã«éèŠãªåœ¹å²ãæãããŠããŸããå€ãã®ã¹ãŒããŒã³ã³ãã¥ãŒã¿ãŒããµãŒããŒã«æ¡çšãããé«éãªããŒã¿åŠçãèšç®åŠçãå®çŸããŠããŸãããŸããçµã¿èŸŒã¿ã·ã¹ãã ã®åéã§ããMIPS/MIPS64ã¯åºãæ¡çšãããŠããŸãã家é»è£œåãè»èŒã·ã¹ãã ããããã¯ãŒã¯æ©åšãªã©ãæ§ã
ãªåéã§å©çšãããŠããŸãã
MIPS/MIPS64ã®ã¢ãŒããã¯ãã£ã¯ãRISCã¢ãŒããã¯ãã£ã®åºæ¬ææ³ãåãç¶ãã§ãããåœä»€ã»ãããç°¡æœã§å¹ççãªãããé«éãªåŠçãå¯èœã§ãããŸããMIPS/MIPS64ã¯ããªãŒãã³ã¢ãŒããã¯ãã£ã§ãããããå€ãã®ããŒããŠã§ã¢ã¡ãŒã«ãŒããœãããŠã§ã¢éçºè
ã«ãã£ãŠãµããŒããããŠããŸãããã®ãããMIPS/MIPS64ãæ¡çšããã·ã¹ãã ã¯ããã¬ãã·ãã«ã§æ¡åŒµæ§ãé«ããã³ã¹ãããã©ãŒãã³ã¹ã«åªããŠãããšèšããŸãã
ããã«ãMIPS/MIPS64ã¯ããšãã«ã®ãŒå¹çã«ãåªããŠããŸããåœä»€ã»ãããç°¡æœã§ãããããå®è¡ã«å¿
èŠãªåè·¯ãå°ãªããé»åæ¶è²»ãå°ãªããŠæžãããã§ãããã®ãããã¢ãã€ã«ããã€ã¹ãIoTæ©åšãªã©ãããããªãŒé§åã®ã·ã¹ãã ã§ãåºãå©çšãããŠããŸãã
æè¿ã§ã¯ãMIPSã¢ãŒããã¯ãã£ãæã€äŒæ¥ãæ°å€ããããŸããäŸãã°ãäžåœã®é»åæ©åšã¡ãŒã«ãŒã§ããLoongson Technology Corporationã¯ãMIPSã¢ãŒããã¯ãã£ãæ¡çšããŠèªç€Ÿè£œåãéçºããŠããŸãããŸããã·ã³ã¬ããŒã«ã®AIäŒæ¥ã§ããHailoã¯ãMIPS64ã¢ãŒããã¯ãã£ãæ¡çšãããšããžAIããã»ããµãŒãéçºããŠããŸãããããã®äŒæ¥ã¯ãMIPS/MIPS64ã®åªããæ§èœãšãšãã«ã®ãŒå¹çã«çç®ããŠã次äžä»£ã®æè¡ãéçºããŠãããšèšããŸãã
çµè«ãšããŠãMIPS/MIPS64ã¯ãé«æ§èœãªåŠçèœåãšãšãã«ã®ãŒå¹çã«åªããã¢ãŒããã¯ãã£ã§ãããçŸä»£ã®ããžã¿ã«ãã¯ãããžãŒã«äžå¯æ¬ ãªååšã§ããããŸããŸãªåéã§åºãæ¡çšãããå€ãã®äŒæ¥ãMIPS/MIPS64ãæ¡çšãã補åãéçºããŠããŸããä»åŸããMIPS/MIPS64ã®é²åãšçºå±ãæåŸ
ãããŸãã
=== éŸè¯ ===
ãã€ã¯ãããã»ããµãšã¯ãã³ã³ãã¥ãŒã¿ãŒã«ãããŠäžå€®åŠçè£
眮 (CPU) ã®æ©èœãå®çŸããéç©åè·¯ã®ããšã§ããä»åã¯ãäžåœã®ããŒã«ã«ãªãã€ã¯ãããã»ããµã¡ãŒã«ãŒã§ããéŸè¯ (Loongson) ã®å¹Žè¡šãåãäžãããã®æŽå²ãçºå±ã«ã€ããŠçŽ¹ä»ããŸãã
éŸè¯ (Loongson) ã¯ãäžåœã®åœå®¶éç¹é«æè¡äŒæ¥ã§ããäžåœé»åæè¡éå£ (CETC) ã®äžéšéã§ããã2002幎ã«åµç«ãããŸãããåœå㯠MIPS ã¢ãŒããã¯ãã£ãããŒã¹ã«ããããã»ããµãŒãéçºããŠããŸããããçŸåšã¯ RISC-V ã¢ãŒããã¯ãã£ãæ¡çšããŠããŸãã
以äžã¯ãéŸè¯ã®äž»ãªãã€ã«ã¹ããŒã³ãæ¯ãè¿ããã€ã¯ãããã»ããµå¹Žè¡šã§ãã
* 2002幎
éŸè¯æè¡æéå
¬åžãèšç«ããã
* 2004幎
Loongson-1A ããã»ããµããªãªãŒã¹
* 2005幎
äžå€®æ¿åºããéŸè¯èšç»ããçºè¡šããããŒã«ã«ãªãã€ã¯ãããã»ããµç£æ¥ã®çºå±ãæ¯æŽããããšãè¡šæ
* 2006幎
Loongson-2E ããã»ããµããªãªãŒã¹
* 2007幎
Loongson-2F ããã»ããµããªãªãŒã¹
* 2008幎
Loongson-3 ããã»ããµããªãªãŒã¹
Lenovo ã Loongson-2F ããã»ããµãæèŒããããŒãããœã³ã³ãçºè¡š
* 2010幎
Loongson-3A ããã»ããµããªãªãŒã¹
* 2011幎
Loongson-3B ããã»ããµããªãªãŒã¹
Dawning Information Industry ã Loongson-3B ããã»ããµãæèŒããã¹ãã³ã³ãçºè¡š
* 2012幎
Loongson-3C ããã»ããµããªãªãŒã¹
* 2013幎
Loongson-3H ããã»ããµããªãªãŒã¹
Loongson Technology Europe ãèšç«ããã欧å·åžå Žã§ã®ããžãã¹ãéå§
* 2014幎
Loongson-3B2000 ããã»ããµããªãªãŒã¹
* 2015幎
Loongson-3A4000 ããã»ããµããªãªãŒã¹
* 2016幎
Loongson-3B3000 ããã»ããµããªãªãŒã¹
äžåœç§åŠé¢ã Loongson-3B ããã»ããµãæèŒããã¹ãã³ã³ãçºè¡š
* 2017幎
Loongson-3B4000 ããã»ããµããªãªãŒã¹
* 2018幎
Loongson-3A5000 ããã»ããµããªãªãŒã¹
* 2019幎
Loongson-3A5000 ããã»ããµãæèŒããããŒãããœã³ã³ãçºå£²ããã
* 2020幎
Loongson-3A5000 ããã»ããµãæèŒããããŒãããœã³ã³ãæ¹è¯ãããããé«ãæ§èœãæäŸããããã«ãªã
* 2021幎
éŸè¯ã¯ãLoongArch ã¢ãŒããã¯ãã£ã®æåã®ããŒãžã§ã³ã§ãã LoongArch1 ãçºè¡šããRISC-V ã¢ãŒããã¯ãã£ã«ç§»è¡ããããšã宣èš
以äžããéŸè¯ã®äž»ãªãã€ã«ã¹ããŒã³ãšãªããŸããéŸè¯ã¯ãããŒã«ã«ãªãã€ã¯ãããã»ããµã¡ãŒã«ãŒãšããŠãäžåœã®ITç£æ¥ã«ãããŠéèŠãªåœ¹å²ãæãããŠããŸããä»åŸããé«æ§èœã§äœäŸ¡æ Œãªããã»ããµãŒã®éçºã«æ³šåããäžåœã®ITç£æ¥ã®çºå±ãæ¯æŽããããšãæåŸ
ãããŸãã
=== RISC-V ===
ãã€ã¯ãããã»ããµæè¡ã¯ãçŸä»£ã®ããããé»åæ©åšã«äžå¯æ¬ ãªèŠçŽ ã§ãããããŠãRISC-VãšåŒã°ãããªãŒãã³ãœãŒã¹ã¢ãŒããã¯ãã£ã®é²åã¯ããã®åéã«é©æ°ããããããŠããŸãã以äžã§ã¯ãRISC-Vã¢ãŒããã¯ãã£ã®æŽå²ãšé²åã«ã€ããŠå¹Žè¡šã§æ¯ãè¿ããŸãã
* 2010幎 - UC Berkeleyã§RISC-Vãããžã§ã¯ããå§å
UC Berkeleyã®ããããã»ãã¿ãŒãœã³æ°ãšKrste AsanoviÄæ°ã«ãã£ãŠããªãŒãã³ãœãŒã¹ã®ããŒããŠã§ã¢ããã³ãœãããŠã§ã¢ãããžã§ã¯ãã§ããRISC-VãéçºãããŸãããRISC-Vã¯ãæšæºåãããåœä»€ã»ããã¢ãŒããã¯ãã£ïŒISAïŒãæäŸãããã¿ãŒãœã³æ°ãéçºããRISCã¢ãŒããã¯ãã£ã®ååã«åºã¥ããŠããŸãã
* 2014幎 - SiFiveãèšç«ããã
SiFiveã¯ãRISC-Vã¢ãŒããã¯ãã£ã®æ®åã«æ³šåããäŒæ¥ãšããŠèšç«ãããŸãããå瀟ã¯ããªãŒãã³ãœãŒã¹ã®RISC-Vã³ã¢ã䜿ã£ãããã»ããµã®éçºãããµããŒããæäŸããŠããŸãã
* 2015幎 - RISC-Vãã¡ãŠã³ããŒã·ã§ã³ãèšç«ããã
RISC-Vãã¡ãŠã³ããŒã·ã§ã³ã¯ããªãŒãã³ãœãŒã¹ã®RISC-Vã¢ãŒããã¯ãã£ã®éçºãæ®åãç®çãšããŠèšç«ãããŸãããåãã¡ãŠã³ããŒã·ã§ã³ã«ã¯ããœãããŠã§ã¢ãããŒããŠã§ã¢ã®äŒæ¥ãåå ããŠãããRISC-Vã¢ãŒããã¯ãã£ã®æ®åã«åããæ§ã
ãªæŽ»åãå±éããŠããŸãã
* 2016幎 - GoogleãRISC-Vãããžã§ã¯ãã«åå
Googleã¯ãRISC-Vãããžã§ã¯ãã«åå ãããªãŒãã³ãœãŒã¹ã®RISC-Vããã»ããµã®éçºã«æ³šåããŠããŸããå瀟ã¯ãRISC-Vã䜿ã£ãAIãããã®éçºãããµãŒããŒåãã®ããã»ããµã®éçºãªã©ãé²ããŠããŸãã
* 2017幎 - NVIDIAãRISC-Vãããžã§ã¯ãã«åå
NVIDIAã¯ãRISC-Vãããžã§ã¯ãã«åå ãããªãŒãã³ãœãŒã¹ã®RISC-Vã³ã¢ã䜿ã£ãããã»ããµã®éçºã«æ³šåããŠããŸããå瀟ã¯ããšããžããã€ã¹åãã®ããã»ããµã®éçºãªã©ãé²ããŠããŸãã
* 2018幎 - Western DigitalãRISC-Vãæ¡çš
Western Digitalã¯ãã¹ãã¬ãŒãžããã€ã¹åãã®RISC-Vããã»ããµãæ¡çšããå瀟ã®è£œåã«çµã¿èŸŒãããšãçºè¡šããŸãããå瀟ã¯ãé«æ§èœãã€äœæ¶è²»é»åãªããã»ããµãå¿
èŠãªã¹ãã¬ãŒãžåžå Žã§ãRISC-Vãæ¡çšããããšã§ç«¶äºåãé«ããŠããŸãã
* 2019幎 - AmazonãRISC-Vãããžã§ã¯ãã«åå
Amazonã¯ãRISC-Vãããžã§ã¯ãã«åå ããå瀟ã®AWSã¯ã©ãŠãåãã«RISC-Vããã»ããµãéçºããããšãçºè¡šããŸãããå瀟ã¯ãã«ã¹ã¿ãã€ãºãããããã»ããµã«ãã£ãŠã¯ã©ãŠãã®ããã©ãŒãã³ã¹ãåäžãããããšãç®æããŠããŸãã
* 2020幎 - AppleãRISC-Vãæ¡çš
Appleã¯ãèªç€Ÿã®è£œåã«ãããŠRISC-Væè¡ãæ¡çšããããšãæããã«ããŸãããå瀟ã¯ãRISC-Vã䜿ã£ãããããéçºããAppleã®è£œåã«çµã¿èŸŒãããšã§ãé«æ§èœãã€äœæ¶è²»é»åãªè£œåãæäŸããããšãç®æããŠããŸãã
* 2021幎 - RISC-VãIoTåžå Žã§ã®æ¡çšãé²ã
RISC-Vã¯ãäœæ¶è²»é»åã§å°åãªIoTããã€ã¹ã«é©ããããã»ããµãšããŠæ³šç®ãéããŠããŸããå幎ãRISC-Vãæ¡çšããIoTããã€ã¹ã®æ°ãæ¥éã«å¢å ããRISC-Vã¢ãŒããã¯ãã£ãIoTåžå Žã§ã®ããã»ããµã®æšæºã«ãªãå¯èœæ§ãé«ãŸã£ãŠããŸãã
RISC-Vã¯ããªãŒãã³ãœãŒã¹ã§ãããããå€ãã®äŒæ¥ãéçºè
ãåå ããé²åãç¶ããŠããŸããä»åŸããRISC-Vã¢ãŒããã¯ãã£ã¯æ§ã
ãªåéã§ã®é©æ°ãããããããã€ã¯ãããã»ããµæè¡ã®çºå±ã«å¯äžããããšãæåŸ
ãããŸãã
=== Zilog ===
* 1970幎代ãã1980幎代ã«ãããŠããã€ã¯ãããã»ããµæè¡ã®é²æ©ã¯é©ç°çã§ããããã®äžã§ããZilog瀟ã®åµèšè
ã§ãããã§ããªã³ã»ãã¡ã®ã³ãéçºãããZ80ãã¯ãç¹ã«ã³ã³ãã¥ãŒã¿ãŒç£æ¥ã«ãããŠå€§ããªåœ±é¿ãäžããŸããããã®èšäºã§ã¯ãZilog瀟ããªãªãŒã¹ãããã€ã¯ãããã»ããµã®æŽå²ã蟿ãããã®éèŠæ§ã«ã€ããŠèå¯ããŠã¿ãããšæããŸãã
ãZ80ã®èªçã
* 1976幎ã«ãªãªãŒã¹ãããZ80ã¯ã8ããããã€ã¯ãããã»ããµã®äžã§ãæãæåãã補åã®äžã€ã§ããåœæã®åžå Žã«ã¯ãIntelã®ã8080ããMotorolaã®ã6800ããªã©ã®ç«¶å補åããããŸããããZ80ã¯ãã®2ã€ãåé§ããæ§èœãçºæ®ããŸãããZ80ã¯ãæ倧2.5MHzã§åäœãã64KBã®ã¡ã¢ãªç©ºéãæ±ãããšãã§ããŸããã
ãZ80ã®æåã
Z80ã¯ãåœåã¯ãã¬ãã®ãªã¢ã³ã³ãé»åãªã©ã®å°å家é»è£œåã«äœ¿ãããããšãæ³å®ããŠããŸããããåŸã«ã³ã³ãã¥ãŒã¿ãŒç£æ¥ã«ãããŠã倧ããªæåãåããŸãããZ80ãæèŒããã³ã³ãã¥ãŒã¿ãŒã¯ãåœæã®ããžãã¹åžå Žã«ãããŠå€§ããªåœ¹å²ãæãããCP/MãšåŒã°ãããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®æšæºçãªåäœç°å¢ãšãªããŸããããŸããZ80ã¯ã¢ãŒã±ãŒãã²ãŒã æ©ã«ãåºã䜿ãããåœæã®äººã
ã«ãšã£ãŠäžå¯æ¬ ãªãšã³ã¿ãŒãã€ã¡ã³ãã®äžã€ãšãªããŸããã
ãZ80ã®åŸç¶ã
Z80ã¯ããã®åŸãæ¹è¯ãç¶ããããZ180ãZ280ãšãã£ãåŸç¶è£œåããªãªãŒã¹ãããŸããããŸããZilog瀟ã¯Z80ã®ã©ã€ã»ã³ã¹ãå€æ°ã®äŒæ¥ã«æäŸããããšã§ãåºç¯ãªåžå Žãç²åŸããããšã«æåããŸãããããã«ãZilog瀟ã¯MCUïŒãã€ã¯ãã³ã³ãããŒã©ãŠãããïŒã«ãé²åºããçŸåšã§ãå¹
åºãåéã§æŽ»èºããŠããŸãã
ããŸãšãã
Zilog瀟ããªãªãŒã¹ããZ80ã¯ããã€ã¯ãããã»ããµæè¡ã®æŽå²ã«ãããŠéèŠãªäœçœ®ãå ããŠããŸããZ80ã¯ãå€ãã®åéã«ãããŠå
é²çãªæ§èœãçºæ®ããã³ã³ãã¥ãŒã¿ãŒç£æ¥ã«å€§ããªåœ±é¿ãäžããŸããããŸããZilog瀟ã¯Z80ã®æåãèæ¯ã«ãMCUåžå Žã§ã掻èºããããã«ãªããŸãããä»åŸããZilog瀟ãæäŸããæè¡ãäžçãå€ããå¯èœæ§ããããšèšããŸãã
=== æ¥æ¬è£œããã»ããµ ===
ãã€ã¯ãããã»ããµãšã¯ãã³ã³ãã¥ãŒã¿ã®äžæ žãšãªãéšåã§ãããçŸä»£ã®ããžã¿ã«æ©åšã«æ¬ ãããªããã®ãšãªã£ãŠããŸããä»åã¯ããã®äžã§ãæ¥æ¬ã§è£œé ããããã€ã¯ãããã»ããµã«çŠç¹ãåœãŠããã€ã¯ãããã»ããµã®é²åãæ¯ãè¿ã£ãŠãããããšæããŸãã
* 1971幎
æ¥æ¬ã®é»æ°é信倧åŠã®ç³äºè±äžéææããIntel瀟ã®4004ã«çæ³ãåŸãŠãåã®æ¥æ¬è£œãã€ã¯ãããã»ããµã§ãããTCM1000ããéçºãããããåžå Žã«ã¯æµžéããªãã£ãã
* 1978幎
æŸäžé»åšç£æ¥ïŒçŸã»ãããœããã¯ïŒãã4ããããã€ã¯ãããã»ããµãMN1610ããéçºãäž»ã«å®¶é»è£œåã®å¶åŸ¡ã«äœ¿ãããã
* 1982幎
æ¥ç«è£œäœæã16ããããã€ã¯ãããã»ããµãHD64180ããéçºãåœæã¯æ¥æ¬è£œã®16ããããã€ã¯ãããã»ããµã¯ååšããã倧ããªæ³šç®ãéããã
* 1985幎
æ¥æ¬é»æ°ïŒNECïŒã16ããããã€ã¯ãããã»ããµãV30ããéçºãIntel瀟ã®ã8086ãäºæåã§ãããIBMã®PC/ATäºææ©åãã«æ¡çšãããã
* 1987幎
å¯å£«éã32ããããã€ã¯ãããã»ããµãMB86900ããéçºãUNIXãµãŒããã¯ãŒã¯ã¹ããŒã·ã§ã³ã§äœ¿ãããã
* 1990幎
æ¥ç«è£œäœæã32ããããã€ã¯ãããã»ããµãSH-1ããéçºãããŒããŠã§ã¢æµ®åå°æ°ç¹æŒç®åšãæèŒããããžã¿ã«ã«ã¡ã©ãæºåž¯é»è©±ãªã©ã«åºã䜿ãããã
* 1993幎
ã«ããµã¹ãšã¬ã¯ãããã¯ã¹ïŒæ§ã»æ¥æ¬é»æ°åå°äœïŒãã32ããããã€ã¯ãããã»ããµãV850ããéçºãèªåè»å¶åŸ¡ã·ã¹ãã ãªã©ã«åºã䜿ãããŠããã
* 2002幎
å¯å£«éãšæ±èãå
±åéçºãã64ããããã€ã¯ãããã»ããµãSPARC64 VãããUNIXãµãŒããã¹ãŒããŒã³ã³ãã¥ãŒã¿ãªã©ã«æ¡çšãããã
以äžããæ¥æ¬è£œãã€ã¯ãããã»ããµã®äž»ãªå¹Žè¡šã§ããæ¥æ¬è£œã®ãã€ã¯ãããã»ããµã¯ãããããã®ç¹åŸŽã掻ãããŠå€æ§ãªçšéã§å©çšãããŠããŸããããã®äžã§ãç¹çãã¹ãã¯ãèªåè»å¶åŸ¡ã·ã¹ãã ãããžã¿ã«ã«ã¡ã©ãæºåž¯é»è©±ãšãã£ãå°åæ©åšã«äœ¿ãããŠããããšã§ãããããã®æ©åšã«ã¯ãçé»åãé«éåŠçãšãã£ãèŠçŽ ãæ±ããããŸããæ¥æ¬è£œã®ãã€ã¯ãããã»ããµã¯ãããããã®åéã§é«ãè©äŸ¡ãåŸãŠããŸãã
ãŸããæ¥æ¬ã®ãã€ã¯ãããã»ããµã¡ãŒã«ãŒã¯ã競äºåãç¶æããããã«ãæ°ããæè¡ã®éçºã«æ³šåããŠããŸããäŸãã°ãã«ããµã¹ãšã¬ã¯ãããã¯ã¹ã¯ãèªåè»çšã®é«ééä¿¡æè¡ãCAN-FDãã«å¯Ÿå¿ãããã€ã¯ãããã»ããµãéçºããŠããŸãããŸããæ±èã¯ãçé»åæè¡ãSpursEngineããæèŒãããã€ã¯ãããã»ããµãéçºããŠããŸãã
æ¥æ¬ã®ãã€ã¯ãããã»ããµã¡ãŒã«ãŒã¯ãä»åŸãäžçã«éçšããæè¡ãéçºããåœå
å€ã®æ§ã
ãªåéã§æŽ»èºããããšãæåŸ
ãããŸãã
=== i432/i860/i960/Itanium ===
ãã€ã¯ãããã»ããµã¯ãçŸä»£ã®é»åæ©åšã®ããã¯ããŒã³ã圢æããéèŠãªã³ã³ããŒãã³ãã§ããi432ãi860ãi960ãã€ã¯ãããã»ããµã¯ãä»æ¥ã®é«æ§èœããã»ããµã®çºå±ãæããé©åœçãªãããã§ãã
i432ã¯ãã€ã³ãã«ãéçºããåã®32ãããããã»ããµã§ããã1978幎ã«çºå£²ãããŸãããi432ã¯ãåœä»€ã»ããã¢ãŒããã¯ãã£ïŒISAïŒã®èšèšãè€éã§ãæ§èœãäœãããšãåé¡ã§ããããã®ãããi432ã¯åæ¥çã«æåããããšã¯ãããŸããã§ããã
i860ã¯ã1989幎ã«ãªãªãŒã¹ãããRISCïŒReduced Instruction Set ComputingïŒãã€ã¯ãããã»ããµã§ãããi860ã¯ãã°ã©ãã£ãã¯ã¹ãä¿¡å·åŠçãªã©ã®é«åºŠãªã¢ããªã±ãŒã·ã§ã³åãã«èšèšãããŠãããå€æ°ã®ããã»ããµãæèŒããã·ã¹ãã ã«äœ¿çšãããŸããã
i960ã¯ãi860ã®åŸç¶ãšããŠ1990幎ã«ãªãªãŒã¹ãããŸãããi960ã¯ãé«æ§èœãªãã«ãã¿ã¹ã¯åŠçèœåãåããã°ã©ãã£ãã¯ã¹ãä¿¡å·åŠçãªã©ã®ã¢ããªã±ãŒã·ã§ã³ã«æé©ã§ãããi960ã¯ãããŸããŸãªåéã§äœ¿çšãããç¹ã«ãããã¯ãŒã¯æ©åšãçµã¿èŸŒã¿ã·ã¹ãã ã«é©ããŠããŸããã
ããããIntelã®i960ã·ãªãŒãºã¯ã競åä»ç€Ÿã®è£œåãšæ¯èŒããŠé«äŸ¡ã§ãããšããåé¡ããããæåããªãã£ããšèããããŠããŸãã
Intelã¯ã2001幎ã«Itaniumããã»ããµããªãªãŒã¹ããŸãããItaniumã¯ãIntelã®64ãããããã»ããµã§ãããé«æ§èœã§ä¿¡é Œæ§ã®é«ããµãŒããŒåãã«èšèšãããŠããŸãããItaniumã¯ãè€æ°ã®ã³ã¢ãæèŒããé«åºŠãªäžŠååŠçèœåãæã¡ãé«åºŠãªã¡ã¢ãªã¢ãŒããã¯ãã£ãåããŠããŸããã
Itaniumã¯ãæåã¯é«ãæåŸ
ãå¯ããããŠããŸãããããœãããŠã§ã¢ã®äºææ§ã®åé¡ããããåžå Žã«æµžéããããšã¯ã§ããŸããã§ããã競åããx86ã¢ãŒããã¯ãã£ã«æ¯ã¹ãŠé«äŸ¡ã§ãããItaniumã«æé©åããããœãããŠã§ã¢ãäžè¶³ããŠããããšãäž»ãªèŠå ãšãããŠããŸãã
以äžã®ããã«ãi432ãi860ãi960ãItaniumã¯ãããããã®æ代ã«ãããŠé©æ°çãªãã€ã¯ãããã»ããµã§ãã£ããã®ã®ãããã€ãã®åé¡ã«ããåæ¥çã«æåããããšãã§ããŸããã§ããããããããããã®ããã»ããµã¯ãçŸä»£ã®ããã»ããµã®é²åãæ¯ããæè¡ã®åºç€ãšãªããã³ã³ãã¥ãŒã¿ç§åŠã®çºå±ã«å€§ããªåœ±é¿ãäžãããšèšããŸãã
==ããã»ããµã®åé¡ãšçš®é¡ ==
ããã»ããµã¯ãã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®äžå¿çãªåœ¹å²ãæããéšåã§ãããæŒç®åŠçãããŒã¿åŠçãæ
åœããŠããŸããããã»ããµã®çš®é¡ãæ§èœã¯ãã³ã³ãã¥ãŒã¿ãŒã·ã¹ãã ã®æ§èœãæ©èœæ§ã«å€§ããªåœ±é¿ãäžããŸãã
=== RISCããã»ããµãšCISCããã»ããµ ===
RISCããã»ããµãŒãšCISCããã»ããµãŒã¯ãã³ã³ãã¥ãŒã¿ãŒããã»ããµãŒã®ã¢ãŒããã¯ãã£ã®èšèšæ¹æ³è«ãè¡šãçšèªã§ãããã»ããµãŒãå®è¡ããåœä»€ã®çš®é¡ãæ©èœãããã³ããã»ããµãŒå
éšã§ãããã®åœä»€ãåŠçããæ¹æ³ã«é¢ããéãã«åºã¥ããŠããŸãã
CISCããã»ããµãŒã¯ãå€æ§ãªåœä»€ã»ãããæã€ããšãç¹åŸŽã§ãã¡ã¢ãªã¢ã¯ã»ã¹ãæ¡ä»¶åå²ãç®è¡æŒç®ãããã³ãã®ä»ã®æ©èœãå«ã¿ãŸããCISCããã»ããµãŒã¯ãé«åºŠãªæ©èœãå®çŸããããã«å€æ§ãªåœä»€ãæã£ãŠãããè€éãªèšç®ãåŠçãå¿
èŠãªå Žåã«ã¯é«éã«åŠçãè¡ãããšãã§ããŸãããåœä»€ã»ããã®è€éããšé«åºŠãªæ©èœã«ãããããã»ããµãŒã®èšèšãšè£œé ã«å€§ããªã³ã¹ãããããå¯èœæ§ããããŸãã
äžæ¹ãRISCããã»ããµãŒã¯ãåçŽãªåœä»€ã»ãããæã€ããšãç¹åŸŽã§ãåºæ¬çãªç®è¡æŒç®ããããæŒç®ãããŒã/ã¹ãã¢æäœãããã³æ¡ä»¶åå²ãå«ã¿ãŸããRISCããã»ããµãŒã¯ãååœä»€ãå®è¡ãããéã«åäžã®ãµã€ã¯ã«ããå¿
èŠãšããªãå Žåãã»ãšãã©ã§ãåœä»€ã»ãããæ¯èŒçç°¡çŽ ã§ãããããããã»ããµãŒã®èšèšãšè£œé ã«äœãã³ã¹ãããããå¯èœæ§ããããŸãã
CISCãšRISCã®éãã«é¢ããè°è«ã¯ãããã»ããµãŒèšèšã®åéã§é·å¹Žç¶ããŠããŸãããšã³ãžãã¢ã®äžã«ã¯ãRISCã®ã¢ãããŒããã·ã³ãã«ã§ãããå¹ççãªããã»ããµãŒãèšèšããããšãã§ãããšäž»åŒµãã人ãããŸãããCISCã®ã¢ãããŒããå€æ§ãªæ©èœããµããŒãããããã«å¿
èŠã§ãããé«åºŠãªããã»ããµãŒãèšèšããããšãã§ãããšäž»åŒµãã人ãããŸãã
æè¿ã®ããã»ããµã§ã¯ãCISCãšRISCã®ç¹åŸŽãçµã¿åããããã€ããªããã¢ãŒããã¯ãã£ãæ¡çšãããããšããããŸããããã«ãããé«åºŠãªæ©èœãå®çŸãã€ã€ãé«éã§å¹ççãªåŠçãå¯èœã«ãªããŸãããã ãããã€ããªããã¢ãŒããã¯ãã£ã¯è€éãªãããèšèšãéçºã«æéããããå¯èœæ§ããããŸã
=== VLIWããã»ããµ ===
VLIWïŒVery Long Instruction WordïŒã¯ãè€æ°ã®åœä»€ã1ã€ã®é·ãåœä»€ã¯ãŒãã«ãŸãšããŠåæã«å®è¡ã§ããã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ã§ããããã«ãããè€æ°ã®åœä»€ãåæã«åŠçããããšã§ãããã»ããµã®æ§èœãåäžãããããšãã§ããŸãã
VLIWããã»ããµã¯ãè€æ°ã®åœä»€ãåæã«å®è¡ããããšãã§ããããããã€ãã©ã€ã³åŠçã容æã«ãªããŸãããããŠãåœä»€ããã€ãã©ã€ã³åŠçããããã®ä»çµã¿ãæã£ãŠãããããåœä»€ãé«éãã€å¹ççã«åŠçããããšãã§ããŸãã
ãã ããVLIWããã»ããµã¯ãåœä»€ã1ã€ã®é·ãã¯ãŒãã«ããã¯ãããããåæã«å®è¡ã§ããåœä»€ã®æ°ãå¶éãããŸãããŸããåœä»€ãæé©ã«ããã¯ããå¿
èŠããããããããã°ã©ããŒã«å¶çŽããããŸããããã«ãããã»ããµããšã«æé©ãªåœä»€ã®ããã¯æ¹æ³ãç°ãªããããããã°ã©ããŒã¯ããã»ããµããšã«æé©ãªåœä»€ã®ããã¯æ¹æ³ãæ¢ãå¿
èŠããããŸãã
VLIWããã»ããµã¯ãäžè¬çã«çµã¿èŸŒã¿ã·ã¹ãã ãã°ã©ãã£ãã¯ã¹åŠçãªã©ã®ç¹å®ã®ã¢ããªã±ãŒã·ã§ã³ã«äœ¿çšãããŸãããããã®ã¢ããªã±ãŒã·ã§ã³ã§ã¯ãé«éãªåŠçãå¿
èŠã§ãããVLIWããã»ããµãåªããæ§èœãçºæ®ããããšããããŸãã
VLIWã¢ãŒããã¯ãã£ã®éçºè
ã¯ãåœä»€ã»ããã¢ãŒããã¯ãã£ïŒISAïŒã®èšèšè
ãšååããå¿
èŠããããŸããISAã®èšèšè
ã¯ãããã°ã©ããŒãæé©ãªåœä»€ã®ããã¯æ¹æ³ãæ¢ãããã®æ
å ±ãæäŸããå¿
èŠããããŸãããŸããISAã®èšèšè
ã¯ãVLIWã¢ãŒããã¯ãã£ã«æé©ãªåœä»€ã»ãããèšèšããããšãæ±ããããŸãã
=== ãã«ãããã»ããµã·ã¹ãã ã®æŠèŠ ===
== ã³ã³ãã¥ãŒã¿ãŒã»ãã¥ãªã㣠==
=== ã³ã³ãã¥ãŒã¿ãŒã»ãã¥ãªãã£ã®è
åšãšå¯Ÿç ===
=== ã¢ã¯ã»ã¹å¶åŸ¡ãšæå·åæè¡ ===
=== ãããã¯ãŒã¯ã»ãã¥ãªãã£ãšè匱æ§å¯Ÿç ===
== ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®å¿çš ==
=== æ§ã
ãªå¿çšåéã§ã®ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®æŽ»çšäŸ ===
=== ãã€ããã©ãŒãã³ã¹ã³ã³ãã¥ãŒãã£ã³ã°ãšéåã³ã³ãã¥ãŒãã£ã³ã° ===
=== IoT(Internet of Things)ããšããžã³ã³ãã¥ãŒãã£ã³ã°ã®æè¡åå ===
== ãããã« ==
=== ã³ã³ãã¥ãŒã¿ãŒã¢ãŒããã¯ãã£ãŒã®å°æ¥ã«ã€ã㊠===
=== ãŸãšã ===
[[ã«ããŽãª:ã³ã³ãã¥ãŒã¿|ããããŠãã¡ãã]] | 2023-03-09T07:14:15Z | 2023-12-06T22:54:10Z | [
"ãã³ãã¬ãŒã:ã³ã©ã "
] | https://ja.wikibooks.org/wiki/%E3%82%B3%E3%83%B3%E3%83%94%E3%83%A5%E3%83%BC%E3%82%BF%E3%83%BC%E3%82%A2%E3%83%BC%E3%82%AD%E3%83%86%E3%82%AF%E3%83%81%E3%83%A3%E3%83%BC |
37,201 | ããŒã¿æ§é /挞è¿èšæ³ | ã¯ããã«(è±)- 挞è¿èšæ³(è±)- é
å(è±)- ãªã¹ãæ§é ãšã€ãã¬ãŒã¿ãŒ(è±) ã¹ã¿ãã¯ãšãã¥ãŒ(è±)- æšæ§é (è±)- æå°ããŒããšæ倧ããŒã(è±)- ã°ã©ã(è±) ããã·ã¥ããŒãã«(è±)- éå(è±)- ãã¬ãŒããªã(è±)
挞è¿è¡šèšæ³ã¯ãã¢ã«ãŽãªãºã ã®æ§èœãè©äŸ¡ããããã®ããŒã«ã§ãããèšç®è³æºãå¢ããã«ã€ããŠã¢ã«ãŽãªãºã ã®å®è¡æéãã©ã®ããã«å€åããããè¡šçŸããŸãããã®æ¬ã§ã¯ã挞è¿è¡šèšæ³ã®3ã€ã®äž»èŠãªçš®é¡(ããã°ãªãŒããªã¡ã¬ãã·ãŒã¿è¡šèšæ³)ã玹ä»ããŸãããããã®è¡šèšæ³ã¯ãã¢ã«ãŽãªãºã ã®å®è¡æéãäºæž¬ããæ¯èŒããããã«é »ç¹ã«äœ¿çšãããŸãã
挞è¿è¡šèšæ³ã䜿çšãããšãã¢ã«ãŽãªãºã ã®å®è¡æéãçŽæ¥æž¬å®ããå¿
èŠããªããã¢ã«ãŽãªãºã ãå®è£
ããåã«å¹ççãªã¢ã«ãŽãªãºã ãéžæã§ããŸãã挞è¿è¡šèšæ³ã¯ãç°ãªãã¢ã«ãŽãªãºã ã®å®è¡æéãæ¯èŒããããã«äœ¿çšããããããã¢ã«ãŽãªãºã ã®éžæã«åœ¹ç«ã¡ãŸãã
挞è¿è¡šèšæ³ã¯ãã¢ã«ãŽãªãºã ã®æ§èœã«ã€ããŠã®äžè¬çãªæŽå¯ãæäŸããŸãããå®éã®å®è¡æéã¯ç°ãªãå ŽåããããŸããã¢ã«ãŽãªãºã ã®å®è¡æéã¯ãå®éã®å
¥åãµã€ãºããã¢ã«ãŽãªãºã ã®å®è£
æ¹æ³ã«ãã£ãŠç°ãªãå ŽåããããŸãã
ã¯ããã«(è±)- 挞è¿èšæ³(è±)- é
å(è±)- ãªã¹ãæ§é ãšã€ãã¬ãŒã¿ãŒ(è±) ã¹ã¿ãã¯ãšãã¥ãŒ(è±)- æšæ§é (è±)- æå°ããŒããšæ倧ããŒã(è±)- ã°ã©ã(è±) ããã·ã¥ããŒãã«(è±)- éå(è±)- ãã¬ãŒããªã(è±) | [
{
"paragraph_id": 0,
"tag": "p",
"text": "ã¯ããã«(è±)- 挞è¿èšæ³(è±)- é
å(è±)- ãªã¹ãæ§é ãšã€ãã¬ãŒã¿ãŒ(è±) ã¹ã¿ãã¯ãšãã¥ãŒ(è±)- æšæ§é (è±)- æå°ããŒããšæ倧ããŒã(è±)- ã°ã©ã(è±) ããã·ã¥ããŒãã«(è±)- éå(è±)- ãã¬ãŒããªã(è±)",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "挞è¿è¡šèšæ³ã¯ãã¢ã«ãŽãªãºã ã®æ§èœãè©äŸ¡ããããã®ããŒã«ã§ãããèšç®è³æºãå¢ããã«ã€ããŠã¢ã«ãŽãªãºã ã®å®è¡æéãã©ã®ããã«å€åããããè¡šçŸããŸãããã®æ¬ã§ã¯ã挞è¿è¡šèšæ³ã®3ã€ã®äž»èŠãªçš®é¡(ããã°ãªãŒããªã¡ã¬ãã·ãŒã¿è¡šèšæ³)ã玹ä»ããŸãããããã®è¡šèšæ³ã¯ãã¢ã«ãŽãªãºã ã®å®è¡æéãäºæž¬ããæ¯èŒããããã«é »ç¹ã«äœ¿çšãããŸãã",
"title": ""
},
{
"paragraph_id": 2,
"tag": "p",
"text": "挞è¿è¡šèšæ³ã䜿çšãããšãã¢ã«ãŽãªãºã ã®å®è¡æéãçŽæ¥æž¬å®ããå¿
èŠããªããã¢ã«ãŽãªãºã ãå®è£
ããåã«å¹ççãªã¢ã«ãŽãªãºã ãéžæã§ããŸãã挞è¿è¡šèšæ³ã¯ãç°ãªãã¢ã«ãŽãªãºã ã®å®è¡æéãæ¯èŒããããã«äœ¿çšããããããã¢ã«ãŽãªãºã ã®éžæã«åœ¹ç«ã¡ãŸãã",
"title": ""
},
{
"paragraph_id": 3,
"tag": "p",
"text": "挞è¿è¡šèšæ³ã¯ãã¢ã«ãŽãªãºã ã®æ§èœã«ã€ããŠã®äžè¬çãªæŽå¯ãæäŸããŸãããå®éã®å®è¡æéã¯ç°ãªãå ŽåããããŸããã¢ã«ãŽãªãºã ã®å®è¡æéã¯ãå®éã®å
¥åãµã€ãºããã¢ã«ãŽãªãºã ã®å®è£
æ¹æ³ã«ãã£ãŠç°ãªãå ŽåããããŸãã",
"title": ""
},
{
"paragraph_id": 4,
"tag": "p",
"text": "ã¯ããã«(è±)- 挞è¿èšæ³(è±)- é
å(è±)- ãªã¹ãæ§é ãšã€ãã¬ãŒã¿ãŒ(è±) ã¹ã¿ãã¯ãšãã¥ãŒ(è±)- æšæ§é (è±)- æå°ããŒããšæ倧ããŒã(è±)- ã°ã©ã(è±) ããã·ã¥ããŒãã«(è±)- éå(è±)- ãã¬ãŒããªã(è±)",
"title": ""
}
] | 挞è¿è¡šèšæ³ã¯ãã¢ã«ãŽãªãºã ã®æ§èœãè©äŸ¡ããããã®ããŒã«ã§ãããèšç®è³æºãå¢ããã«ã€ããŠã¢ã«ãŽãªãºã ã®å®è¡æéãã©ã®ããã«å€åããããè¡šçŸããŸãããã®æ¬ã§ã¯ã挞è¿è¡šèšæ³ã®3ã€ã®äž»èŠãªçš®é¡ïŒããã°ãªãŒããªã¡ã¬ãã·ãŒã¿è¡šèšæ³ïŒã玹ä»ããŸãããããã®è¡šèšæ³ã¯ãã¢ã«ãŽãªãºã ã®å®è¡æéãäºæž¬ããæ¯èŒããããã«é »ç¹ã«äœ¿çšãããŸãã 挞è¿è¡šèšæ³ã䜿çšãããšãã¢ã«ãŽãªãºã ã®å®è¡æéãçŽæ¥æž¬å®ããå¿
èŠããªããã¢ã«ãŽãªãºã ãå®è£
ããåã«å¹ççãªã¢ã«ãŽãªãºã ãéžæã§ããŸãã挞è¿è¡šèšæ³ã¯ãç°ãªãã¢ã«ãŽãªãºã ã®å®è¡æéãæ¯èŒããããã«äœ¿çšããããããã¢ã«ãŽãªãºã ã®éžæã«åœ¹ç«ã¡ãŸãã 挞è¿è¡šèšæ³ã¯ãã¢ã«ãŽãªãºã ã®æ§èœã«ã€ããŠã®äžè¬çãªæŽå¯ãæäŸããŸãããå®éã®å®è¡æéã¯ç°ãªãå ŽåããããŸããã¢ã«ãŽãªãºã ã®å®è¡æéã¯ãå®éã®å
¥åãµã€ãºããã¢ã«ãŽãªãºã ã®å®è£
æ¹æ³ã«ãã£ãŠç°ãªãå ŽåããããŸãã | {{ããŒã¿æ§é /ç« ããã²ãŒã·ã§ã³}}
挞è¿è¡šèšæ³ã¯ãã¢ã«ãŽãªãºã ã®æ§èœãè©äŸ¡ããããã®ããŒã«ã§ãããèšç®è³æºãå¢ããã«ã€ããŠã¢ã«ãŽãªãºã ã®å®è¡æéãã©ã®ããã«å€åããããè¡šçŸããŸãããã®æ¬ã§ã¯ã挞è¿è¡šèšæ³ã®3ã€ã®äž»èŠãªçš®é¡ïŒããã°ãªãŒããªã¡ã¬ãã·ãŒã¿è¡šèšæ³ïŒã玹ä»ããŸãããããã®è¡šèšæ³ã¯ãã¢ã«ãŽãªãºã ã®å®è¡æéãäºæž¬ããæ¯èŒããããã«é »ç¹ã«äœ¿çšãããŸãã
挞è¿è¡šèšæ³ã䜿çšãããšãã¢ã«ãŽãªãºã ã®å®è¡æéãçŽæ¥æž¬å®ããå¿
èŠããªããã¢ã«ãŽãªãºã ãå®è£
ããåã«å¹ççãªã¢ã«ãŽãªãºã ãéžæã§ããŸãã挞è¿è¡šèšæ³ã¯ãç°ãªãã¢ã«ãŽãªãºã ã®å®è¡æéãæ¯èŒããããã«äœ¿çšããããããã¢ã«ãŽãªãºã ã®éžæã«åœ¹ç«ã¡ãŸãã
挞è¿è¡šèšæ³ã¯ãã¢ã«ãŽãªãºã ã®æ§èœã«ã€ããŠã®äžè¬çãªæŽå¯ãæäŸããŸãããå®éã®å®è¡æéã¯ç°ãªãå ŽåããããŸããã¢ã«ãŽãªãºã ã®å®è¡æéã¯ãå®éã®å
¥åãµã€ãºããã¢ã«ãŽãªãºã ã®å®è£
æ¹æ³ã«ãã£ãŠç°ãªãå ŽåããããŸãã
{{ããŒã¿æ§é /ç« ããã²ãŒã·ã§ã³}}
[[ã«ããŽãª:ããŒã¿æ§é |ãããããã»ã]] | 2023-03-09T23:52:18Z | 2024-03-03T10:45:34Z | [
"ãã³ãã¬ãŒã:ããŒã¿æ§é /ç« ããã²ãŒã·ã§ã³"
] | https://ja.wikibooks.org/wiki/%E3%83%87%E3%83%BC%E3%82%BF%E6%A7%8B%E9%80%A0/%E6%BC%B8%E8%BF%91%E8%A8%98%E6%B3%95 |
37,206 | é«çåŠæ ¡ çæ°æ¢ç©¶åºç€/ããŒããèãã | 質ã®é«ãæ¢ç©¶ãè¡ãããã«ã¯ãæ¢ç©¶ããŒããåæ§çãªããŒãã«ãªã£ãŠããªããã°ãªããŸãããããããåªããããŒããèããã«ã¯ããããªãã®æéãå¿
èŠãšããŸããããã§ãåªããããŒããšã¯ãã調ã¹ãããããèããããå
·äœçãªå
容ãå
åã«çã蟌ãŸããŠããããŒããšãªããŸããåªããããŒããªããç 究ãå®éšããããããåªããææãå°ãåºããã§ãããã
ããã§ã¯ãããŒãã®èŠã€ãæ¹ãåªããããŒãã®äœãæ¹ã玹ä»ããŸãã
ããŒããèŠæ¥µããã«ã¯ãæ®æ®µããæ§ã
ãªåéã«èå³ãæã¡ã泚ææ·±ã芳å¯ããŠãæ¹å€çã«èŠãªããã°ãªããŸããã
ãã®ãŸãŸéµåã¿ã«ããªãã§ãåå ã»çç±ã»å¯ŸçãèããŠã¿ãŸãããã
ããªãã ããããšããæ°æã¡ã§ãããããç¶æ³ã«å¯Ÿå¿ããŠãããŸãããã
æç§æžã«æžããŠãããããªå
容ãåœããåã®ããã«æã£ãŠããå
容ããçã£ãŠã¿ãŸããããç§åŠãé²æ©ããã°ããããŸã§è¿°ã¹ãŠããèããçè«ãå€ãããããããŸããã
ãã®ãããèªåã®äœéšã芳å¯ã§çŽåŸåºæ¥ãªãéšåãããã°ããããç 究ããŒãã«ããŠãããã§ãããã
æ¥åžžç掻ã®äžã§ãããªããæ©ãã§ããããããã ã£ãããããªãšæã£ãŠãããããªå
容ãããã°ãããã¯æ¢ç©¶ã®ããŒããšããŠçžå¿ããèãæ¹ã ãšæããŸããå®çŸãããã«ãªãèªåã®èãããã€ãæèããŠããã®èããã©ãããæ¥ãã®ãããã調ã¹ãŠã¿ãŸãããã
ããŒãã«ãµãããã話é¡ãã€ã³ã¿ãŒãããã§æ€çŽ¢ããŠãæ§ããŸãããã€ã³ã¿ãŒãããäžã§æµè¡ããŠãã話é¡ã¯ãå人ã»ç€ŸäŒåæ¹ã«ãšã£ãŠãéèŠãªããŒããšæãããŸãããããããã®ããŒãã«ã€ããŠç¥èäžè¶³ã ã£ãããç¡é¢å¿ã ã£ããããŠãããŒãã®éèŠæ§ãååã«ç解åºæ¥ãªããããããªãã®ã§ãæ°ãä»ããªããã°ãªããŸãããã€ã³ã¿ãŒãããã§æ€çŽ¢ããŠã泚ç®è©±é¡ã»èªåã®é¢å¿åéãæ¢ããŠã¿ãŸãããããã®åéãã©ããªè©±é¡ãªã®ããã¿ããªãã©ããªé¢å¿ãæã£ãŠããã®ããåããã°ãæ€çŽ¢ããæã«ããŒããæ¢ãããããªããŸããããããã€ã³ã¿ãŒãããäžã«ã¯ç¡æ ¹æ æ
å ±ãåºåã£ãŠããŸããããŒããããçšåºŠçµãããŠãããããããããä¿¡é Œæ§ã®é«ãè«æãªã©ã®è³æãèªãŸãªããã°ãªããŸããããããããšãããä¿¡é Œæ§ã®é«ãæ
å ±ã«ãªããŸãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "質ã®é«ãæ¢ç©¶ãè¡ãããã«ã¯ãæ¢ç©¶ããŒããåæ§çãªããŒãã«ãªã£ãŠããªããã°ãªããŸãããããããåªããããŒããèããã«ã¯ããããªãã®æéãå¿
èŠãšããŸããããã§ãåªããããŒããšã¯ãã調ã¹ãããããèããããå
·äœçãªå
容ãå
åã«çã蟌ãŸããŠããããŒããšãªããŸããåªããããŒããªããç 究ãå®éšããããããåªããææãå°ãåºããã§ãããã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ããã§ã¯ãããŒãã®èŠã€ãæ¹ãåªããããŒãã®äœãæ¹ã玹ä»ããŸãã",
"title": ""
},
{
"paragraph_id": 2,
"tag": "p",
"text": "ããŒããèŠæ¥µããã«ã¯ãæ®æ®µããæ§ã
ãªåéã«èå³ãæã¡ã泚ææ·±ã芳å¯ããŠãæ¹å€çã«èŠãªããã°ãªããŸããã",
"title": "ããŒããæ¢ã"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "ãã®ãŸãŸéµåã¿ã«ããªãã§ãåå ã»çç±ã»å¯ŸçãèããŠã¿ãŸãããã",
"title": "ããŒããæ¢ã"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "ããªãã ããããšããæ°æã¡ã§ãããããç¶æ³ã«å¯Ÿå¿ããŠãããŸãããã",
"title": "ããŒããæ¢ã"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "æç§æžã«æžããŠãããããªå
容ãåœããåã®ããã«æã£ãŠããå
容ããçã£ãŠã¿ãŸããããç§åŠãé²æ©ããã°ããããŸã§è¿°ã¹ãŠããèããçè«ãå€ãããããããŸããã",
"title": "ããŒããæ¢ã"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "ãã®ãããèªåã®äœéšã芳å¯ã§çŽåŸåºæ¥ãªãéšåãããã°ããããç 究ããŒãã«ããŠãããã§ãããã",
"title": "ããŒããæ¢ã"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "æ¥åžžç掻ã®äžã§ãããªããæ©ãã§ããããããã ã£ãããããªãšæã£ãŠãããããªå
容ãããã°ãããã¯æ¢ç©¶ã®ããŒããšããŠçžå¿ããèãæ¹ã ãšæããŸããå®çŸãããã«ãªãèªåã®èãããã€ãæèããŠããã®èããã©ãããæ¥ãã®ãããã調ã¹ãŠã¿ãŸãããã",
"title": "ããŒããæ¢ã"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "ããŒãã«ãµãããã話é¡ãã€ã³ã¿ãŒãããã§æ€çŽ¢ããŠãæ§ããŸãããã€ã³ã¿ãŒãããäžã§æµè¡ããŠãã話é¡ã¯ãå人ã»ç€ŸäŒåæ¹ã«ãšã£ãŠãéèŠãªããŒããšæãããŸãããããããã®ããŒãã«ã€ããŠç¥èäžè¶³ã ã£ãããç¡é¢å¿ã ã£ããããŠãããŒãã®éèŠæ§ãååã«ç解åºæ¥ãªããããããªãã®ã§ãæ°ãä»ããªããã°ãªããŸãããã€ã³ã¿ãŒãããã§æ€çŽ¢ããŠã泚ç®è©±é¡ã»èªåã®é¢å¿åéãæ¢ããŠã¿ãŸãããããã®åéãã©ããªè©±é¡ãªã®ããã¿ããªãã©ããªé¢å¿ãæã£ãŠããã®ããåããã°ãæ€çŽ¢ããæã«ããŒããæ¢ãããããªããŸããããããã€ã³ã¿ãŒãããäžã«ã¯ç¡æ ¹æ æ
å ±ãåºåã£ãŠããŸããããŒããããçšåºŠçµãããŠãããããããããä¿¡é Œæ§ã®é«ãè«æãªã©ã®è³æãèªãŸãªããã°ãªããŸããããããããšãããä¿¡é Œæ§ã®é«ãæ
å ±ã«ãªããŸãã",
"title": "ããŒããæ¢ã"
}
] | ã質ã®é«ãæ¢ç©¶ãè¡ãããã«ã¯ãæ¢ç©¶ããŒããåæ§çãªããŒãã«ãªã£ãŠããªããã°ãªããŸãããããããåªããããŒããèããã«ã¯ããããªãã®æéãå¿
èŠãšããŸããããã§ãåªããããŒããšã¯ãã調ã¹ãããããèããããå
·äœçãªå
容ãå
åã«çã蟌ãŸããŠããããŒããšãªããŸããåªããããŒããªããç 究ãå®éšããããããåªããææãå°ãåºããã§ãããã ãããã§ã¯ãããŒãã®èŠã€ãæ¹ãåªããããŒãã®äœãæ¹ã玹ä»ããŸãã | [[å°åŠæ ¡ã»äžåŠæ ¡ã»é«çåŠæ ¡ã®åŠç¿]]>[[é«çåŠæ ¡ã®åŠç¿]]>[[é«çåŠæ ¡çç§]]>[[é«çåŠæ ¡ çæ°æ¢ç©¶åºç€]]>ããŒããèãã
ã質ã®é«ãæ¢ç©¶ãè¡ãããã«ã¯ãæ¢ç©¶ããŒããåæ§çãªããŒãã«ãªã£ãŠããªããã°ãªããŸãããããããåªããããŒããèããã«ã¯ããããªãã®æéãå¿
èŠãšããŸããããã§ãåªããããŒããšã¯ãã調ã¹ãããããèããããå
·äœçãªå
容ãå
åã«çã蟌ãŸããŠããããŒããšãªããŸããåªããããŒããªããç 究ãå®éšããããããåªããææãå°ãåºããã§ãããã
ãããã§ã¯ãããŒãã®èŠã€ãæ¹ãåªããããŒãã®äœãæ¹ã玹ä»ããŸãã
== ããŒããæ¢ã ==
ãããŒããèŠæ¥µããã«ã¯ãæ®æ®µããæ§ã
ãªåéã«èå³ãæã¡ã泚ææ·±ã芳å¯ããŠãæ¹å€çã«èŠãªããã°ãªããŸããã
ããã®ãŸãŸéµåã¿ã«ããªãã§ãåå ã»çç±ã»å¯ŸçãèããŠã¿ãŸãããã
=== çç±ãå¿ããªã ===
ãããªãã ããããšããæ°æã¡ã§ãããããç¶æ³ã«å¯Ÿå¿ããŠãããŸãããã
ãæç§æžã«æžããŠãããããªå
容ãåœããåã®ããã«æã£ãŠããå
容ããçã£ãŠã¿ãŸããããç§åŠãé²æ©ããã°ããããŸã§è¿°ã¹ãŠããèããçè«ãå€ãããããããŸããã
ããã®ãããèªåã®äœéšã芳å¯ã§çŽåŸåºæ¥ãªãéšåãããã°ããããç 究ããŒãã«ããŠãããã§ãããã
=== æ¥åžžç掻äžã®åé¡ç¹ ===
ãæ¥åžžç掻ã®äžã§ãããªããæ©ãã§ããããããã ã£ãããããªãšæã£ãŠãããããªå
容ãããã°ãããã¯æ¢ç©¶ã®ããŒããšããŠçžå¿ããèãæ¹ã ãšæããŸããå®çŸãããã«ãªãèªåã®èãããã€ãæèããŠããã®èããã©ãããæ¥ãã®ãããã調ã¹ãŠã¿ãŸãããã
=== å人çã«èŠã€ããèŠåæ§ ===
ãèŠåæ§ãå人ã§èŠã€ããããçåã«æããªããŠãæ¢ç©¶ã®ããŒãã«ãªããŸããèŠåæ§ãå人ã§èŠã€ããããããªäººã«èŠãŠãããããã圢ã«ããŠããã®ãæ¢ç©¶ã®æ¥œãã¿ã§ãããã®å ŽåãèŠåæ§ãå人ã§èŠã€ããããã®ãŸãŸã仮説ãã«ãªããŸãã
=== å
茩éã®ããŒãã®ç¶æ¿ ===
=== éå»ã®ããŒãããæ¢ã ===
=== ã€ã³ã¿ãŒãããã®å©çš ===
ãããŒãã«ãµãããã話é¡ãã€ã³ã¿ãŒãããã§æ€çŽ¢ããŠãæ§ããŸãããã€ã³ã¿ãŒãããäžã§æµè¡ããŠãã話é¡ã¯ãå人ã»ç€ŸäŒåæ¹ã«ãšã£ãŠãéèŠãªããŒããšæãããŸãããããããã®ããŒãã«ã€ããŠç¥èäžè¶³ã ã£ãããç¡é¢å¿ã ã£ããããŠãããŒãã®éèŠæ§ãååã«ç解åºæ¥ãªããããããªãã®ã§ãæ°ãä»ããªããã°ãªããŸãããã€ã³ã¿ãŒãããã§æ€çŽ¢ããŠã泚ç®è©±é¡ã»èªåã®é¢å¿åéãæ¢ããŠã¿ãŸãããããã®åéãã©ããªè©±é¡ãªã®ããã¿ããªãã©ããªé¢å¿ãæã£ãŠããã®ããåããã°ãæ€çŽ¢ããæã«ããŒããæ¢ãããããªããŸããããããã€ã³ã¿ãŒãããäžã«ã¯ç¡æ ¹æ æ
å ±ãåºåã£ãŠããŸããããŒããããçšåºŠçµãããŠãããããããããä¿¡é Œæ§ã®é«ãè«æãªã©ã®è³æãèªãŸãªããã°ãªããŸããããããããšãããä¿¡é Œæ§ã®é«ãæ
å ±ã«ãªããŸãã
[[ã«ããŽãª:é«çåŠæ ¡æè²]] | 2023-03-10T11:16:34Z | 2023-12-17T03:58:59Z | [] | https://ja.wikibooks.org/wiki/%E9%AB%98%E7%AD%89%E5%AD%A6%E6%A0%A1_%E7%90%86%E6%95%B0%E6%8E%A2%E7%A9%B6%E5%9F%BA%E7%A4%8E/%E3%83%86%E3%83%BC%E3%83%9E%E3%82%92%E8%80%83%E3%81%88%E3%82%8B |
37,233 | é«çåŠæ ¡æ¿æ²»çµæž/æ¿æ²»/åœäŒ | åœæ¿æ²»çµæžã§ã¯ãåœäŒã«ã€ããŠç°¡åã«èšè¿°ãããããã詳ããå
容ã¯åŸæ¥å·çããå
Œ
±ã®é
ç®ãåç
§ããŠã»ããã
åœäŒ(ç«æ³æš©)ãå
é£(è¡æ¿æš©)ãè£å€æ(åžæ³æš©)ãäžæš©ãšãã¶ããã®äžæš©ãæå¶ãšåè¡¡ã®é¢ä¿ãæã£ãŠããããšãäžæš©åç«ãšåŒã¶ãæ¬ç¯ã§ã¯ãåœäŒã«ã€ããŠèšè¿°ããã
æ³åŸãäœãããšãç«æ³ãšåŒã¶ããæ¥æ¬ã®ç«æ³æ©é¢ã¯åœäŒã§ãããããã¯å¯äžã§ããããã®ããšã¯æ²æ³41æ¡ã«æžãããŠãããæ¡æãèªãã§ã¿ããã
ãåœäŒã¯ãåœæš©ã®æé«æ©é¢ã§ãã€ãŠãåœã®å¯äžã®ç«æ³æ©é¢ã§ãããã(第41æ¡)
ããã§ãåœæš©ã®æé«æ©é¢ãšã¯ãäžæš©ã®ãã¡ã§æãéèŠã§ãããšããããšã§ãã£ãŠãå
é£ãè£å€æããã匷倧ãªæš©éãæã£ãŠãããšããããšã§ã¯ãªã(æ¿æ²»ççŸç§°èª¬)ã
ããã«ãå¯äžã®ç«æ³æ©é¢ãšã¯ãæ³åŸãäœãããšãã§ããã®ã¯åœäŒã®ã¿ã§ãããšããããšã§ããããã¡ãããæ¿ä»€ãç什ãå°æ¹èªæ²»ã«ãããæ¡äŸãªã©ãåœäŒä»¥å€ãäœãããšãã§ããããç矩ã®æ³åŸãããšãã°ãå
¬è·éžææ³ãªã©ã¯ãåœäŒããäœãããšãã§ããªãã
äžè¿°ã®ããã«ãåœäŒã®æš©éãšããŠã¯ããŸã第äžã«ç«æ³ã§ããããã®ã»ããäºç®ãæ¡çŽã®ç· çµãªã©ãããŸããŸãªæš©éãæã£ãŠãããå
·äœçã«ã¯ã以äžã®7ã€ã§ããã
1) æ³åŸæ¡ã®è°æ±º
2) äºç®ã®è°æ±º
3) æ¡çŽã®æ¿èª
4) å
é£ç·ç倧è£ã®æå
5) åœæ¿èª¿æ»æš©
6) 匟åŸè£å€æã®èšçœ®
7) æ²æ³æ¹æ£ã®çºè°
è°å¡ãšã®å
šå¡ãéãŸã£ãŠè¡ãäŒè°ãæ¬äŒè°ãšåŒã¶ãæåãªãã®ãšããŠãéåžžåœäŒãªã©ããããæ¬äŒè°ã®çš®é¡ã以äžã«ãŸãšããã
以äžã®ããã«ãå
šå¡ãéãŸã£ãŠè¡ãäŒè°ãããããæ¥æ¬ã®åœäŒã¯ãå§å¡äŒå¶ãæ¡çšããŠãããå®è³ªçãªè°è«ã¯å§å¡äŒãäžå¿ã«å§ãããããå§å¡äŒã®è°æ±ºãçµãŠãæ¬äŒè°ã«äžçšãããæçµçã«è°æ±ºããããšããæµãã«ãªã£ãŠããã
ãŸããå§å¡äŒã«ã¯åžžä»»å§å¡äŒãšç¹å¥å§å¡äŒãååšãããåžžä»»å§å¡äŒã®äŸãšããŠã¯ãããšãã°ãäºç®å§å¡äŒããæ²çœ°å§å¡äŒãªã©ããããç¹å¥å§å¡äŒã®äŸãšããŠã¯ãçœå®³å¯Ÿçç¹å¥å§å¡äŒãªã©ããããå称ã¯æ³ä»€ã«èŠå®ãããŠããªãããªããç¹å¥å§å¡äŒããåžžä»»å§å¡äŒã«ææ ŒããäŸãããã
æ¥æ¬ã®åœäŒã§ã¯ãè¡è°é¢ãšåè°é¢ã®äž¡è°é¢ãããªãäºé¢å¶ãæ¡çšããŠãããä»»æãéžææ¹æ³ãªã©ã«éããããã
ãªããè¡è°é¢ã«ãããŠã2022幎11æã«å°éžæåºã10å¢ããã10æžãããããããã10å¢10æžããåæ ããæ¹æ£å
¬è·éžææ³ãæç«ããŠããããã®ããã«ãå
¬è·éžææ³ã®æ¹æ£ã«ãã£ãŠãå®æ°ãªã©ã¯å€æŽãããããã®ã§ã泚æãå¿
èŠã§ããã
äžèšã®å³ãèŠããšãè¡è°é¢ã®æ¹ãä»»æãçãããã€ã解æ£ãããããšã«ãããæ°æãããåæ ã§ãããã§ããããããçç±ãšããŠãè¡è°é¢ãåè°é¢ãããåªå
ããå Žåãããããããè¡è°é¢ã®åªè¶ãšåŒã³ãè¡è°é¢ãšåè°é¢ã®æ±ºå®ã®äžèŽããªãããªãã£ãå Žåãªã©ã«è¡è°é¢ã®æ±ºå®ãåªå
ããããªãã以äžã¯æ²æ³ã«èŠå®ãããŠãããã®ã®äžèŠ§ã§ããã
1æ³åŸã®åè°æ±º
2äºç®ã®è°æ±º
3å
é£ç·ç倧è£ã®æå
1å
é£äžä¿¡ä»»æ±ºè°
2äºç®ã®å
è°æš© | [
{
"paragraph_id": 0,
"tag": "p",
"text": "åœæ¿æ²»çµæžã§ã¯ãåœäŒã«ã€ããŠç°¡åã«èšè¿°ãããããã詳ããå
容ã¯åŸæ¥å·çããå
Œ
±ã®é
ç®ãåç
§ããŠã»ããã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "åœäŒ(ç«æ³æš©)ãå
é£(è¡æ¿æš©)ãè£å€æ(åžæ³æš©)ãäžæš©ãšãã¶ããã®äžæš©ãæå¶ãšåè¡¡ã®é¢ä¿ãæã£ãŠããããšãäžæš©åç«ãšåŒã¶ãæ¬ç¯ã§ã¯ãåœäŒã«ã€ããŠèšè¿°ããã",
"title": "åœäŒãšäžæš©åç«"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "æ³åŸãäœãããšãç«æ³ãšåŒã¶ããæ¥æ¬ã®ç«æ³æ©é¢ã¯åœäŒã§ãããããã¯å¯äžã§ããããã®ããšã¯æ²æ³41æ¡ã«æžãããŠãããæ¡æãèªãã§ã¿ããã",
"title": "åœäŒãšäžæš©åç«"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "ãåœäŒã¯ãåœæš©ã®æé«æ©é¢ã§ãã€ãŠãåœã®å¯äžã®ç«æ³æ©é¢ã§ãããã(第41æ¡)",
"title": "åœäŒãšäžæš©åç«"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "ããã§ãåœæš©ã®æé«æ©é¢ãšã¯ãäžæš©ã®ãã¡ã§æãéèŠã§ãããšããããšã§ãã£ãŠãå
é£ãè£å€æããã匷倧ãªæš©éãæã£ãŠãããšããããšã§ã¯ãªã(æ¿æ²»ççŸç§°èª¬)ã",
"title": "åœäŒãšäžæš©åç«"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "ããã«ãå¯äžã®ç«æ³æ©é¢ãšã¯ãæ³åŸãäœãããšãã§ããã®ã¯åœäŒã®ã¿ã§ãããšããããšã§ããããã¡ãããæ¿ä»€ãç什ãå°æ¹èªæ²»ã«ãããæ¡äŸãªã©ãåœäŒä»¥å€ãäœãããšãã§ããããç矩ã®æ³åŸãããšãã°ãå
¬è·éžææ³ãªã©ã¯ãåœäŒããäœãããšãã§ããªãã",
"title": "åœäŒãšäžæš©åç«"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "äžè¿°ã®ããã«ãåœäŒã®æš©éãšããŠã¯ããŸã第äžã«ç«æ³ã§ããããã®ã»ããäºç®ãæ¡çŽã®ç· çµãªã©ãããŸããŸãªæš©éãæã£ãŠãããå
·äœçã«ã¯ã以äžã®7ã€ã§ããã",
"title": "åœäŒã®æš©é"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "1) æ³åŸæ¡ã®è°æ±º",
"title": "åœäŒã®æš©é"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "2) äºç®ã®è°æ±º",
"title": "åœäŒã®æš©é"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "3) æ¡çŽã®æ¿èª",
"title": "åœäŒã®æš©é"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "4) å
é£ç·ç倧è£ã®æå",
"title": "åœäŒã®æš©é"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "5) åœæ¿èª¿æ»æš©",
"title": "åœäŒã®æš©é"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "6) 匟åŸè£å€æã®èšçœ®",
"title": "åœäŒã®æš©é"
},
{
"paragraph_id": 13,
"tag": "p",
"text": "7) æ²æ³æ¹æ£ã®çºè°",
"title": "åœäŒã®æš©é"
},
{
"paragraph_id": 14,
"tag": "p",
"text": "è°å¡ãšã®å
šå¡ãéãŸã£ãŠè¡ãäŒè°ãæ¬äŒè°ãšåŒã¶ãæåãªãã®ãšããŠãéåžžåœäŒãªã©ããããæ¬äŒè°ã®çš®é¡ã以äžã«ãŸãšããã",
"title": "åœäŒã®éå¶æ¹æ³"
},
{
"paragraph_id": 15,
"tag": "p",
"text": "以äžã®ããã«ãå
šå¡ãéãŸã£ãŠè¡ãäŒè°ãããããæ¥æ¬ã®åœäŒã¯ãå§å¡äŒå¶ãæ¡çšããŠãããå®è³ªçãªè°è«ã¯å§å¡äŒãäžå¿ã«å§ãããããå§å¡äŒã®è°æ±ºãçµãŠãæ¬äŒè°ã«äžçšãããæçµçã«è°æ±ºããããšããæµãã«ãªã£ãŠããã",
"title": "åœäŒã®éå¶æ¹æ³"
},
{
"paragraph_id": 16,
"tag": "p",
"text": "ãŸããå§å¡äŒã«ã¯åžžä»»å§å¡äŒãšç¹å¥å§å¡äŒãååšãããåžžä»»å§å¡äŒã®äŸãšããŠã¯ãããšãã°ãäºç®å§å¡äŒããæ²çœ°å§å¡äŒãªã©ããããç¹å¥å§å¡äŒã®äŸãšããŠã¯ãçœå®³å¯Ÿçç¹å¥å§å¡äŒãªã©ããããå称ã¯æ³ä»€ã«èŠå®ãããŠããªãããªããç¹å¥å§å¡äŒããåžžä»»å§å¡äŒã«ææ ŒããäŸãããã",
"title": "åœäŒã®éå¶æ¹æ³"
},
{
"paragraph_id": 17,
"tag": "p",
"text": "æ¥æ¬ã®åœäŒã§ã¯ãè¡è°é¢ãšåè°é¢ã®äž¡è°é¢ãããªãäºé¢å¶ãæ¡çšããŠãããä»»æãéžææ¹æ³ãªã©ã«éããããã",
"title": "è¡è°é¢ãšåè°é¢"
},
{
"paragraph_id": 18,
"tag": "p",
"text": "ãªããè¡è°é¢ã«ãããŠã2022幎11æã«å°éžæåºã10å¢ããã10æžãããããããã10å¢10æžããåæ ããæ¹æ£å
¬è·éžææ³ãæç«ããŠããããã®ããã«ãå
¬è·éžææ³ã®æ¹æ£ã«ãã£ãŠãå®æ°ãªã©ã¯å€æŽãããããã®ã§ã泚æãå¿
èŠã§ããã",
"title": "è¡è°é¢ãšåè°é¢"
},
{
"paragraph_id": 19,
"tag": "p",
"text": "äžèšã®å³ãèŠããšãè¡è°é¢ã®æ¹ãä»»æãçãããã€ã解æ£ãããããšã«ãããæ°æãããåæ ã§ãããã§ããããããçç±ãšããŠãè¡è°é¢ãåè°é¢ãããåªå
ããå Žåãããããããè¡è°é¢ã®åªè¶ãšåŒã³ãè¡è°é¢ãšåè°é¢ã®æ±ºå®ã®äžèŽããªãããªãã£ãå Žåãªã©ã«è¡è°é¢ã®æ±ºå®ãåªå
ããããªãã以äžã¯æ²æ³ã«èŠå®ãããŠãããã®ã®äžèŠ§ã§ããã",
"title": "è¡è°é¢ã®åªè¶"
},
{
"paragraph_id": 20,
"tag": "p",
"text": "1æ³åŸã®åè°æ±º",
"title": "è¡è°é¢ã®åªè¶"
},
{
"paragraph_id": 21,
"tag": "p",
"text": "2äºç®ã®è°æ±º",
"title": "è¡è°é¢ã®åªè¶"
},
{
"paragraph_id": 22,
"tag": "p",
"text": "3å
é£ç·ç倧è£ã®æå",
"title": "è¡è°é¢ã®åªè¶"
},
{
"paragraph_id": 23,
"tag": "p",
"text": "1å
é£äžä¿¡ä»»æ±ºè°",
"title": "è¡è°é¢ã®åªè¶"
},
{
"paragraph_id": 24,
"tag": "p",
"text": "2äºç®ã®å
è°æš©",
"title": "è¡è°é¢ã®åªè¶"
}
] | åœæ¿æ²»çµæžã§ã¯ãåœäŒã«ã€ããŠç°¡åã«èšè¿°ãããããã詳ããå
容ã¯åŸæ¥å·çããå
Œ
±ã®é
ç®ãåç
§ããŠã»ããã æ¥æ¬ã®çµ±æ²»æ©æ§â
¡ïŒçµ±æ²»ã®åºæ¬åçïŒ
åœäŒã®ä»çµã¿ãšåãâ
ïŒåœäŒã®å°äœïŒ
åœäŒã®ä»çµã¿ãšåãâ
¡ïŒåœäŒã®æ§æïŒ
åœäŒã®ä»çµã¿ãšåãâ
¢ïŒåœäŒã®æŽ»åïŒ
åœäŒã®ä»çµã¿ãšåãâ
£ïŒäŒè°ã®è«žååïŒ
åœäŒã®ä»çµã¿ãšåãâ
€ïŒåè°é¢ã®ç·æ¥éäŒïŒ
åœäŒã®ä»çµã¿ãšåãâ
¥ïŒåœäŒã®æš©èœïŒ
åœäŒã®ä»çµã¿ãšåãâ
ŠïŒè°å¡ã®æš©èœïŒ
åœäŒã®ä»çµã¿ãšåãâ
§ïŒåœäŒè°å¡ã®ç¹æš©ïŒ | '''åœæ¿æ²»çµæžã§ã¯ãåœäŒã«ã€ããŠç°¡åã«èšè¿°ãããããã詳ããå
容ã¯åŸæ¥å·çããå
Œ
±ã®é
ç®ãåç
§ããŠã»ããã'''
* [[é«çåŠæ ¡å
Œ
±/æ¥æ¬ã®çµ±æ²»æ©æ§â
¡|æ¥æ¬ã®çµ±æ²»æ©æ§â
¡]]ïŒçµ±æ²»ã®åºæ¬åçïŒ
* [[é«çåŠæ ¡å
Œ
±/åœäŒã®ä»çµã¿ãšåãâ
|åœäŒã®ä»çµã¿ãšåãâ
]]ïŒåœäŒã®å°äœïŒ
* [[é«çåŠæ ¡å
Œ
±/åœäŒã®ä»çµã¿ãšåãâ
¡|åœäŒã®ä»çµã¿ãšåãâ
¡]]ïŒåœäŒã®æ§æïŒ
* [[é«çåŠæ ¡å
Œ
±/åœäŒã®ä»çµã¿ãšåãâ
¢|åœäŒã®ä»çµã¿ãšåãâ
¢]]ïŒåœäŒã®æŽ»åïŒ
* [[é«çåŠæ ¡å
Œ
±/åœäŒã®ä»çµã¿ãšåãâ
£|åœäŒã®ä»çµã¿ãšåãâ
£]]ïŒäŒè°ã®è«žååïŒ
* [[é«çåŠæ ¡å
Œ
±/åœäŒã®ä»çµã¿ãšåãâ
€|åœäŒã®ä»çµã¿ãšåãâ
€]]ïŒåè°é¢ã®ç·æ¥éäŒïŒ
* [[é«çåŠæ ¡å
Œ
±/åœäŒã®ä»çµã¿ãšåãâ
¥|åœäŒã®ä»çµã¿ãšåãâ
¥]]ïŒåœäŒã®æš©èœïŒ
* [[é«çåŠæ ¡å
Œ
±/åœäŒã®ä»çµã¿ãšåãâ
Š|åœäŒã®ä»çµã¿ãšåãâ
Š]]ïŒè°å¡ã®æš©èœïŒ
* [[é«çåŠæ ¡å
Œ
±/åœäŒã®ä»çµã¿ãšåãâ
§|åœäŒã®ä»çµã¿ãšåãâ
§]]ïŒåœäŒè°å¡ã®ç¹æš©ïŒ
== åœäŒãšäžæš©åç« ==
'''åœäŒïŒç«æ³æš©ïŒ'''ã'''å
é£(è¡æ¿æš©)'''ã'''è£å€æïŒåžæ³æš©ïŒ'''ãäžæš©ãšãã¶ããã®äžæš©ã'''æå¶ãšåè¡¡ã®é¢ä¿'''ãæã£ãŠããããšã'''äžæš©åç«'''ãšåŒã¶ãæ¬ç¯ã§ã¯ãåœäŒã«ã€ããŠèšè¿°ããã
æ³åŸãäœãããšã'''ç«æ³'''ãšåŒã¶ããæ¥æ¬ã®ç«æ³æ©é¢ã¯åœäŒã§ãããããã¯å¯äžã§ããããã®ããšã¯æ²æ³41æ¡ã«æžãããŠãããæ¡æãèªãã§ã¿ããã
ãåœäŒã¯ã'''åœæš©ã®æé«æ©é¢'''ã§ãã€ãŠãåœã®'''å¯äž'''ã®'''ç«æ³æ©é¢'''ã§ããããïŒç¬¬41æ¡ïŒ
ããã§ã'''åœæš©ã®æé«æ©é¢'''ãšã¯ãäžæš©ã®ãã¡ã§æãéèŠã§ãããšããããšã§ããããã£ããŠãå
é£ïŒè¡æ¿çµç¹ïŒãè£å€æïŒåžæ³çµç¹ïŒããã匷倧ãªæš©éãæã£ãŠãããšããããšã§ã¯ãªããïŒâ»ç¯å²å€ïŒãªãããããæ¿æ²»ççŸç§°èª¬ããšããã
:ïŒâ»ç¯å²å€ïŒ ãã ããäžæš©ã®ãã¡åœäŒè°å¡ã®ã¿åœæ°ããã®éžæã§éžã°ããŠããããšã«æ³šç®ããŠ<ref>[https://www2.nhk.or.jp/kokokoza/watch/?das_id=D0022130112_00000 NHKã第8åãåœäŒãšç«æ³ | æ¿æ²»ã»çµæž | é«æ ¡è¬åº§ã]</ref>ãåœäŒè°å¡ïŒç«æ³çµç¹ïŒã ãæ®ãã®2æš©ãããéèŠããŠæé«æ©é¢ã ãšèŠãªãèãæ¹ãããã
:ïŒâ»ç¯å²å€ïŒåœäŒã¯ãæé«æ©é¢ããšã¯èšãã©ãå®éã«ã¯åœäŒã¯åžæ³ïŒè£å€æïŒã«ããéæ²ç«æ³å¯©æ»æš©ãªã©ã§å¯©æ»ããã§ãã¯ããããåŽã§ããããåœäŒã«ã¯æå¶ãæ±ãããããïŒèªè
ã«ã¯ãææ³å®¶ããã¯ã®ãã§ãã¯ã»ã¢ã³ãã»ãã©ã³ã¹ãªã©ã®æŠå¿µãšãé¢é£ã¥ããŠç解ããŠãããããïŒ
ããã«ã'''å¯äžã®ç«æ³æ©é¢'''ãšã¯ãæ³åŸãå¶å®ããããšãã§ããã®ã¯åœäŒã®ã¿ã§ãããšããããšã§ããããããåœäŒè°å¡ããïŒæ³åŸã§ã¯ãªãããã®æ³ã®ïŒæ³æ¡ãäœããªããšããæå³ã§ã¯ãªããå®åãªã©åœäŒè°å¡ä»¥å€ãæ³æ¡ãèããããšã¯å¯èœã§ããããªãã誰ã«æ³æ¡ãäœã£ãŠããã£ãŠãã匷å¶åã®ããæ³ãšããŠå¶å®ããã«ã¯ãåœäŒè°å¡ããŸããã®æ³æ¡ãåœäŒã«æåºããŠãåœäŒã§ãã®æ³ãå¯æ±ºãããªããã°ãããªããå
é£ãç·ç倧è£ãåœäŒè°å¡ã§ããã®ã§ãå
é£ãåœäŒã«æ³æ¡ãæåºããŠãè¯ãã
ãŸãããã¡ãããæ¿ä»€ãç什ãå°æ¹èªæ²»ã«ãããæ¡äŸãªã©ãåœäŒä»¥å€ãåºãæå³ã§ã®æ³ãäœãããšãã§ãããããããç矩ã®æ³åŸãããšãã°ãå
¬è·éžæ'''æ³'''ãªã©ã¯ãåœäŒããäœãããšãã§ããªãã
== åœäŒã®æš©é ==
äžè¿°ã®ããã«ãåœäŒã®æš©éãšããŠã¯ããŸã第äžã«ç«æ³ã§ããããã®ã»ããäºç®ãæ¡çŽã®ç· çµãªã©ãããŸããŸãªæš©éãæã£ãŠãããå
·äœçã«ã¯ã以äžã®7ã€ã§ããã
1) æ³åŸæ¡ã®è°æ±º
2) äºç®ã®è°æ±º
3) æ¡çŽã®æ¿èª
4) å
é£ç·ç倧è£ã®æå
5) åœæ¿èª¿æ»æš©
6) 匟åŸè£å€æã®èšçœ®
7) æ²æ³æ¹æ£ã®çºè°
== åœäŒã®éå¶æ¹æ³ ==
è°å¡ãšã®å
šå¡ãéãŸã£ãŠè¡ãäŒè°ãæ¬äŒè°ãšåŒã¶ãæåãªãã®ãšããŠãéåžžåœäŒãªã©ããããæ¬äŒè°ã®çš®é¡ã以äžã«ãŸãšããã
<table class="wikitable">
<caption>æ¬äŒè°ã®çš®é¡</caption>
<tr>
<th></th><th>å
容</th>
</tr>
<tr>
<th>éåžžåœäŒïŒåžžäŒïŒ</th><td>æ¯å¹Ž'''ïŒå'''ã'''1æ'''ããè¡ããããæ¥å¹ŽåºŠã®'''äºç®ã®å¯©è°'''ãäžå¿ãäŒæã¯'''150'''æ¥ã</td>
</tr>
<tr>
<th>ç¹å¥åœäŒïŒç¹å¥äŒïŒ</th><td>å
é£ãå¿
èŠãšèªããæããããã¯ãããããã®è°å¡ã®'''ç·è°å¡ã®4åã®1'''以äžã®èŠæ±ããã£ããšãã«å¬éããããç§ããã«éãããããšãå€ãã
</td>
</tr>
<tr>
<th>èšæåœäŒïŒèšæäŒïŒ</th><td>è¡è°é¢ã®è§£æ£ç·éžæåŸ'''30æ¥ä»¥å
'''ã«å¬éããããå
é£ç·ç倧è£ã®æåãè°é¡ã</td>
</tr>
<tr>
<th>åè°é¢ã®ç·æ¥éäŒ</th><td>'''è¡è°é¢ã®è§£æ£äž'''ã«ç·æ¥äºæ
ãèµ·ãã£ãæã«ãå
é£ãæéã</td>
</tr>
</table>
以äžã®ããã«ãå
šå¡ãéãŸã£ãŠè¡ãäŒè°ãããããæ¥æ¬ã®åœäŒã¯ã'''å§å¡äŒå¶'''ãæ¡çšããŠãããå®è³ªçãªè°è«ã¯'''å§å¡äŒ'''ãäžå¿ã«å§ãããããå§å¡äŒã®è°æ±ºãçµãŠãæ¬äŒè°ã«äžçšãããæçµçã«è°æ±ºããããšããæµãã«ãªã£ãŠããã
ãŸããå§å¡äŒã«ã¯åžžä»»å§å¡äŒãšç¹å¥å§å¡äŒãååšãããåžžä»»å§å¡äŒã®äŸãšããŠã¯ãããšãã°ãäºç®å§å¡äŒããæ²çœ°å§å¡äŒãªã©ããããç¹å¥å§å¡äŒã®äŸãšããŠã¯ãçœå®³å¯Ÿçç¹å¥å§å¡äŒãªã©ããããå称ã¯æ³ä»€ã«èŠå®ãããŠããªãããªããç¹å¥å§å¡äŒããåžžä»»å§å¡äŒã«ææ ŒããäŸãããã
== è¡è°é¢ãšåè°é¢ ==
æ¥æ¬ã®åœäŒã§ã¯ã'''è¡è°é¢'''ãš'''åè°é¢'''ã®äž¡è°é¢ãããªã'''äºé¢å¶'''ãæ¡çšããŠãããä»»æãéžææ¹æ³ãªã©ã«éããããã
<br>
<table class="wikitable">
<caption>è¡è°é¢ãšåè°é¢</caption>
<tr>
<th></th><th>è¡è°é¢</th><th>åè°é¢</th>
</tr>
<tr>
<th>è°å¡å®æ°</th><td>465人</td><td>248人</td>
</tr>
<tr>
<th>ä»»æ</th><td>ïŒå¹Ž</td><td>6幎ïŒïŒå¹Žããšåæ°æ¹éžïŒ</td>
</tr>
<tr>
<th>解æ£</th><td>ãã</td><td>ãªã</td>
</tr>
<tr>
<th>éžææš©</th><td>æº18æ³ä»¥äž</td><td>æº18æ³ä»¥äž</td>
</tr>
<tr>
<th>被éžææš©</th><td>æº25æ³ä»¥äž</td><td>æº30æ³ä»¥äž</td>
</tr>
</table>
ãªããè¡è°é¢ã«ãããŠã2022幎11æã«å°éžæåºã10å¢ããã10æžãããããããã10å¢10æžããåæ ããæ¹æ£å
¬è·éžææ³ãæç«ããŠããããã®ããã«ãå
¬è·éžææ³ã®æ¹æ£ã«ãã£ãŠãå®æ°ãªã©ã¯å€æŽãããããã®ã§ã泚æãå¿
èŠã§ããã
== è¡è°é¢ã®åªè¶==
äžèšã®å³ãèŠããšã'''è¡è°é¢ã®æ¹ãä»»æãçã'''ããã€ã'''解æ£ããã'''ããšã«ããã'''æ°æãããåæ '''ã§ãããã§ããããããçç±ãšããŠãè¡è°é¢ãåè°é¢ãããåªå
ããå Žåããããããã'''è¡è°é¢ã®åªè¶'''ãšåŒã³ãè¡è°é¢ãšåè°é¢ã®æ±ºå®ã®äžèŽããªãããªãã£ãå Žåãªã©ã«'''è¡è°é¢ã®æ±ºå®ãåªå
ãã'''ããªãã以äžã¯æ²æ³ã«èŠå®ãããŠãããã®ã®äžèŠ§ã§ããã<br>
==== è¡è°é¢ã®è°æ±ºã«ãããåªè¶ ====
1) æ³åŸã®åè°æ±º
2) äºç®ã®è°æ±º
3) å
é£ç·ç倧è£ã®æå
===== è¡è°é¢ã®ã¿ã®æš©éã«ãããåªè¶=====
1) å
é£äžä¿¡ä»»æ±ºè°
2) äºç®ã®å
è°æš©
==== åœäŒã®èª²é¡ ====
[[ã«ããŽãª:åœäŒ]] | 2023-03-12T22:18:11Z | 2024-02-29T15:37:30Z | [] | https://ja.wikibooks.org/wiki/%E9%AB%98%E7%AD%89%E5%AD%A6%E6%A0%A1%E6%94%BF%E6%B2%BB%E7%B5%8C%E6%B8%88/%E6%94%BF%E6%B2%BB/%E5%9B%BD%E4%BC%9A |
37,239 | æçæ¬/èæç/ã¿ã³ã¹ | ã¿ã³ã¹ã¯ãããŠã¢ãã³ã·ã®ãã«ãã£ãŒã€ã«èãéèãããŒãºãªã©ãè©°ããŠäœãã¡ãã·ã³çºç¥¥ã®æçã§ãã
以äžããç°¡åã«äœããã¿ã³ã¹ã®ã¬ã·ãã§ããã奜ã¿ã§ã¢ãã«ããã³ãŒã³ãå ããã®ãããããã§ãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "ã¿ã³ã¹ã¯ãããŠã¢ãã³ã·ã®ãã«ãã£ãŒã€ã«èãéèãããŒãºãªã©ãè©°ããŠäœãã¡ãã·ã³çºç¥¥ã®æçã§ãã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "以äžããç°¡åã«äœããã¿ã³ã¹ã®ã¬ã·ãã§ããã奜ã¿ã§ã¢ãã«ããã³ãŒã³ãå ããã®ãããããã§ãã",
"title": "äœãæ¹"
}
] | ã¿ã³ã¹ã¯ãããŠã¢ãã³ã·ã®ãã«ãã£ãŒã€ã«èãéèãããŒãºãªã©ãè©°ããŠäœãã¡ãã·ã³çºç¥¥ã®æçã§ãã | '''ã¿ã³ã¹'''ã¯ãããŠã¢ãã³ã·ã®ãã«ãã£ãŒã€ã«èãéèãããŒãºãªã©ãè©°ããŠäœãã¡ãã·ã³çºç¥¥ã®æçã§ãã
== ææïŒ2人åïŒ==
*ããŠã¢ãã³ã·ã®ãã«ãã£ãŒã€ 6æ
*çæœè 300g
*çãã 1å
*ããã 1å
*ã¬ã¿ã¹ 1/4å
*ãã§ããŒããŒãº 50g
*ãµã¯ãŒã¯ãªãŒã 50g
*ãªãªãŒããªã€ã« 倧ãã2
*å¡© å°ãã1
*ã³ã·ã§ãŠ å°ãã1
*ã¬ãŒãªãã¯ããŠã㌠å°ãã1
== äœãæ¹ ==
#çãããã¿ããåãã«ããã
#ãããã¯ç®ããããçš®ãåã£ãŠå°ããåãã
#ã¬ã¿ã¹ã¯ããåãã«ããã
#ããŒãºã¯ãããããã
#ãã©ã€ãã³ã«ãªãªãŒããªã€ã«ãç±ããçãããçããã
#çããããããªãããŠããããæœèãå ããŠçããã
#èã«ç«ãéã£ãããããããšèª¿å³æãå ããŠçããã
#ãã«ãã£ãŒã€ãæž©ããã
#æž©ãããã«ãã£ãŒã€ã«ã¬ã¿ã¹ãšèãã®ããããŒãºãšãµã¯ãŒã¯ãªãŒã ããããã
#ãããã§å®æã
;ãã€ã³ã
:ãããã®ç®ããããšãã¯ã軜ãXåãåã£ãŠãããã§ããšç°¡åã«ãããŸãã
:ãã«ãã£ãŒã€ã¯ã¬ã³ãžã§æž©ããã®ãç°¡åã§ãã
以äžããç°¡åã«äœããã¿ã³ã¹ã®ã¬ã·ãã§ããã奜ã¿ã§ã¢ãã«ããã³ãŒã³ãå ããã®ãããããã§ãã
{{ã³ã©ã |ãã«ãã£ãŒã€|2=ããã«ãã£ãŒã€ããšã¯ãã¡ãã·ã³æçã®ã¿ã³ã¹ãããªããŒãªã©ã«äœ¿ãããèãå¹³ãããã³ã§ãã
å°éºŠç²ãããŠã¢ãã³ã·ç²ãåæãšããŠäœãããŠããããã®æŽå²ã¯å€ããã¢ã¹ãã«æææ代ããååšããŠããŸããã
ãã«ãã£ãŒã€ã¯æäœããããããšãå€ããå°éºŠç²ãããŠã¢ãã³ã·ç²ãå¡©ãæ°Žãæ··ããŠçå°ãäœããäžžããåŸã«èã延ã°ããŠçŒããšããå·¥çšãäžè¬çã§ããçå°ã®äœãæ¹ãçŒãæ¹ã«ãã£ãŠããã«ãã£ãŒã€ã®å³ãé£æãç°ãªããŸãã
åžè²©ã®ãã«ãã£ãŒã€ã販売ãããŠããŸãããæäœãã®ãã®ã«æ¯ã¹ããšç¡¬ããŠããµã€ããæããããããšããããŸãããã®ãããèªåã§ãã«ãã£ãŒã€ãäœãããšã§ãããçŸå³ããã¿ã³ã¹ãããªããŒãäœãããšãã§ããŸãã
ãŸãããã«ãã£ãŒã€ã¯ã¿ã³ã¹ãããªããŒä»¥å€ã«ãããã£ããã£ãŒããã¶ã®ä»£çšãšããŠã䜿ãããŸããå
·æããœãŒã¹ã«ãã£ãŠã¯ããã®ãŸãŸé£ã¹ãŠãçŸå³ããã§ããããªãŒãã³ã§çŒããŠã«ãªããšããé£æã«ããããšãã§ããŸãã
ãã«ãã£ãŒã€ã¯æäœãããããšã§ãã¢ã¬ã³ãžã®å¹
ãåºãããŸããå°éºŠç²ãããŠã¢ãã³ã·ç²ã®çš®é¡ãå€ããããçå°ã«ã¹ãã€ã¹ãããŒããå ãããããããšã§ãããåæ§çãªãã«ãã£ãŒã€ãäœãããšãã§ããŸããæ¯éãæäœããã«ãã£ãŒã€ãè©ŠããŠã¿ãŠãã ããã
}}
{{ããã©ã«ããœãŒã:ããããã»ã|ãããããã|ããã}}
[[ã«ããŽãª:èæç|ããã]]
[[ã«ããŽãª:ã¡ãã·ã³æç|ããã]] | 2023-03-14T06:35:34Z | 2023-11-03T10:37:13Z | [
"ãã³ãã¬ãŒã:ã³ã©ã "
] | https://ja.wikibooks.org/wiki/%E6%96%99%E7%90%86%E6%9C%AC/%E8%82%89%E6%96%99%E7%90%86/%E3%82%BF%E3%82%B3%E3%82%B9 |
37,241 | C++/CããC++ãžã®ç§»è¡ | ãã®ææ¬ã¯ãCèšèªããC++èšèªã«ç§»è¡ããããã°ã©ããŒã察象ãšããŠããŸããCèšèªããC++èšèªã«ç§»è¡ããéã«ã¯ãæ°ããæŠå¿µãæ©èœãåŠã¶å¿
èŠããããåãã¯æžæãããšãããã§ãããã
æ¬æžã§ã¯ãC++èšèªã«ãããåºæ¬çãªæ©èœãæŠå¿µã«ã€ããŠããããããã説æããŠããŸãããŸããCèšèªãšã®éãã«ãçŠç¹ãåœãŠãC++èšèªãç解ããäžã§ã®ãã€ã³ãã解説ããŠããŸãã
æ¬æžãèªãããšã§ãC++èšèªã®åºæ¬çãªæ§æãæ©èœãç解ããCèšèªããC++èšèªã«ã¹ã ãŒãºã«ç§»è¡ããããšãã§ããããã«ãªãããšãç®æããŠããŸããC++èšèªã®åå¿è
ããCèšèªããC++èšèªã«ç§» è¡ããããšããŠããæ¹ã«ãšã£ãŠãæ¬æžãæçãªæ
å ±ãæäŸã§ããããšãé¡ã£ãŠããŸãã
CèšèªãšC++èšèªã¯ãC++ãCèšèªãå
ã«èšèšãããŠããã®ã§å
±éç¹ãå€ãã§ãããããã€ãã®éãããããŸãã
ããã°ã©ã ã®æ§é C++ã§ã¯ãã¯ã©ã¹ãšããæ°ããããã°ã©ã ã®æ§é ã䜿çšããŠããŸããã¯ã©ã¹ã¯ãããŒã¿ãšé¢æ°ã1ã€ã®ãšã³ãã£ãã£ã«ãŸãšããã«ãã»ã«åãšããæŠå¿µã«åºã¥ããŠããŸããCèšèªã«ã¯ãã®ãããªæ§é ããããŸããã
C++ã«ã¯ã以äžã®ãããªåªããç¹åŸŽããããŸãã
ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã¯ãããã°ã©ã ãããªããžã§ã¯ãããšããåäœã«åå²ããããšã§ãåå©çšæ§ãä¿å®æ§ãé«ããããã°ã©ãã³ã°ææ³ã§ãããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®åºæ¬çãªæŠå¿µã«ã¯ãããŒã¿ã®ã«ãã»ã«åãç¶æ¿ãããªã¢ãŒãã£ãºã ãªã©ããããŸãã
C++èšèªã§ã¯ããªããžã§ã¯ãæåããã°ã©ãã³ã°ãå®çŸããããã«ãã¯ã©ã¹ãšããæŠå¿µãå°å
¥ãããŠããŸããã¯ã©ã¹ã¯ãããŒã¿ãšããã«é¢é£ããé¢æ°ããŸãšãããã®ã§ããªããžã§ã¯ãã®èšèšå³ãšãªããŸãããªããžã§ã¯ããäœæããã«ã¯ãã¯ã©ã¹ããã€ã³ã¹ã¿ã³ã¹ãçæããå¿
èŠããããŸãããŸããã¯ã©ã¹ã®ç¶æ¿ãå€éç¶æ¿ãªã©ããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®ç¹åŸŽãå©çšããããšãã§ããŸãã
C++ã«ã¯Cãšåãåºæ¬ããŒã¿åããããŸãããC++ã«ã¯æ°ããããŒã¿åãè¿œå ãããŠããŸããäŸãã°ãboolãwchar_tãlong longãunsigned long longãªã©ã§ãããŸããC++ã§ã¯ãªããžã§ã¯ãæåããã°ã©ãã³ã°ããµããŒãããããã«ãã¯ã©ã¹ãæ§é äœãªã©ã®ãŠãŒã¶ãŒå®çŸ©åã䜿çšã§ããŸãã
æŒç®åãC++ã§ã¯æ°ãããã®ãè¿œå ãããŠããŸããäŸãã°ãã¹ã³ãŒã解決æŒç®å(::)ããã€ãããã¯ãã£ã¹ãæŒç®å(dynamic_cast)ãéçãã£ã¹ãæŒç®å(static_cast)ããªãã©ã«æŒç®å(literal operator)ãªã©ã§ãããããã®æŒç®åã¯ãC++ã§ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°ããã³ãã¬ãŒãã¡ã¿ããã°ã©ãã³ã°ã§åœ¹ç«ã¡ãŸãã
C++ã§ã¯ãCãšåãå¶åŸ¡æ§é ã䜿çšã§ããŸããäŸãã°ãifæãswitchæãforæãwhileæãªã©ã§ããããããC++ã§ã¯æ°ããå¶åŸ¡æ§é ãè¿œå ãããŠããŸããäŸãã°ãç¯å²ããŒã¹ã®forã«ãŒããdo-whileã«ãŒãã«ããã«ãŒãåŸã®æ¡ä»¶è©äŸ¡ãã©ã ãåŒã«ããç¡åé¢æ°ã®äœæãªã©ã§ãã
C++ã§ã¯ãŸããäŸå€åŠçããµããŒããããŠããŸããããã¯ãããã°ã©ã ã®å®è¡äžã«äºæããªãåé¡ãçºçããå Žåã«ãããã°ã©ã ã®å¶åŸ¡ãå¥ã®å Žæã«ç§»åãããããšãã§ããæ©èœã§ãã
C++ã§ã¯ãCãšåæ§ã«é¢æ°ã䜿çšã§ããŸãããã ããC++ã§ã¯é¢æ°ããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®äžéšãšããŠäœ¿çšããããšãã§ããŸããé¢æ°ãªãŒããŒããŒããä»®æ³é¢æ°ãçŽç²ä»®æ³é¢æ°ãé¢æ°ãã€ã³ã¿ãªã©ãC++ã§ã®é¢æ°ã®äœ¿çšæ³ã¯å€å²ã«ããããŸãã
C++ã§ã¯ãŸããããã©ã«ãåŒæ°ãåç
§åŒæ°ãšãã£ãæ°ããåŒæ°ã®ã¿ã€ãã䜿çšã§ããŸããããã©ã«ãåŒæ°ã䜿çšãããšãé¢æ°ãåŒã³åºããšãã«åŒæ°ãçç¥ããããšãã§ããŸããåç
§åŒæ°ã䜿çšãããšãåŒæ°ãã³ããŒããããšãªããåŒã³åºãå
ã®å€æ°ã«çŽæ¥ã¢ã¯ã»ã¹ã§ããŸãã
CããC++ã«ç§»è¡ããéã«ãåå空éã®æŠå¿µã«ã€ããŠç解ããããšãéèŠã§ããC++ã§ã¯ãåå空éã䜿çšããããšã§ãã°ããŒãã«åå空éã«å«ãŸããåãååãæã€ã·ã³ãã«ãåºå¥ããããšãã§ããŸãã
åå空éã¯ãã³ãŒãå
ã®ã°ããŒãã«ã¹ã³ãŒãã«ååšããèå¥åã®ã°ã«ãŒãåæ¹æ³ãæäŸããŸããããã«ãããåãååãæã€ç°ãªããªããžã§ã¯ããé¢æ°ãåºå¥ã§ããŸããããšãã°ãç°ãªãã©ã€ãã©ãªããåãååã®é¢æ°ãèªã¿èŸŒãŸããå Žåã§ããåå空éã䜿çšããããšã§è¡çªãåé¿ã§ããŸãã
åå空éã¯ãnamespaceããŒã¯ãŒãã䜿çšããŠå®çŸ©ãããŸããåå空éå
ã§å®çŸ©ãããèå¥åã¯ãnamespaceåãæå®ããããšã§ã¢ã¯ã»ã¹ã§ããŸããããšãã°ã次ã®ããã«åå空éãå®çŸ©ã§ããŸãã
ããã«ãããMyNamespaceãšããååã®åå空éãå®çŸ©ãããmyIntãšmyFunctionããã®åå空éå
ã«å®çŸ©ãããŸãããããã®èå¥åã«ã¯ãMyNamespace::ãšããæ¥é èŸãä»ããããšã§ã¢ã¯ã»ã¹ã§ããŸãã
åå空éã¯ãC++ã§ã©ã€ãã©ãªãéçºããéã«ç¹ã«åœ¹ç«ã¡ãŸããã©ã€ãã©ãªå
ã§å®çŸ©ããããã¹ãŠã®èå¥åããã©ã€ãã©ãªã®åå空éã«çœ®ãããšã§ãã©ã€ãã©ãªã®äœ¿çšè
ãã©ã€ãã©ãªãšèªåã®ã³ãŒãã®èå¥åãåºå¥ãããããªããŸãã
C++ã§ã¯ãã¯ã©ã¹ãå®çŸ©ããããã«structãclassããŒã¯ãŒãã䜿çšããŸããCèšèªã§ã¯æ§é äœãå®çŸ©ããã®ã«structããŒã¯ãŒãã䜿ããŸããããC++ã§ã¯ãã¯ã©ã¹ãå®çŸ©ããããã«structãclassã䜿ãããšãã§ããŸããã¯ã©ã¹ã¯ãäžé£ã®å€æ°ãé¢æ°ããŸãšãããã®ã§ããã®ãªããžã§ã¯ãã«å¯ŸããŠæ§ã
ãªæäœãè¡ãããšãã§ããŸãã 以äžã«äŸã瀺ããŸãããŸããã¯ã©ã¹ã®å®çŸ©ã§ãã
ãã®ã¯ã©ã¹ã§ã¯ãmyPrivateVarãšãããã©ã€ããŒãå€æ°ãšmyPublicVarãšãããããªãã¯å€æ°ããããŠmyPublicFuncãšãããããªãã¯é¢æ°ãå®çŸ©ãããŠããŸãããã©ã€ããŒãå€æ°ã¯ãã¯ã©ã¹å
ã®ã¿ããã¢ã¯ã»ã¹ã§ããå€éšããã¯ã¢ã¯ã»ã¹ã§ããŸãããäžæ¹ããããªãã¯å€æ°ãé¢æ°ã¯ãã¯ã©ã¹å
å€ããã¢ã¯ã»ã¹ããããšãã§ããŸãã
ã¯ã©ã¹ãå®çŸ©ãããããã®ã¯ã©ã¹ãã€ã³ã¹ã¿ã³ã¹åããããšãã§ããŸããã€ã³ã¹ã¿ã³ã¹åãšã¯ãã¯ã©ã¹ãå®äœåããããšã§ããã®ã¯ã©ã¹ã®ãªããžã§ã¯ããäœæããããšã§ãã 以äžã«äŸã瀺ããŸãããŸããã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹åã§ãã
ãã®ããã«ãã¯ã©ã¹åã®åŸãã«ãªããžã§ã¯ãåãä»ããããšã§ããã®ã¯ã©ã¹ã®ãªããžã§ã¯ããäœæããããšãã§ããŸãããã®å ŽåãmyObjectãšãããªããžã§ã¯ããäœæãããŸãããªããžã§ã¯ããäœæãããšããã®ãªããžã§ã¯ãã«å¯ŸããŠã¯ã©ã¹å
ã®å€æ°ãé¢æ°ãåŒã³åºãããšãã§ããŸãã äŸãã°ã以äžã®ããã«æžãããšãã§ããŸãã
ãã®ããã«ããªããžã§ã¯ãåã®åŸãã«ããã(.)ãä»ããå€æ°åãé¢æ°åãæå®ããããšã§ããã®ãªããžã§ã¯ãã«å¯ŸããŠã¢ã¯ã»ã¹ããããšãã§ããŸãã
ã¡ã³ããŒé¢æ°ãšããŒã¿ã¡ã³ããŒ
Cèšèªã§ã¯ãæ§é äœã¯é¢é£ããå€æ°ãã°ã«ãŒãåããããã«äœ¿çšãããŸããããããC++ã§ã¯æ§é äœã¯ã¯ã©ã¹ã®äžçš®ã§ãããã¡ã³ããŒé¢æ°ãšããŒã¿ã¡ã³ããŒãæã€ããšãã§ããŸããããã«ããããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®åºæ¬çãªæ©èœã§ããã«ãã»ã«åãå®çŸãããŸãã
以äžã®äŸã§ã¯ãCèšèªã§å®çŸ©ãããæ§é äœãC++ã®ã¯ã©ã¹ã«å€æããæ¹æ³ã瀺ããŸãã
äžèšã®äŸã§ã¯ãCèšèªã®æ§é äœãC++ã®ã¯ã©ã¹ã«å€æããããã«ãã¯ã©ã¹ã«public:ã®ç¯ãè¿œå ããã¡ã³ããŒå€æ°ãã¯ã©ã¹ã®å€éšããã¢ã¯ã»ã¹å¯èœã«ããŸãã
ã«ãã»ã«åã¯ããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®éèŠãªæŠå¿µã§ãããã¯ã©ã¹ã®ã¡ã³ããŒå€æ°ãšã¡ã³ããŒé¢æ°ãé èœããããšã«ãã£ãŠãå®å
šæ§ãé«ããå€éšããã®ã¢ã¯ã»ã¹ãå¶éããŸãã
以äžã®äŸã§ã¯ãã¯ã©ã¹ã®ã¡ã³ããŒå€æ°ãprivate:ç¯ã«ç§»åããpublic:ç¯ã«ã¯ã¡ã³ããŒé¢æ°ã®ã¿ãæ®ããŠããŸããããã«ãããå€éšããã®ã¢ã¯ã»ã¹ãå¶éããã¯ã©ã¹ã®å
éšç¶æ
ãä¿è·ããããšãã§ããŸãã
äžèšã®äŸã§ã¯ãsetWidthããã³setHeighté¢æ°ã䜿çšããŠãã¡ã³ããŒå€æ°widthããã³heightã«å€ãèšå®ããŸããareaé¢æ°ã¯ãã¡ã³ããŒå€æ°widthããã³heightã䜿çšããŠãç©åœ¢ã®é¢ç©ãèšç®ããŸããã¡ã³ããŒå€æ°widthããã³heightã¯ãprivate:ç¯ã«å®£èšãããŠãããããå€éšããçŽæ¥ã¢ã¯ã»ã¹ã§ããŸããã
ç¶æ¿ã¯ãæ¢åã®ã¯ã©ã¹ãåºã«æ°ããã¯ã©ã¹ãäœæããæ©èœã§ãããã³ãŒãã®åå©çšæ§ãé«ããããã«äœ¿çšãããŸããç¶æ¿å
ã®ã¯ã©ã¹ã¯ãããŒã¹ã¯ã©ã¹ãšåŒã°ããç¶æ¿å
ã®ã¯ã©ã¹ã¯ã掟çã¯ã©ã¹ãšåŒã°ããŸãã
以äžã®äŸã§ã¯ãRectangleã¯ã©ã¹ãç¶æ¿ããSquareã¯ã©ã¹ãå®çŸ©ããŠããŸããSquareã¯ã©ã¹ã¯ãRectangleã¯ã©ã¹ã®å¹
ãšé«ããçããç©åœ¢ãè¡šãããã«ãªã£ãŠããŸãã
äžèšã®äŸã§ã¯ãSquareã¯ã©ã¹ãRectangleã¯ã©ã¹ãpublicã§ç¶æ¿ããŠããŸããããã«ãããSquareã¯ã©ã¹ã¯Rectangleã¯ã©ã¹ã®ãã¹ãŠã®ã¡ã³ããŒå€æ°ãšã¡ã³ããŒé¢æ°ãç¶æ¿ããŸããsetSideé¢æ°ã䜿çšããŠãæ£æ¹åœ¢ã®1蟺ã®é·ããèšå®ããããšãã§ããŸãã
å€æ
æ§ã¯ãåãååã®ã¡ãœãããç°ãªãã¯ã©ã¹ã§äœ¿çšããããšãã§ããæ©èœã§ããããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®éèŠãªæŠå¿µã®1ã€ã§ããå€æ
æ§ã«ãããããã°ã©ããŒã¯ç°ãªãã¯ã©ã¹ã§åãååã®ã¡ãœããã䜿çšããããšãã§ããŸãã
以äžã®äŸã§ã¯ãShapeã¯ã©ã¹ãå®çŸ©ããŠãããRectangleã¯ã©ã¹ãšSquareã¯ã©ã¹ãShapeã¯ã©ã¹ãç¶æ¿ããŠããŸããprintAreaé¢æ°ã¯ãShapeã¯ã©ã¹ã®ãã€ã³ã¿ãåŒæ°ãšããŠåãåãããã®ãã€ã³ã¿ãæããªããžã§ã¯ãã®é¢ç©ãåºåããé¢æ°ã§ãã
äžèšã®äŸã§ã¯ãShapeã¯ã©ã¹ã«ã¯çŽç²ä»®æ³é¢æ°ããããRectangleã¯ã©ã¹ãšSquareã¯ã©ã¹ã¯ãããç¶æ¿ããŠããŸããçŽç²ä»®æ³é¢æ°ã¯ãå®è£
ãæããã掟çã¯ã©ã¹ã§å¿
ããªãŒããŒã©ã€ãããå¿
èŠããããŸããããã«ãããShapeã¯ã©ã¹ã®ãã€ã³ã¿ãåŒæ°ã«åãé¢æ°ã䜿çšããŠãRectangleã¯ã©ã¹ãšSquareã¯ã©ã¹ã®ãªããžã§ã¯ãã®é¢ç©ãåºåããããšãã§ããŸãã 以äžã¯ãmainé¢æ°ã§printAreaé¢æ°ã䜿çšããäŸã§ãã
äžèšã®äŸã§ã¯ãRectangleã¯ã©ã¹ã®ãªããžã§ã¯ããšSquareã¯ã©ã¹ã®ãªããžã§ã¯ããäœæããããããã®é¢ç©ãprintAreaé¢æ°ã§åºåããŠããŸããRectangleã¯ã©ã¹ãšSquareã¯ã©ã¹ã¯ãå
±ã«Shapeã¯ã©ã¹ãç¶æ¿ããŠãããããprintAreaé¢æ°ã«åŒæ°ãšããŠæž¡ãããšãã§ããŸãã
以äžããç¶æ¿ãšå€æ
æ§ã®æŠå¿µãšãã®äœ¿çšäŸã«ã€ããŠã®èª¬æã§ããç¶æ¿ãšå€æ
æ§ã¯ããªããžã§ã¯ãæåããã°ã©ãã³ã°ã«ãããŠéèŠãªæŠå¿µã§ãããã³ãŒãã®åå©çšæ§ãä¿å®æ§ãé«ããããã«ç©æ¥µçã«æŽ»çšãããŸãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "ãã®ææ¬ã¯ãCèšèªããC++èšèªã«ç§»è¡ããããã°ã©ããŒã察象ãšããŠããŸããCèšèªããC++èšèªã«ç§»è¡ããéã«ã¯ãæ°ããæŠå¿µãæ©èœãåŠã¶å¿
èŠããããåãã¯æžæãããšãããã§ãããã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "æ¬æžã§ã¯ãC++èšèªã«ãããåºæ¬çãªæ©èœãæŠå¿µã«ã€ããŠããããããã説æããŠããŸãããŸããCèšèªãšã®éãã«ãçŠç¹ãåœãŠãC++èšèªãç解ããäžã§ã®ãã€ã³ãã解説ããŠããŸãã",
"title": ""
},
{
"paragraph_id": 2,
"tag": "p",
"text": "æ¬æžãèªãããšã§ãC++èšèªã®åºæ¬çãªæ§æãæ©èœãç解ããCèšèªããC++èšèªã«ã¹ã ãŒãºã«ç§»è¡ããããšãã§ããããã«ãªãããšãç®æããŠããŸããC++èšèªã®åå¿è
ããCèšèªããC++èšèªã«ç§» è¡ããããšããŠããæ¹ã«ãšã£ãŠãæ¬æžãæçãªæ
å ±ãæäŸã§ããããšãé¡ã£ãŠããŸãã",
"title": ""
},
{
"paragraph_id": 3,
"tag": "p",
"text": "CèšèªãšC++èšèªã¯ãC++ãCèšèªãå
ã«èšèšãããŠããã®ã§å
±éç¹ãå€ãã§ãããããã€ãã®éãããããŸãã",
"title": "CãšC++ã®æ¯èŒ"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "ããã°ã©ã ã®æ§é C++ã§ã¯ãã¯ã©ã¹ãšããæ°ããããã°ã©ã ã®æ§é ã䜿çšããŠããŸããã¯ã©ã¹ã¯ãããŒã¿ãšé¢æ°ã1ã€ã®ãšã³ãã£ãã£ã«ãŸãšããã«ãã»ã«åãšããæŠå¿µã«åºã¥ããŠããŸããCèšèªã«ã¯ãã®ãããªæ§é ããããŸããã",
"title": "CãšC++ã®æ¯èŒ"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "C++ã«ã¯ã以äžã®ãããªåªããç¹åŸŽããããŸãã",
"title": "CãšC++ã®æ¯èŒ"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã¯ãããã°ã©ã ãããªããžã§ã¯ãããšããåäœã«åå²ããããšã§ãåå©çšæ§ãä¿å®æ§ãé«ããããã°ã©ãã³ã°ææ³ã§ãããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®åºæ¬çãªæŠå¿µã«ã¯ãããŒã¿ã®ã«ãã»ã«åãç¶æ¿ãããªã¢ãŒãã£ãºã ãªã©ããããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã®æŠèŠ"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "C++èšèªã§ã¯ããªããžã§ã¯ãæåããã°ã©ãã³ã°ãå®çŸããããã«ãã¯ã©ã¹ãšããæŠå¿µãå°å
¥ãããŠããŸããã¯ã©ã¹ã¯ãããŒã¿ãšããã«é¢é£ããé¢æ°ããŸãšãããã®ã§ããªããžã§ã¯ãã®èšèšå³ãšãªããŸãããªããžã§ã¯ããäœæããã«ã¯ãã¯ã©ã¹ããã€ã³ã¹ã¿ã³ã¹ãçæããå¿
èŠããããŸãããŸããã¯ã©ã¹ã®ç¶æ¿ãå€éç¶æ¿ãªã©ããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®ç¹åŸŽãå©çšããããšãã§ããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã®æŠèŠ"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "C++ã«ã¯Cãšåãåºæ¬ããŒã¿åããããŸãããC++ã«ã¯æ°ããããŒã¿åãè¿œå ãããŠããŸããäŸãã°ãboolãwchar_tãlong longãunsigned long longãªã©ã§ãããŸããC++ã§ã¯ãªããžã§ã¯ãæåããã°ã©ãã³ã°ããµããŒãããããã«ãã¯ã©ã¹ãæ§é äœãªã©ã®ãŠãŒã¶ãŒå®çŸ©åã䜿çšã§ããŸãã",
"title": "C++ã®åºæ¬æ§æ"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "æŒç®åãC++ã§ã¯æ°ãããã®ãè¿œå ãããŠããŸããäŸãã°ãã¹ã³ãŒã解決æŒç®å(::)ããã€ãããã¯ãã£ã¹ãæŒç®å(dynamic_cast)ãéçãã£ã¹ãæŒç®å(static_cast)ããªãã©ã«æŒç®å(literal operator)ãªã©ã§ãããããã®æŒç®åã¯ãC++ã§ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°ããã³ãã¬ãŒãã¡ã¿ããã°ã©ãã³ã°ã§åœ¹ç«ã¡ãŸãã",
"title": "C++ã®åºæ¬æ§æ"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "C++ã§ã¯ãCãšåãå¶åŸ¡æ§é ã䜿çšã§ããŸããäŸãã°ãifæãswitchæãforæãwhileæãªã©ã§ããããããC++ã§ã¯æ°ããå¶åŸ¡æ§é ãè¿œå ãããŠããŸããäŸãã°ãç¯å²ããŒã¹ã®forã«ãŒããdo-whileã«ãŒãã«ããã«ãŒãåŸã®æ¡ä»¶è©äŸ¡ãã©ã ãåŒã«ããç¡åé¢æ°ã®äœæãªã©ã§ãã",
"title": "C++ã®åºæ¬æ§æ"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "C++ã§ã¯ãŸããäŸå€åŠçããµããŒããããŠããŸããããã¯ãããã°ã©ã ã®å®è¡äžã«äºæããªãåé¡ãçºçããå Žåã«ãããã°ã©ã ã®å¶åŸ¡ãå¥ã®å Žæã«ç§»åãããããšãã§ããæ©èœã§ãã",
"title": "C++ã®åºæ¬æ§æ"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "C++ã§ã¯ãCãšåæ§ã«é¢æ°ã䜿çšã§ããŸãããã ããC++ã§ã¯é¢æ°ããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®äžéšãšããŠäœ¿çšããããšãã§ããŸããé¢æ°ãªãŒããŒããŒããä»®æ³é¢æ°ãçŽç²ä»®æ³é¢æ°ãé¢æ°ãã€ã³ã¿ãªã©ãC++ã§ã®é¢æ°ã®äœ¿çšæ³ã¯å€å²ã«ããããŸãã",
"title": "C++ã®åºæ¬æ§æ"
},
{
"paragraph_id": 13,
"tag": "p",
"text": "C++ã§ã¯ãŸããããã©ã«ãåŒæ°ãåç
§åŒæ°ãšãã£ãæ°ããåŒæ°ã®ã¿ã€ãã䜿çšã§ããŸããããã©ã«ãåŒæ°ã䜿çšãããšãé¢æ°ãåŒã³åºããšãã«åŒæ°ãçç¥ããããšãã§ããŸããåç
§åŒæ°ã䜿çšãããšãåŒæ°ãã³ããŒããããšãªããåŒã³åºãå
ã®å€æ°ã«çŽæ¥ã¢ã¯ã»ã¹ã§ããŸãã",
"title": "C++ã®åºæ¬æ§æ"
},
{
"paragraph_id": 14,
"tag": "p",
"text": "CããC++ã«ç§»è¡ããéã«ãåå空éã®æŠå¿µã«ã€ããŠç解ããããšãéèŠã§ããC++ã§ã¯ãåå空éã䜿çšããããšã§ãã°ããŒãã«åå空éã«å«ãŸããåãååãæã€ã·ã³ãã«ãåºå¥ããããšãã§ããŸãã",
"title": "C++ã®åºæ¬æ§æ"
},
{
"paragraph_id": 15,
"tag": "p",
"text": "åå空éã¯ãã³ãŒãå
ã®ã°ããŒãã«ã¹ã³ãŒãã«ååšããèå¥åã®ã°ã«ãŒãåæ¹æ³ãæäŸããŸããããã«ãããåãååãæã€ç°ãªããªããžã§ã¯ããé¢æ°ãåºå¥ã§ããŸããããšãã°ãç°ãªãã©ã€ãã©ãªããåãååã®é¢æ°ãèªã¿èŸŒãŸããå Žåã§ããåå空éã䜿çšããããšã§è¡çªãåé¿ã§ããŸãã",
"title": "C++ã®åºæ¬æ§æ"
},
{
"paragraph_id": 16,
"tag": "p",
"text": "åå空éã¯ãnamespaceããŒã¯ãŒãã䜿çšããŠå®çŸ©ãããŸããåå空éå
ã§å®çŸ©ãããèå¥åã¯ãnamespaceåãæå®ããããšã§ã¢ã¯ã»ã¹ã§ããŸããããšãã°ã次ã®ããã«åå空éãå®çŸ©ã§ããŸãã",
"title": "C++ã®åºæ¬æ§æ"
},
{
"paragraph_id": 17,
"tag": "p",
"text": "ããã«ãããMyNamespaceãšããååã®åå空éãå®çŸ©ãããmyIntãšmyFunctionããã®åå空éå
ã«å®çŸ©ãããŸãããããã®èå¥åã«ã¯ãMyNamespace::ãšããæ¥é èŸãä»ããããšã§ã¢ã¯ã»ã¹ã§ããŸãã",
"title": "C++ã®åºæ¬æ§æ"
},
{
"paragraph_id": 18,
"tag": "p",
"text": "åå空éã¯ãC++ã§ã©ã€ãã©ãªãéçºããéã«ç¹ã«åœ¹ç«ã¡ãŸããã©ã€ãã©ãªå
ã§å®çŸ©ããããã¹ãŠã®èå¥åããã©ã€ãã©ãªã®åå空éã«çœ®ãããšã§ãã©ã€ãã©ãªã®äœ¿çšè
ãã©ã€ãã©ãªãšèªåã®ã³ãŒãã®èå¥åãåºå¥ãããããªããŸãã",
"title": "C++ã®åºæ¬æ§æ"
},
{
"paragraph_id": 19,
"tag": "p",
"text": "C++ã§ã¯ãã¯ã©ã¹ãå®çŸ©ããããã«structãclassããŒã¯ãŒãã䜿çšããŸããCèšèªã§ã¯æ§é äœãå®çŸ©ããã®ã«structããŒã¯ãŒãã䜿ããŸããããC++ã§ã¯ãã¯ã©ã¹ãå®çŸ©ããããã«structãclassã䜿ãããšãã§ããŸããã¯ã©ã¹ã¯ãäžé£ã®å€æ°ãé¢æ°ããŸãšãããã®ã§ããã®ãªããžã§ã¯ãã«å¯ŸããŠæ§ã
ãªæäœãè¡ãããšãã§ããŸãã 以äžã«äŸã瀺ããŸãããŸããã¯ã©ã¹ã®å®çŸ©ã§ãã",
"title": "ã¯ã©ã¹ãšãªããžã§ã¯ã"
},
{
"paragraph_id": 20,
"tag": "p",
"text": "ãã®ã¯ã©ã¹ã§ã¯ãmyPrivateVarãšãããã©ã€ããŒãå€æ°ãšmyPublicVarãšãããããªãã¯å€æ°ããããŠmyPublicFuncãšãããããªãã¯é¢æ°ãå®çŸ©ãããŠããŸãããã©ã€ããŒãå€æ°ã¯ãã¯ã©ã¹å
ã®ã¿ããã¢ã¯ã»ã¹ã§ããå€éšããã¯ã¢ã¯ã»ã¹ã§ããŸãããäžæ¹ããããªãã¯å€æ°ãé¢æ°ã¯ãã¯ã©ã¹å
å€ããã¢ã¯ã»ã¹ããããšãã§ããŸãã",
"title": "ã¯ã©ã¹ãšãªããžã§ã¯ã"
},
{
"paragraph_id": 21,
"tag": "p",
"text": "ã¯ã©ã¹ãå®çŸ©ãããããã®ã¯ã©ã¹ãã€ã³ã¹ã¿ã³ã¹åããããšãã§ããŸããã€ã³ã¹ã¿ã³ã¹åãšã¯ãã¯ã©ã¹ãå®äœåããããšã§ããã®ã¯ã©ã¹ã®ãªããžã§ã¯ããäœæããããšã§ãã 以äžã«äŸã瀺ããŸãããŸããã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹åã§ãã",
"title": "ã¯ã©ã¹ãšãªããžã§ã¯ã"
},
{
"paragraph_id": 22,
"tag": "p",
"text": "ãã®ããã«ãã¯ã©ã¹åã®åŸãã«ãªããžã§ã¯ãåãä»ããããšã§ããã®ã¯ã©ã¹ã®ãªããžã§ã¯ããäœæããããšãã§ããŸãããã®å ŽåãmyObjectãšãããªããžã§ã¯ããäœæãããŸãããªããžã§ã¯ããäœæãããšããã®ãªããžã§ã¯ãã«å¯ŸããŠã¯ã©ã¹å
ã®å€æ°ãé¢æ°ãåŒã³åºãããšãã§ããŸãã äŸãã°ã以äžã®ããã«æžãããšãã§ããŸãã",
"title": "ã¯ã©ã¹ãšãªããžã§ã¯ã"
},
{
"paragraph_id": 23,
"tag": "p",
"text": "ãã®ããã«ããªããžã§ã¯ãåã®åŸãã«ããã(.)ãä»ããå€æ°åãé¢æ°åãæå®ããããšã§ããã®ãªããžã§ã¯ãã«å¯ŸããŠã¢ã¯ã»ã¹ããããšãã§ããŸãã",
"title": "ã¯ã©ã¹ãšãªããžã§ã¯ã"
},
{
"paragraph_id": 24,
"tag": "p",
"text": "ã¡ã³ããŒé¢æ°ãšããŒã¿ã¡ã³ããŒ",
"title": "ã¯ã©ã¹ãšãªããžã§ã¯ã"
},
{
"paragraph_id": 25,
"tag": "p",
"text": "Cèšèªã§ã¯ãæ§é äœã¯é¢é£ããå€æ°ãã°ã«ãŒãåããããã«äœ¿çšãããŸããããããC++ã§ã¯æ§é äœã¯ã¯ã©ã¹ã®äžçš®ã§ãããã¡ã³ããŒé¢æ°ãšããŒã¿ã¡ã³ããŒãæã€ããšãã§ããŸããããã«ããããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®åºæ¬çãªæ©èœã§ããã«ãã»ã«åãå®çŸãããŸãã",
"title": "ã¯ã©ã¹ãšãªããžã§ã¯ã"
},
{
"paragraph_id": 26,
"tag": "p",
"text": "以äžã®äŸã§ã¯ãCèšèªã§å®çŸ©ãããæ§é äœãC++ã®ã¯ã©ã¹ã«å€æããæ¹æ³ã瀺ããŸãã",
"title": "ã¯ã©ã¹ãšãªããžã§ã¯ã"
},
{
"paragraph_id": 27,
"tag": "p",
"text": "äžèšã®äŸã§ã¯ãCèšèªã®æ§é äœãC++ã®ã¯ã©ã¹ã«å€æããããã«ãã¯ã©ã¹ã«public:ã®ç¯ãè¿œå ããã¡ã³ããŒå€æ°ãã¯ã©ã¹ã®å€éšããã¢ã¯ã»ã¹å¯èœã«ããŸãã",
"title": "ã¯ã©ã¹ãšãªããžã§ã¯ã"
},
{
"paragraph_id": 28,
"tag": "p",
"text": "ã«ãã»ã«åã¯ããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®éèŠãªæŠå¿µã§ãããã¯ã©ã¹ã®ã¡ã³ããŒå€æ°ãšã¡ã³ããŒé¢æ°ãé èœããããšã«ãã£ãŠãå®å
šæ§ãé«ããå€éšããã®ã¢ã¯ã»ã¹ãå¶éããŸãã",
"title": "ã¯ã©ã¹ãšãªããžã§ã¯ã"
},
{
"paragraph_id": 29,
"tag": "p",
"text": "以äžã®äŸã§ã¯ãã¯ã©ã¹ã®ã¡ã³ããŒå€æ°ãprivate:ç¯ã«ç§»åããpublic:ç¯ã«ã¯ã¡ã³ããŒé¢æ°ã®ã¿ãæ®ããŠããŸããããã«ãããå€éšããã®ã¢ã¯ã»ã¹ãå¶éããã¯ã©ã¹ã®å
éšç¶æ
ãä¿è·ããããšãã§ããŸãã",
"title": "ã¯ã©ã¹ãšãªããžã§ã¯ã"
},
{
"paragraph_id": 30,
"tag": "p",
"text": "äžèšã®äŸã§ã¯ãsetWidthããã³setHeighté¢æ°ã䜿çšããŠãã¡ã³ããŒå€æ°widthããã³heightã«å€ãèšå®ããŸããareaé¢æ°ã¯ãã¡ã³ããŒå€æ°widthããã³heightã䜿çšããŠãç©åœ¢ã®é¢ç©ãèšç®ããŸããã¡ã³ããŒå€æ°widthããã³heightã¯ãprivate:ç¯ã«å®£èšãããŠãããããå€éšããçŽæ¥ã¢ã¯ã»ã¹ã§ããŸããã",
"title": "ã¯ã©ã¹ãšãªããžã§ã¯ã"
},
{
"paragraph_id": 31,
"tag": "p",
"text": "ç¶æ¿ã¯ãæ¢åã®ã¯ã©ã¹ãåºã«æ°ããã¯ã©ã¹ãäœæããæ©èœã§ãããã³ãŒãã®åå©çšæ§ãé«ããããã«äœ¿çšãããŸããç¶æ¿å
ã®ã¯ã©ã¹ã¯ãããŒã¹ã¯ã©ã¹ãšåŒã°ããç¶æ¿å
ã®ã¯ã©ã¹ã¯ã掟çã¯ã©ã¹ãšåŒã°ããŸãã",
"title": "ã¯ã©ã¹ãšãªããžã§ã¯ã"
},
{
"paragraph_id": 32,
"tag": "p",
"text": "以äžã®äŸã§ã¯ãRectangleã¯ã©ã¹ãç¶æ¿ããSquareã¯ã©ã¹ãå®çŸ©ããŠããŸããSquareã¯ã©ã¹ã¯ãRectangleã¯ã©ã¹ã®å¹
ãšé«ããçããç©åœ¢ãè¡šãããã«ãªã£ãŠããŸãã",
"title": "ã¯ã©ã¹ãšãªããžã§ã¯ã"
},
{
"paragraph_id": 33,
"tag": "p",
"text": "äžèšã®äŸã§ã¯ãSquareã¯ã©ã¹ãRectangleã¯ã©ã¹ãpublicã§ç¶æ¿ããŠããŸããããã«ãããSquareã¯ã©ã¹ã¯Rectangleã¯ã©ã¹ã®ãã¹ãŠã®ã¡ã³ããŒå€æ°ãšã¡ã³ããŒé¢æ°ãç¶æ¿ããŸããsetSideé¢æ°ã䜿çšããŠãæ£æ¹åœ¢ã®1蟺ã®é·ããèšå®ããããšãã§ããŸãã",
"title": "ã¯ã©ã¹ãšãªããžã§ã¯ã"
},
{
"paragraph_id": 34,
"tag": "p",
"text": "å€æ
æ§ã¯ãåãååã®ã¡ãœãããç°ãªãã¯ã©ã¹ã§äœ¿çšããããšãã§ããæ©èœã§ããããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®éèŠãªæŠå¿µã®1ã€ã§ããå€æ
æ§ã«ãããããã°ã©ããŒã¯ç°ãªãã¯ã©ã¹ã§åãååã®ã¡ãœããã䜿çšããããšãã§ããŸãã",
"title": "ã¯ã©ã¹ãšãªããžã§ã¯ã"
},
{
"paragraph_id": 35,
"tag": "p",
"text": "以äžã®äŸã§ã¯ãShapeã¯ã©ã¹ãå®çŸ©ããŠãããRectangleã¯ã©ã¹ãšSquareã¯ã©ã¹ãShapeã¯ã©ã¹ãç¶æ¿ããŠããŸããprintAreaé¢æ°ã¯ãShapeã¯ã©ã¹ã®ãã€ã³ã¿ãåŒæ°ãšããŠåãåãããã®ãã€ã³ã¿ãæããªããžã§ã¯ãã®é¢ç©ãåºåããé¢æ°ã§ãã",
"title": "ã¯ã©ã¹ãšãªããžã§ã¯ã"
},
{
"paragraph_id": 36,
"tag": "p",
"text": "äžèšã®äŸã§ã¯ãShapeã¯ã©ã¹ã«ã¯çŽç²ä»®æ³é¢æ°ããããRectangleã¯ã©ã¹ãšSquareã¯ã©ã¹ã¯ãããç¶æ¿ããŠããŸããçŽç²ä»®æ³é¢æ°ã¯ãå®è£
ãæããã掟çã¯ã©ã¹ã§å¿
ããªãŒããŒã©ã€ãããå¿
èŠããããŸããããã«ãããShapeã¯ã©ã¹ã®ãã€ã³ã¿ãåŒæ°ã«åãé¢æ°ã䜿çšããŠãRectangleã¯ã©ã¹ãšSquareã¯ã©ã¹ã®ãªããžã§ã¯ãã®é¢ç©ãåºåããããšãã§ããŸãã 以äžã¯ãmainé¢æ°ã§printAreaé¢æ°ã䜿çšããäŸã§ãã",
"title": "ã¯ã©ã¹ãšãªããžã§ã¯ã"
},
{
"paragraph_id": 37,
"tag": "p",
"text": "äžèšã®äŸã§ã¯ãRectangleã¯ã©ã¹ã®ãªããžã§ã¯ããšSquareã¯ã©ã¹ã®ãªããžã§ã¯ããäœæããããããã®é¢ç©ãprintAreaé¢æ°ã§åºåããŠããŸããRectangleã¯ã©ã¹ãšSquareã¯ã©ã¹ã¯ãå
±ã«Shapeã¯ã©ã¹ãç¶æ¿ããŠãããããprintAreaé¢æ°ã«åŒæ°ãšããŠæž¡ãããšãã§ããŸãã",
"title": "ã¯ã©ã¹ãšãªããžã§ã¯ã"
},
{
"paragraph_id": 38,
"tag": "p",
"text": "以äžããç¶æ¿ãšå€æ
æ§ã®æŠå¿µãšãã®äœ¿çšäŸã«ã€ããŠã®èª¬æã§ããç¶æ¿ãšå€æ
æ§ã¯ããªããžã§ã¯ãæåããã°ã©ãã³ã°ã«ãããŠéèŠãªæŠå¿µã§ãããã³ãŒãã®åå©çšæ§ãä¿å®æ§ãé«ããããã«ç©æ¥µçã«æŽ»çšãããŸãã",
"title": "ã¯ã©ã¹ãšãªããžã§ã¯ã"
}
] | ãã®ææ¬ã¯ãCèšèªããC++èšèªã«ç§»è¡ããããã°ã©ããŒã察象ãšããŠããŸããCèšèªããC++èšèªã«ç§»è¡ããéã«ã¯ãæ°ããæŠå¿µãæ©èœãåŠã¶å¿
èŠããããåãã¯æžæãããšãããã§ãããã æ¬æžã§ã¯ãC++èšèªã«ãããåºæ¬çãªæ©èœãæŠå¿µã«ã€ããŠããããããã説æããŠããŸãããŸããCèšèªãšã®éãã«ãçŠç¹ãåœãŠãC++èšèªãç解ããäžã§ã®ãã€ã³ãã解説ããŠããŸãã æ¬æžãèªãããšã§ãC++èšèªã®åºæ¬çãªæ§æãæ©èœãç解ããCèšèªããC++èšèªã«ã¹ã ãŒãºã«ç§»è¡ããããšãã§ããããã«ãªãããšãç®æããŠããŸããC++èšèªã®åå¿è
ããCèšèªããC++èšèªã«ç§»
è¡ããããšããŠããæ¹ã«ãšã£ãŠãæ¬æžãæçãªæ
å ±ãæäŸã§ããããšãé¡ã£ãŠããŸãã | æ¬æžã¯ãCèšèªããC++èšèªã«ç§»è¡ããããšããŠããããã°ã©ããŒã察象ã«ããŠããŸããCèšèªããC++èšèªãžã®ç§»è¡ã§ã¯ãæ°ããæŠå¿µãæ©èœãåŠã¶å¿
èŠããããåãã¯æžæãããšãããã§ãããã
æ¬æžã§ã¯ãC++èšèªã«ãããåºæ¬çãªæ©èœãæŠå¿µããããããã説æããŠããŸãããŸããCèšèªãšã®éãã«ãçŠç¹ãåœãŠãC++èšèªãç解ããäžã§ã®ãã€ã³ãã解説ããŠããŸãã
æ¬æžãèªãããšã§ãC++èšèªã®åºæ¬çãªæ§æãæ©èœãç解ããCèšèªããC++èšèªã«ã¹ã ãŒãºã«ç§»è¡ããããšãã§ããããã«ãªãããšãç®æããŠããŸããC++èšèªã®åå¿è
ããCèšèªããC++èšèªã«ç§»è¡ããããšããŠããæ¹ã«ãšã£ãŠãæ¬æžãæçãªæ
å ±ãæäŸã§ããããšãé¡ã£ãŠããŸãã
__TOC__
== CãšC++ã®æ¯èŒ ==
CãšC++ã¯ãäž¡æ¹ãšãããã°ã©ãã³ã°èšèªã§ããã䌌ãŠããç¹ããããŸãããããã€ãã®éèŠãªéãããããŸãã
Cã¯ããã·ãŒãžã£ã«ããã°ã©ãã³ã°èšèªã§ãããã·ã³ãã«ã§çŽæçãªæ§é ãæã£ãŠããŸããäž»ã«ã·ã¹ãã ããã°ã©ãã³ã°ãçµã¿èŸŒã¿ã·ã¹ãã ã§äœ¿ããããã€ã³ã¿æäœãäžè¬çã§ããäžæ¹ã§ãC++ã¯ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã§ãCã«å ããŠã¯ã©ã¹ããªããžã§ã¯ãæåã®æ©èœãæã¡ãŸãã
C++ã¯Cã®æ©èœãå«ãã§ãããããC++ã§æžãããã³ãŒãã¯Cã®ã³ãŒããšäºææ§ããããŸããããããC++ã¯è¿œå ã®æ©èœãæäŸããŠããŸããäŸãã°ãã¯ã©ã¹ãšãªããžã§ã¯ãæåããã°ã©ãã³ã°ããã³ãã¬ãŒããäŸå€åŠçãªã©ããããŸãã
C++ã®å©ç¹ã¯ãããå€ãã®æ©èœãæã£ãŠããããšããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®ãµããŒããããè±å¯ãªæšæºã©ã€ãã©ãªãªã©ããããŸããããããCã¯ã·ã³ãã«ããšããŒã¿ããªãã£ããããç¹ã«ãªãœãŒã¹ãéãããŠããç°å¢ããããã©ãŒãã³ã¹ãéèŠãªå Žåã«äŸç¶ãšããŠéå®ãããŸãã
ã©ã¡ããéžã¶ãã¯ããããžã§ã¯ãã®ããŒãºãéçºè
ã®å¥œã¿ã«ãããŸãããªããžã§ã¯ãæåããã°ã©ãã³ã°ãããå¿
èŠãããããæ¢åã®Cã³ãŒããšäºææ§ãæãããå¿
èŠãããããªã©ãéžæã®åºæºã¯å€å²ã«ããããŸãã
=== C++ã®Cã«å¯Ÿããåªäœæ§ ===
C++ã¯Cã«æ¯ã¹ãŠããã€ãã®åªäœæ§ãæã£ãŠããŸãã
;ãªããžã§ã¯ãæåããã°ã©ãã³ã° (OOP) ã®ãµããŒã: C++ã¯ã¯ã©ã¹ããªããžã§ã¯ãæåããã°ã©ãã³ã°ããµããŒãããŠããŸããããã«ãããã³ãŒãã®åå©çšæ§ãåäžããã¡ã³ããã³ã¹ã容æã«ãªããŸãããŸããæœè±¡åãã«ãã»ã«åãçšããŠã³ãŒããæŽçããããå¹ççã«éçºããããšãã§ããŸãã
;è±å¯ãªæšæºã©ã€ãã©ãª: C++ã«ã¯Cèšèªã®æšæºã©ã€ãã©ãªã«å ããŠãSTLïŒStandard Template LibraryïŒãšåŒã°ããè±å¯ãªããŒã¿æ§é ãã¢ã«ãŽãªãºã ãå«ãŸããŠããŸããããã«ããããœãŒããæ€çŽ¢ãªã©ã®äžè¬çãªæäœã容æã«è¡ãããšãã§ããŸãã
;ãã³ãã¬ãŒã: C++ã«ã¯ãã³ãã¬ãŒãæ©èœããããæ±çšæ§ã®é«ãã³ãŒããèšè¿°ã§ããŸããããã«ãããããŒã¿åã«äŸåããªãæ±çšçãªã¢ã«ãŽãªãºã ãããŒã¿æ§é ãäœæããããšãå¯èœã§ãã
äŸå€åŠç: C++ã¯äŸå€åŠçããµããŒãããŠããããšã©ãŒãã³ããªã³ã°ãããæè»ã«è¡ãããšãã§ããŸããããã«ããããšã©ãŒãçºçããå Žåã«ãã¡ããšå¯ŸåŠããããšãã§ããŸãã
;æ¡åŒµæ§ãšæè»æ§: C++ã¯Cèšèªã®æ©èœãå«ãã§ãããæ¢åã®Cã³ãŒããšã®äºææ§ããããŸãããã®ãããC++ã¯Cèšèªã®æ©èœãå©çšããªããããªããžã§ã¯ãæåãä»ã®é«åºŠãªæ©èœãè¿œå ã§ããŸãã
ãã ãããããžã§ã¯ããã¿ã¹ã¯ã«ãã£ãŠã¯Cã®æ¹ãé©ããŠããå ŽåããããŸããç¹ã«ãªãœãŒã¹ãéãããŠããããã·ã¹ãã ããã°ã©ãã³ã°ãããã©ãŒãã³ã¹ãéèŠãªå Žåã¯ãCã®ã·ã³ãã«ããçŽæ¥æ§ãæ±ããããããšããããŸãã
== ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã®æŠèŠ ==
=== ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã®åºæ¬çãªæŠå¿µ ===
ãªããžã§ã¯ãæåããã°ã©ãã³ã°ïŒOOPïŒã¯ãããã°ã©ãã³ã°ã®ãã©ãã€ã ã®äžã€ã§ãããã³ãŒããããªããžã§ã¯ãããšåŒã°ããåã
ã®ãšã³ãã£ãã£ã®éåäœã«åºã¥ããŠæ§é åããèãæ¹ã§ãã
ãã®ã¢ãããŒãã§ã¯ãããŒã¿ïŒå€æ°ãããããã£ïŒãšããã«é¢é£ããæ¯ãèãïŒé¢æ°ãã¡ãœããïŒãäžã€ã®ãŸãšãŸãã«ããŠæ±ããŸããããã«ãããã³ãŒããããçŽæçã§åå©çšæ§ãé«ããªããŸãã
äž»ãªOOPã®æŠå¿µã«ã¯æ¬¡ã®ãããªãã®ããããŸã:
;ã¯ã©ã¹ãšãªããžã§ã¯ã: ã¯ã©ã¹ã¯ãªããžã§ã¯ãã®èšèšå³ã®ãããªãã®ã§ãããã«åºã¥ããŠå®éã®ãªããžã§ã¯ããäœãããŸããã¯ã©ã¹ã¯ããŒã¿ïŒå±æ§ããã£ãŒã«ãïŒãšã¡ãœããïŒæäœãæ¯ãèãïŒãå«ã¿ãŸãããªããžã§ã¯ãã¯ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ã§ãã
;ã«ãã»ã«å: ã«ãã»ã«åã¯ãããŒã¿ãšããã«é¢é£ããæäœãäžã€ã«ãŸãšããæŠå¿µã§ããã¯ã©ã¹å
ã®ããŒã¿ã¯äžè¬çã«ãã©ã€ããŒããšããŠå®çŸ©ãããå€éšããã¯çŽæ¥ã¢ã¯ã»ã¹ããããã¡ãœãããéããŠã®ã¿æäœãããŸãã
;ç¶æ¿: ç¶æ¿ã¯ãæ¢åã®ã¯ã©ã¹ãããŒã¹ã«ããŠæ°ããã¯ã©ã¹ãäœæããæ©èœã§ããããã«ãããæ¢åã®ã¯ã©ã¹ã®ç¹æ§ãåå©çšãã€ã€ãæ°ããæ©èœãè¿œå ããããšãã§ããŸãã
;ããªã¢ãŒãã£ãºã : ããªã¢ãŒãã£ãºã ã¯ãåãã¡ãœããåãæã€ç°ãªãã¯ã©ã¹ããªããžã§ã¯ãããããããç°ãªãæ¯ãèããããããšãæããŸããããã«ãããåãååã®ã¡ãœããã䜿ããªãããç°ãªãã¯ã©ã¹ã®ãªããžã§ã¯ããæ±ãããšãã§ããŸãã
OOPã¯ã³ãŒãã®æ§é åãã¡ã³ããã³ã¹æ§ã®åäžãåå©çšæ§ã®é«ããªã©ã®å©ç¹ããããŸããå€ãã®ããã°ã©ãã³ã°èšèªïŒC++, Java, Pythonãªã©ïŒããªããžã§ã¯ãæåããã°ã©ãã³ã°ããµããŒãããŠããããããã®æŠå¿µã掻çšããŠããã°ã©ã ãäœæããããšãã§ããŸãã
=== C++ã«ããããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®å®è£
æ¹æ³ ===
C++ã§ã¯ããªããžã§ã¯ãæåããã°ã©ãã³ã°ãå®è£
ããããã«ã¯ã©ã¹ãšãªããžã§ã¯ãã䜿çšããŸãã以äžã«ãC++ã§ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã®åºæ¬çãªå®è£
æ¹æ³ã瀺ããŸãã
;ã¯ã©ã¹ã®å®çŸ©ãšäœ¿çš
:<syntaxhighlight lang=c++>
// ã¯ã©ã¹ã®å®çŸ©
class MyClass {
private: // ãã©ã€ããŒããªã¡ã³ããŒïŒããã©ã«ãïŒ
int myPrivateMember;
public: // ãããªãã¯ãªã¡ã³ããŒ
// ã³ã³ã¹ãã©ã¯ã¿
MyClass(int initialValue) {
myPrivateMember = initialValue;
}
// ã¡ã³ããŒé¢æ°
void setPrivateMember(int newValue) {
myPrivateMember = newValue;
}
int getPrivateMember() {
return myPrivateMember;
}
};
</syntaxhighlight>
;ãªããžã§ã¯ãã®çæãšäœ¿çš
:<syntaxhighlight lang=c++>
int main() {
// ãªããžã§ã¯ãã®çæ
MyClass obj(10); // ã³ã³ã¹ãã©ã¯ã¿ãåŒã³åºããŠåæå
// ã¡ã³ããŒé¢æ°ã®åŒã³åºã
obj.setPrivateMember(25);
// ã¡ã³ããŒå€æ°ãžã®ã¢ã¯ã»ã¹
int value = obj.getPrivateMember();
return 0;
}
</syntaxhighlight>
;ã¯ã©ã¹ã®ç¶æ¿
:<syntaxhighlight lang=c++>
// åºæ¬ã¯ã©ã¹
class BaseClass {
public:
void display() {
cout << "BaseClassã®display()é¢æ°" << endl;
}
};
// 掟çã¯ã©ã¹
class DerivedClass : public BaseClass {
public:
void display() {
cout << "DerivedClassã®display()é¢æ°" << endl;
}
};
</syntaxhighlight>
;ããªã¢ãŒãã£ãºã
:<syntaxhighlight lang=c++>
void performDisplay(BaseClass& obj) {
obj.display();
}
int main() {
BaseClass baseObj;
DerivedClass derivedObj;
performDisplay(baseObj); // BaseClassã®display()é¢æ°ãåŒã°ãã
performDisplay(derivedObj);// DerivedClassã®display()é¢æ°ãåŒã°ãã
return 0;
}
</syntaxhighlight>
以äžã®äŸã§ã¯ãã¯ã©ã¹ã®å®çŸ©ããªããžã§ã¯ãã®çæãã¡ã³ããŒé¢æ°ã®åŒã³åºããç¶æ¿ããããŠããªã¢ãŒãã£ãºã ã®æŠå¿µã瀺ãããŠããŸãããããã®èŠçŽ ãçµã¿åãããŠããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®æ©èœã掻çšããããšãã§ããŸãã
== C++ã®åºæ¬æ§æ ==
=== C++ã®ããŒã¿åãšæŒç®å ===
C++ã¯Cãšåãåºæ¬ããŒã¿åãæã£ãŠããŸãããããã«å ããŠæ°ããããŒã¿åãå°å
¥ãããŠããŸããäŸãã°ã<code>bool</code>ã¯çåœå€ãè¡šçŸããããã®ããŒã¿åã§ã<code>wchar_t</code>ã¯ã¯ã€ãæåãæ±ãããã®ããŒã¿åã§ãããŸããæŽæ°ã®å€§ãããå¢ããã<code>long long</code>ã笊å·ãªãæŽæ°ã®<code>unsigned long long</code>ãªã©ãC++ã§å©çšã§ããŸãããããã®ããŒã¿åã¯ãC++ãããå€æ§ãªããŒã¿ãè¡šçŸããåŠçããããšãå¯èœã«ããŸãã
ããã«ãC++ã§ã¯ãªããžã§ã¯ãæåããã°ã©ãã³ã°ããµããŒãããããã«ããŠãŒã¶ãŒãç¬èªã«å®çŸ©ã§ããã¯ã©ã¹ãæ§é äœãªã©ã®ãŠãŒã¶ãŒå®çŸ©åãå©çšã§ããŸããããã«ãããããŒã¿ãšãã®ããŒã¿ã«é¢é£ããæ¯ãèãããŸãšããŠç®¡çããããšãã§ããããã°ã©ã ã®æ§é åãåå©çšæ§ãé«ããããšãã§ããŸãã
æŒç®åãC++ã§ã¯æ¡åŒµãããŠããŸããäŸãã°ãã¹ã³ãŒã解決æŒç®å(::)ã¯ç¹å®ã®ã¹ã³ãŒãå
ã®å€æ°ãé¢æ°ã«ã¢ã¯ã»ã¹ããããã«äœ¿çšããããã€ãããã¯ãã£ã¹ãæŒç®å(dynamic_cast)ãéçãã£ã¹ãæŒç®å(static_cast)ã¯ããªããžã§ã¯ãæåããã°ã©ãã³ã°ã§ã®åå€æã«åœ¹ç«ã¡ãŸãããŸãããªãã©ã«æŒç®å(literal operator)ã¯ãŠãŒã¶ãŒãç¬èªã®ãªãã©ã«ãå®çŸ©ããéã«äœ¿çšãããç¹å®ã®åã«å¯Ÿããã«ã¹ã¿ã ãªãªãã©ã«è¡šçŸãå¯èœã«ããŸãã
ãããã®æ°ããããŒã¿åãæŒç®åã¯ãC++ãæè»ã§åŒ·åãªããã°ã©ãã³ã°èšèªã«ããŠããŸãããªããžã§ã¯ãæåããã°ã©ãã³ã°ãé«åºŠãªãã³ãã¬ãŒãã¡ã¿ããã°ã©ãã³ã°ãªã©ãå€æ§ãªããã°ã©ãã³ã°ææ³ããµããŒãããŠããŸãã
=== å¶åŸ¡æ§é ===
C++ã§ã¯ãCã§äœ¿çšãããŠããifæãswitchæãforæãwhileæãªã©ã®åºæ¬çãªå¶åŸ¡æ§é ãå©çšããããšãã§ããŸãããããã¯ãæ¡ä»¶åå²ãã«ãŒããå¶åŸ¡ããããã«äœ¿ãããŸãã
ããã«ãC++ã§ã¯æ°ããå¶åŸ¡æ§é ãè¿œå ãããŠããŸããäŸãã°ãç¯å²ããŒã¹ã®forã«ãŒãã¯ãã³ã¬ã¯ã·ã§ã³ãé
åãªã©ã®èŠçŽ ã«é çªã«ã¢ã¯ã»ã¹ããããã®ç°¡æœãªæ¹æ³ãæäŸããŸãã
:<syntaxhighlight lang=c++>
// ç¯å²ããŒã¹ã®forã«ãŒã
#include <iostream>
#include <vector>
using namespace std;
int main(void){
std::vector<int> numbers = {1, 2, 3, 4, 5};
for (const auto num : numbers) {
std::cout << num << " ";
}
}
// åºå: 1 2 3 4 5
</syntaxhighlight>
ããã«ãC++ã§ã¯ã©ã ãåŒãå©çšã§ããŸããããã¯ç¡åé¢æ°ãäœæããããã®äŸ¿å©ãªæ¹æ³ã§ãã
:<syntaxhighlight lang=c++>
// ã©ã ãåŒ
auto add = [](int x, int y) { return x + y; };
std::cout << add(3, 5); // åºå: 8
</syntaxhighlight>
ãããŠãC++ã§ã¯äŸå€åŠçããµããŒããããŠããŸããããã¯ãããã°ã©ã ã®å®è¡äžã«ãšã©ãŒãçºçããå Žåã«ããšã©ãŒãåŠçããé©åãªå¯Ÿå¿ãããããã®ä»çµã¿ã§ããäŸå€åŠçã䜿çšããããšã§ããšã©ãŒãçºçããå Žæãšã¯ç°ãªãå Žæã§ãšã©ãŒãåŠçã§ããŸãã
:<syntaxhighlight lang=c++>
try {
// äŸå€ãçºçããå¯èœæ§ã®ããã³ãŒã
throw std::runtime_error("Something went wrong!");
} catch (const std::exception& e) {
// äŸå€ããã£ãããããå Žåã®åŠç
std::cout << "Exception caught: " << e.what();
}
</syntaxhighlight>
ãããã®æ°ããå¶åŸ¡æ§é ãäŸå€åŠçã¯ãC++ãããæè»ã§è¡šçŸåè±ããªèšèªã«ããŠããŸããããç°¡æœã§å¹ççãªã³ãŒãã£ã³ã°ãå¯èœã«ããããã°ã©ã ã®ä¿¡é Œæ§ãé«ããŸãã
=== é¢æ°ãšåŒæ° ===
C++ã§ã¯ãCãšåæ§ã«åºæ¬çãªé¢æ°ãå®çŸ©ãã䜿çšããããšãã§ããŸãããããã«ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã®äžéšãšããŠé¢æ°ã掻çšããããšãã§ããŸãã
;é¢æ°ã®ãªãŒããŒããŒã
:é¢æ°ã®ãªãŒããŒããŒãã¯ãåãååã®é¢æ°ã«ç°ãªãåŒæ°ãªã¹ããæãããããšãã§ããŸãã
:<syntaxhighlight lang=c++>
void print(int value) {
std::cout << "Value: " << value << std::endl;
}
void print(double value) {
std::cout << "Value: " << value << std::endl;
}
</syntaxhighlight>
;ä»®æ³é¢æ°ãšçŽç²ä»®æ³é¢æ°
:ä»®æ³é¢æ°ã¯ã掟çã¯ã©ã¹ã§ãªãŒããŒã©ã€ããããå¯èœæ§ã®ããé¢æ°ã§ãã
:<syntaxhighlight lang=c++>
class Base {
public:
virtual void display() { std::cout << "Base class display" << std::endl; }
virtual ~Base() {}
};
class Derived : public Base {
public:
void display() override { std::cout << "Derived class display" << std::endl; }
};
</syntaxhighlight>
:çŽç²ä»®æ³é¢æ°ã¯ã掟çã¯ã©ã¹ã§å¿
ããªãŒããŒã©ã€ããããé¢æ°ã§ããã®å®è£
ã¯åºåºã¯ã©ã¹ã§ã¯æäŸãããŸããã
:<syntaxhighlight lang=c++>
class AbstractBase {
public:
virtual void pureVirtualFunction() = 0;
virtual ~AbstractBase() {}
};
class ConcreteDerived : public AbstractBase {
public:
void pureVirtualFunction() override {
std::cout << "Implementation of pure virtual function" << std::endl;
}
};
</syntaxhighlight>
;ããã©ã«ãåŒæ°ãšåç
§åŒæ°
:ããã©ã«ãåŒæ°ã䜿çšãããšãé¢æ°ãåŒã³åºãéã«åŒæ°ãçç¥ã§ããŸãã
:<syntaxhighlight lang=c++>
void greet(std::string name = "Guest") {
std::cout << "Hello, " << name << "!" << std::endl;
}
</syntaxhighlight>
:åç
§åŒæ°ã䜿çšãããšãé¢æ°å
ã§åŒæ°ã«å¯Ÿããå€æŽãåŒã³åºãå
ã®å€æ°ã«åæ ãããŸãã
:<syntaxhighlight lang=c++>
void increment(int &num) {
num++;
}
</syntaxhighlight>
ãããã®æ©èœã¯ãC++ã«ãããé¢æ°ã®æè»æ§ãé«ããããã°ã©ãã³ã°ã®ææ³ãå€æ§åãããã®ã«åœ¹ç«ã¡ãŸããé¢æ°ã®åå©çšæ§ãæè»æ§ãåäžãããããå¹ççãªã³ãŒãã£ã³ã°ãå®çŸããŸãã
=== åå空é ===
åå空éã¯ãC++ã§ã®ã·ã³ãã«ïŒå€æ°ãé¢æ°ãã¯ã©ã¹ãªã©ïŒã®ã°ã«ãŒãåæ¹æ³ãæäŸããŸããããã«ãããç°ãªãå Žæã§åãååã䜿ã£ãŠãè¡çªãé¿ããããšãã§ããŸããããšãã°ãèªåã®ã³ãŒããå€éšã©ã€ãã©ãªã§åãååã®é¢æ°ãå€æ°ãããå Žåãããããåå空éå
ã«ãŸãšããããšã§åºå¥ã§ããŸãã
:<syntaxhighlight lang=c++>
namespace MyNamespace {
auto myInt = 0;
void myFunction() {}
}
</syntaxhighlight>
ããã§ã¯ã<code>MyNamespace</code>ãšããååã®åå空éãå®çŸ©ããã<code>myInt</code>ãš<code>myFunction</code>ããã®åå空éã«æå±ããŠããŸããããã«ãããä»ã®å Žæã§åãååã䜿ã£ãŠããŠããåå空éãæå®ããããšã§è¡çªãé¿ããããšãã§ããŸãã
:<syntaxhighlight lang=c++>
MyNamespace::myInt = 42;
MyNamespace::myFunction();
</syntaxhighlight>
åå空éã¯ç¹ã«ã©ã€ãã©ãªã®éçºã§åœ¹ç«ã¡ãŸããã©ã€ãã©ãªå
ã®ãã¹ãŠã®ã·ã³ãã«ãç¬èªã®åå空éã«çœ®ãããšã§ããŠãŒã¶ãŒãã©ã€ãã©ãªãšèªåã®ã³ãŒããåºå¥ãããããªããŸããäŸãã°ãã©ã€ãã©ãªã<code>MyLibrary</code>ãšããåå空éã«çœ®ãããšã§ããã®ã©ã€ãã©ãªã®é¢æ°ãã¯ã©ã¹ã¯<code>MyLibrary::</code>ãšããåå空éã§ã¢ã¯ã»ã¹ãããŸãã
åå空éã¯ãããã°ã©ã ã®ä¿å®æ§ãé«ããã³ãŒãã®å¯èªæ§ãåäžãããã®ã«åœ¹ç«ã¡ãŸããç¹ã«å€§èŠæš¡ãªãããžã§ã¯ããè€æ°ã®ã©ã€ãã©ãªãçµã¿åãããå Žåã«ãåå空éã¯éèŠãªåœ¹å²ãæãããŸãã
== ãã³ãã¬ãŒã ==
ãã³ãã¬ãŒã (Templates)ã¯ãæ±çšçãªã³ãŒããèšè¿°ããããã®ä»çµã¿ã§ãç¹å®ã®åã«äŸåããªãæ±çšçãªé¢æ°ãã¯ã©ã¹ãå®çŸ©ã§ããŸããããã«ãããåãã³ãŒããè€æ°ã®ç°ãªãåã«å¯ŸããŠäœ¿ããŸããããšãã§ããŸãã
;ãã³ãã¬ãŒãé¢æ°
:<syntaxhighlight lang=c++>
template <typename T> T add(T a, T b) { return a + b; }
int main() {
std::cout << add(5, 10) << std::endl; // intåã®addé¢æ°ãåŒã°ãã
std::cout << add(3.5, 7.2) << std::endl; // doubleåã®addé¢æ°ãåŒã°ãã
return 0;
}
</syntaxhighlight>
;ãã³ãã¬ãŒãã¯ã©ã¹
:<syntaxhighlight lang=c++>
template <typename T> class Pair {
private:
T first;
T second;
public:
Pair(T f, T s) : first(f), second(s) {}
T getFirst() const { return first; }
T getSecond() const { return second; }
};
int main() {
Pair<int> myPair(5, 10); // intåã®Pairãäœæ
std::cout << myPair.getFirst() << ", " << myPair.getSecond() << std::endl;
return 0;
}
</syntaxhighlight>
ãã³ãã¬ãŒãã¯ãC++ã®æè»æ§ãåäžãããã³ãŒãã®åå©çšæ§ãé«ããŸããç¹ã«è€æ°ã®åã«å¯ŸããŠåãæäœãè¡ãå¿
èŠãããå Žåã«åœ¹ç«ã¡ãŸãã
== æšæºã©ã€ãã©ãªã®äœ¿çš ==
C++ã®æšæºã©ã€ãã©ãªã¯ãè±å¯ãªæ©èœãæäŸããC++ããã°ã©ãã³ã°ã®å¹çæ§ãåäžãããŸããäž»èŠãªæšæºã©ã€ãã©ãªã¯ãããã€ãã®äž»èŠãªéšåã«åãããŠããŸãã
=== å
¥åºåã©ã€ãã©ãª (iostream) ===
<code>iostream</code>ã©ã€ãã©ãªã¯ãå
¥åãšåºåã«é¢é£ããæ©èœãæäŸããŸãã<code>iostream</code>ã¯<code><iostream></code>ããããŒãã¡ã€ã«ã«å«ãŸããŠããã<code>std::cout</code>ã<code>std::cin</code>ãªã©ã®ã¹ããªãŒã ãéããŠã³ã³ãœãŒã«å
¥åºåãæ±ããŸãã
:<syntaxhighlight lang=c++>
#include <iostream>
int main() {
int num;
std::cout << "Enter a number: ";
std::cin >> num;
std::cout << "You entered: " << num << std::endl;
return 0;
}
</syntaxhighlight>
=== ã³ã³ãããšã¢ã«ãŽãªãºã (Containers and Algorithms) ===
æšæºãã³ãã¬ãŒãã©ã€ãã©ãªïŒSTLïŒã«ã¯ãããŸããŸãªã³ã³ãããšã¢ã«ãŽãªãºã ãå«ãŸããŠããŸãã<code>vector</code>ã<code>list</code>ã<code>map</code>ãªã©ã®ã³ã³ããã¯ãããŒã¿ã®æ ŒçŽã管çãå¹ççã«è¡ãããã®ãã®ã§ãã<code>algorithm</code>ããããŒã«ã¯ããœãŒããæ€çŽ¢ãå€æãªã©ã®ã¢ã«ãŽãªãºã ãå«ãŸããŠããŸãã
:<syntaxhighlight lang=c++>
#include <algorithm>
#include <iostream>
#include <vector>
int main() {
std::vector<int> numbers = {5, 2, 8, 3, 1};
// ãœãŒã
std::sort(numbers.begin(), numbers.end());
// åºå
for (int num : numbers) {
std::cout << num << " ";
}
std::cout << std::endl;
return 0;
}
</syntaxhighlight>
=== æååãšããã¹ãåŠç (Strings and Text Processing) ===
<code>string</code>ã¯ã©ã¹ã¯ãæååã®æäœãåŠçã容æã«ããããã®æ©èœãæäŸããŸãã
:<syntaxhighlight lang=c++>
#include <iostream>
#include <string>
int main() {
std::string text = "Hello, world!";
// æååæäœ
text += " Welcome to C++.";
// æåååºå
std::cout << text << std::endl;
return 0;
}
</syntaxhighlight>
=== ãã®ä»ã®æ©èœ ===
ä»ã«ããæšæºã©ã€ãã©ãªã«ã¯å€ãã®æ©èœãå«ãŸããŠããŸãã<code><cmath></code>ã«ã¯æ°åŠé¢æ°ã<code><ctime></code>ã«ã¯æéãšæ¥ä»ã®æäœã<code><fstream></code>ã«ã¯ãã¡ã€ã«å
¥åºåãªã©ãããŸããŸãªæ©èœãæäŸãããŠããŸãã
æšæºã©ã€ãã©ãªã䜿ãããšã§ãå€ãã®å Žåãåçºæãããã«å¹ççãã€ä¿¡é Œæ§ã®é«ãã³ãŒããæžãããšãã§ããŸããããã«ãããC++ã®è±å¯ãªæ©èœãæ倧éã«æŽ»çšã§ããŸãã
== ã¡ã¢ãªç®¡ç ==
C++ã®ã¡ã¢ãªç®¡çã¯ãCèšèªãšåæ§ã«ãããã°ã©ããæ瀺çã«ã¡ã¢ãªã®ç¢ºä¿ãšè§£æŸãè¡ãããšãã§ããŸãããC++ã§ã¯ããã€ãã®äŸ¿å©ãªæ©èœãæäŸãããŠããŸãã
=== æåã®ã¡ã¢ãªç®¡çïŒCã¹ã¿ã€ã«ïŒ ===
Cã¹ã¿ã€ã«ã®ã¡ã¢ãªç®¡çã¯ã<code>malloc()</code>ã<code>free()</code>ã䜿ã£ãŠã¡ã¢ãªã確ä¿ã»è§£æŸããæ¹æ³ã§ãã
:<syntaxhighlight lang=c++>
</syntaxhighlight>
=== RAIIïŒResource Acquisition Is InitializationïŒ ===
C++ã§ã¯RAIIãšããæŠå¿µãããããªãœãŒã¹ã®ååŸãšè§£æŸããªããžã§ã¯ãã®ã©ã€ããµã€ã¯ã«ã«çµã³ã€ããŸããäŸãã°ãã¹ããŒããã€ã³ã¿ãã³ã³ãããªã©ã®ã¯ã©ã¹ãããªããžã§ã¯ãã®ã¹ã³ãŒãããåºãéã«èªåçã«ãªãœãŒã¹ã解æŸããŸãã
==== ã¹ããŒããã€ã³ã¿ïŒSmart PointersïŒ ====
:<syntaxhighlight lang=c++>
#include <memory>
int main() {
// std::unique_ptrã䜿ã£ãã¡ã¢ãªã®ç¢ºä¿
std::unique_ptr<int> ptr = std::make_unique<int>(10);
// ã¡ã¢ãªã®è§£æŸã¯èªåçã«è¡ããã
return 0;
}
</syntaxhighlight>
==== æšæºã³ã³ãã ====
æšæºã³ã³ããïŒ<code>std::vector</code>ã<code>std::string</code>ãªã©ïŒã¯ãã¡ã¢ãªç®¡çãèªåçã«è¡ããŸãã
:<syntaxhighlight lang=c++>
#include <string>
#include <vector>
int main() {
// std::vectorã®å©çš
std::vector<int> numbers = {1, 2, 3, 4, 5};
// std::stringã®å©çš
std::string text = "Hello, C++";
// ã³ã³ããã®ã¹ã³ãŒããæããéã«èªåçã«è§£æŸããã
return 0;
}
</syntaxhighlight>
ãããã®æ©èœãå©çšããããšã§ãã¡ã¢ãªãªãŒã¯ãäžæ£ãªã¡ã¢ãªã¢ã¯ã»ã¹ãªã©ã®åé¡ãé²ããªãããå¹ççã§å®å
šãªã¡ã¢ãªç®¡çãè¡ãããšãã§ããŸããRAIIã®èãæ¹ãç解ããã¹ããŒããã€ã³ã¿ãæšæºã³ã³ãããªã©ã®å©çšãæ€èšãããšãã¡ã¢ãªç®¡çã容æã«ãªããŸãã
== C++ã®äŸå€åŠç ==
C++ã®äŸå€åŠçã¯ãããã°ã©ã ã®å®è¡äžã«ãšã©ãŒãçºçããå Žåã«ããã®ãšã©ãŒãææããŠé©åã«åŠçããããã®ä»çµã¿ã§ããäŸå€åŠçã¯ãããã°ã©ã ãäºæãã¬ç¶æ³ããšã©ãŒã«ééããéã«ãããã°ã©ã ã®å¶åŸ¡ã移åãããææ³ã§ãã
=== äŸå€ã®çºçãšãã£ãã ===
; äŸå€ã®æããïŒThrowing an ExceptionïŒ
:<syntaxhighlight lang=c++>
#include <iostream>
#include <stdexcept>
double divide(double dividend, double divisor) {
if (divisor == 0) {
throw std::invalid_argument("Division by zero");
}
return dividend / divisor;
}
int main() {
try {
double result = divide(10.0, 0.0);
std::cout << "Result: " << result << std::endl;
} catch (const std::invalid_argument &e) {
std::cout << "Exception caught: " << e.what() << std::endl;
}
return 0;
}
</syntaxhighlight>
; äŸå€ã®ãã£ããïŒCatching an ExceptionïŒ
:<code>try</code>ãããã¯å
ã§äŸå€ãæããããå Žåãããã«å¯Ÿå¿ãã<code>catch</code>ãããã¯ã該åœããäŸå€ãææããŸãã<code>catch</code>ãããã¯å
ã§äŸå€ãªããžã§ã¯ããåãåããé©åãªå¯ŸåŠãè¡ããŸãã
=== äŸå€ã®éå±€åãšã«ã¹ã¿ã äŸå€ã¯ã©ã¹ ===
ã«ã¹ã¿ã äŸå€ã¯ã©ã¹ãå®çŸ©ããŠãããã°ã©ã åºæã®ãšã©ãŒç¶æ³ã«å¿ããäŸå€ãæããããšãã§ããŸãã
:<syntaxhighlight lang=c++>
#include <iostream>
#include <stdexcept>
class MyException : public std::exception {
public:
const char *what() const noexcept override {
return "Custom exception occurred";
}
};
void process(int value) {
if (value < 0) {
throw MyException();
}
}
int main() {
try {
process(-5);
} catch (const MyException &e) {
std::cout << "Caught custom exception: " << e.what() << std::endl;
}
return 0;
}
</syntaxhighlight>
=== <code>throw</code>ãš<code>catch</code>ã®åºæ¬ ===
* <code>throw</code>: äŸå€ãæããããã®ããŒã¯ãŒãã
* <code>try</code>: äŸå€ãçºçããå¯èœæ§ã®ããã³ãŒããå«ããããã¯ã®å§ãŸãã瀺ãããŒã¯ãŒãã
* <code>catch</code>: <code>try</code>ãããã¯å
ã§çºçããäŸå€ãææããŠåŠçãããããã¯ã
äŸå€åŠçã¯ãäºæãã¬ç¶æ³ã«å¯ŸåŠããéã«åœ¹ç«ã¡ãŸãããšã©ãŒãçºçããå Žæãšãã®åŠçãåé¢ããããšã§ãããã°ã©ã ã®å
ç¢æ§ãé«ããããšãã§ããŸãã
== CãšC++ã®äºææ§ãšãªã³ã±ãŒãž ==
CãšC++ã¯éåžžã«å¯æ¥ã«é¢é£ããŠããŸãããäºææ§ããªã³ã±ãŒãžã«ã¯ããã€ãã®éãããããŸãã
=== CãšC++ã®äºææ§ ===
C++ã¯Cã®ãµãã»ãããšããŠèšèšãããŠãããããå€ãã®Cã®ã³ãŒãã¯C++ã§ããã®ãŸãŸåäœããŸããããããC++ã«ã¯ããã€ãã®æ°ããæ©èœãããŒã¯ãŒããå°å
¥ãããŠãããããå®å
šãªäºææ§ã¯ä¿èšŒãããŠããŸãããç¹ã«ãC++ã§ã¯ããŒã¯ãŒããšããŠæ°ããè¿œå ãããããäºçŽèªãšããŠå®çŸ©ããããããŠãããããCã®ã³ãŒããšè¡çªããããšããããŸãã
ãŸããC++ã§ã¯é¢æ°ã®ãªãŒããŒããŒããã¯ã©ã¹ãäŸå€åŠçãåå空éãªã©ãCã«ã¯ãªãæ©èœãè¿œå ãããŠããŸãããããã®æ©èœã䜿ãããã«ã¯ãC++ã®ç¹æ§ãç解ããŠã³ãŒããå€æŽããå¿
èŠããããŸãã
=== ãªã³ã±ãŒãž ===
CãšC++ã®ã³ãŒããæ··åšãããå ŽåãC++ã³ã³ãã€ã©ã¯Cã®ãªã³ã±ãŒãžããµããŒãããŸãããCã³ã³ãã€ã©ã¯C++ã®æ°ããæ©èœãèªèã§ããªãããšããããŸããC++ã®ã³ãŒãããCã®é¢æ°ãåŒã³åºãããšã¯æ¯èŒç容æã§ãããCã®ã³ãŒãããC++ã®æ©èœãçŽæ¥å©çšããããšã¯å°é£ã§ãã
C++ã®ã³ãŒããCã®ã³ãŒãããå©çšããå Žåã<code>extern "C"</code>ããŒã¯ãŒãã䜿çšããŠãC++ã³ã³ãã€ã©ãCã®åœ¢åŒã§ã·ã³ãã«ããšã¯ã¹ããŒãããããæ瀺ããããšãã§ããŸããããã«ãããC++ã®ã³ãŒããCã®ã³ãŒããšãªã³ã¯ããéã®åé¡ã解æ¶ã§ããŸãã
:<syntaxhighlight lang=c++>
#ifdef __cplusplus
extern "C" {
#endif
// C++ã³ãŒãã®é¢æ°å®çŸ©
void myFunction();
#ifdef __cplusplus
}
#endif
</syntaxhighlight>
ããã«ãããC++ã³ã³ãã€ã©ã¯<code>myFunction()</code>ãCã®ãªã³ã±ãŒãžã§ãšã¯ã¹ããŒãããŸãã
CãšC++ã¯äŒŒãŠããŸããã现ããéãããããŸããC++ã®æ©èœã掻çšããå Žåã¯ãCãšã®äºææ§ããªã³ã±ãŒãžã®éããèæ
®ããå¿
èŠããããŸãã
== C++ã®é«åºŠãªæ©èœ ==
=== åæšè« ===
åæšè«ïŒType InferenceïŒã¯ãã³ã³ãã€ã©ãå€æ°ã®åãã³ãŒãããæšæž¬ããæé»çã«ãã®åã決å®ããæ©èœã§ããC++11以éã§å°å
¥ãããæ©èœã§ãã³ãŒãã®èšè¿°ãç°¡æœã«ããåé·æ§ãæžããã®ã«åœ¹ç«ã¡ãŸãã
; <code>auto</code> ããŒã¯ãŒã
:<code>auto</code>ããŒã¯ãŒãã¯ãå€æ°ã®åã代å
¥ãããå€ããæšè«ããŸãã
:<syntaxhighlight lang=c++>
auto x = 5; // intåãšæšè«ããã
auto y = 3.14; // doubleåãšæšè«ããã
auto name = "John"; // const char*åãšæšè«ããã
</syntaxhighlight>
; é¢æ°ã®æ»ãå€ã®åæšè«
:é¢æ°ã®æ»ãå€ã®åã<code>auto</code>ã䜿ã£ãŠæšè«ã§ããŸãã
:<syntaxhighlight lang=c++>
auto add(int a, int b) {
return a + b;
}
</syntaxhighlight>
; <code>decltype</code> ããŒã¯ãŒã
:<code>decltype</code>ããŒã¯ãŒãã¯ãåŒãããã®åãååŸããŸããäž»ã«å€æ°ã®åãå¥ã®å€æ°ããæšè«ããéã«äœ¿ãããŸãã
:<syntaxhighlight lang=c++>
int x = 5;
decltype(x) y; // intåãšåçã®åãšãªã
</syntaxhighlight>
åæšè«ã䜿ãããšã§ãã³ãŒãã®å¯èªæ§ãåäžãããå€æŽã«å¯Ÿããæè»æ§ãé«ããããšãã§ããŸãããã ããé©åã«äœ¿çšããããšãéèŠã§ãããŸãã«ãå€çšãããšå¯èªæ§ãäœäžããå¯èœæ§ããããŸãã
=== ãã³ãã¬ãŒãã®ç¹æ®åãšéšåç¹æ®å ===
C++ã®ãã³ãã¬ãŒãã®ç¹æ®åãšéšåç¹æ®åã¯ããžã§ããªãã¯ããã°ã©ãã³ã°ã«ãããŠç¹å®ã®åãæ¡ä»¶ã«åãããŠãã³ãã¬ãŒããã«ã¹ã¿ãã€ãºããææ³ã§ãã
==== ãã³ãã¬ãŒãã®ç¹æ®åïŒTemplate SpecializationïŒ ====
ãã³ãã¬ãŒãã®ç¹æ®åã§ã¯ãç¹å®ã®åã«å¯Ÿãããã³ãã¬ãŒãã®ç¹å¥ãªããŒãžã§ã³ãæäŸããŸãã
;ã¯ã©ã¹ã®ç¹æ®å
:<syntaxhighlight lang=c++>
// éåžžã®ãã³ãã¬ãŒã
template <typename T> class MyContainer {
// éåžžã®å®è£
};
// intåã®ç¹æ®å
template <> class MyContainer<int> {
// intåã«ç¹åããå®è£
};
</syntaxhighlight>
;é¢æ°ã®ç¹æ®å
:<syntaxhighlight lang=c++>
// éåžžã®ãã³ãã¬ãŒã
template <typename T> T add(T a, T b) { return a + b; }
// intåã®ç¹æ®å
template <> int add(int a, int b) { return a + b + 10; }
</syntaxhighlight>
==== éšåç¹æ®åïŒPartial SpecializationïŒ ====
éšåç¹æ®åã§ã¯ããã³ãã¬ãŒãã®äžéšã®ãã©ã¡ãŒã¿ãç¹æ®åããŸããäž»ã«ã¯ã©ã¹ã®ãã³ãã¬ãŒãã§äœ¿çšãããŸãã
:<syntaxhighlight lang=c++>
// éåžžã®ãã³ãã¬ãŒã
template <typename T, typename U> class MyPair {
// éåžžã®å®è£
};
// Tãintã®éšåç¹æ®å
template <typename U> class MyPair<int, U> {
// intåã«ç¹åããå®è£
};
</syntaxhighlight>
éšåç¹æ®åã¯ããã³ãã¬ãŒãã®å
šäœã«ç¹æ®åãæœãã®ã§ã¯ãªããäžéšã®ãã©ã¡ãŒã¿ã«å¯ŸããŠç¹æ®åãè¡ããŸããããã«ãããç°ãªãåã®ç¹å®ã®çµã¿åããã«å¯ŸããŠã«ã¹ã¿ã åŠçãå®è¡ã§ããŸãã
ç¹æ®åãšéšåç¹æ®åã¯ãæ±çšçãªã³ãŒããç¹å®ã®ç¶æ³ã«åãããŠæé©åããããç¹å®ã®åãæ¡ä»¶ã«åãããåŠçãè¡ãããã®åŒ·åãªãã³ãã¬ãŒãæ©èœã§ãã
=== SFINAE(Substitution Failure Is Not An Error)ãšã³ã³ã»ãã ===
SFINAEïŒSubstitution Failure Is Not An ErrorïŒã¯ãC++ã®ãã³ãã¬ãŒãã®åäœã«é¢é£ããååã®1ã€ã§ãããã³ãã¬ãŒãã®åŒæ°ã®ä»£å
¥ïŒsubstitutionïŒæã«å€±æïŒfailureïŒããå Žåã§ããããããšã©ãŒãšããã代æ¿ã®ãã³ãã¬ãŒãã®éžæè¢ãšããŠæ±ããšããèãæ¹ã§ãã
==== SFINAEã®åå ====
SFINAEã¯ããã³ãã¬ãŒãã®ä»£å
¥æã«å€±æããŠãã³ã³ãã€ã«ãšã©ãŒãèµ·ãããããã®ä»£ããã«ãã®ãã³ãã¬ãŒãã倱æããå Žåã«ããã®åè£ããé€å€ãããååã§ããããã«ãããããæè»ãªãã³ãã¬ãŒãã®éžæãå¯èœã«ãªããŸãã
; äŸïŒSFINAEã®äœ¿çš
:<syntaxhighlight lang=c++>
#include <iostream>
template <typename T> struct HasSerializeMethod {
template <typename U>
static auto test(U *p) -> decltype(p->serialize(), std::true_type{});
static std::false_type test(...);
static constexpr bool value = decltype(test((T *)nullptr))::value;
};
class MyClass {
public:
void serialize() {}
};
int main() {
std::cout << HasSerializeMethod<MyClass>::value << std::endl; // 1 (true)
std::cout << HasSerializeMethod<int>::value << std::endl; // 0 (false)
return 0;
}
</syntaxhighlight>
ããã§ã¯ã<code>HasSerializeMethod</code>æ§é äœã¯ãäžããããåã<code>serialize()</code>ã¡ãœãããæã€ãã©ããã確èªããããã®ã¡ã¿ããã°ã©ãã³ã°ææ³ã䜿çšããŠããŸãã<code>HasSerializeMethod<MyClass>::value</code>ã¯<code>true</code>ãã<code>HasSerializeMethod<int>::value</code>ã¯<code>false</code>ãè¿ããŸãã
==== ã³ã³ã»ãã ====
ã³ã³ã»ããã¯ãC++20ã§å°å
¥ãããæŠå¿µã§ããã³ãã¬ãŒãã®åŒæ°ã«å¯Ÿããæ¡ä»¶ãæ瀺çã«æå®ããæ¹æ³ã§ããç¹å®ã®åã«å¯ŸããèŠæ±äºé
ãæ¡ä»¶ãè¡šçŸããããã«äœ¿çšãããŸãã
;äŸïŒã³ã³ã»ããã®äœ¿çš
:<syntaxhighlight lang=c++>
template <typename T>
concept Integral = std::is_integral<T>::value;
template <Integral T> void printNumber(T value) {
std::cout << value << std::endl;
}
int main() {
printNumber(5); // ã³ã³ã»ããã«åèŽãããããåŒã³åºãæå
printNumber(3.14); // ã³ã³ã»ããã«åèŽããªããããã³ã³ãã€ã«ãšã©ãŒ
return 0;
}
</syntaxhighlight>
;ã³ã³ãã€ã«çµæ:<syntaxhighlight lang=text>
Main.cpp:13:5: error: no matching function for call to 'printNumber'
printNumber(3.14); // ã³ã³ã»ããã«åèŽããªããããã³ã³ãã€ã«ãšã©ãŒ
^~~~~~~~~~~
Main.cpp:7:6: note: candidate template ignored: constraints not satisfied [with T = double]
void printNumber(T value) {
^
Main.cpp:6:11: note: because 'double' does not satisfy 'Integral'
template <Integral T>
^
Main.cpp:4:20: note: because 'std::is_integral<double>::value' evaluated to false
concept Integral = std::is_integral<T>::value;
^
1 error generated.
</syntaxhighlight>
ããã§ã¯ã<code>Integral</code>ãšããã³ã³ã»ãããå®çŸ©ãã<code>printNumber</code>é¢æ°ã«ãã®ã³ã³ã»ãããé©çšããŠããŸããããã«ããã<code>printNumber</code>é¢æ°ãç¹å®ã®æ¡ä»¶ãæºããåã«å¯ŸããŠã®ã¿äœ¿çšã§ããããã«ãªããŸãã
SFINAEãšã³ã³ã»ããã¯ããã³ãã¬ãŒãã®æè»æ§ãšå¶çŽã管çããããã®éèŠãªC++ã®æŠå¿µã§ããSFINAEã¯C++11ããååšããŠãããC++20ã§ã®ã³ã³ã»ããã®è¿œå ã«ãããããçŽæçã§è¡šçŸåè±ããªãã³ãã¬ãŒããäœæã§ããããã«ãªããŸããã
=== Moveã»ãã³ãã£ã¯ã¹ãšããã©ãŒãã³ã¹ ===
C++ã®Moveã»ãã³ãã£ã¯ã¹ã¯ãå¹ççãªãªãœãŒã¹ã®ç§»åã転éãå¯èœã«ããéèŠãªæŠå¿µã§ããããã¯ãç¹ã«å€§ããªãªããžã§ã¯ãããªãœãŒã¹ïŒã¡ã¢ãªããªãœãŒã¹ãã³ãã«ãªã©ïŒã®æææš©ãå¹ççã«ç§»åãããããã«å©çšãããŸãã
==== ã³ããŒãšã ãŒãã®éã ====
éåžžãC++ã§ã¯ãªããžã§ã¯ããå¥ã®å€æ°ã«ä»£å
¥ãããšããã®ãªããžã§ã¯ãã®ã³ããŒãäœæãããŸãã
:<syntaxhighlight lang=c++>
std::vector<int> vec1 = {1, 2, 3};
std::vector<int> vec2 = vec1; // vec1ãvec2ã«ã³ããŒ
</syntaxhighlight>
ããããã ãŒãã»ãã³ãã£ã¯ã¹ã䜿ããšããªããžã§ã¯ãã®æææš©ã移åãããŸããããã«ããããªããžã§ã¯ãã®ã³ããŒãè¡ãããå¹ççã«ãªãœãŒã¹ã移åã§ããŸãã
==== std::move ====
<code>std::move</code>ã¯ãã ãŒãã»ãã³ãã£ã¯ã¹ã䜿çšããããã®ãŠãŒãã£ãªãã£é¢æ°ã§ãã
:<syntaxhighlight lang=c++>
std::vector<int> vec1 = {1, 2, 3};
std::vector<int> vec2 = std::move(vec1); // vec1ã®æææš©ãvec2ã«ã ãŒã
</syntaxhighlight>
<code>std::move</code>ã¯ãåŒæ°ãšããŠæž¡ããããªããžã§ã¯ããã ãŒãå¯èœãªç¶æ
ã«å€æããããã«ããå¹ççãªãªãœãŒã¹ã®ç§»åãå¯èœã«ããŸãã
==== ããã©ãŒãã³ã¹ãžã®åœ±é¿ ====
Moveã»ãã³ãã£ã¯ã¹ã¯ãç¹ã«ãªãœãŒã¹ã®ã³ããŒãé¿ããå Žåã倧ããªããŒã¿æ§é ãæ±ãå Žåã«å¹æçã§ãããªãœãŒã¹ã®ã ãŒãã¯ãã³ããŒã«æ¯ã¹ãŠã¡ã¢ãªã®ã¢ãã±ãŒã·ã§ã³ãããŒã¿ã®å®éã®ã³ããŒãçºçããªããããããã©ãŒãã³ã¹ãåäžããããšããããŸãã
ãã ããMoveã»ãã³ãã£ã¯ã¹ãé©åã«å©çšããããã«ã¯ãæææš©ã®ç§»ååŸã«å
ã®ãªããžã§ã¯ãã䜿çšããªãããšãéèŠã§ããMoveãããåŸã®ãªããžã§ã¯ãã䜿ãããšãããšæªå®çŸ©ã®åäœã«ã€ãªããå¯èœæ§ããããŸãã
Moveã»ãã³ãã£ã¯ã¹ã¯ãå¹ççãªãªãœãŒã¹ã®ç§»åãããã©ãŒãã³ã¹ã®åäžã«åœ¹ç«ã€éèŠãªæŠå¿µã§ãããé©åãªäœ¿çšãéèŠã§ãã
[[ã«ããŽãª:C++]]
[[ã«ããŽãª:Cèšèª]] | 2023-03-15T02:14:40Z | 2024-01-09T03:42:21Z | [] | https://ja.wikibooks.org/wiki/C%2B%2B/C%E3%81%8B%E3%82%89C%2B%2B%E3%81%B8%E3%81%AE%E7%A7%BB%E8%A1%8C |
37,245 | Groovy | Groovyã¯Javaããã°ã©ããŒã«ãšã£ãŠãæè»æ§ãšçç£æ§ãåäžããã匷åãªã¹ã¯ãªããèšèªã§ãããã®èšèªã¯ãJavaã®ã·ã³ã¿ãã¯ã¹ã匷åããããŸããŸãªäŸ¿å©ãªæ©èœãæäŸããŸãããã®æç§æžã§ã¯ãGroovyèšèªã®åºç€ããå¿çšãŸã§ãåºç¯å²ãªãããã¯ã網çŸ
ããŠããŸãã
æ¬æžã¯ãGroovyèšèªãç¥ããªãåå¿è
ãããæ¢ã«Javaãçç¥ããŠããããã°ã©ããŒãŸã§ãå¹
åºãèªè
ã«åããŠæžãããŠããŸããåå¿è
ã«ã¯ãåºæ¬çãªææ³ãšæ©èœã玹ä»ããJavaãšã®éããæ確ã«èª¬æããŸãããŸããçµéšè±å¯ãªJavaããã°ã©ããŒã«ã¯ãGroovyã®é«åºŠãªæ©èœããJavaãšã®çžäºéçšæ§ã®å©ç¹ã«çŠç¹ãåœãŠãç« ããããŸãã
æ¬æžã§ã¯ãGroovyã®ææ³ãå€æ°ãæŒç®åãã¯ã©ã¹ãã¡ãœãããã³ã¬ã¯ã·ã§ã³ãã¯ããŒãžã£ãã¡ã¿ããã°ã©ãã³ã°ã䞊è¡åŠçãªã©ãããŸããŸãªãããã¯ãæ±ããŸãããŸããGroovyã䜿çšããŠWebã¢ããªã±ãŒã·ã§ã³ãã¹ã¯ãªãããéçºããããã®å®è·µçãªæé ãæäŸããŸãã
æ¬æžã¯ãGroovyèšèªã®åºç€ããé«åºŠãªå¿çšãŸã§ãå®å
šãªäžåãšãªã£ãŠããŸããGroovyèšèªã®é
åãçºèŠããJavaéçºã匷åããããã«ããã²æ¬æžã圹ç«ãŠãŠãã ããã
Apache Groovy(ã°ã«ãŒãŽã£ãŒ)ã¯ãJavaãã©ãããã©ãŒã äžã§åäœããåçãªã¹ã¯ãªããèšèªã§ãJavaèšèªãšå¯æ¥ã«é¢é£ããŠããŸãããã®èšèªã¯ãJavaã®æ©èœã«ã¢ã¯ã»ã¹ã§ããã ãã§ãªããç°¡åã§çŽæçãªæ§æããã€ãããã¯ãªåä»ããã¯ããŒãžã£ãªã©ãä»ã®å€ãã®ããã°ã©ãã³ã°èšèªã®ç¹åŸŽãçµã¿åãããŠããŸãã
Groovyã¯ãJavaã³ãŒããç°¡çŽ åããå¯èªæ§ãé«ããããã«èšèšãããŠãããJavaã®æ©èœã掻çšããªãããéçºè
ãããå¹ççã«ã³ãŒããèšè¿°ã§ããããã«ããããšãç®çãšããŠããŸãããŸããJavaãšã®ã·ãŒã ã¬ã¹ãªçµ±åæ§ãåããŠãããJavaã¯ã©ã¹ãæ¡åŒµããJavaã³ãŒãã«å¯ŸããŠGroovyã³ãŒãã䜿çšã§ããŸãã
Apache Groovyã¯ãApacheãœãããŠã§ã¢è²¡å£ã«ãã£ãŠç®¡çãããŠããããªãŒãã³ãœãŒã¹ã§å
¬éãããŠããŸãããã®èšèªã¯ãJavaéçºè
ãã·ã¹ãã 管çè
ãããã°ããŒã¿åæè
ãªã©ãããŸããŸãªãŠãŒã¶ãŒã«ãšã£ãŠäººæ°ã®ããéžæè¢ã§ãã
Groovyã®éçºã«ã¯JREãŸãã¯JDKãå¿
èŠã§ãããŸããJREãŸãã¯JDKãã€ã³ã¹ããŒã«ããŠãã ããã
Groovyã¯Apacheã®Webãµã€ãããããŠã³ããŒãã§ããŸãã以äžã®æé ã«åŸã£ãŠãGroovyãã€ã³ã¹ããŒã«ããŠãã ããã
Groovyã§ã¯ãå€æ°ã䜿çšããŠããŒã¿ãæ ŒçŽããåŠçããããšãã§ããŸããå€æ°ã¯ãããŒã¿ã®äžæçãªå ŽæãšããŠæ©èœããããã°ã©ã å
ã§å€ãåç
§ãããå€æŽãããããããã«äœ¿çšãããŸãã å€æ°ã䜿çšããåã«ãé©åãªããŒã¿åãéžæããå¿
èŠããããŸãã
Groovyã§ã¯ãå€æ°ã宣èšãããšåæã«åæåããããšãã§ããŸãã以äžã¯ãå€æ°ã®å®£èšãšåæåã®åºæ¬çãªæ§æã§ãã
åæåã¯å¿
é ã§ã¯ãããŸããããæšå¥šãããŸãã
Groovyã¯åçåä»ãèšèªã§ãããå€æ°ã®åãäºåã«å®£èšããå¿
èŠã¯ãããŸãããå€æ°ã®å€ã«åºã¥ããŠãèªåçã«é©åãªããŒã¿åãå²ãåœãŠãããŸãã
äž»ãªããŒã¿åã«ã¯ä»¥äžã®ãããªãã®ããããŸã:
以äžã¯ãããããã®ããŒã¿åã®äŸã§ã:
Groovyã§ã¯ãç°ãªãããŒã¿åã®éã§å€ãå€æããããšãã§ããŸãããããåãã£ã¹ããšåŒã³ãŸãã以äžã¯ãããã€ãã®åºæ¬çãªåãã£ã¹ãã®äŸã§ãã
æŽæ°ããæµ®åå°æ°ç¹æ°ãžã®å€æ:
æååããæŽæ°ãžã®å€æ:
æååããæµ®åå°æ°ç¹æ°ãžã®å€æ:
Groovyã§ã¯ãå€æ°ã«ã¯æ°ããå€ãå代å
¥ããããšãã§ããŸããå€æ°ã®å€ãå€æŽããã«ã¯ãå€æ°åãæå®ããŠæ°ããå€ã代å
¥ããŸãã
Groovyã¯åçåä»ãèšèªã§ãããå€æ°ã®å€ããé©åãªåãæšè«ããããšãã§ããŸãã
Groovyã§ã¯ãå€ãå€æŽã§ããªãå®æ°ã宣èšããããšãã§ããŸããå®æ°ã¯finalããŒã¯ãŒãã䜿çšããŠå®£èšãããåæåãããåŸã«å€ãå€æŽããããšã¯ã§ããŸããã
1è¡ç®ãã4è¡ç®ãŸã§ã¯ãããŸããŸãªåã®å€æ°ã®å®£èšãšåæåãè¡ãããŠããŸãã
6è¡ç®ãã10è¡ç®ã§ã¯ãå€æ°ã®åæšè«ã瀺ãããŠããŸããGroovyã§ã¯defããŒã¯ãŒãã䜿çšããŠåæšè«ãè¡ãããšãã§ããŸãã
æåŸã®è¡ã§ã¯ãé
åã«ãããã®èŠçŽ ããŸãšããeachã¡ãœããã䜿çšããŠåèŠçŽ ã«å¯ŸããŠåŠçãè¡ã£ãŠããŸãã åèŠçŽ ãinspect()ã¡ãœããã§æååè¡šçŸã«å€æããããã«ã¯ã©ã¹æ
å ±ãè¿œå ããŠåºåããŠããŸãããã®éšåã¯åèŠçŽ ã®åã確èªããããã®ãããã°ç®çã®ã³ãŒãã§ãã
äžèšã®ã³ãŒããå®è¡ãããšãåå€æ°ã®å€ãšåãåºåãããŸããäŸãã°ãiã®åºåã¯42: class java.lang.IntegerãšãªããŸãã
ãã®ã³ãŒãã§ã¯ãGroovyã§äœ¿çšãããäžè¬çãªæŒç®åã玹ä»ããŠããŸãã
æ°å€æŒç®ã§ã¯ãå ç®(+)ãæžç®(-)ãä¹ç®(*)ãé€ç®(/)ãå°äœ(%)ã®æŒç®åã䜿çšãããŠããŸãã
æååé£çµã§ã¯ãæååå士ã+æŒç®åã§çµåããŠããŸãã
è«çæŒç®ã§ã¯ãè«çç©(&&)ãè«çå(||)ãåŠå®(!)ã®æŒç®åã䜿çšãããŠããŸãã
æ¯èŒæŒç®ã§ã¯ãçãããã©ãã(==)ãçãããªããã©ãã(!=)ã倧ãããã©ãã(>)ãå°ãããã©ãã(<)ã®æŒç®åã䜿çšãããŠããŸãã
åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽãããprintlnæã䜿çšããŠçµæãåºåãããŸãã
ãã®ã³ãŒãã§ã¯ãããŸããŸãªæŒç®åãšæŒç®åã®çµã¿åããã瀺ãããŠããŸãã
代å
¥æŒç®åã§ã¯ãå ç®ä»£å
¥(+=)ãæžç®ä»£å
¥(-=)ãä¹ç®ä»£å
¥(*=)ãé€ç®ä»£å
¥(/=)ãå°äœä»£å
¥(%=)ã®æŒç®åã䜿çšãããŠããŸãã
ã€ã³ã¯ãªã¡ã³ã(++)ãšãã¯ãªã¡ã³ã(--)ã¯ãå€æ°ã®å€ã1ã€å¢ãããŸãã¯æžããããã«äœ¿çšãããŸãã
äžé
æŒç®å(?:)ã¯ãæ¡ä»¶åŒã®çµæã«åºã¥ããŠç°ãªãå€ãè¿ãããã«äœ¿çšãããŸããæ¡ä»¶ãçã®å Žåã¯æåã®å€ããåœã®å Žåã¯2çªç®ã®å€ã代å
¥ãããŸãã
åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽãããprintlnæã䜿çšããŠçµæãåºåãããŸãã
ãã®ã³ãŒãã§ã¯ãããŸããŸãªæŒç®åãšãã®äœ¿çšæ³ã瀺ãããŠããŸãã
æååæ¯èŒã§ã¯ã==æŒç®åãš!=æŒç®åã䜿çšããŠã2ã€ã®æååãçãããã©ãããæ¯èŒããŠããŸãã
è«çæŒç®åã®ã·ã§ãŒããµãŒãããã§ã¯ã&&æŒç®åãš||æŒç®åã䜿çšããŠãè«çç©ãšè«çåãè©äŸ¡ããŠããŸãã
æŒç®åã®åªå
é äœã§ã¯ãä¹ç®(*)ãå ç®(+)ãããåªå
ãããããšã瀺ããŠããŸããresult1ã®èšç®ã§ã¯ãä¹ç®ãå
ã«è©äŸ¡ãããresult2ã®èšç®ã§ã¯æ¬åŒ§ãåªå
ãããŸãã
åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽãããprintlnæã䜿çšããŠçµæãåºåãããŸãã
ãã®ã³ãŒãã§ã¯ãGroovyã®ç¹æ®ãªæŒç®åã§ããäžé
æŒç®åã®ãã¹ããnullå®å
šæŒç®åãããã³ElvisæŒç®åã®äœ¿çšäŸã瀺ãããŠããŸãã
äžé
æŒç®åã®ãã¹ãã§ã¯ã幎霢ã«åºã¥ããŠç°ãªãçµæãè¿ãè€éãªæ¡ä»¶åå²ãè¡ãããŠããŸãã
nullå®å
šæŒç®å(?.)ã¯ãnullå®å
šãªåŒã³åºããè¡ããŸããããå€æ°ãnullã§ããã°ãã¡ãœããåŒã³åºããããããã£ã¢ã¯ã»ã¹ã¯ç¡èŠãããçµæã¯nullã«ãªããŸãã
ElvisæŒç®å(?:)ã¯ãå€æ°ãnullã§ããå Žåã«ä»£æ¿ã®å€ãè¿ãããã«äœ¿çšãããŸããå€æ°ãnullã§ãªããã°ããã®å€ã䜿çšãããŸãã
åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽãããprintlnæã䜿çšããŠçµæãåºåãããŸãã
ãã®ã³ãŒãã§ã¯ãé
åæŒç®åããªã¹ãçµåæŒç®åãæååæŒç®åãããã³instanceofæŒç®åã®äœ¿çšäŸã瀺ãããŠããŸãã
é
åæŒç®å([])ã䜿çšãããšãé
åå
ã®ç¹å®ã®èŠçŽ ã«ã¢ã¯ã»ã¹ã§ããŸããnumbers[0]ã¯æåã®èŠçŽ ããnumbers[-1]ã¯æåŸã®èŠçŽ ãååŸããŸãã
ãªã¹ãçµåæŒç®å(+)ã¯ã2ã€ã®ãªã¹ããçµåããŠæ°ãããªã¹ããäœæããŸãã
æååæŒç®å(+)ã¯ãæååã®é£çµã«äœ¿çšãããŸãã
instanceofæŒç®åã¯ããªããžã§ã¯ãã®åããã§ãã¯ããŸããæå®ããåã«å±ããŠããã°trueãè¿ããããã§ãªããã°falseãè¿ããŸãã
åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽãããprintlnæã䜿çšããŠçµæãåºåãããŸãã
ãã®ã³ãŒãã§ã¯ãã¬ã³ãžæŒç®å(..)ãæ£èŠè¡šçŸæŒç®å(=~)ãã¡ãœããåŒã³åºãæŒç®å(.)ãããã³ã¯ããŒãžã£æŒç®å({})ã®äœ¿çšäŸã瀺ãããŠããŸãã
ã¬ã³ãžæŒç®åã¯ãæå®ããç¯å²ã®å€ãè¡šããªã¹ããäœæããŸãã1..5ã¯1ãã5ãŸã§ã®æŽæ°ã®ãªã¹ããã10..1ã¯ç©ºã®ãªã¹ããäœæããŸãã
æ£èŠè¡šçŸæŒç®å(=~)ã䜿çšãããšãããã¹ãå
ã§æ£èŠè¡šçŸãã¿ãŒã³ã«äžèŽããéšåãæ€çŽ¢ã§ããŸããmatch[0][0]ã¯äžèŽããå
šäœã®ããã¹ãããmatch[0][1]ã¯ãã£ããã£ã°ã«ãŒãã®äžèŽããéšåãååŸããŸãã
ã¡ãœããåŒã³åºãæŒç®å(.)ã䜿çšãããšããªããžã§ã¯ãã®ã¡ãœãããåŒã³åºãããšãã§ããŸããlist.size()ã¯ãªã¹ãã®èŠçŽ æ°ãååŸããŸãã
ã¯ããŒãžã£æŒç®å({})ã¯ãå¿åã®é¢æ°ãäœæããŸããnumbers.collect { it * it }ã¯numbersãªã¹ãã®åèŠçŽ ã«å¯ŸããŠã¯ããŒãžã£ãé©çšããèŠçŽ ã®2ä¹ã®ãªã¹ããäœæããŸãã
åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽãããprintlnæã䜿çšããŠçµæãåºåãããŸãã
ãã®ã³ãŒãã§ã¯ãæŒç®åã®ã°ã«ãŒãå(())ãäžé
æŒç®åã®ã·ã§ãŒããµãŒãããããããæŒç®åãããã³ã·ããæŒç®åã®äœ¿çšäŸã瀺ãããŠããŸãã
ã°ã«ãŒãåæŒç®å(())ã¯ãæŒç®åã®è©äŸ¡é åºãæ瀺çã«æå®ããŸããresult1ã§ã¯ä¹ç®ãå
ã«è©äŸ¡ãããŸãããresult2ã§ã¯å ç®ãå
ã«è©äŸ¡ãããŸãã
äžé
æŒç®åã®ã·ã§ãŒããµãŒãããã§ã¯ãæ¡ä»¶ãé çªã«è©äŸ¡ãããæåã«çãšãªãæ¡ä»¶ã®çµæãè¿ãããŸãã
ãããæŒç®å(&ã|ã^)ã¯ããããããšã®è«çæŒç®ãè¡ããŸããåæŒç®ã®çµæã¯æŽæ°ãšããŠèšç®ãããŸãã
ã·ããæŒç®å(<<ã>>)ã¯ãäºé²æ°è¡šçŸã®ããããå·Šå³ã«ã·ããããŸããå·Šã·ããã§ã¯ããããå·Šã«ç§»åããå³ã·ããã§ã¯ããããå³ã«ç§»åããŸãã
åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽãããprintlnæã䜿çšããŠçµæãåºåãããŸãã
ãã®ã³ãŒãã§ã¯ãè«çæŒç®å(&&ã||ã!)ãšæ¯èŒæŒç®å(==ã!=ã>ã<ã>=ã<=)ã®äœ¿çšäŸã瀺ãããŠããŸãã
è«çæŒç®åã¯ãçåœå€ãæäœããããã«äœ¿çšãããŸãã&&ã¯è«çç©(AND)ãèšç®ããäž¡æ¹ã®ãªãã©ã³ããtrueã®å Žåã«çµæãtrueãšãªããŸãã||ã¯è«çå(OR)ãèšç®ããã©ã¡ããã®ãªãã©ã³ããtrueã®å Žåã«çµæãtrueãšãªããŸãã!ã¯è«çåŠå®(NOT)ãèšç®ãããªãã©ã³ãã®çåœå€ãå転ãããŸãã
æ¯èŒæŒç®åã¯ãå€ã®æ¯èŒãè¡ããŸãã==ã¯çãããã©ãããå€å®ãã!=ã¯çãããªããã©ãããå€å®ããŸãã>ã<ã>=ã<=ã¯ãããã倧ãªããå°ãªãã以äžã以äžãå€å®ããŸãã
åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽãããprintlnæã䜿çšããŠçµæãåºåãããŸãã
ãã®ã³ãŒãã§ã¯ãnullå®å
šæŒç®å(?.)ãšãšã«ãã¹æŒç®å(?:)ã®äœ¿çšäŸã瀺ãããŠããŸãã
nullå®å
šæŒç®å(?.)ã¯ããªããžã§ã¯ããnullã§ãªãå Žåã«ã®ã¿ããããã£ãã¡ãœããã«ã¢ã¯ã»ã¹ããŸãããããªããžã§ã¯ããnullã§ããã°ãçµæã¯nullãšãªããŸããtext?.length()ã§ã¯ãtextãªããžã§ã¯ããnullã§ãªãå Žåã«ã®ã¿length()ã¡ãœãããåŒã³åºãããŸãã
ãšã«ãã¹æŒç®å(?:)ã¯ããªããžã§ã¯ããnullã§ããå Žåã«ããã©ã«ãã®å€ã䜿çšããŸãããªããžã§ã¯ããnullã§ãªãå Žåã¯ãã®å€ã䜿çšããŸããname ?: "Unknown"ã§ã¯ãnameãnullã§ããã°"Unknown"ããããã§ãªããã°nameã®å€ã代å
¥ãããŸãã
åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽãããprintlnæã䜿çšããŠçµæãåºåãããŸãã
ãã®ã³ãŒãã§ã¯ãå®å
šããã²ãŒã·ã§ã³æŒç®å(?.)ãé
åã¢ã¯ã»ã¹æŒç®å([])ãããã³ã¹ãã¬ããæŒç®å(*)ã®äœ¿çšäŸã瀺ãããŠããŸãã
å®å
šããã²ãŒã·ã§ã³æŒç®å(?.)ã¯ããªããžã§ã¯ããnullã§ãªãå Žåã«ã®ã¿ããããã£ã«ã¢ã¯ã»ã¹ããŸãããããªããžã§ã¯ããnullã§ããã°ãçµæã¯nullãšãªããŸããperson?.nameã§ã¯ãpersonãªããžã§ã¯ããnullã§ãªãå Žåã«ã®ã¿nameããããã£ã«ã¢ã¯ã»ã¹ããŸãã
é
åã¢ã¯ã»ã¹æŒç®å([])ã¯ãé
åå
ã®èŠçŽ ã«ã¢ã¯ã»ã¹ããŸããarray[2]ã§ã¯ãarrayé
åã®3çªç®ã®èŠçŽ ã«ã¢ã¯ã»ã¹ãããã®å€ãååŸããŸãã
ã¹ãã¬ããæŒç®å(*)ã¯ãé
åå
ã®èŠçŽ ãå±éããŸãã[0, *numbers, 4, 5]ã§ã¯ãnumbersé
åã®èŠçŽ ãå±éããŠæ°ããé
åãäœæããŸãã
åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽãããprintlnæã䜿çšããŠçµæãåºåãããŸãã
ãã®ã³ãŒãã§ã¯ãGroovyã®å¶åŸ¡æ§é ã®äŸã瀺ãããŠããŸãã
ifæã¯æ¡ä»¶ã«åºã¥ããŠåå²ããŸããnumã0ãã倧ããå Žåã¯"Positive"ã0ããå°ããå Žåã¯"Negative"ããã以å€ã®å Žåã¯"Zero"ãåºåãããŸãã
forã«ãŒãã¯æå®ãããåæ°ã®ç¹°ãè¿ããè¡ããŸããnumbersãªã¹ãã®èŠçŽ ãé çªã«è¡šç€ºããŸãã
whileã«ãŒãã¯æ¡ä»¶ãçã®éãç¹°ãè¿ãåŠçãè¡ããŸããcountã5æªæºã®éãCount: [countã®å€]ãšè¡šç€ºããcountãã€ã³ã¯ãªã¡ã³ãããŸãã
switchæã¯è€æ°ã®æ¡ä»¶ã«åºã¥ããŠåå²ããŸããfruitã®å€ã«å¿ããŠç°ãªãã¡ãã»ãŒãžã衚瀺ãããŸãã
åå¶åŸ¡æ§é ã®äŸã§ã¯ãæ¡ä»¶ãã«ãŒãã®å¶åŸ¡ã«å¿ããŠã³ãŒããããã¯ãå®è¡ãããŸãã
ãã®ã³ãŒãã§ã¯ãã«ãŒãã®å¶åŸ¡ãšäŸå€ã®ã¹ããŒã«é¢é£ããå¶åŸ¡æ§é ã®äŸã瀺ãããŠããŸãã
forã«ãŒãã§ã¯ãnumbersãªã¹ãã®èŠçŽ ãé çªã«åŠçããŸãããã ããèŠçŽ ã®å€ã3ã®å Žåã¯continueæãå®è¡ããã次ã®ç¹°ãè¿ãã«é²ã¿ãŸããèŠçŽ ã®å€ã4ã®å Žåã¯breakæãå®è¡ãããã«ãŒããçµäºããŸãã
try-catchæ§æã¯äŸå€ã®ææãšåŠçãè¡ããŸããtryãããã¯å
ã®ã³ãŒããå®è¡ãããããäŸå€ãã¹ããŒãããå Žåã¯è©²åœããcatchãããã¯ãå®è¡ãããŸãããã®äŸã§ã¯ãnumãè² ã®å Žåã«IllegalArgumentExceptionãã¹ããŒããããã®äŸå€ããã£ãããããŠã¡ãã»ãŒãžã衚瀺ãããŸãã
åå¶åŸ¡æ§é ã¯ããã°ã©ã ã®ãããŒãå¶åŸ¡ããæ¡ä»¶ãç¹°ãè¿ãã«åºã¥ããŠã³ãŒãã®å®è¡ã調æŽããŸãããŸããäŸå€ã®ã¹ããŒãšãã£ããã䜿çšããããšã§ããšã©ãŒåŠçãç°åžžç¶æ
ã®åŠçãè¡ãããšãã§ããŸãã
ãã®ã³ãŒãã§ã¯ãã©ãã«ä»ãã«ãŒããšã©ãã«ä»ããããã¯ãassertæã«ããã¢ãµãŒã·ã§ã³ãããã³äžé
æŒç®åãšnullå®å
šæŒç®åã®çµã¿åããã®äŸã瀺ãããŠããŸãã
ã©ãã«ä»ãã«ãŒããšã©ãã«ä»ããããã¯ã䜿çšããããšã§ãå
åŽã®ã«ãŒãããå€åŽã®ã«ãŒããçµäºããããšãã§ããŸããbreak outerLoopã¯å€åŽã®ã«ãŒããçµäºããã«ãŒãããæããŸãã
assertæã¯ãæ¡ä»¶åŒãçã§ããããšãã¢ãµãŒã·ã§ã³(æ€èšŒ)ããŸããããæ¡ä»¶åŒãåœã®å Žåãã¢ãµãŒã·ã§ã³ãšã©ãŒãçºçããããã°ã©ã ã®å®è¡ãåæ¢ããŸãããã®äŸã§ã¯ãxãyããã倧ããããšãæ€èšŒããŠããŸãã
äžé
æŒç®åãšnullå®å
šæŒç®åãçµã¿åãããããšã§ãnullãã§ãã¯ãšæ¡ä»¶ä»ãã®å€ã®ä»£å
¥ãè¡ãããšãã§ããŸããname?.length() > 0ã¯ãnameãnullã§ãªãå Žåã«ã®ã¿length()ã¡ãœããã®çµæãå©çšãããŸãã
åå¶åŸ¡æ§é ã®äŸã§ã¯ãããã°ã©ã ã®ãããŒã®å¶åŸ¡ãæ¡ä»¶ã®æ€èšŒãè¡ã£ãŠããŸãããŸããã¢ãµãŒã·ã§ã³ã䜿çšããããšã§ããã°ã©ã ã®æ£ãããæ€èšŒã§ããŸãã
ãã®ã³ãŒãã§ã¯ãGroovyã®ãå¶åŸ¡æ§é ãã«é¢é£ããããŸããŸãªèŠçŽ ã®äŸã瀺ãããŠããŸãã
try-catch-finallyãããã¯ã¯ãäŸå€åŠçãå®è¡ããããã«äœ¿çšãããŸããtryãããã¯å
ã®ã³ãŒããå®è¡ãããããäŸå€ãã¹ããŒãããå Žåã¯è©²åœããcatchãããã¯ãå®è¡ãããŸãããŸããfinallyãããã¯ã¯äŸå€ã®æç¡ã«ãããããå¿
ãå®è¡ãããŸãããã®äŸã§ã¯ããŒãã§å²ãç®ãè©Šã¿ãå Žåã«ArithmeticExceptionããã£ãããããé©åãªã¡ãã»ãŒãžã衚瀺ãããŸãã
ã¯ããŒãžã£ã¯ç¡åé¢æ°ã®ããšã§ãé¢æ°ã®ããã«æ±ãããšãã§ããŸããclosureExampleã¯2ã€ã®åŒæ°ãåãåãããããã足ããçµæãè¿ãã¯ããŒãžã£ã§ããclosureExample(3, 4)ã¯7ãè¿ããŸãã
äŸå€ã®ã¹ããŒãšãã£ããã¯ãããã°ã©ã ã®å®è¡äžã«ç°åžžç¶æ
ãåŠçããããã«äœ¿çšãããŸããcalculateSquareRootã¡ãœããã§ã¯ãåŒæ°ãè² ã®å Žåã«IllegalArgumentExceptionãã¹ããŒããŸããåŒã³åºãåŽã§ã¯ããã®ã¡ãœãããtry-catchæ§æã§å²ã¿ãäŸå€ããã£ããããŠé©åãªã¡ãã»ãŒãžã衚瀺ããŸãã
ãããã®å¶åŸ¡æ§é ã¯ãããã°ã©ã ã®å¶åŸ¡ãããŒããšã©ãŒåŠçãæè»ã«å¶åŸ¡ããããã«äœ¿çšãããŸãã
ãã®ã³ãŒãã¯ãGroovyã®ãªã¹ãæäœãšã³ã¬ã¯ã·ã§ã³æŒç®åã«é¢ããäŸã§ãã以äžã«åéšåã®è§£èª¬ãããŸãã
ãã®ã³ãŒãã§ã¯ãGroovyã®é¢æ°ãšã¡ãœããã«é¢ããäŸã瀺ãããŠããŸãã
ãã®ã³ãŒãã§ã¯ãã¯ããŒãžã£ã䜿çšããé¢æ°ã®å®çŸ©ãšåŒã³åºãæ¹æ³ã瀺ãããŠããŸããã¯ããŒãžã£ã¯ç¡åé¢æ°ãšããŠäœ¿çšãããå€æ°ã«ä»£å
¥ããŠé¢æ°ã®ããã«æ±ãããšãã§ããŸãã
ãŸããã¯ã©ã¹å
ã§ã®ã¡ãœããã®å®çŸ©ãšåŒã³åºãæ¹æ³ã瀺ãããŠããŸããã¯ã©ã¹ãå®çŸ©ãããã®äžã§ã¡ãœãããå®çŸ©ããŠäœ¿çšããããšãã§ããŸããã¡ãœããã¯ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ã«å¯ŸããŠåŒã³åºãããŸãã
ãã®ã³ãŒãã§ã¯ãã¡ãœããã®ãªãŒããŒããŒãã瀺ãããŠããŸããMathUtilsã¯ã©ã¹ã®addã¡ãœããã¯ãåŒæ°ã®åã«å¿ããŠç°ãªãåäœãããŸããæŽæ°åŒæ°ã®å Žåãšæµ®åå°æ°ç¹æ°åŒæ°ã®å Žåã§ãé©åãªã¡ãœãããåŒã³åºãããŸãã
ãã®ã³ãŒãã§ã¯ãã¡ãœãããã§ãŒã³ã®æŠå¿µã瀺ãããŠããŸãã StringBuilderUtilsã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãçæããè€æ°ã®ã¡ãœãããé£ç¶ããŠåŒã³åºãããšãã§ããŸãã åã¡ãœããã¯èªèº«ã®ã€ã³ã¹ã¿ã³ã¹ãè¿ãããã次ã®ã¡ãœãããç¶ããŠåŒã³åºãããšãã§ããŸãã ããã«ãããã³ãŒããã·ã³ãã«ã«ä¿ã¡ãªãããè€æ°ã®åŠçãå¹ççã«å®è¡ããããšãã§ããŸãã
ãã®ã³ãŒãã§ã¯ãã¡ãœããã®ãªãŒããŒã©ã€ãã瀺ãããŠããŸããAnimalã¯ã©ã¹ã«ã¯makeSoundã¡ãœããããããŸãããCatã¯ã©ã¹ãšDogã¯ã©ã¹ã§ã¯ããããªãŒããŒã©ã€ãããŠç¬èªã®åäœãå®çŸ©ããŠããŸããããããã®ã€ã³ã¹ã¿ã³ã¹ãçæããŠã¡ãœãããåŒã³åºããšãé©åãªãµãŠã³ãã衚瀺ãããŸãã
ãã®ã³ãŒãã§ã¯ãPersonãšããã¯ã©ã¹ãå®çŸ©ãããŠããŸããPersonã¯ã©ã¹ã«ã¯nameãšageãšããããããã£ããããsayHelloãšããã¡ãœãããå®çŸ©ãããŠããŸããã€ã³ã¹ã¿ã³ã¹åãããperson1ãšperson2ã¯Personã¯ã©ã¹ã®ãªããžã§ã¯ãã§ãããããããã®ããããã£ã«å€ã代å
¥ããsayHelloã¡ãœãããåŒã³åºããŠèªå·±çŽ¹ä»ãããŸãã
ãã®ã³ãŒãã§ã¯ãStudentã¯ã©ã¹ãPersonã¯ã©ã¹ãç¶æ¿ããŠããŸããStudentã¯ã©ã¹ã«ã¯è¿œå ã®ããããã£majorãšã¡ãœããintroduceããããŸããsayHelloã¡ãœããã¯Personã¯ã©ã¹ã®ã¡ãœããããªãŒããŒã©ã€ãããŠããŸãã
ãã®ã³ãŒãã§ã¯ãMathUtilsã¯ã©ã¹ãå®çŸ©ãããŠããŸãããã®ã¯ã©ã¹ã«ã¯éçã¡ãœããaddãšéçå®æ°PIããããŸããéçã¡ãœããã¯ã€ã³ã¹ã¿ã³ã¹åããã«ã¯ã©ã¹åã䜿ã£ãŠçŽæ¥åŒã³åºãããšãã§ããŸããåæ§ã«ãéçå®æ°ãã¯ã©ã¹åã䜿ã£ãŠã¢ã¯ã»ã¹ã§ããŸããresultå€æ°ã«ã¯addã¡ãœããã®çµæã代å
¥ãããããã衚瀺ãããŸãããŸããMathUtils.PIã¯PIå®æ°ã®å€ã衚瀺ããŸãã
ãã®ã³ãŒãã§ã¯ãRectangleã¯ã©ã¹ãå®çŸ©ãããŠããŸãããã®ã¯ã©ã¹ã«ã¯ã³ã³ã¹ãã©ã¯ã¿ãšã€ã³ã¹ã¿ã³ã¹ã¡ãœããããããŸããã³ã³ã¹ãã©ã¯ã¿ã¯ã€ã³ã¹ã¿ã³ã¹åæã«åŒã³åºãããå¹
ãšé«ãã®å€ãåãåã£ãŠã€ã³ã¹ã¿ã³ã¹ã®ããããã£ã«ä»£å
¥ããŸããcalculateAreaã¡ãœããã¯é·æ¹åœ¢ã®é¢ç©ãèšç®ããŠè¿ããŸããrectangle1ã¯Rectangleã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ã§ãããcalculateAreaã¡ãœãããåŒã³åºããŠé¢ç©ãèšç®ãããã®çµæã衚瀺ãããŸãã
ãã®ã³ãŒãã§ã¯ãPersonã¯ã©ã¹ã«ãã©ã€ããŒããªããããã£nameãšageãå®çŸ©ãããŠããŸããããããã£ã«ã¯å€éšããçŽæ¥ã¢ã¯ã»ã¹ã§ããªããããsetNameãšsetAgeã®ãããªã¡ãœãããçšæããŸãããã®ãããªã¡ãœãããã¢ã¯ã»ãµã¡ãœãããšåŒã³ãŸãã
ãã®ã³ãŒãã§ã¯ãæœè±¡ã¯ã©ã¹ãšã€ã³ã¿ãŒãã§ãŒã¹ã®æŠå¿µã瀺ããŠããŸããShapeã¯ã©ã¹ã¯æœè±¡ã¯ã©ã¹ã§ããããµãã¯ã©ã¹ã§ããCircleã¯ã©ã¹ãcalculateAreaãšcalculatePerimeterã¡ãœãããå®è£
ããŠããŸãããŸããDrawableã€ã³ã¿ãŒãã§ãŒã¹ãå®è£
ããSquareã¯ã©ã¹ã§ã¯ãdrawã¡ãœãããå®çŸ©ããŠããŸãã
Circleã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãäœæããcalculateAreaãšcalculatePerimeterã¡ãœãããåŒã³åºããŠåã®é¢ç©ãšååšãèšç®ããŸãããŸããSquareã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãäœæããdrawã¡ãœãããåŒã³åºããŠåè§åœ¢ãæç»ããŸãã
çµæãšããŠãåã®é¢ç©ãšååšã衚瀺ãããåè§åœ¢ãæç»ãããŸãã
ãã®ã³ãŒãã§ã¯ãã¯ã©ã¹ã®ç¶æ¿ãšã¡ãœããã®ãªãŒããŒã©ã€ãã®äŸã瀺ããŠããŸããVehicleã¯ã©ã¹ã¯èŠªã¯ã©ã¹ãšããŠå®çŸ©ãããŠãããCarã¯ã©ã¹ãšBicycleã¯ã©ã¹ããããç¶æ¿ããŠããŸãã
Vehicleã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãäœæããdriveã¡ãœãããåŒã³åºããšã"Driving the Generic vehicle"ãšè¡šç€ºãããŸãã
Carã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãäœæããdriveã¡ãœãããåŒã³åºããšã"Driving the Toyota car"ãšè¡šç€ºãããŸããCarã¯ã©ã¹ã§ã¯@Overrideã¢ãããŒã·ã§ã³ã䜿çšããŠdriveã¡ãœããããªãŒããŒã©ã€ãããŠããŸãã
Bicycleã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãäœæããdriveã¡ãœãããåŒã³åºããšã"Riding the Giant bicycle"ãšè¡šç€ºãããŸããåæ§ã«ãBicycleã¯ã©ã¹ã§ãdriveã¡ãœããããªãŒããŒã©ã€ãããŠããŸãã
ããã«ãããç°ãªãã¯ã©ã¹ã芪ã¯ã©ã¹ã®ã¡ãœããããªãŒããŒã©ã€ãããããããã®ç¹å®ã®åäœãå®è¡ããããšãã§ããããã«ãªããŸãã
以äžã¯ãGroovyã®ææ³ãAPIã®äžéšã§ããGroovyã¯Javaã®æ¡åŒµçã§ãããããJavaãšåããããªããžã§ã¯ãæåèšèªãšããŠã®ç¹æ§ãæã£ãŠããŸããGroovyã®æ©èœã掻çšããããšã§ãJavaãããç°¡æœã§è¡šçŸåè±ããªã³ãŒããæžãããšãã§ããŸãããŸããJavaã®ã©ã€ãã©ãªã容æã«äœ¿çšããããšãã§ãããããJavaéçºè
ã«ãšã£ãŠã芪åæ§ãé«ãèšèªãšãªã£ãŠããŸãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "Groovyã¯Javaããã°ã©ããŒã«ãšã£ãŠãæè»æ§ãšçç£æ§ãåäžããã匷åãªã¹ã¯ãªããèšèªã§ãããã®èšèªã¯ãJavaã®ã·ã³ã¿ãã¯ã¹ã匷åããããŸããŸãªäŸ¿å©ãªæ©èœãæäŸããŸãããã®æç§æžã§ã¯ãGroovyèšèªã®åºç€ããå¿çšãŸã§ãåºç¯å²ãªãããã¯ã網çŸ
ããŠããŸãã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "æ¬æžã¯ãGroovyèšèªãç¥ããªãåå¿è
ãããæ¢ã«Javaãçç¥ããŠããããã°ã©ããŒãŸã§ãå¹
åºãèªè
ã«åããŠæžãããŠããŸããåå¿è
ã«ã¯ãåºæ¬çãªææ³ãšæ©èœã玹ä»ããJavaãšã®éããæ確ã«èª¬æããŸãããŸããçµéšè±å¯ãªJavaããã°ã©ããŒã«ã¯ãGroovyã®é«åºŠãªæ©èœããJavaãšã®çžäºéçšæ§ã®å©ç¹ã«çŠç¹ãåœãŠãç« ããããŸãã",
"title": ""
},
{
"paragraph_id": 2,
"tag": "p",
"text": "æ¬æžã§ã¯ãGroovyã®ææ³ãå€æ°ãæŒç®åãã¯ã©ã¹ãã¡ãœãããã³ã¬ã¯ã·ã§ã³ãã¯ããŒãžã£ãã¡ã¿ããã°ã©ãã³ã°ã䞊è¡åŠçãªã©ãããŸããŸãªãããã¯ãæ±ããŸãããŸããGroovyã䜿çšããŠWebã¢ããªã±ãŒã·ã§ã³ãã¹ã¯ãªãããéçºããããã®å®è·µçãªæé ãæäŸããŸãã",
"title": ""
},
{
"paragraph_id": 3,
"tag": "p",
"text": "æ¬æžã¯ãGroovyèšèªã®åºç€ããé«åºŠãªå¿çšãŸã§ãå®å
šãªäžåãšãªã£ãŠããŸããGroovyèšèªã®é
åãçºèŠããJavaéçºã匷åããããã«ããã²æ¬æžã圹ç«ãŠãŠãã ããã",
"title": ""
},
{
"paragraph_id": 4,
"tag": "p",
"text": "Apache Groovy(ã°ã«ãŒãŽã£ãŒ)ã¯ãJavaãã©ãããã©ãŒã äžã§åäœããåçãªã¹ã¯ãªããèšèªã§ãJavaèšèªãšå¯æ¥ã«é¢é£ããŠããŸãããã®èšèªã¯ãJavaã®æ©èœã«ã¢ã¯ã»ã¹ã§ããã ãã§ãªããç°¡åã§çŽæçãªæ§æããã€ãããã¯ãªåä»ããã¯ããŒãžã£ãªã©ãä»ã®å€ãã®ããã°ã©ãã³ã°èšèªã®ç¹åŸŽãçµã¿åãããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "Groovyã¯ãJavaã³ãŒããç°¡çŽ åããå¯èªæ§ãé«ããããã«èšèšãããŠãããJavaã®æ©èœã掻çšããªãããéçºè
ãããå¹ççã«ã³ãŒããèšè¿°ã§ããããã«ããããšãç®çãšããŠããŸãããŸããJavaãšã®ã·ãŒã ã¬ã¹ãªçµ±åæ§ãåããŠãããJavaã¯ã©ã¹ãæ¡åŒµããJavaã³ãŒãã«å¯ŸããŠGroovyã³ãŒãã䜿çšã§ããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "Apache Groovyã¯ãApacheãœãããŠã§ã¢è²¡å£ã«ãã£ãŠç®¡çãããŠããããªãŒãã³ãœãŒã¹ã§å
¬éãããŠããŸãããã®èšèªã¯ãJavaéçºè
ãã·ã¹ãã 管çè
ãããã°ããŒã¿åæè
ãªã©ãããŸããŸãªãŠãŒã¶ãŒã«ãšã£ãŠäººæ°ã®ããéžæè¢ã§ãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "Groovyã®éçºã«ã¯JREãŸãã¯JDKãå¿
èŠã§ãããŸããJREãŸãã¯JDKãã€ã³ã¹ããŒã«ããŠãã ããã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "Groovyã¯Apacheã®Webãµã€ãããããŠã³ããŒãã§ããŸãã以äžã®æé ã«åŸã£ãŠãGroovyãã€ã³ã¹ããŒã«ããŠãã ããã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "Groovyã§ã¯ãå€æ°ã䜿çšããŠããŒã¿ãæ ŒçŽããåŠçããããšãã§ããŸããå€æ°ã¯ãããŒã¿ã®äžæçãªå ŽæãšããŠæ©èœããããã°ã©ã å
ã§å€ãåç
§ãããå€æŽãããããããã«äœ¿çšãããŸãã å€æ°ã䜿çšããåã«ãé©åãªããŒã¿åãéžæããå¿
èŠããããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "Groovyã§ã¯ãå€æ°ã宣èšãããšåæã«åæåããããšãã§ããŸãã以äžã¯ãå€æ°ã®å®£èšãšåæåã®åºæ¬çãªæ§æã§ãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "åæåã¯å¿
é ã§ã¯ãããŸããããæšå¥šãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "Groovyã¯åçåä»ãèšèªã§ãããå€æ°ã®åãäºåã«å®£èšããå¿
èŠã¯ãããŸãããå€æ°ã®å€ã«åºã¥ããŠãèªåçã«é©åãªããŒã¿åãå²ãåœãŠãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 13,
"tag": "p",
"text": "äž»ãªããŒã¿åã«ã¯ä»¥äžã®ãããªãã®ããããŸã:",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 14,
"tag": "p",
"text": "以äžã¯ãããããã®ããŒã¿åã®äŸã§ã:",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 15,
"tag": "p",
"text": "Groovyã§ã¯ãç°ãªãããŒã¿åã®éã§å€ãå€æããããšãã§ããŸãããããåãã£ã¹ããšåŒã³ãŸãã以äžã¯ãããã€ãã®åºæ¬çãªåãã£ã¹ãã®äŸã§ãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 16,
"tag": "p",
"text": "æŽæ°ããæµ®åå°æ°ç¹æ°ãžã®å€æ:",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 17,
"tag": "p",
"text": "æååããæŽæ°ãžã®å€æ:",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 18,
"tag": "p",
"text": "æååããæµ®åå°æ°ç¹æ°ãžã®å€æ:",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 19,
"tag": "p",
"text": "Groovyã§ã¯ãå€æ°ã«ã¯æ°ããå€ãå代å
¥ããããšãã§ããŸããå€æ°ã®å€ãå€æŽããã«ã¯ãå€æ°åãæå®ããŠæ°ããå€ã代å
¥ããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 20,
"tag": "p",
"text": "Groovyã¯åçåä»ãèšèªã§ãããå€æ°ã®å€ããé©åãªåãæšè«ããããšãã§ããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 21,
"tag": "p",
"text": "Groovyã§ã¯ãå€ãå€æŽã§ããªãå®æ°ã宣èšããããšãã§ããŸããå®æ°ã¯finalããŒã¯ãŒãã䜿çšããŠå®£èšãããåæåãããåŸã«å€ãå€æŽããããšã¯ã§ããŸããã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 22,
"tag": "p",
"text": "1è¡ç®ãã4è¡ç®ãŸã§ã¯ãããŸããŸãªåã®å€æ°ã®å®£èšãšåæåãè¡ãããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 23,
"tag": "p",
"text": "6è¡ç®ãã10è¡ç®ã§ã¯ãå€æ°ã®åæšè«ã瀺ãããŠããŸããGroovyã§ã¯defããŒã¯ãŒãã䜿çšããŠåæšè«ãè¡ãããšãã§ããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 24,
"tag": "p",
"text": "æåŸã®è¡ã§ã¯ãé
åã«ãããã®èŠçŽ ããŸãšããeachã¡ãœããã䜿çšããŠåèŠçŽ ã«å¯ŸããŠåŠçãè¡ã£ãŠããŸãã åèŠçŽ ãinspect()ã¡ãœããã§æååè¡šçŸã«å€æããããã«ã¯ã©ã¹æ
å ±ãè¿œå ããŠåºåããŠããŸãããã®éšåã¯åèŠçŽ ã®åã確èªããããã®ãããã°ç®çã®ã³ãŒãã§ãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 25,
"tag": "p",
"text": "äžèšã®ã³ãŒããå®è¡ãããšãåå€æ°ã®å€ãšåãåºåãããŸããäŸãã°ãiã®åºåã¯42: class java.lang.IntegerãšãªããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 26,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãGroovyã§äœ¿çšãããäžè¬çãªæŒç®åã玹ä»ããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 27,
"tag": "p",
"text": "æ°å€æŒç®ã§ã¯ãå ç®(+)ãæžç®(-)ãä¹ç®(*)ãé€ç®(/)ãå°äœ(%)ã®æŒç®åã䜿çšãããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 28,
"tag": "p",
"text": "æååé£çµã§ã¯ãæååå士ã+æŒç®åã§çµåããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 29,
"tag": "p",
"text": "è«çæŒç®ã§ã¯ãè«çç©(&&)ãè«çå(||)ãåŠå®(!)ã®æŒç®åã䜿çšãããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 30,
"tag": "p",
"text": "æ¯èŒæŒç®ã§ã¯ãçãããã©ãã(==)ãçãããªããã©ãã(!=)ã倧ãããã©ãã(>)ãå°ãããã©ãã(<)ã®æŒç®åã䜿çšãããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 31,
"tag": "p",
"text": "åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽãããprintlnæã䜿çšããŠçµæãåºåãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 32,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãããŸããŸãªæŒç®åãšæŒç®åã®çµã¿åããã瀺ãããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 33,
"tag": "p",
"text": "代å
¥æŒç®åã§ã¯ãå ç®ä»£å
¥(+=)ãæžç®ä»£å
¥(-=)ãä¹ç®ä»£å
¥(*=)ãé€ç®ä»£å
¥(/=)ãå°äœä»£å
¥(%=)ã®æŒç®åã䜿çšãããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 34,
"tag": "p",
"text": "ã€ã³ã¯ãªã¡ã³ã(++)ãšãã¯ãªã¡ã³ã(--)ã¯ãå€æ°ã®å€ã1ã€å¢ãããŸãã¯æžããããã«äœ¿çšãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 35,
"tag": "p",
"text": "äžé
æŒç®å(?:)ã¯ãæ¡ä»¶åŒã®çµæã«åºã¥ããŠç°ãªãå€ãè¿ãããã«äœ¿çšãããŸããæ¡ä»¶ãçã®å Žåã¯æåã®å€ããåœã®å Žåã¯2çªç®ã®å€ã代å
¥ãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 36,
"tag": "p",
"text": "åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽãããprintlnæã䜿çšããŠçµæãåºåãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 37,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãããŸããŸãªæŒç®åãšãã®äœ¿çšæ³ã瀺ãããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 38,
"tag": "p",
"text": "æååæ¯èŒã§ã¯ã==æŒç®åãš!=æŒç®åã䜿çšããŠã2ã€ã®æååãçãããã©ãããæ¯èŒããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 39,
"tag": "p",
"text": "è«çæŒç®åã®ã·ã§ãŒããµãŒãããã§ã¯ã&&æŒç®åãš||æŒç®åã䜿çšããŠãè«çç©ãšè«çåãè©äŸ¡ããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 40,
"tag": "p",
"text": "æŒç®åã®åªå
é äœã§ã¯ãä¹ç®(*)ãå ç®(+)ãããåªå
ãããããšã瀺ããŠããŸããresult1ã®èšç®ã§ã¯ãä¹ç®ãå
ã«è©äŸ¡ãããresult2ã®èšç®ã§ã¯æ¬åŒ§ãåªå
ãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 41,
"tag": "p",
"text": "åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽãããprintlnæã䜿çšããŠçµæãåºåãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 42,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãGroovyã®ç¹æ®ãªæŒç®åã§ããäžé
æŒç®åã®ãã¹ããnullå®å
šæŒç®åãããã³ElvisæŒç®åã®äœ¿çšäŸã瀺ãããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 43,
"tag": "p",
"text": "äžé
æŒç®åã®ãã¹ãã§ã¯ã幎霢ã«åºã¥ããŠç°ãªãçµæãè¿ãè€éãªæ¡ä»¶åå²ãè¡ãããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 44,
"tag": "p",
"text": "nullå®å
šæŒç®å(?.)ã¯ãnullå®å
šãªåŒã³åºããè¡ããŸããããå€æ°ãnullã§ããã°ãã¡ãœããåŒã³åºããããããã£ã¢ã¯ã»ã¹ã¯ç¡èŠãããçµæã¯nullã«ãªããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 45,
"tag": "p",
"text": "ElvisæŒç®å(?:)ã¯ãå€æ°ãnullã§ããå Žåã«ä»£æ¿ã®å€ãè¿ãããã«äœ¿çšãããŸããå€æ°ãnullã§ãªããã°ããã®å€ã䜿çšãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 46,
"tag": "p",
"text": "åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽãããprintlnæã䜿çšããŠçµæãåºåãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 47,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãé
åæŒç®åããªã¹ãçµåæŒç®åãæååæŒç®åãããã³instanceofæŒç®åã®äœ¿çšäŸã瀺ãããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 48,
"tag": "p",
"text": "é
åæŒç®å([])ã䜿çšãããšãé
åå
ã®ç¹å®ã®èŠçŽ ã«ã¢ã¯ã»ã¹ã§ããŸããnumbers[0]ã¯æåã®èŠçŽ ããnumbers[-1]ã¯æåŸã®èŠçŽ ãååŸããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 49,
"tag": "p",
"text": "ãªã¹ãçµåæŒç®å(+)ã¯ã2ã€ã®ãªã¹ããçµåããŠæ°ãããªã¹ããäœæããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 50,
"tag": "p",
"text": "æååæŒç®å(+)ã¯ãæååã®é£çµã«äœ¿çšãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 51,
"tag": "p",
"text": "instanceofæŒç®åã¯ããªããžã§ã¯ãã®åããã§ãã¯ããŸããæå®ããåã«å±ããŠããã°trueãè¿ããããã§ãªããã°falseãè¿ããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 52,
"tag": "p",
"text": "åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽãããprintlnæã䜿çšããŠçµæãåºåãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 53,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãã¬ã³ãžæŒç®å(..)ãæ£èŠè¡šçŸæŒç®å(=~)ãã¡ãœããåŒã³åºãæŒç®å(.)ãããã³ã¯ããŒãžã£æŒç®å({})ã®äœ¿çšäŸã瀺ãããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 54,
"tag": "p",
"text": "ã¬ã³ãžæŒç®åã¯ãæå®ããç¯å²ã®å€ãè¡šããªã¹ããäœæããŸãã1..5ã¯1ãã5ãŸã§ã®æŽæ°ã®ãªã¹ããã10..1ã¯ç©ºã®ãªã¹ããäœæããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 55,
"tag": "p",
"text": "æ£èŠè¡šçŸæŒç®å(=~)ã䜿çšãããšãããã¹ãå
ã§æ£èŠè¡šçŸãã¿ãŒã³ã«äžèŽããéšåãæ€çŽ¢ã§ããŸããmatch[0][0]ã¯äžèŽããå
šäœã®ããã¹ãããmatch[0][1]ã¯ãã£ããã£ã°ã«ãŒãã®äžèŽããéšåãååŸããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 56,
"tag": "p",
"text": "ã¡ãœããåŒã³åºãæŒç®å(.)ã䜿çšãããšããªããžã§ã¯ãã®ã¡ãœãããåŒã³åºãããšãã§ããŸããlist.size()ã¯ãªã¹ãã®èŠçŽ æ°ãååŸããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 57,
"tag": "p",
"text": "ã¯ããŒãžã£æŒç®å({})ã¯ãå¿åã®é¢æ°ãäœæããŸããnumbers.collect { it * it }ã¯numbersãªã¹ãã®åèŠçŽ ã«å¯ŸããŠã¯ããŒãžã£ãé©çšããèŠçŽ ã®2ä¹ã®ãªã¹ããäœæããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 58,
"tag": "p",
"text": "åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽãããprintlnæã䜿çšããŠçµæãåºåãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 59,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãæŒç®åã®ã°ã«ãŒãå(())ãäžé
æŒç®åã®ã·ã§ãŒããµãŒãããããããæŒç®åãããã³ã·ããæŒç®åã®äœ¿çšäŸã瀺ãããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 60,
"tag": "p",
"text": "ã°ã«ãŒãåæŒç®å(())ã¯ãæŒç®åã®è©äŸ¡é åºãæ瀺çã«æå®ããŸããresult1ã§ã¯ä¹ç®ãå
ã«è©äŸ¡ãããŸãããresult2ã§ã¯å ç®ãå
ã«è©äŸ¡ãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 61,
"tag": "p",
"text": "äžé
æŒç®åã®ã·ã§ãŒããµãŒãããã§ã¯ãæ¡ä»¶ãé çªã«è©äŸ¡ãããæåã«çãšãªãæ¡ä»¶ã®çµæãè¿ãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 62,
"tag": "p",
"text": "ãããæŒç®å(&ã|ã^)ã¯ããããããšã®è«çæŒç®ãè¡ããŸããåæŒç®ã®çµæã¯æŽæ°ãšããŠèšç®ãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 63,
"tag": "p",
"text": "ã·ããæŒç®å(<<ã>>)ã¯ãäºé²æ°è¡šçŸã®ããããå·Šå³ã«ã·ããããŸããå·Šã·ããã§ã¯ããããå·Šã«ç§»åããå³ã·ããã§ã¯ããããå³ã«ç§»åããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 64,
"tag": "p",
"text": "åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽãããprintlnæã䜿çšããŠçµæãåºåãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 65,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãè«çæŒç®å(&&ã||ã!)ãšæ¯èŒæŒç®å(==ã!=ã>ã<ã>=ã<=)ã®äœ¿çšäŸã瀺ãããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 66,
"tag": "p",
"text": "è«çæŒç®åã¯ãçåœå€ãæäœããããã«äœ¿çšãããŸãã&&ã¯è«çç©(AND)ãèšç®ããäž¡æ¹ã®ãªãã©ã³ããtrueã®å Žåã«çµæãtrueãšãªããŸãã||ã¯è«çå(OR)ãèšç®ããã©ã¡ããã®ãªãã©ã³ããtrueã®å Žåã«çµæãtrueãšãªããŸãã!ã¯è«çåŠå®(NOT)ãèšç®ãããªãã©ã³ãã®çåœå€ãå転ãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 67,
"tag": "p",
"text": "æ¯èŒæŒç®åã¯ãå€ã®æ¯èŒãè¡ããŸãã==ã¯çãããã©ãããå€å®ãã!=ã¯çãããªããã©ãããå€å®ããŸãã>ã<ã>=ã<=ã¯ãããã倧ãªããå°ãªãã以äžã以äžãå€å®ããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 68,
"tag": "p",
"text": "åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽãããprintlnæã䜿çšããŠçµæãåºåãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 69,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãnullå®å
šæŒç®å(?.)ãšãšã«ãã¹æŒç®å(?:)ã®äœ¿çšäŸã瀺ãããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 70,
"tag": "p",
"text": "nullå®å
šæŒç®å(?.)ã¯ããªããžã§ã¯ããnullã§ãªãå Žåã«ã®ã¿ããããã£ãã¡ãœããã«ã¢ã¯ã»ã¹ããŸãããããªããžã§ã¯ããnullã§ããã°ãçµæã¯nullãšãªããŸããtext?.length()ã§ã¯ãtextãªããžã§ã¯ããnullã§ãªãå Žåã«ã®ã¿length()ã¡ãœãããåŒã³åºãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 71,
"tag": "p",
"text": "ãšã«ãã¹æŒç®å(?:)ã¯ããªããžã§ã¯ããnullã§ããå Žåã«ããã©ã«ãã®å€ã䜿çšããŸãããªããžã§ã¯ããnullã§ãªãå Žåã¯ãã®å€ã䜿çšããŸããname ?: \"Unknown\"ã§ã¯ãnameãnullã§ããã°\"Unknown\"ããããã§ãªããã°nameã®å€ã代å
¥ãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 72,
"tag": "p",
"text": "åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽãããprintlnæã䜿çšããŠçµæãåºåãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 73,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãå®å
šããã²ãŒã·ã§ã³æŒç®å(?.)ãé
åã¢ã¯ã»ã¹æŒç®å([])ãããã³ã¹ãã¬ããæŒç®å(*)ã®äœ¿çšäŸã瀺ãããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 74,
"tag": "p",
"text": "å®å
šããã²ãŒã·ã§ã³æŒç®å(?.)ã¯ããªããžã§ã¯ããnullã§ãªãå Žåã«ã®ã¿ããããã£ã«ã¢ã¯ã»ã¹ããŸãããããªããžã§ã¯ããnullã§ããã°ãçµæã¯nullãšãªããŸããperson?.nameã§ã¯ãpersonãªããžã§ã¯ããnullã§ãªãå Žåã«ã®ã¿nameããããã£ã«ã¢ã¯ã»ã¹ããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 75,
"tag": "p",
"text": "é
åã¢ã¯ã»ã¹æŒç®å([])ã¯ãé
åå
ã®èŠçŽ ã«ã¢ã¯ã»ã¹ããŸããarray[2]ã§ã¯ãarrayé
åã®3çªç®ã®èŠçŽ ã«ã¢ã¯ã»ã¹ãããã®å€ãååŸããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 76,
"tag": "p",
"text": "ã¹ãã¬ããæŒç®å(*)ã¯ãé
åå
ã®èŠçŽ ãå±éããŸãã[0, *numbers, 4, 5]ã§ã¯ãnumbersé
åã®èŠçŽ ãå±éããŠæ°ããé
åãäœæããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 77,
"tag": "p",
"text": "åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽãããprintlnæã䜿çšããŠçµæãåºåãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 78,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãGroovyã®å¶åŸ¡æ§é ã®äŸã瀺ãããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 79,
"tag": "p",
"text": "ifæã¯æ¡ä»¶ã«åºã¥ããŠåå²ããŸããnumã0ãã倧ããå Žåã¯\"Positive\"ã0ããå°ããå Žåã¯\"Negative\"ããã以å€ã®å Žåã¯\"Zero\"ãåºåãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 80,
"tag": "p",
"text": "forã«ãŒãã¯æå®ãããåæ°ã®ç¹°ãè¿ããè¡ããŸããnumbersãªã¹ãã®èŠçŽ ãé çªã«è¡šç€ºããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 81,
"tag": "p",
"text": "whileã«ãŒãã¯æ¡ä»¶ãçã®éãç¹°ãè¿ãåŠçãè¡ããŸããcountã5æªæºã®éãCount: [countã®å€]ãšè¡šç€ºããcountãã€ã³ã¯ãªã¡ã³ãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 82,
"tag": "p",
"text": "switchæã¯è€æ°ã®æ¡ä»¶ã«åºã¥ããŠåå²ããŸããfruitã®å€ã«å¿ããŠç°ãªãã¡ãã»ãŒãžã衚瀺ãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 83,
"tag": "p",
"text": "åå¶åŸ¡æ§é ã®äŸã§ã¯ãæ¡ä»¶ãã«ãŒãã®å¶åŸ¡ã«å¿ããŠã³ãŒããããã¯ãå®è¡ãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 84,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãã«ãŒãã®å¶åŸ¡ãšäŸå€ã®ã¹ããŒã«é¢é£ããå¶åŸ¡æ§é ã®äŸã瀺ãããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 85,
"tag": "p",
"text": "forã«ãŒãã§ã¯ãnumbersãªã¹ãã®èŠçŽ ãé çªã«åŠçããŸãããã ããèŠçŽ ã®å€ã3ã®å Žåã¯continueæãå®è¡ããã次ã®ç¹°ãè¿ãã«é²ã¿ãŸããèŠçŽ ã®å€ã4ã®å Žåã¯breakæãå®è¡ãããã«ãŒããçµäºããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 86,
"tag": "p",
"text": "try-catchæ§æã¯äŸå€ã®ææãšåŠçãè¡ããŸããtryãããã¯å
ã®ã³ãŒããå®è¡ãããããäŸå€ãã¹ããŒãããå Žåã¯è©²åœããcatchãããã¯ãå®è¡ãããŸãããã®äŸã§ã¯ãnumãè² ã®å Žåã«IllegalArgumentExceptionãã¹ããŒããããã®äŸå€ããã£ãããããŠã¡ãã»ãŒãžã衚瀺ãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 87,
"tag": "p",
"text": "åå¶åŸ¡æ§é ã¯ããã°ã©ã ã®ãããŒãå¶åŸ¡ããæ¡ä»¶ãç¹°ãè¿ãã«åºã¥ããŠã³ãŒãã®å®è¡ã調æŽããŸãããŸããäŸå€ã®ã¹ããŒãšãã£ããã䜿çšããããšã§ããšã©ãŒåŠçãç°åžžç¶æ
ã®åŠçãè¡ãããšãã§ããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 88,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãã©ãã«ä»ãã«ãŒããšã©ãã«ä»ããããã¯ãassertæã«ããã¢ãµãŒã·ã§ã³ãããã³äžé
æŒç®åãšnullå®å
šæŒç®åã®çµã¿åããã®äŸã瀺ãããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 89,
"tag": "p",
"text": "ã©ãã«ä»ãã«ãŒããšã©ãã«ä»ããããã¯ã䜿çšããããšã§ãå
åŽã®ã«ãŒãããå€åŽã®ã«ãŒããçµäºããããšãã§ããŸããbreak outerLoopã¯å€åŽã®ã«ãŒããçµäºããã«ãŒãããæããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 90,
"tag": "p",
"text": "assertæã¯ãæ¡ä»¶åŒãçã§ããããšãã¢ãµãŒã·ã§ã³(æ€èšŒ)ããŸããããæ¡ä»¶åŒãåœã®å Žåãã¢ãµãŒã·ã§ã³ãšã©ãŒãçºçããããã°ã©ã ã®å®è¡ãåæ¢ããŸãããã®äŸã§ã¯ãxãyããã倧ããããšãæ€èšŒããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 91,
"tag": "p",
"text": "äžé
æŒç®åãšnullå®å
šæŒç®åãçµã¿åãããããšã§ãnullãã§ãã¯ãšæ¡ä»¶ä»ãã®å€ã®ä»£å
¥ãè¡ãããšãã§ããŸããname?.length() > 0ã¯ãnameãnullã§ãªãå Žåã«ã®ã¿length()ã¡ãœããã®çµæãå©çšãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 92,
"tag": "p",
"text": "åå¶åŸ¡æ§é ã®äŸã§ã¯ãããã°ã©ã ã®ãããŒã®å¶åŸ¡ãæ¡ä»¶ã®æ€èšŒãè¡ã£ãŠããŸãããŸããã¢ãµãŒã·ã§ã³ã䜿çšããããšã§ããã°ã©ã ã®æ£ãããæ€èšŒã§ããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 93,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãGroovyã®ãå¶åŸ¡æ§é ãã«é¢é£ããããŸããŸãªèŠçŽ ã®äŸã瀺ãããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 94,
"tag": "p",
"text": "try-catch-finallyãããã¯ã¯ãäŸå€åŠçãå®è¡ããããã«äœ¿çšãããŸããtryãããã¯å
ã®ã³ãŒããå®è¡ãããããäŸå€ãã¹ããŒãããå Žåã¯è©²åœããcatchãããã¯ãå®è¡ãããŸãããŸããfinallyãããã¯ã¯äŸå€ã®æç¡ã«ãããããå¿
ãå®è¡ãããŸãããã®äŸã§ã¯ããŒãã§å²ãç®ãè©Šã¿ãå Žåã«ArithmeticExceptionããã£ãããããé©åãªã¡ãã»ãŒãžã衚瀺ãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 95,
"tag": "p",
"text": "ã¯ããŒãžã£ã¯ç¡åé¢æ°ã®ããšã§ãé¢æ°ã®ããã«æ±ãããšãã§ããŸããclosureExampleã¯2ã€ã®åŒæ°ãåãåãããããã足ããçµæãè¿ãã¯ããŒãžã£ã§ããclosureExample(3, 4)ã¯7ãè¿ããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 96,
"tag": "p",
"text": "äŸå€ã®ã¹ããŒãšãã£ããã¯ãããã°ã©ã ã®å®è¡äžã«ç°åžžç¶æ
ãåŠçããããã«äœ¿çšãããŸããcalculateSquareRootã¡ãœããã§ã¯ãåŒæ°ãè² ã®å Žåã«IllegalArgumentExceptionãã¹ããŒããŸããåŒã³åºãåŽã§ã¯ããã®ã¡ãœãããtry-catchæ§æã§å²ã¿ãäŸå€ããã£ããããŠé©åãªã¡ãã»ãŒãžã衚瀺ããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 97,
"tag": "p",
"text": "ãããã®å¶åŸ¡æ§é ã¯ãããã°ã©ã ã®å¶åŸ¡ãããŒããšã©ãŒåŠçãæè»ã«å¶åŸ¡ããããã«äœ¿çšãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 98,
"tag": "p",
"text": "ãã®ã³ãŒãã¯ãGroovyã®ãªã¹ãæäœãšã³ã¬ã¯ã·ã§ã³æŒç®åã«é¢ããäŸã§ãã以äžã«åéšåã®è§£èª¬ãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 99,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãGroovyã®é¢æ°ãšã¡ãœããã«é¢ããäŸã瀺ãããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 100,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãã¯ããŒãžã£ã䜿çšããé¢æ°ã®å®çŸ©ãšåŒã³åºãæ¹æ³ã瀺ãããŠããŸããã¯ããŒãžã£ã¯ç¡åé¢æ°ãšããŠäœ¿çšãããå€æ°ã«ä»£å
¥ããŠé¢æ°ã®ããã«æ±ãããšãã§ããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 101,
"tag": "p",
"text": "ãŸããã¯ã©ã¹å
ã§ã®ã¡ãœããã®å®çŸ©ãšåŒã³åºãæ¹æ³ã瀺ãããŠããŸããã¯ã©ã¹ãå®çŸ©ãããã®äžã§ã¡ãœãããå®çŸ©ããŠäœ¿çšããããšãã§ããŸããã¡ãœããã¯ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ã«å¯ŸããŠåŒã³åºãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 102,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãã¡ãœããã®ãªãŒããŒããŒãã瀺ãããŠããŸããMathUtilsã¯ã©ã¹ã®addã¡ãœããã¯ãåŒæ°ã®åã«å¿ããŠç°ãªãåäœãããŸããæŽæ°åŒæ°ã®å Žåãšæµ®åå°æ°ç¹æ°åŒæ°ã®å Žåã§ãé©åãªã¡ãœãããåŒã³åºãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 103,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãã¡ãœãããã§ãŒã³ã®æŠå¿µã瀺ãããŠããŸãã StringBuilderUtilsã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãçæããè€æ°ã®ã¡ãœãããé£ç¶ããŠåŒã³åºãããšãã§ããŸãã åã¡ãœããã¯èªèº«ã®ã€ã³ã¹ã¿ã³ã¹ãè¿ãããã次ã®ã¡ãœãããç¶ããŠåŒã³åºãããšãã§ããŸãã ããã«ãããã³ãŒããã·ã³ãã«ã«ä¿ã¡ãªãããè€æ°ã®åŠçãå¹ççã«å®è¡ããããšãã§ããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 104,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãã¡ãœããã®ãªãŒããŒã©ã€ãã瀺ãããŠããŸããAnimalã¯ã©ã¹ã«ã¯makeSoundã¡ãœããããããŸãããCatã¯ã©ã¹ãšDogã¯ã©ã¹ã§ã¯ããããªãŒããŒã©ã€ãããŠç¬èªã®åäœãå®çŸ©ããŠããŸããããããã®ã€ã³ã¹ã¿ã³ã¹ãçæããŠã¡ãœãããåŒã³åºããšãé©åãªãµãŠã³ãã衚瀺ãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 105,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãPersonãšããã¯ã©ã¹ãå®çŸ©ãããŠããŸããPersonã¯ã©ã¹ã«ã¯nameãšageãšããããããã£ããããsayHelloãšããã¡ãœãããå®çŸ©ãããŠããŸããã€ã³ã¹ã¿ã³ã¹åãããperson1ãšperson2ã¯Personã¯ã©ã¹ã®ãªããžã§ã¯ãã§ãããããããã®ããããã£ã«å€ã代å
¥ããsayHelloã¡ãœãããåŒã³åºããŠèªå·±çŽ¹ä»ãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 106,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãStudentã¯ã©ã¹ãPersonã¯ã©ã¹ãç¶æ¿ããŠããŸããStudentã¯ã©ã¹ã«ã¯è¿œå ã®ããããã£majorãšã¡ãœããintroduceããããŸããsayHelloã¡ãœããã¯Personã¯ã©ã¹ã®ã¡ãœããããªãŒããŒã©ã€ãããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 107,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãMathUtilsã¯ã©ã¹ãå®çŸ©ãããŠããŸãããã®ã¯ã©ã¹ã«ã¯éçã¡ãœããaddãšéçå®æ°PIããããŸããéçã¡ãœããã¯ã€ã³ã¹ã¿ã³ã¹åããã«ã¯ã©ã¹åã䜿ã£ãŠçŽæ¥åŒã³åºãããšãã§ããŸããåæ§ã«ãéçå®æ°ãã¯ã©ã¹åã䜿ã£ãŠã¢ã¯ã»ã¹ã§ããŸããresultå€æ°ã«ã¯addã¡ãœããã®çµæã代å
¥ãããããã衚瀺ãããŸãããŸããMathUtils.PIã¯PIå®æ°ã®å€ã衚瀺ããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 108,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãRectangleã¯ã©ã¹ãå®çŸ©ãããŠããŸãããã®ã¯ã©ã¹ã«ã¯ã³ã³ã¹ãã©ã¯ã¿ãšã€ã³ã¹ã¿ã³ã¹ã¡ãœããããããŸããã³ã³ã¹ãã©ã¯ã¿ã¯ã€ã³ã¹ã¿ã³ã¹åæã«åŒã³åºãããå¹
ãšé«ãã®å€ãåãåã£ãŠã€ã³ã¹ã¿ã³ã¹ã®ããããã£ã«ä»£å
¥ããŸããcalculateAreaã¡ãœããã¯é·æ¹åœ¢ã®é¢ç©ãèšç®ããŠè¿ããŸããrectangle1ã¯Rectangleã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ã§ãããcalculateAreaã¡ãœãããåŒã³åºããŠé¢ç©ãèšç®ãããã®çµæã衚瀺ãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 109,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãPersonã¯ã©ã¹ã«ãã©ã€ããŒããªããããã£nameãšageãå®çŸ©ãããŠããŸããããããã£ã«ã¯å€éšããçŽæ¥ã¢ã¯ã»ã¹ã§ããªããããsetNameãšsetAgeã®ãããªã¡ãœãããçšæããŸãããã®ãããªã¡ãœãããã¢ã¯ã»ãµã¡ãœãããšåŒã³ãŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 110,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãæœè±¡ã¯ã©ã¹ãšã€ã³ã¿ãŒãã§ãŒã¹ã®æŠå¿µã瀺ããŠããŸããShapeã¯ã©ã¹ã¯æœè±¡ã¯ã©ã¹ã§ããããµãã¯ã©ã¹ã§ããCircleã¯ã©ã¹ãcalculateAreaãšcalculatePerimeterã¡ãœãããå®è£
ããŠããŸãããŸããDrawableã€ã³ã¿ãŒãã§ãŒã¹ãå®è£
ããSquareã¯ã©ã¹ã§ã¯ãdrawã¡ãœãããå®çŸ©ããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 111,
"tag": "p",
"text": "Circleã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãäœæããcalculateAreaãšcalculatePerimeterã¡ãœãããåŒã³åºããŠåã®é¢ç©ãšååšãèšç®ããŸãããŸããSquareã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãäœæããdrawã¡ãœãããåŒã³åºããŠåè§åœ¢ãæç»ããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 112,
"tag": "p",
"text": "çµæãšããŠãåã®é¢ç©ãšååšã衚瀺ãããåè§åœ¢ãæç»ãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 113,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãã¯ã©ã¹ã®ç¶æ¿ãšã¡ãœããã®ãªãŒããŒã©ã€ãã®äŸã瀺ããŠããŸããVehicleã¯ã©ã¹ã¯èŠªã¯ã©ã¹ãšããŠå®çŸ©ãããŠãããCarã¯ã©ã¹ãšBicycleã¯ã©ã¹ããããç¶æ¿ããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 114,
"tag": "p",
"text": "Vehicleã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãäœæããdriveã¡ãœãããåŒã³åºããšã\"Driving the Generic vehicle\"ãšè¡šç€ºãããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 115,
"tag": "p",
"text": "Carã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãäœæããdriveã¡ãœãããåŒã³åºããšã\"Driving the Toyota car\"ãšè¡šç€ºãããŸããCarã¯ã©ã¹ã§ã¯@Overrideã¢ãããŒã·ã§ã³ã䜿çšããŠdriveã¡ãœããããªãŒããŒã©ã€ãããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 116,
"tag": "p",
"text": "Bicycleã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãäœæããdriveã¡ãœãããåŒã³åºããšã\"Riding the Giant bicycle\"ãšè¡šç€ºãããŸããåæ§ã«ãBicycleã¯ã©ã¹ã§ãdriveã¡ãœããããªãŒããŒã©ã€ãããŠããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 117,
"tag": "p",
"text": "ããã«ãããç°ãªãã¯ã©ã¹ã芪ã¯ã©ã¹ã®ã¡ãœããããªãŒããŒã©ã€ãããããããã®ç¹å®ã®åäœãå®è¡ããããšãã§ããããã«ãªããŸãã",
"title": "Groovyã®åºç€"
},
{
"paragraph_id": 118,
"tag": "p",
"text": "以äžã¯ãGroovyã®ææ³ãAPIã®äžéšã§ããGroovyã¯Javaã®æ¡åŒµçã§ãããããJavaãšåããããªããžã§ã¯ãæåèšèªãšããŠã®ç¹æ§ãæã£ãŠããŸããGroovyã®æ©èœã掻çšããããšã§ãJavaãããç°¡æœã§è¡šçŸåè±ããªã³ãŒããæžãããšãã§ããŸãããŸããJavaã®ã©ã€ãã©ãªã容æã«äœ¿çšããããšãã§ãããããJavaéçºè
ã«ãšã£ãŠã芪åæ§ãé«ãèšèªãšãªã£ãŠããŸãã",
"title": "ä»é²ïŒGroovyãªãã¡ã¬ã³ã¹"
}
] | Groovyã¯Javaããã°ã©ããŒã«ãšã£ãŠãæè»æ§ãšçç£æ§ãåäžããã匷åãªã¹ã¯ãªããèšèªã§ãããã®èšèªã¯ãJavaã®ã·ã³ã¿ãã¯ã¹ã匷åããããŸããŸãªäŸ¿å©ãªæ©èœãæäŸããŸãããã®æç§æžã§ã¯ãGroovyèšèªã®åºç€ããå¿çšãŸã§ãåºç¯å²ãªãããã¯ã網çŸ
ããŠããŸãã æ¬æžã¯ãGroovyèšèªãç¥ããªãåå¿è
ãããæ¢ã«Javaãçç¥ããŠããããã°ã©ããŒãŸã§ãå¹
åºãèªè
ã«åããŠæžãããŠããŸããåå¿è
ã«ã¯ãåºæ¬çãªææ³ãšæ©èœã玹ä»ããJavaãšã®éããæ確ã«èª¬æããŸãããŸããçµéšè±å¯ãªJavaããã°ã©ããŒã«ã¯ãGroovyã®é«åºŠãªæ©èœããJavaãšã®çžäºéçšæ§ã®å©ç¹ã«çŠç¹ãåœãŠãç« ããããŸãã æ¬æžã§ã¯ãGroovyã®ææ³ãå€æ°ãæŒç®åãã¯ã©ã¹ãã¡ãœãããã³ã¬ã¯ã·ã§ã³ãã¯ããŒãžã£ãã¡ã¿ããã°ã©ãã³ã°ã䞊è¡åŠçãªã©ãããŸããŸãªãããã¯ãæ±ããŸãããŸããGroovyã䜿çšããŠWebã¢ããªã±ãŒã·ã§ã³ãã¹ã¯ãªãããéçºããããã®å®è·µçãªæé ãæäŸããŸãã æ¬æžã¯ãGroovyèšèªã®åºç€ããé«åºŠãªå¿çšãŸã§ãå®å
šãªäžåãšãªã£ãŠããŸããGroovyèšèªã®é
åãçºèŠããJavaéçºã匷åããããã«ããã²æ¬æžã圹ç«ãŠãŠãã ããã | Apache Groovyã¯ãJavaãã©ãããã©ãŒã äžã§åäœãããªããžã§ã¯ãæåã®ã¹ã¯ãªããèšèªã§ãã
Javaãšã®ã·ãŒã ã¬ã¹ãªçµ±åãæäŸããåçåä»ããã¯ããŒãžã£ãªã©ã®æ©èœãåããŠããŸãã
Rubyã«äŒŒãã·ã³ã¿ãã¯ã¹ãæã¡ãJavaã®ã©ã€ãã©ãªããã¬ãŒã ã¯ãŒã¯ãå©çšã§ãããããWebã¢ããªã±ãŒã·ã§ã³ããã«ãã¹ã¯ãªããããã¹ããããŒã¿åŠçãªã©ãå¹
åºãçšéã§æŽ»çšãããŠããŸãã
== Groovyã®åºç€ ==
=== Groovyãšã¯äœã ===
Apache GroovyïŒã°ã«ãŒãŽã£ãŒïŒã¯ãJavaãã©ãããã©ãŒã äžã§åäœããåçãªã¹ã¯ãªããèšèªã§ãJavaèšèªãšå¯æ¥ã«é¢é£ããŠããŸãããã®èšèªã¯ãJavaã®æ©èœã«ã¢ã¯ã»ã¹ã§ããã ãã§ãªããç°¡åã§çŽæçãªæ§æããã€ãããã¯ãªåä»ããã¯ããŒãžã£ãªã©ãä»ã®å€ãã®ããã°ã©ãã³ã°èšèªã®ç¹åŸŽãçµã¿åãããŠããŸãã
Groovyã¯ãJavaã³ãŒããç°¡çŽ åããå¯èªæ§ãé«ããããã«èšèšãããŠãããJavaã®æ©èœã掻çšããªãããéçºè
ãããå¹ççã«ã³ãŒããèšè¿°ã§ããããã«ããããšãç®çãšããŠããŸãããŸããJavaãšã®ã·ãŒã ã¬ã¹ãªçµ±åæ§ãåããŠãããJavaã¯ã©ã¹ãæ¡åŒµããJavaã³ãŒãã«å¯ŸããŠGroovyã³ãŒãã䜿çšã§ããŸãã
Apache Groovyã¯ãApacheãœãããŠã§ã¢è²¡å£ã«ãã£ãŠç®¡çãããŠããããªãŒãã³ãœãŒã¹ã§å
¬éãããŠããŸãããã®èšèªã¯ãJavaéçºè
ãã·ã¹ãã 管çè
ãããã°ããŒã¿åæè
ãªã©ãããŸããŸãªãŠãŒã¶ãŒã«ãšã£ãŠäººæ°ã®ããéžæè¢ã§ãã
;Groovyã®ç¹åŸŽ
;å€æ°
:Groovyã§ã¯ãå€æ°ã®å®£èšã«ã¯ããã€ãã®æ¹æ³ããããŸãã以äžã«ãã®ããã€ãã®äŸã瀺ããŸãã
:<syntaxhighlight lang=groovy>
def x = 10 // åçåä»ããããå€æ°
String name = "John" // éçåä»ããããå€æ°
final int MAX_VALUE = 100 // äžå€ã®å€æ°
</syntaxhighlight>
;æåå: æååã¯ãã·ã³ã°ã«ã¯ã©ãŒããŸãã¯ããã«ã¯ã©ãŒãã§å²ãŸããããã¹ãã§ããããã«ã¯ã©ãŒãã®å ŽåãåŒãå±éããããšãã§ããŸãã
:<syntaxhighlight lang=groovy>
def name = "John"
def message = "Hello ${name}"
</syntaxhighlight>
;ãªã¹ã: ãªã¹ãã¯ãèŠçŽ ã®ã³ã¬ã¯ã·ã§ã³ã§ããGroovyã®ãªã¹ãã¯ãæ¬åŒ§ã§å²ãŸããã«ã³ãåºåãã®èŠçŽ ã®ãªã¹ããšããŠè¡šãããŸãã
:<syntaxhighlight lang=groovy>
def numbers = [1, 2, 3, 4, 5]
</syntaxhighlight>
;ããã: ãããã¯ãããŒãšå€ã®ãã¢ã®ã³ã¬ã¯ã·ã§ã³ã§ããGroovyã®ãããã¯ãæ¬åŒ§ã§å²ãŸããããŒãšå€ã®ãã¢ã®ãªã¹ããšããŠè¡šãããŸãã
:<syntaxhighlight lang=groovy>
def person = [ name: "John", age: 30 ]
</syntaxhighlight>
;å¶åŸ¡æ§æ: Groovyã¯ãJavaãšåæ§ã®å¶åŸ¡æ§æããµããŒãããŠããŸããããã«ã¯ãifãforãwhileãªã©ãå«ãŸããŸãã
:<syntaxhighlight lang=groovy>
def age = 30
if (age >= 18) {
println "You are an adult"
} else {
println "You are a minor"
}
</syntaxhighlight>
;ã¡ãœãã: ã¡ãœããã¯ãGroovyã¹ã¯ãªããå
ã§åå©çšå¯èœãªã³ãŒããããã¯ã§ããã¡ãœããã¯ãdefããŒã¯ãŒãã§å®£èšãããŸãã
:<syntaxhighlight lang=groovy>
def sayHello(name) {
println "Hello ${name}"
}
sayHello("John")
</syntaxhighlight>
;ã¯ããŒãžã£: ã¯ããŒãžã£ã¯ãé¢æ°ãå€ãšããŠæ±ãããšãã§ããŸããGroovyã®ã¯ããŒãžã£ã¯ãæ³¢æ¬åŒ§ã§å²ãŸããåŒæ°ãšæ¬æã§å®çŸ©ãããŸãã
:<syntaxhighlight lang=groovy>
def closure = { name ->
println "Hello ${name}"
}
closure("John")
</syntaxhighlight>
;ã¯ã©ã¹: Groovyã¯ãJavaãšåæ§ã«ãªããžã§ã¯ãæåèšèªã§ãããããã¯ã©ã¹ããµããŒãããŠããŸãã
:;[https://onecompiler.com/groovy/3z2rq8f7p ã¯ã©ã¹ãçšããã³ãŒãäŸ]:<syntaxhighlight lang=groovy>
class Person {
String name
int age
Person(String name, int age) {
this.name = name
this.age = age
}
void sayHello() {
println "Hello, my name is ${name} and I am ${age} years old."
}
}
def person = new Person("John", 30)
person.sayHello()
</syntaxhighlight>
{{ã³ã©ã |RubyãšGroovyã®æ¯èŒ|2=RubyãšGroovyã®äž»ãªéããããã€ã瀺ããŸãã
#ææ³ïŒRubyã¯ãGroovyãããæŽã«ç°¡æœãªææ³ãæã¡ãã³ãŒãã®æžãæ¹ãèªç±åºŠãé«ãã§ãããŸããRubyã¯ãåçãªåä»ãã®èšèªã§ãããGroovyãšåæ§ã«ã©ã³ã¿ã€ã æã«åãšã©ãŒãæ€åºãããŸãã
#é¢æ°åããã°ã©ãã³ã°ïŒRubyã¯ãé¢æ°åããã°ã©ãã³ã°ã®ç¹åŸŽãæã¡ãç°¡æœãªã³ãŒãã§é«åºŠãªåŠçãå¯èœã§ããäžæ¹ãGroovyã¯ããªããžã§ã¯ãæåããã°ã©ãã³ã°ãäžå¿ãšãªã£ãŠããŸãã
#ã¡ã¿ããã°ã©ãã³ã°ïŒRubyã¯ãGroovyãšåæ§ã«åŒ·åãªã¡ã¿ããã°ã©ãã³ã°æ©èœãæäŸããŠããŸããRubyã®ã¡ã¿ããã°ã©ãã³ã°æ©èœã¯ãéåžžã«åŒ·åã§ãããDSLïŒDomain-Specific LanguageïŒã®éçºã«ãåããŠããŸãã
#å®è¡é床ïŒRubyã¯ãGroovyãããå®è¡é床ãé
ãã倧èŠæš¡ãªã¢ããªã±ãŒã·ã§ã³ã«ã¯åããªãå ŽåããããŸããäžæ¹ãRubyã¯ãé«ãçç£æ§ãæã¡ãçãæéã§ã³ãŒããæžãããšãã§ããŸãã
#ã³ãŒãã£ã³ã°ã¹ã¿ã€ã«ïŒRubyã¯ãGroovyãšåæ§ã«æè»ãªã¹ã¿ã€ã«ã§ã³ãŒãã£ã³ã°ã§ããŸãããã ããRubyã«ã¯ç¬èªã®ã¹ã¿ã€ã«ããããåå¿è
ã«ã¯åŠç¿ã³ã¹ãããããå ŽåããããŸãã
ç·ããŠãRubyã¯ç°¡æœã§æè»ãªææ³ãç¹åŸŽçã§ãããã¡ã¿ããã°ã©ãã³ã°ã«åŒ·ããšãã£ãç¹åŸŽããããŸããäžæ¹ãGroovyã¯ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãäžå¿ãšãªã£ãŠãããDSLã®éçºã«ã¯åããŠããŸããã©ã¡ãã®èšèªãéžæãããã¯ããããžã§ã¯ãã®æ§è³ªãç®çã«ãã£ãŠç°ãªããŸãã
}}
=== Groovyã®ã€ã³ã¹ããŒã«ãšèšå® ===
Groovyã®éçºã«ã¯JREãŸãã¯JDKãå¿
èŠã§ãããŸããJREãŸãã¯JDKãã€ã³ã¹ããŒã«ããŠãã ããã
{{Main|Java/ããã°ã©ãã³ã°ã®ããã®æºå}}
Groovyã¯Apacheã®Webãµã€ãããããŠã³ããŒãã§ããŸãã以äžã®æé ã«åŸã£ãŠãGroovyãã€ã³ã¹ããŒã«ããŠãã ããã
#[https://groovy-lang.org/ Groovyã®Webãµã€ã]ã«ã¢ã¯ã»ã¹ãã[https://groovy.apache.org/download.html GroovyããŠã³ããŒãããŒãž]ã«ç§»åããŸãã
#ããŠã³ããŒãããŒãžã§ãææ°ã®ããŒãžã§ã³ãéžæããŸããzipãã¡ã€ã«åœ¢åŒã䜿çšããããšããå§ãããŸãã
#ããŠã³ããŒããéå§ããåã«ãApacheã¢ã«ãŠã³ãã«ãµã€ã³ã¢ããããå¿
èŠãããå ŽåããããŸããã¢ã«ãŠã³ããæã£ãŠããªãå Žåã¯ãæ°èŠç»é²ããŠãã ããã
#zipãã¡ã€ã«ãããŠã³ããŒãããé©åœãªãã£ã¬ã¯ããªã«å±éããŸãã
#ç°å¢å€æ°ãèšå®ããŸããPATHç°å¢å€æ°ã«Groovyã®binãã©ã«ããžã®ãã¹ãè¿œå ããŸãã
{{ã³ã©ã |JavaãšGroovyã®æ¯èŒ|2=JavaãšGroovyã¯ãäž¡æ¹ãšãJavaä»®æ³ãã·ã³ïŒJVMïŒäžã§å®è¡ããããªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã§ãã以äžã«ãJavaãšGroovyã®äž»ãªéããããã€ã瀺ããŸãã
#ææ³ïŒJavaã¯ãéçãªåä»ãã®èšèªã§ãããã³ã³ãã€ã«æã«åãšã©ãŒãæ€åºã§ããŸããäžæ¹ãGroovyã¯åçãªåä»ãã®èšèªã§ãããã©ã³ã¿ã€ã æã«åãšã©ãŒãæ€åºãããŸããGroovyã¯ãJavaãããç°¡æœãªææ³ãæã¡ãã³ãŒãã®æžãæ¹ãèªç±åºŠãé«ãã§ãã
#ã³ãŒãã®éïŒGroovyã¯ãJavaãããçããã³ãŒãã®æžãæ¹ãèªç±åºŠãé«ããããåãæ©èœãå®çŸããããã®ã³ãŒãã®éãå°ãªããŠæžãå ŽåããããŸãã
#ã¡ã¿ããã°ã©ãã³ã°ïŒGroovyã¯ãJavaããã匷åãªã¡ã¿ããã°ã©ãã³ã°æ©èœãæäŸããŠããŸããã¡ã¿ããã°ã©ãã³ã°ãšã¯ãããã°ã©ã ãèªå·±ä¿®æ£ããããšãã§ããæ©èœã®ããšã§ãGroovyã¯Javaã«æ¯ã¹ãŠã¡ã¿ããã°ã©ãã³ã°ãç°¡åã«å®çŸã§ããŸãã
#å®è¡é床ïŒJavaã¯ãã³ã³ãã€ã«æã«æé©åããããããå®è¡é床ãéãã倧èŠæš¡ãªã¢ããªã±ãŒã·ã§ã³ã«é©ããŠããŸããäžæ¹ãGroovyã¯ãåçåä»ãã®ãããå®è¡é床ãé
ãå ŽåããããŸãã
#ã³ãŒãã£ã³ã°ã¹ã¿ã€ã«ïŒJavaã¯ãã³ãŒãã®ã¹ã¿ã€ã«ãçµ±äžããããã®å€ãã®èŠåããããŸãããGroovyã¯ãæè»ãªã¹ã¿ã€ã«ã§ã³ãŒãã£ã³ã°ã§ããŸãã
ç·ããŠãJavaã¯å€§èŠæš¡ãªã¢ããªã±ãŒã·ã§ã³ã«é©ããŠãããGroovyã¯ç°¡æœã§èªç±ãªææ³ãç¹åŸŽçã§ãã¡ã¿ããã°ã©ãã³ã°ã«åŒ·ããšãã£ãç¹åŸŽããããŸããã©ã¡ãã®èšèªãéžæãããã¯ããããžã§ã¯ãã®æ§è³ªãç®çã«ãã£ãŠç°ãªããŸãã
}}
=== å€æ°ãšããŒã¿å ===
Groovyã§ã¯ãå€æ°ãšããŒã¿åã«ã€ããŠä»¥äžã®ããã«èª¬æã§ããŸãïŒ
# åçåä»ããªå€æ°: Groovyã¯åçåä»ãèšèªã§ããå€æ°ã宣èšããéã«ããã®åãæ瀺çã«æå®ããå¿
èŠã¯ãããŸãããå€æ°ã«ä»£å
¥ãããå€ã«ãã£ãŠããã®åãèªåçã«æ±ºå®ãããŸããäŸãã°ïŒ
#:<syntaxhighlight lang=groovy>
def x = 10 // åçåä»ããããå€æ°
x = "ABC" // å¯èœ
</syntaxhighlight>
# éçåä»ããªå€æ°: éçåä»ãããµããŒããããŠãããå€æ°å®£èšæã«åãæ瀺çã«æå®ããããšãã§ããŸãããã®å Žåãå€æ°ã¯ãã®åã®å€ããåãä»ããŸãããäŸãã°ïŒ
#:<syntaxhighlight lang=groovy>
String name = "John" // éçåä»ããããå€æ°
// name = 42 // ã³ã³ãã€ã«ãšã©ãŒ
</syntaxhighlight>
# ããŒã¿å: Groovyã¯Javaãšåãããããªããã£ãåããªããžã§ã¯ãåããµããŒãããŠããŸããäŸãã°ãæŽæ°å<code>int</code>ãæååå<code>String</code>ããªã¹ãå<code>List</code>ããããå<code>Map</code>ãªã©ããããŸããGroovyã¯ãããã®ããŒã¿åãæè»ã«äœ¿çšããããšãã§ããŸãã
==== ããŒã¿å ====
Groovyã¯åçåä»ãèšèªã§ãããå€æ°ã®åãäºåã«å®£èšããå¿
èŠã¯ãããŸãããå€æ°ã®å€ã«åºã¥ããŠãèªåçã«é©åãªããŒã¿åãå²ãåœãŠãããŸãã
äž»ãªããŒã¿åã«ã¯ä»¥äžã®ãããªãã®ããããŸãïŒ
*æŽæ°åïŒIntegerïŒïŒæŽæ°å€ãæ ŒçŽããããã®ããŒã¿åã§ãã
*æµ®åå°æ°ç¹åïŒDoubleïŒïŒæµ®åå°æ°ç¹æ°ãæ ŒçŽããããã®ããŒã¿åã§ãã
*æåååïŒStringïŒïŒããã¹ãããŒã¿ãæ ŒçŽããããã®ããŒã¿åã§ãã
*ããŒã«åïŒBooleanïŒïŒçåœå€ïŒtrueãŸãã¯falseïŒãæ ŒçŽããããã®ããŒã¿åã§ãã
以äžã¯ãããããã®ããŒã¿åã®äŸã§ãïŒ
以äžã¯ãGroovyã§äœ¿çšãããäž»èŠãªåãšãã®ãªãã©ã«ã®äŸãããã³è§£èª¬ã衚圢åŒã§ç€ºãããã®ã§ãïŒ
:{| class="sortable wikitable"
|+ Groovyã®äž»èŠãªå
!å
!ãªãã©ã«äŸ
!解説
|-
!int
| 10, 0b1010, 012
| æŽæ°åãåºæ°10ïŒ10é²æ°ïŒãåºæ°2ïŒ2é²æ°ïŒãåºæ°8ïŒ8é²æ°ïŒ
|-
!Integer
| 10, 0b1010, 012
| æŽæ°ãªããžã§ã¯ãåãintåã®ã©ãããŒã¯ã©ã¹
|-
!long
| 100L, 0x64L
| é·æŽæ°åãåºæ°10ïŒ10é²æ°ïŒãåºæ°16ïŒ16é²æ°ïŒ
|-
!Long
| 100L, 0x64L
| é·æŽæ°ãªããžã§ã¯ãåãlongåã®ã©ãããŒã¯ã©ã¹
|-
!double
| 3.14, 6.02e23
| æµ®åå°æ°ç¹æ°åãéåžžã®å°æ°ãææ°è¡šèš
|-
!Double
| 3.14, 6.02e23
| æµ®åå°æ°ç¹æ°ãªããžã§ã¯ãåãdoubleåã®ã©ãããŒã¯ã©ã¹
|-
!float
| 3.14f, 6.02e23f
| å粟床浮åå°æ°ç¹æ°åãæ«å°Ÿã«"f"ãä»ããå Žåã¯floatå
|-
!Float
| 3.14f, 6.02e23f
| å粟床浮åå°æ°ç¹æ°ãªããžã§ã¯ãåãfloatåã®ã©ãããŒã¯ã©ã¹
|-
!boolean
| true, false
| çåœå€åã
|-
!Boolean
| true, false
| çåœå€ãªããžã§ã¯ãåãbooleanåã®ã©ãããŒã¯ã©ã¹
|-
!char
| 'A', '\u0041'
| æååãã·ã³ã°ã«ã¯ã©ãŒãã§å²ãã§æåãè¡šçŸãUnicodeè¡šçŸãå¯
|-
!Character
| 'A', '\u0041'
| æåãªããžã§ã¯ãåãcharåã®ã©ãããŒã¯ã©ã¹
|-
!String
| "Hello, World!"
| æåååã
|-
!List
| [1, 2, 3]
| ãªã¹ããå¯å€é·é
åã
|-
!Map
| [name: "John"]
| ããããããŒãšå€ã®ãã¢ã®ã³ã¬ã¯ã·ã§ã³ã
|-
!Set
| [1, 2, 3] as Set
| éåãéè€ãèš±ããªãå€ã®ã³ã¬ã¯ã·ã§ã³ã
|-
!Date
| new Date(), new Date(2022, 1, 1)
| æ¥ä»åãçŸåšæ¥æãæå®ããæ¥æãè¡šçŸã
|-
!LocalDate
| LocalDate.now(), LocalDate.of(2022, 2, 5)
| æ¥ä»åãJDKã®LocalDateã¯ã©ã¹ãšåæ§ã
|-
!LocalDateTime
| LocalDateTime.now(), LocalDateTime.of(2022, 2, 5, 12, 30)
| æ¥æåãJDKã®LocalDateTimeã¯ã©ã¹ãšåæ§ã
|}
:ãããã®åã¯ãGroovyã§åºã䜿çšãããJavaã®æšæºã©ã€ãã©ãªãšã®äºææ§ããããŸããGroovyã¯ãããã®åã®ãªãã©ã«ã䜿ã£ãŠæè»ã«ããŒã¿ãæäœã§ããã®ãç¹åŸŽã§ãã
==== åã®å€æ ====
Groovyã§ã¯ãç°ãªãããŒã¿åã®éã§å€ãå€æããããšãã§ããŸãããããåãã£ã¹ããšåŒã³ãŸãã以äžã¯ãããã€ãã®åºæ¬çãªåãã£ã¹ãã®äŸã§ãã
æŽæ°ããæååãžã®å€æïŒ
:<syntaxhighlight lang=groovy>
// toString()ã¡ãœããã䜿ãæ¹æ³:
// æŽæ°ãªããžã§ã¯ãã«å¯ŸããŠtoString()ã¡ãœãããåŒã³åºãããšã§ãæååã«å€æã§ããŸãã
def num = 123
def str = num.toString()
println str // åºå: "123"
// asããŒã¯ãŒãã䜿ãæ¹æ³:
// asããŒã¯ãŒãã䜿ã£ãŠæŽæ°ãæååã«ãã£ã¹ãããæ¹æ³ããããŸãã
num = 456
str = num as String
println str // åºå: "456"
// GString (Groovyæåå)ã䜿ãæ¹æ³:
// GStringã䜿ã£ãŠãæŽæ°ãæååã«å€æããããšãã§ããŸãããã®æ¹æ³ã§ã¯ãæŽæ°ãæååã®äžã«åã蟌ãããšãã§ããŸãã
num = 789
str = "$num"
println str // åºå: "789"
</syntaxhighlight>
æååããæŽæ°ãžã®å€æïŒ
:<syntaxhighlight lang=groovy>
// toInteger()ã¡ãœããã䜿ãæ¹æ³:
// æååãªããžã§ã¯ãã«å¯ŸããŠtoInteger()ã¡ãœãããåŒã³åºãããšã§ãæŽæ°ã«å€æã§ããŸãã
def str = "123"
def num = str.toInteger()
println num // åºå: 123
// asããŒã¯ãŒãã䜿ãæ¹æ³:
// asããŒã¯ãŒãã䜿ã£ãŠæååãæŽæ°ã«ãã£ã¹ãããæ¹æ³ããããŸãã
str = "456"
num = str as Integer
println num // åºå: 456
// Integer.parseInt()ã¡ãœããã䜿ãæ¹æ³:
// Integer.parseInt()ã¡ãœããã䜿ã£ãŠæååãæŽæ°ã«å€æããæ¹æ³ããããŸãã
str = "789"
num = Integer.parseInt(str)
println num // åºå: 789</syntaxhighlight>
æååããæµ®åå°æ°ç¹æ°ãžã®å€æïŒ
:<syntaxhighlight lang=groovy>
// toDouble()ã¡ãœããã䜿ãæ¹æ³:
// æååãªããžã§ã¯ãã«å¯ŸããŠtoDouble()ã¡ãœãããåŒã³åºãããšã§ãæµ®åå°æ°ç¹æ°ã«å€æã§ããŸãã
def str = "3.14"
def num = str.toDouble()
println num // åºå: 3.14
// asããŒã¯ãŒãã䜿ãæ¹æ³:
// asããŒã¯ãŒãã䜿ã£ãŠæååãæµ®åå°æ°ç¹æ°ã«ãã£ã¹ãããæ¹æ³ããããŸãã
str = "6.02e23"
num = str as Double
println num // åºå: 6.02E23
// Double.parseDouble()ã¡ãœããã䜿ãæ¹æ³:
// Double.parseDouble()ã¡ãœããã䜿ã£ãŠæååãæµ®åå°æ°ç¹æ°ã«å€æããæ¹æ³ããããŸãã
str = "2.71828"
num = Double.parseDouble(str)
println num // åºå: 2.71828
</syntaxhighlight>
==== å€æ°ã®å代å
¥ ====
Groovyã§ã¯ãå€æ°ã«ã¯æ°ããå€ãå代å
¥ããããšãã§ããŸããå€æ°ã®å€ãå€æŽããã«ã¯ãå€æ°åãæå®ããŠæ°ããå€ã代å
¥ããŸãã
:<syntaxhighlight lang=groovy>
def x = 10 // å€æ°xã«åæå€10ã代å
¥ãã
println x // åºå: 10
x = 20 // å€æ°xã«æ°ããå€20ã代å
¥ããŠå代å
¥ãã
println x // åºå: 20
</syntaxhighlight>
ãã®äŸã§ã¯ãæåã«å€æ°<code>x</code>ã«å€<code>10</code>ã代å
¥ããã次ã«åãå€æ°<code>x</code>ã«æ°ããå€<code>20</code>ã代å
¥ãããŠããŸããå代å
¥ã«ãããå€æ°<code>x</code>ãåç
§ããå€ãå€æŽãããçµæãšããŠ<code>20</code>ãåºåãããŸãã
Groovyã®æè»ãªä»£å
¥ããã³å代å
¥ã®æ©èœã«ãããå€æ°ã®å€ãç°¡åã«å€æŽã§ããŸãã
==== å®æ° ====
Groovyã§ã¯ãå€ãå€æŽã§ããªãå®æ°ã宣èšããããšãã§ããŸããå®æ°ã¯finalããŒã¯ãŒãã䜿çšããŠå®£èšãããåæåãããåŸã«å€ãå€æŽããããšã¯ã§ããŸããã
:<syntaxhighlight lang=groovy>
final int MAX_NUMBER = 100
</syntaxhighlight>
==== ãŸãšã ====
:<syntaxhighlight lang=groovy line>
Integer i = 42 // æŽæ°å
Double f = 3.14 // æµ®åå°æ°ç¹å
String s = "Hello, World!" // æååå
Boolean b = true // ããŒã«å
def q // æªåæå org.codehaus.groovy.runtime.NullObject
def number = 10 // java.lang.Integerãšæšè«
def pi = 3.14 // java.math.BigDecimalãšæšè«
def message = "Hello, World!" // java.lang.Stringãšæšè«
final int MAX_NUMBER = 100 // æŽæ°å®æ°
[i, f, s, b, q, number, pi, message, MAX_NUMBER].each{
println it.inspect() + ': ' + it.getClass()
}
</syntaxhighlight>
;å®è¡çµæ:<syntaxhighlight lang=text>
42: class java.lang.Integer
3.14: class java.lang.Double
'Hello, World!': class java.lang.String
true: class java.lang.Boolean
null: class org.codehaus.groovy.runtime.NullObject
10: class java.lang.Integer
3.14: class java.math.BigDecimal
'Hello, World!': class java.lang.String
100: class java.lang.Integer
</syntaxhighlight>
1è¡ç®ãã4è¡ç®ãŸã§ã¯ãããŸããŸãªåã®å€æ°ã®å®£èšãšåæåãè¡ãããŠããŸãã
* <code>Integer i = 42</code>ã¯ãæŽæ°åã®å€æ°<code>i</code>ã宣èšããå€42ã§åæåããŠããŸãã
* <code>Double f = 3.14</code>ã¯ãæµ®åå°æ°ç¹åã®å€æ°<code>f</code>ã宣èšããå€3.14ã§åæåããŠããŸãã
* <code>String s = "Hello, World!"</code>ã¯ãæåååã®å€æ°<code>s</code>ã宣èšããå€"Hello, World!"ã§åæåããŠããŸãã
* <code>Boolean b = true</code>ã¯ãããŒã«åã®å€æ°<code>b</code>ã宣èšããå€trueã§åæåããŠããŸãã
6è¡ç®ãã10è¡ç®ã§ã¯ãå€æ°ã®åæšè«ã瀺ãããŠããŸããGroovyã§ã¯<code>def</code>ããŒã¯ãŒãã䜿çšããŠåæšè«ãè¡ãããšãã§ããŸãã
* <code>def q</code>ã¯æªåæåã®å€æ°<code>q</code>ã宣èšããŠããŸããGroovyã§ã¯åæåãããŠããªãå€æ°ã¯<code>org.codehaus.groovy.runtime.NullObject</code>ãšããŠæ±ãããŸãã
* <code>def number = 10</code>ã¯ãå€æ°<code>number</code>ã宣èšããå€10ã§åæåããŠããŸããGroovyã¯æšè«ã«ãã<code>java.lang.Integer</code>ã®åãšå€æããŸãã
* <code>def pi = 3.14</code>ã¯ãå€æ°<code>pi</code>ã宣èšããå€3.14ã§åæåããŠããŸããGroovyã¯æšè«ã«ãã<code>java.math.BigDecimal</code>ã®åãšå€æããŸãã
* <code>def message = "Hello, World!"</code>ã¯ãå€æ°<code>message</code>ã宣èšããå€"Hello, World!"ã§åæåããŠããŸããGroovyã¯æšè«ã«ãã<code>java.lang.String</code>ã®åãšå€æããŸãã
æåŸã®è¡ã§ã¯ãé
åã«ãããã®èŠçŽ ããŸãšãã<code>each</code>ã¡ãœããã䜿çšããŠåèŠçŽ ã«å¯ŸããŠåŠçãè¡ã£ãŠããŸãã
åèŠçŽ ã<code>inspect()</code>ã¡ãœããã§æååè¡šçŸã«å€æããããã«ã¯ã©ã¹æ
å ±ãè¿œå ããŠåºåããŠããŸãããã®éšåã¯åèŠçŽ ã®åã確èªããããã®ãããã°ç®çã®ã³ãŒãã§ãã
äžèšã®ã³ãŒããå®è¡ãããšãåå€æ°ã®å€ãšåãåºåãããŸããäŸãã°ã<code>i</code>ã®åºåã¯<code>42: class java.lang.Integer</code>ãšãªããŸãã
=== æŒç®åãšåŒ ===
:<syntaxhighlight lang=groovy>
// æ°å€æŒç®
def a = 10
def b = 3
def sum = a + b
def difference = a - b
def product = a * b
def quotient = a / b
def modulus = a % b
println "Sum: " + sum
println "Difference: " + difference
println "Product: " + product
println "Quotient: " + quotient
println "Modulus: " + modulus
// æååé£çµ
def message1 = "Hello"
def message2 = "World"
def greeting = message1 + ", " + message2
println "Greeting: " + greeting
// è«çæŒç®
def x = true
def y = false
def andResult = x && y
def orResult = x || y
def notResult = !x
println "AND Result: " + andResult
println "OR Result: " + orResult
println "NOT Result: " + notResult
// æ¯èŒæŒç®
def num1 = 5
def num2 = 8
def isEqual = num1 == num2
def isNotEqual = num1 != num2
def isGreater = num1 > num2
def isLess = num1 < num2
println "Is Equal: " + isEqual
println "Is Not Equal: " + isNotEqual
println "Is Greater: " + isGreater
println "Is Less: " + isLess
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ãGroovyã§äœ¿çšãããäžè¬çãªæŒç®åã玹ä»ããŠããŸãã
æ°å€æŒç®ã§ã¯ãå ç®(<code>+</code>)ãæžç®(<code>-</code>)ãä¹ç®(<code>*</code>)ãé€ç®(<code>/</code>)ãå°äœ(<code>%</code>)ã®æŒç®åã䜿çšãããŠããŸãã
æååé£çµã§ã¯ãæååå士ã<code>+</code>æŒç®åã§çµåããŠããŸãã
è«çæŒç®ã§ã¯ãè«çç©(<code>&&</code>)ãè«çå(<code>||</code>)ãåŠå®(<code>!</code>)ã®æŒç®åã䜿çšãããŠããŸãã
æ¯èŒæŒç®ã§ã¯ãçãããã©ãã(<code>==</code>)ãçãããªããã©ãã(<code>!=</code>)ã倧ãããã©ãã(<code>></code>)ãå°ãããã©ãã(<code><</code>)ã®æŒç®åã䜿çšãããŠããŸãã
åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽããã<code>println</code>æã䜿çšããŠçµæãåºåãããŸãã
:<syntaxhighlight lang=groovy>
// 代å
¥æŒç®å
def x = 5
x += 3 // x = x + 3
println "x: " + x // çµæ: 8
def y = 10
y -= 4 // y = y - 4
println "y: " + y // çµæ: 6
def z = 2
z *= 5 // z = z * 5
println "z: " + z // çµæ: 10
def a = 15
a /= 3 // a = a / 3
println "a: " + a // çµæ: 5
def b = 7
b %= 4 // b = b % 4
println "b: " + b // çµæ: 3
// ã€ã³ã¯ãªã¡ã³ããšãã¯ãªã¡ã³ã
def count = 5
count++ // ã€ã³ã¯ãªã¡ã³ã
println "Count after increment: " + count // çµæ: 6
count-- // ãã¯ãªã¡ã³ã
println "Count after decrement: " + count // çµæ: 5
// äžé
æŒç®å
def score = 80
def result = (score >= 70) ? "Pass" : "Fail"
println "Result: " + result // çµæ: Pass
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ãããŸããŸãªæŒç®åãšæŒç®åã®çµã¿åããã瀺ãããŠããŸãã
代å
¥æŒç®åã§ã¯ãå ç®ä»£å
¥(<code>+=</code>)ãæžç®ä»£å
¥(<code>-=</code>)ãä¹ç®ä»£å
¥(<code>*=</code>)ãé€ç®ä»£å
¥(<code>/=</code>)ãå°äœä»£å
¥(<code>%=</code>)ã®æŒç®åã䜿çšãããŠããŸãã
ã€ã³ã¯ãªã¡ã³ã(<code>++</code>)ãšãã¯ãªã¡ã³ã(<code>--</code>)ã¯ãå€æ°ã®å€ã1ã€å¢ãããŸãã¯æžããããã«äœ¿çšãããŸãã
äžé
æŒç®å(<code>?:</code>)ã¯ãæ¡ä»¶åŒã®çµæã«åºã¥ããŠç°ãªãå€ãè¿ãããã«äœ¿çšãããŸããæ¡ä»¶ãçã®å Žåã¯æåã®å€ããåœã®å Žåã¯2çªç®ã®å€ã代å
¥ãããŸãã
åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽããã<code>println</code>æã䜿çšããŠçµæãåºåãããŸãã
:<syntaxhighlight lang=groovy>
// æååæ¯èŒ
def str1 = "apple"
def str2 = "banana"
def isEqualStr = str1 == str2
def isNotEqualStr = str1 != str2
println "Is Equal (Strings): " + isEqualStr // çµæ: false
println "Is Not Equal (Strings): " + isNotEqualStr // çµæ: true
// è«çæŒç®åã®ã·ã§ãŒããµãŒããã
def p = true
def q = false
def logicalAnd = p && q
def logicalOr = p || q
println "Logical AND: " + logicalAnd // çµæ: false
println "Logical OR: " + logicalOr // çµæ: true
// æŒç®åã®åªå
é äœ
def x = 5
def y = 3
def z = 2
def result1 = x + y * z
def result2 = (x + y) * z
println "Result 1: " + result1 // çµæ: 11
println "Result 2: " + result2 // çµæ: 16
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ãããŸããŸãªæŒç®åãšãã®äœ¿çšæ³ã瀺ãããŠããŸãã
æååæ¯èŒã§ã¯ã<code>==</code>æŒç®åãš<code>!=</code>æŒç®åã䜿çšããŠã2ã€ã®æååãçãããã©ãããæ¯èŒããŠããŸãã
è«çæŒç®åã®ã·ã§ãŒããµãŒãããã§ã¯ã<code>&&</code>æŒç®åãš<code>||</code>æŒç®åã䜿çšããŠãè«çç©ãšè«çåãè©äŸ¡ããŠããŸãã
æŒç®åã®åªå
é äœã§ã¯ãä¹ç®(<code>*</code>)ãå ç®(<code>+</code>)ãããåªå
ãããããšã瀺ããŠããŸãã<code>result1</code>ã®èšç®ã§ã¯ãä¹ç®ãå
ã«è©äŸ¡ããã<code>result2</code>ã®èšç®ã§ã¯æ¬åŒ§ãåªå
ãããŸãã
åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽããã<code>println</code>æã䜿çšããŠçµæãåºåãããŸãã
:<syntaxhighlight lang=groovy>
// äžé
æŒç®åã®ãã¹ã
def age = 25
def isAdult = (age >= 18) ? "Adult" : ((age >= 13) ? "Teenager" : "Child")
println "Age Group: " + isAdult // çµæ: Adult
// nullå®å
šæŒç®å
def text = "Hello"
def length = text?.length()
println "Length: " + length // çµæ: 5
def nullText = null
def nullLength = nullText?.length()
println "Null Length: " + nullLength // çµæ: null
// Elvis æŒç®å
def name = null
def displayName = name ?: "John Doe"
println "Display Name: " + displayName // çµæ: John Doe
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ãGroovyã®ç¹æ®ãªæŒç®åã§ããäžé
æŒç®åã®ãã¹ããnullå®å
šæŒç®åãããã³ElvisæŒç®åã®äœ¿çšäŸã瀺ãããŠããŸãã
äžé
æŒç®åã®ãã¹ãã§ã¯ã幎霢ã«åºã¥ããŠç°ãªãçµæãè¿ãè€éãªæ¡ä»¶åå²ãè¡ãããŠããŸãã
nullå®å
šæŒç®å(<code>?.</code>)ã¯ãnullå®å
šãªåŒã³åºããè¡ããŸããããå€æ°ãnullã§ããã°ãã¡ãœããåŒã³åºããããããã£ã¢ã¯ã»ã¹ã¯ç¡èŠãããçµæã¯nullã«ãªããŸãã
ElvisæŒç®å(<code>?:</code>)ã¯ãå€æ°ãnullã§ããå Žåã«ä»£æ¿ã®å€ãè¿ãããã«äœ¿çšãããŸããå€æ°ãnullã§ãªããã°ããã®å€ã䜿çšãããŸãã
åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽããã<code>println</code>æã䜿çšããŠçµæãåºåãããŸãã
:<syntaxhighlight lang=groovy>
// é
åæŒç®å
def numbers = [1, 2, 3, 4, 5]
def names = ["Alice", "Bob", "Charlie"]
def firstNumber = numbers[0]
def lastNumber = numbers[-1]
def nameLength = names[1].length()
println "First Number: " + firstNumber // çµæ: 1
println "Last Number: " + lastNumber // çµæ: 5
println "Name Length: " + nameLength // çµæ: 3
// ãªã¹ãçµåæŒç®å
def list1 = [1, 2, 3]
def list2 = [4, 5, 6]
def mergedList = list1 + list2
println "Merged List: " + mergedList // çµæ: [1, 2, 3, 4, 5, 6]
// æååæŒç®å
def greeting = "Hello, " + "World!"
println "Greeting: " + greeting // çµæ: Hello, World!
// instanceofæŒç®å
def obj1 = "Hello"
def obj2 = 42
def isString = obj1 instanceof String
def isNumber = obj2 instanceof Number
println "Is String: " + isString // çµæ: true
println "Is Number: " + isNumber // çµæ: true
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ãé
åæŒç®åããªã¹ãçµåæŒç®åãæååæŒç®åãããã³instanceofæŒç®åã®äœ¿çšäŸã瀺ãããŠããŸãã
é
åæŒç®å(<code>[]</code>)ã䜿çšãããšãé
åå
ã®ç¹å®ã®èŠçŽ ã«ã¢ã¯ã»ã¹ã§ããŸãã<code>numbers[0]</code>ã¯æåã®èŠçŽ ãã<code>numbers[-1]</code>ã¯æåŸã®èŠçŽ ãååŸããŸãã
ãªã¹ãçµåæŒç®å(<code>+</code>)ã¯ã2ã€ã®ãªã¹ããçµåããŠæ°ãããªã¹ããäœæããŸãã
æååæŒç®å(<code>+</code>)ã¯ãæååã®é£çµã«äœ¿çšãããŸãã
instanceofæŒç®åã¯ããªããžã§ã¯ãã®åããã§ãã¯ããŸããæå®ããåã«å±ããŠããã°<code>true</code>ãè¿ããããã§ãªããã°<code>false</code>ãè¿ããŸãã
åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽããã<code>println</code>æã䜿çšããŠçµæãåºåãããŸãã
:<syntaxhighlight lang=groovy>
// ã¬ã³ãžæŒç®å
def range1 = 1..5
def range2 = 10..1
println "Range 1: " + range1 // çµæ: [1, 2, 3, 4, 5]
println "Range 2: " + range2 // çµæ: []
// æ£èŠè¡šçŸæŒç®å
def text = "Hello, World!"
def pattern = /Hello, (\w+)!/
def match = text =~ pattern
println "Matched Text: " + match[0][0] // çµæ: Hello, World!
println "Matched Group: " + match[0][1] // çµæ: World
// ã¡ãœããåŒã³åºãæŒç®å
def list = [1, 2, 3, 4, 5]
def size = list.size()
println "List Size: " + size // çµæ: 5
// ã¯ããŒãžã£æŒç®å
def numbers = [1, 2, 3, 4, 5]
def squares = numbers.collect { it * it }
println "Squares: " + squares // çµæ: [1, 4, 9, 16, 25]
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ãã¬ã³ãžæŒç®å(<code>..</code>)ãæ£èŠè¡šçŸæŒç®å(<code>=~</code>)ãã¡ãœããåŒã³åºãæŒç®å(<code>.</code>)ãããã³ã¯ããŒãžã£æŒç®å(<code>{}</code>)ã®äœ¿çšäŸã瀺ãããŠããŸãã
ã¬ã³ãžæŒç®åã¯ãæå®ããç¯å²ã®å€ãè¡šããªã¹ããäœæããŸãã<code>1..5</code>ã¯1ãã5ãŸã§ã®æŽæ°ã®ãªã¹ããã<code>10..1</code>ã¯ç©ºã®ãªã¹ããäœæããŸãã
æ£èŠè¡šçŸæŒç®å(<code>=~</code>)ã䜿çšãããšãããã¹ãå
ã§æ£èŠè¡šçŸãã¿ãŒã³ã«äžèŽããéšåãæ€çŽ¢ã§ããŸãã<code>match[0][0]</code>ã¯äžèŽããå
šäœã®ããã¹ããã<code>match[0][1]</code>ã¯ãã£ããã£ã°ã«ãŒãã®äžèŽããéšåãååŸããŸãã
ã¡ãœããåŒã³åºãæŒç®å(<code>.</code>)ã䜿çšãããšããªããžã§ã¯ãã®ã¡ãœãããåŒã³åºãããšãã§ããŸãã<code>list.size()</code>ã¯ãªã¹ãã®èŠçŽ æ°ãååŸããŸãã
ã¯ããŒãžã£æŒç®å(<code>{}</code>)ã¯ãå¿åã®é¢æ°ãäœæããŸãã<code>numbers.collect { it * it }</code>ã¯<code>numbers</code>ãªã¹ãã®åèŠçŽ ã«å¯ŸããŠã¯ããŒãžã£ãé©çšããèŠçŽ ã®2ä¹ã®ãªã¹ããäœæããŸãã
åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽããã<code>println</code>æã䜿çšããŠçµæãåºåãããŸãã
:<syntaxhighlight lang=groovy>
// ã°ã«ãŒãåæŒç®å
def result1 = 2 + 3 * 4
def result2 = (2 + 3) * 4
println "Result 1: " + result1 // çµæ: 14
println "Result 2: " + result2 // çµæ: 20
// äžé
æŒç®åã®ã·ã§ãŒããµãŒããã
def x = 5
def y = 10
def z = (x > y) ? "x > y" : (x < y) ? "x < y" : "x == y"
println "Comparison: " + z // çµæ: x < y
// ãããæŒç®å
def a = 5
def b = 3
def bitwiseAnd = a & b
def bitwiseOr = a | b
def bitwiseXor = a ^ b
println "Bitwise AND: " + bitwiseAnd // çµæ: 1
println "Bitwise OR: " + bitwiseOr // çµæ: 7
println "Bitwise XOR: " + bitwiseXor // çµæ: 6
// ã·ããæŒç®å
def num = 10
def leftShift = num << 2
def rightShift = num >> 1
println "Left Shift: " + leftShift // çµæ: 40
println "Right Shift: " + rightShift // çµæ: 5
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ãæŒç®åã®ã°ã«ãŒãå(<code>()</code>)ãäžé
æŒç®åã®ã·ã§ãŒããµãŒãããããããæŒç®åãããã³ã·ããæŒç®åã®äœ¿çšäŸã瀺ãããŠããŸãã
ã°ã«ãŒãåæŒç®å(<code>()</code>)ã¯ãæŒç®åã®è©äŸ¡é åºãæ瀺çã«æå®ããŸãã<code>result1</code>ã§ã¯ä¹ç®ãå
ã«è©äŸ¡ãããŸããã<code>result2</code>ã§ã¯å ç®ãå
ã«è©äŸ¡ãããŸãã
äžé
æŒç®åã®ã·ã§ãŒããµãŒãããã§ã¯ãæ¡ä»¶ãé çªã«è©äŸ¡ãããæåã«çãšãªãæ¡ä»¶ã®çµæãè¿ãããŸãã
ãããæŒç®å(<code>&</code>ã<code>|</code>ã<code>^</code>)ã¯ããããããšã®è«çæŒç®ãè¡ããŸããåæŒç®ã®çµæã¯æŽæ°ãšããŠèšç®ãããŸãã
ã·ããæŒç®å(<code><<</code>ã<code>>></code>)ã¯ãäºé²æ°è¡šçŸã®ããããå·Šå³ã«ã·ããããŸããå·Šã·ããã§ã¯ããããå·Šã«ç§»åããå³ã·ããã§ã¯ããããå³ã«ç§»åããŸãã
åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽããã<code>println</code>æã䜿çšããŠçµæãåºåãããŸãã
:<syntaxhighlight lang=groovy>
// è«çæŒç®å
def bool1 = true
def bool2 = false
def andResult = bool1 && bool2
def orResult = bool1 || bool2
def notResult = !bool1
println "AND Result: " + andResult // çµæ: false
println "OR Result: " + orResult // çµæ: true
println "NOT Result: " + notResult // çµæ: false
// æ¯èŒæŒç®å
def num1 = 5
def num2 = 10
def isEqual = num1 == num2
def isNotEqual = num1 != num2
def isGreaterThan = num1 > num2
def isLessThan = num1 < num2
def isGreaterOrEqual = num1 >= num2
def isLessOrEqual = num1 <= num2
println "Is Equal: " + isEqual // çµæ: false
println "Is Not Equal: " + isNotEqual // çµæ: true
println "Is Greater Than: " + isGreaterThan // çµæ: false
println "Is Less Than: " + isLessThan // çµæ: true
println "Is Greater Or Equal: " + isGreaterOrEqual // çµæ: false
println "Is Less Or Equal: " + isLessOrEqual // çµæ: true
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ãè«çæŒç®å(<code>&&</code>ã<code>||</code>ã<code>!</code>)ãšæ¯èŒæŒç®å(<code>==</code>ã<code>!=</code>ã<code>></code>ã<code><</code>ã<code>>=</code>ã<code><=</code>)ã®äœ¿çšäŸã瀺ãããŠããŸãã
è«çæŒç®åã¯ãçåœå€ãæäœããããã«äœ¿çšãããŸãã<code>&&</code>ã¯è«çç©ïŒANDïŒãèšç®ããäž¡æ¹ã®ãªãã©ã³ãã<code>true</code>ã®å Žåã«çµæã<code>true</code>ãšãªããŸãã<code>||</code>ã¯è«çåïŒORïŒãèšç®ããã©ã¡ããã®ãªãã©ã³ãã<code>true</code>ã®å Žåã«çµæã<code>true</code>ãšãªããŸãã<code>!</code>ã¯è«çåŠå®ïŒNOTïŒãèšç®ãããªãã©ã³ãã®çåœå€ãå転ãããŸãã
æ¯èŒæŒç®åã¯ãå€ã®æ¯èŒãè¡ããŸãã<code>==</code>ã¯çãããã©ãããå€å®ãã<code>!=</code>ã¯çãããªããã©ãããå€å®ããŸãã<code>></code>ã<code><</code>ã<code>>=</code>ã<code><=</code>ã¯ãããã倧ãªããå°ãªãã以äžã以äžãå€å®ããŸãã
åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽããã<code>println</code>æã䜿çšããŠçµæãåºåãããŸãã
:<syntaxhighlight lang=groovy>
// nullå®å
šæŒç®å
def text = "Hello, World!"
def length = text?.length()
println "Length: " + length // çµæ: 13
def nullValue = null
def result = nullValue?.toUpperCase()
println "Result: " + result // çµæ: null
// ãšã«ãã¹æŒç®å
def name = null
def displayName = name ?: "Unknown"
println "Display Name: " + displayName // çµæ: Unknown
name = "Alice"
displayName = name ?: "Unknown"
println "Display Name: " + displayName // çµæ: Alice
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ãnullå®å
šæŒç®å(<code>?.</code>)ãšãšã«ãã¹æŒç®å(<code>?:</code>)ã®äœ¿çšäŸã瀺ãããŠããŸãã
nullå®å
šæŒç®å(<code>?.</code>)ã¯ããªããžã§ã¯ãã<code>null</code>ã§ãªãå Žåã«ã®ã¿ããããã£ãã¡ãœããã«ã¢ã¯ã»ã¹ããŸãããããªããžã§ã¯ãã<code>null</code>ã§ããã°ãçµæã¯<code>null</code>ãšãªããŸãã<code>text?.length()</code>ã§ã¯ã<code>text</code>ãªããžã§ã¯ãã<code>null</code>ã§ãªãå Žåã«ã®ã¿<code>length()</code>ã¡ãœãããåŒã³åºãããŸãã
ãšã«ãã¹æŒç®å(<code>?:</code>)ã¯ããªããžã§ã¯ãã<code>null</code>ã§ããå Žåã«ããã©ã«ãã®å€ã䜿çšããŸãããªããžã§ã¯ãã<code>null</code>ã§ãªãå Žåã¯ãã®å€ã䜿çšããŸãã<code>name ?: "Unknown"</code>ã§ã¯ã<code>name</code>ã<code>null</code>ã§ããã°<code>"Unknown"</code>ããããã§ãªããã°<code>name</code>ã®å€ã代å
¥ãããŸãã
åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽããã<code>println</code>æã䜿çšããŠçµæãåºåãããŸãã
:<syntaxhighlight lang=groovy>
// å®å
šããã²ãŒã·ã§ã³æŒç®å
class Person {
String name
}
def person = new Person()
def personName = person?.name
println "Person Name: " + personName // çµæ: null
person.name = "Alice"
personName = person?.name
println "Person Name: " + personName // çµæ: Alice
// é
åã¢ã¯ã»ã¹æŒç®å
def array = [1, 2, 3, 4, 5]
def element = array[2]
println "Element: " + element // çµæ: 3
// ã¹ãã¬ããæŒç®å
def numbers = [1, 2, 3]
def combined = [0, *numbers, 4, 5]
println "Combined: " + combined // çµæ: [0, 1, 2, 3, 4, 5]
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ãå®å
šããã²ãŒã·ã§ã³æŒç®å(<code>?.</code>)ãé
åã¢ã¯ã»ã¹æŒç®å(<code>[]</code>)ãããã³ã¹ãã¬ããæŒç®å(<code>*</code>)ã®äœ¿çšäŸã瀺ãããŠããŸãã
å®å
šããã²ãŒã·ã§ã³æŒç®å(<code>?.</code>)ã¯ããªããžã§ã¯ãã<code>null</code>ã§ãªãå Žåã«ã®ã¿ããããã£ã«ã¢ã¯ã»ã¹ããŸãããããªããžã§ã¯ãã<code>null</code>ã§ããã°ãçµæã¯<code>null</code>ãšãªããŸãã<code>person?.name</code>ã§ã¯ã<code>person</code>ãªããžã§ã¯ãã<code>null</code>ã§ãªãå Žåã«ã®ã¿<code>name</code>ããããã£ã«ã¢ã¯ã»ã¹ããŸãã
é
åã¢ã¯ã»ã¹æŒç®å(<code>[]</code>)ã¯ãé
åå
ã®èŠçŽ ã«ã¢ã¯ã»ã¹ããŸãã<code>array[2]</code>ã§ã¯ã<code>array</code>é
åã®3çªç®ã®èŠçŽ ã«ã¢ã¯ã»ã¹ãããã®å€ãååŸããŸãã
ã¹ãã¬ããæŒç®å(<code>*</code>)ã¯ãé
åå
ã®èŠçŽ ãå±éããŸãã<code>[0, *numbers, 4, 5]</code>ã§ã¯ã<code>numbers</code>é
åã®èŠçŽ ãå±éããŠæ°ããé
åãäœæããŸãã
åæŒç®ã®çµæã¯å€æ°ã«æ ŒçŽããã<code>println</code>æã䜿çšããŠçµæãåºåãããŸãã
=== å¶åŸ¡æ§é ===
:<syntaxhighlight lang=groovy>
// ifæ
def num = 10
if (num > 0) {
println "Positive"
} else if (num < 0) {
println "Negative"
} else {
println "Zero"
}
// forã«ãŒã
def numbers = [1, 2, 3, 4, 5]
for (def i = 0; i < numbers.size(); i++) {
println numbers[i]
}
// whileã«ãŒã
def count = 0
while (count < 5) {
println "Count: " + count
count++
}
// switchæ
def fruit = "apple"
switch (fruit) {
case "apple":
println "It's an apple."
break
case "banana":
println "It's a banana."
break
case "orange":
println "It's an orange."
break
default:
println "Unknown fruit."
break
}
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ãGroovyã®å¶åŸ¡æ§é ã®äŸã瀺ãããŠããŸãã
<code>if</code>æã¯æ¡ä»¶ã«åºã¥ããŠåå²ããŸãã<code>num</code>ã0ãã倧ããå Žåã¯"Positive"ã0ããå°ããå Žåã¯"Negative"ããã以å€ã®å Žåã¯"Zero"ãåºåãããŸãã
<code>for</code>ã«ãŒãã¯æå®ãããåæ°ã®ç¹°ãè¿ããè¡ããŸãã<code>numbers</code>ãªã¹ãã®èŠçŽ ãé çªã«è¡šç€ºããŸãã
<code>while</code>ã«ãŒãã¯æ¡ä»¶ãçã®éãç¹°ãè¿ãåŠçãè¡ããŸãã<code>count</code>ã5æªæºã®éã<code>Count: [countã®å€]</code>ãšè¡šç€ºãã<code>count</code>ãã€ã³ã¯ãªã¡ã³ãããŸãã
<code>switch</code>æã¯è€æ°ã®æ¡ä»¶ã«åºã¥ããŠåå²ããŸãã<code>fruit</code>ã®å€ã«å¿ããŠç°ãªãã¡ãã»ãŒãžã衚瀺ãããŸãã
åå¶åŸ¡æ§é ã®äŸã§ã¯ãæ¡ä»¶ãã«ãŒãã®å¶åŸ¡ã«å¿ããŠã³ãŒããããã¯ãå®è¡ãããŸãã
:<syntaxhighlight lang=groovy>
// ã«ãŒãã®å¶åŸ¡
def numbers = [1, 2, 3, 4, 5]
for (def number in numbers) {
if (number == 3) {
continue // 次ã®ç¹°ãè¿ãã«é²ã
}
println number
if (number == 4) {
break // ã«ãŒããçµäºãã
}
}
// 匷å¶çãªäŸå€ã®ã¹ããŒ
def num = -1
try {
if (num < 0) {
throw new IllegalArgumentException("Invalid number.")
}
println "Valid number."
} catch (IllegalArgumentException e) {
println "Caught exception: " + e.message
}
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ãã«ãŒãã®å¶åŸ¡ãšäŸå€ã®ã¹ããŒã«é¢é£ããå¶åŸ¡æ§é ã®äŸã瀺ãããŠããŸãã
<code>for</code>ã«ãŒãã§ã¯ã<code>numbers</code>ãªã¹ãã®èŠçŽ ãé çªã«åŠçããŸãããã ããèŠçŽ ã®å€ã3ã®å Žåã¯<code>continue</code>æãå®è¡ããã次ã®ç¹°ãè¿ãã«é²ã¿ãŸããèŠçŽ ã®å€ã4ã®å Žåã¯<code>break</code>æãå®è¡ãããã«ãŒããçµäºããŸãã
<code>try-catch</code>æ§æã¯äŸå€ã®ææãšåŠçãè¡ããŸãã<code>try</code>ãããã¯å
ã®ã³ãŒããå®è¡ãããããäŸå€ãã¹ããŒãããå Žåã¯è©²åœãã<code>catch</code>ãããã¯ãå®è¡ãããŸãããã®äŸã§ã¯ã<code>num</code>ãè² ã®å Žåã«<code>IllegalArgumentException</code>ãã¹ããŒããããã®äŸå€ããã£ãããããŠã¡ãã»ãŒãžã衚瀺ãããŸãã
åå¶åŸ¡æ§é ã¯ããã°ã©ã ã®ãããŒãå¶åŸ¡ããæ¡ä»¶ãç¹°ãè¿ãã«åºã¥ããŠã³ãŒãã®å®è¡ã調æŽããŸãããŸããäŸå€ã®ã¹ããŒãšãã£ããã䜿çšããããšã§ããšã©ãŒåŠçãç°åžžç¶æ
ã®åŠçãè¡ãããšãã§ããŸãã
:<syntaxhighlight lang=groovy>
// ã©ãã«ä»ãã«ãŒããšã©ãã«ä»ããããã¯
outerLoop: for (def i = 1; i <= 3; i++) {
innerLoop: for (def j = 1; j <= 3; j++) {
if (i == 2 && j == 2) {
break outerLoop // å€åŽã®ã«ãŒããçµäºãã
}
println "i: " + i + ", j: " + j
}
}
// assertæã«ããã¢ãµãŒã·ã§ã³
def x = 5
def y = 3
assert x > y // xãyãã倧ããããšãæ€èšŒ
// äžé
æŒç®åãšnullå®å
šæŒç®åã®çµã¿åãã
def name = "Alice"
def message = name?.length() > 0 ? "Hello, " + name : "Hello, Guest"
println message // çµæ: Hello, Alice
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ãã©ãã«ä»ãã«ãŒããšã©ãã«ä»ããããã¯ã<code>assert</code>æã«ããã¢ãµãŒã·ã§ã³ãããã³äžé
æŒç®åãšnullå®å
šæŒç®åã®çµã¿åããã®äŸã瀺ãããŠããŸãã
ã©ãã«ä»ãã«ãŒããšã©ãã«ä»ããããã¯ã䜿çšããããšã§ãå
åŽã®ã«ãŒãããå€åŽã®ã«ãŒããçµäºããããšãã§ããŸãã<code>break outerLoop</code>ã¯å€åŽã®ã«ãŒããçµäºããã«ãŒãããæããŸãã
<code>assert</code>æã¯ãæ¡ä»¶åŒãçã§ããããšãã¢ãµãŒã·ã§ã³ïŒæ€èšŒïŒããŸããããæ¡ä»¶åŒãåœã®å Žåãã¢ãµãŒã·ã§ã³ãšã©ãŒãçºçããããã°ã©ã ã®å®è¡ãåæ¢ããŸãããã®äŸã§ã¯ã<code>x</code>ã<code>y</code>ããã倧ããããšãæ€èšŒããŠããŸãã
äžé
æŒç®åãšnullå®å
šæŒç®åãçµã¿åãããããšã§ãnullãã§ãã¯ãšæ¡ä»¶ä»ãã®å€ã®ä»£å
¥ãè¡ãããšãã§ããŸãã<code>name?.length() > 0</code>ã¯ã<code>name</code>ã<code>null</code>ã§ãªãå Žåã«ã®ã¿<code>length()</code>ã¡ãœããã®çµæãå©çšãããŸãã
åå¶åŸ¡æ§é ã®äŸã§ã¯ãããã°ã©ã ã®ãããŒã®å¶åŸ¡ãæ¡ä»¶ã®æ€èšŒãè¡ã£ãŠããŸãããŸããã¢ãµãŒã·ã§ã³ã䜿çšããããšã§ããã°ã©ã ã®æ£ãããæ€èšŒã§ããŸãã
:<syntaxhighlight lang=groovy>
// äŸå€åŠçãšfinallyãããã¯
def divideNumbers(int a, int b) {
try {
def result = a / b
return result
} catch (ArithmeticException e) {
println "Divide by zero error: " + e.message
} finally {
println "Finally block executed"
}
}
println divideNumbers(10, 2) // çµæ: 5
println divideNumbers(10, 0) // çµæ: Divide by zero error: / by zero
// ã¯ããŒãžã£
def closureExample = { int x, int y ->
x + y
}
println closureExample(3, 4) // çµæ: 7
// äŸå€ã®ã¹ããŒãšãã£ãã
def calculateSquareRoot(int number) {
if (number < 0) {
throw new IllegalArgumentException("Invalid number")
}
return Math.sqrt(number)
}
try {
println calculateSquareRoot(9) // çµæ: 3.0
println calculateSquareRoot(-9) // äŸå€ãã¹ããŒããã
} catch (IllegalArgumentException e) {
println "Caught exception: " + e.message
}
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ãGroovyã®ãå¶åŸ¡æ§é ãã«é¢é£ããããŸããŸãªèŠçŽ ã®äŸã瀺ãããŠããŸãã
<code>try-catch-finally</code>ãããã¯ã¯ãäŸå€åŠçãå®è¡ããããã«äœ¿çšãããŸãã<code>try</code>ãããã¯å
ã®ã³ãŒããå®è¡ãããããäŸå€ãã¹ããŒãããå Žåã¯è©²åœãã<code>catch</code>ãããã¯ãå®è¡ãããŸãããŸãã<code>finally</code>ãããã¯ã¯äŸå€ã®æç¡ã«ãããããå¿
ãå®è¡ãããŸãããã®äŸã§ã¯ããŒãã§å²ãç®ãè©Šã¿ãå Žåã«<code>ArithmeticException</code>ããã£ãããããé©åãªã¡ãã»ãŒãžã衚瀺ãããŸãã
ã¯ããŒãžã£ã¯ç¡åé¢æ°ã®ããšã§ãé¢æ°ã®ããã«æ±ãããšãã§ããŸãã<code>closureExample</code>ã¯2ã€ã®åŒæ°ãåãåãããããã足ããçµæãè¿ãã¯ããŒãžã£ã§ãã<code>closureExample(3, 4)</code>ã¯7ãè¿ããŸãã
äŸå€ã®ã¹ããŒãšãã£ããã¯ãããã°ã©ã ã®å®è¡äžã«ç°åžžç¶æ
ãåŠçããããã«äœ¿çšãããŸãã<code>calculateSquareRoot</code>ã¡ãœããã§ã¯ãåŒæ°ãè² ã®å Žåã«<code>IllegalArgumentException</code>ãã¹ããŒããŸããåŒã³åºãåŽã§ã¯ããã®ã¡ãœããã<code>try-catch</code>æ§æã§å²ã¿ãäŸå€ããã£ããããŠé©åãªã¡ãã»ãŒãžã衚瀺ããŸãã
ãããã®å¶åŸ¡æ§é ã¯ãããã°ã©ã ã®å¶åŸ¡ãããŒããšã©ãŒåŠçãæè»ã«å¶åŸ¡ããããã«äœ¿çšãããŸãã
:<syntaxhighlight lang=groovy>
// ãªã¹ãæäœãšã³ã¬ã¯ã·ã§ã³æŒç®å
def numbers = [1, 2, 3, 4, 5]
// eachã¡ãœããã«ãããªã¹ãã®èŠçŽ ã®ç¹°ãè¿ãåŠç
numbers.each { num ->
println num
}
// collectã¡ãœããã«ãããªã¹ãã®èŠçŽ ã®å€æ
def squaredNumbers = numbers.collect { num ->
num * num
}
println squaredNumbers // çµæ: [1, 4, 9, 16, 25]
// findAllã¡ãœããã«ããæ¡ä»¶ã«åèŽããèŠçŽ ã®æœåº
def evenNumbers = numbers.findAll { num ->
num % 2 == 0
}
println evenNumbers // çµæ: [2, 4]
// injectã¡ãœããã«ãããªã¹ãã®èŠçŽ ã®çŽ¯ç©æŒç®
def sum = numbers.inject { result, num ->
result + num
}
println sum // çµæ: 15
// ã°ã«ãŒãã³ã°
def names = ["Alice", "Bob", "Charlie", "Amy", "David"]
def groupedNames = names.groupBy { name ->
name.length()
}
println groupedNames // çµæ: [3:[Bob, Amy], 5:[Alice], 7:[Charlie, David]]
</syntaxhighlight>
ãã®ã³ãŒãã¯ãGroovyã®ãªã¹ãæäœãšã³ã¬ã¯ã·ã§ã³æŒç®åã«é¢ããäŸã§ãã以äžã«åéšåã®è§£èª¬ãããŸãã
# <code>def numbers = [1, 2, 3, 4, 5]</code>ïŒæŽæ°ã®ãªã¹ããäœæããŸãã
# <code>numbers.each { num -> println num }</code>ïŒ<code>each</code>ã¡ãœããã䜿çšããŠãªã¹ãã®èŠçŽ ãç¹°ãè¿ãåŠçããåèŠçŽ ã衚瀺ããŸããçµæãšããŠããªã¹ãã®èŠçŽ 1ãã5ãé çªã«è¡šç€ºãããŸãã
# <code>def squaredNumbers = numbers.collect { num -> num * num }</code>ïŒ<code>collect</code>ã¡ãœããã䜿çšããŠãªã¹ãã®èŠçŽ ãå€æããŸããåèŠçŽ ã2ä¹ããçµæãå«ãæ°ãããªã¹ããçæããŸãã<code>squaredNumbers</code>ã«ã¯[1, 4, 9, 16, 25]ãšãããªã¹ãã代å
¥ãããŸãã
# <code>println squaredNumbers</code>ïŒå€æããããªã¹ã<code>squaredNumbers</code>ã衚瀺ããŸããçµæãšããŠã[1, 4, 9, 16, 25]ã衚瀺ãããŸãã
# <code>def evenNumbers = numbers.findAll { num -> num % 2 == 0 }</code>ïŒ<code>findAll</code>ã¡ãœããã䜿çšããŠæ¡ä»¶ã«åèŽããèŠçŽ ãæœåºããŸãããã®å Žåããªã¹ãã®äžããå¶æ°ã®èŠçŽ ãæœåºããæ°ãããªã¹ããçæããŸãã<code>evenNumbers</code>ã«ã¯[2, 4]ãšãããªã¹ãã代å
¥ãããŸãã
# <code>println evenNumbers</code>ïŒæœåºãããå¶æ°ã®ãªã¹ã<code>evenNumbers</code>ã衚瀺ããŸããçµæãšããŠã[2, 4]ã衚瀺ãããŸãã
# <code>def sum = numbers.inject { result, num -> result + num }</code>ïŒ<code>inject</code>ã¡ãœããã䜿çšããŠãªã¹ãã®èŠçŽ ã环ç©çã«æŒç®ããŸããåèŠçŽ ãé çªã«è¶³ãåãããŠåèšå€ãèšç®ããŸãã<code>sum</code>ã«ã¯15ã代å
¥ãããŸãã
# <code>println sum</code>ïŒåèšå€<code>sum</code>ã衚瀺ããŸããçµæãšããŠã15ã衚瀺ãããŸãã
# <code>def names = ["Alice", "Bob", "Charlie", "Amy", "David"]</code>ïŒæååã®ãªã¹ããäœæããŸãã
# <code>def groupedNames = names.groupBy { name -> name.length() }</code>ïŒ<code>groupBy</code>ã¡ãœããã䜿çšããŠãªã¹ãã®èŠçŽ ãæå®ãããã¯ããŒãžã£ã®æ»ãå€ã«åºã¥ããŠã°ã«ãŒãåããŸããããã§ã¯ãååã®é·ããããŒãšããŠã°ã«ãŒãåããŸãã<code>groupedNames</code>ã«ã¯ã°ã«ãŒãåãããçµæãããããšããŠä»£å
¥ãããŸãã
# <code>println groupedNames</code>ïŒã°ã«ãŒãåãããçµæã衚瀺ããŸããçµæãšããŠãååã®é·ãã«åºã¥ããã°ã«ãŒãåã衚瀺ãããŸãã
=== é¢æ°ãšã¡ãœãã ===
==== é¢æ°ã®å®çŸ©ãšåŒã³åºã ====
:<syntaxhighlight lang=groovy>
// é¢æ°ã®å®çŸ©
def sayHello() {
println "Hello, World!"
}
// é¢æ°ã®åŒã³åºã
sayHello() // çµæ: Hello, World!
// åŒæ°ãåãåãé¢æ°ã®å®çŸ©
def greet(name) {
println "Hello, $name!"
}
// åŒæ°ãæå®ããŠé¢æ°ãåŒã³åºã
greet("Alice") // çµæ: Hello, Alice!
greet("Bob") // çµæ: Hello, Bob!
// ããã©ã«ãåŒæ°ãæã€é¢æ°ã®å®çŸ©
def calculateArea(width, height = 1) {
width * height
}
println calculateArea(5) // çµæ: 5
println calculateArea(5, 3) // çµæ: 15
// å¯å€é·åŒæ°ãåãåãé¢æ°ã®å®çŸ©
def sumNumbers(...numbers) {
numbers.sum()
}
println sumNumbers(1, 2, 3) // çµæ: 6
println sumNumbers(4, 5, 6, 7) // çµæ: 22
// ã¡ãœããã®å®çŸ©ïŒã¯ã©ã¹å
ã§å®çŸ©ãããïŒ
class Calculator {
static int add(int a, int b) {
a + b
}
}
println Calculator.add(3, 4) // çµæ: 7
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ãGroovyã®é¢æ°ãšã¡ãœããã«é¢ããäŸã瀺ãããŠããŸãã
# <code>def sayHello()</code>ïŒé¢æ°<code>sayHello</code>ãå®çŸ©ããŸãããã®é¢æ°ã¯åŒæ°ãåãåããã«ãHello, World!ããšè¡šç€ºããŸãã
# <code>sayHello()</code>ïŒé¢æ°<code>sayHello</code>ãåŒã³åºããŠããHello, World!ããšè¡šç€ºããŸãã
# <code>def greet(name)</code>ïŒåŒæ°ãåãåãé¢æ°<code>greet</code>ãå®çŸ©ããŸãããã®é¢æ°ã¯åŒæ°<code>name</code>ã䜿çšããŠæšæ¶ã衚瀺ããŸãã
# <code>greet("Alice")</code>ïŒåŒæ°ãæå®ããŠé¢æ°<code>greet</code>ãåŒã³åºãããHello, Alice!ããšè¡šç€ºããŸãã
# <code>greet("Bob")</code>ïŒå¥ã®åŒæ°ãæå®ããŠé¢æ°<code>greet</code>ãåŒã³åºãããHello, Bob!ããšè¡šç€ºããŸãã
# <code>def calculateArea(width, height = 1)</code>ïŒããã©ã«ãåŒæ°ãæã€é¢æ°<code>calculateArea</code>ãå®çŸ©ããŸãã<code>width</code>ãš<code>height</code>ã®åŒæ°ã䜿çšããŠãé¢ç©ãèšç®ããŸãã
# <code>calculateArea(5)</code>ïŒåŒæ°<code>width</code>ã®ã¿ãæå®ããŠé¢æ°<code>calculateArea</code>ãåŒã³åºããçµæãšããŠ5ã衚瀺ãããŸãã
# <code>calculateArea(5, 3)</code>ïŒåŒæ°<code>width</code>ãš<code>height</code>ãæå®ããŠé¢æ°<code>calculateArea</code>ãåŒã³åºããçµæãšããŠ15ã衚瀺ãããŸãã
# <code>def sumNumbers(...numbers)</code>ïŒå¯å€é·åŒæ°ãæã€é¢æ°<code>sumNumbers</code>ãå®çŸ©ããŸãã<code>numbers</code>ã®å¯å€é·åŒæ°ã䜿çšããŠãç·åãèšç®ããŸãã
# <code>sumNumbers(1, 2, 3)</code>ïŒåŒæ°ãªã¹ã<code>1, 2, 3</code>ãæå®ããŠé¢æ°<code>sumNumbers</code>ãåŒã³åºããçµæãšããŠ6ã衚瀺ãããŸãã
# <code>sumNumbers(4, 5, 6, 7)</code>ïŒåŒæ°ãªã¹ã<code>4, 5, 6, 7</code>ãæå®ããŠé¢æ°<code>sumNumbers</code>ãåŒã³åºããçµæãšããŠ22ã衚瀺ãããŸãã
# <code>class Calculator</code>ïŒã¯ã©ã¹<code>Calculator</code>ãå®çŸ©ããŸãã
# <code>static int add(int a, int b)</code>ïŒã¯ã©ã¹å
ã®éçã¡ãœãã<code>add</code>ãå®çŸ©ããŸãããã®ã¡ãœããã¯2ã€ã®æŽæ°åŒæ°<code>a</code>ãš<code>b</code>ãåãåãããããã®åèšãèšç®ããŸãã
# <code>println Calculator.add(3, 4)</code>ïŒã¯ã©ã¹<code>Calculator</code>ã®éçã¡ãœãã<code>add</code>ãåŒã³åºããåŒæ°3ãš4ãæž¡ããŠåèšãèšç®ããçµæãšããŠ7ã衚瀺ãããŸãã
==== ã¯ããŒãžã£ãŒãšã¡ãœãã ====
:<syntaxhighlight lang=groovy>
// ã¯ããŒãžã£ã䜿çšããé¢æ°ã®å®çŸ©ãšåŒã³åºã
def multiplier = { x, y -> x * y }
println multiplier(3, 4) // çµæ: 12
// ã¯ã©ã¹å
ã§ã®ã¡ãœããã®å®çŸ©ãšåŒã³åºã
class Person {
String name
void sayHello() {
println "Hello, I'm $name!"
}
}
def person = new Person(name: "Alice")
person.sayHello() // çµæ: Hello, I'm Alice!
</syntaxhighlight>
# <code>def multiplier = { x, y -> x * y }</code>ïŒã¯ããŒãžã£ã䜿çšããŠé¢æ°<code>multiplier</code>ãå®çŸ©ããŸãããã®ã¯ããŒãžã£ã¯2ã€ã®åŒæ°<code>x</code>ãš<code>y</code>ãåãåãããããã®ç©ãè¿ããŸãã
# <code>println multiplier(3, 4)</code>ïŒã¯ããŒãžã£<code>multiplier</code>ãåŒã³åºããåŒæ°3ãš4ãæž¡ããŠç©ãèšç®ããçµæãšããŠ12ã衚瀺ãããŸãã
# <code>class Person</code>ïŒã¯ã©ã¹<code>Person</code>ãå®çŸ©ããŸãã
# <code>String name</code>ïŒ<code>Person</code>ã¯ã©ã¹å
ã«<code>name</code>ãšããæåååã®ããããã£ãå®çŸ©ããŸãã
# <code>void sayHello()</code>ïŒ<code>Person</code>ã¯ã©ã¹å
ã«<code>sayHello</code>ãšããã¡ãœãããå®çŸ©ããŸãããã®ã¡ãœããã¯èªå·±çŽ¹ä»ã®ã¡ãã»ãŒãžã衚瀺ããŸãã
# <code>def person = new Person(name: "Alice")</code>ïŒ<code>Person</code>ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹<code>person</code>ãçæãã<code>name</code>ããããã£ã«"Alice"ãèšå®ããŸãã
# <code>person.sayHello()</code>ïŒ<code>person</code>ã€ã³ã¹ã¿ã³ã¹ã®<code>sayHello</code>ã¡ãœãããåŒã³åºããèªå·±çŽ¹ä»ã®ã¡ãã»ãŒãžã衚瀺ããŸããçµæãšããŠã"Hello, I'm Alice!"ã衚瀺ãããŸãã
ãã®ã³ãŒãã§ã¯ãã¯ããŒãžã£ã䜿çšããé¢æ°ã®å®çŸ©ãšåŒã³åºãæ¹æ³ã瀺ãããŠããŸããã¯ããŒãžã£ã¯ç¡åé¢æ°ãšããŠäœ¿çšãããå€æ°ã«ä»£å
¥ããŠé¢æ°ã®ããã«æ±ãããšãã§ããŸãã
ãŸããã¯ã©ã¹å
ã§ã®ã¡ãœããã®å®çŸ©ãšåŒã³åºãæ¹æ³ã瀺ãããŠããŸããã¯ã©ã¹ãå®çŸ©ãããã®äžã§ã¡ãœãããå®çŸ©ããŠäœ¿çšããããšãã§ããŸããã¡ãœããã¯ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ã«å¯ŸããŠåŒã³åºãããŸãã
==== ã¡ãœããã®ãªãŒããŒããŒããšã¡ãœãããã§ãŒã³ ====
:<syntaxhighlight lang=groovy>
// ã¡ãœããã®ãªãŒããŒããŒã
class MathUtils {
static int add(int a, int b) {
a + b
}
static double add(double a, double b) {
a + b
}
}
println MathUtils.add(2, 3) // çµæ: 5
println MathUtils.add(2.5, 3.5) // çµæ: 6.0
// ã¡ãœãããã§ãŒã³
class StringBuilderUtils {
StringBuilder builder
StringBuilderUtils appendString(String str) {
builder.append(str)
this
}
StringBuilderUtils appendNumber(int num) {
builder.append(num)
this
}
String build() {
builder.toString()
}
}
def result = new StringBuilderUtils()
.appendString("Hello")
.appendString(", ")
.appendNumber(42)
.build()
println result // çµæ: Hello, 42
</syntaxhighlight>
# <code>class MathUtils</code>ïŒã¯ã©ã¹<code>MathUtils</code>ãå®çŸ©ããŸãã
# <code>static int add(int a, int b)</code>ïŒ<code>MathUtils</code>ã¯ã©ã¹å
ã§ãªãŒããŒããŒããããã¡ãœãã<code>add</code>ãå®çŸ©ããŸãããã®ã¡ãœããã¯2ã€ã®æŽæ°åŒæ°<code>a</code>ãš<code>b</code>ã®åãè¿ããŸãã
# <code>static double add(double a, double b)</code>ïŒ<code>MathUtils</code>ã¯ã©ã¹å
ã§ãªãŒããŒããŒããããããäžã€ã®ã¡ãœãã<code>add</code>ãå®çŸ©ããŸãããã®ã¡ãœããã¯2ã€ã®æµ®åå°æ°ç¹æ°åŒæ°<code>a</code>ãš<code>b</code>ã®åãè¿ããŸãã
# <code>println MathUtils.add(2, 3)</code>ïŒ<code>MathUtils</code>ã¯ã©ã¹ã®<code>add</code>ã¡ãœãããåŒã³åºããæŽæ°åŒæ°2ãš3ãæž¡ããŠåãèšç®ããçµæãšããŠ5ã衚瀺ãããŸãã
# <code>println MathUtils.add(2.5, 3.5)</code>ïŒ<code>MathUtils</code>ã¯ã©ã¹ã®<code>add</code>ã¡ãœãããåŒã³åºããæµ®åå°æ°ç¹æ°åŒæ°2.5ãš3.5ãæž¡ããŠåãèšç®ããçµæãšããŠ6.0ã衚瀺ãããŸãã
ãã®ã³ãŒãã§ã¯ãã¡ãœããã®ãªãŒããŒããŒãã瀺ãããŠããŸãã<code>MathUtils</code>ã¯ã©ã¹ã®<code>add</code>ã¡ãœããã¯ãåŒæ°ã®åã«å¿ããŠç°ãªãåäœãããŸããæŽæ°åŒæ°ã®å Žåãšæµ®åå°æ°ç¹æ°åŒæ°ã®å Žåã§ãé©åãªã¡ãœãããåŒã³åºãããŸãã
# <code>class StringBuilderUtils</code>ïŒã¯ã©ã¹<code>StringBuilderUtils</code>ãå®çŸ©ããŸãã
# <code>StringBuilder builder</code>ïŒ<code>StringBuilderUtils</code>ã¯ã©ã¹å
ã«<code>builder</code>ãšãã<code>StringBuilder</code>ãªããžã§ã¯ããå®çŸ©ããŸãã
# <code>StringBuilderUtils appendString(String str)</code>ïŒ<code>StringBuilderUtils</code>ã¯ã©ã¹å
ã«<code>appendString</code>ãšããã¡ãœãããå®çŸ©ããŸãããã®ã¡ãœããã¯æåååŒæ°<code>str</code>ã<code>builder</code>ã«è¿œå ãã<code>this</code>ãè¿ããŸãã
# <code>return this;</code>ïŒ<code>appendString</code>ã¡ãœãããš<code>appendNumber</code>ã¡ãœããå
ã§ãèªèº«ã®ã€ã³ã¹ã¿ã³ã¹<code>this</code>ãè¿ããŸããããã«ãããã¡ãœãããã§ãŒã³ãå®çŸããŸããã€ãŸããé£ç¶ããŠã¡ãœãããåŒã³åºãããšãã§ããŸãã
# <code>StringBuilderUtils appendNumber(int num)</code>ïŒ<code>StringBuilderUtils</code>ã¯ã©ã¹å
ã«<code>appendNumber</code>ãšããã¡ãœãããå®çŸ©ããŸãããã®ã¡ãœããã¯æŽæ°åŒæ°<code>num</code>ã<code>builder</code>ã«è¿œå ããèªèº«ã®ã€ã³ã¹ã¿ã³ã¹<code>this</code>ãè¿ããŸãã
# <code>String build()</code>ïŒ<code>StringBuilderUtils</code>ã¯ã©ã¹å
ã«<code>build</code>ãšããã¡ãœãããå®çŸ©ããŸãããã®ã¡ãœããã¯<code>builder</code>ãæååã«å€æããŠè¿ããŸãã
# <code>def result = new StringBuilderUtils()...</code>ïŒ<code>StringBuilderUtils</code>ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãçæããã¡ãœãããã§ãŒã³ã§è€æ°ã®ã¡ãœãããåŒã³åºããŸãã<code>appendString</code>ã¡ãœãããš<code>appendNumber</code>ã¡ãœããã亀äºã«åŒã³åºããæåŸã«<code>build</code>ã¡ãœãããåŒã³åºããŠçµæãååŸããŸãã
# <code>println result</code>ïŒçµæã®æååã衚瀺ããŸããçµæãšããŠã"Hello, 42"ã衚瀺ãããŸãã
ãã®ã³ãŒãã§ã¯ãã¡ãœãããã§ãŒã³ã®æŠå¿µã瀺ãããŠããŸãã
<code>StringBuilderUtils</code>ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãçæããè€æ°ã®ã¡ãœãããé£ç¶ããŠåŒã³åºãããšãã§ããŸãã
åã¡ãœããã¯èªèº«ã®ã€ã³ã¹ã¿ã³ã¹ãè¿ãããã次ã®ã¡ãœãããç¶ããŠåŒã³åºãããšãã§ããŸãã
ããã«ãããã³ãŒããã·ã³ãã«ã«ä¿ã¡ãªãããè€æ°ã®åŠçãå¹ççã«å®è¡ããããšãã§ããŸãã
==== ã¡ãœããã®ãªãŒããŒã©ã€ã ====
:<syntaxhighlight lang=groovy>
// ã¡ãœããã®ãªãŒããŒã©ã€ã
class Animal {
void makeSound() {
println "The animal makes a sound."
}
}
class Cat extends Animal {
@Override
void makeSound() {
println "Meow!"
}
}
class Dog extends Animal {
@Override
void makeSound() {
println "Woof!"
}
}
def cat = new Cat()
cat.makeSound() // çµæ: Meow!
def dog = new Dog()
dog.makeSound() // çµæ: Woof!
</syntaxhighlight>
# <code>class Animal</code>ïŒã¯ã©ã¹<code>Animal</code>ãå®çŸ©ããŸãã
# <code>void makeSound()</code>ïŒ<code>Animal</code>ã¯ã©ã¹å
ã«<code>makeSound</code>ãšããã¡ãœãããå®çŸ©ããŸãããã®ã¡ãœããã¯ãåç©ã¯é³ãåºããŸãããšããã¡ãã»ãŒãžã衚瀺ããŸãã
# <code>class Cat extends Animal</code>ïŒ<code>Animal</code>ã¯ã©ã¹ãç¶æ¿ãã<code>Cat</code>ã¯ã©ã¹ãå®çŸ©ããŸãã
# <code>@Override</code>ïŒ<code>Cat</code>ã¯ã©ã¹å
ã®<code>makeSound</code>ã¡ãœããã<code>Animal</code>ã¯ã©ã¹ã®ã¡ãœããããªãŒããŒã©ã€ãããŠããããšãæ瀺ããŸãã
# <code>void makeSound()</code>ïŒ<code>Cat</code>ã¯ã©ã¹å
ã«åå®çŸ©ããã<code>makeSound</code>ã¡ãœãããå®çŸ©ããŸãããã®ã¡ãœããã¯ãMeow!ããšè¡šç€ºããŸãã
# <code>class Dog extends Animal</code>ïŒ<code>Animal</code>ã¯ã©ã¹ãç¶æ¿ãã<code>Dog</code>ã¯ã©ã¹ãå®çŸ©ããŸãã
# <code>@Override</code>ïŒ<code>Dog</code>ã¯ã©ã¹å
ã®<code>makeSound</code>ã¡ãœããã<code>Animal</code>ã¯ã©ã¹ã®ã¡ãœããããªãŒããŒã©ã€ãããŠããããšãæ瀺ããŸãã
# <code>void makeSound()</code>ïŒ<code>Dog</code>ã¯ã©ã¹å
ã«åå®çŸ©ããã<code>makeSound</code>ã¡ãœãããå®çŸ©ããŸãããã®ã¡ãœããã¯ãWoof!ããšè¡šç€ºããŸãã
# <code>def cat = new Cat()</code>ïŒ<code>Cat</code>ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹<code>cat</code>ãçæããŸãã
# <code>cat.makeSound()</code>ïŒ<code>cat</code>ã€ã³ã¹ã¿ã³ã¹ã®<code>makeSound</code>ã¡ãœãããåŒã³åºãããMeow!ããšè¡šç€ºããŸãã
# <code>def dog = new Dog()</code>ïŒ<code>Dog</code>ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹<code>dog</code>ãçæããŸãã
# <code>dog.makeSound()</code>ïŒ<code>dog</code>ã€ã³ã¹ã¿ã³ã¹ã®<code>makeSound</code>ã¡ãœãããåŒã³åºãããWoof!ããšè¡šç€ºããŸãã
ãã®ã³ãŒãã§ã¯ãã¡ãœããã®ãªãŒããŒã©ã€ãã瀺ãããŠããŸãã<code>Animal</code>ã¯ã©ã¹ã«ã¯<code>makeSound</code>ã¡ãœããããããŸããã<code>Cat</code>ã¯ã©ã¹ãš<code>Dog</code>ã¯ã©ã¹ã§ã¯ããããªãŒããŒã©ã€ãããŠç¬èªã®åäœãå®çŸ©ããŠããŸããããããã®ã€ã³ã¹ã¿ã³ã¹ãçæããŠã¡ãœãããåŒã³åºããšãé©åãªãµãŠã³ãã衚瀺ãããŸãã
:<syntaxhighlight lang=groovy>
</syntaxhighlight>
=== ã¯ã©ã¹ãšãªããžã§ã¯ã ===
==== ã¯ã©ã¹å®çŸ©ãšã€ã³ã¹ã¿ã³ã¹å ====
:<syntaxhighlight lang=groovy>
class Person {
String name
int age
void sayHello() {
println "Hello, my name is $name and I am $age years old."
}
}
def person1 = new Person()
person1.name = "Alice"
person1.age = 25
person1.sayHello() // çµæ: Hello, my name is Alice and I am 25 years old.
def person2 = new Person()
person2.name = "Bob"
person2.age = 30
person2.sayHello() // çµæ: Hello, my name is Bob and I am 30 years old.
</syntaxhighlight>
# <code>class Person</code>ïŒ<code>Person</code>ãšããã¯ã©ã¹ãå®çŸ©ããŸãã
# <code>String name</code>ïŒ<code>Person</code>ã¯ã©ã¹ã«<code>name</code>ãšããæåååã®ããããã£ãå®çŸ©ããŸãã
# <code>int age</code>ïŒ<code>Person</code>ã¯ã©ã¹ã«<code>age</code>ãšããæŽæ°åã®ããããã£ãå®çŸ©ããŸãã
# <code>void sayHello()</code>ïŒ<code>Person</code>ã¯ã©ã¹ã«<code>sayHello</code>ãšããã¡ãœãããå®çŸ©ããŸãããã®ã¡ãœããã¯ãHello, my name is $name and I am $age years old.ããšè¡šç€ºããŸãã
# <code>def person1 = new Person()</code>ïŒ<code>Person</code>ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹<code>person1</code>ãçæããŸãã
# <code>person1.name = "Alice"</code>ïŒ<code>person1</code>ã€ã³ã¹ã¿ã³ã¹ã®<code>name</code>ããããã£ã«<code>"Alice"</code>ã代å
¥ããŸãã
# <code>person1.age = 25</code>ïŒ<code>person1</code>ã€ã³ã¹ã¿ã³ã¹ã®<code>age</code>ããããã£ã«<code>25</code>ã代å
¥ããŸãã
# <code>person1.sayHello()</code>ïŒ<code>person1</code>ã€ã³ã¹ã¿ã³ã¹ã®<code>sayHello</code>ã¡ãœãããåŒã³åºãããHello, my name is Alice and I am 25 years old.ããšè¡šç€ºããŸãã
# <code>def person2 = new Person()</code>ïŒ<code>Person</code>ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹<code>person2</code>ãçæããŸãã
# <code>person2.name = "Bob"</code>ïŒ<code>person2</code>ã€ã³ã¹ã¿ã³ã¹ã®<code>name</code>ããããã£ã«<code>"Bob"</code>ã代å
¥ããŸãã
# <code>person2.age = 30</code>ïŒ<code>person2</code>ã€ã³ã¹ã¿ã³ã¹ã®<code>age</code>ããããã£ã«<code>30</code>ã代å
¥ããŸãã
# <code>person2.sayHello()</code>ïŒ<code>person2</code>ã€ã³ã¹ã¿ã³ã¹ã®<code>sayHello</code>ã¡ãœãããåŒã³åºãããHello, my name is Bob and I am 30 years old.ããšè¡šç€ºããŸãã
ãã®ã³ãŒãã§ã¯ã<code>Person</code>ãšããã¯ã©ã¹ãå®çŸ©ãããŠããŸãã<code>Person</code>ã¯ã©ã¹ã«ã¯<code>name</code>ãš<code>age</code>ãšããããããã£ãããã<code>sayHello</code>ãšããã¡ãœãããå®çŸ©ãããŠããŸããã€ã³ã¹ã¿ã³ã¹åããã<code>person1</code>ãš<code>person2</code>ã¯<code>Person</code>ã¯ã©ã¹ã®ãªããžã§ã¯ãã§ãããããããã®ããããã£ã«å€ã代å
¥ãã<code>sayHello</code>ã¡ãœãããåŒã³åºããŠèªå·±çŽ¹ä»ãããŸãã
==== ç¶æ¿ãšãªãŒããŒã©ã€ã ====
:<syntaxhighlight lang=groovy>
// ç¶æ¿ãšãªãŒããŒã©ã€ã
class Student extends Person {
String major
void introduce() {
println "I am a student majoring in $major."
}
@Override
void sayHello() {
println "Hello, my name is $name, I am $age years old, and I am a student."
}
}
def student1 = new Student()
student1.name = "Charlie"
student1.age = 20
student1.major = "Computer Science"
student1.sayHello() // çµæ: Hello, my name is Charlie, I am 20 years old, and I am a student.
student1.introduce() // çµæ: I am a student majoring in Computer Science.
</syntaxhighlight>
# <code>class Student extends Person</code>ïŒ<code>Student</code>ã¯ã©ã¹ã¯<code>Person</code>ã¯ã©ã¹ãç¶æ¿ããŸãã
# <code>String major</code>ïŒ<code>Student</code>ã¯ã©ã¹ã«<code>major</code>ãšããæåååã®ããããã£ãè¿œå ããŸãã
# <code>void introduce()</code>ïŒ<code>Student</code>ã¯ã©ã¹ã«<code>introduce</code>ãšããã¡ãœãããå®çŸ©ããŸãããã®ã¡ãœããã¯ãI am a student majoring in $major.ããšè¡šç€ºããŸãã
# <code>@Override</code>ïŒ<code>sayHello</code>ã¡ãœããããªãŒããŒã©ã€ãããããšã瀺ãã¢ãããŒã·ã§ã³ã§ãã
# <code>void sayHello()</code>ïŒ<code>Person</code>ã¯ã©ã¹ã®<code>sayHello</code>ã¡ãœããã<code>Student</code>ã¯ã©ã¹ã§ãªãŒããŒã©ã€ãããŸããæ°ããã¡ãã»ãŒãžãHello, my name is $name, I am $age years old, and I am a student.ãã衚瀺ããŸãã
# <code>def student1 = new Student()</code>ïŒ<code>Student</code>ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹<code>student1</code>ãçæããŸãã
# <code>student1.name = "Charlie"</code>ïŒ<code>student1</code>ã€ã³ã¹ã¿ã³ã¹ã®<code>name</code>ããããã£ã«<code>"Charlie"</code>ã代å
¥ããŸãã
# <code>student1.age = 20</code>ïŒ<code>student1</code>ã€ã³ã¹ã¿ã³ã¹ã®<code>age</code>ããããã£ã«<code>20</code>ã代å
¥ããŸãã
# <code>student1.major = "Computer Science"</code>ïŒ<code>student1</code>ã€ã³ã¹ã¿ã³ã¹ã®<code>major</code>ããããã£ã«<code>"Computer Science"</code>ã代å
¥ããŸãã
# <code>student1.sayHello()</code>ïŒ<code>student1</code>ã€ã³ã¹ã¿ã³ã¹ã®<code>sayHello</code>ã¡ãœãããåŒã³åºãããHello, my name is Charlie, I am 20 years old, and I am a student.ããšè¡šç€ºããŸãã
# <code>student1.introduce()</code>ïŒ<code>student1</code>ã€ã³ã¹ã¿ã³ã¹ã®<code>introduce</code>ã¡ãœãããåŒã³åºãããI am a student majoring in Computer Science.ããšè¡šç€ºããŸãã
ãã®ã³ãŒãã§ã¯ã<code>Student</code>ã¯ã©ã¹ã<code>Person</code>ã¯ã©ã¹ãç¶æ¿ããŠããŸãã<code>Student</code>ã¯ã©ã¹ã«ã¯è¿œå ã®ããããã£<code>major</code>ãšã¡ãœãã<code>introduce</code>ããããŸãã<code>sayHello</code>ã¡ãœããã¯<code>Person</code>ã¯ã©ã¹ã®ã¡ãœããããªãŒããŒã©ã€ãããŠããŸãã
==== éçã¡ãœãããšãããã㣠====
:<syntaxhighlight lang=groovy>
// éçã¡ãœãããšããããã£
class MathUtils {
static int add(int a, int b) {
return a + b
}
static final double PI = 3.14159
}
def result = MathUtils.add(5, 3)
println result // çµæ: 8
println MathUtils.PI // çµæ: 3.14159
</syntaxhighlight>
# <code>static int add(int a, int b)</code>ïŒ<code>MathUtils</code>ã¯ã©ã¹ã«<code>add</code>ãšããéçã¡ãœãããå®çŸ©ããŸãããã®ã¡ãœããã¯2ã€ã®æŽæ°ãåãåãããããã®åãè¿ããŸãã
# <code>static final double PI = 3.14159</code>ïŒ<code>MathUtils</code>ã¯ã©ã¹ã«<code>PI</code>ãšããéçãªå®æ°ãå®çŸ©ããŸãã
# <code>def result = MathUtils.add(5, 3)</code>ïŒ<code>MathUtils</code>ã¯ã©ã¹ã®éçã¡ãœãã<code>add</code>ãåŒã³åºããŠã<code>5</code>ãš<code>3</code>ã®åãèšç®ããçµæã<code>result</code>å€æ°ã«ä»£å
¥ããŸãã
# <code>println result</code>ïŒ<code>result</code>å€æ°ã®å€ã衚瀺ããŸããçµæã¯<code>8</code>ãšãªããŸãã
# <code>println MathUtils.PI</code>ïŒ<code>MathUtils</code>ã¯ã©ã¹ã®éçãªå®æ°<code>PI</code>ã®å€ã衚瀺ããŸããçµæã¯<code>3.14159</code>ãšãªããŸãã
ãã®ã³ãŒãã§ã¯ã<code>MathUtils</code>ã¯ã©ã¹ãå®çŸ©ãããŠããŸãããã®ã¯ã©ã¹ã«ã¯éçã¡ãœãã<code>add</code>ãšéçå®æ°<code>PI</code>ããããŸããéçã¡ãœããã¯ã€ã³ã¹ã¿ã³ã¹åããã«ã¯ã©ã¹åã䜿ã£ãŠçŽæ¥åŒã³åºãããšãã§ããŸããåæ§ã«ãéçå®æ°ãã¯ã©ã¹åã䜿ã£ãŠã¢ã¯ã»ã¹ã§ããŸãã<code>result</code>å€æ°ã«ã¯<code>add</code>ã¡ãœããã®çµæã代å
¥ãããããã衚瀺ãããŸãããŸãã<code>MathUtils.PI</code>ã¯<code>PI</code>å®æ°ã®å€ã衚瀺ããŸãã
==== ã³ã³ã¹ãã©ã¯ã¿ãšã€ã³ã¹ã¿ã³ã¹ã¡ãœãã ====
:<syntaxhighlight lang=groovy>
// ã³ã³ã¹ãã©ã¯ã¿ãšã€ã³ã¹ã¿ã³ã¹ã¡ãœãã
class Rectangle {
int width
int height
Rectangle(int w, int h) {
width = w
height = h
}
int calculateArea() {
return width * height
}
}
def rectangle1 = new Rectangle(5, 3)
def area = rectangle1.calculateArea()
println area // çµæ: 15
</syntaxhighlight>
# <code>Rectangle(int w, int h)</code>ïŒ<code>Rectangle</code>ã¯ã©ã¹ã«ã³ã³ã¹ãã©ã¯ã¿ãå®çŸ©ããŸãããã®ã³ã³ã¹ãã©ã¯ã¿ã¯å¹
<code>w</code>ãšé«ã<code>h</code>ãåãåããããããã®å€ãã€ã³ã¹ã¿ã³ã¹ã®<code>width</code>ãš<code>height</code>ããããã£ã«ä»£å
¥ããŸãã
# <code>int calculateArea()</code>ïŒ<code>Rectangle</code>ã¯ã©ã¹ã«<code>calculateArea</code>ãšããã€ã³ã¹ã¿ã³ã¹ã¡ãœãããå®çŸ©ããŸãããã®ã¡ãœããã¯é·æ¹åœ¢ã®é¢ç©ãèšç®ããŠè¿ããŸãã
# <code>def rectangle1 = new Rectangle(5, 3)</code>ïŒ<code>Rectangle</code>ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹<code>rectangle1</code>ãçæããŸããåŒæ°<code>5</code>ãš<code>3</code>ã¯ã³ã³ã¹ãã©ã¯ã¿ã«æž¡ãããŸãã
# <code>def area = rectangle1.calculateArea()</code>ïŒ<code>rectangle1</code>ã€ã³ã¹ã¿ã³ã¹ã®<code>calculateArea</code>ã¡ãœãããåŒã³åºããŠãé¢ç©ãèšç®ããçµæã<code>area</code>å€æ°ã«ä»£å
¥ããŸãã
# <code>println area</code>ïŒ<code>area</code>å€æ°ã®å€ã衚瀺ããŸããçµæã¯<code>15</code>ãšãªããŸãã
ãã®ã³ãŒãã§ã¯ã<code>Rectangle</code>ã¯ã©ã¹ãå®çŸ©ãããŠããŸãããã®ã¯ã©ã¹ã«ã¯ã³ã³ã¹ãã©ã¯ã¿ãšã€ã³ã¹ã¿ã³ã¹ã¡ãœããããããŸããã³ã³ã¹ãã©ã¯ã¿ã¯ã€ã³ã¹ã¿ã³ã¹åæã«åŒã³åºãããå¹
ãšé«ãã®å€ãåãåã£ãŠã€ã³ã¹ã¿ã³ã¹ã®ããããã£ã«ä»£å
¥ããŸãã<code>calculateArea</code>ã¡ãœããã¯é·æ¹åœ¢ã®é¢ç©ãèšç®ããŠè¿ããŸãã<code>rectangle1</code>ã¯<code>Rectangle</code>ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ã§ããã<code>calculateArea</code>ã¡ãœãããåŒã³åºããŠé¢ç©ãèšç®ãããã®çµæã衚瀺ãããŸãã
==== ã¢ã¯ã»ãµã¡ãœãããšãããã㣠====
:<syntaxhighlight lang=groovy>
// ã¢ã¯ã»ãµã¡ãœãããšããããã£
class Person {
private String name
private int age
void setName(String n) {
name = n
}
String getName() {
return name
}
void setAge(int a) {
age = a
}
int getAge() {
return age
}
}
def person1 = new Person()
person1.setName("Alice")
person1.setAge(25)
println person1.getName() // çµæ: Alice
println person1.getAge() // çµæ: 25
</syntaxhighlight>
# <code>private String name</code>ïŒ<code>Person</code>ã¯ã©ã¹ã«<code>name</code>ãšãããã©ã€ããŒããªæåååã®ããããã£ãå®çŸ©ããŸããå€éšããçŽæ¥ã¢ã¯ã»ã¹ããããšã¯ã§ããŸããã
# <code>private int age</code>ïŒ<code>Person</code>ã¯ã©ã¹ã«<code>age</code>ãšãããã©ã€ããŒããªæŽæ°åã®ããããã£ãå®çŸ©ããŸãã
# <code>void setName(String n)</code>ïŒ<code>Person</code>ã¯ã©ã¹ã«<code>setName</code>ãšããã¡ãœãããå®çŸ©ããŸãããã®ã¡ãœããã¯åŒæ°<code>n</code>ãåãåãã<code>name</code>ããããã£ã«ä»£å
¥ããŸãã
# <code>String getName()</code>ïŒ<code>Person</code>ã¯ã©ã¹ã«<code>getName</code>ãšããã¡ãœãããå®çŸ©ããŸãããã®ã¡ãœããã¯<code>name</code>ããããã£ã®å€ãè¿ããŸãã
# <code>void setAge(int a)</code>ïŒ<code>Person</code>ã¯ã©ã¹ã«<code>setAge</code>ãšããã¡ãœãããå®çŸ©ããŸãããã®ã¡ãœããã¯åŒæ°<code>a</code>ãåãåãã<code>age</code>ããããã£ã«ä»£å
¥ããŸãã
# <code>int getAge()</code>ïŒ<code>Person</code>ã¯ã©ã¹ã«<code>getAge</code>ãšããã¡ãœãããå®çŸ©ããŸãããã®ã¡ãœããã¯<code>age</code>ããããã£ã®å€ãè¿ããŸãã
# <code>def person1 = new Person()</code>ïŒ<code>Person</code>ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹<code>person1</code>ãçæããŸãã
# <code>person1.setName("Alice")</code>ïŒ<code>person1</code>ã€ã³ã¹ã¿ã³ã¹ã®<code>setName</code>ã¡ãœãããåŒã³åºããŠãååãèšå®ããŸãã
# <code>person1.setAge(25)</code>ïŒ<code>person1</code>ã€ã³ã¹ã¿ã³ã¹ã®<code>setAge</code>ã¡ãœãããåŒã³åºããŠã幎霢ãèšå®ããŸãã
# <code>println person1.getName()</code>ïŒ<code>person1</code>ã€ã³ã¹ã¿ã³ã¹ã®<code>getName</code>ã¡ãœãããåŒã³åºããŠãååã衚瀺ããŸãã
# <code>println person1.getAge()</code>ïŒ<code>person1</code>ã€ã³ã¹ã¿ã³ã¹ã®<code>getAge</code>ã¡ãœãããåŒã³åºããŠã幎霢ã衚瀺ããŸãã
ãã®ã³ãŒãã§ã¯ã<code>Person</code>ã¯ã©ã¹ã«ãã©ã€ããŒããªããããã£<code>name</code>ãš<code>age</code>ãå®çŸ©ãããŠããŸããããããã£ã«ã¯å€éšããçŽæ¥ã¢ã¯ã»ã¹ã§ããªãããã<code>setName</code>ãš<code>setAge</code>ã®ãããªã¡ãœãããçšæããŸãããã®ãããªã¡ãœãããã¢ã¯ã»ãµã¡ãœãããšåŒã³ãŸãã
==== ç¶æ¿ãšããªã¢ãŒãã£ãºã ====
:<syntaxhighlight lang=groovy>
// ç¶æ¿ãšããªã¢ãŒãã£ãºã
class Animal {
String sound() {
return "Animal makes a sound."
}
}
class Cat extends Animal {
String sound() {
return "Meow!"
}
}
class Dog extends Animal {
String sound() {
return "Woof!"
}
}
Animal animal1 = new Animal()
println animal1.sound() // çµæ: Animal makes a sound.
Animal cat1 = new Cat()
println cat1.sound() // çµæ: Meow!
Animal dog1 = new Dog()
println dog1.sound() // çµæ: Woof!
</syntaxhighlight>
# <code>class Animal</code>ïŒ<code>Animal</code>ã¯ã©ã¹ãå®çŸ©ãããŠããŸãããã®ã¯ã©ã¹ã«ã¯<code>sound</code>ãšããã¡ãœãããããã"Animal makes a sound."ãšããæååãè¿ããŸãã
# <code>class Cat extends Animal</code>ïŒ<code>Cat</code>ã¯ã©ã¹ã<code>Animal</code>ã¯ã©ã¹ãç¶æ¿ããŠããŸãã<code>Cat</code>ã¯ã©ã¹ã¯<code>sound</code>ã¡ãœããããªãŒããŒã©ã€ããã"Meow!"ãšããæååãè¿ããŸãã
# <code>class Dog extends Animal</code>ïŒ<code>Dog</code>ã¯ã©ã¹ã<code>Animal</code>ã¯ã©ã¹ãç¶æ¿ããŠããŸãã<code>Dog</code>ã¯ã©ã¹ã<code>sound</code>ã¡ãœããããªãŒããŒã©ã€ããã"Woof!"ãšããæååãè¿ããŸãã
# <code>Animal animal1 = new Animal()</code>ïŒ<code>Animal</code>ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹<code>animal1</code>ãçæããŸãã
# <code>println animal1.sound()</code>ïŒ<code>animal1</code>ã€ã³ã¹ã¿ã³ã¹ã®<code>sound</code>ã¡ãœãããåŒã³åºããŠãçµæã衚瀺ããŸãã<code>Animal</code>ã¯ã©ã¹ã®<code>sound</code>ã¡ãœãããå®è¡ããã"Animal makes a sound."ã衚瀺ãããŸãã
# <code>Animal cat1 = new Cat()</code>ïŒ<code>Cat</code>ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹<code>cat1</code>ã<code>Animal</code>åã®å€æ°ã«ä»£å
¥ããŸããããªã¢ãŒãã£ãºã ã®ç¹æ§ã«ããã<code>cat1</code>ã¯<code>Animal</code>ã¯ã©ã¹ãšããŠæ±ãããŸãã
# <code>println cat1.sound()</code>ïŒ<code>cat1</code>ã€ã³ã¹ã¿ã³ã¹ã®<code>sound</code>ã¡ãœãããåŒã³åºããŠãçµæã衚瀺ããŸãã<code>Cat</code>ã¯ã©ã¹ã®<code>sound</code>ã¡ãœãããå®è¡ããã"Meow!"ã衚瀺ãããŸãã
# <code>Animal dog1 = new Dog()</code>ïŒ<code>Dog</code>ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹<code>dog1</code>ã<code>Animal</code>åã®å€æ°ã«ä»£å
¥ããŸããåæ§ã«ã<code>dog1</code>ã¯<code>Animal</code>ã¯ã©ã¹ãšããŠæ±ãããŸãã
# <code>println dog1.sound()</code>ïŒ<code>dog1</code>ã€ã³ã¹ã¿ã³ã¹ã®<code>sound</code>ã¡ãœãããåŒã³åºããŠãçµæã衚瀺ããŸãã<code>Dog</code>ã¯ã©ã¹ã®<code>sound</code>ã¡ãœãããå®è¡ããã"Woof!"ã衚瀺ãããŸãã
==== æœè±¡ã¯ã©ã¹ãšã€ã³ã¿ãŒãã§ãŒã¹ ====
:<syntaxhighlight lang=groovy>
// æœè±¡ã¯ã©ã¹ãšã€ã³ã¿ãŒãã§ãŒã¹
abstract class Shape {
abstract double calculateArea()
abstract double calculatePerimeter()
}
class Circle extends Shape {
double radius
Circle(double r) {
radius = r
}
double calculateArea() {
return Math.PI * radius * radius
}
double calculatePerimeter() {
return 2 * Math.PI * radius
}
}
interface Drawable {
void draw()
}
class Square implements Drawable {
double sideLength
Square(double length) {
sideLength = length
}
void draw() {
println "Drawing a square"
}
}
Circle circle = new Circle(5)
println "Circle area: ${circle.calculateArea()}" // çµæ: Circle area: 78.53981633974483
println "Circle perimeter: ${circle.calculatePerimeter()}" // çµæ: Circle perimeter: 31.41592653589793
Square square = new Square(10)
square.draw() // çµæ: Drawing a square
</syntaxhighlight>
# <code>abstract class Shape</code>ïŒ<code>Shape</code>ãšããæœè±¡ã¯ã©ã¹ãå®çŸ©ãããŠããŸãããã®ã¯ã©ã¹ã¯<code>calculateArea</code>ãš<code>calculatePerimeter</code>ãšããæœè±¡ã¡ãœãããæã¡ãŸããæœè±¡ã¯ã©ã¹ã¯çŽæ¥ã€ã³ã¹ã¿ã³ã¹åã§ãããç¶æ¿ããŠå©çšããå¿
èŠããããŸãã
# <code>abstract double calculateArea()</code>ïŒ<code>Shape</code>ã¯ã©ã¹ã«ã¯æœè±¡ã¡ãœãã<code>calculateArea</code>ããããŸããå
·äœçãªå®è£
ã¯ãµãã¯ã©ã¹ã§è¡ãããŸãã
# <code>abstract double calculatePerimeter()</code>ïŒ<code>Shape</code>ã¯ã©ã¹ã«ã¯æœè±¡ã¡ãœãã<code>calculatePerimeter</code>ããããŸãããã¡ããå
·äœçãªå®è£
ã¯ãµãã¯ã©ã¹ã§è¡ãããŸãã
# <code>class Circle extends Shape</code>ïŒ<code>Circle</code>ã¯ã©ã¹ã<code>Shape</code>ã¯ã©ã¹ãç¶æ¿ããŠããŸãã<code>Circle</code>ã¯ã©ã¹ã§ã¯<code>radius</code>ãšãããã£ãŒã«ããæã¡ã<code>calculateArea</code>ãš<code>calculatePerimeter</code>ã¡ãœããããªãŒããŒã©ã€ãããŠããŸãã
# <code>double calculateArea()</code>ïŒ<code>Circle</code>ã¯ã©ã¹ã«ã¯<code>calculateArea</code>ã¡ãœããããããŸããåã®é¢ç©ãèšç®ããŠè¿ããŸãã
# <code>interface Drawable</code>ïŒ<code>Drawable</code>ãšããã€ã³ã¿ãŒãã§ãŒã¹ãå®çŸ©ãããŠããŸãããã®ã€ã³ã¿ãŒãã§ãŒã¹ã¯<code>draw</code>ãšããã¡ãœãããæã¡ãŸãã
# <code>class Square implements Drawable</code>ïŒ<code>Square</code>ã¯ã©ã¹ã<code>Drawable</code>ã€ã³ã¿ãŒãã§ãŒã¹ãå®è£
ããŠããŸãã<code>Square</code>ã¯ã©ã¹ã¯<code>sideLength</code>ãšãããã£ãŒã«ããæã¡ã<code>draw</code>ã¡ãœãããå®è£
ããŠããŸãã
# <code>Circle circle = new Circle(5)</code>ïŒ<code>Circle</code>ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹<code>circle</code>ãçæããŸãã
# <code>println "Circle area: ${circle.calculateArea()}"</code>ïŒ<code>circle</code>ã€ã³ã¹ã¿ã³ã¹ã®<code>calculateArea</code>ã¡ãœãããåŒã³åºããçµæã衚瀺ããŸãã
# <code>println "Circle perimeter: ${circle.calculatePerimeter()}"</code>ïŒ<code>circle</code>ã€ã³ã¹ã¿ã³ã¹ã®<code>calculatePerimeter</code>ã¡ãœãããåŒã³åºããçµæã衚瀺ããŸãã
# <code>Square square = new Square(10)</code>ïŒ<code>Square</code>ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹<code>square</code>ãçæããŸãã
# <code>square.draw()</code>ïŒ<code>square</code>ã€ã³ã¹ã¿ã³ã¹ã®<code>draw</code>ã¡ãœãããåŒã³åºããçµæã衚瀺ããŸãã
ãã®ã³ãŒãã§ã¯ãæœè±¡ã¯ã©ã¹ãšã€ã³ã¿ãŒãã§ãŒã¹ã®æŠå¿µã瀺ããŠããŸãã<code>Shape</code>ã¯ã©ã¹ã¯æœè±¡ã¯ã©ã¹ã§ããããµãã¯ã©ã¹ã§ãã<code>Circle</code>ã¯ã©ã¹ã<code>calculateArea</code>ãš<code>calculatePerimeter</code>ã¡ãœãããå®è£
ããŠããŸãããŸãã<code>Drawable</code>ã€ã³ã¿ãŒãã§ãŒã¹ãå®è£
ãã<code>Square</code>ã¯ã©ã¹ã§ã¯ã<code>draw</code>ã¡ãœãããå®çŸ©ããŠããŸãã
<code>Circle</code>ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãäœæãã<code>calculateArea</code>ãš<code>calculatePerimeter</code>ã¡ãœãããåŒã³åºããŠåã®é¢ç©ãšååšãèšç®ããŸãããŸãã<code>Square</code>ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãäœæãã<code>draw</code>ã¡ãœãããåŒã³åºããŠåè§åœ¢ãæç»ããŸãã
çµæãšããŠãåã®é¢ç©ãšååšã衚瀺ãããåè§åœ¢ãæç»ãããŸãã
==== ã¯ã©ã¹ã®ç¶æ¿ãšãªãŒããŒã©ã€ã ====
:<syntaxhighlight lang=groovy>
// ã¯ã©ã¹ã®ç¶æ¿ãšãªãŒããŒã©ã€ã
class Vehicle {
String brand
Vehicle(String brand) {
this.brand = brand
}
void drive() {
println "Driving the $brand vehicle"
}
}
class Car extends Vehicle {
Car(String brand) {
super(brand)
}
@Override
void drive() {
println "Driving the $brand car"
}
}
class Bicycle extends Vehicle {
Bicycle(String brand) {
super(brand)
}
@Override
void drive() {
println "Riding the $brand bicycle"
}
}
Vehicle vehicle = new Vehicle("Generic")
vehicle.drive() // çµæ: Driving the Generic vehicle
Car car = new Car("Toyota")
car.drive() // çµæ: Driving the Toyota car
Bicycle bicycle = new Bicycle("Giant")
bicycle.drive() // çµæ: Riding the Giant bicycle
</syntaxhighlight>
# <code>class Vehicle</code>ïŒ<code>Vehicle</code>ã¯ã©ã¹ãå®çŸ©ãããŠããŸãããã®ã¯ã©ã¹ã¯<code>brand</code>ãšãããã£ãŒã«ããæã¡ã<code>drive</code>ãšããã¡ãœããããããŸãã
# <code>Vehicle(String brand)</code>ïŒ<code>Vehicle</code>ã¯ã©ã¹ã®ã³ã³ã¹ãã©ã¯ã¿ã§ããåŒæ°ã§æž¡ããã<code>brand</code>ãã€ã³ã¹ã¿ã³ã¹ãã£ãŒã«ãã«ä»£å
¥ããŸãã
# <code>void drive()</code>ïŒ<code>Vehicle</code>ã¯ã©ã¹ã«ã¯<code>drive</code>ã¡ãœããããããŸããããã©ã«ãã®å®è£
ã§ã¯ã"$brand vehicle"ãšè¡šç€ºããŸãã
# <code>class Car extends Vehicle</code>ïŒ<code>Car</code>ã¯ã©ã¹ã<code>Vehicle</code>ã¯ã©ã¹ãç¶æ¿ããŠããŸãã<code>Car</code>ã¯ã©ã¹ã§ã¯ã芪ã¯ã©ã¹ã®ã³ã³ã¹ãã©ã¯ã¿ãåŒã³åºãããã®<code>super</code>ããŒã¯ãŒãã䜿çšããŠããŸãã
# <code>@Override</code>ïŒ<code>Car</code>ã¯ã©ã¹ã®<code>drive</code>ã¡ãœããã«ã¯<code>@Override</code>ã¢ãããŒã·ã§ã³ãä»ããŠããŸããããã¯ãã¡ãœããã芪ã¯ã©ã¹ã®ã¡ãœããããªãŒããŒã©ã€ãããŠããããšã瀺ããŠããŸãã
# <code>void drive()</code>ïŒ<code>Car</code>ã¯ã©ã¹ã«ã¯ãªãŒããŒã©ã€ãããã<code>drive</code>ã¡ãœããããããŸãã"Driving the $brand car"ãšè¡šç€ºããŸãã
# <code>class Bicycle extends Vehicle</code>ïŒ<code>Bicycle</code>ã¯ã©ã¹ã<code>Vehicle</code>ã¯ã©ã¹ãç¶æ¿ããŠããŸããåæ§ã«ã芪ã¯ã©ã¹ã®ã³ã³ã¹ãã©ã¯ã¿ãåŒã³åºãããã®<code>super</code>ããŒã¯ãŒãã䜿çšããŠããŸãã
# <code>@Override</code>ïŒ<code>Bicycle</code>ã¯ã©ã¹ã®<code>drive</code>ã¡ãœããã«ã<code>@Override</code>ã¢ãããŒã·ã§ã³ãä»ããŠããŸãã
# <code>void drive()</code>ïŒ<code>Bicycle</code>ã¯ã©ã¹ã«ã¯ãªãŒããŒã©ã€ãããã<code>drive</code>ã¡ãœããããããŸãã"Riding the $brand bicycle"ãšè¡šç€ºããŸãã
# <code>Vehicle vehicle = new Vehicle("Generic")</code>ïŒ<code>Vehicle</code>ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹<code>vehicle</code>ãçæããŸãã
# <code>vehicle.drive()</code>ïŒ<code>vehicle.drive()</code> // çµæ: Driving the Generic vehicle
# <code>Car car = new Car("Toyota")</code>ïŒ<code>Car</code>ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹<code>car</code>ãçæããŸãã
# <code>car.drive()</code>ïŒ<code>car</code>ã€ã³ã¹ã¿ã³ã¹ã®<code>drive</code>ã¡ãœãããåŒã³åºããçµæã衚瀺ããŸãã
# <code>Bicycle bicycle = new Bicycle("Giant")</code>ïŒ<code>Bicycle</code>ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹<code>bicycle</code>ãçæããŸãã
# <code>bicycle.drive()</code>ïŒ<code>bicycle</code>ã€ã³ã¹ã¿ã³ã¹ã®<code>drive</code>ã¡ãœãããåŒã³åºããçµæã衚瀺ããŸãã
ãã®ã³ãŒãã§ã¯ãã¯ã©ã¹ã®ç¶æ¿ãšã¡ãœããã®ãªãŒããŒã©ã€ãã®äŸã瀺ããŠããŸãã<code>Vehicle</code>ã¯ã©ã¹ã¯èŠªã¯ã©ã¹ãšããŠå®çŸ©ãããŠããã<code>Car</code>ã¯ã©ã¹ãš<code>Bicycle</code>ã¯ã©ã¹ããããç¶æ¿ããŠããŸãã
<code>Vehicle</code>ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãäœæãã<code>drive</code>ã¡ãœãããåŒã³åºããšã"Driving the Generic vehicle"ãšè¡šç€ºãããŸãã
<code>Car</code>ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãäœæãã<code>drive</code>ã¡ãœãããåŒã³åºããšã"Driving the Toyota car"ãšè¡šç€ºãããŸãã<code>Car</code>ã¯ã©ã¹ã§ã¯<code>@Override</code>ã¢ãããŒã·ã§ã³ã䜿çšããŠ<code>drive</code>ã¡ãœããããªãŒããŒã©ã€ãããŠããŸãã
<code>Bicycle</code>ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãäœæãã<code>drive</code>ã¡ãœãããåŒã³åºããšã"Riding the Giant bicycle"ãšè¡šç€ºãããŸããåæ§ã«ã<code>Bicycle</code>ã¯ã©ã¹ã§ã<code>drive</code>ã¡ãœããããªãŒããŒã©ã€ãããŠããŸãã
ããã«ãããç°ãªãã¯ã©ã¹ã芪ã¯ã©ã¹ã®ã¡ãœããããªãŒããŒã©ã€ãããããããã®ç¹å®ã®åäœãå®è¡ããããšãã§ããããã«ãªããŸãã
== Groovyã®å¿çš ==
=== ãã¡ã€ã«å
¥åºå ===
=== æ£èŠè¡šçŸ ===
=== XMLã®åŠç ===
=== JSONã®åŠç ===
=== ããŒã¿ããŒã¹ã¢ã¯ã»ã¹ ===
=== Webã¢ããªã±ãŒã·ã§ã³éçº ===
=== ãã¹ãèªåå ===
=== Groovyã¹ã¯ãªããã®å®è¡ ===
== Groovyã®æ¡åŒµ ==
=== Groovy DSLã®äœæ ===
=== ASTå€æ ===
=== Groovyã¡ã¿ããã°ã©ãã³ã° ===
=== Groovyã®Javaçµ±å ===
=== Grailsã®çŽ¹ä» ===
== Groovyã®ææ°ãããã¯ã¹ ==
=== éåæåŠç ===
=== ãªã¢ã¯ãã£ãããã°ã©ãã³ã° ===
=== ãã«ãã¹ã¬ããåŠç ===
=== Groovyã®ææ°æ©èœ ===
=== Groovyã®å°æ¥å±æ ===
== ä»é²ïŒGroovyãªãã¡ã¬ã³ã¹ ==
:<syntaxhighlight lang=groovy>
// ã³ã¡ã³ãã¯ãã®ããã«æžãããšãã§ããŸã
// å€æ°ã®å®£èš
def x = 10
def y = "Hello World"
def z = true
// æååã®åºå
println "x = ${x}, y = ${y}, z = ${z}"
// å¶åŸ¡ãããŒ
if (x > 5) {
println "x is greater than 5"
} else {
println "x is less than or equal to 5"
}
// ã«ãŒã
for (i in 0..4) {
println i
}
// ãªã¹ã
def myList = [1, 2, 3, 4, 5]
// ãªã¹ãã®èŠçŽ ãåºå
println myList[0]
println myList[-1]
// ãªã¹ãã®èŠçŽ ãã«ãŒãã§åºå
myList.each { println it }
// ãªã¹ãã®æäœ
myList.add(6)
myList.remove(2)
myList.each { println it }
// ããã
def myMap = [key1: "value1", key2: "value2", key3: "value3"]
// ãããã®å€ãåºå
println myMap.key1
println myMap["key2"]
println myMap.get("key3")
// ãããã®ããŒãšå€ãã«ãŒãã§åºå
myMap.each { key, value -> println "${key} = ${value}" }
// ã¯ã©ã¹
class MyClass {
def myMethod() {
println "My Method"
}
}
// ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹åãšã¡ãœããã®åŒã³åºã
def myObject = new MyClass()
myObject.myMethod()
// ç¶æ¿
class MySubClass extends MyClass {
def mySubMethod() {
println "My Sub Method"
}
}
// ãµãã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹åãšã¡ãœããã®åŒã³åºã
def mySubObject = new MySubClass()
mySubObject.myMethod()
mySubObject.mySubMethod()
</syntaxhighlight>
=== Groovyã®ææ³ãAPIã®ãªãã¡ã¬ã³ã¹ ===
==== ææ³ ====
;å€æ°å®£èšãšåæå
:Groovyã§ã¯ãå€æ°ã®å宣èšãå¿
èŠãããŸããããŸããå€æ°ã®åæåãå¿
èŠãªå Žåã§ããåæå€ãçç¥ããããšãã§ããŸãã
:<syntaxhighlight lang=groovy>
def age = 30
</syntaxhighlight>
;ã¡ãœããã®å®çŸ©
:Groovyã§ã¯ãã¡ãœããã®åŒæ°ãªã¹ããæ»ãå€åãçç¥ããããšãã§ããŸãããŸããã¡ãœããåã«å¯ŸããŠåŒæ°ãæå®ããããšãã§ããŸãã
:<syntaxhighlight lang=groovy>
def sayHello(name) {
println "Hello, $name!"
}
</syntaxhighlight>
;æååã®æäœ
:Groovyã§ã¯ãæååã®é£çµã«+æŒç®åã䜿çšããããšãã§ããŸãããŸããæååå
ã«å€æ°ãåŒãåã蟌ãããšãã§ããŸãã
:<syntaxhighlight lang=groovy>
def name = "John"
def message = "Hello, ${name}!"
</syntaxhighlight>
;ãªã¹ãããããã®æäœ
:Groovyã§ã¯ããªã¹ãããããã®èŠçŽ ã«å¯ŸããŠããããæŒç®åã䜿çšããŠçŽæ¥æäœããããšãã§ããŸãã
:<syntaxhighlight lang=groovy>
def list = [1, 2, 3]
def map = [name: 'John', age: 30]
list.add(4)
map.age = 31
</syntaxhighlight>
;ã¹ã³ãŒã
:Groovyã§ã¯ãå€æ°ã®ã¹ã³ãŒããæ瀺çã«æå®ããããšãã§ããŸãããŸããã¯ããŒãžã£ãã°ããŒãã«å€æ°ã®å®çŸ©ã«ã察å¿ããŠããŸãã
==== API ====
;æååé¢é£
:Groovyã§ã¯ãJavaã®Stringã¯ã©ã¹ã«å ããæååæäœã容æã«ããããã®æ¡åŒµã¡ãœãããçšæãããŠããŸããäŸãã°ãæååã®å
é ãæ«å°Ÿã«æååãè¿œå ããããšãã§ããŸãã
:<syntaxhighlight lang=groovy>
def str = "Hello"
str = str.plus(" World")
</syntaxhighlight>
;ã³ã¬ã¯ã·ã§ã³é¢é£
:Groovyã§ã¯ãJavaã®CollectionãMapãªã©ã®ã€ã³ã¿ãã§ãŒã¹ã«å¯ŸããŠãæ¡åŒµã¡ãœãããçšæãããŠããŸããäŸãã°ããªã¹ãããããããç¹å®ã®èŠçŽ ãååŸããã¡ãœããããæ¡ä»¶ã«åèŽããèŠçŽ ãæœåºããã¡ãœãããªã©ããããŸãã
:<syntaxhighlight lang=groovy>
def list = [1, 2, 3, 4, 5]
def evenList = list.findAll { it % 2 == 0 }
</syntaxhighlight>
;ãã¡ã€ã«å
¥åºåé¢é£
:Groovyã§ã¯ãJavaã®Fileã¯ã©ã¹ã«å ãããã¡ã€ã«å
¥åºåã容æã«ããããã®æ¡åŒµã¡ãœãããçšæãããŠããŸããäŸãã°ããã¡ã€ã«ããäžè¡ãã€èªã¿èŸŒãã§åŠçãããã¡ãœãããããã¡ã€ã«ã«æžã蟌ãã¡ãœããããããŸãã
:<syntaxhighlight lang=groovy>
def file = new File("example.txt")
file.eachLine { line -> println line }
file.write("Hello, world!")
</syntaxhighlight>
;䞊ååŠçé¢é£
:Groovyã§ã¯ãJavaã®äžŠååŠçã©ã€ãã©ãªã§ããJava.util.concurrentããã±ãŒãžãå©çšããããšãã§ããŸãããŸããGroovyç¬èªã®äžŠååŠçæ©èœãçšæãããŠããŸããäŸãã°ãParallelã³ã¬ã¯ã·ã§ã³ã䜿çšããŠãè€æ°ã®ã¹ã¬ããã§ã³ã¬ã¯ã·ã§ã³ãåŠçããããšãã§ããŸãã
:<syntaxhighlight lang=groovy>
def list = (1..10)
def parallelList = list.parallel()
parallelList.each { println it }
</syntaxhighlight>
以äžã¯ãGroovyã®ææ³ãAPIã®äžéšã§ããGroovyã¯Javaã®æ¡åŒµçã§ãããããJavaãšåããããªããžã§ã¯ãæåèšèªãšããŠã®ç¹æ§ãæã£ãŠããŸããGroovyã®æ©èœã掻çšããããšã§ãJavaãããç°¡æœã§è¡šçŸåè±ããªã³ãŒããæžãããšãã§ããŸãããŸããJavaã®ã©ã€ãã©ãªã容æã«äœ¿çšããããšãã§ãããããJavaéçºè
ã«ãšã£ãŠã芪åæ§ãé«ãèšèªãšãªã£ãŠããŸãã
=== ãã䜿ãGroovyã®ã³ãŒãäŸ ===
[[ã«ããŽãª:ããã°ã©ãã³ã°èšèª]] | 2023-03-15T23:05:16Z | 2024-02-05T00:26:42Z | [
"ãã³ãã¬ãŒã:ã³ã©ã "
] | https://ja.wikibooks.org/wiki/Groovy |
37,246 | Gradle | Gradleã¯åŒ·åãªãã«ãããŒã«ã§ãJavaãKotlinãGroovyãªã©ã®ãããžã§ã¯ãã®æ§ç¯ãæ¯æŽããŸããæ¬æã§ã¯Gradleã®åºæ¬çãªäœ¿ãæ¹ã解説ããŸãããŸããGradleãã€ã³ã¹ããŒã«ããJavaãããžã§ã¯ãã®éªšæ ŒãçæããŸãããã®åŸããã«ãããã¹ããå®è¡ã®æé ãé ã«èª¬æããŸããGradleã¯æè»ã§æ¡åŒµæ§ããããæšæºã®ãã«ãã©ã€ããµã€ã¯ã«ã«å ããŠã«ã¹ã¿ã ã¿ã¹ã¯ããã©ã°ã€ã³ãå©çšã§ããŸããããã«ããããããžã§ã¯ãã®ãã«ãããã»ã¹ãå¹æçã«ç®¡çã§ããŸãã
Gradleã䜿çšããŠãããžã§ã¯ãããããã€ããã«ã¯ã以äžã®æé ãå®è¡ããŸãã
build.gradleãã¡ã€ã«ã«ããããã€ã«å¿
èŠãªèšå®ãè¿œå ããŸããäŸãã°ããªããžããªã®URLãã°ã«ãŒãIDãã¢ãŒãã£ãã¡ã¯ãIDãããŒãžã§ã³ãªã©ãèšå®ããŸãã
ãããã®æé ã¯ãåºæ¬çãªGradleãããžã§ã¯ãã®äœæãšæäœã«é¢ãããã®ã§ãããããžã§ã¯ãã®ããŒãºã«å¿ããŠãè¿œå ã®èšå®ããã©ã°ã€ã³ã®äœ¿çšãå¿
èŠãããããŸããã
以äžã¯ãgradle init --type ã³ãã³ãã§æå®ã§ããäžè¬çãªãããžã§ã¯ãã¿ã€ãã®äžèŠ§ã§ãã
ãããã®ã¿ã€ãã䜿çšãããšãç°ãªãçš®é¡ã®ãããžã§ã¯ãã®éªšæ ŒãçŽ æ©ãäœæã§ããŸããããšãã°ãgradle init --type java-application ã³ãã³ãã¯ãJavaã¢ããªã±ãŒã·ã§ã³çšã®ãã£ã¬ã¯ããªæ§é ãšèšå®ãã¡ã€ã«ãå«ããããžã§ã¯ããçæããŸãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "Gradleã¯åŒ·åãªãã«ãããŒã«ã§ãJavaãKotlinãGroovyãªã©ã®ãããžã§ã¯ãã®æ§ç¯ãæ¯æŽããŸããæ¬æã§ã¯Gradleã®åºæ¬çãªäœ¿ãæ¹ã解説ããŸãããŸããGradleãã€ã³ã¹ããŒã«ããJavaãããžã§ã¯ãã®éªšæ ŒãçæããŸãããã®åŸããã«ãããã¹ããå®è¡ã®æé ãé ã«èª¬æããŸããGradleã¯æè»ã§æ¡åŒµæ§ããããæšæºã®ãã«ãã©ã€ããµã€ã¯ã«ã«å ããŠã«ã¹ã¿ã ã¿ã¹ã¯ããã©ã°ã€ã³ãå©çšã§ããŸããããã«ããããããžã§ã¯ãã®ãã«ãããã»ã¹ãå¹æçã«ç®¡çã§ããŸãã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "Gradleã䜿çšããŠãããžã§ã¯ãããããã€ããã«ã¯ã以äžã®æé ãå®è¡ããŸãã",
"title": "åºæ¬çãªæäœ"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "build.gradleãã¡ã€ã«ã«ããããã€ã«å¿
èŠãªèšå®ãè¿œå ããŸããäŸãã°ããªããžããªã®URLãã°ã«ãŒãIDãã¢ãŒãã£ãã¡ã¯ãIDãããŒãžã§ã³ãªã©ãèšå®ããŸãã",
"title": "åºæ¬çãªæäœ"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "ãããã®æé ã¯ãåºæ¬çãªGradleãããžã§ã¯ãã®äœæãšæäœã«é¢ãããã®ã§ãããããžã§ã¯ãã®ããŒãºã«å¿ããŠãè¿œå ã®èšå®ããã©ã°ã€ã³ã®äœ¿çšãå¿
èŠãããããŸããã",
"title": "åºæ¬çãªæäœ"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "以äžã¯ãgradle init --type ã³ãã³ãã§æå®ã§ããäžè¬çãªãããžã§ã¯ãã¿ã€ãã®äžèŠ§ã§ãã",
"title": "ãããžã§ã¯ãã¿ã€ã"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "ãããã®ã¿ã€ãã䜿çšãããšãç°ãªãçš®é¡ã®ãããžã§ã¯ãã®éªšæ ŒãçŽ æ©ãäœæã§ããŸããããšãã°ãgradle init --type java-application ã³ãã³ãã¯ãJavaã¢ããªã±ãŒã·ã§ã³çšã®ãã£ã¬ã¯ããªæ§é ãšèšå®ãã¡ã€ã«ãå«ããããžã§ã¯ããçæããŸãã",
"title": "ãããžã§ã¯ãã¿ã€ã"
}
] | Gradleã¯åŒ·åãªãã«ãããŒã«ã§ãJavaãKotlinãGroovyãªã©ã®ãããžã§ã¯ãã®æ§ç¯ãæ¯æŽããŸããæ¬æã§ã¯Gradleã®åºæ¬çãªäœ¿ãæ¹ã解説ããŸãããŸããGradleãã€ã³ã¹ããŒã«ããJavaãããžã§ã¯ãã®éªšæ ŒãçæããŸãããã®åŸããã«ãããã¹ããå®è¡ã®æé ãé ã«èª¬æããŸããGradleã¯æè»ã§æ¡åŒµæ§ããããæšæºã®ãã«ãã©ã€ããµã€ã¯ã«ã«å ããŠã«ã¹ã¿ã ã¿ã¹ã¯ããã©ã°ã€ã³ãå©çšã§ããŸããããã«ããããããžã§ã¯ãã®ãã«ãããã»ã¹ãå¹æçã«ç®¡çã§ããŸãã | Gradleã¯ãè¿
éã§ä¿¡é Œæ§ããããæŽç·Žããã宣èšåãã«ãèšèªãåããæè»æ§ã®é«ããªãŒãã³ãœãŒã¹ã®ãã«ãèªååããŒã«ã§ãããã®ãŠãŒã¶ãŒããã¥ã¢ã«ã§ã¯ãGradleãã«ãããŒã«ãGradleãšç¥ããŠããŸãã
Gradleã¯ãJVMïŒJava Virtual MachineïŒJavaä»®æ³æ©æ¢°ïŒåãã®æã人æ°ã®ãããã«ãã·ã¹ãã ã§ãããAndroidããã³Kotlin Multi-Platformãããžã§ã¯ãã®ããã©ã«ãã·ã¹ãã ã§ããããŸãããŸããè±å¯ãªã³ãã¥ããã£ãã©ã°ã€ã³ãšã³ã·ã¹ãã ãååšããçµã¿èŸŒã¿ã®æ©èœããµãŒãããŒãã£ã®ãã©ã°ã€ã³ããŸãã¯ã«ã¹ã¿ã ãã«ãããžãã¯ã䜿çšããŠãããŸããŸãªãœãããŠã§ã¢ãã«ãã·ããªãªãèªååã§ããŸãã
== Gradleã®ã€ã³ã¹ããŒã« ==
# Gradleã®å
¬åŒãŠã§ããµã€ã ããææ°ããŒãžã§ã³ã®GradleãããŠã³ããŒãããŸãã
# ããŠã³ããŒããããã¡ã€ã«ãé©åãªå Žæã«è§£åããŸãã
# ç°å¢å€æ° <code>GRADLE_HOME</code> ã解åãããã£ã¬ã¯ããªã®ãã¹ã«èšå®ããŸãã
# <code>PATH</code> ç°å¢å€æ°ã« Gradle ã® <code>bin</code> ãã£ã¬ã¯ããªãè¿œå ããŸãã
# ã€ã³ã¹ããŒã«ãæåããã確èªããããã«ãã¿ãŒããã«ãã³ãã³ãããã³ãã㧠<code>gradle -v</code> ãå®è¡ããŠããŒãžã§ã³æ
å ±ã衚瀺ãããã確èªããŸãã
== åºæ¬çãªæäœ ==
=== Gradleãããžã§ã¯ãã®äœæ ===
# æ°ãããã£ã¬ã¯ããªãäœæãããã®ãã£ã¬ã¯ããªã«ç§»åããŸããããã§ã¯ <code>MyJavaProj/</code> ãšããŸãã
#: <syntaxhighlight lang=shell>
mkdir MyJavaProj/ && cd MyJavaProj/
</syntaxhighlight>
# Gradleãããžã§ã¯ãã®éªšæ ŒãçæããŸãã
#: <syntaxhighlight lang=shell>
gradle init --type java-application
</syntaxhighlight>
# ãããžã§ã¯ãã®ãã£ã¬ã¯ããªæ§é
#: Gradleã«ãã£ãŠçæããããããžã§ã¯ãã¯ã以äžã®ãããªæ§é ã«ãªã£ãŠããŸãã
#: <syntaxhighlight lang=text>
MyJavaProj/
âââ src/
â âââ main/
â â âââ java/
â â â âââ App.java
â â âââ resources/
â âââ test/
â âââ java/
â â âââ AppTest.java
â âââ resources/
âââ gradlew
âââ gradlew.bat
âââ build.gradle
âââ settings.gradle
</syntaxhighlight>
; src/main/java/App.java
: ãããžã§ã¯ãã®ãœãŒã¹ãã¡ã€ã«ã§ãã
: Gradle 8.5 ã§ã¯æ¬¡ã®ãããªãã¡ã€ã«ãçæãããŸãã
: <syntaxhighlight lang=java>
/*
* This Java source file was generated by the Gradle 'init' task.
*/
package myjavaproj;
public class App {
public String getGreeting() {
return "Hello World!";
}
public static void main(String[] args) {
System.out.println(new App().getGreeting());
}
}
</syntaxhighlight>
; src/test/java/AppTest.java
: ãããžã§ã¯ãã®ãŠããããã¹ãã§ãã
: <syntaxhighlight lang=java>
/*
* This Java source file was generated by the Gradle 'init' task.
*/
package myjavaproj;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class AppTest {
@Test void appHasAGreeting() {
App classUnderTest = new App();
assertNotNull(classUnderTest.getGreeting(), "app should have a greeting");
}
}
</syntaxhighlight>
=== Gradleãããžã§ã¯ãã®ãã«ã ===
# ãããžã§ã¯ããã£ã¬ã¯ããªã§ã以äžã®ã³ãã³ããå®è¡ããŸãã
#: <syntaxhighlight lang=shell>
gradle build
</syntaxhighlight>
# ãã«ããæåãããšã<code>build</code> ãã£ã¬ã¯ããªå
ã«ãã«ããããã¢ããªã±ãŒã·ã§ã³ãJARãã¡ã€ã«ãçæãããŸãã
=== Gradleãããžã§ã¯ãã®ãã¹ã ===
# ãããžã§ã¯ããã£ã¬ã¯ããªã§ã以äžã®ã³ãã³ããå®è¡ããŸãã
#: <syntaxhighlight lang=shell>
gradle test
</syntaxhighlight>
# ãã¹ããæåãããšããã¹ãçµæã衚瀺ãããŸãã
=== Gradleãããžã§ã¯ãã®å®è¡ ===
# ãããžã§ã¯ããã£ã¬ã¯ããªã§ã以äžã®ã³ãã³ããå®è¡ããŸãã
#: <syntaxhighlight lang=shell>
gradle run
</syntaxhighlight>
# ã¢ããªã±ãŒã·ã§ã³ãæ£åžžã«å®è¡ããããšãåºåã衚瀺ãããŸãã
=== Gradleãããžã§ã¯ãã®ããã〠===
Gradleã䜿çšããŠãããžã§ã¯ãããããã€ããã«ã¯ã以äžã®æé ãå®è¡ããŸãã
#ãããã€å
ã®ãªããžããªãèšå®ããŸããäŸãã°ãMavenäžå€®ãªããžããªãGitHub Packagesãªã©ããããŸãã
<code>build.gradle</code>ãã¡ã€ã«ã«ããããã€ã«å¿
èŠãªèšå®ãè¿œå ããŸããäŸãã°ããªããžããªã®URLãã°ã«ãŒãIDãã¢ãŒãã£ãã¡ã¯ãIDãããŒãžã§ã³ãªã©ãèšå®ããŸãã
#ã¿ãŒããã«ãŸãã¯ã³ãã³ãããã³ããã§ã<code>gradle publish</code>ã³ãã³ããå®è¡ããŸãã
#ãããžã§ã¯ããæ£åžžã«ãããã€ããããšãæå®ãããªããžããªã«ã¢ãŒãã£ãã¡ã¯ããã¢ããããŒããããŸãã
ãããã®æé ã¯ãåºæ¬çãªGradleãããžã§ã¯ãã®äœæãšæäœã«é¢ãããã®ã§ãããããžã§ã¯ãã®ããŒãºã«å¿ããŠãè¿œå ã®èšå®ããã©ã°ã€ã³ã®äœ¿çšãå¿
èŠãããããŸããã
== ãããžã§ã¯ãã¿ã€ã ==
以äžã¯ã<code>gradle init --type</code> ã³ãã³ãã§æå®ã§ããäžè¬çãªãããžã§ã¯ãã¿ã€ãã®äžèŠ§ã§ãã
:{| class="wikitable"
|+ ãããžã§ã¯ãã¿ã€ãäžèŠ§
!ãããžã§ã¯ãã¿ã€ã
!説æ
|-
!basic
|åºæ¬çãªãããžã§ã¯ãæ§é
|-
!cpp-application
|C++ã¢ããªã±ãŒã·ã§ã³
|-
!cpp-library
|C++ã©ã€ãã©ãª
|-
!groovy-application
|Groovyã¢ããªã±ãŒã·ã§ã³
|-
!groovy-gradle-plugin
|Groovyãã©ã°ã€ã³
|-
!groovy-library
|Groovyã©ã€ãã©ãª
|-
!java-application
|Javaã¢ããªã±ãŒã·ã§ã³
|-
!java-gradle-plugin
|Javaãã©ã°ã€ã³
|-
!java-library
|Javaã©ã€ãã©ãª
|-
!kotlin-application
|Kotlinã¢ããªã±ãŒã·ã§ã³
|-
!kotlin-gradle-plugin
|Kotlinãã©ã°ã€ã³
|-
!kotlin-library
|Kotlinã©ã€ãã©ãª
|-
!pom
|Mavenãããžã§ã¯ã
|-
!scala-application
|Scalaã¢ããªã±ãŒã·ã§ã³
|-
!scala-library
|Scalaã©ã€ãã©ãª
|-
!swift-application
|Swiftã¢ããªã±ãŒã·ã§ã³
|-
!swift-library
|Swiftã©ã€ãã©ãª
|}
ãããã®ã¿ã€ãã䜿çšãããšãç°ãªãçš®é¡ã®ãããžã§ã¯ãã®éªšæ ŒãçŽ æ©ãäœæã§ããŸããããšãã°ã<code>gradle init --type java-application</code> ã³ãã³ãã¯ãJavaã¢ããªã±ãŒã·ã§ã³çšã®ãã£ã¬ã¯ããªæ§é ãšèšå®ãã¡ã€ã«ãå«ããããžã§ã¯ããçæããŸãã
== ã¿ã¹ã¯ ==
以äžã¯ã<code>gradle [ã¿ã¹ã¯]</code> ã§æå®ã§ããäžè¬çãªã¿ã¹ã¯ã®äžèŠ§ã§ãã
:ãã®äžèŠ§èªäœãã<code>gradle tasks</code> ã®è¡šç€ºã«åºã¥ããŠããŸãã
:{| class="wikitable"
|+ ã¿ã¹ã¯äžèŠ§
! ã¿ã¹ã¯ !! 説æ
|-
!colspan=2|ã¢ããªã±ãŒã·ã§ã³ã¿ã¹ã¯
|-
!run
|ãã®ãããžã§ã¯ããJVMã¢ããªã±ãŒã·ã§ã³ãšããŠå®è¡ããŸãã
|-
!colspan=2|ãã«ãã¿ã¹ã¯
|-
!assemble
|ãã®ãããžã§ã¯ãã®åºåãçµã¿ç«ãŠãŸãã
|-
!build
|ãã®ãããžã§ã¯ããçµã¿ç«ãŠãŠãã¹ãããŸãã
|-
!buildDependents
|ãã®ãããžã§ã¯ããšããã«äŸåãããã¹ãŠã®ãããžã§ã¯ããçµã¿ç«ãŠãŠãã¹ãããŸãã
|-
!buildNeeded
|ãã®ãããžã§ã¯ããšãã®äŸåãããã¹ãŠã®ãããžã§ã¯ããçµã¿ç«ãŠãŠãã¹ãããŸãã
|-
!classes
|ã¡ã€ã³ã®ã¯ã©ã¹ãçµã¿ç«ãŠãŸãã
|-
!clean
|ãã«ããã£ã¬ã¯ããªãåé€ããŸãã
|-
!jar
|'main'ãã£ãŒãã£ãŒã®ã¯ã©ã¹ãå«ãJARã¢ãŒã«ã€ããçµã¿ç«ãŠãŸãã
|-
!testClasses
|ãã¹ãã¯ã©ã¹ãçµã¿ç«ãŠãŸãã
|-
!colspan=2|ãã«ãã»ããã¢ããã¿ã¹ã¯
|-
!init
|æ°ããGradleãã«ããåæåããŸãã
|-
!wrapper
|Gradleã©ãããŒãã¡ã€ã«ãçæããŸãã
|-
!colspan=2|é
åžã¿ã¹ã¯
|-
!assembleDist
|ã¡ã€ã³ã®ãã£ã¹ããªãã¥ãŒã·ã§ã³ãçµã¿ç«ãŠãŸãã
|-
!distTar
|ãããžã§ã¯ãããã£ã¹ããªãã¥ãŒã·ã§ã³ãšããŠãã³ãã«ããŸãã
|-
!distZip
|ãããžã§ã¯ãããã£ã¹ããªãã¥ãŒã·ã§ã³ãšããŠãã³ãã«ããŸãã
|-
!installDist
|ãããžã§ã¯ãããã®ãŸãŸãã£ã¹ããªãã¥ãŒã·ã§ã³ãšããŠã€ã³ã¹ããŒã«ããŸãã
|-
!colspan=2|ããã¥ã¡ã³ãã¿ã¹ã¯
|-
!javadoc
|'main'ãã£ãŒãã£ãŒã®Javadoc APIããã¥ã¡ã³ããçæããŸãã
|-
!colspan=2|ãã«ãã¿ã¹ã¯
|-
!buildEnvironment
|ã«ãŒããããžã§ã¯ãã§å®£èšãããŠãããã¹ãŠã®buildscriptäŸåé¢ä¿ã衚瀺ããŸãã
|-
!dependencies
|ã«ãŒããããžã§ã¯ãã§å®£èšãããŠãããã¹ãŠã®äŸåé¢ä¿ã衚瀺ããŸãã
|-
!dependencyInsight
|ã«ãŒããããžã§ã¯ãã§ç¹å®ã®äŸåé¢ä¿ã«é¢ããæ
å ±ã衚瀺ããŸãã
|-
!help
|ãã«ãã¡ãã»ãŒãžã衚瀺ããŸãã
|-
!javaToolchains
|æ€åºãããJavaããŒã«ãã§ãŒã³ã衚瀺ããŸãã
|-
!kotlinDslAccessorsReport
|çŸåšå©çšå¯èœãªãããžã§ã¯ãã®æ¡åŒµæ©èœãšèŠçŽãžã®ã¢ã¯ã»ã¹ã«é¢ããKotlinã³ãŒããåºåããŸãã
|-
!outgoingVariants
|ã«ãŒããããžã§ã¯ãã®éä¿¡ããªã¢ã³ãã衚瀺ããŸãã
|-
!projects
|ã«ãŒããããžã§ã¯ãã®ãµããããžã§ã¯ãã衚瀺ããŸãã
|-
!properties
|ã«ãŒããããžã§ã¯ãã®ããããã£ã衚瀺ããŸãã
|-
!resolvableConfigurations
|ã«ãŒããããžã§ã¯ãã§è§£æ±ºå¯èœãªæ§æã衚瀺ããŸãã
|-
!tasks
|ã«ãŒããããžã§ã¯ãããå®è¡å¯èœãªã¿ã¹ã¯ã衚瀺ããŸããïŒäžéšã®ã¿ã¹ã¯ã¯ãµããããžã§ã¯ãã«å±ããŠããå ŽåããããŸãïŒ
|-
!colspan=2|æ€èšŒã¿ã¹ã¯
|-
!check
|ãã¹ãŠã®ãã§ãã¯ãå®è¡ããŸãã
|-
!test
|ãã¹ãã¹ã€ãŒããå®è¡ããŸãã
|}
ãããã®ã¿ã¹ã¯ã¯ãGradleã§ãããžã§ã¯ãããã«ãããã¹ãããããã€ããéã«äœ¿çšãããŸãã
== å°å² ==
{| class=wikitable style="width: 40%; float: right"
|+ Gradleã®å¹Žè¡š
!幎!!ã€ãã³ã
|-
!2007
|Gradleã®éçºãéå§ãããã
|-
!2008
|åã®å
¬åŒãªãªãŒã¹ãè¡ãããã
|-
!2012
|Gradle 1.0ããªãªãŒã¹ãããå®å®çãšããŠç¢ºç«ãããã
|-
!2014
|Androidã®å
¬åŒãã«ãã·ã¹ãã ãšããŠGradleãæ¡çšãããã
|-
!2015
|Gradle 2.0ããªãªãŒã¹ãããã
|-
!2016
|Gradle 3.0ããªãªãŒã¹ãããJava 8ã®ãµããŒããè¿œå ãããã
|-
!2017
|Gradle 4.0ããªãªãŒã¹ãããKotlin DSLã®ãµããŒããè¿œå ãããã
|-
!2018
|Gradle 5.0ããªãªãŒã¹ãããJava 11ã®ãµããŒããè¿œå ãããã
|-
!2019
|Gradle 6.0ããªãªãŒã¹ããããã«ãã¹ãã£ã³ã®ãµããŒããè¿œå ãããã
|-
!2020
|Gradle 6.5ããªãªãŒã¹ãããããã©ãŒãã³ã¹ã®åäžããã«ããã£ãã·ã¥ã®æ¹åãè¡ãããã
|-
!2021
|Gradle 7.0ããªãªãŒã¹ãããæé©åãããäŸåé¢ä¿ã®ç®¡çããã£ãã·ã¥æ©èœã®åäžãè¡ãããã
|-
!2022
|Gradle 7.2ããªãªãŒã¹ãããJava 17ã®ãµããŒããè¿œå ãããã
|-
!2023
|Gradle 7.4ããªãªãŒã¹ãããKotlin DSLã®ããã©ãŒãã³ã¹ãåäžãããªã©ã®æ¹åãè¡ãããã
|-
!2024
|çŸåšé²è¡äžã
|}
Gradleã®æŽå²ã¯ã2007幎ã«éçºãéå§ãããããšã«å§ãŸããŸããGradleã®èæ¡è
ã§ããHans Dockterã¯ãåœæã®ãã«ãããŒã«ã«ã¯å€ãã®å¶éããããšæããããæè»ã§å¹ççãªãã«ãããŒã«ãäœæããããšã決æããŸããã
2008幎ã«æåã®å
¬åŒãªãªãŒã¹ãè¡ããããã®åŸãGradleã¯åŸã
ã«æçããéçºè
ã³ãã¥ããã£ããã®æ¯æãéããŸããã2012幎ã«ã¯Gradle 1.0ããªãªãŒã¹ãããå®å®çãšããŠç¢ºç«ãããŸããã
Gradleã¯ããã®æè»æ§ãé«åºŠãªæ©èœããããŠãã«ãã¹ã¯ãªããã®èšè¿°ã«ãããèªã¿ãããã«ãã£ãŠããŸããŸãå€ãã®éçºè
ã«æ¡çšãããããã«ãªããŸãããAndroidã®å
¬åŒãã«ãã·ã¹ãã ãšããŠã®æ¡çšããJavaããã³Kotlinã®ãããžã§ã¯ãã§ã®æšæºçãªãã«ãããŒã«ãšããŠã®å°äœã確ç«ãããªã©ãGradleã®äººæ°ã¯æ¥éã«é«ãŸããŸããã
ãã®åŸãGradleã¯çå®ã«é²åããæ°æ©èœãæé©åãè¿œå ãããçŸåšã§ã¯Java 17ãKotlin DSLã®ããã©ãŒãã³ã¹åäžãªã©ã®æ¹åãè¡ãããŠããŸããGradleã®æåã¯ãéçºè
ã³ãã¥ããã£ã®ç©æ¥µçãªè²¢ç®ãšãæè»æ§ãå¹çæ§ãä¿¡é Œæ§ãæäŸããGradleã®ç¹æ§ã«ãããã®ã§ãã
<br style="clear:both">
== ãŠãŒã¹ã±ãŒã¹ ==
Gradleã¯ãããŸããŸãªãŠãŒã¹ã±ãŒã¹ã§å©çšãããŠããŸãããã®äž»ãªãŠãŒã¹ã±ãŒã¹ã«ã¯ä»¥äžã®ãããªãã®ããããŸãã
;Javaããã³Kotlinãããžã§ã¯ãã®ãã«ã管ç: Gradleã¯Javaããã³Kotlinã®ãããžã§ã¯ãã®ãã«ããå¹ççã«ç®¡çããããã®åªããããŒã«ã§ããäŸåé¢ä¿ã®è§£æ±ºããã«ãã¿ã¹ã¯ã®èªååããã¹ãã®å®è¡ãªã©ãéçºãµã€ã¯ã«å
šäœããµããŒãããŸãã
;Androidã¢ããªã±ãŒã·ã§ã³ã®ãã«ã: Androidéçºã«ãããŠãGradleã¯ããã©ã«ãã®ãã«ãã·ã¹ãã ãšããŠæ¡çšãããŠããŸããGradleã䜿çšããããšã§ãAndroidã¢ããªã±ãŒã·ã§ã³ã®ãã«ãããã»ã¹ãç°¡çŽ åããå¹çåããããšãã§ããŸãã
;ãã«ããã©ãããã©ãŒã éçº: Kotlin Multiplatformãããžã§ã¯ãããã€ããªããã¢ããªã±ãŒã·ã§ã³ã®éçºã«ãããŠãGradleã¯ç°ãªããã©ãããã©ãŒã éã§ã®å
±éã®ã³ãŒãããŒã¹ã管çãããã«ãããããã®åŒ·åãªããŒã«ãšããŠæŽ»çšãããŠããŸãã
;ãµãŒããŒãµã€ãã¢ããªã±ãŒã·ã§ã³ã®ãã«ã: GroovyãScalaãªã©ã®ãµãŒããŒãµã€ãèšèªã䜿çšãããããžã§ã¯ãã§ããGradleã¯äŸåé¢ä¿ã®è§£æ±ºããã«ãã¿ã¹ã¯ã®èªååãè¡ãããã®é ŒããããŒã«ãšããŠå©çšãããŠããŸãã
;ã¯ã©ãŠãããŒã¹ã®ã¢ããªã±ãŒã·ã§ã³ã®ãããã€: Gradleã¯AWSãGoogle Cloud Platformãªã©ã®ã¯ã©ãŠããããã€ããŒãšé£æºããŠãã¢ããªã±ãŒã·ã§ã³ã®ãããã€ã¡ã³ãããã»ã¹ãèªååããããã«äœ¿çšãããŸãã
== ãã¹ããã©ã¯ãã£ã¹ ==
Gradleã®ãã¹ããã©ã¯ãã£ã¹ã«ã¯ã以äžã®ãããªãã®ããããŸãã
* ã¢ãžã¥ãŒã«å: ãããžã§ã¯ããé©åã«ã¢ãžã¥ãŒã«åããåã¢ãžã¥ãŒã«ããšã«æ確ãªè²¬åãæãããŸããããã«ããããã«ãã¹ã¯ãªãããåçŽåãããã¡ã³ããã³ã¹ã容æã«ãªããŸãã
* ã¿ã¹ã¯ã®åå²: ãã«ãã¹ã¯ãªãããå°ããªã¿ã¹ã¯ã«åå²ããåå©çšå¯èœãªéšåãšããŠç®¡çããŸããããã«ããããã«ãããžãã¯ã®å¯èªæ§ãåäžããã³ãŒãã®éè€ãæžå°ããŸãã
* äŸåé¢ä¿ã®æé©å: äžèŠãªäŸåé¢ä¿ãåé€ãããã«ãããã»ã¹ã軜éåããŸãããŸããäŸåé¢ä¿ã®ããŒãžã§ã³ã管çããè¡çªã解決ããããã®ãã¹ããã©ã¯ãã£ã¹ãæ¡çšããŸãã
* ãã©ã°ã€ã³ã®æŽ»çš: Gradleã®è±å¯ãªãã©ã°ã€ã³ãšã³ã·ã¹ãã ã掻çšããç¹å®ã®ã¿ã¹ã¯ãæ©èœãç°¡åã«è¿œå ããŸãããã ããå¿
èŠãªãã©ã°ã€ã³ã®ã¿ã䜿çšããéå°ãªäŸåé¢ä¿ãé¿ããããšãéèŠã§ãã
* ãã¹ããšCI/CDã®çµ±å: ãã«ãããã»ã¹ã«ãã¹ããçµ±åããã³ãŒãã®å質ãç¶æããŸãããŸããCI/CDãã€ãã©ã€ã³ãèšå®ããèªååããããã«ãããã¹ãããããã€ã¡ã³ããå®è¡ããŸãã
* ããã©ãŒãã³ã¹ã®æé©å: Gradleã®ãã£ãã·ã¥æ©èœã䞊ååŠçã掻çšããŠããã«ãããã»ã¹ã®ããã©ãŒãã³ã¹ãåäžãããŸãããŸããäžèŠãªãªãœãŒã¹ã®æå°åãäŸåé¢ä¿ã®è§£æ±ºæéã®ççž®ã«ã泚æãæããŸãã
*ããã¥ã¡ã³ããŒã·ã§ã³ãšã³ãã¥ãã±ãŒã·ã§ã³: ãã«ãã¹ã¯ãªããããããžã§ã¯ãã®æ§æã«é¢ããããã¥ã¡ã³ããå
å®ãããéçºããŒã å
ã§ã®ã³ãã¥ãã±ãŒã·ã§ã³ãä¿é²ããŸããããã«ãããæ°ããã¡ã³ããŒã®ãªã³ããŒãã£ã³ã°ããããžã§ã¯ãã®ã¡ã³ããã³ã¹ãã¹ã ãŒãºã«è¡ããããã«ãªããŸãã
== ãªãœãŒã¹ ==
Gradleã«é¢ããæ
å ±ãå
¥æããããã®äž»ãªãªãœãŒã¹ã¯ä»¥äžã®éãã§ãïŒ
;Gradleå
¬åŒãŠã§ããµã€ã
: https://gradle.org/
: Gradleã®å
¬åŒãŠã§ããµã€ãã«ã¯ã詳现ãªããã¥ã¡ã³ãããã¥ãŒããªã¢ã«ãæäŸãããŠããŸããææ°ã®ãªãªãŒã¹ããŒããAPIããã¥ã¡ã³ãããã¡ãã§å
¥æã§ããŸãã
;Gradleå
¬åŒããã¥ã¡ã³ã
: https://docs.gradle.org/current/userguide/userguide.html
: Gradleã®ããã¥ã¡ã³ãã«ã¯ããã«ãã¹ã¯ãªããã®èšæ³ãã¿ã¹ã¯ã®èšå®æ¹æ³ããã©ã°ã€ã³ã®äœ¿çšæ¹æ³ãªã©ãããŸããŸãªãããã¯ã«é¢ããæ
å ±ãå«ãŸããŠããŸãã
ãããã®æ
å ±æºã掻çšããããšã§ãGradleã®äœ¿çšæ¹æ³ãæ©èœã«é¢ããè±å¯ãªæ
å ±ãå
¥æã§ããŸãã
[[Category:ãã«ãããŒã«]] | 2023-03-15T23:22:32Z | 2024-01-25T23:45:43Z | [] | https://ja.wikibooks.org/wiki/Gradle |
37,248 | æçæ¬/ã«ã¬ãŒ | ã«ã¬ãŒã©ã€ã¹ã¯çŸå³ããã§ããããããã§ã¯ãåœæ°é£ãšãããããã«ã¬ãŒã®ãã¡ãããŒãã«ã¬ãŒã®äœãæ¹ã解説ããŸãã
ãã äžã€èšã£ãŠãããŸããšãã«ã¬ãŒã«ãŒã®ããã±ãŒãžã«æžããŠããäœãæ¹ãèŠãæ¹ãè¯ããããããŸããã
äžæ®µã¯å¿
é ãäžæ®µã¯æšå¥šã§ãããšãã£ãŠãã»ãŒå
¥ãããšã¯æããŸãã(ã«ã¬ãŒãšãæ°Žããã)ã
以äžã¯ã奜ã¿ã§ã
é ãå³ã§äœãå
¥ããŠãããã§ããããªããç¡è«çèã¯ãšããè±ã§ã眮ãæããããŸããçŠç¥æŒ¬ããæ·»ããã®ãããã§ãããã
ãžã£ã¬ã€ã¢ãå
¥ããããã«ã¬ãŒããã£ãšããšããŸãã
ãåæ§ã«ã¯çå£ãªã©ãããã®ã§ã¯ãªãã§ããããããªããã«ã¬ãŒã¯äžå€ãããšçŸå³ãããªããŸãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "ã«ã¬ãŒã©ã€ã¹ã¯çŸå³ããã§ããããããã§ã¯ãåœæ°é£ãšãããããã«ã¬ãŒã®ãã¡ãããŒãã«ã¬ãŒã®äœãæ¹ã解説ããŸãã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ãã äžã€èšã£ãŠãããŸããšãã«ã¬ãŒã«ãŒã®ããã±ãŒãžã«æžããŠããäœãæ¹ãèŠãæ¹ãè¯ããããããŸããã",
"title": ""
},
{
"paragraph_id": 2,
"tag": "p",
"text": "äžæ®µã¯å¿
é ãäžæ®µã¯æšå¥šã§ãããšãã£ãŠãã»ãŒå
¥ãããšã¯æããŸãã(ã«ã¬ãŒãšãæ°Žããã)ã",
"title": "ææ (8人åïŒ"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "以äžã¯ã奜ã¿ã§ã",
"title": "ææ (8人åïŒ"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "é ãå³ã§äœãå
¥ããŠãããã§ããããªããç¡è«çèã¯ãšããè±ã§ã眮ãæããããŸããçŠç¥æŒ¬ããæ·»ããã®ãããã§ãããã",
"title": "ææ (8人åïŒ"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "ãžã£ã¬ã€ã¢ãå
¥ããããã«ã¬ãŒããã£ãšããšããŸãã",
"title": "ã«ã¬ãŒã©ã€ã¹ãããã"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "ãåæ§ã«ã¯çå£ãªã©ãããã®ã§ã¯ãªãã§ããããããªããã«ã¬ãŒã¯äžå€ãããšçŸå³ãããªããŸãã",
"title": "ã«ã¬ãŒã©ã€ã¹ãããã"
}
] | ã«ã¬ãŒã©ã€ã¹ã¯çŸå³ããã§ããããããã§ã¯ãåœæ°é£ãšãããããã«ã¬ãŒã®ãã¡ãããŒãã«ã¬ãŒã®äœãæ¹ã解説ããŸãã ãã äžã€èšã£ãŠãããŸããšãã«ã¬ãŒã«ãŒã®ããã±ãŒãžã«æžããŠããäœãæ¹ãèŠãæ¹ãè¯ããããããŸããã | [[File:Beef curry rice 003.jpg|right|300px|thumb|çŸå³ããããªã«ã¬ãŒã©ã€ã¹ïŒ]]
ã«ã¬ãŒã©ã€ã¹ã¯çŸå³ããã§ããããããã§ã¯ãåœæ°é£ãšããããã<ref>{{Cite web |url=https://housefoods.jp/data/curryhouse/know/trends01.html |title=æ¥æ¬ã®ã«ã¬ãŒ ã«ã¬ãŒãåœæ°é£ã«ãªããŸã§ã®æ©ã¿ ããŠã¹é£åã°ã«ãŒããhousefoods.jp |accessdate=2023-10-26}}</ref>ã«ã¬ãŒã®ãã¡ãããŒãã«ã¬ãŒã®äœãæ¹ã解説ããŸãã
ãã äžã€èšã£ãŠãããŸããšãã«ã¬ãŒã«ãŒã®ããã±ãŒãžã«æžããŠããäœãæ¹ãèŠãæ¹ãè¯ããããããŸããã
== ææ (8人åïŒ ==
=== æšå¥š ===
äžæ®µã¯å¿
é ãäžæ®µã¯æšå¥šã§ãããšãã£ãŠãã»ãŒå
¥ãããšã¯æããŸããïŒã«ã¬ãŒãšãæ°ŽãããïŒã
*油倧ãã1ã2
*æ°Žã900cc
*ã«ã¬ãŒã«ãŒãäžç®±ïŒãªãã§ãããïŒ
*ã«ããããåå
*ãžã£ã¬ã€ã¢ã2ã3å
*çããã2ã3å
*çèã500~700g
以äžã¯ã奜ã¿ã§ã
=== ãªãã·ã§ã³ ===
*ããè
*ã°ãªãŒã³ããŒã¹
*ãªã
*èèž
*ããã
*ãããã
*ãšãªã³ã®
é ãå³ã§äœãå
¥ããŠãããã§ããããªããç¡è«çèã¯ãšããè±ã§ã眮ãæããããŸããçŠç¥æŒ¬ããæ·»ããã®ãããã§ãããã
== äœãæ¹ ==
[[File:Curry and Rice 20220527.jpg|left|270px|thumb|é£ã¹ãããªã£ãŠããŸãã]]
=== äžæºå ===
*ã«ãããããžã£ã¬ã€ã¢ã¯ä¹±åãã§ãããçããã¯èåãã ãã©ã倪ãã§æ§ããŸããã
*èã¯äžå£å€§ã«åã£ãŠããã®ãããã§ãããã
*ã«ã¬ãŒã«ãŒã¯ãåºåœ¢ãªãã°å²ããŸãããã
=== ããã«ã¬ãŒäœã ===
#éã«æ²¹ããããèãçããã
#ããçšåºŠçŒããããã«ãããããžã£ã¬ã€ã¢ãçãããå
¥ããçãããéæã«ãªããŸã§çããã
#çãããéæã«ãªã£ããæ°Žããããããã³é¡ãããã°å
¥ãããã°ãªãŒã³ããŒã¹ãããããããç°æ±ãšããå¿ããã«ã
#ããçšåºŠç
®èŸŒãã ããã«ã¬ãŒã«ãŒãå
¥ããŠæ··ããããã¹ã¯å€§äœãã®ã¿ã€ãã³ã°ã ãã溶ããããã®ã§æ³šæã
#ã«ã¬ãŒã«ãŒã溶ããããããäžåºŠããæ··ããå®æã
== ã«ã¬ãŒã©ã€ã¹ãããã ==
ãžã£ã¬ã€ã¢ãå
¥ããããã«ã¬ãŒããã£ãšããšããŸãã
ãåæ§ã«ã¯çå£ãªã©ãããã®ã§ã¯ãªãã§ããããããªããã«ã¬ãŒã¯äžå€ãããšçŸå³ãããªããŸãã
== é¢é£é
ç® ==
* [[/ãã€ã³ã«ã¬ãŒ|ãã€ã³ã«ã¬ãŒ]]
* [[/ã€ã³ãã«ã¬ãŒ|ã€ã³ãã«ã¬ãŒ]]
* [[/ã°ãªãŒã³ã«ã¬ãŒ|ã°ãªãŒã³ã«ã¬ãŒ]]
* [[æçæ¬/ããã³ã«ã¬ãŒ|ããã³ã«ã¬ãŒ]]
== åºå
ž ==
{{reflist}}
{{ããã©ã«ããœãŒã:ããã}}
[[Category:æçæ¬]]
[[Category:æ¥æ¬æç]]
[[Category:ã€ã³ãæç]] | 2023-03-16T01:51:49Z | 2023-11-19T04:39:30Z | [
"ãã³ãã¬ãŒã:Reflist",
"ãã³ãã¬ãŒã:Cite web"
] | https://ja.wikibooks.org/wiki/%E6%96%99%E7%90%86%E6%9C%AC/%E3%82%AB%E3%83%AC%E3%83%BC |
37,250 | Google Apps Script | æ¬æžã¯ãGoogle Apps Script(以äžãGAS)ãã®ååŠè
ã察象ãšããææ¬ã§ããGASã¯GoogleãæäŸããã¯ã©ãŠããµãŒãã¹ãGoogle Workspace(æ§G Suite)ãã«å«ãŸãããã¹ãã¬ããã·ãŒãããã©ãŒã ãªã©ã®Googleã®ã¢ããªã±ãŒã·ã§ã³ã«ã«ã¹ã¿ã æ©èœãè¿œå ããããšãã§ããããã°ã©ãã³ã°èšèªã§ãã
GASã¯JavaScriptããŒã¹ã®ã¹ã¯ãªããèšèªã§ãããJavaScriptã®åºç€ç¥èãæããæ¹ã§ããã°ãæ¯èŒç容æã«åŠç¿ããããšãã§ããŸãããŸããGASã䜿ãããšã§ãGoogleã¢ããªã±ãŒã·ã§ã³ã®èªååãåŠçã®å¹çåãªã©ãæ§ã
ãªæ¥åå¹çåãå¯èœãšãªããŸãã
æ¬æžã§ã¯ãåããŠGASãåŠã¶æ¹ã§ããããããããå®è·µçãªããã°ã©ã ãäœæã§ãããããåºç€çãªææ³ãé¢æ°ã®äœ¿ãæ¹ãããå®è·µçãªå¿çšäŸãŸã§ãã«ããŒããŸããGASã®æŠå¿µã䜿ãæ¹ã«ã€ããŠèå³ãæã£ãæ¹ãGASã䜿ã£ãæ¥åå¹çåã«èå³ãããæ¹ã¯ããã²æ¬æžãæã«åã£ãŠã¿ãŠãã ããã
æ¬æžãéããŠãGASã«è§Šããããšã®ãªãæ¹ã§ããå®è·µçãªããã°ã©ã ãäœæããããšãã§ããããã«ãªãããšãç®æããŠããŸãããŸããGASã䜿ã£ãæ¥åå¹çåã«èå³ãæã£ãæ¹ã«ãšã£ãŠãã圹ç«ã€æ
å ±ãå€æ°å«ãŸããŠããŸããæ¯éãæ¬æžãæã«åã£ãŠãGASã®äžçã楜ããã§ã¿ãŠãã ããã
æ¬æžã¯ãGoogle Apps Script(以äžãGAS)ãã®ååŠè
ã察象ãšããææ¬ã§ããGASã¯ãGoogleãæäŸããã¯ã©ãŠããµãŒãã¹ãGoogle Workspace(æ§G Suite)ãã«å«ãŸãããã¹ãã¬ããã·ãŒãããã©ãŒã ãªã©ã®Googleã®ã¢ããªã±ãŒã·ã§ã³ã«ã«ã¹ã¿ã æ©èœãè¿œå ããããšãã§ããããã°ã©ãã³ã°èšèªã§ãã
GASã䜿ãããšã§ãGoogleã¢ããªã±ãŒã·ã§ã³ã®èªååãåŠçã®å¹çåãªã©ãæ§ã
ãªæ¥åå¹çåãå¯èœãšãªããŸããæ¬æžã§ã¯ãåããŠGASãåŠã¶æ¹ã§ããããããããå®è·µçãªããã°ã©ã ãäœæã§ãããããåºç€çãªææ³ãé¢æ°ã®äœ¿ãæ¹ãããå®è·µçãªå¿çšäŸãŸã§ãã«ããŒããŸãã
æ¬æžãéããŠãGASã«è§Šããããšã®ãªãæ¹ã§ããå®è·µçãªããã°ã©ã ãäœæããããšãã§ããããã«ãªãããšãç®æããŠããŸãããŸããGASã䜿ãããªãããšã§ãæ¥åå¹çåã«å€§ããè²¢ç®ã§ããããšãç解ããŠããã ããããã«ããªã£ãŠããŸãã
GASã¯ãããã°ã©ãã³ã°åå¿è
ã§ãç°¡åã«åŠã¹ãèšèªã§ããããããç¡æã§å©çšã§ããŸãããã®ãããGASã䜿ãããšã§ãå€ãã®äŒæ¥ãå人ãæ¥åã®å¹çåãèªååã«åãçµãããšãã§ããããã«ãªã£ãŠããŸãã
æ¬æžã§åŠã¶å
容ã¯ãåå¿è
åãã®åºç€çãªå
容ãããå®è·µçãªå¿çšäŸãŸã§å¹
åºãã«ããŒããŠããŸãããŸããAPIãWebã¢ããªã±ãŒã·ã§ã³ã®äœæãã©ã€ãã©ãªã®å©çšãªã©ãGASã®å¿çšç·šããã£ãããšåãäžããŠããŸãã
GASã¯ãGoogle Workspaceã«å«ãŸããæ§ã
ãªã¢ããªã±ãŒã·ã§ã³ãšé£æºããããšãã§ãããããæ¥åã®ããããé¢ã§æŽ»çšãå¯èœã§ããæ¬æžãéããŠãGASã䜿ãããªããæ¥åã®å¹çåãèªååã«åãçµãããšã§ãããå¹ççãã€ã¹ã ãŒãºãªæ¥åéå¶ãå®çŸããŠããã ããããšãé¡ã£ãŠããŸãã
Google Apps Script(以äžãGAS)ã¯ãGoogle Workspace(æ§G Suite)ã®ã¹ãã¬ããã·ãŒãããã©ãŒã ãªã©ã®ã¢ããªã±ãŒã·ã§ã³ã«ã«ã¹ã¿ã æ©èœãè¿œå ããããã®ããã°ã©ãã³ã°èšèªã§ããJavaScriptãããŒã¹ãšããŠãããGoogleã®APIã«ã¢ã¯ã»ã¹ããããã®æ©èœãæäŸããŠããŸããGASã¯ãã¹ãã¬ããã·ãŒããããã¥ã¡ã³ãããã©ã€ããã«ã¬ã³ããŒãã¡ãŒã«ãªã©ãæ§ã
ãªGoogleã®ãµãŒãã¹ãšçµ±åãããŠãããçç£æ§ãé«ããããšãã§ããŸãã
GASã¯ãããã°ã©ãã³ã°åå¿è
ã§ãåŠã³ããããè±å¯ãªAPIããªããžã§ã¯ããæäŸããŠãããããåå¿è
ããäžçŽè
ãŸã§å¹
åºã掻çšã§ããŸãããŸããGoogleã¢ããªã±ãŒã·ã§ã³ãšã·ãŒã ã¬ã¹ã«é£æºããããšãã§ããèªååãåŠçã®å¹çåãå¯èœã§ããããã«ãGASã¯ãGoogleãæäŸããã¯ã©ãŠããµãŒãã¹ã®äžéšã§ãããOAuthèªèšŒã«ããAPIã®å©çšãã¹ã³ãŒãã®æ瀺çãªèšå®ãªã©ãé«ãã¬ãã«ã®ã»ãã¥ãªãã£ä¿è·ãæäŸãããŠããŸãã
GASã¯ãç¡æã§å©çšã§ãããããæ軜ã«å©çšãéå§ããããšãã§ããŸãããŸããGoogleã¢ããªã±ãŒã·ã§ã³ãšé£æºããŠãã¹ãã¬ããã·ãŒãã®ããŒã¿åŠçãæäœããã©ãŒã ã®åçèªååãGmailã®èªåéä¿¡ãªã©ãæ§ã
ãªå¿çšãå¯èœã§ããAPIãå©çšããããšã§ãå€éšãµãŒãã¹ãšã®é£æºãå¯èœã§ããGASã䜿çšããŠèªååããããããžã§ã¯ããã¹ã¯ãªããã¯ãããžãã¹ãæè²ãªã©ã®å€ãã®åéã§äœ¿çšãããäžçäžã§å©çšãããŠããŸãã
GASã®éçºç°å¢ã«ã¯ããã©ãŠã¶äžã§åäœããGASãšãã£ã¿ãçšæãããŠããŸããGASãšãã£ã¿ã¯ãGoogleãã©ã€ãäžã®ã¹ãã¬ããã·ãŒããGoogleãã©ãŒã ããã¢ã¯ã»ã¹ããããšãã§ããŸãã GASãšãã£ã¿ã¯ãããã¹ããšãã£ã¿ããããã¬ãå®è¡ãã¿ã³ãªã©ã®åºæ¬çãªæ©èœãåããŠããŸãããŸããGoogle Apps Scriptã®ããã¥ã¡ã³ãããªãã¡ã¬ã³ã¹ãªã©ãéçºã«å¿
èŠãªæ
å ±ãååŸããããã®ãªã³ã¯ãçšæãããŠããŸãã GASãšãã£ã¿ã«ã¯ãGoogle Apps Scriptã®ã³ãŒããèšè¿°ãããšãã£ã¿ãŠã£ã³ããŠãšãå®è¡çµæã衚瀺ããã³ã³ãœãŒã«ãŠã£ã³ããŠããããŸãããŸããã¹ãã¬ããã·ãŒãããã©ãŒã ãªã©ã®Googleã¢ããªã±ãŒã·ã§ã³ã«ã¢ã¯ã»ã¹ããããã®ãªããžã§ã¯ããã©ãŠã¶ãçšæãããŠããŸãã GASãšãã£ã¿ã¯ããªã³ã©ã€ã³äžã§åäœãããããåžžã«ææ°çã®GASã䜿ããŸãããŸããè€æ°ã®éçºè
ãåæã«éçºãè¡ãããšãã§ããŸãã GASãšãã£ã¿ã¯ãããã°ã©ã ãäœæããã ãã§ãªããGoogleã¢ããªã±ãŒã·ã§ã³ãšã®é£æºãç°¡åã«è¡ãããšãã§ããŸããããšãã°ãã¹ãã¬ããã·ãŒãã®ããŒã¿ãèªåçã«æŽæ°ããã¹ã¯ãªãããäœæããå Žåãã¹ãã¬ããã·ãŒããéããŠå®è¡ããå¿
èŠã¯ãããŸãããã¹ã¯ãªãããããªã¬ãŒã«ç»é²ããããšã§ãäžå®ã®ééã§èªåçã«å®è¡ãããããã«ãªããŸãã ããã«ãGASãšãã£ã¿ã¯ãGoogleãã©ã€ãäžã§äœæ¥ããããšãã§ãããããã¹ãã¬ããã·ãŒãããã©ãŒã ãããã¥ã¡ã³ããªã©ã®ãã¡ã€ã«ãšå¯æ¥ã«é£æºããããšãã§ããŸããããã«ãããããã°ã©ã ãšãã¡ã€ã«ãäžå
管çããããšãã§ããŸãã GASãšãã£ã¿ã¯ãåå¿è
ã«ãæ±ããããã䜿ãåæãè¯ããšè©äŸ¡ãããŠããŸããGASãšãã£ã¿ã䜿ã£ãŠãGoogleã¢ããªã±ãŒã·ã§ã³ã«ã«ã¹ã¿ã æ©èœãè¿œå ããããšã§ãæ¥åå¹çåãèªååãå®çŸããããšãã§ããŸãã
説æãç°¡åã«ãããããGoogle ã¹ãã¬ããã·ãŒããã Google Apps Script (GAS)ãåŒã³åºããå ŽåãšããŠèª¬æããŸãã
ãŸãããæ¡åŒµæ©èœã>ãGoogle Apps Scriptããéžã¶ããšã§ãGASãåŒã³åºããŸãã
ãããšã次ã®ããã«ã¹ã¯ãªããå
¥åã¿ããæ°ãã«éããŸãã
ãã ããããã¯ãŸã GASç·šéç»é¢ãéããã ãã«ããããäœã®åœä»€ãããŠãªãã®ã§ãäœãèµ·ãããŸããã
ã§ã¯ãããããåœä»€ãè¿œèšããŠãã£ãŠãGASãå®è¡ããŠã¿ãŸãããã
æå§ãã«ãHello World!ããšãã°ã«è¡šç€ºããããã°ã©ã ãäœã£ãŠã¿ãŸãã
ãšãªãããã«è¿œèšããŸãã
ãã®æ®µéã§ã¯ããŸã äœãä¿åããŠããªãã®ã§ãå®è¡ã§ããŸããã
ãªããäžèšã³ãŒããšå³ã®ã¹ã¯ãªãŒã³ã·ã§ããã§ã³ãŒãã®æåè²ãéãã®ã¯ãwikiã®ãµãŒããŒã®èšå®ãšgoogleã®ãµãŒããŒã®èšå®ãšãç°ãªãããã§ããç¹ã«æ·±ãæå³ã¯ãããŸããã
ä¿åã®ãããããããžã§ã¯ããä¿åããå®è¡ããŠãã ãããã³ãŒãå
¥åéšã®äžã«ããã¢ã€ã³ã³äžèŠ§ã«ãããæ¢ããšããããžã§ã¯ããä¿åãã¢ã€ã³ã³ããããŸããã¢ã€ã³ã³ã«ããŠã¹ã«ãŒãœã«ãåœãŠããšããããžã§ã¯ããä¿åããšããã¡ãã»ãŒãžãåºãŠããã®ã§ããã®ã¢ã€ã³ã³ãæŒãã ãã§ãã
ããããžã§ã¯ããä¿åãã¢ã€ã³ã³ãæŒãã°ãå®è¡ãã§ããããã«ãªããŸãã
å®è¡ã¯ãåçãã¿ã³ã¿ãããªã¢ã€ã³ã³ã§ãã
äžè¿°ã®ã³ãŒãã®å Žåãå®è¡ãããšå³ã®ãããªç»é¢ã«ãªããŸãã
(ããã)
æ¬ç« ã§ã¯ãGASã®åºæ¬ææ³ã«ã€ããŠèª¬æããŸããGASã¯JavaScriptãããŒã¹ãšããŠãããJavaScriptã®ææ³ã«æºæ ããŠããŸããJavaScriptãåŠãã ããšãããæ¹ã¯ãGASã®åŠç¿ã容æã«ãªãã§ãããã
ã³ãŒãäžã«èª¬æãåèãæ®ãããšãã§ããã³ã¡ã³ãã¯ãã³ãŒããç解ããäžã§éåžžã«éèŠã§ããGASã§ã¯ã以äžã®ããã«ã³ã¡ã³ããæžãããšãã§ããŸãã
GASã§ã¯ãå€æ°ã宣èšããéã«letããŒã¯ãŒãã䜿çšããŸãã以äžã¯ãå€æ°ã宣èšããäŸã§ãã
å€æ°åã«ã¯ãè±æ°åãšã¢ã³ããŒã¹ã³ã¢(_)ã䜿çšã§ããŸãããæ°åã§å§ãŸãå€æ°åã¯äœ¿çšã§ããŸããã
GASã§ã¯ãæ°å€æŒç®ãæååé£çµãªã©ãæ§ã
ãªæŒç®åã䜿çšããããšãã§ããŸãã代衚çãªæŒç®åã¯ä»¥äžã®éãã§ãã
GASã§ã¯ãæ¡ä»¶åå²ãç¹°ãè¿ãåŠçãå®è¡ããããã®å¶åŸ¡æããããŸãã以äžã¯ã代衚çãªå¶åŸ¡æã§ãã
æ¡ä»¶åå²ã¯ãããæ¡ä»¶ãæãç«ã£ãå Žåã«åŠçãå®è¡ããããã®ãã®ã§ãã以äžã¯ãæ¡ä»¶åå²ãè¡ãifæã®äŸã§ãã
ç¹°ãè¿ãåŠçã¯ãåãåŠçãè€æ°åå®è¡ããããã®ãã®ã§ãã以äžã¯ãç¹°ãè¿ãåŠçãè¡ãforæã®äŸã§ãã
äžèšã®äŸã§ã¯ãiãšããå€æ°ã0ããå§ãã10æªæºã®é(0ãã9ãŸã§)ã1ãã€å¢ãããªãããã«ãŒããç¹°ãè¿ããŠããŸãã
GASã§ã¯ãåŠçããŸãšããŠååãã€ããŠããããšãã§ããé¢æ°ãå®çŸ©ããããšãã§ããŸãã以äžã¯ãé¢æ°ãå®çŸ©ããäŸã§ãã
:åŒæ°ãšããŠxãšyãåãåããxãšyãå ç®ããçµæãè¿ãåŠçãå®çŸ©ãããŠããŸãã :ãŸããé¢æ°ãå®è¡ããéã«ã¯ãadd(1, 2)ã®ããã«åŒæ°ãæž¡ãããšãã§ããŸãã
以äžããGASã®åºæ¬ææ³ã«ã€ããŠã®èª¬æã§ããGASã¯JavaScriptãããŒã¹ãšããŠãããããJavaScriptãåŠãã ããšãããæ¹ã§ããã°ãæ¯èŒç容æã«åŠç¿ããããšãã§ããŸãã
GASã§å©çšãããªããžã§ã¯ããšã¯ãGoogleã¢ããªã±ãŒã·ã§ã³å
ã§æäœãããèŠçŽ ãããŒã¿ã®ããšãæããŸãããªããžã§ã¯ããæäœããããšã§ãã¹ãã¬ããã·ãŒãããã©ãŒã ãGmailãªã©ã®Googleã¢ããªã±ãŒã·ã§ã³ãèªç±ã«ã«ã¹ã¿ãã€ãºããããšãã§ããŸãã
GASã§ã¯ãæ§ã
ãªãªããžã§ã¯ããå©çšã§ããŸãããããã§ã¯ä»£è¡šçãªãã®ã玹ä»ããŸãã
ãããã®ãªããžã§ã¯ãã䜿ã£ãŠãGoogleã¢ããªã±ãŒã·ã§ã³å
ã®ããŒã¿ãæ©èœãèªç±ã«æäœããããšãã§ããŸãããªããžã§ã¯ãã«ã¯ããããã¡ãœãããããããã£ãçšæãããŠããããããã䜿ã£ãŠãªããžã§ã¯ããæäœããããšãã§ããŸãããŸãããªããžã§ã¯ãã®éå±€æ§é ããããè€æ°ã®ãªããžã§ã¯ããçµã¿åãããŠããé«åºŠãªæäœãå¯èœã§ãã
Google Apps Script ã«ã¯ãGoogle Apps ãšã®çžäºäœçšããã®ä»ã®ã¿ã¹ã¯ãèªååããããã®ããŸããŸãªåºæãªããžã§ã¯ãããããŸãã以äžã«ããã€ãã®äž»èŠãªãªããžã§ã¯ãã瀺ããŸãã
ãããã®ãªããžã§ã¯ãã¯ãGoogle Apps Script ã®åºæ¬çãªæ©èœãæ¡åŒµããããã«äœ¿çšãããŸãããªããžã§ã¯ãã®è©³çŽ°ã«ã€ããŠã¯ãGoogle Apps Script ã®å
¬åŒããã¥ã¡ã³ããåç
§ããŠãã ããã
GASã®éçºã«ã¯ãGoogle Workspace(æ§G Suite)ã®ã¢ã«ãŠã³ããå¿
èŠã§ããGoogle Workspaceã¯ãäŒæ¥åãã®ã¯ã©ãŠããµãŒãã¹ã§ãããžãã¹çšéã«æé©åãããã¢ããªã±ãŒã·ã§ã³ãæäŸããŠããŸãã
GASãéçºããããã«ã¯ã以äžã®æé ãå¿
èŠã§ãã
A1ã»ã«ã«ãHello, World!ããšæžã蟌ã¿ããå Žåãããšãã°
ã®ããã«ãªãã(ãªããåããŠã¹ã¯ãªããå®è¡ããéãæ¿èªãå¿
èŠã«ãªãã®ã§ãã°ãŒã°ã«ã®æ瀺ã«åŸã£ãŠæ¿èªããã°ããã)
ãã®ã³ãŒãã®æå³ã¯ã
ã®ãããªæå³ã§ãã
getActiveSheet() ã¯ããã®ã³ãŒããçŸåšå®è¡äžã®ã·ãŒããæå®ããŠããŸããã¹ãã¬ããã·ãŒãããGASãèµ·åããå Žåãªããç¹ã«ä»ã®ã·ãŒãã䜿ãããå Žåã§ããªãéãã¯ãgetActiveSheet() ã§è¯ãã§ãããã
ããä»ã®ã·ãŒããæå®ãããå ŽåãªããgetSheetByName ã«ããååã®æå®ã«ããã·ãŒãæå®ã䜿ãããšã«ãªãã§ãããã説æã¯çç¥ããŸããå¿
èŠãªãã°ãŒã°ã«ã®å
¬åŒãµã€ããªã©ã«è©³çŽ°ããããŸãã®ã§åç
§ããŠãã ããã
getRange() ã¯ãã»ã«ã®æå®ã®æ©èœããããŸãã(äžèšã³ãŒã㧠getRange() ãçšããŠããŸãã)
äžèšã³ãŒãã§ã¯çšããŠãªãã§ãããgetValue() ã¯ãã»ã«å
ã®å€ã®èªã¿èŸŒã¿ã®æ©èœããããŸãã
äžæ¹ãæå®ããã»ã«å
ã«å€ã代å
¥ãããå Žå㯠setValue() ã§å¯èœã§ããäžèšã³ãŒãã§çšããŠããã®ã¯ setValue() ã§ãã
ã¹ãã«ã䌌ãŠããã®ã§æ··åããªãããã«ããŸãããã
ããŠãæååã®æžã蟌ã¿ã ãã§ã¯ã¹ã¯ãªããã®æå³ãç¡ãã®ã§ã次ã«æ°å€ãèªã¿èŸŒãã§èšç®ãããŠã¿ãŸãããã
ãŸããç·Žç¿çšã«ã·ãŒãã®æ°å€ãå¿
èŠãªã®ã§ãé©åœã«å
¥ããŸããããæ¬ããŒãžã§ã¯ãäžèšã®ããã«å
¥åãããšããŠä»¥éã説æããŸãã
ããšãã°A1ã»ã«ã®å€ãèªã¿èŸŒã¿ããå Žåã¯ãäžèšã®ããã«ãªããŸãã
ééã㊠getValue() ã®ã«ãã³å
ã«ã»ã«çªå·ãå
¥ããªãããã«ããªãã§ãã ããã
getValueã¯ã»ã«çªå·æå®ã®åœä»€ã§ã¯ãªãã§ãã
getValue() ã¯ããã§ã«getRange() ãªã©ã§æå®ããã»ã«ã«ããå€ãèªã¿åãããšããæå³ã®åœä»€ã§ãã
ããã ãšããŸã èªã¿èŸŒãã ã ããªã®ã§ãæå³ããããŸããã
ã§ã¯ãç·Žç¿ãšããŠA1ãšA2ã®åãæ±ããŸãããããã¡ãããã¯ãã䜿ãããšãã¹ãã¬ããã·ãŒãåŽã§ç°¡åã«ç·åãèšç®ã§ããæ©èœããããŸãããæ¬ããã°ã©ã ã¯ã¹ã¯ãªããç·Žç¿çšãªã®ã§ãããããã®ã¯ç¡èŠããŸãã
äžèšã³ãŒãã®å®è¡ã«æåããã°ãäžèšã®ããã« A3 ã«èšç®çµæ 8 ãæžã蟌ã¿ãããŸãã
| [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ¬æžã¯ãGoogle Apps Script(以äžãGAS)ãã®ååŠè
ã察象ãšããææ¬ã§ããGASã¯GoogleãæäŸããã¯ã©ãŠããµãŒãã¹ãGoogle Workspace(æ§G Suite)ãã«å«ãŸãããã¹ãã¬ããã·ãŒãããã©ãŒã ãªã©ã®Googleã®ã¢ããªã±ãŒã·ã§ã³ã«ã«ã¹ã¿ã æ©èœãè¿œå ããããšãã§ããããã°ã©ãã³ã°èšèªã§ãã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "GASã¯JavaScriptããŒã¹ã®ã¹ã¯ãªããèšèªã§ãããJavaScriptã®åºç€ç¥èãæããæ¹ã§ããã°ãæ¯èŒç容æã«åŠç¿ããããšãã§ããŸãããŸããGASã䜿ãããšã§ãGoogleã¢ããªã±ãŒã·ã§ã³ã®èªååãåŠçã®å¹çåãªã©ãæ§ã
ãªæ¥åå¹çåãå¯èœãšãªããŸãã",
"title": ""
},
{
"paragraph_id": 2,
"tag": "p",
"text": "æ¬æžã§ã¯ãåããŠGASãåŠã¶æ¹ã§ããããããããå®è·µçãªããã°ã©ã ãäœæã§ãããããåºç€çãªææ³ãé¢æ°ã®äœ¿ãæ¹ãããå®è·µçãªå¿çšäŸãŸã§ãã«ããŒããŸããGASã®æŠå¿µã䜿ãæ¹ã«ã€ããŠèå³ãæã£ãæ¹ãGASã䜿ã£ãæ¥åå¹çåã«èå³ãããæ¹ã¯ããã²æ¬æžãæã«åã£ãŠã¿ãŠãã ããã",
"title": ""
},
{
"paragraph_id": 3,
"tag": "p",
"text": "æ¬æžãéããŠãGASã«è§Šããããšã®ãªãæ¹ã§ããå®è·µçãªããã°ã©ã ãäœæããããšãã§ããããã«ãªãããšãç®æããŠããŸãããŸããGASã䜿ã£ãæ¥åå¹çåã«èå³ãæã£ãæ¹ã«ãšã£ãŠãã圹ç«ã€æ
å ±ãå€æ°å«ãŸããŠããŸããæ¯éãæ¬æžãæã«åã£ãŠãGASã®äžçã楜ããã§ã¿ãŠãã ããã",
"title": ""
},
{
"paragraph_id": 4,
"tag": "p",
"text": "æ¬æžã¯ãGoogle Apps Script(以äžãGAS)ãã®ååŠè
ã察象ãšããææ¬ã§ããGASã¯ãGoogleãæäŸããã¯ã©ãŠããµãŒãã¹ãGoogle Workspace(æ§G Suite)ãã«å«ãŸãããã¹ãã¬ããã·ãŒãããã©ãŒã ãªã©ã®Googleã®ã¢ããªã±ãŒã·ã§ã³ã«ã«ã¹ã¿ã æ©èœãè¿œå ããããšãã§ããããã°ã©ãã³ã°èšèªã§ãã",
"title": "ã¯ããã«"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "GASã䜿ãããšã§ãGoogleã¢ããªã±ãŒã·ã§ã³ã®èªååãåŠçã®å¹çåãªã©ãæ§ã
ãªæ¥åå¹çåãå¯èœãšãªããŸããæ¬æžã§ã¯ãåããŠGASãåŠã¶æ¹ã§ããããããããå®è·µçãªããã°ã©ã ãäœæã§ãããããåºç€çãªææ³ãé¢æ°ã®äœ¿ãæ¹ãããå®è·µçãªå¿çšäŸãŸã§ãã«ããŒããŸãã",
"title": "ã¯ããã«"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "æ¬æžãéããŠãGASã«è§Šããããšã®ãªãæ¹ã§ããå®è·µçãªããã°ã©ã ãäœæããããšãã§ããããã«ãªãããšãç®æããŠããŸãããŸããGASã䜿ãããªãããšã§ãæ¥åå¹çåã«å€§ããè²¢ç®ã§ããããšãç解ããŠããã ããããã«ããªã£ãŠããŸãã",
"title": "ã¯ããã«"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "GASã¯ãããã°ã©ãã³ã°åå¿è
ã§ãç°¡åã«åŠã¹ãèšèªã§ããããããç¡æã§å©çšã§ããŸãããã®ãããGASã䜿ãããšã§ãå€ãã®äŒæ¥ãå人ãæ¥åã®å¹çåãèªååã«åãçµãããšãã§ããããã«ãªã£ãŠããŸãã",
"title": "ã¯ããã«"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "æ¬æžã§åŠã¶å
容ã¯ãåå¿è
åãã®åºç€çãªå
容ãããå®è·µçãªå¿çšäŸãŸã§å¹
åºãã«ããŒããŠããŸãããŸããAPIãWebã¢ããªã±ãŒã·ã§ã³ã®äœæãã©ã€ãã©ãªã®å©çšãªã©ãGASã®å¿çšç·šããã£ãããšåãäžããŠããŸãã",
"title": "ã¯ããã«"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "GASã¯ãGoogle Workspaceã«å«ãŸããæ§ã
ãªã¢ããªã±ãŒã·ã§ã³ãšé£æºããããšãã§ãããããæ¥åã®ããããé¢ã§æŽ»çšãå¯èœã§ããæ¬æžãéããŠãGASã䜿ãããªããæ¥åã®å¹çåãèªååã«åãçµãããšã§ãããå¹ççãã€ã¹ã ãŒãºãªæ¥åéå¶ãå®çŸããŠããã ããããšãé¡ã£ãŠããŸãã",
"title": "ã¯ããã«"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "Google Apps Script(以äžãGAS)ã¯ãGoogle Workspace(æ§G Suite)ã®ã¹ãã¬ããã·ãŒãããã©ãŒã ãªã©ã®ã¢ããªã±ãŒã·ã§ã³ã«ã«ã¹ã¿ã æ©èœãè¿œå ããããã®ããã°ã©ãã³ã°èšèªã§ããJavaScriptãããŒã¹ãšããŠãããGoogleã®APIã«ã¢ã¯ã»ã¹ããããã®æ©èœãæäŸããŠããŸããGASã¯ãã¹ãã¬ããã·ãŒããããã¥ã¡ã³ãããã©ã€ããã«ã¬ã³ããŒãã¡ãŒã«ãªã©ãæ§ã
ãªGoogleã®ãµãŒãã¹ãšçµ±åãããŠãããçç£æ§ãé«ããããšãã§ããŸãã",
"title": "ã¯ããã«"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "GASã¯ãããã°ã©ãã³ã°åå¿è
ã§ãåŠã³ããããè±å¯ãªAPIããªããžã§ã¯ããæäŸããŠãããããåå¿è
ããäžçŽè
ãŸã§å¹
åºã掻çšã§ããŸãããŸããGoogleã¢ããªã±ãŒã·ã§ã³ãšã·ãŒã ã¬ã¹ã«é£æºããããšãã§ããèªååãåŠçã®å¹çåãå¯èœã§ããããã«ãGASã¯ãGoogleãæäŸããã¯ã©ãŠããµãŒãã¹ã®äžéšã§ãããOAuthèªèšŒã«ããAPIã®å©çšãã¹ã³ãŒãã®æ瀺çãªèšå®ãªã©ãé«ãã¬ãã«ã®ã»ãã¥ãªãã£ä¿è·ãæäŸãããŠããŸãã",
"title": "ã¯ããã«"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "GASã¯ãç¡æã§å©çšã§ãããããæ軜ã«å©çšãéå§ããããšãã§ããŸãããŸããGoogleã¢ããªã±ãŒã·ã§ã³ãšé£æºããŠãã¹ãã¬ããã·ãŒãã®ããŒã¿åŠçãæäœããã©ãŒã ã®åçèªååãGmailã®èªåéä¿¡ãªã©ãæ§ã
ãªå¿çšãå¯èœã§ããAPIãå©çšããããšã§ãå€éšãµãŒãã¹ãšã®é£æºãå¯èœã§ããGASã䜿çšããŠèªååããããããžã§ã¯ããã¹ã¯ãªããã¯ãããžãã¹ãæè²ãªã©ã®å€ãã®åéã§äœ¿çšãããäžçäžã§å©çšãããŠããŸãã",
"title": "ã¯ããã«"
},
{
"paragraph_id": 13,
"tag": "p",
"text": "GASã®éçºç°å¢ã«ã¯ããã©ãŠã¶äžã§åäœããGASãšãã£ã¿ãçšæãããŠããŸããGASãšãã£ã¿ã¯ãGoogleãã©ã€ãäžã®ã¹ãã¬ããã·ãŒããGoogleãã©ãŒã ããã¢ã¯ã»ã¹ããããšãã§ããŸãã GASãšãã£ã¿ã¯ãããã¹ããšãã£ã¿ããããã¬ãå®è¡ãã¿ã³ãªã©ã®åºæ¬çãªæ©èœãåããŠããŸãããŸããGoogle Apps Scriptã®ããã¥ã¡ã³ãããªãã¡ã¬ã³ã¹ãªã©ãéçºã«å¿
èŠãªæ
å ±ãååŸããããã®ãªã³ã¯ãçšæãããŠããŸãã GASãšãã£ã¿ã«ã¯ãGoogle Apps Scriptã®ã³ãŒããèšè¿°ãããšãã£ã¿ãŠã£ã³ããŠãšãå®è¡çµæã衚瀺ããã³ã³ãœãŒã«ãŠã£ã³ããŠããããŸãããŸããã¹ãã¬ããã·ãŒãããã©ãŒã ãªã©ã®Googleã¢ããªã±ãŒã·ã§ã³ã«ã¢ã¯ã»ã¹ããããã®ãªããžã§ã¯ããã©ãŠã¶ãçšæãããŠããŸãã GASãšãã£ã¿ã¯ããªã³ã©ã€ã³äžã§åäœãããããåžžã«ææ°çã®GASã䜿ããŸãããŸããè€æ°ã®éçºè
ãåæã«éçºãè¡ãããšãã§ããŸãã GASãšãã£ã¿ã¯ãããã°ã©ã ãäœæããã ãã§ãªããGoogleã¢ããªã±ãŒã·ã§ã³ãšã®é£æºãç°¡åã«è¡ãããšãã§ããŸããããšãã°ãã¹ãã¬ããã·ãŒãã®ããŒã¿ãèªåçã«æŽæ°ããã¹ã¯ãªãããäœæããå Žåãã¹ãã¬ããã·ãŒããéããŠå®è¡ããå¿
èŠã¯ãããŸãããã¹ã¯ãªãããããªã¬ãŒã«ç»é²ããããšã§ãäžå®ã®ééã§èªåçã«å®è¡ãããããã«ãªããŸãã ããã«ãGASãšãã£ã¿ã¯ãGoogleãã©ã€ãäžã§äœæ¥ããããšãã§ãããããã¹ãã¬ããã·ãŒãããã©ãŒã ãããã¥ã¡ã³ããªã©ã®ãã¡ã€ã«ãšå¯æ¥ã«é£æºããããšãã§ããŸããããã«ãããããã°ã©ã ãšãã¡ã€ã«ãäžå
管çããããšãã§ããŸãã GASãšãã£ã¿ã¯ãåå¿è
ã«ãæ±ããããã䜿ãåæãè¯ããšè©äŸ¡ãããŠããŸããGASãšãã£ã¿ã䜿ã£ãŠãGoogleã¢ããªã±ãŒã·ã§ã³ã«ã«ã¹ã¿ã æ©èœãè¿œå ããããšã§ãæ¥åå¹çåãèªååãå®çŸããããšãã§ããŸãã",
"title": "ã¯ããã«"
},
{
"paragraph_id": 14,
"tag": "p",
"text": "",
"title": "ã¯ããã«"
},
{
"paragraph_id": 15,
"tag": "p",
"text": "説æãç°¡åã«ãããããGoogle ã¹ãã¬ããã·ãŒããã Google Apps Script (GAS)ãåŒã³åºããå ŽåãšããŠèª¬æããŸãã",
"title": "å®è¡æé "
},
{
"paragraph_id": 16,
"tag": "p",
"text": "ãŸãããæ¡åŒµæ©èœã>ãGoogle Apps Scriptããéžã¶ããšã§ãGASãåŒã³åºããŸãã",
"title": "å®è¡æé "
},
{
"paragraph_id": 17,
"tag": "p",
"text": "ãããšã次ã®ããã«ã¹ã¯ãªããå
¥åã¿ããæ°ãã«éããŸãã",
"title": "å®è¡æé "
},
{
"paragraph_id": 18,
"tag": "p",
"text": "",
"title": "å®è¡æé "
},
{
"paragraph_id": 19,
"tag": "p",
"text": "ãã ããããã¯ãŸã GASç·šéç»é¢ãéããã ãã«ããããäœã®åœä»€ãããŠãªãã®ã§ãäœãèµ·ãããŸããã",
"title": "å®è¡æé "
},
{
"paragraph_id": 20,
"tag": "p",
"text": "ã§ã¯ãããããåœä»€ãè¿œèšããŠãã£ãŠãGASãå®è¡ããŠã¿ãŸãããã",
"title": "å®è¡æé "
},
{
"paragraph_id": 21,
"tag": "p",
"text": "æå§ãã«ãHello World!ããšãã°ã«è¡šç€ºããããã°ã©ã ãäœã£ãŠã¿ãŸãã",
"title": "å®è¡æé "
},
{
"paragraph_id": 22,
"tag": "p",
"text": "",
"title": "å®è¡æé "
},
{
"paragraph_id": 23,
"tag": "p",
"text": "ãšãªãããã«è¿œèšããŸãã",
"title": "å®è¡æé "
},
{
"paragraph_id": 24,
"tag": "p",
"text": "ãã®æ®µéã§ã¯ããŸã äœãä¿åããŠããªãã®ã§ãå®è¡ã§ããŸããã",
"title": "å®è¡æé "
},
{
"paragraph_id": 25,
"tag": "p",
"text": "ãªããäžèšã³ãŒããšå³ã®ã¹ã¯ãªãŒã³ã·ã§ããã§ã³ãŒãã®æåè²ãéãã®ã¯ãwikiã®ãµãŒããŒã®èšå®ãšgoogleã®ãµãŒããŒã®èšå®ãšãç°ãªãããã§ããç¹ã«æ·±ãæå³ã¯ãããŸããã",
"title": "å®è¡æé "
},
{
"paragraph_id": 26,
"tag": "p",
"text": "",
"title": "å®è¡æé "
},
{
"paragraph_id": 27,
"tag": "p",
"text": "ä¿åã®ãããããããžã§ã¯ããä¿åããå®è¡ããŠãã ãããã³ãŒãå
¥åéšã®äžã«ããã¢ã€ã³ã³äžèŠ§ã«ãããæ¢ããšããããžã§ã¯ããä¿åãã¢ã€ã³ã³ããããŸããã¢ã€ã³ã³ã«ããŠã¹ã«ãŒãœã«ãåœãŠããšããããžã§ã¯ããä¿åããšããã¡ãã»ãŒãžãåºãŠããã®ã§ããã®ã¢ã€ã³ã³ãæŒãã ãã§ãã",
"title": "å®è¡æé "
},
{
"paragraph_id": 28,
"tag": "p",
"text": "ããããžã§ã¯ããä¿åãã¢ã€ã³ã³ãæŒãã°ãå®è¡ãã§ããããã«ãªããŸãã",
"title": "å®è¡æé "
},
{
"paragraph_id": 29,
"tag": "p",
"text": "å®è¡ã¯ãåçãã¿ã³ã¿ãããªã¢ã€ã³ã³ã§ãã",
"title": "å®è¡æé "
},
{
"paragraph_id": 30,
"tag": "p",
"text": "",
"title": "å®è¡æé "
},
{
"paragraph_id": 31,
"tag": "p",
"text": "äžè¿°ã®ã³ãŒãã®å Žåãå®è¡ãããšå³ã®ãããªç»é¢ã«ãªããŸãã",
"title": "å®è¡æé "
},
{
"paragraph_id": 32,
"tag": "p",
"text": "(ããã)",
"title": "å®è¡æé "
},
{
"paragraph_id": 33,
"tag": "p",
"text": "æ¬ç« ã§ã¯ãGASã®åºæ¬ææ³ã«ã€ããŠèª¬æããŸããGASã¯JavaScriptãããŒã¹ãšããŠãããJavaScriptã®ææ³ã«æºæ ããŠããŸããJavaScriptãåŠãã ããšãããæ¹ã¯ãGASã®åŠç¿ã容æã«ãªãã§ãããã",
"title": "åºæ¬ææ³"
},
{
"paragraph_id": 34,
"tag": "p",
"text": "ã³ãŒãäžã«èª¬æãåèãæ®ãããšãã§ããã³ã¡ã³ãã¯ãã³ãŒããç解ããäžã§éåžžã«éèŠã§ããGASã§ã¯ã以äžã®ããã«ã³ã¡ã³ããæžãããšãã§ããŸãã",
"title": "åºæ¬ææ³"
},
{
"paragraph_id": 35,
"tag": "p",
"text": "GASã§ã¯ãå€æ°ã宣èšããéã«letããŒã¯ãŒãã䜿çšããŸãã以äžã¯ãå€æ°ã宣èšããäŸã§ãã",
"title": "åºæ¬ææ³"
},
{
"paragraph_id": 36,
"tag": "p",
"text": "å€æ°åã«ã¯ãè±æ°åãšã¢ã³ããŒã¹ã³ã¢(_)ã䜿çšã§ããŸãããæ°åã§å§ãŸãå€æ°åã¯äœ¿çšã§ããŸããã",
"title": "åºæ¬ææ³"
},
{
"paragraph_id": 37,
"tag": "p",
"text": "GASã§ã¯ãæ°å€æŒç®ãæååé£çµãªã©ãæ§ã
ãªæŒç®åã䜿çšããããšãã§ããŸãã代衚çãªæŒç®åã¯ä»¥äžã®éãã§ãã",
"title": "åºæ¬ææ³"
},
{
"paragraph_id": 38,
"tag": "p",
"text": "GASã§ã¯ãæ¡ä»¶åå²ãç¹°ãè¿ãåŠçãå®è¡ããããã®å¶åŸ¡æããããŸãã以äžã¯ã代衚çãªå¶åŸ¡æã§ãã",
"title": "åºæ¬ææ³"
},
{
"paragraph_id": 39,
"tag": "p",
"text": "æ¡ä»¶åå²ã¯ãããæ¡ä»¶ãæãç«ã£ãå Žåã«åŠçãå®è¡ããããã®ãã®ã§ãã以äžã¯ãæ¡ä»¶åå²ãè¡ãifæã®äŸã§ãã",
"title": "åºæ¬ææ³"
},
{
"paragraph_id": 40,
"tag": "p",
"text": "ç¹°ãè¿ãåŠçã¯ãåãåŠçãè€æ°åå®è¡ããããã®ãã®ã§ãã以äžã¯ãç¹°ãè¿ãåŠçãè¡ãforæã®äŸã§ãã",
"title": "åºæ¬ææ³"
},
{
"paragraph_id": 41,
"tag": "p",
"text": "äžèšã®äŸã§ã¯ãiãšããå€æ°ã0ããå§ãã10æªæºã®é(0ãã9ãŸã§)ã1ãã€å¢ãããªãããã«ãŒããç¹°ãè¿ããŠããŸãã",
"title": "åºæ¬ææ³"
},
{
"paragraph_id": 42,
"tag": "p",
"text": "GASã§ã¯ãåŠçããŸãšããŠååãã€ããŠããããšãã§ããé¢æ°ãå®çŸ©ããããšãã§ããŸãã以äžã¯ãé¢æ°ãå®çŸ©ããäŸã§ãã",
"title": "åºæ¬ææ³"
},
{
"paragraph_id": 43,
"tag": "p",
"text": ":åŒæ°ãšããŠxãšyãåãåããxãšyãå ç®ããçµæãè¿ãåŠçãå®çŸ©ãããŠããŸãã :ãŸããé¢æ°ãå®è¡ããéã«ã¯ãadd(1, 2)ã®ããã«åŒæ°ãæž¡ãããšãã§ããŸãã",
"title": "åºæ¬ææ³"
},
{
"paragraph_id": 44,
"tag": "p",
"text": "以äžããGASã®åºæ¬ææ³ã«ã€ããŠã®èª¬æã§ããGASã¯JavaScriptãããŒã¹ãšããŠãããããJavaScriptãåŠãã ããšãããæ¹ã§ããã°ãæ¯èŒç容æã«åŠç¿ããããšãã§ããŸãã",
"title": "åºæ¬ææ³"
},
{
"paragraph_id": 45,
"tag": "p",
"text": "GASã§å©çšãããªããžã§ã¯ããšã¯ãGoogleã¢ããªã±ãŒã·ã§ã³å
ã§æäœãããèŠçŽ ãããŒã¿ã®ããšãæããŸãããªããžã§ã¯ããæäœããããšã§ãã¹ãã¬ããã·ãŒãããã©ãŒã ãGmailãªã©ã®Googleã¢ããªã±ãŒã·ã§ã³ãèªç±ã«ã«ã¹ã¿ãã€ãºããããšãã§ããŸãã",
"title": "åºæ¬ææ³"
},
{
"paragraph_id": 46,
"tag": "p",
"text": "GASã§ã¯ãæ§ã
ãªãªããžã§ã¯ããå©çšã§ããŸãããããã§ã¯ä»£è¡šçãªãã®ã玹ä»ããŸãã",
"title": "åºæ¬ææ³"
},
{
"paragraph_id": 47,
"tag": "p",
"text": "ãããã®ãªããžã§ã¯ãã䜿ã£ãŠãGoogleã¢ããªã±ãŒã·ã§ã³å
ã®ããŒã¿ãæ©èœãèªç±ã«æäœããããšãã§ããŸãããªããžã§ã¯ãã«ã¯ããããã¡ãœãããããããã£ãçšæãããŠããããããã䜿ã£ãŠãªããžã§ã¯ããæäœããããšãã§ããŸãããŸãããªããžã§ã¯ãã®éå±€æ§é ããããè€æ°ã®ãªããžã§ã¯ããçµã¿åãããŠããé«åºŠãªæäœãå¯èœã§ãã",
"title": "åºæ¬ææ³"
},
{
"paragraph_id": 48,
"tag": "p",
"text": "Google Apps Script ã«ã¯ãGoogle Apps ãšã®çžäºäœçšããã®ä»ã®ã¿ã¹ã¯ãèªååããããã®ããŸããŸãªåºæãªããžã§ã¯ãããããŸãã以äžã«ããã€ãã®äž»èŠãªãªããžã§ã¯ãã瀺ããŸãã",
"title": "åºæ¬ææ³"
},
{
"paragraph_id": 49,
"tag": "p",
"text": "ãããã®ãªããžã§ã¯ãã¯ãGoogle Apps Script ã®åºæ¬çãªæ©èœãæ¡åŒµããããã«äœ¿çšãããŸãããªããžã§ã¯ãã®è©³çŽ°ã«ã€ããŠã¯ãGoogle Apps Script ã®å
¬åŒããã¥ã¡ã³ããåç
§ããŠãã ããã",
"title": "åºæ¬ææ³"
},
{
"paragraph_id": 50,
"tag": "p",
"text": "GASã®éçºã«ã¯ãGoogle Workspace(æ§G Suite)ã®ã¢ã«ãŠã³ããå¿
èŠã§ããGoogle Workspaceã¯ãäŒæ¥åãã®ã¯ã©ãŠããµãŒãã¹ã§ãããžãã¹çšéã«æé©åãããã¢ããªã±ãŒã·ã§ã³ãæäŸããŠããŸãã",
"title": "åºæ¬ææ³"
},
{
"paragraph_id": 51,
"tag": "p",
"text": "GASãéçºããããã«ã¯ã以äžã®æé ãå¿
èŠã§ãã",
"title": "åºæ¬ææ³"
},
{
"paragraph_id": 52,
"tag": "p",
"text": "A1ã»ã«ã«ãHello, World!ããšæžã蟌ã¿ããå Žåãããšãã°",
"title": "ã¢ããªãšã®é£æº"
},
{
"paragraph_id": 53,
"tag": "p",
"text": "ã®ããã«ãªãã(ãªããåããŠã¹ã¯ãªããå®è¡ããéãæ¿èªãå¿
èŠã«ãªãã®ã§ãã°ãŒã°ã«ã®æ瀺ã«åŸã£ãŠæ¿èªããã°ããã)",
"title": "ã¢ããªãšã®é£æº"
},
{
"paragraph_id": 54,
"tag": "p",
"text": "ãã®ã³ãŒãã®æå³ã¯ã",
"title": "ã¢ããªãšã®é£æº"
},
{
"paragraph_id": 55,
"tag": "p",
"text": "ã®ãããªæå³ã§ãã",
"title": "ã¢ããªãšã®é£æº"
},
{
"paragraph_id": 56,
"tag": "p",
"text": "getActiveSheet() ã¯ããã®ã³ãŒããçŸåšå®è¡äžã®ã·ãŒããæå®ããŠããŸããã¹ãã¬ããã·ãŒãããGASãèµ·åããå Žåãªããç¹ã«ä»ã®ã·ãŒãã䜿ãããå Žåã§ããªãéãã¯ãgetActiveSheet() ã§è¯ãã§ãããã",
"title": "ã¢ããªãšã®é£æº"
},
{
"paragraph_id": 57,
"tag": "p",
"text": "ããä»ã®ã·ãŒããæå®ãããå ŽåãªããgetSheetByName ã«ããååã®æå®ã«ããã·ãŒãæå®ã䜿ãããšã«ãªãã§ãããã説æã¯çç¥ããŸããå¿
èŠãªãã°ãŒã°ã«ã®å
¬åŒãµã€ããªã©ã«è©³çŽ°ããããŸãã®ã§åç
§ããŠãã ããã",
"title": "ã¢ããªãšã®é£æº"
},
{
"paragraph_id": 58,
"tag": "p",
"text": "getRange() ã¯ãã»ã«ã®æå®ã®æ©èœããããŸãã(äžèšã³ãŒã㧠getRange() ãçšããŠããŸãã)",
"title": "ã¢ããªãšã®é£æº"
},
{
"paragraph_id": 59,
"tag": "p",
"text": "äžèšã³ãŒãã§ã¯çšããŠãªãã§ãããgetValue() ã¯ãã»ã«å
ã®å€ã®èªã¿èŸŒã¿ã®æ©èœããããŸãã",
"title": "ã¢ããªãšã®é£æº"
},
{
"paragraph_id": 60,
"tag": "p",
"text": "äžæ¹ãæå®ããã»ã«å
ã«å€ã代å
¥ãããå Žå㯠setValue() ã§å¯èœã§ããäžèšã³ãŒãã§çšããŠããã®ã¯ setValue() ã§ãã",
"title": "ã¢ããªãšã®é£æº"
},
{
"paragraph_id": 61,
"tag": "p",
"text": "ã¹ãã«ã䌌ãŠããã®ã§æ··åããªãããã«ããŸãããã",
"title": "ã¢ããªãšã®é£æº"
},
{
"paragraph_id": 62,
"tag": "p",
"text": "ããŠãæååã®æžã蟌ã¿ã ãã§ã¯ã¹ã¯ãªããã®æå³ãç¡ãã®ã§ã次ã«æ°å€ãèªã¿èŸŒãã§èšç®ãããŠã¿ãŸãããã",
"title": "ã¢ããªãšã®é£æº"
},
{
"paragraph_id": 63,
"tag": "p",
"text": "ãŸããç·Žç¿çšã«ã·ãŒãã®æ°å€ãå¿
èŠãªã®ã§ãé©åœã«å
¥ããŸããããæ¬ããŒãžã§ã¯ãäžèšã®ããã«å
¥åãããšããŠä»¥éã説æããŸãã",
"title": "ã¢ããªãšã®é£æº"
},
{
"paragraph_id": 64,
"tag": "p",
"text": "ããšãã°A1ã»ã«ã®å€ãèªã¿èŸŒã¿ããå Žåã¯ãäžèšã®ããã«ãªããŸãã",
"title": "ã¢ããªãšã®é£æº"
},
{
"paragraph_id": 65,
"tag": "p",
"text": "ééã㊠getValue() ã®ã«ãã³å
ã«ã»ã«çªå·ãå
¥ããªãããã«ããªãã§ãã ããã",
"title": "ã¢ããªãšã®é£æº"
},
{
"paragraph_id": 66,
"tag": "p",
"text": "getValueã¯ã»ã«çªå·æå®ã®åœä»€ã§ã¯ãªãã§ãã",
"title": "ã¢ããªãšã®é£æº"
},
{
"paragraph_id": 67,
"tag": "p",
"text": "getValue() ã¯ããã§ã«getRange() ãªã©ã§æå®ããã»ã«ã«ããå€ãèªã¿åãããšããæå³ã®åœä»€ã§ãã",
"title": "ã¢ããªãšã®é£æº"
},
{
"paragraph_id": 68,
"tag": "p",
"text": "",
"title": "ã¢ããªãšã®é£æº"
},
{
"paragraph_id": 69,
"tag": "p",
"text": "ããã ãšããŸã èªã¿èŸŒãã ã ããªã®ã§ãæå³ããããŸããã",
"title": "ã¢ããªãšã®é£æº"
},
{
"paragraph_id": 70,
"tag": "p",
"text": "ã§ã¯ãç·Žç¿ãšããŠA1ãšA2ã®åãæ±ããŸãããããã¡ãããã¯ãã䜿ãããšãã¹ãã¬ããã·ãŒãåŽã§ç°¡åã«ç·åãèšç®ã§ããæ©èœããããŸãããæ¬ããã°ã©ã ã¯ã¹ã¯ãªããç·Žç¿çšãªã®ã§ãããããã®ã¯ç¡èŠããŸãã",
"title": "ã¢ããªãšã®é£æº"
},
{
"paragraph_id": 71,
"tag": "p",
"text": "",
"title": "ã¢ããªãšã®é£æº"
},
{
"paragraph_id": 72,
"tag": "p",
"text": "äžèšã³ãŒãã®å®è¡ã«æåããã°ãäžèšã®ããã« A3 ã«èšç®çµæ 8 ãæžã蟌ã¿ãããŸãã",
"title": "ã¢ããªãšã®é£æº"
},
{
"paragraph_id": 73,
"tag": "p",
"text": "",
"title": "ã¢ããªãšã®é£æº"
}
] | æ¬æžã¯ãGoogle Apps ScriptïŒä»¥äžãGASïŒãã®ååŠè
ã察象ãšããææ¬ã§ããGASã¯GoogleãæäŸããã¯ã©ãŠããµãŒãã¹ãGoogle Workspaceãã«å«ãŸãããã¹ãã¬ããã·ãŒãããã©ãŒã ãªã©ã®Googleã®ã¢ããªã±ãŒã·ã§ã³ã«ã«ã¹ã¿ã æ©èœãè¿œå ããããšãã§ããããã°ã©ãã³ã°èšèªã§ãã GASã¯JavaScriptããŒã¹ã®ã¹ã¯ãªããèšèªã§ãããJavaScriptã®åºç€ç¥èãæããæ¹ã§ããã°ãæ¯èŒç容æã«åŠç¿ããããšãã§ããŸãããŸããGASã䜿ãããšã§ãGoogleã¢ããªã±ãŒã·ã§ã³ã®èªååãåŠçã®å¹çåãªã©ãæ§ã
ãªæ¥åå¹çåãå¯èœãšãªããŸãã æ¬æžã§ã¯ãåããŠGASãåŠã¶æ¹ã§ããããããããå®è·µçãªããã°ã©ã ãäœæã§ãããããåºç€çãªææ³ãé¢æ°ã®äœ¿ãæ¹ãããå®è·µçãªå¿çšäŸãŸã§ãã«ããŒããŸããGASã®æŠå¿µã䜿ãæ¹ã«ã€ããŠèå³ãæã£ãæ¹ãGASã䜿ã£ãæ¥åå¹çåã«èå³ãããæ¹ã¯ããã²æ¬æžãæã«åã£ãŠã¿ãŠãã ããã æ¬æžãéããŠãGASã«è§Šããããšã®ãªãæ¹ã§ããå®è·µçãªããã°ã©ã ãäœæããããšãã§ããããã«ãªãããšãç®æããŠããŸãããŸããGASã䜿ã£ãæ¥åå¹çåã«èå³ãæã£ãæ¹ã«ãšã£ãŠãã圹ç«ã€æ
å ±ãå€æ°å«ãŸããŠããŸããæ¯éãæ¬æžãæã«åã£ãŠãGASã®äžçã楜ããã§ã¿ãŠãã ããã | {{Wikipedia}}
æ¬æžã¯ååŠè
åãã®ãGoogle Apps ScriptïŒä»¥äžãGASïŒãææ¬ã§ããGASã¯Google WorkspaceïŒæ§Google Apps, G SuiteïŒã«å«ãŸããGoogleã®ã¢ããªã±ãŒã·ã§ã³ã«ã«ã¹ã¿ã æ©èœãè¿œå ããããã®ããã°ã©ãã³ã°èšèªã§ãã[[JavaScript]]ããŒã¹ã§ãããJavaScriptã®åºç€ç¥èãããã°æ¯èŒç容æã«åŠç¿ã§ããŸããGASãå©çšããããšã§ãGoogleã¢ããªã±ãŒã·ã§ã³ã®èªååãæ¥åå¹çåãå¯èœãšãªããŸãã
== ã¯ããã« ==
Google Apps ScriptïŒGASïŒã¯ãGoogleãæäŸããJavaScriptããŒã¹ã®ã¹ã¯ãªããèšèªã§ã[[w:Google Workspace|Google Workspace]]ïŒæ§ Google Apps, G SuiteïŒãšã®çµ±åãå¯èœã«ãã匷åãªéçºããŒã«ã§ãã
GASã䜿çšãããšãGoogleã®ã¯ã©ãŠãããŒã¹ã®ãªãã£ã¹ã¢ããªã±ãŒã·ã§ã³ãšé£æºããŠãæ§ã
ãªã¿ã¹ã¯ãå¹ççã«èªååã§ããŸãããã®ã»ã¯ã·ã§ã³ã§ã¯ãGASã®ç¹åŸŽãšéçºç°å¢ã«ã€ããŠçŽ¹ä»ããŸãã
=== ç¹åŸŽ ===
Google Apps Scriptã®äž»ãªç¹åŸŽã¯æ¬¡ã®éãã§ãã
;Google Workspace ãšã®æ·±ãçµ±å: GASã¯ãGoogleã®ã¯ã©ãŠããµãŒãã¹ã§ããG Suiteã®æ©èœã«çŽæ¥ã¢ã¯ã»ã¹ã§ãããããããã¥ã¡ã³ããã¹ãã¬ããã·ãŒãããã©ãŒã ãã«ã¬ã³ããŒãªã©ã®ããŒã¿ãç°¡åã«æäœã§ããŸãã
;JavaScriptããŒã¹: GASã¯[[JavaScript]]ã«åºã¥ããŠãããJavaScriptã®åºæ¬çãªææ³ãæ©èœã掻ãããŠã¹ã¯ãªãããèšè¿°ã§ããŸããããã«ãããåºãæ®åããŠããJavaScriptã®ç¥èãå©çšããŠéçºã§ããŸãã
;匷åãªèªåå: GASã䜿çšããããšã§ãå®åçãªã¿ã¹ã¯ãç¹°ãè¿ãäœæ¥ãèªååã§ããŸããããªã¬ãŒãèšå®ããŠå®æçã«å®è¡ããããšãå¯èœã§ãã
;ãªãŒãã³ãœãŒã¹ã©ã€ã¯ãªå
±æ: GASã§äœæããã¹ã¯ãªããã¯ãä»ã®ãŠãŒã¶ãŒãšç°¡åã«å
±æã§ããŸããå
¬éç¯å²ãèšå®ããŠãä»ã®éçºè
ãšååããŠã¹ã¯ãªãããæ¹è¯ããããšãã§ããŸãã
=== éçºç°å¢ ===
Google Apps Scriptã®éçºã¯ããŠã§ããã©ãŠã¶äžã«æäŸãããã¹ã¯ãªãããšãã£ã¿ãéããŠè¡ããŸãã
ãã®ãšãã£ã¿ã¯ã·ã³ãã«ã§äœ¿ãããããã¹ã¯ãªããã®äœæããããã°ãããªã¬ãŒã®èšå®ãªã©ã容æã«è¡ããŸãã
ãŸããGASã¯Google Driveäžã§ã¹ã¯ãªãããä¿åãããã€ã§ãã¢ã¯ã»ã¹ã§ããããã«ããŸãã
JavaScriptã®åºæ¬çãªç解ãããã°ãéçºè
ã¯è¿
éãã€å¹æçã«ã¹ã¯ãªãããæ§ç¯ã§ããŸãã
== Google Apps Scriptã¯ã€ãã¯ãã¢ãŒ ==
Google Apps Scriptã®ã¯ã€ãã¯ãã¢ãŒã§ã¯ãGoogle Apps Scriptã䜿çšããŠGoogle Workspace ã®ã¢ããªã±ãŒã·ã§ã³ãšé£æºããåºæ¬çãªæé ãåŠã³ãŸãã以äžã¯ãç°¡åãªã¯ã€ãã¯ãã¢ãŒã®ã¹ããããã€ã¹ãããã®æŠèŠã§ãã
=== ã¹ããã1: æ°ãããããžã§ã¯ãã®äœæ ===
# Googleãã©ã€ããéããŸãã
# ãã©ã€ãã®å·Šäžã«ãããæ°èŠããã¿ã³ãã¯ãªãã¯ãããã®äžããããã®ä»ãâãGoogle Apps ScriptããéžæããŸãã
=== ã¹ããã2: ãã¡ã€ã«ã®èšå® ===
# ã¹ã¯ãªãããšãã£ã¿ãéãããã®ã§ãæ°ããã¹ã¯ãªãããã¡ã€ã«ãäœæããŸããããã¯ã¹ã¯ãªããã®ãšã³ããªãã€ã³ããšãªããŸãã
# ãã¡ã€ã«ã«ååãä»ããŸããäŸãã°ã<code>MyScript</code>ãªã©ã
# ãã¡ã€ã«ã«ä»¥äžã®ã³ãŒããæžããŸãïŒ
#:<syntaxhighlight lang=js>
const myFunction() => Logger.log('Hello, Google Apps Script!');
</syntaxhighlight>
=== ã¹ããã3: é¢æ°ã®å®è¡ ===
# ã¹ã¯ãªãããšãã£ã¿ã®ã¡ãã¥ãŒãããå®è¡ãâãmyFunctionããéžæããŸãã
# å®è¡ãåããŠã®å Žåãèš±å¯ãæ±ããããŸããå®å
šã§ãããšç¢ºèªããŠèš±å¯ããŠãã ããã
# ã¹ã¯ãªããã®ãã°ïŒView â LogsïŒã« "Hello, Google Apps Script!" ã衚瀺ãããŸãã
=== ã¹ããã4: Google Sheetsãšã®é£æº ===
# æ°ããé¢æ°ãè¿œå ããŠãGoogle Sheetsã«å€ãæžã蟌ãã¹ã¯ãªãããäœæããŸãïŒ
#:<syntaxhighlight lang=js>
function writeToSheet() {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange('A1').setValue('Hello from Apps Script to Sheets!');
}
</syntaxhighlight>
# é¢æ°ãå®è¡ããGoogle SheetsãéããŠã»ã«ã«å€ãæžã蟌ãŸããã確èªããŸãã
=== ã¹ããã5: ããªã¬ãŒã®èšå® ===
# ã¹ã¯ãªãããšãã£ã¿ã§ãç·šéãâãçŸåšã®ãããžã§ã¯ãã®ããªã¬ãŒããéžæããŸãã
# ãããªã¬ãŒãè¿œå ããã¯ãªãã¯ããŠãå®æçãªå®è¡ãªã©ã®ããªã¬ãŒãèšå®ããŸãã
ããã§ãç°¡åãªGoogle Apps Scriptã®ã¯ã€ãã¯ãã¢ãŒãå®äºããŸããããããããŒã¹ã«ããŠãGoogle Workspaceã®ä»ã®ãµãŒãã¹ãšã®é£æºããããè€éãªã¹ã¯ãªãããéçºããŠããããšãã§ããŸããå
¬åŒããã¥ã¡ã³ãããµã³ãã«ã³ãŒããåç
§ãããšããæ·±ãç解ã§ããŸãã
== å®è¡æé ==
[[ãã¡ã€ã«:Google App Script 1.png|800px|thumb| ]]
説æãç°¡åã«ãããããGoogle ã¹ãã¬ããã·ãŒããã Google Apps Script ïŒGASïŒãåŒã³åºããå ŽåãšããŠèª¬æããŸãã
ãŸãããæ¡åŒµæ©èœãïŒãGoogle Apps Scriptããéžã¶ããšã§ãGASãåŒã³åºããŸãã
ãããšã次ã®ããã«ã¹ã¯ãªããå
¥åã¿ããæ°ãã«éããŸãã
{{-}}
[[ãã¡ã€ã«:Google Apps Script 2.png|800px|thumb|ã¹ã¯ãªããå
¥åç»é¢ãéããã°ããã®ãšãã]]
ãã ããããã¯ãŸã GASç·šéç»é¢ãéããã ãã«ããããäœã®åœä»€ãããŠãªãã®ã§ãäœãèµ·ãããŸããã
ã§ã¯ãããããåœä»€ãè¿œèšããŠãã£ãŠãGASãå®è¡ããŠã¿ãŸãããã
æå§ãã«ãHello World!ããšãã°ã«è¡šç€ºããããã°ã©ã ãäœã£ãŠã¿ãŸãã
<syntaxhighlight lang=js>
function myFunction() {
Logger.log("Hello World!");
}
</syntaxhighlight>
ãšãªãããã«è¿œèšããŸãã
ãã®æ®µéã§ã¯ããŸã äœãä¿åããŠããªãã®ã§ãå®è¡ã§ããŸããã
ãªããäžèšã³ãŒããšå³ã®ã¹ã¯ãªãŒã³ã·ã§ããã§ã³ãŒãã®æåè²ãéãã®ã¯ãwikiã®ãµãŒããŒã®èšå®ãšgoogleã®ãµãŒããŒã®èšå®ãšãç°ãªãããã§ããç¹ã«æ·±ãæå³ã¯ãããŸããã
{{-}}
[[ãã¡ã€ã«:2023-09-25 (7).png|800px|thumb]]
ä¿åã®ãããããããžã§ã¯ããä¿åããå®è¡ããŠãã ãããã³ãŒãå
¥åéšã®äžã«ããã¢ã€ã³ã³äžèŠ§ã«ãããæ¢ããšããããžã§ã¯ããä¿åãã¢ã€ã³ã³ããããŸããã¢ã€ã³ã³ã«ããŠã¹ã«ãŒãœã«ãåœãŠããšããããžã§ã¯ããä¿åããšããã¡ãã»ãŒãžãåºãŠããã®ã§ããã®ã¢ã€ã³ã³ãæŒãã ãã§ãã
ããããžã§ã¯ããä¿åãã¢ã€ã³ã³ãæŒãã°ãå®è¡ãã§ããããã«ãªããŸãã
{{-}}
å®è¡ã¯ãåçãã¿ã³ã¿ãããªã¢ã€ã³ã³ã§ãã
[[ãã¡ã€ã«:Google Apps Script 4.png|800px|thumb|]]
{{-}}
[[ãã¡ã€ã«:Google Apps Script 5.png|800px|thumb|]]
äžè¿°ã®ã³ãŒãã®å Žåãå®è¡ãããšå³ã®ãããªç»é¢ã«ãªããŸãã
ïŒãããïŒ
{{-}}
== èšèªä»æ§ ==
Google Apps ScriptïŒGASïŒã¯JavaScriptãåºã«ããŠããŸãããäžéšã®æ©èœãç¬èªã®ãã®ãšãªã£ãŠããŸãã
以äžã«ãGoogle Apps Scriptã§äœ¿çšå¯èœãªJavaScriptã®åºæ¬çãªæ§æãšãGASåºæã®æ©èœã«çŠç¹ãåœãŠãŸãã
=== 䜿çšå¯èœãªJavaScriptã®åºæ¬çãªæ§æ ===
#; å€æ°ãšããŒã¿å
#: å€æ°ã¯ããŒã¿ãæ ŒçŽããããã«äœ¿çšãããJavaScriptã®åºæ¬çãªããŒã¿åïŒStringãNumberãBooleanãªã©ïŒããµããŒãããŠããŸãã
#: <syntaxhighlight lang=js>
// å€æ°ã®å®£èšãšåæå
const message = "Hello, Google Apps Script!";
const numberValue = 42;
const isTrue = true;
// ãã°ã«å€æ°ã®å€ã衚瀺
Logger.log(message);
Logger.log(numberValue);
Logger.log(isTrue);
</syntaxhighlight>
#; æ¡ä»¶åå²ãšã«ãŒã
#: æ¡ä»¶åå²ãã«ãŒãã¯JavaScriptãšåæ§ã«äœ¿çšã§ããŸãã
#: <syntaxhighlight lang=js>
// æ¡ä»¶åå²
if (numberValue > 50) {
Logger.log("Number is greater than 50");
} else {
Logger.log("Number is 50 or less");
}
// ã«ãŒã
const ary = ["apple", "banana", "cherry"];
for (const element of ary) {
console.log(element);
}
</syntaxhighlight>
#; é¢æ°ã®å®çŸ©
#: é¢æ°ã¯åŠçããŸãšããŠåå©çšå¯èœã«ããŸãã
#: <syntaxhighlight lang=js>
// é¢æ°ã®å®çŸ©
function greet(name) {
Logger.log("Hello, " + name + "!");
}
// é¢æ°ã®åŒã³åºã
greet("John");
</syntaxhighlight>
#; é
åãšãªããžã§ã¯ã
#: é
åããªããžã§ã¯ãããµããŒããããŠããŸãã
#: <syntaxhighlight lang=js>
// é
å
const fruits = ["Apple", "Banana", "Orange"];
Logger.log(fruits[1]); // "Banana"
// ãªããžã§ã¯ã
const person = { name: "Alice", age: 30, isStudent: false };
Logger.log(person.name); // "Alice"
</syntaxhighlight>
ãããã®åºæ¬çãªæ§æãšGoogle Apps Scriptåºæã®æ©èœãçµã¿åãããŠãGoogleã®ã¯ã©ãŠãããŒã¹ã®ã¢ããªã±ãŒã·ã§ã³ãå¹æçã«æäœã§ããŸããGoogle Apps Scriptã®å
¬åŒããã¥ã¡ã³ãããµã³ãã«ã³ãŒããåç
§ãããšããç解ãæ·±ãŸããŸãã
==== Webãã©ãŠã¶ã®JavaScriptãšã®éã ====
Google Apps ScriptïŒGASïŒã¯JavaScriptãããŒã¹ã«ããŠããŸããããã©ãŠã¶äžã§äžè¬çã«å©çšãããJavaScriptïŒç¹ã«Webãã©ãŠã¶ç°å¢ïŒãšã¯ããã€ãã®éãããããŸãã以äžã¯ããã©ãŠã¶ã®JavaScriptã«ååšãããGASã®JavaScriptã«ã¯ãªãäž»ãªæ©èœãèŠçŽ ã§ãã
;DOMæäœ:
:GASã§ã¯ãHTMLææžã®DOMïŒDocument Object ModelïŒã«ã¢ã¯ã»ã¹ããæ©èœãå¶éãããŠããŸãããã©ãŠã¶ã®JavaScriptã§ã¯ãWebããŒãžäžã®èŠçŽ ãçŽæ¥æãããšãã§ããããGASã§ã¯Google Workspaceãšã®çµ±åãäžå¿ã§ãããDOMã®çŽæ¥çãªæäœã¯ãããŸããã
;ç»é¢æç»:
:GASã¯ããã¯ãšã³ãã¹ã¯ãªãããšããŠæ©èœããçŽæ¥çãªç»é¢æç»ããŠãŒã¶ãŒã€ã³ã¿ã©ã¯ã·ã§ã³ã®åŠçã¯ãµããŒãããŠããŸãããäžæ¹ã§ããã©ãŠã¶äžã®JavaScriptã¯ããã³ããšã³ãã§åäœãããŠãŒã¶ãŒãšã®å¯Ÿè©±ãWebããŒãžã®ãã€ãããã¯ãªæŽæ°ãå¯èœã«ããŸãã
;Web APIã®äžéš:
:ãã©ãŠã¶äžã®JavaScriptã¯ãWeb APIïŒäŸ: Fetch APIãWebGLãWeb Speech APIïŒãå©çšããŠããŠãŒã¶ãŒãšãŒãžã§ã³ãããã©ãŠã¶ã®æ©èœã«ã¢ã¯ã»ã¹ã§ããŸãããããã®APIã¯GASã§ã¯ãµããŒããããŠããªãå ŽåããããŸãã
;ãã©ãŠã¶ã€ãã³ã:
:ãã©ãŠã¶ã®JavaScriptã¯ããŠãŒã¶ãŒã®æäœã«å¯Ÿããã€ãã³ãïŒäŸ: ã¯ãªãã¯ãããŒå
¥åïŒã«åå¿ããããšãã§ããŸããGASã§ã¯ããŠãŒã¶ãŒã€ã³ã¿ã©ã¯ã·ã§ã³ã¯äž»ã«Google Workspaceã®ãµãŒãã¹ãšé£æºããã¹ã¯ãªããã®å®è¡ãšããŠè¡ãããŸãã
;ããŒã«ã«ãã¡ã€ã«ã®èªã¿æžã:
:ãã©ãŠã¶ã®JavaScriptã¯ããŠãŒã¶ãŒã®ã³ã³ãã¥ãŒã¿äžã®ãã¡ã€ã«ã«ã¢ã¯ã»ã¹ããããã®æ©èœãæäŸããŸãããGASã§ã¯ãããçŽæ¥ãµããŒããããŸããã代ããã«ãGoogle DriveãGoogle Sheetsãªã©ã®Google Workspaceã®ãµãŒãã¹ãä»ããŠãã¡ã€ã«ãæäœããŸãã
;ã¹ã¯ãªããå®è¡ç°å¢:
:ãã©ãŠã¶ã®JavaScriptã¯ããŠãŒã¶ãŒãWebããŒãžãéãããå¥ã®ããŒãžã«ç§»åãããããŠãå®è¡ãç¶ç¶ã§ããŸãã察ç
§çã«ãGASã®ã¹ã¯ãªããã¯Google Workspaceäžã§å®è¡ãããããªã¬ãŒã«ãã£ãŠå®è¡ãããããšããããŸããããŠãŒã¶ãŒã¢ã¯ã·ã§ã³ã«äŸåããããšã¯å°ãªãã§ãã
ãããã¯ããã©ãŠã¶äžã®JavaScriptãšGoogle Apps Scriptã®éãã®äžéšã§ããGASã¯äž»ã«Google Workspaceãšã®é£æºãèªååãç®çãšããŠããããã©ãŠã¶äžã®JavaScriptãšã¯çšéãç°ãªããŸãã
ãŸããããªããããã¯ãšã³ãã¹ã¯ãªãããå®è¡ãã [[Node.js]] ãšã¯äŒŒãå¶çŽã§ãããNodejs ã«ã¯ Console API ãå®è£
ãããŠããã<code>console.log("Hello");</code> ã®ããã«ã¡ãã»ãŒãžã®è¡šç€ºãªã©ãåºæ¥ãŸãããGASã«ã¯Console API ã¯å®è£
ãããŠããããããã£ãŠ <code>Logger</code>ãªããžã§ã¯ãã䜿ããŸãã
{{ã³ã©ã |Rhinoãšã³ãžã³ããV8ãšã³ãžã³ãžã®ç§»è¡|2=Google Apps Script (GAS) ã¯ãRhinoãšã³ãžã³ããV8ãšã³ãžã³ãžã®ç§»è¡ãè¡ããŸããã以äžã¯ãRhinoãšV8ã®éããšãã®æ³šæç¹ã«ã€ããŠã®æŠèŠã§ãã
# ãšã³ãžã³ã®å€æŽ:
#; Rhino: Google Apps Scriptã¯ä»¥åãJavaScriptãšã³ãžã³ãšããŠRhinoã䜿çšããŠããŸãããRhinoã¯Mozillaã«ãã£ãŠéçºãããJavaScriptãšã³ãžã³ã§ãJavaã§å®è£
ãããŠããŸãã
#;V8: Google Apps Scriptã¯çŸåšãV8ãšã³ãžã³ã䜿çšããŠããŸããV8ã¯Google Chromeã§äœ¿çšãããŠããé«æ§èœãªJavaScriptãšã³ãžã³ã§ãC++ã§å®è£
ãããŠããŸãã
# å®è¡é床ã®åäž:
#; Rhino: Rhinoã¯çžå¯Ÿçã«é
ããšããã倧èŠæš¡ãªã¹ã¯ãªãããæäœã«å¯ŸããŠæ§èœã®èª²é¡ããã£ãã
#; V8: V8ã¯é«éã§å¹ççãªãšã³ãžã³ã§ãããå®è¡é床ãåäžããŸãããããã«ãããã¹ã¯ãªããã®åŠçãããè¿
éã«è¡ãããŸãã
# æ°ããæ©èœã®ãµããŒã:
#; Rhino: Rhinoã¯å€ãJavaScriptä»æ§ããµããŒãããŠãããäžéšã®æ°ããæ©èœãæšæºèŠæ Œã«å¯Ÿå¿ããŠããŸããã§ããã
#; V8: V8ã¯ããæ°ããECMAScriptèŠæ ŒïŒES6以éïŒã«æºæ ããŠãããããå€ãã®æ°ããæ©èœãèšèªã®é²åã«å¯Ÿå¿ããŠããŸãã
# ES6+ æ©èœã®ãµããŒã:
#; Rhino: ES6以éã®æ°ããJavaScriptæ©èœïŒã¢ããŒé¢æ°ããã³ãã¬ãŒããªãã©ã«ãªã©ïŒã®ãµããŒããéå®çã§ããã
#; V8: V8ã¯ES6以éã®æ©èœãåºããµããŒãããŠãããããçŸä»£çã§å¹æçãªã³ãŒãã£ã³ã°ãå¯èœã§ãã
# 泚æç¹:
#; Google Apps Scriptã®RhinoããV8ãžã®ç§»è¡ã«äŒŽããäžéšã®ã¹ã¯ãªããã§äºææ§ã®åé¡ãçºçããå¯èœæ§ããããŸããç¹ã«ãRhinoã§åäœããŠãããV8ã§ãšã©ãŒãçºçããå ŽåããããŸãã
äžéšã®æ¢åã®ã¹ã¯ãªãããV8ãšã³ãžã³ã«é©å¿ããããŸã§ã«èª¿æŽãå¿
èŠãªå ŽåããããŸããããã¯ãç¹ã«å€ãã¹ã¯ãªãããRhinoåºæã®æ©èœã«é¢é£ããŠããŸãã
V8ãšã³ãžã³ã®å°å
¥ã«ãããã¹ã¯ãªããã®ããã©ãŒãã³ã¹ãåäžããäžæ¹ã§ãäžéšã®æåãå€æŽãããå¯èœæ§ããããŸããããã«ãããæ¢åã®ã¹ã¯ãªãããæå³ãã圱é¿ãåããããšããããŸãã
Googleã¯RhinoããV8ãžã®ç§»è¡ãé²ããŠãããæ°ããæ©èœãæ¹åãV8ãšã³ãžã³ã«åæ ãããŠããŸãã移è¡ã«äŒŽãå€æŽãã¢ããããŒãã¯ãGoogle Apps Scriptã®ããã¥ã¡ã³ãããªãªãŒã¹ããŒãã§ç¢ºèªããããšãéèŠã§ãã
}}
=== Google Apps Script ãªããžã§ã¯ã ===
Google Apps ScriptïŒGASïŒã§ã¯ãæ§ã
ãªGoogleãµãŒãã¹ãšé£æºããããã«äœ¿çšã§ããéåžžã®JavaScriptã«ãªããªããžã§ã¯ããæäŸãããŠããŸãã
=== SpreadsheetApp ===
<code>SpreadsheetApp</code> ãªããžã§ã¯ãã¯ãGoogle SheetsïŒã¹ãã¬ããã·ãŒãïŒãæäœããããã®ã¡ãœãããããããã£ãæäŸããŸããããã䜿çšããŠãã¹ãã¬ããã·ãŒãã®ããŒã¿ã®ååŸãæŽæ°ãæ°ããã¹ãã¬ããã·ãŒãã®äœæãªã©ãå¯èœã§ãã
; 䜿çšäŸ
: <syntaxhighlight lang=js>
// æ°ããã¹ãã¬ããã·ãŒããäœæããäŸ
function createNewSpreadsheet() {
const newSpreadsheet = SpreadsheetApp.create('New Spreadsheet');
Logger.log('Spreadsheet ID: ' + newSpreadsheet.getId());
}
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>SpreadsheetApp.create()</code> ã¡ãœããã䜿çšããŠæ°ããã¹ãã¬ããã·ãŒããäœæãããã®ã¹ãã¬ããã·ãŒãã®IDããã°ã«åºåããŠããŸãã
=== DriveApp ===
<code>DriveApp</code> ãªããžã§ã¯ãã¯ãGoogle DriveïŒãã©ã€ãïŒäžã®ãã¡ã€ã«ããã©ã«ããæäœããããã®ã¡ãœãããããããã£ãæäŸããŸãããã¡ã€ã«ããã©ã«ãã®äœæãååŸãåé€ãªã©ãå¯èœã§ãã
; 䜿çšäŸ
: <syntaxhighlight lang=js>
// æ°ãããã©ã«ããäœæããäŸ
function createNewFolder() {
const newFolder = DriveApp.createFolder('New Folder');
Logger.log('Folder ID: ' + newFolder.getId());
}
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>DriveApp.createFolder()</code> ã¡ãœããã䜿çšããŠæ°ãããã©ã«ããäœæãããã®ãã©ã«ãã®IDããã°ã«åºåããŠããŸãã
=== GmailApp ===
<code>GmailApp</code> ãªããžã§ã¯ãã¯ãGmailïŒé»åã¡ãŒã«ïŒã¢ã«ãŠã³ãã®ã¡ãŒã«ãæäœããããã®ã¡ãœãããããããã£ãæäŸããŸããã¡ãŒã«ã®éä¿¡ãåä¿¡ãåé€ãªã©ãå¯èœã§ãã
; 䜿çšäŸ
: <syntaxhighlight lang=js>
// ã¡ãŒã«ãéä¿¡ããäŸ
function sendEmail() {
const recipient = '[email protected]';
const subject = 'Test Email';
const body = 'This is a test email.';
GmailApp.sendEmail(recipient, subject, body);
}
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>GmailApp.sendEmail()</code> ã¡ãœããã䜿çšããŠãã¹ãçšã®ã¡ãŒã«ãéä¿¡ããŠããŸãã
=== CalendarApp ===
<code>CalendarApp</code> ãªããžã§ã¯ãã¯ãGoogle CalendarïŒã«ã¬ã³ããŒïŒãæäœããããã®ã¡ãœãããããããã£ãæäŸããŸããäºå®ã®äœæãååŸãåé€ãªã©ãå¯èœã§ãã
; 䜿çšäŸ
: <syntaxhighlight lang=js>
// æ°ããäºå®ãäœæããäŸ
function createNewEvent() {
const calendar = CalendarApp.getDefaultCalendar();
const event = calendar.createEvent('New Event', new Date('2025-01-01T12:00:00'), new Date('2025-01-01T14:00:00'));
Logger.log('Event ID: ' + event.getId());
}
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>CalendarApp.getDefaultCalendar().createEvent()</code> ã¡ãœããã䜿çšããŠæ°ããäºå®ãäœæãããã®äºå®ã®IDããã°ã«åºåããŠããŸãã
=== UrlFetchApp ===
<code>UrlFetchApp</code> ãªããžã§ã¯ãã¯ãGoogle Apps Scriptã§å€éšã®URLããããŒã¿ãååŸããããã®ã¡ãœãããããããã£ãæäŸããŸããããã䜿çšããããšã§ãå€éšAPIãšã®é£æºãWebãµã€ãããããŒã¿ã®ååŸãå¯èœã§ãã
; 䜿çšäŸ
: <syntaxhighlight lang=js>
// å€éšAPIããããŒã¿ãååŸããäŸ
function fetchDataFromAPI() {
const apiUrl = 'https://api.example.com/data';
const response = UrlFetchApp.fetch(apiUrl);
Logger.log('Response Code: ' + response.getResponseCode());
Logger.log('Response Content: ' + response.getContentText());
}
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>UrlFetchApp.fetch()</code> ã¡ãœããã䜿çšããŠå€éšAPIããããŒã¿ãååŸããååŸããããŒã¿ã®HTTPã¬ã¹ãã³ã¹ã³ãŒããšã³ã³ãã³ãããã°ã«åºåããŠããŸãã
=== PropertiesService ===
<code>PropertiesService</code> ãªããžã§ã¯ãã¯ãGoogle Apps Scriptã®ããããã£ã管çããããã®ã¡ãœãããããããã£ãæäŸããŸããã¹ã¯ãªããã®å®è¡éã§ããŒã¿ãä¿æããããèšå®ãä¿åãããããã®ã«äœ¿çšãããŸãã
; 䜿çšäŸ
: <syntaxhighlight lang=js>
// ã¹ã¯ãªããããããã£ã«ããŒã¿ãä¿åããäŸ
function saveDataToProperties() {
const properties = PropertiesService.getScriptProperties();
properties.setProperty('apiKey', 'your_api_key');
}
// ã¹ã¯ãªããããããã£ããããŒã¿ãååŸããäŸ
function getDataFromProperties() {
const properties = PropertiesService.getScriptProperties();
const apiKey = properties.getProperty('apiKey');
Logger.log('API Key: ' + apiKey);
}
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>PropertiesService</code> ã䜿çšããŠã¹ã¯ãªããããããã£ã«ããŒã¿ãä¿åãããã®åŸååŸããŠãã°ã«åºåããŠããŸãã
=== ScriptApp ===
<code>ScriptApp</code> ãªããžã§ã¯ãã¯ãGoogle Apps Scriptã®ãããžã§ã¯ãå
šäœã«é¢ããã¡ãœãããããããã£ãæäŸããŸãããããžã§ã¯ãã®èšå®ã管çãã¹ã¯ãªããã®ããããã£ãªã©ã«äœ¿çšãããŸãã
; 䜿çšäŸ
: <syntaxhighlight lang=js>
// ã¹ã¯ãªããã®ããããã£ãèšå®ããäŸ
function setScriptProperties() {
ScriptApp.getProjectTriggers().newTrigger('myFunction').timeBased().everyDays(1).create();
}
// ã¹ã¯ãªããã®ããããã£ãååŸããäŸ
function getScriptProperties() {
const timeZone = ScriptApp.getProjectTimeZone();
Logger.log('Script Time Zone: ' + timeZone);
}
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>ScriptApp.getProjectTriggers()</code> ã䜿çšããŠæ°ããããªã¬ãŒãäœæãããŸã <code>ScriptApp.getProjectTimeZone()</code> ã䜿çšããŠã¹ã¯ãªããã®ãããžã§ã¯ãã®ã¿ã€ã ãŸãŒã³ãååŸããŠããŸãã
=== Logger ===
<code>Logger</code> ã¯ãGoogle Apps Scriptã®ãããã°ããã°åºåã®ããã«äœ¿çšãããçµã¿èŸŒã¿ã®ãªããžã§ã¯ãã§ãã
ãã°ã¯Google Apps Scriptãšãã£ã¿å
ã§ç¢ºèªã§ããŸãã
; 䜿çšäŸ
: <syntaxhighlight lang=js>
// ãã°ã«ã¡ãã»ãŒãžãåºåããäŸ
function logMessage() {
Logger.log('This is a log message.');
}
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>Logger.log()</code> ã䜿çšããŠåçŽãªãã°ã¡ãã»ãŒãžãåºåããŠããŸãããã°ã¯Google Apps Scriptãšãã£ã¿ã®ã衚瀺ãâããã°ãã§ç¢ºèªã§ããŸãã
==== ãªããžã§ã¯ãããšã®éçº ====
GASã®éçºã«ã¯ãGoogle WorkspaceïŒæ§G SuiteïŒã®ã¢ã«ãŠã³ããå¿
èŠã§ããGoogle Workspaceã¯ãäŒæ¥åãã®ã¯ã©ãŠããµãŒãã¹ã§ãããžãã¹çšéã«æé©åãããã¢ããªã±ãŒã·ã§ã³ãæäŸããŠããŸãã
GASãéçºããããã«ã¯ã以äžã®æé ãå¿
èŠã§ãã
;Google Workspaceã®ã¢ã«ãŠã³ããååŸãã
:Google Workspaceã®ã¢ã«ãŠã³ããååŸããã«ã¯ã以äžã®æé ãå¿
èŠã§ãã
:# Google Workspaceã®ãµã€ãã«ã¢ã¯ã»ã¹ãã
:# ãã°ã€ã³ãŸãã¯æ°èŠç»é²ããã
:# ãã©ã³ãéžæãã
:# æ¯æãæ¹æ³ãç»é²ãã
;ã¹ã¯ãªãããšãã£ã¿ãéã
:ã¹ã¯ãªãããšãã£ã¿ã¯ãGoogleã¢ããªã±ãŒã·ã§ã³å
ã«çµ±åãããéçºç°å¢ã§ãGASã®ããã°ã©ã ãäœæããããã®ããŒã«ã§ããã¹ãã¬ããã·ãŒãããã©ãŒã ãGmailãªã©ã®Googleã¢ããªã±ãŒã·ã§ã³å
ã«çµ±åãããŠãããã¢ããªã±ãŒã·ã§ã³å
ããçŽæ¥éãããšãã§ããŸãã
:; ã¹ãã¬ããã·ãŒãã®å Žå
:: ã¹ãã¬ããã·ãŒããéããç¶æ
ã§ã[ããŒã«] > [ã¹ã¯ãªãããšãã£ã¿]ãéžæããŸãã
:; ãã©ãŒã ã®å Žå
:: ãã©ãŒã ãéããç¶æ
ã§ã[èšå®] > [ã¹ã¯ãªãããšãã£ã¿]ãéžæããŸãã
:; Gmailã®å Žå
:: Gmailãéããç¶æ
ã§ã[èšå®] > [ã¹ã¯ãªãããšãã£ã¿]ãéžæããŸãã
;ã¹ã¯ãªãããäœæãã
:ã¹ã¯ãªãããšãã£ã¿ãéããããããã°ã©ã ãäœæããŸããGASã§ã¯ãJavaScriptã«äŒŒãææ³ã䜿çšããŠããŸãã
;ã¹ã¯ãªãããå®è¡ãã
:ã¹ã¯ãªãããå®è¡ããã«ã¯ã以äžã®æé ãå¿
èŠã§ãã
:# ã¹ã¯ãªãããšãã£ã¿äžã§ã[é¢æ°ã®å®è¡]ãã¿ã³ãã¯ãªãã¯ããŸãã
:# å®è¡ããé¢æ°ãéžæããŸãã
:# [å®è¡]ãã¿ã³ãã¯ãªãã¯ããŸãã
== ããªã¬ãŒ ==
=== ããªã¬ãŒãšã¯ ===
'''ããªã¬ãŒ'''ïŒTriggerïŒ ã¯ãGoogle Apps ScriptïŒGASïŒã«ãããŠãç¹å®ã®ã€ãã³ããçºçãããšããå®æçãªæéåäœã§ã¹ã¯ãªãããå®è¡ããä»çµã¿ã§ããããªã¬ãŒã䜿çšããããšã§ãç¹å®ã®æ¡ä»¶ãæºããããéã«èªåçã«ã¹ã¯ãªãããèµ·åããã¿ã¹ã¯ã®èªååãå®æçãªåŠçã容æã«å®çŸã§ããŸãã
=== ããªã¬ãŒã®åºæ¬çãªæŠå¿µ ===
# ã€ãã³ãããªã¬ãŒ
#: ã€ãã³ãããªã¬ãŒã¯ãç¹å®ã®ã€ãã³ããçºçãããšãã«ã¹ã¯ãªãããå®è¡ããããªã¬ãŒã¿ã€ãã§ããäŸãã°ãã¹ãã¬ããã·ãŒããç·šéãããããã©ãŒã ã®åçãéä¿¡ãããããªã©ã該åœããŸããããã«ãããããŒã¿ã®å€æŽã«å¿ããŠã¹ã¯ãªãããå³åº§ã«åå¿ããããšãã§ããŸãã
#:<syntaxhighlight lang=js>
// ç·šéæããªã¬ãŒã®èšå®äŸ
ScriptApp.newTrigger('onEditFunction')
.forSpreadsheet('YOUR_SPREADSHEET_ID')
.onEdit()
.create();
</syntaxhighlight>
# æéããŒã¹ããªã¬ãŒ
#: æéããŒã¹ããªã¬ãŒã¯ãäžå®ã®æéããšã«ã¹ã¯ãªãããå®è¡ããããªã¬ãŒã¿ã€ãã§ããæ¥æ¬¡ãé±æ¬¡ããŸãã¯ç¹å®ã®æéã«å®è¡ãããããã«èšå®ã§ããŸããããã«ãããå®æçãªããŒã¿æŽæ°ããããåŠçãè¡ãããšãã§ããŸãã
#:<syntaxhighlight lang=js>
// æ¥æ¬¡ããªã¬ãŒã®èšå®äŸ
ScriptApp.newTrigger('dailyFunction')
.timeBased()
.atHour(2)
.everyDays(1)
.create();
</syntaxhighlight>
=== ã¡ãœãããã§ã€ã³ ===
'''ã¡ãœãããã§ã€ã³'''ïŒMethod ChainingïŒ ã¯ããªããžã§ã¯ãã®ã¡ãœããã1ã€ã®ã¹ããŒãã¡ã³ãã§é£ç¶ããŠåŒã³åºãææ³ã§ããããã«ãããã³ãŒããç°¡æœãã€å¯èªæ§ãåäžããè€æ°ã®ã¡ãœãããã·ãŒã ã¬ã¹ã«é£æºããŠåŠçãããŸããåã¡ãœããã¯ãªããžã§ã¯ãã®ç¶æ
ãå€æŽãããŸãã¯æ°ãããªããžã§ã¯ããè¿ããŸãããã®ç¹æ§ã¯ãç¹ã«ã©ã€ãã©ãªããã¬ãŒã ã¯ãŒã¯ã®APIãã¶ã€ã³ã§ããèŠããããã§ãŒã³å
ã§è€éãªåŠçãå¹æçã«è¡šçŸããŸãã
==== ããªã¬ãŒãšã¡ãœãããã§ã€ã³ã®çµã¿åãã ====
GASã®ããªã¬ãŒèšå®ã«ãããŠãã¡ãœãããã§ã€ã³ã䜿çšããããšãã§ããŸãã以äžã«ãããªã¬ãŒã®äœæãšãã®éã®ã¡ãœãããã§ã€ã³ã®äŸã瀺ããŸãã
:<syntaxhighlight lang=js>
// ã€ãã³ãããªã¬ãŒã®èšå®ãšã¡ãœãããã§ã€ã³ã®äŸ
ScriptApp.newTrigger('onEditFunction')
.forSpreadsheet('YOUR_SPREADSHEET_ID') // ã¹ãã¬ããã·ãŒãã®æå®
.onEdit() // ç·šéæããªã¬ãŒã®æå®
.create(); // ããªã¬ãŒã®äœæ
</syntaxhighlight>
äžèšã®äŸã§ã¯ã<code>newTrigger</code> ã¡ãœãããåŒã³åºãããã®åŸã«ç¶ããŠã¡ãœãããåŒã³åºããŠããŸããåã¡ãœããã¯ãªããžã§ã¯ãã®ç¶æ
ãå€æŽããæçµçã« <code>create</code> ã¡ãœãããããªã¬ãŒãäœæããŸããããã«ããã1ã€ã®ã¹ããŒãã¡ã³ãã§ããªã¬ãŒãå¹ççã«èšå®ããããšãã§ããŸãã
==== ã¡ãªãã ====
; ã³ãŒãã®ç°¡æœã
: ã¡ãœãããã§ã€ã³ã䜿çšããããšã§ãããªã¬ãŒã®èšå®ã1è¡ã§å®çµããã³ãŒããç°¡æœã«ãªããŸããããã«ãããå¯èªæ§ãåäžããä¿®æ£ãã¡ã³ããã³ã¹ã容æã«ãªããŸãã
; ãã«ãšã¯ã¹ãã¬ãã·ã§ã³
: ã¡ãœãããã§ã€ã³ã䜿çšããããšã§ãããªã¬ãŒã®èšå®ãäžè²«ããŠããŸããåã¡ãœããã¯ãªããžã§ã¯ãã®ç¶æ
ãå€æŽããæçµçãªçµæã <code>create</code> ã¡ãœããã«ãã£ãŠååŸãããããããã«ãšã¯ã¹ãã¬ãã·ã§ã³ïŒå®å
šãªè¡šçŸïŒãå®çŸãããŸãã
; è€éãªèšå®ã®è£å®
: ã¡ãœãããã§ã€ã³ã䜿çšããããšã§ãè€éãªããªã¬ãŒã®èšå®ãé次çãã€èªç¶ãªåœ¢ã§è¡ãããšãã§ããŸããåã¡ãœãããç¹å®ã®èšå®ãæ
åœããããããçµã¿åãããããšã§æè»ãã€å¹ççãªããªã¬ãŒãæ§ç¯ã§ããŸãã
==== å®è·µäŸ ====
以äžã¯ãæ¥æ¬¡ã§ç¹å®ã®é¢æ°ãå®è¡ããæéããŒã¹ããªã¬ãŒãäœæããäŸã§ãã
:<syntaxhighlight lang=js>
// æéããŒã¹ããªã¬ãŒã®èšå®ãšã¡ãœãããã§ã€ã³ã®äŸ
ScriptApp.newTrigger('dailyFunction')
.timeBased() // æéããŒã¹ããªã¬ãŒã®æå®
.atHour(2) // æ¯æ¥2æã«å®è¡
.everyDays(1) // 1æ¥ããšã«å®è¡
.create(); // ããªã¬ãŒã®äœæ
</syntaxhighlight>
ããã«ãããæ¯æ¥2æã« <code>dailyFunction</code> é¢æ°ãèªåçã«å®è¡ãããããªã¬ãŒãèšå®ãããŸããã¡ãœãããã§ã€ã³ã䜿çšããããšã§ããããã®èšå®ãç°¡æœãã€çŽæçã«ãªã£ãŠããŸãã
ããªã¬ãŒãšã¡ãœãããã§ã€ã³ãçµã¿åãããããšã§ãGoogle Apps Scriptã«ãããŠã¹ã¯ãªããã®å®è¡ã¿ã€ãã³ã°ãæè»ãã€å¹æçã«ç®¡çããããšãã§ããŸãã
=== ããªã¬ãŒã®çš®é¡ ===
GASã§ã¯äž»ã«ä»¥äžã®ããªã¬ãŒãå©çšã§ããŸãã
# onEdit ããªã¬ãŒ
#;説æ: ã¹ãã¬ããã·ãŒããããã¥ã¡ã³ããç·šéãããéã«çºç«ããŸãã
#;䜿çšäŸ: ã¹ãã¬ããã·ãŒãå
ã®ããŒã¿ãå€æŽããããç¹å®ã®åŠçãå®è¡ã
# onChange ããªã¬ãŒ
#;説æ: ã¹ãã¬ããã·ãŒããããã¥ã¡ã³ãããŸãã¯ãã©ãŒã ã®å
容ãå€æŽããããšãã«çºç«ããŸãã
#;䜿çšäŸ: ãã©ãŒã ã®åçãéä¿¡ããããåŠçãããªã¬ãŒã
# onFormSubmit ããªã¬ãŒ
#;説æ: Google ãã©ãŒã ã®åçãéä¿¡ããããšãã«çºç«ããŸãã
#;䜿çšäŸ: ãã©ãŒã ã®åçãéä¿¡ããããç¹å®ã®åŠçãå®è¡ã
# timeBased ããªã¬ãŒ
#;説æ: æå®ããæéåäœã§ã¹ã¯ãªãããå®è¡ããŸãã
#;䜿çšäŸ: æ¥æ¬¡ã§ããŒã¿ãéèšããã¹ã¯ãªãããå®è¡ã
=== ããªã¬ãŒã®èšå®æ¹æ³ ===
ããªã¬ãŒã¯ã¹ã¯ãªãããšãã£ã¿ã§èšå®ããããšãã§ããŸãã
#ã¹ã¯ãªãããšãã£ã¿ãéã: Google Apps ScriptãéããŸãã
#ç·šé -> çŸåšã®ãããžã§ã¯ãã®ããªã¬ãŒ: ã¡ãã¥ãŒãããçŸåšã®ãããžã§ã¯ãã®ããªã¬ãŒããéžæããŸãã
#ããªã¬ãŒã®è¿œå : ç»é¢å³äžã®ãããªã¬ãŒã®è¿œå ããã¿ã³ãã¯ãªãã¯ããŸãã
#ããªã¬ãŒã®èšå®: ããªã¬ãŒã®çš®é¡ïŒã€ãã³ããŸãã¯æéããŒã¹ïŒãå®è¡ããé¢æ°ãæå®ããŠããªã¬ãŒãäœæããŸãã
:<syntaxhighlight lang=js>
// ã€ãã³ãããªã¬ãŒã®èšå®äŸ
ScriptApp.newTrigger('onEditFunction')
.forSpreadsheet('YOUR_SPREADSHEET_ID')
.onEdit()
.create();
// æéããŒã¹ããªã¬ãŒã®èšå®äŸ
ScriptApp.newTrigger('dailyFunction')
.timeBased()
.atHour(2)
.everyDays(1)
.create();
</syntaxhighlight>
ããªã¬ãŒãèšå®ããéã¯ãæ
éã«å®è¡é »åºŠã察象ç¯å²ãæ€èšããããªã¬ãŒã®é©åãªç®¡çãè¡ãããšãéèŠã§ãããŸããå®æçãªããªã¬ãŒãèšå®ããå Žåã¯ãã¿ã€ã ãŸãŒã³ã®èæ
®ãå¿
èŠã§ãã
ãããã®æé ã«åŸã£ãŠããªã¬ãŒãèšå®ããããšã§ãGoogle Apps Scriptãããå¹æçã«å©çšããã¿ã¹ã¯ã®èªååãå®æçãªåŠçãã¹ã ãŒãºã«å®çŸããããšãã§ããŸãã
==== ã€ãã³ããšã®å·®ç°ãšé¡äŒŒç¹ ====
ããªã¬ãŒãšãŠã§ããã©ãŠã¶äžã®JavaScriptã®ã€ãã³ãã¯ãããã€ãã®ç¹ã§ç°ãªãç¹æ§ãæã¡ã€ã€ããåããããéèŠã§ãããé£æºããå Žé¢ããããŸãã以äžã¯ãããªã¬ãŒãšã€ãã³ãã®å·®ç°ãšé¡äŒŒç¹ã®äžè¬çãªèŠ³ç¹ã§ãã
; å·®ç°:
# çºçã®åå :
#* ããªã¬ãŒ: éåžžãæéã®çµéãç¹å®ã®æ¡ä»¶ãæºãããããšããªã©ãã¹ã¯ãªãããå®æçã«å®è¡ãããããã¹ã±ãžã¥ãŒã«ãããŸãã
#* ã€ãã³ã: ãŠãŒã¶ãŒã®ã¢ã¯ã·ã§ã³ïŒã¯ãªãã¯ãããŒå
¥åããã©ãŒã ã®æåºãªã©ïŒããããŒãžã®èªã¿èŸŒã¿å®äºãªã©ãç¹å®ã®æäœãç¶æ
ã®å€åã«åå¿ããŠçºçããŸãã
# å®è¡ç°å¢:
#* ããªã¬ãŒ: Google Apps Scriptãªã©ã®ãµãŒããŒãµã€ãã§å®è¡ãããã¹ã¯ãªãããèªåçã«ããªã¬ãŒãããŸãã
#* ã€ãã³ã: ãŠã§ããã©ãŠã¶ãŒäžã®ã¯ã©ã€ã¢ã³ããµã€ãã§JavaScriptãå®è¡ããããŠãŒã¶ãŒã®æäœã«å¯ŸããŠå³åº§ã«å¿çããŸãã
# ç»é²æ¹æ³:
#* ããªã¬ãŒ: Google Apps Scriptãšãã£ã¿ãŸãã¯APIã䜿çšããŠã¹ã¯ãªããå
ã§æåã§èšå®ãããŸãã
#* ã€ãã³ã: JavaScriptã®<code>addEventListener</code>ã¡ãœããã䜿çšããŠãHTMLèŠçŽ ã«å¯ŸããŠãªã¹ããŒãç»é²ããŸãã
; é¡äŒŒç¹:
# éåæå®è¡:
#* ããªã¬ãŒãã€ãã³ãããéåæçã«ã¹ã¯ãªãããå®è¡ããŸããããªã¬ãŒã¯ã¹ã±ãžã¥ãŒã«ã«åŸã£ãŠéåæã«çºçããã€ãã³ãã¯ãŠãŒã¶ãŒã®ã¢ã¯ã·ã§ã³ã«å¿ããŠéåæã«çºçããŸãã
# èªåå:
#* ããªã¬ãŒãã€ãã³ãããäœãããã®èªååãã¿ã¹ã¯ã®ããªã¬ãŒãšããŠäœ¿çšãããŸããããªã¬ãŒã¯å®æçãªåŠçããããåŠçã«ãã€ãã³ãã¯ãŠãŒã¶ãŒãšã®å¯Ÿè©±ãåçãªããŒãžã®å€åã«å¯Ÿããå¿çã«äœ¿çšãããŸãã
# ã¢ã¯ã·ã§ã³ã®ããªã¬ãŒ:
#* ããªã¬ãŒãã€ãã³ãããããçš®ã®ã¢ã¯ã·ã§ã³ãããªã¬ãŒãšããŠäœ¿çšããŸããããªã¬ãŒã¯ç¹å®ã®æ¡ä»¶ãæºãããããšãã«å®è¡ãããã€ãã³ãã¯ç¹å®ã®ãŠãŒã¶ãŒã®ã¢ã¯ã·ã§ã³ã«å¿çããŠå®è¡ãããŸãã
ç¶æ³ã䜿çšã±ãŒã¹ã«ãã£ãŠãããªã¬ãŒãšã€ãã³ããé£æºããŠå©çšãããããšããããŸããäŸãã°ãç¹å®ã®ã€ãã³ãïŒãã¿ã³ã¯ãªãã¯ãªã©ïŒãçºçããéã«ãããã«å¿ããŠããªã¬ãŒãã»ããããããããªã·ããªãªãèããããŸãã
=== ãã¹ããã©ã¯ãã£ã¹ ===
ããªã¬ãŒãå¹æçã«æŽ»çšããããã®ãã¹ããã©ã¯ãã£ã¹ã以äžã«ç€ºããŸãã
# ããªã¬ãŒã®èšå®åã«ã¹ã¯ãªããããã¹ã
#: ããªã¬ãŒãèšå®ããåã«ãã¹ã¯ãªãããæåŸ
éãã«åäœããããååã«ãã¹ãããŸããäºæãã¬ããªã¬ãŒã«ãããæå³ããªãåŠçãå®è¡ãããããšãé¿ããããã§ãã
# åé·æ§ãèæ
®ããããªã¬ãŒã®èšèš
#: ã¹ã¯ãªããã®å®è¡ã«æéããããå ŽåããåãåŠçãéè€ããŠèµ°ãããšãé¿ããããã«ãåé·æ§ãèæ
®ããŠããªã¬ãŒãèšèšããŸããäŸãã°ãååã®å®è¡ãå®äºããŠããäžå®æéçµéããŠããªãå Žåã¯ãæ°ããªããªã¬ãŒãèšå®ããªãããã«ããŸãã
# ãšã©ãŒãã³ããªã³ã°ãå®è£
#: ããªã¬ãŒã§å®æçã«å®è¡ãããã¹ã¯ãªããã§ã¯ãå€éšã®ããŒã¿ããµãŒãã¹ãšã®é£æºãå«ãŸããããšããããŸãããšã©ãŒãã³ããªã³ã°ãååã«å®è£
ããŠããšã©ãŒãçºçããå Žåã«é©åã«éç¥ãããªã©ã®å¯Ÿçãè¡ããŸãã
# ã»ãã¥ãªãã£ã®ç¢ºä¿
#: ããªã¬ãŒãèšå®ããéã«ã¯ãã¹ã¯ãªãããå¿
èŠãªæš©é以å€ã®æ
å ±ã«ã¢ã¯ã»ã¹ã§ããªãããã«ãã»ãã¥ãªãã£ã確ä¿ããŸããæå°æš©éã®ååãéµå®ããæš©éã®äžèŠãªæ¡å€§ãé¿ããŸãã
# ããªã¬ãŒã®äžæåæ¢ãšåé
#: ããªã¬ãŒã¯äžæçã«åæ¢ãããåéãããããããšãã§ããŸããã¹ã¯ãªããã®ä¿®æ£ããã©ãã«ã·ã¥ãŒãã£ã³ã°æã«ãããªã¬ãŒãé©åã«ç®¡çããããšãéèŠã§ãã
#:<syntaxhighlight lang=js>
// ããªã¬ãŒã®äžæåæ¢
ScriptApp.getProjectTriggers().forEach(trigger => ScriptApp.deleteTrigger(trigger));
// ããªã¬ãŒã®åé
ScriptApp.newTrigger('myFunction').timeBased().everyDays(1).create();
</syntaxhighlight>
# ããªã¬ãŒã®ç£èŠãšãã°
#: ããªã¬ãŒã®å®è¡ç¶æ³ãã¢ãã¿ãªã³ã°ãããã°ãåºåããŠããããšã§ãã¹ã¯ãªããã®åäœãããã©ãŒãã³ã¹ãææ¡ãããããªããŸãã
#:<syntaxhighlight lang=js>
// ãã°ã®åºå
function myFunction() {
Logger.log('ã¹ã¯ãªãããå®è¡ãããŸããã');
}
</syntaxhighlight>
ãããã®ãã¹ããã©ã¯ãã£ã¹ãéµå®ããããšã§ãããªã¬ãŒãå¹æçã«æŽ»çšããå®å®ãã€ã»ãã¥ã¢ãªèªååã¹ã¯ãªãããæ§ç¯ããããšãã§ããŸãã
== ã¢ããªãšã®é£æº ==
=== ã¹ãã¬ããã·ãŒããšã®é£æº ===
Google Apps ScriptïŒGASïŒã¯ãGoogle SheetsïŒã¹ãã¬ããã·ãŒãïŒãšã®ã·ãŒã ã¬ã¹ãªé£æºãæäŸããŸããã¹ãã¬ããã·ãŒããšã®é£æºã«ã¯ããŸããŸãªåºæ¬çãªæäœãå«ãŸããŸãã
==== ã»ã«ã«å€ãæžã蟌ã ====
ç¹å®ã®ã»ã«ã«å€ãæžã蟌ãã«ã¯ã<code>SpreadsheetApp</code> ãªããžã§ã¯ãã䜿çšããŸãã以äžã¯ãA1ã»ã«ã«ãHello, World!ããšæžã蟌ããµã³ãã«ã³ãŒãã§ãã
:<syntaxhighlight lang=js>
function writeHelloWorld() {
SpreadsheetApp.getActiveSheet().getRange("A1").setValue('Hello, World!');
}
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ã<code>getActiveSheet()</code> ã§çŸåšã¢ã¯ãã£ããªã·ãŒããååŸãã<code>getRange("A1")</code> ã§A1ã»ã«ãæå®ããŠããŸãããããŠã<code>setValue('Hello, World!')</code> ã§ã»ã«ã«å€ãæžã蟌ãã§ããŸãã
==== ã»ã«ããå€ãèªã¿èŸŒã ====
ç¹å®ã®ã»ã«ããå€ãèªã¿èŸŒãã«ã¯ã<code>getValue()</code> ã¡ãœããã䜿çšããŸãã以äžã®äŸã§ã¯ãA1ã»ã«ã®å€ãèªã¿èŸŒãã§å€æ° <code>cellValue</code> ã«æ ŒçŽããŠããŸãã
:<syntaxhighlight lang=js>
function readCellValue() {
const cellValue = SpreadsheetApp.getActiveSheet().getRange("A1").getValue();
Logger.log('A1ã»ã«ã®å€: ' + cellValue);
}
</syntaxhighlight>
<code>Logger.log()</code> ã䜿çšããŠèªã¿èŸŒãã å€ããã°ã«è¡šç€ºããŠããŸããããã¯ã¹ã¯ãªãããšãã£ã¿å
ã§ç¢ºèªã§ããŸãã
==== ã»ã«ã«èšç®çµæãæžã蟌ã ====
ã¹ãã¬ããã·ãŒãäžã®æ°å€ãååŸããããããèšç®ããŠçµæãå¥ã®ã»ã«ã«æžã蟌ãããšãå¯èœã§ãã以äžã®ãµã³ãã«ã§ã¯ãA1ã»ã«ãšA2ã»ã«ã®å€ã足ããŠA3ã»ã«ã«çµæãæžã蟌ãã§ããŸãã
:<syntaxhighlight lang=js>
function calculateAndWrite() {
const a1 = SpreadsheetApp.getActiveSheet().getRange("A1").getValue();
const a2 = SpreadsheetApp.getActiveSheet().getRange("A2").getValue();
const result = a1 + a2;
SpreadsheetApp.getActiveSheet().getRange("A3").setValue(result);
}
</syntaxhighlight>
ãããã®åºæ¬çãªæäœãçµã¿åãããããšã§ãã¹ãã¬ããã·ãŒãäžã§ããŒã¿ãæäœããGASã§åŠçãè¡ãããšãã§ããŸããããã¯éåžžã«åŒ·åã§ãèªååãããã¿ã¹ã¯ãã«ã¹ã¿ã æ©èœã®å®è£
ã«åœ¹ç«ã¡ãŸãã
; æŒç¿
ãŸãã以äžã®ãããªæŒç¿çšã«ã¯ãŒã¯ã·ãŒããçšæããŸãã
:{|:{|| class="wikitable" style="text-align:center"
|+ <!-- ã¿ã€ãã« -->
|-
! !! ããAãã !! ããBãã !! ããCãã
|-
! ã1ã
| 5 || 14 ||
|-
! ã2ã
| 3 || 20 ||
|-
! ã3ã
| || ||
|-
! ã4ã
| || ||
|}
;A1ãšA2ã®åãæ±ããŠA3ã«æžã蟌ã¿ãŸãããã
ã¹ãã¬ããã·ãŒãã®ã»ã«ã«ãæ°åŒãé¢æ°ãæžãã®ãäžè¬çã§ããã
æ¬ããã°ã©ã ã¯ã¹ã¯ãªããç·Žç¿çšãªã®ã§ãã¹ã¯ãªããã§å®è¡ããŠã¿ãŸãããã
: <syntaxhighlight lang=js>
function sumAndSet() {
const sheet = SpreadsheetApp.getActiveSheet();
// A1ãšA2ã»ã«ã®å€ãååŸ
const a1 = sheet.getRange("A1").getValue();
const a2 = sheet.getRange("A2").getValue();
// æ°å€ãæ£ããååŸã§ããã確èª
if (typeof a1 !== 'number') {
Logger.logger('A1ã®ã»ã«ã«æ°å€ããããŸããã');
return;
}
// æ°å€ãæ£ããååŸã§ããã確èª
if (typeof a2 !== 'number') {
Logger.logger('A2ã®ã»ã«ã«æ°å€ããããŸããã');
return;
}
// A1ãšA2ã®å€ã®åèšãèšç®
const sum = a1 + a2;
// èšç®çµæãA3ã»ã«ã«ã»ãã
sheet.getRange("A3").setValue(sum);
}
</syntaxhighlight>
# <code>SpreadsheetApp.getActiveSheet()</code>: çŸåšã¢ã¯ãã£ããªã¹ãã¬ããã·ãŒãã®ã·ãŒããååŸããŸãã
# <code>sheet.getRange("A1").getValue()</code>: A1ã»ã«ã®å€ãååŸããŸãã
# åæ§ã«A2ã»ã«ã®å€ãååŸããŸãã
# <code>typeof a1 !== 'number'</code>: <code>typeof</code>æŒç®åã䜿çšããŠãå€æ°ãæ°å€ã§ãªãå Žåã«ãšã©ãŒã¡ãã»ãŒãžã衚瀺ããŸãã
# <code>Logger.log()</code>: ãšã©ãŒã¡ãã»ãŒãžããã°ã«åºåããŸãã<code>Logger</code>ã¯Google Apps Scriptã®ãã°åºåãè¡ãããã®ã¯ã©ã¹ã§ãã
# <code>sheet.getRange("A3").setValue(sum)</code>: A3ã»ã«ã«åèšå€ãã»ããããŸãã
äžèšã³ãŒãã®å®è¡ã«æåããã°ãäžèšã®ããã« A3 ã«èšç®çµæ 8 ãæžã蟌ã¿ãããŸãã
:{|:{|| class="wikitable" style="text-align:center"
|+ <!-- ã¿ã€ãã« -->
|-
! !! ããAãã !! ããBãã !! ããCãã
|-
! ã1ã
| 5 || 14 ||
|-
! ã2ã
| 3 || 20 ||
|-
! ã3ã
| 8 || ||
|-
! ã4ã
| || ||
|}
; ã»ã«ã«åŒãæžã
Google Apps ScriptïŒGASïŒã䜿çšããŠã»ã«ã«åŒïŒæ°åŒïŒãæžã蟌ãããšãã§ããŸãã以äžã¯ããã®ããã®ãµã³ãã«ã³ãŒãã§ãã
: <syntaxhighlight lang=js>
function writeFormulaToSheet() {
// ã¢ã¯ãã£ããªã¹ãã¬ããã·ãŒããååŸ
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
// B1ã»ã«ã«SUMé¢æ°ãå«ãæ°åŒãæžã蟌ã
sheet.getRange("B1").setFormula("=SUM(A1:A5)");
}
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ã<code>setFormula</code> ã¡ãœããã䜿çšããŠB1ã»ã«ã«SUMé¢æ°ãå«ãæ°åŒãæžã蟌ãã§ããŸãããã®äŸã§ã¯ãA1ããA5ãŸã§ã®ã»ã«ã®åèšãèšç®ããSUMé¢æ°ã䜿çšããŠããŸãããä»»æã®æ°åŒã䜿ãããšãã§ããŸãã
泚æç¹ãšããŠãã»ã«ã«åŒãæžã蟌ããšããã®ã»ã«ã«è¡šç€ºãããã®ã¯èšç®çµæã§ãããå®éã®åŒã¯ç·šéããŒã«è¡šç€ºãããŸããæ°åŒèªäœãã»ã«ã«è¡šç€ºããããå Žåã¯ã<code>setFormula</code> ã§ã¯ãªã <code>setValue</code> ã䜿çšããæ°åŒãæååãšããŠã»ã«ã«æžã蟌ãããšãã§ããŸãã
: <syntaxhighlight lang=js>
function writeFormulaStringToSheet() {
// ã¢ã¯ãã£ããªã¹ãã¬ããã·ãŒããååŸ
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
// B1ã»ã«ã«SUMé¢æ°ãå«ãæ°åŒã®æååãæžã蟌ã
sheet.getRange("B1").setValue("=SUM(A1:A5)");
}
</syntaxhighlight>
ããã«ãããB1ã»ã«ã«ã¯ <code>=SUM(A1:A5)</code> ãšããæ°åŒæååãçŽæ¥è¡šç€ºãããŸããã©ã¡ãã®æ¹æ³ããç¹å®ã®ã»ã«ã«åŒãæžã蟌ãããã®æ段ãšããŠæŽ»çšã§ããŸãã
;Google Apps Scriptã§æ±ããåèšãšSUMé¢æ°ã®çµæãéãçç±
Google Sheetsã®SUMé¢æ°ã¯ãå
éšã§é«åºŠãªæ°å€åŠçãè¡ããããäžè¬çãªJavaScriptãGoogle Apps Scriptã§ã®åèšèšç®ãšã¯ç°ãªã粟床ãä¿èšŒããŠããŸããSUMé¢æ°ã¯ãæµ®åå°æ°ç¹æ°ã«ãããäžžã誀差ãæå°éã«æããããã«ãç¹å¥ãªã¢ã«ãŽãªãºã ïŒäŸãã°ãã«ãã³ã®å ç®ã¢ã«ãŽãªãºã ïŒãé©çšãããŠããŸãã
Google Sheetsã®SUMé¢æ°ããã©ãŠã¶äžã§åäœãããšããããŒã¿ã®ç²ŸåºŠãé«ããã®ãå¿
èŠã§ããããã®ããã«ã«ãã³ã®ã¢ã«ãŽãªãºã ãªã©ãå©çšãããŠããŸããäžæ¹ã§ãGoogle Apps ScriptãJavaScriptã¯ãéåžžã®æµ®åå°æ°ç¹æ°ã®èšç®ãè¡ããŸãããããã¯å³å¯ãªç²ŸåºŠãä¿èšŒãããã®ã§ã¯ãããŸããã
ãã®ãããGoogle Apps Scriptã§ã®åèšèšç®ãšGoogle Sheetsã®SUMé¢æ°ã®çµæãç°ãªãå Žåãããããšã¯ãæµ®åå°æ°ç¹æ°æŒç®ã«ãããäžžã誀差ãèšç®ã®ä»çµã¿ã®éãã«ãããã®ã§ããå¿
èŠã«å¿ããŠãGASåŽã§ãã«ãã³ã®ã¢ã«ãŽãªãºã ãªã©ãå©çšããŠãããæ£ç¢ºãªèšç®ãè¡ãããšãèããããŸãã
: <syntaxhighlight lang=js>
function writeFormulaToSheet() {
// ã¢ã¯ãã£ããªã¹ãã¬ããã·ãŒããååŸ
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
// B1ã»ã«ã«SUMé¢æ°ãå«ãæ°åŒãæžã蟌ã
sheet.getRange("B1").setFormula("=SUM(A1:A5)");
// æ°å€ãå«ãç¯å²ã®å€ãååŸ
const values = sheet.getRange("A1:A5").getValues();
// äºæ¬¡å
é
åããäžæ¬¡å
é
åã«å€æ
const ary = values.flat();
// åèšãæ±ãã
const sum = ary.reduce((a, b) => a + b, 0);
// C1ã»ã«ã«åèšãæžã蟌ã
sheet.getRange("C1").setValue(sum);
// ã«ãã³ã®å ç®ã¢ã«ãŽãªãºã ã§åèšãæ±ãã
let ksum = 0.0;
let compensation = 0.0;
for (const n of ary) {
const y = n - compensation;
const t = sum + y;
compensation = (t - ksum) - y;
ksum = t;
}
// D1ã»ã«ã«çµæãæžã蟌ã
sheet.getRange("D1").setValue(ksum);
</syntaxhighlight>
==== ã»ã«ã®åãšGoogle Apps Scriptã®å ====
Google Apps ScriptïŒGASïŒã§ã¯ãGoogle Sheetså
ã®ã»ã«ã®å€ã®åãšãGASã§æ±ãããããŒã¿åã¯ããã€ããããŸãã以äžã«ããããã®å¯Ÿå¿ã瀺ããŸãã
; Google Sheetså
ã®ã»ã«ã®å:
# æåååïŒStringïŒ:
#* éåžžã®ããã¹ããæ°åã®åã«åäžåŒçšç¬ŠïŒ'ïŒããªãå Žåã«ã¯æååãšããŠæ±ãããŸããäŸ: <code>Hello, World!</code>
# æ°å€åïŒNumberïŒ:
#* æ°åã ããå
¥åãããŠããå ŽåããŸãã¯æ°åŒã®çµæãæ°å€ã®å Žåã«ã¯æ°å€åãšããŠæ±ãããŸããäŸ: <code>123</code>, <code>3.14</code>
# æ¥ä»åïŒDateïŒ:
#* æ¥ä»ãæå»ã®åœ¢åŒãå
¥åãããå Žåã«ã¯æ¥ä»åãšããŠæ±ãããŸããäŸ: <code>2022/01/23</code>, <code>12:30 PM</code>
# è«çåïŒBooleanïŒ:
#* <code>TRUE</code>ãŸãã¯<code>FALSE</code>ãšå
¥åãããå Žåã«ã¯è«çåãšããŠæ±ãããŸãã
# ãšã©ãŒåïŒErrorïŒ:
#* ã»ã«å
ã§ãšã©ãŒãçºçããå Žåã«ã¯ãšã©ãŒåãšããŠæ±ãããŸãã
; Google Apps Scriptã§ã®ããŒã¿å:
# æåååïŒStringïŒ:
#* JavaScriptã®æåååãšåæ§ã«ãããã¹ããè¡šçŸããŸãã
# æ°å€åïŒNumberïŒ:
#* JavaScriptã®æ°å€åãšåæ§ã«ãæŽæ°ãæµ®åå°æ°ç¹æ°ãè¡šçŸããŸãã
# æ¥ä»åïŒDateïŒ:
#* JavaScriptã®<code>Date</code>ãªããžã§ã¯ãã䜿çšããŠæ¥ä»ãæå»ãè¡šçŸããŸãã
# è«çåïŒBooleanïŒ:
#* JavaScriptã®è«çåãšåæ§ã«ã<code>true</code>ãŸãã¯<code>false</code>ãè¡šçŸããŸãã
# é
ååïŒArrayïŒ:
#* JavaScriptã®é
ååãšåæ§ã«ãè€æ°ã®å€ãæ ŒçŽã§ããããŒã¿åã§ãã
GASã§ã¯ãGoogle SheetsããååŸããã»ã«ã®å€ã¯åºæ¬çã«ã¯æååãšããŠæ±ãããããšããããŸãããã®ãããæ°å€ãæ¥ä»ãªã©ã®åãå¿
èŠãªå Žåã¯ãé©åãªå€æãè¡ãå¿
èŠããããŸããããšãã°ã<code>getValues()</code>ã䜿çšããŠã»ã«ã®å€ãååŸãããšãäºæ¬¡å
é
åã§ååŸãããå¿
èŠã«å¿ããŠé©åãªåãžã®å€æãå¿
èŠã§ãã
以äžã¯ãGoogle Sheetsããã»ã«ã®å€ãååŸããé©åãªåã«å€æããäŸã§ãããã®äŸã§ã¯ãæ°å€ãæ¥ä»ãè«çå€ãå«ãŸããŠããã·ãŒããæ³å®ããŠããŸãã
: <syntaxhighlight lang=js>
function processSheetData() {
// çŸåšã¢ã¯ãã£ããªã·ãŒããååŸ
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
// ã»ã«ç¯å²ã®å€ãååŸïŒäºæ¬¡å
é
åïŒ
const cellValues = sheet.getDataRange().getValues();
// ããŒã¿ã®åŠç
for (const row of cellValues) { // è¡ãååŸ
for (const cellValue of row) { // ã»ã«ã®å€ãååŸ
// ã»ã«ã®åã«å¿ããŠåŠçãè¡ã
if (typeof cellValue === 'number') {
// æ°å€åã®å Žå
Logger.log('æ°å€å: ' + cellValue);
} else if (typeof cellValue === 'object' && cellValue instanceof Date) {
// æ¥ä»åã®å Žå
Logger.log('æ¥ä»å: ' + cellValue.toISOString());
} else if (typeof cellValue === 'boolean') {
// è«çåã®å Žå
Logger.log('è«çå: ' + cellValue);
} else {
// æåååããã®ä»ã®åã®å Žå
Logger.log('æåååãŸãã¯ãã®ä»ã®å: ' + cellValue);
}
}
}
}
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>getValues()</code>ã¡ãœããã§ã»ã«ã®å€ãååŸãããã®åŸãäºéã®ã«ãŒãã䜿çšããŠåã»ã«ã®å€ã®åãå€å®ããŠããŸããæ°å€åãæ¥ä»åãè«çåãæåååãªã©ã«å¿ããŠé©åãªåŠçãè¡ãããŸãããã°ã«çµæã衚瀺ãããŸãããå®éã®ã·ããªãªã«å¿ããŠãããä»ã®åŠçã«çœ®ãæããããšãã§ããŸãã
==== ãŠãŒã¹ã±ãŒã¹ ====
Tã¹ãã¬ããã·ãŒããšGoogle Apps Scriptã®é£æºã¯ãå€å²ã«ãããæ§ã
ãªãŠãŒã¹ã±ãŒã¹ã«é©çšãããŸãã以äžã«ããã€ãã®ä»£è¡šçãªãŠãŒã¹ã±ãŒã¹ãæããŠã¿ãŸãããã
;ããŒã¿ã®èªåæŽæ°ãšèšç®:
:ã¹ãã¬ããã·ãŒãå
ã®ããŒã¿ãå®æçã«ååŸããèªåçã«èšç®ãåŠçãè¡ããããšãã°ãæ ªäŸ¡ã倩æ°æ
å ±ã®èªåæŽæ°ãçºæ¿ã¬ãŒãã®èšç®ãªã©ã
;ã¬ããŒãã®èªåçæ:
:ã¹ãã¬ããã·ãŒãã«æ ŒçŽãããããŒã¿ãããšã«ãå®æçã«ã¬ããŒããçæãããäŸãã°ãå¶æ¥æ瞟ã®éèšããããžã§ã¯ãé²æã®å¯èŠåãªã©ã
;ãã©ãŒã ã®é£æº:
:Google Apps Scriptã䜿çšããŠGoogleãã©ãŒã ãšé£æºãããã©ãŒã ããã®åçãã¹ãã¬ããã·ãŒãã«èªåçã«èšé²ãããéããããŒã¿ãç°¡åã«åæããããšãã§ããŸãã
;ã«ã¹ã¿ã ãªããŒã¿åŠç:
:ã¹ãã¬ããã·ãŒãã«æ ŒçŽãããããŒã¿ãååŸããç¬èªã®åŠçãè¡ããããšãã°ãç¹å®ã®æ¡ä»¶ã«åºã¥ããŠããŒã¿ããã£ã«ã¿ãªã³ã°ããããå€æãããããå Žåã
;ã«ã¬ã³ããŒã®é£æº:
:Google Apps Scriptã䜿çšããŠGoogle Calendarãšé£æºããäºå®ãã€ãã³ãã®æ
å ±ãã¹ãã¬ããã·ãŒãã«èªåçã«åã蟌ããéã«ãã¹ãã¬ããã·ãŒãã®ããŒã¿ãå
ã«ã«ã¬ã³ããŒã«äºå®ãè¿œå ããããšãå¯èœã
;ã¡ãŒã«ã®éåä¿¡:
:Google Apps Scriptã䜿çšããŠGmailãšé£æºããç¹å®ã®æ¡ä»¶ãæºããããéã«èªåçã«ã¡ãŒã«ãéä¿¡ãããåä¿¡ããã¡ãŒã«ã解æããŠã¹ãã¬ããã·ãŒãã«ããŒã¿ãæ ŒçŽããããšãã§ããŸãã
;ãŠãŒã¶ãŒã€ã³ã¿ãã§ãŒã¹ã®ã«ã¹ã¿ãã€ãº:
:Google Apps Scriptã䜿çšããŠãã¹ãã¬ããã·ãŒãã®ãŠãŒã¶ãŒã€ã³ã¿ãã§ãŒã¹ãã«ã¹ã¿ãã€ãºãããç°¡æãªããã·ã¥ããŒããã¡ãã¥ãŒãäœæãããŠãŒã¶ããªãã£ãåäžãããããšãã§ããŸãã
ãããã®ãŠãŒã¹ã±ãŒã¹ã¯ãããŸã§äŸã§ãããGoogle Apps Scriptãå©çšããããšã§ãæ§ã
ãªæ¥åããã»ã¹ã®èªååãå¹çåãå¯èœã§ãããŠãŒã¶ãŒã®ããŒãºãæ¥åã®ç¹æ§ã«åãããŠæè»ã«é©çšã§ããã®ãGoogle Apps Scriptã®é
åã§ãã
==== ãã¹ããã©ã¯ãã£ã¹ ====
ã¹ãã¬ããã·ãŒããšã®é£æºã«ãããŠãå¹æçãã€å¹ççãªããã°ã©ãã³ã°ãå®çŸããããã®ãã¹ããã©ã¯ãã£ã¹ããããŸãã以äžã¯ããããã®ãã¹ããã©ã¯ãã£ã¹ã®ããã€ãã§ãã
; ããªã¬ãŒã®æŽ»çš:
: Google Apps Scriptã®ããªã¬ãŒãå©çšããŠå®æçãªå®è¡ãç¹å®ã®ã€ãã³ãçºçæã«ã¹ã¯ãªãããå®è¡ããããšãã§ããŸããäŸãã°ã<code>onEdit</code>ããªã¬ãŒã¯ã»ã«ãç·šéãããéã«å®è¡ãããŸãã
; ããŒã¿ã®äžæ¬åŠç:
: ã¹ãã¬ããã·ãŒãããã®ããŒã¿ã®ååŸãæžã蟌ã¿ã¯ãäžåºŠã«ãŸãšããŠåŠçããæ¹ãå¹ççã§ãã<code>getValues</code>ã<code>setValues</code>ã¡ãœããã䜿çšããŠè€æ°ã®ã»ã«ãäžæ¬ã§åŠçããŸãããã
; ãšã©ãŒãã³ããªã³ã°:
: ãŠãŒã¶ãŒãæåŸ
ããããŒã¿ãååšããªãå ŽåãAPIåŒã³åºãã§ãšã©ãŒãçºçããå Žåã«åãããšã©ãŒãã³ããªã³ã°ãå®è£
ããŸãããããã°åºåããšã©ãŒã¡ãŒã«ã®éä¿¡ãªã©ãèæ
®ããŸãã
; èªèšŒã®æå°éå:
: ã¹ã¯ãªãããå¿
èŠãªæš©é以å€ã®æ
å ±ã«ã¢ã¯ã»ã¹ã§ããªããããååãšããŠæå°æš©éã®ååãéµå®ããŸããå¿
èŠãªç¯å²ã®ããŒã¿ã ããååŸããäœåãªã¢ã¯ã»ã¹ãé¿ããŸãããã
; ã¹ã¯ãªããã®æ§é å:
: ã¹ã¯ãªãããè€éã«ãªãå Žåãé¢æ°ãã¢ãžã¥ãŒã«ã«åå²ããŠã³ãŒããæ§é åããããããŸããå¯èªæ§ãåäžããã¡ã³ããã³ã¹ã容æã«ãªããŸãã
; ãªãœãŒã¹ã®æé©å:
: 倧éã®ããŒã¿ãåŠçããéã«ã¯ãåŠç察象ãå¶éããããéåæåŠçãæ€èšããããšã§ã¹ã¯ãªããã®ããã©ãŒãã³ã¹ãåäžãããŸãã
; ãã£ãã·ã¥ã®æŽ»çš:
: ç¹°ãè¿ãåãããŒã¿ãååŸããå Žåã<code>CacheService</code>ã䜿çšããŠçµæããã£ãã·ã¥ããããšã§ãAPIåŒã³åºãåæ°ãåæžãããã©ãŒãã³ã¹ãåäžãããŸãã
; ãŠãŒã¶ãŒã€ã³ã¿ãã§ãŒã¹ã®æé©å:
: ã¹ã¯ãªãããå®è¡ããããã®ãŠãŒã¶ãŒã€ã³ã¿ãã§ãŒã¹ãè¿œå ããå ŽåãçŽæçã§äœ¿ããããUIãæäŸãããŠãŒã¶ããªãã£ãåäžãããŸãã
; ãã¹ããšãããã°:
: ã³ãŒããå€æŽããåã«ã¹ã¯ãªããããã¹ããããããã°ãè¡ããŸãã<code>Logger</code>ããããã°ã¡ãã»ãŒãžã掻çšããŠã¹ã¯ãªããã®åäœã確èªããŸãããã
ãããã®ãã¹ããã©ã¯ãã£ã¹ãéµå®ããããšã§ãã¹ãã¬ããã·ãŒããšã®é£æºã«ãããŠããå¹æçã§ä¿¡é Œæ§ã®é«ãã¹ã¯ãªãããéçºããããšãã§ããŸãã
==== çšèªé ====
; <code>SpreadsheetApp</code>: Google Apps Scriptã§ã¹ãã¬ããã·ãŒããæäœããããã®äž»èŠãªãªããžã§ã¯ããã·ãŒãã®ååŸãã»ã«ã®æäœãå€ã®èšå®ãªã©ã®ã¡ãœãããããããã£ãæäŸããã
; <code>getActiveSheet()</code>: <code>SpreadsheetApp</code> ãªããžã§ã¯ãã®ã¡ãœãããçŸåšã¢ã¯ãã£ããªã·ãŒããååŸããããã«äœ¿çšãããã
; <code>getSheetByName(name)</code>: <code>SpreadsheetApp</code> ãªããžã§ã¯ãã®ã¡ãœãããæå®ããååã®ã·ãŒããååŸããããã«äœ¿çšããããäŸ: <code>SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Sheet1')</code>ã
; <code>getRange(range)</code>: <code>SpreadsheetApp</code> ãªããžã§ã¯ããã·ãŒããªããžã§ã¯ãã®ã¡ãœãããæå®ããç¯å²ã®ã»ã«ãååŸããããã«äœ¿çšããããäŸ: <code>getActiveSheet().getRange("A1")</code>ã
; <code>getValue()</code>: ã»ã«ããå€ãååŸããã¡ãœããã<code>getRange()</code> ã§ååŸããã»ã«ãªããžã§ã¯ãã«å¯ŸããŠäœ¿çšããããäŸ: <code>getRange("A1").getValue()</code>ã
; <code>setValue(value)</code>: ã»ã«ã«å€ãèšå®ããã¡ãœããã<code>getRange()</code> ã§ååŸããã»ã«ãªããžã§ã¯ãã«å¯ŸããŠäœ¿çšããããäŸ: <code>getRange("A1").setValue('Hello, World!')</code>ã
; <code>Logger</code>: Google Apps Scriptã®çµã¿èŸŒã¿ãªããžã§ã¯ãããããã°ããã°åºåã«äœ¿çšãããã¹ã¯ãªãããšãã£ã¿å
ã§ãã°ã確èªã§ããã
; <code>onEdit(e)</code>: Google Apps Scriptã®ããªã¬ãŒé¢æ°ãã¹ãã¬ããã·ãŒãäžã§ã»ã«ãç·šéããããšåŒã³åºããããäŸãã°ãç¹å®ã®ã»ã«ã®å€æŽã«å¿ããŠã¹ã¯ãªãããå®è¡ãããã
; <code>onChange(e)</code>: Google Apps Scriptã®ããªã¬ãŒé¢æ°ãã¹ãã¬ããã·ãŒãäžã§å€æŽããããšåŒã³åºããããã»ã«ã®è¿œå ãåé€ãªã©ãå«ãŸããã
; <code>getActiveSpreadsheet()</code>: <code>SpreadsheetApp</code> ãªããžã§ã¯ãã®ã¡ãœãããçŸåšã¢ã¯ãã£ããªã¹ãã¬ããã·ãŒããååŸããããã«äœ¿çšãããã
; <code>UrlFetchApp</code>: Google Apps Scriptã§å€éšã®URLãAPIãšé£æºããããã®ãªããžã§ã¯ããå€éšãµãŒããŒãšã®ããŒã¿ã®ååŸãéä¿¡ã«äœ¿çšãããã
=== ã¹ã©ã€ããšã®é£æº ===
=== ãã©ãŒã ãšã®é£æº ===
== å®è·µçãªããã°ã©ã äœæ ==
=== ã¹ãã¬ããã·ãŒãã®èªåæäœ ===
=== ãã©ãŒã ã®èªååç ===
=== Gmailã®èªåéä¿¡ ===
=== Googleã«ã¬ã³ããŒã®èªåäºå®è¿œå ===
== å¿çšç·š ==
=== APIã®å©çš ===
=== Webã¢ããªã±ãŒã·ã§ã³ã®äœæ ===
=== GASã®ã©ã€ãã©ãªã®å©çš ===
== ãã©ãã«ã·ã¥ãŒãã£ã³ã° ==
=== ãšã©ãŒã¡ãã»ãŒãžã®æå³ ===
=== ãããã°æ¹æ³ ===
== ãŸãšããšä»åŸã®å±æ ==
=== GASã®ç¹é·ã®åç¢ºèª ===
Google Apps ScriptïŒGASïŒã¯ãGoogleãæäŸããã¹ã¯ãªããèšèªã§ãGoogle Workspace補åãšã®ã·ãŒã ã¬ã¹ãªçµ±åãç¹é·ã§ããäž»ãªç¹åŸŽã«ã¯ä»¥äžãæããããŸãã
;GoogleãµãŒãã¹ãšã®çµ±åæ§: GASã¯ãGoogle SheetsãGmailãGoogle Driveãªã©ã®GoogleãµãŒãã¹ãšã®å¯æ¥ãªçµ±åãå¯èœã§ããããã«ãããæ¥åããã»ã¹ãå¹çåããèªååããããã®ãã¯ãã«ãªããŒã«ãšãªããŸãã
;JavaScriptããŒã¹: GASã¯JavaScriptèšèªãåºç€ãšããŠãããéçºè
ãç°¡åã«åŠç¿ãå§ããããã®ãç¹é·ã§ããJavaScriptã«æ
£ããŠããéçºè
ã¯ãGASã䜿çšããŠGoogle Workspaceã®æ©èœãæ¡åŒµã§ããŸãã
;ç°¡æãªéçºç°å¢: GASã®ã¹ã¯ãªãããšãã£ã¿ã¯ãã©ãŠã¶ããŒã¹ã§å©çšå¯èœã§ãããè¿
éãªãããã¿ã€ãã³ã°ãã¹ã¯ãªããã®äœæã容æã§ããç¹å¥ãªéçºç°å¢ã®ã»ããã¢ããã¯å¿
èŠãããŸããã
=== GASã䜿ã£ãæ¥åå¹çåã®å¯èœæ§ ===
GASã掻çšããããšã§ãæ¥åããã»ã¹ã®èªååãå¹çåãå¯èœã§ãã
;ã¹ãã¬ããã·ãŒãã®èªåæŽæ°: GASã䜿çšããŠãã¹ãã¬ããã·ãŒãå
ã®ããŒã¿ãå®æçã«æŽæ°ããããå€éšããŒã¿ãšåæããããããããšãã§ããŸãã
;ã¡ãŒã«ã®èªåéä¿¡ãšåä¿¡åŠç: GmailAppã䜿çšããŠãç¹å®ã®æ¡ä»¶ã«åºã¥ããŠã¡ãŒã«ãèªåçã«éä¿¡ããããåä¿¡ããã¡ãŒã«ãåŠçãããããã¹ã¯ãªãããäœæã§ããŸãã
;Google Driveã®ãã¡ã€ã«ç®¡ç: DriveAppãªããžã§ã¯ãã䜿çšããŠãGoogle Driveäžã®ãã¡ã€ã«ãæäœããã¹ã¯ãªãããäœæã§ããŸããäŸãã°ããã¡ã€ã«ã®ã³ããŒã移åãåé€ãªã©ãå¯èœã§ãã
=== ä»åŸã®GASã®é²åãšå±æ ===
GASã¯é »ç¹ã«ã¢ããããŒããããæ°ããæ©èœãè¿œå ãããŠããŸããä»åŸã®å±æãšããŠã¯ä»¥äžãèããããŸãã
;APIã®æ¡å
: Google Workspaceã®æ°ããAPIããµãŒãã¹ãžã®ã¢ã¯ã»ã¹ãåäžããããå€ãã®æ©èœãGASã§å©çšå¯èœã«ãªãã§ãããã
;éçºè
ããŒã«ã®åäž: ã¹ã¯ãªãããšãã£ã¿ããããã°ããŒã«ã®æ©èœãåäžããéçºè
ãããå¹æçã«ã¹ã¯ãªãããäœæã»ç®¡çã§ããããã«ãªãã§ãããã
;ã»ãã¥ãªãã£æ©èœã®åäž: ã»ãã¥ãªãã£äžã®æžå¿µã«å¯Ÿå¿ããããå®å
šã«GASãå©çšã§ããããã«ãªãããšãæåŸ
ãããŸãã
GASã¯ããžãã¹ããã»ã¹ãã¹ã ãŒãºã«ããå¹çãåäžãããããã®è²ŽéãªããŒã«ã§ãããä»åŸã®é²åããŸããŸãæåŸ
ãããŠããŸãã
== ãªãœãŒã¹ ==
Google Apps ScriptïŒGASïŒã«é¢é£ããåŠç¿ãéçºã®ããã®ãªãœãŒã¹ã¯å€å²ã«ããããŸãã以äžã¯ãGASã«é¢ããæçãªãªãœãŒã¹ã®äžéšã§ãã
; [https://developers.google.com/apps-script?hl=ja Google Apps Script å
¬åŒããã¥ã¡ã³ã]
: Google Apps Scriptã®å
¬åŒããã¥ã¡ã³ãã¯ãåºæ¬çãªæŠå¿µããé«åºŠãªãããã¯ãŸã§å
æ¬çãªæ
å ±ãæäŸããŠããŸããã¹ã¯ãªããã®åºæ¬çãªäœææ¹æ³ãããªã¬ãŒã®èšå®ãAPIã®äœ¿çšæ¹æ³ãªã©ã詳ãã説æãããŠããŸãã
; [https://github.com/topics/google-apps-script Google Apps Script GitHub ãªããžããª]
: Google Apps Scriptã®ãµã³ãã«ã³ãŒãããããžã§ã¯ãã®é²è¡ç¶æ³ã«é¢ããæ
å ±ã¯ãGitHubãªããžããªã§å
¥æã§ããŸããããã§ã¯ãã³ãã¥ããã£ã«ãã£ãŠæäŸããã䟿å©ãªã¹ã¯ãªããããããžã§ã¯ãã®å®è£
äŸãèŠã€ããããšãã§ããŸãã
; [https://workspace.google.com/blog/ja/developers-practitioners Google Workspace Developers Blog]
: Google Workspace Developers Blogã§ã¯ãææ°ã®Google Apps Scriptã®ã¢ããããŒããæ°æ©èœã«é¢ããå
¬åŒãªã¢ããŠã³ã¹ããããŸããéçºè
ã¯ããã§ææ°æ
å ±ã远跡ããæ°ããæ©èœãç解ã§ããŸãã
; [https://issuetracker.google.com/issues?q=componentid:191640%2B%20status:open%20type:bug%20&hl=ja Google Apps Script Issue Tracker]
: Google Apps Scriptã®ãã°ãææ¡ãªã©ã®åé¡ãå ±åããããã®Issue Trackerã§ãããŸããä»ã®éçºè
ãå ±åããåé¡ã調æ»ããããšãã§ããŸãã
ãããã®ãªãœãŒã¹ãå©çšããããšã§ãGoogle Apps Scriptã䜿ã£ãéçºã«ãããŠæçãªæ
å ±ããµããŒããèŠã€ããããšãã§ããŸãã
[[ã«ããŽãª:ããã°ã©ãã³ã°èšèª]]
[[ã«ããŽãª:Google|Apps Script]] | 2023-03-16T07:40:39Z | 2024-01-23T03:46:03Z | [
"ãã³ãã¬ãŒã:-",
"ãã³ãã¬ãŒã:ã³ã©ã "
] | https://ja.wikibooks.org/wiki/Google_Apps_Script |
37,254 | èªåè»æå®³è³ åä¿éæ³ç¬¬3æ¡ | (èªåè»æå®³è³ å責任) | [
{
"paragraph_id": 0,
"tag": "p",
"text": "(èªåè»æå®³è³ å責任)",
"title": "æ¡æ"
}
] | null | :[[æ³åŠ]]ïŒ[[æ°äºæ³]]ïŒ[[æ°æ³]]ïŒ[[èªåè»æå®³è³ åä¿éæ³]]
:[[æ³åŠ]]ïŒ[[瀟äŒæ³]]ïŒèªåè»æå®³è³ åä¿éæ³
==æ¡æ==
ïŒèªåè»æå®³è³ å責任ïŒ
;第3æ¡
:èªå·±ã®ããã«èªåè»ãéè¡ã®çšã«äŸããè
ã¯ããã®éè¡ã«ãã€ãŠä»äººã®çåœåã¯èº«äœã害ãããšãã¯ãããã«ãã€ãŠçããæ害ãè³ åãã責ã«ä»»ããããã ããèªå·±åã³é転è
ãèªåè»ã®éè¡ã«é¢ã泚æãæ ããªãã€ãããšã被害è
åã¯é転è
以å€ã®ç¬¬äžè
ã«æ
æåã¯é倱ããã€ãããšäžŠã³ã«èªåè»ã«æ§é äžã®æ¬ é¥åã¯æ©èœã®é害ããªãã€ãããšã蚌æãããšãã¯ããã®éãã§ãªãã
==解説==
:æ¬æ¡ã¯ã[[æ°æ³ç¬¬709æ¡]]以äžäžæ³è¡çºæ³ã®ç¹å¥æ³ã®é¢ä¿ã«ããã
:èªåè»ã®éè¡ã«ãã£ãŠä»äººã®çåœãŸãã¯èº«äœã害ãããšãã¯ïŒãããã人身äºæ
ãç©æã¯å«ãŸããªãïŒãæå®³è³ åã®è²¬ä»»ãè² ããšèšãããã®ã¿ã§ãæ°æ³ç¬¬709æ¡ã®ãæ
æåã¯é倱ã«ãã£ãŠãã®æèšããªããããªãã¡ãååãšããŠç¡é倱責任ã§ãããäœæžã§æ³šæ矩åçãæãããããšãªã©ã蚌æããããšã«ããå
責ãããæšå®ããããŠãããããã®ç«èšŒè²¬ä»»ã¯ãèªåè»ãéè¡ãäºæ
ãèµ·ãããæ¹ã«ããã
:å
責ã®ããã«ã¯ä»¥äžã®äºé
ã声æããªããã°ãªããªãã
:#èªåè»ã®éè¡ã«é¢ã泚æãæ ããªãã£ãããšã泚æ矩åã®ææ ã®ãªãããšã¯ããèªå·±ã®ããã«èªåè»ãéè¡ã®çšã«äŸããè
ïŒéè¡äŸçšè
ïŒããšãé転è
ããšãã«å¿
èŠã§ããããããããæ¬ ãããšå
責ã¯èªããããªãã
:#被害è
åã¯é転è
以å€ã®ç¬¬äžè
ã«æ
æåã¯é倱ããã€ãããšã
:#åè»ã«æ§é äžã®æ¬ é¥åã¯æ©èœã®é害ããªãã€ãããšã
==åç
§æ¡æ==
==å€äŸ==
*[https://www.courts.go.jp/app/hanrei_jp/detail2?id=64165 æå®³è³ å]ïŒæé«è£å€æ±º æå52幎12æ22æ¥ïŒ
*;äŒç€Ÿã®åŸæ¥å¡ããã®ææèªåè»ãé転ãäŒç€Ÿã®å·¥äºçŸå Žããèªå®
ã«åž°ãéäžã§èµ·ãããäºæ
ã«ã€ãäŒç€Ÿã«èªåè»æå®³è³ åä¿éæ³3æ¡ã«ããéè¡äŸçšè
責任ãèªããããäºäŸ
*:äŒç€Ÿã®åŸæ¥å¡ãéå€ã®ããå©çšããŠãããã®ææèªåè»ãé転ããäŒç€Ÿã®å·¥äºçŸå Žããèªå®
ã«åž°ãéäžã§äºæ
ãèµ·ãããå Žåã«ãããŠãåŸæ¥å¡ããã®ææèªåè»ãäŒç€Ÿã®æ¿èªåã¯æ瀺ã®ããšã«äŒç€Ÿåã¯èªå®
ãšå·¥äºçŸå Žãšã®éã®åŸåŸ©çäŒç€Ÿæ¥åã®ããã«ããã°ãã°å©çšãããã®å©çšã«å¯ŸããŠäŒç€Ÿããæåœãæ¯çµŠãããŠãããäºæ
åœæ¥å³åŸæ¥å¡ãå³èªåè»ã§å·¥äºçŸå Žã«åºãããã®ãäŒç€Ÿã®æ瀺ã«åºã¥ããã®ã§ãããªã©ãå€ç€ºã®äºæ
ããããšãã¯ãäŒç€Ÿã¯ãå³äºæ
ã«ã€ããèªåè»æå®³è³ åä¿éæ³3æ¡ã«ããéè¡äŸçšè
責任ãè² ãã
==åè==
----
{{ååŸ
|[[èªåè»æå®³è³ åä¿éæ³]]
|[[èªåè»æå®³è³ åä¿éæ³#2|第2ç« èªåè»æå®³è³ å責任]]
|[[èªåè»æå®³è³ åä¿éæ³ç¬¬2æ¡]]<br>ïŒå®çŸ©ïŒ
|[[èªåè»æå®³è³ åä¿éæ³ç¬¬4æ¡]]<br>ïŒæ°æ³ã®é©çšïŒ
}}
{{stub|law}}
[[category:èªåè»æå®³è³ åä¿éæ³|03]] | 2023-03-17T00:59:50Z | 2023-03-17T00:59:50Z | [
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E8%87%AA%E5%8B%95%E8%BB%8A%E6%90%8D%E5%AE%B3%E8%B3%A0%E5%84%9F%E4%BF%9D%E9%9A%9C%E6%B3%95%E7%AC%AC3%E6%9D%A1 |
37,306 | èªåè»æå®³è³ åä¿éæ³ | èªåè»æå®³è³ åä¿éæ³(æå30幎æ³åŸç¬¬97å· æçµæ¹æ£:什å4幎æ³åŸç¬¬65å·)ã®éæ¡è§£èª¬æžã
| [
{
"paragraph_id": 0,
"tag": "p",
"text": "èªåè»æå®³è³ åä¿éæ³(æå30幎æ³åŸç¬¬97å· æçµæ¹æ£:什å4幎æ³åŸç¬¬65å·)ã®éæ¡è§£èª¬æžã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "",
"title": "第1ç« ç·å (第1æ¡ïœç¬¬2æ¡)"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "",
"title": "第2ç« èªåè»æå®³è³ å責任(第3æ¡ïœç¬¬4æ¡)"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "",
"title": "第3ç« èªåè»æå®³è³ å責任ä¿éºåã³èªåè»æå®³è³ å責任å
±æž(第5æ¡ïœç¬¬39æ¡)"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "",
"title": "第3ç« èªåè»æå®³è³ å責任ä¿éºåã³èªåè»æå®³è³ å責任å
±æž(第5æ¡ïœç¬¬39æ¡)"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "",
"title": "第3ç« èªåè»æå®³è³ å責任ä¿éºåã³èªåè»æå®³è³ å責任å
±æž(第5æ¡ïœç¬¬39æ¡)"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "",
"title": "第3ç« èªåè»æå®³è³ å責任ä¿éºåã³èªåè»æå®³è³ å責任å
±æž(第5æ¡ïœç¬¬39æ¡)"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "",
"title": "第3ç« èªåè»æå®³è³ å責任ä¿éºåã³èªåè»æå®³è³ å責任å
±æž(第5æ¡ïœç¬¬39æ¡)"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "",
"title": "第3ç« èªåè»æå®³è³ å責任ä¿éºåã³èªåè»æå®³è³ å責任å
±æž(第5æ¡ïœç¬¬39æ¡)"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "",
"title": "第4ç« æ¿åºã®èªåè»æå®³è³ åä¿éäºæ¥(第71æ¡ïœç¬¬82æ¡ã®2)"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "",
"title": "第5ç« éå(第82æ¡ã®3ïœç¬¬86æ¡)"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "",
"title": "第6ç« éå(第86æ¡ã®2ïœç¬¬92æ¡)"
}
] | èªåè»æå®³è³ åä¿éæ³(æå30幎æ³åŸç¬¬97å· æçµæ¹æ£ïŒä»€å4幎æ³åŸç¬¬65å·)ã®éæ¡è§£èª¬æžã | :[[æ³åŠ]]ïŒ[[æ°äºæ³]]ïŒ[[æ°æ³]]ïŒèªåè»æå®³è³ åä¿éæ³
:[[æ³åŠ]]ïŒ[[瀟äŒæ³]]ïŒèªåè»æå®³è³ åä¿éæ³
èªåè»æå®³è³ åä¿éæ³(æå30幎æ³åŸç¬¬97å· æçµæ¹æ£ïŒä»€å4幎æ³åŸç¬¬65å·)ã®éæ¡è§£èª¬æžã
{{Wikipedia|èªåè»æå®³è³ åä¿éæ³}}
==第1ç« ç·å (第1æ¡ïœç¬¬2æ¡)==
<span id="1"/>
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬1æ¡|第1æ¡]](ãã®æ³åŸã®ç®ç)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬2æ¡|第2æ¡]](å®çŸ©)
==第2ç« èªåè»æå®³è³ å責任(第3æ¡ïœç¬¬4æ¡) ==
<span id="2"/>
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬3æ¡|第3æ¡]](èªåè»æå®³è³ å責任)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬4æ¡|第4æ¡]](æ°æ³ã®é©çš)
==第3ç« èªåè»æå®³è³ å責任ä¿éºåã³èªåè»æå®³è³ å責任å
±æž(第5æ¡ïœç¬¬39æ¡) ==
<span id="3"/>
===第1ç¯ èªåè»æå®³è³ å責任ä¿éºå¥çŽåã¯èªåè»æå®³è³ å責任å
±æžå¥çŽã®ç· çµåŒ·å¶ (第5æ¡ïœç¬¬10æ¡ã®2)===
<span id="3-1"/>
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬5æ¡|第5æ¡]](責任ä¿éºåã¯è²¬ä»»å
±æžã®å¥çŽã®ç· çµåŒ·å¶)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬6æ¡|第6æ¡]](ä¿éºè
åã³å
±æžè²¬ä»»ãè² ãè
)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬7æ¡|第7æ¡]](èªåè»æå®³è³ å責任ä¿éºèšŒææž)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬8æ¡|第8æ¡]](èªåè»æå®³è³ å責任ä¿éºèšŒææžã®åä»)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬9æ¡|第9æ¡]](èªåè»æå®³è³ å責任ä¿éºèšŒææžã®æ瀺)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬9æ¡ã®2|第9æ¡ã®2]](ä¿éºæšç« )
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬9æ¡ã®3|第9æ¡ã®3]]
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬9æ¡ã®4|第9æ¡ã®4]](èªåè»æå®³è³ å責任å
±æžèšŒææžåã³å
±æžæšç« )
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬9æ¡ã®5|第9æ¡ã®5]]
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬10æ¡|第10æ¡]](é©çšé€å€)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬10æ¡ã®2|第10æ¡ã®2]](ä¿éºã»å
±æžé€å€æšç« å€)
===第2ç¯ èªåè»æå®³è³ å責任ä¿éºå¥çŽåã³èªåè»æå®³è³ å責任å
±æžå¥çŽ (第11æ¡ïœç¬¬23æ¡ã®4)===
<span id="3-2"/>
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬11æ¡|第11æ¡]](責任ä¿éºåã³è²¬ä»»å
±æžã®å¥çŽ)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬12æ¡|第12æ¡]]
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬13æ¡|第13æ¡]](ä¿éºéé¡)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬14æ¡|第14æ¡]](å
責)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬15æ¡|第15æ¡]](ä¿éºéã®è«æ±)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬16æ¡|第16æ¡]](ä¿éºäŒç€Ÿã«å¯Ÿããæå®³è³ åé¡ã®è«æ±)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬16æ¡ã®2|第16æ¡ã®2]](äŒæ¥ã«ããæ害çã«ä¿ãä¿éºéçã®é床)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬16æ¡ã®3|第16æ¡ã®3]](æ¯æåºæº)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬16æ¡ã®4|第16æ¡ã®4]](æžé¢ã®äº€ä»)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬16æ¡ã®5|第16æ¡ã®5]](æžé¢ã«ãã説æç)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬16æ¡ã®6|第16æ¡ã®6]](æ¯æçã®å±åº)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬16æ¡ã®7|第16æ¡ã®7]](åœå亀é倧è£ã«å¯Ÿããç³åº)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬16æ¡ã®8|第16æ¡ã®8]](æ瀺ç)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬16æ¡ã®9|第16æ¡ã®9]](第16æ¡ç¬¬1é
ã®èŠå®ã«ããæå®³è³ åé¡ã®æ¯æã«ã€ããŠã®å±¥è¡æä»)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬17æ¡|第17æ¡]](被害è
ã«å¯Ÿãã仮枡é)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬18æ¡|第18æ¡]](å·®æŒã®çŠæ¢)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬19æ¡|第19æ¡]](æå¹)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬20æ¡|第20æ¡]](å±éºã«é¢ããéèŠãªäºé
)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬20æ¡ã®2|第20æ¡ã®2]](責任ä¿éºã®å¥çŽã®è§£é€ç)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬21æ¡|第21æ¡]](åç¥çŸ©åéåã«ããå¥çŽè§£é€ã®å¹å)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬22æ¡|第22æ¡]](å±éºã®å¢å åã¯æžå°ã«ããå¥çŽã®å€æŽ)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬23æ¡|第23æ¡]](ä¿éºæ³ã®é©çš)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬23æ¡ã®2|第23æ¡ã®2]](å ±ååã³ç«å
¥æ€æ»)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬23æ¡ã®3|第23æ¡ã®3]](責任ä¿éºã®å¥çŽã«é¢ããèŠå®çã®æºçš)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬23æ¡ã®4|第23æ¡ã®4]]
===第2ç¯ã®2 æå®çŽäºåŠçæ©é¢ (第23æ¡ã®5ïœç¬¬23æ¡ã®23)===
<span id="3-2-2"/>
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬23æ¡ã®5|第23æ¡ã®5]](æå®çŽäºåŠçæ©é¢ã®æå®ç)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬23æ¡ã®6|第23æ¡ã®6]](æ¥å)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬23æ¡ã®7|第23æ¡ã®7]](çŽäºåŠçå§å¡)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬23æ¡ã®8|第23æ¡ã®8]](圹å¡çã®éžä»»åã³è§£ä»»)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬23æ¡ã®9|第23æ¡ã®9]](ç§å¯ä¿æ矩åç)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬23æ¡ã®10|第23æ¡ã®10]](çŽäºåŠçæ¥åã®çŸ©å)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬23æ¡ã®11|第23æ¡ã®11]](çŽäºåŠçæ¥åèŠçš)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬23æ¡ã®12|第23æ¡ã®12]](説æåã¯è³ææåºã®è«æ±)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬23æ¡ã®13|第23æ¡ã®13]](çŽäºåŠçã®æç¶ã®éå
Ž)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬23æ¡ã®14|第23æ¡ã®14]](æå¹ã®å®æç¶äº)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬23æ¡ã®15|第23æ¡ã®15]](蚎èšæç¶ã®äžæ¢)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬23æ¡ã®16|第23æ¡ã®16]](äºæ¥èšç»ç)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬23æ¡ã®17|第23æ¡ã®17]](æ¥åã®äŒå»æ¢ç)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬23æ¡ã®18|第23æ¡ã®18]](垳簿ã®åä»ãç)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬23æ¡ã®19|第23æ¡ã®19]](å ±ååã³ç«å
¥æ€æ»)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬23æ¡ã®20|第23æ¡ã®20]](ç£ç£åœä»€)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬23æ¡ã®21|第23æ¡ã®21]](æå®ã®åæ¶ãç)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬23æ¡ã®22|第23æ¡ã®22]](æå®çŽäºåŠçæ©é¢ãžã®æ
å ±æäŸç)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬23æ¡ã®23|第23æ¡ã®23]](åœå亀éç什ã»å
é£åºä»€ãžã®å§ä»»)
===第3ç¯ èªåè»æå®³è³ å責任ä¿éºäºæ¥åã³èªåè»æå®³è³ å責任å
±æžäºæ¥ (第24æ¡ïœç¬¬30æ¡)===
<span id="3-3"/>
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬24æ¡|第24æ¡]](責任ä¿éºåã³è²¬ä»»å
±æžã®å¥çŽã®ç· çµçŸ©å)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬25æ¡|第25æ¡]](ä¿éºæçåã³å
±æžæéçã®åºæº)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬26æ¡|第26æ¡]](ä¿éºæçã®å¯©æ»ç)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬26æ¡ã®2|第26æ¡ã®2]]
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬26æ¡ã®3|第26æ¡ã®3]]
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬27æ¡|第27æ¡]](蟲æ¥ååçµåçã®è¡ã責任å
±æžã®äºæ¥ã«ä¿ãå
±æžèŠçšã®å¯©æ»ç)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬27æ¡ã®2|第27æ¡ã®2]](æ¶è²»ç掻ååçµåçåã³äºæ¥ååçµåçã®è¡ã責任å
±æžã®äºæ¥ã«ä¿ãå
±æžäºæ¥èŠçŽã®å¯©æ»ç)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬28æ¡|第28æ¡]](åæ)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬28æ¡ã®2|第28æ¡ã®2]](åæåã³åè°)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬28æ¡ã®3|第28æ¡ã®3]](æºåé)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬28æ¡ã®4|第28æ¡ã®4]](å
±åããŒã«äºå)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬29æ¡|第29æ¡]](å
±åè¡çºã«é¢ããéç¥)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬29æ¡|第29æ¡]](æ害ççã®å ±å矩å)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬30æ¡|第30æ¡]](代çåºå¥çŽ)
===第4ç¯ èªåè»æå®³è³ å責任ä¿éºå¯©è°äŒ (第31æ¡ïœç¬¬39æ¡)===
<span id="3-4"/>
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬31æ¡|第31æ¡]](èšçœ®)
:第32æ¡ åé€
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬33æ¡|第33æ¡]](è«®åç)
:第34æ¡ åé€
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬35æ¡|第35æ¡]](å§å¡)
:第36æ¡ãã第38æ¡ãŸã§ åé€ã
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬39æ¡|第39æ¡]](æ¿ä»€ãžã®å§ä»»)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬40æ¡|第40æ¡]](æºæ æ³äŸ)
:第40æ¡ãã第70æ¡ãŸã§ åé€ã
==第4ç« æ¿åºã®èªåè»æå®³è³ åä¿éäºæ¥(第71æ¡ïœç¬¬82æ¡ã®2) ==
<span id="4"/>
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬71æ¡|第71æ¡]](èªåè»æå®³è³ åä¿éäºæ¥)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬72æ¡|第72æ¡]](æ¥å)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬73æ¡|第73æ¡]](ä»ã®æ³ä»€ã«ãã絊ä»ãšã®èª¿æŽç)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬73æ¡ã®2|第73æ¡ã®2]](第72æ¡ç¬¬1é
ã®èŠå®ã«ããæ害ã®ãŠãè£ã«ã€ããŠã®å±¥è¡æ)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬74æ¡|第74æ¡]](å·®æŒã®çŠæ¢)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬75æ¡|第75æ¡]](æå¹)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬76æ¡|第76æ¡]](代äœç)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬77æ¡|第77æ¡]](æ¥åã®å§èš)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬78æ¡|第78æ¡]](èªåè»æå®³è³ åä¿éäºæ¥è³Šèª²é)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬79æ¡|第79æ¡]](éæ é)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬80æ¡|第80æ¡]](城åéã®æ»çŽåŠå)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬81æ¡|第81æ¡]](å
åç¹æš©ã®é äœ)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬82æ¡|第82æ¡]](èªåè»æå®³è³ åä¿éäºæ¥ã«é¢ããè²»çšã®ç¹°å
¥ã)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬82æ¡ã®2|第82æ¡ã®2]](å ±ååã³ç«å
¥æ€æ»)
==第5ç« éå(第82æ¡ã®3ïœç¬¬86æ¡) ==
<span id="5"/>
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬82æ¡ã®3|第82æ¡ã®3]](éè€å¥çŽã®å Žåã®å
責)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬83æ¡|第83æ¡]](æ¥åã®ç®¡æ)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬84æ¡|第84æ¡]](æš©éã®å§ä»»)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬84æ¡ã®2|第84æ¡ã®2]](çŠæ¢è¡çºç)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬85æ¡|第85æ¡]](蚌ææžã®æ瀺)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬85æ¡ã®2|第85æ¡ã®2]](æ¿ä»€ãžã®å§ä»»)
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬86æ¡|第86æ¡]](åœå亀é倧è£ã®ä»»å)
==第6ç« éå(第86æ¡ã®2ïœç¬¬92æ¡) ==
<span id="6"/>
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬86æ¡ã®2|第86æ¡ã®2]]
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬86æ¡ã®3|第86æ¡ã®3]]
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬87æ¡|第87æ¡]]
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬87æ¡ã®2|第87æ¡ã®2]]
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬88æ¡|第88æ¡]]
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬88æ¡ã®2|第88æ¡ã®2]]
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬89æ¡|第89æ¡]]
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬90æ¡|第90æ¡]]
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬91æ¡|第91æ¡]]
:[[èªåè»æå®³è³ åä¿éæ³ç¬¬92æ¡|第92æ¡]]
{{stub|law}}
[[Category:èªåè»æå®³è³ åä¿éæ³|*ããšãããããããã¯ããããã»ãããã»ã]]
[[Category:ã³ã³ã¡ã³ã¿ãŒã«|ããšãããããããã¯ããããã»ãããã»ã]] | 2023-03-17T02:25:47Z | 2023-03-17T02:25:47Z | [
"ãã³ãã¬ãŒã:Wikipedia",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E8%87%AA%E5%8B%95%E8%BB%8A%E6%90%8D%E5%AE%B3%E8%B3%A0%E5%84%9F%E4%BF%9D%E9%9A%9C%E6%B3%95 |
37,308 | èªåè»æå®³è³ åä¿éæ³ç¬¬2æ¡ | (å®çŸ©) | [
{
"paragraph_id": 0,
"tag": "p",
"text": "(å®çŸ©)",
"title": "æ¡æ"
}
] | null | :[[æ³åŠ]]ïŒ[[æ°äºæ³]]ïŒ[[æ°æ³]]ïŒ[[èªåè»æå®³è³ åä¿éæ³]]
:[[æ³åŠ]]ïŒ[[瀟äŒæ³]]ïŒèªåè»æå®³è³ åä¿éæ³
==æ¡æ==
ïŒå®çŸ©ïŒ
;第2æ¡
#ãã®æ³åŸã§ãèªåè»ããšã¯ã[[éè·¯ééè»äž¡æ³ç¬¬2æ¡|éè·¯ééè»äž¡æ³ïŒæå26幎æ³åŸç¬¬185å·ïŒç¬¬2æ¡]]第2é
ã«èŠå®ããèªåè»ïŒèŸ²èäœæ¥ã®çšã«äŸããããšãç®çãšããŠè£œäœããå°åç¹æ®èªåè»ãé€ããïŒåã³åæ¡ç¬¬3é
ã«èŠå®ããååæ©ä»èªè»¢è»ãããã
#ãã®æ³åŸã§ãéè¡ããšã¯ã人åã¯ç©ãééãããšããªããšã«ããããããèªåè»ãåœè©²è£
眮ã®çšãæ¹ã«åŸãçšããããšãããã
#ãã®æ³åŸã§ãä¿æè
ããšã¯ãèªåè»ã®ææè
ãã®ä»èªåè»ã䜿çšããæš©å©ãæããè
ã§ãèªå·±ã®ããã«èªåè»ãéè¡ã®çšã«äŸãããã®ãããã
#ãã®æ³åŸã§ãé転è
ããšã¯ãä»äººã®ããã«èªåè»ã®é転åã¯é転ã®è£å©ã«åŸäºããè
ãããã
==解説==
#èªåè»
#:
#éè¡
#:
#ä¿æè
#:ãèªå·±ã®ããã«èªåè»ãéè¡ã®çšã«äŸããè
ïŒéè¡äŸçšè
ïŒãã®ãã¡ãèªåè»ãææåã¯äœ¿çšããæš©å©ïŒåäž»ã代è¡é転ã®å§èšãåããè
ïŒãæããè
ãèšãã
#:*éè¡äŸçšè
- èªåè»ã®äœ¿çšã«ã€ããŠã®æ¯é
æš©ïŒéè¡æ¯é
ïŒãæãããã€ããã®äœ¿çšã«ãã享åããå©çïŒéè¡å©çïŒãèªå·±ã«åž°å±ããè
ã
#:*:âãä¿æè
ãã§ã¯ãªãéè¡äŸçšè
ãååšãã
#é転è
#:ãä»äººã®ããã«ãèªåè»ã®é転åã¯é転ã®è£å©ã«åŸäºããè
ãã¿ã¯ã·ãŒäºæ¥è
ãéãé転æããã¹é転æãªã©è·æ¥é転æã®ã»ããé
éçã®æ¥åã§èªåè»ã䜿çšããŠããè
ã
==åç
§æ¡æ==
==å€äŸ==
==åè==
----
{{ååŸ
|[[èªåè»æå®³è³ åä¿éæ³]]
|[[èªåè»æå®³è³ åä¿éæ³#1|第1ç« ç·å]]
|[[èªåè»æå®³è³ åä¿éæ³ç¬¬1æ¡]]<br>ïŒãã®æ³åŸã®ç®çïŒ
|[[èªåè»æå®³è³ åä¿éæ³ç¬¬3æ¡]]<br>ïŒèªåè»æå®³è³ å責任ïŒ
}}
{{stub|law}}
[[category:èªåè»æå®³è³ åä¿éæ³|02]] | 2023-03-17T03:48:03Z | 2023-03-17T03:48:03Z | [
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E8%87%AA%E5%8B%95%E8%BB%8A%E6%90%8D%E5%AE%B3%E8%B3%A0%E5%84%9F%E4%BF%9D%E9%9A%9C%E6%B3%95%E7%AC%AC2%E6%9D%A1 |
37,309 | èªåè»æå®³è³ åä¿éæ³ç¬¬4æ¡ | (å®çŸ©) | [
{
"paragraph_id": 0,
"tag": "p",
"text": "(å®çŸ©)",
"title": "æ¡æ"
}
] | null | :[[æ³åŠ]]ïŒ[[æ°äºæ³]]ïŒ[[æ°æ³]]ïŒ[[èªåè»æå®³è³ åä¿éæ³]]
:[[æ³åŠ]]ïŒ[[瀟äŒæ³]]ïŒèªåè»æå®³è³ åä¿éæ³
==æ¡æ==
ïŒå®çŸ©ïŒ
;第2æ¡
:èªå·±ã®ããã«èªåè»ãéè¡ã®çšã«äŸããè
ã®æå®³è³ åã®è²¬ä»»ã«ã€ããŠã¯ãåæ¡ã®èŠå®ã«ããã»ããæ°æ³ïŒææ²»29幎æ³åŸç¬¬89å·ïŒã®èŠå®ã«ããã
==解説==
==åç
§æ¡æ==
==å€äŸ==
==åè==
----
{{ååŸ
|[[èªåè»æå®³è³ åä¿éæ³]]
|[[èªåè»æå®³è³ åä¿éæ³#2|第2ç« èªåè»æå®³è³ å責任]]
|[[èªåè»æå®³è³ åä¿éæ³ç¬¬3æ¡]]<br>ïŒèªåè»æå®³è³ å責任ïŒ
|[[èªåè»æå®³è³ åä¿éæ³ç¬¬5æ¡]]<br>ïŒè²¬ä»»ä¿éºåã¯è²¬ä»»å
±æžã®å¥çŽã®ç· çµåŒ·å¶ïŒ
}}
{{stub|law}}
[[category:èªåè»æå®³è³ åä¿éæ³|04]] | 2023-03-17T03:51:08Z | 2023-03-17T03:51:08Z | [
"ãã³ãã¬ãŒã:Stub",
"ãã³ãã¬ãŒã:ååŸ"
] | https://ja.wikibooks.org/wiki/%E8%87%AA%E5%8B%95%E8%BB%8A%E6%90%8D%E5%AE%B3%E8%B3%A0%E5%84%9F%E4%BF%9D%E9%9A%9C%E6%B3%95%E7%AC%AC4%E6%9D%A1 |
37,341 | Java/ã¢ã³ããŒã¹ã³ã¢ | Javaã§ã¯ãæ°å€ãªãã©ã«ã®äžã«ã¢ã³ããŒã¹ã³ã¢ãæ¿å
¥ããããšã§ãã³ãŒãã®èªã¿ããããåäžãããäºãã§ããŸãã æ°å€ãªãã©ã«ãžã®ã¢ã³ããŒã¹ã³ã¢ã®æ¿å
¥ã¯ãJava 7 ãããµããŒããããŸããã
ããšãã°ã以äžã®ãããªæ°å€ãªãã©ã«ãããå ŽåãèããŠã¿ãŸãããã
ãã®ã³ãŒãã§ã¯ãaã«1000000ãšããå€ã代å
¥ãããŠããŸããããããã®æ°å€ã¯éåžžã«å€§ãããã©ã®ãããªå€ã§ããããããã«ç解ããã®ã¯é£ãããããããŸããã
ããã§ãã¢ã³ããŒã¹ã³ã¢ã䜿çšããŠæ°å€ãªãã©ã«ã以äžã®ããã«æžãæããããšãã§ããŸãã
ãã®ããã«æžãããšã§ãæ°å€ã100äžã§ããããšãããã«ããããŸãã
ã¢ã³ããŒã¹ã³ã¢ã¯æ°å€ã®éäžã§ã䜿çšããããšãã§ããŸããããšãã°ã以äžã®ããã«æ°å€ãæžãããšãã§ããŸãã
ãã®ããã«ããããšã§ããã€ããªè¡šçŸãããæ°å€ãããèªã¿ããããªããŸãã
ã¢ã³ããŒã¹ã³ã¢ã¯ãæµ®åå°æ°ç¹æ°ã«ã䜿çšããããšãã§ããŸããããšãã°ã以äžã®ããã«æžãããšãã§ããŸãã
ãã®ããã«ããããšã§ãååšçãããèªã¿ãããæžãããšãã§ããŸãã
ãã ããã¢ã³ããŒã¹ã³ã¢ãæ°å€ãªãã©ã«ã®å
é ãæ«å°Ÿãå°æ°ç¹ã®ååŸã«çœ®ãããšã¯ã§ããŸããããŸããåãæ°å€ãªãã©ã«å
ã§è€æ°ã®ã¢ã³ããŒã¹ã³ã¢ã䜿çšããããšã¯ã§ããŸããã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "Javaã§ã¯ãæ°å€ãªãã©ã«ã®äžã«ã¢ã³ããŒã¹ã³ã¢ãæ¿å
¥ããããšã§ãã³ãŒãã®èªã¿ããããåäžãããäºãã§ããŸãã æ°å€ãªãã©ã«ãžã®ã¢ã³ããŒã¹ã³ã¢ã®æ¿å
¥ã¯ãJava 7 ãããµããŒããããŸããã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ããšãã°ã以äžã®ãããªæ°å€ãªãã©ã«ãããå ŽåãèããŠã¿ãŸãããã",
"title": ""
},
{
"paragraph_id": 2,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãaã«1000000ãšããå€ã代å
¥ãããŠããŸããããããã®æ°å€ã¯éåžžã«å€§ãããã©ã®ãããªå€ã§ããããããã«ç解ããã®ã¯é£ãããããããŸããã",
"title": ""
},
{
"paragraph_id": 3,
"tag": "p",
"text": "ããã§ãã¢ã³ããŒã¹ã³ã¢ã䜿çšããŠæ°å€ãªãã©ã«ã以äžã®ããã«æžãæããããšãã§ããŸãã",
"title": ""
},
{
"paragraph_id": 4,
"tag": "p",
"text": "ãã®ããã«æžãããšã§ãæ°å€ã100äžã§ããããšãããã«ããããŸãã",
"title": ""
},
{
"paragraph_id": 5,
"tag": "p",
"text": "ã¢ã³ããŒã¹ã³ã¢ã¯æ°å€ã®éäžã§ã䜿çšããããšãã§ããŸããããšãã°ã以äžã®ããã«æ°å€ãæžãããšãã§ããŸãã",
"title": ""
},
{
"paragraph_id": 6,
"tag": "p",
"text": "ãã®ããã«ããããšã§ããã€ããªè¡šçŸãããæ°å€ãããèªã¿ããããªããŸãã",
"title": ""
},
{
"paragraph_id": 7,
"tag": "p",
"text": "ã¢ã³ããŒã¹ã³ã¢ã¯ãæµ®åå°æ°ç¹æ°ã«ã䜿çšããããšãã§ããŸããããšãã°ã以äžã®ããã«æžãããšãã§ããŸãã",
"title": ""
},
{
"paragraph_id": 8,
"tag": "p",
"text": "ãã®ããã«ããããšã§ãååšçãããèªã¿ãããæžãããšãã§ããŸãã",
"title": ""
},
{
"paragraph_id": 9,
"tag": "p",
"text": "ãã ããã¢ã³ããŒã¹ã³ã¢ãæ°å€ãªãã©ã«ã®å
é ãæ«å°Ÿãå°æ°ç¹ã®ååŸã«çœ®ãããšã¯ã§ããŸããããŸããåãæ°å€ãªãã©ã«å
ã§è€æ°ã®ã¢ã³ããŒã¹ã³ã¢ã䜿çšããããšã¯ã§ããŸããã",
"title": ""
}
] | Javaã§ã¯ãæ°å€ãªãã©ã«ã®äžã«ã¢ã³ããŒã¹ã³ã¢ãæ¿å
¥ããããšã§ãã³ãŒãã®èªã¿ããããåäžãããäºãã§ããŸãã
æ°å€ãªãã©ã«ãžã®ã¢ã³ããŒã¹ã³ã¢ã®æ¿å
¥ã¯ãJava 7 ãããµããŒããããŸããã ããšãã°ã以äžã®ãããªæ°å€ãªãã©ã«ãããå ŽåãèããŠã¿ãŸãããã ãã®ã³ãŒãã§ã¯ãaã«1000000ãšããå€ã代å
¥ãããŠããŸããããããã®æ°å€ã¯éåžžã«å€§ãããã©ã®ãããªå€ã§ããããããã«ç解ããã®ã¯é£ãããããããŸããã ããã§ãã¢ã³ããŒã¹ã³ã¢ã䜿çšããŠæ°å€ãªãã©ã«ã以äžã®ããã«æžãæããããšãã§ããŸãã ãã®ããã«æžãããšã§ãæ°å€ã100äžã§ããããšãããã«ããããŸãã ã¢ã³ããŒã¹ã³ã¢ã¯æ°å€ã®éäžã§ã䜿çšããããšãã§ããŸããããšãã°ã以äžã®ããã«æ°å€ãæžãããšãã§ããŸãã ãã®ããã«ããããšã§ããã€ããªè¡šçŸãããæ°å€ãããèªã¿ããããªããŸãã ã¢ã³ããŒã¹ã³ã¢ã¯ãæµ®åå°æ°ç¹æ°ã«ã䜿çšããããšãã§ããŸããããšãã°ã以äžã®ããã«æžãããšãã§ããŸãã ãã®ããã«ããããšã§ãååšçãããèªã¿ãããæžãããšãã§ããŸãã ãã ããã¢ã³ããŒã¹ã³ã¢ãæ°å€ãªãã©ã«ã®å
é ãæ«å°Ÿãå°æ°ç¹ã®ååŸã«çœ®ãããšã¯ã§ããŸããããŸããåãæ°å€ãªãã©ã«å
ã§è€æ°ã®ã¢ã³ããŒã¹ã³ã¢ã䜿çšããããšã¯ã§ããŸããã | {{Nav}}
== æ°å€ãªãã©ã«ã®äžã®ã¢ã³ããŒã¹ã³ã¢ ==
ããã°ã©ãã³ã°ã«ãããæ°å€ãªãã©ã«ã®äžã®ã¢ã³ããŒã¹ã³ã¢ã¯ãæ°å€ãåºåãããã«äœ¿çšãããç¹æ®ãªèšå·ã§ãããã®æ©èœã¯ãäž»ã«å¯èªæ§ãåäžãããããã«å°å
¥ãããŠããŸãã
倧ããªæ°å€ãè€éãªæ°å€ãè¡šãéã«ãã¢ã³ããŒã¹ã³ã¢ã䜿çšããŠæ°å€ãã°ã«ãŒãåããããšã§ãã³ãŒããããèŠããããªããŸããããã«ãããæ°å€ã®æ¡ãç°¡åã«èå¥ãããããªããŸãã
å
·äœçã«ã¯ã以äžã®ãããªå Žé¢ã§ã¢ã³ããŒã¹ã³ã¢ã䜿çšãããŸãã
# æŽæ°ãªãã©ã«: äŸãã°ã<code>1_000_000</code>ãšããããã«ã倧ããªæŽæ°ãåºåãå Žåã«äœ¿çšãããŸãã
# æµ®åå°æ°ç¹æ°ãªãã©ã«: äŸãã°ã<code>3.14_15</code>ãšããããã«ãæµ®åå°æ°ç¹æ°ãåºåãå Žåã«äœ¿çšãããŸãã
# ãã€ããªãªãã©ã«: äŸãã°ã<code>0b1101_1010_0110</code>ã®ããã«ããã€ããªãªãã©ã«ãåºåãå Žåã«äœ¿çšãããŸãã
ã¢ã³ããŒã¹ã³ã¢ã¯ãæ°å€ãªãã©ã«ã®äžã§é£ç¶ããŠäœ¿çšããããšãã§ããŸãããæ°å€ã®å
é ãæ«å°Ÿãå°æ°ç¹ã®ååŸãããã³ãªãã©ã«ã®æ¥é èŸãŸãã¯æ¥å°ŸèŸã®çŽåã«é
眮ããããšã¯ã§ããŸããããŸããããã°ã©ãã³ã°èšèªã«ãã£ãŠã¯ã¢ã³ããŒã¹ã³ã¢ã®äœ¿çšãå¶éãããå ŽåããããŸãã®ã§ãèšèªã®ä»æ§ã«åŸã£ãŠäœ¿çšããå¿
èŠããããŸãã
== Javaã«ãããæ°å€ãªãã©ã«ã®äžã®ã¢ã³ããŒã¹ã³ã¢ ==
Javaã«ãããæ°å€ãªãã©ã«ã®äžã®ã¢ã³ããŒã¹ã³ã¢ã¯ãæ°å€ãåºåãããã«äœ¿çšãããç¹æ®ãªèšå·ã§ããJavaã§ã¯ãæŽæ°ãæµ®åå°æ°ç¹æ°ã®ãªãã©ã«å
ã§ã¢ã³ããŒã¹ã³ã¢ã䜿çšããŠãæ°å€ãã°ã«ãŒãåããããšãã§ããŸããããã«ãããæ°å€ã®æ¡ãèŠèŠçã«åããããšãã§ããå¯èªæ§ãåäžããŸãã
以äžã«ãJavaã«ãããæ°å€ãªãã©ã«ã®äžã®ã¢ã³ããŒã¹ã³ã¢ã®äœ¿çšäŸã瀺ããŸãã
# æŽæ°ãªãã©ã«:
#:<syntaxhighlight lang=java>
int million = 1_000_000;
long creditCardNumber = 1234_5678_9012_3456L;
int binaryNumber = 0b1101_1010_0110;
</syntaxhighlight>
# æµ®åå°æ°ç¹æ°ãªãã©ã«:
#:<syntaxhighlight lang=java>
float pi = 3.14_15F;
double bigNumber = 1_000_000.123_456;
</syntaxhighlight>
ã¢ã³ããŒã¹ã³ã¢(_)ã¯ãæ°å€ã®å
é ãæ«å°Ÿãå°æ°ç¹ã®ååŸãããã³ãªãã©ã«ã®æ¥é èŸãŸãã¯æ¥å°ŸèŸã®çŽåã«é
眮ããããšãã§ããŸãããã ããé£ç¶ããã¢ã³ããŒã¹ã³ã¢ãæ°å€ã®å
é ãæ«å°Ÿã«ã¢ã³ããŒã¹ã³ã¢ãé
眮ããããšã¯ã§ããŸããããŸããã¢ã³ããŒã¹ã³ã¢ã䜿çšããããšã§æ°å€ã®å€ã¯å€ãããŸããããã³ãŒãã®å¯èªæ§ãåäžããŸãã
== JEP 213 ==
Java Enhancement ProposalïŒJEPïŒã¯ãJavaãã©ãããã©ãŒã ããã³èšèªã®æ¹åææ¡ãããã¥ã¡ã³ãåããããã®ãã©ãŒãããã§ããæ°å€ãªãã©ã«å
ã®ã¢ã³ããŒã¹ã³ã¢ã«é¢é£ããJEPã¯ããJEP 213: Milling Project Coinãã§ãã
JEP 213ã¯ãJava 7ã®ãªãªãŒã¹ã§å°å
¥ãããŸããããã®JEPã®ç®çã¯ãJavaèšèªã®ã·ã³ãã«ãªæ©èœãåäžãããããšã§ãã³ãŒãã®å¯èªæ§ãšçç£æ§ãåäžãããããšã§ããããã®äžç°ãšããŠãæŽæ°ãªãã©ã«ããã³æµ®åå°æ°ç¹æ°ãªãã©ã«å
ã§ã®ã¢ã³ããŒã¹ã³ã¢ã®äœ¿çšãå°å
¥ãããŸããã
ã¢ã³ããŒã¹ã³ã¢ã䜿çšããããšã§ã倧ããªæ°å€ãè€éãªæ°å€ãããèªã¿ãããããããšãã§ããããã«ãªããŸããããã®æ©èœã¯ãããã°ã©ã ã®ã¡ã³ããã³ã¹ããããã°ã®éã«ç¹ã«æçšã§ãã
JEP 213ã®ææ¡ãšããŠãã¢ã³ããŒã¹ã³ã¢ã䜿çšããæ°å€ãªãã©ã«ã®æ¹åãè¡ãããJavaã®ã³ãŒãã®å¯èªæ§ãåäžããŸããã
{{Nav}}
[[Category:Java]] | 2023-03-23T07:27:10Z | 2024-02-04T01:15:56Z | [
"ãã³ãã¬ãŒã:Nav"
] | https://ja.wikibooks.org/wiki/Java/%E3%82%A2%E3%83%B3%E3%83%80%E3%83%BC%E3%82%B9%E3%82%B3%E3%82%A2 |
37,346 | ããã°ã©ãã³ã°/ããŒã¿æ§é | ããŒã¿æ§é ã¯ãããã°ã©ãã³ã°ã«ãããŠæ¥µããŠéèŠãªåœ¹å²ãæãããŸããã³ã³ãã¥ãŒã¿ããã°ã©ã ã¯ãããŒã¿ãæ±ãããã®æ段ãšããŠæ©èœãããã®ããŒã¿ãã©ã®ããã«çµç¹åããã管çããããã¯ãããã°ã©ã ã®ããã©ãŒãã³ã¹ãå¹çã«çŽæ¥åœ±é¿ãäžããŸãããããã£ãŠãé©åãªããŒã¿æ§é ã®éžæãšå®è£
ã¯ãããã°ã©ãã³ã°ã«ãããåºæ¬çãªã¹ãã«ã®äžã€ãšèšããŸãã
ããŒã¿æ§é ã®éèŠæ§ãç解ããããã«ãæã
ã¯ããŒã¿ãåãªãæ
å ±ã®å¡ãšããŠã§ã¯ãªããããã°ã©ã ãå©çšãããã圢ã§çµç¹åããå¹ççã«æäœã§ããããã«ããå¿
èŠããããŸããäŸãã°ãé
åã¯é£ç¶ããã¡ã¢ãªé åã«èŠçŽ ãæ ŒçŽããããšã§ãã©ã³ãã ã¢ã¯ã»ã¹ã«åªããŠããŸããäžæ¹ãé£çµãªã¹ãã¯ãã€ã³ã¿ã䜿çšããŠèŠçŽ ããªã³ã¯ããããšã§ãæ¿å
¥ãåé€ã容æã§ãããããã®éãã¯ãããŒã¿æ§é ã®éžæãããã°ã©ã ã®åäœãããã©ãŒãã³ã¹ã«äžãã圱é¿ã瀺ããŠããŸãã
ãŸããããŒã¿æ§é ã¯ã¢ã«ãŽãªãºã ãšå¯æ¥ã«é¢é£ããŠããŸããå¹ççãªã¢ã«ãŽãªãºã ã®å®è£
ã¯ãé©åãªããŒã¿æ§é ã®éžæãšçµã¿åãããããšã§å®çŸãããŸããäŸãã°ãæ¢çŽ¢ããœãŒããšãã£ãåºæ¬çãªã¢ã«ãŽãªãºã ã¯ãããŒã¿æ§é ã«ãã£ãŠãã®å¹çæ§ã倧ããç°ãªããŸãã
ãããã£ãŠãããã°ã©ãã³ã°ã«ãããŠæåããããã«ã¯ãããŒã¿æ§é ã®ç解ãšãã®é©åãªå©çšãäžå¯æ¬ ã§ããæ¬æžã§ã¯ãããŒã¿æ§é ã®åºæ¬ååããå¿çšãŸã§ã網çŸ
ããèªè
ãããã°ã©ã ã®å¹çæ§ãä¿¡é Œæ§ãåäžãããããã®æ段ãæäŸããŸãã
æ¬ããŒãžã§ã¯äž»ã« Python ãçšããŸããä»ãC++, Javascript, Java , ãªã©ãçšããŸã
ããŒã¿æ§é (Data Structures)ã¯ãã³ã³ãã¥ãŒã¿ãµã€ãšã³ã¹ã«ãããŠããã°ã©ãã³ã°èšèªãã¢ã«ãŽãªãºã ãšäžŠãã§éèŠãªæŠå¿µã§ããããã°ã©ãã³ã°ã«ãããŠãããŒã¿ãå¹ççã«ç®¡çããæäœããããã®åºç€ãšãªãä»çµã¿ãæäŸããŸãããã®ç« ã§ã¯ãããŒã¿æ§é ã®éèŠæ§ãšåœ¹å²ãåºæ¬æŠå¿µãããã³äž»èŠãªããŒã¿æ§é ã®çš®é¡ãšåé¡ã«ã€ããŠæ¢æ±ããŸãã
ããŒã¿æ§é ã¯ãããã°ã©ã ãæ±ãããŒã¿ãæŽçããŠä¿æããããã®æ¹æ³ãå®çŸ©ããŸããå¹ççãªããŒã¿æ§é ã®éžæã¯ãããã°ã©ã ã®ããã©ãŒãã³ã¹ãã¡ã¢ãªã®äœ¿çšéãå®è¡æéã«çŽçµããŸããé©åãªããŒã¿æ§é ãéžæããããšã§ãããã°ã©ã ã®å¹çæ§ãä¿å®æ§ãé«ããããšãã§ããŸãããŸããããŒã¿æ§é ã¯ã¢ã«ãŽãªãºã ã®å®è£
ã«ãããŠãéèŠãªåœ¹å²ãæãããŸããå¹ççãªã¢ã«ãŽãªãºã ã¯ãé©åãªããŒã¿æ§é ã«åºã¥ããŠããŸãã
ããŒã¿æ§é ã®åºæ¬æŠå¿µã«ã¯ã以äžã®ãããªèŠçŽ ãå«ãŸããŸãã
ãããã®åºæ¬æŠå¿µãç解ããããšã§ãé©åãªããŒã¿æ§é ã®éžæãå®è£
ãå¯èœã«ãªããŸãã
ããŒã¿æ§é ã¯ãããŸããŸãªã¿ã€ãã«åé¡ãããŸããäžè¬çãªããŒã¿æ§é ã®çš®é¡ã«ã¯ã以äžã®ãããªãã®ããããŸãã
ãããã®ããŒã¿æ§é ã¯ãããã«æ§ã
ãªæŽŸç圢æ
ãçµã¿åãããååšãããããããç¹å®ã®ç®çãå©çšäºäŸã«é©ããŠããŸããããŒã¿æ§é ã®ç解ã¯ãããã°ã©ãã³ã°ã«ãããåºç€çãªã¹ãã«ã®äžã€ã§ãããæ¬æžã§ã¯ãããã®æŠå¿µã詳现ã«æãäžããŠãããŸãã
é
åã¯ãããã°ã©ãã³ã°ã«ãããŠæãåºæ¬çãªããŒã¿æ§é ã®äžã€ã§ããé£ç¶ããã¡ã¢ãªé åã«åãåã®èŠçŽ ãæ ŒçŽããããšãã§ããå¹ççãªèŠçŽ ã®ã¢ã¯ã»ã¹ãå¯èœã§ãããã®ç« ã§ã¯ãé
åã®æŠèŠãšç¹æ§ãäžæ¬¡å
é
åãšå€æ¬¡å
é
åãé
åã®æäœããããŠé
åã䜿ã£ãæŒç¿åé¡ã«ã€ããŠæ¢æ±ããŸãã
é
åã¯ãèŠçŽ ãé£ç¶ããã¡ã¢ãªé åã«æ ŒçŽãããŠãããããããã®èŠçŽ ã«ã¯ã€ã³ããã¯ã¹ã䜿ã£ãŠã¢ã¯ã»ã¹ããããšãã§ããŸããé
åã®ç¹æ§ã«ã¯ä»¥äžã®ãããªãã®ããããŸãã
é
åã¯ãèŠçŽ ã®è¿œå ãåé€ãå¹ççã§ã¯ãªããããéçãªããŒã¿æ§é ãšããŠäœ¿çšãããŸãã
é
åã¯ãäžæ¬¡å
ã®ãã®ã ãã§ãªããå€æ¬¡å
ã®ãã®ãæ±ãããšãã§ããŸãã
å€æ¬¡å
é
åã¯ãè¡åãç»åãªã©ã®ããŒã¿ãå¹ççã«è¡šçŸããã®ã«åœ¹ç«ã¡ãŸãã
é
åã®æäœã«ã¯ãèŠçŽ ã®è¿œå ãåé€ãæ€çŽ¢ãªã©ãå«ãŸããŸãã
ãããã®æäœã¯ãé
åå
ã®èŠçŽ ã®é
眮ããµã€ãºã®å€æŽã«é¢ãããããå¹ççãªå®è£
ãæ±ããããŸãã
é
åã䜿ã£ãæŒç¿åé¡ã§ã¯ã以äžã®ãããªèª²é¡ãäžããããããšããããŸãã
ãããã®æŒç¿åé¡ãéããŠãé
åã®æäœãã¢ã«ãŽãªãºã ã®ç解ãæ·±ããããšãã§ããŸãã
é£çµãªã¹ãã¯ãããã°ã©ãã³ã°ã«ãããŠéèŠãªããŒã¿æ§é ã®äžã€ã§ãããèŠçŽ ããã€ã³ã¿ã«ãã£ãŠãªã³ã¯ãããããŒãããæ§æãããŸãããã®ç« ã§ã¯ãé£çµãªã¹ãã®æŠèŠãšç¹æ§ãåæ¹åé£çµãªã¹ããšåæ¹åé£çµãªã¹ããé£çµãªã¹ãã®æäœããããŠé£çµãªã¹ãã䜿ã£ãæŒç¿åé¡ã«ã€ããŠæ¢æ±ããŸãã
é£çµãªã¹ãã¯ãèŠçŽ (ããŒã)ããã€ã³ã¿ã«ãã£ãŠãªã³ã¯ãããããŒã¿æ§é ã§ããåããŒãã¯ãããŒã¿ãšæ¬¡ã®ããŒããžã®ãã€ã³ã¿(ãŸãã¯åç
§)ãæã¡ãŸããé£çµãªã¹ãã®ç¹æ§ã«ã¯ä»¥äžã®ãããªãã®ããããŸãã
é£çµãªã¹ãã¯ãèŠçŽ ã®è¿œå ãåé€ãé »ç¹ã«çºçããå Žåããéçãªã¡ã¢ãªç®¡çãå°é£ãªå Žåã«é©ããŠããŸãã
é£çµãªã¹ãã«ã¯ãåæ¹åé£çµãªã¹ããšåæ¹åé£çµãªã¹ãã®äºã€ã®äž»èŠãªã¿ã€ãããããŸãã
ã©ã¡ãã®ã¿ã€ãããç¹å®ã®èŠä»¶ã䜿çšã±ãŒã¹ã«å¿ããŠéžæãããŸãã
é£çµãªã¹ãã®äž»ãªæäœã«ã¯ãèŠçŽ ã®æ¿å
¥ãåé€ãæ€çŽ¢ãªã©ãå«ãŸããŸãã
ãããã®æäœã¯ãé£çµãªã¹ãã®åºæ¬çãªæ©èœã§ãããå¹ççãªå®è£
ãæ±ããããŸãã
é£çµãªã¹ãã䜿ã£ãæŒç¿åé¡ã§ã¯ã以äžã®ãããªèª²é¡ãäžããããããšããããŸãã
ãããã®æŒç¿åé¡ãéããŠãé£çµãªã¹ãã®æäœãã¢ã«ãŽãªãºã ã®ç解ãæ·±ããããšãã§ããŸãã
ã¹ã¿ãã¯ã¯ãããŒã¿ãåŸå
¥ãå
åºã(LIFO: Last In, First Out)ã®ååã«åºã¥ããŠç®¡çããããŒã¿æ§é ã§ãããã®ç« ã§ã¯ãã¹ã¿ãã¯ã®æŠèŠãšç¹æ§ãã¹ã¿ãã¯ã®å®è£
ãšæäœ(pushãpopãpeekãªã©)ããããŠã¹ã¿ãã¯ã䜿ã£ãæŒç¿åé¡ã«ã€ããŠè§£èª¬ããŸãã
ã¹ã¿ãã¯ã¯ãäžè¬çã«ç®±ãå±±ãšæ¯å©ãããæ°ããèŠçŽ ãåžžã«æäžéšã«è¿œå ãããèŠçŽ ã®åé€ãæäžéšããè¡ãããŸããã¹ã¿ãã¯ã®ç¹æ§ã¯æ¬¡ã®éãã§ã:
ã¹ã¿ãã¯ã¯ãããã°ã©ã ã®é¢æ°ã®åŒã³åºããåŒã®è©äŸ¡ãããã¯ãã©ããã³ã°ãªã©ãããŸããŸãªã¢ããªã±ãŒã·ã§ã³ã§äœ¿çšãããŸãã
ã¹ã¿ãã¯ã¯ãé
åãŸãã¯é£çµãªã¹ãã䜿çšããŠå®è£
ããããšãã§ããŸããäž»ãªæäœã¯æ¬¡ã®éãã§ã:
ãããã®æäœã¯ãã¹ã¿ãã¯ã®åºæ¬çãªæ©èœãæäŸããèŠçŽ ã®è¿œå ãåé€ãå¹ççã«è¡ãããšãã§ããŸãã
ã¹ã¿ãã¯ã䜿ã£ãæŒç¿åé¡ã¯ã以äžã®ãããªãã®ããããŸã:
ãããã®æŒç¿åé¡ã¯ãã¹ã¿ãã¯ã䜿ã£ãã¢ã«ãŽãªãºã ãåé¡è§£æ±ºèœåãåäžãããã®ã«åœ¹ç«ã¡ãŸãã
ãã¥ãŒã¯ãããŒã¿ãå
å
¥ãå
åºã(FIFO: First In, First Out)ã®ååã«åºã¥ããŠç®¡çããããŒã¿æ§é ã§ãããã®ç« ã§ã¯ããã¥ãŒã®æŠèŠãšç¹æ§ããã¥ãŒã®å®è£
ãšæäœ(enqueueãdequeueãpeekãªã©)ããããŠãã¥ãŒã䜿ã£ãæŒç¿åé¡ã«ã€ããŠè§£èª¬ããŸãã
ãã¥ãŒã¯ãåãåŸ
ã¡è¡åãšæ¯å©ãããæ°ããèŠçŽ ãåžžã«æ«å°Ÿã«è¿œå ãããèŠçŽ ã®åé€ãå
é ããè¡ãããŸãããã¥ãŒã®ç¹æ§ã¯æ¬¡ã®éãã§ã:
ãã¥ãŒã¯ãã¿ã¹ã¯ã®åŠçããªãœãŒã¹ã®ç®¡çãã€ãã³ãåŸ
ã¡è¡åãªã©ãé çªãç¶æããå¿
èŠãããå Žé¢ã§äœ¿çšãããŸãã
ãã¥ãŒã¯ãé
åãŸãã¯é£çµãªã¹ãã䜿çšããŠå®è£
ããããšãã§ããŸããäž»ãªæäœã¯æ¬¡ã®éãã§ã:
ãããã®æäœã¯ããã¥ãŒã®åºæ¬çãªæ©èœãæäŸããèŠçŽ ã®è¿œå ãåé€ãå¹ççã«è¡ãããšãã§ããŸãã
ãã¥ãŒã䜿ã£ãæŒç¿åé¡ã¯ã以äžã®ãããªãã®ããããŸã:
ãããã®æŒç¿åé¡ã¯ããã¥ãŒã䜿ã£ãã¢ã«ãŽãªãºã ãåé¡è§£æ±ºèœåãåäžãããã®ã«åœ¹ç«ã¡ãŸãã
ããªãŒã¯ãéå±€æ§é ãæã€ããŒã¿æ§é ã§ããã1ã€ã®æ ¹(ã«ãŒã)ããŒãããå§ãŸããè€æ°ã®å(ãŸãã¯åå«)ããŒããæã€ããšãã§ããŸããããªãŒã®ç¹æ§ã¯ä»¥äžã®éãã§ã:
äºåæšã¯ãåããŒããæ倧2ã€ã®åããŒããæã€ããªãŒæ§é ã§ããäºåæšã«ã¯ã以äžã®ãããªæŽŸç圢æ
ããããŸã:
ããªãŒã®äž»ãªæäœã«ã¯ä»¥äžãå«ãŸããŸã:
ããªãŒã䜿ã£ãæŒç¿åé¡ã¯ã以äžã®ãããªãã®ããããŸã:
ãããã®æŒç¿åé¡ã¯ãããªãŒæ§é ã®ç解ãšã¢ã«ãŽãªãºã ã®å®è£
èœåãåäžãããã®ã«åœ¹ç«ã¡ãŸãã
ã°ã©ãã¯ãé ç¹(ããŒã)ãšããããæ¥ç¶ãã蟺(ãšããž)ããæ§æãããããŒãéã®é¢ä¿ãè¡šçŸããããŒã¿æ§é ã§ããã°ã©ãã®ç¹æ§ã¯ä»¥äžã®éãã§ã:
ã°ã©ãã䜿ã£ãæŒç¿åé¡ã¯ã以äžã®ãããªãã®ããããŸã:
ãããã®æŒç¿åé¡ã¯ãã°ã©ãæ§é ã®ç解ãšã¢ã«ãŽãªãºã ã®å®è£
èœåãåäžãããã®ã«åœ¹ç«ã¡ãŸãã
ããã·ã¥ããŒãã«ã¯ãããŒãšå€ã®ãã¢ãæ ŒçŽããé«éãªããŒã¿ã®æ€çŽ¢ãæ¿å
¥ãåé€ãæäŸããããŒã¿æ§é ã§ããããã·ã¥ããŒãã«ã®ç¹æ§ã¯ä»¥äžã®éãã§ã:
åªå
床ä»ããã¥ãŒã¯ãèŠçŽ ã«åªå
床ãä»äžããããã¥ãŒã§ãããåªå
床ã®é«ãèŠçŽ ãåãåºãããŸããåªå
床ä»ããã¥ãŒã®ç¹æ§ã¯ä»¥äžã®éãã§ã:
平衡äºåæšãèµ€é»æšãªã©ã®é«åºŠãªããŒã¿æ§é ã¯ãå¹ççãªæäœãæäŸããããã«æšã®ãã©ã³ã¹ãä¿æããæ¹æ³ãå®è£
ããŸãããããã®ç¹æ§ã¯ä»¥äžã®éãã§ã:
ããŒã¿æ§é ã䜿ã£ãå¿çšäŸããããžã§ã¯ãã¯ä»¥äžã®ããã«ãªããŸã:
ãããã®å¿çšäŸããããžã§ã¯ãã¯ãããŒã¿æ§é ã®ç解ãšå®è£
èœåãåäžãããã®ã«åœ¹ç«ã¡ãŸãã
ã¢ã«ãŽãªãºã ãšããŒã¿æ§é ã¯ãå¯æ¥ã«é¢é£ããŠãããå¹ççãªåé¡è§£æ±ºã«ãããŠã¯äºãã«è£å®ããããŸãã
åé¡è§£æ±ºã«ãããŠã¯ãããŒã¿æ§é ã®éžæãšãã®æŽ»çšãéèŠã§ãã
è€éãªã¢ã«ãŽãªãºã ãšããŒã¿æ§é ãçµã¿åãããå¿çšãããžã§ã¯ããæŒç¿ã¯ãå®è·µçãªã¹ãã«ãåäžãããŸãã ã°ã©ãã¢ã«ãŽãªãºã ã®å®è£
: ã°ã©ãã®æé©çµè·¯æ¢çŽ¢ãæå°å
šåæšã®æ§ç¯ãªã©ãè€éãªã¢ã«ãŽãªãºã ã䜿çšãããããžã§ã¯ããå®è£
ããŸãã
å®è·µçãªãããžã§ã¯ãã課é¡ãéããŠãå¿çšåãé€æããŸãã
ããŒã¿æ§é ãšã¢ã«ãŽãªãºã ã®å®è·µçãªæŽ»çšæ¹æ³ãç解ããããšã§ãåé¡è§£æ±ºèœåãé«ããŸãã
ãããã®åãçµã¿ãéããŠãå®è·µçãªã¹ãã«ãšå¿çšåã磚ããŸãã
æãåºæ¬çãªããŒã¿æ§é ã¯ãé
åã§ããé
åã¯ãåãåã®è€æ°ã®èŠçŽ ãé£ç¶ããŠæ ŒçŽããããšãã§ããŸããé
åã®èŠçŽ ã«ã¯ãã€ã³ããã¯ã¹ã䜿çšããŠã¢ã¯ã»ã¹ã§ããŸãã
é
åã¯ãèŠçŽ ã®è¿œå ãåé€ãå¹ççã§ãªããããåºå®æ°ã®èŠçŽ ãæ ŒçŽããå Žåã«æé©ã§ãããã ããé
åã®èŠçŽ æ°ãå€æŽããå¿
èŠãããå Žåã¯ãæ°ããé
åãäœæããŠããŒã¿ãã³ããŒããå¿
èŠããããŸãã
以äžã¯ãPythonã§é
åã宣èšããåæåããé
åèŠçŽ ã«ã¢ã¯ã»ã¹ããããã°ã©ã ã®äŸã§ãã
ãã®ããã°ã©ã ã§ã¯ãæåã«numbersãšããååã®é
åã宣èšããåæåããŠããŸãããã®åŸãé
åã®èŠçŽ ã«ã¢ã¯ã»ã¹ããŠãå€æŽããããã«ãŒãããããèŠçŽ ãè¿œå ããããã¹ã©ã€ã¹ãããããæ¹æ³ã瀺ããŠããŸãã
以äžãæ§ã
ãªèšèªã§ã®ç䟡ãªå®è£
ã
ãªã¹ãã¯ãé
åã®ããã«åãåã®èŠçŽ ãæ ŒçŽããŸãããèŠçŽ ãé£ç¶ããŠæ ŒçŽããã®ã§ã¯ãªããããããããã€ã³ã¿ã§æ¥ç¶ãããŠããŸããããã«ãããèŠçŽ ã®è¿œå ãåé€ã容æã«ãªããŸãããã ããèŠçŽ ã«ã©ã³ãã ã«ã¢ã¯ã»ã¹ããããšã¯ã§ããŸããã
ãªã¹ãã¯ãèŠçŽ æ°ãå¯å€ã§ããå Žåããé »ç¹ã«èŠçŽ ã®è¿œå ãåé€ãè¡ãå¿
èŠãããå Žåã«æé©ã§ãã
以äžã¯Pythonã§ç·åœ¢ãªã¹ãã䜿ã£ãããã°ã©ã äŸã§ãããã®äŸã§ã¯ãç·åœ¢ãªã¹ãã䜿ã£ãŠæŽæ°ã®ãªã¹ããäœæãããªã¹ãã®å
é ã«èŠçŽ ãè¿œå ããããæå®ããäœçœ®ã«èŠçŽ ãæ¿å
¥ãããããªã¹ãããèŠçŽ ãåé€ãããããæ¹æ³ã瀺ããŸãã
ãã®ããã°ã©ã ã§ã¯ãNodeã¯ã©ã¹ã¯ãªã¹ãã®èŠçŽ ãè¡šããLinkedListã¯ã©ã¹ã¯ç·åœ¢ãªã¹ããè¡šããŸããprependã¡ãœããã¯ããªã¹ãã®å
é ã«èŠçŽ ãè¿œå ããinsertã¡ãœããã¯æå®ããäœçœ®ã«èŠçŽ ãæ¿å
¥ããŸããdeleteã¡ãœããã¯æå®ããäœçœ®ã®èŠçŽ ãåé€ããŸããdisplayã¡ãœããã¯ããªã¹ãã衚瀺ããŸãããã®ããã°ã©ã ãå®è¡ãããšã次ã®ããã«åºåãããŸãã
以äžã¯Pythonã§åæ¹å埪ç°ãªã¹ããå®è£
ããäŸã§ããããŒã㯠"Node" ã¯ã©ã¹ã§è¡šãããŸããåããŒãã¯ãåã®ããŒããšæ¬¡ã®ããŒããžã®åç
§ãæã£ãŠããŸãããªã¹ãèªäœã¯ "CircularLinkedList" ã¯ã©ã¹ã§è¡šãããŸãã
äžèšã®ã³ãŒãã䜿çšããŠã以äžã®ããã«åæ¹å埪ç°ãªã¹ããäœæãæäœã§ããŸãã
ã¹ã¿ãã¯ã¯ãèŠçŽ ã®è¿œå ãåé€ãäžæ¹åã«å¶éããããªã¹ãã§ããã¹ã¿ãã¯ã§ã¯ãèŠçŽ ã®è¿œå ã¯åžžã«æåŸå°Ÿã«è¡ãããèŠçŽ ã®åé€ã¯æåŸå°Ÿããè¡ãããŸããããããåŸå
¥ãå
åºã(LIFO:Last In, First Out)ããšåŒã³ãŸãã
ã¹ã¿ãã¯ã¯ãååž°çãªé¢æ°åŒã³åºããåŒã®è©äŸ¡ãªã©ãããŒã¿ã®ã¹ã¿ãã¯ãå¿
èŠãªå Žåã«æé©ã§ãã
以äžã¯Pythonã§ã¹ã¿ãã¯ãå®è£
ããäŸã§ãã
ãã®ã¯ã©ã¹ã¯ãã¹ã¿ãã¯ã®åºæ¬çãªæäœãå®è£
ããŠããŸãã以äžã¯ãããã€ãã®äŸã§ãã
ãã®ããã°ã©ã ã¯ãStackãšããã¯ã©ã¹ãäœæãããã®ã¯ã©ã¹ã®äžã« pushãpopãpeekãis_emptyãsize ãšãã£ãã¡ãœãããå®è£
ããŠããŸããpushã¡ãœããã¯ãæ°ããèŠçŽ ãã¹ã¿ãã¯ã«è¿œå ããŸããpopã¡ãœããã¯ãã¹ã¿ãã¯ã®äžçªäžã®èŠçŽ ãåãåºããŠè¿ããŸããpeekã¡ãœããã¯ãã¹ã¿ãã¯ã®äžçªäžã®èŠçŽ ãè¿ããŸãããã¹ã¿ãã¯ããã¯åé€ããŸãããis_emptyã¡ãœããã¯ãã¹ã¿ãã¯ã空ãã©ãããå€å®ããŸããsizeã¡ãœããã¯ãã¹ã¿ãã¯ã®èŠçŽ æ°ãè¿ããŸãã
ãã¥ãŒã¯ãèŠçŽ ã®è¿œå ãåé€ãäžæ¹åã«å¶éããããªã¹ãã§ãããã¥ãŒã§ã¯ãèŠçŽ ã®è¿œå ã¯åžžã«æ«å°Ÿã«è¡ãããèŠçŽ ã®åé€ã¯å
é ããè¡ãããŸããããããå
å
¥ãå
åºã(FIFO:First In, First Out)ããšåŒã³ãŸãã
ãã¥ãŒã¯ãããã°ã©ã ã§ãžã§ãã®ã¹ã±ãžã¥ãŒãªã³ã°ãããŒã¿ã®ãããã¡ãªã³ã°ãå¿
èŠãªå Žåã«æé©ã§ãã
以äžã¯Pythonã§ãã¥ãŒãå®è£
ããåºæ¬çãªäŸã§ãã
ãã®Queueã¯ã©ã¹ã¯ããªã¹ãã䜿çšããŠãã¥ãŒãå®è£
ããŠããŸããenqueueã¡ãœããã¯ãªã¹ãã®æ«å°Ÿã«èŠçŽ ãè¿œå ããdequeueã¡ãœããã¯ãªã¹ãã®å
é ããèŠçŽ ãåé€ããŸããis_emptyã¡ãœãããšsizeã¡ãœããã¯ããããããã¥ãŒã空ãã©ãããšãã¥ãŒã®ãµã€ãºãè¿ããŸããäŸãã°ã以äžã®ããã«ããŠãã®Queueã¯ã©ã¹ã䜿çšã§ããŸãã
ãã®ããã°ã©ã ã¯ãæåã«ç©ºã®ãã¥ãŒãäœæãã3ã€ã®èŠçŽ ãè¿œå ããŠããŸããdequeueã¡ãœããã¯ããã¥ãŒããèŠçŽ ãåé€ããŠãããããæåã®2ã€ã®åŒã³åºãã¯ãè¿œå ãããé çªã§ãã"apple"ãš"banana"ãè¿ããŸããæåŸã«ããã¥ãŒã®ãµã€ãºã1ã§ããããšã確èªããŠããŸãã
ããªãŒã¯ã芪åé¢ä¿ãæã£ãããŒã¿ãéå±€çã«è¡šçŸããããã®ããŒã¿æ§é ã§ãã ããªãŒã¯ãã«ãŒã(æäžäœã®ããŒã)ããå§ãŸããè€æ°ã®åããŒããæã€ããŒãããããŸããåããŒããããã«åããŒããæã€ããšãã§ããŸãã
ããªãŒã¯ããã¡ã€ã«ã·ã¹ãã ã®ãããªéå±€çãªããŒã¿ã®è¡šçŸã«æé©ã§ãããŸããããŒã¿ã®æ€çŽ¢ããœãŒãã«ãå©çšãããŸãã
以äžã«ãæ§ã
ãªããªãŒæ§é ã®Pythonããã°ã©ã äŸã瀺ããŸãã
äºåæšã¯ãåããŒããæ倧2ã€ã®åããŒããæã€æšæ§é ã§ãã以äžã¯ãäºåæšãè¡šãNodeã¯ã©ã¹ãšBinaryTreeã¯ã©ã¹ã®äŸã§ãã
äºåæ¢çŽ¢æšã¯ãäºåæšã®äžçš®ã§ãããå·ŠåŽã®åããŒãã¯èŠªããŒãã®å€ããå°ãããå³åŽã®åããŒãã¯èŠªããŒãã®å€ãã倧ãããªãããã«æ§æãããæšæ§é ã§ãã以äžã¯ãäºåæ¢çŽ¢æšãè¡šãNodeã¯ã©ã¹ãšBinarySearchTreeã¯ã©ã¹ã®äŸã§ãã
n-aryããªãŒã¯ãåããŒããnå以äžã®åããŒããæã€æšæ§é ã§ãã以äžã¯ãn-aryããªãŒãè¡šãNodeã¯ã©ã¹ãšNAryTreeã¯ã©ã¹ã®äŸã§ãã
ãã©ã€æšã¯ãæååã®éåãè¡šãæšæ§é ã§ãããåããŒããæååã®äžéšãè¡šãããã«æ§æãããŠããŸãã以äžã¯ããã©ã€æšãè¡šãTrieNodeã¯ã©ã¹ãšTrieã¯ã©ã¹ã®äŸã§ãã
ã°ã©ãã¯ãããŒããšãšããž(ããŒãéã®é¢ä¿)ããæ§æãããããŒã¿æ§é ã§ããã°ã©ãã¯ãè€æ°ã®ããŒããäºãã«ã€ãªãã£ãŠãããããããŒãéã®ãã¹ããã©ã£ãŠããŒã¿ãæ€çŽ¢ããããšãã§ããŸãã
ã°ã©ãã¯ããœãŒã·ã£ã«ãããã¯ãŒã¯ã®ãããªããŒãéã®é¢ä¿ãè¡šçŸããããã«æé©ã§ãããŸããã°ã©ãã®æççµè·¯ãæ±ããã¢ã«ãŽãªãºã ããããŒãã®ã¯ã©ã¹ã¿ãªã³ã°ãªã©ã®ã¢ã«ãŽãªãºã ã«ãå©çšãããŸãã
ã°ã©ãã¯ãå€ãã®å ŽåãããŒã¿ãå¯èŠåããããã«äœ¿çšãããèŠèŠçãªæ段ãšããŠèª¬æãããŸããããããã°ã©ãã¯ãŸããã³ã³ãã¥ãŒã¿ãµã€ãšã³ã¹ã«ãããéèŠãªããŒã¿æ§é ã®äžã€ã§ããããŸããããã§ã¯ãã°ã©ãã䜿çšããããã°ã©ã äŸãããã€ã玹ä»ããŸãã
ã°ã©ããè¡šãäžè¬çãªæ¹æ³ã¯ãé£æ¥è¡åã䜿çšããããšã§ãã以äžã¯ãé£æ¥è¡åã䜿çšããŠã°ã©ããè¡šãPythonããã°ã©ã ã®äŸã§ãã
ãã®ããã°ã©ã ã§ã¯ãã°ã©ãã¯é£æ¥è¡åãšããŠè¡šãããŸããGraphã¯ã©ã¹ã®__init__ã¡ãœããã§ã¯ãverticesæ°ã ãã®äºæ¬¡å
ãªã¹ããäœæããŠããŸããadd_edgeã¡ãœããã§ã¯ãé ç¹uãšvéã«èŸºãè¿œå ããããšãã§ããŸããprint_graphã¡ãœããã§ã¯ãã°ã©ããé£æ¥ãªã¹ã圢åŒã§è¡šç€ºããŸãã
ã°ã©ããæ¢çŽ¢ããããã«äœ¿çšãããäžè¬çãªã¢ã«ãŽãªãºã ã«ã¯ãå¹
åªå
æ¢çŽ¢(BFS)ãšæ·±ãåªå
æ¢çŽ¢(DFS)ããããŸãã
以äžã¯ãDFSã䜿çšããŠã°ã©ããæ¢çŽ¢ããPythonããã°ã©ã ã®äŸã§ãã
ãã®ããã°ã©ã ã§ã¯ãGraphã¯ã©ã¹ã®__init__ã¡ãœããã§ã°ã©ããåæåããŸããadd_edgeã¡ãœããã§ã¯ãé ç¹uãšvã®éã«èŸºãè¿œå ããŸããdfs_utilã¡ãœããã§ã¯ãé ç¹vã蚪åãããã®é£æ¥é ç¹ãååž°çã«èšªåããŸããæåŸã«ãdfsã¡ãœããã¯ãstartããå§ãŸãæ·±ãåªå
æ¢çŽ¢ãå®è¡ãã蚪åãããé ç¹ã衚瀺ããŸãã
ã°ã©ãã䜿çšããŠãæççµè·¯ã¢ã«ãŽãªãºã ãå®è£
ããããšãã§ããŸããæççµè·¯ã¢ã«ãŽãªãºã ã«ã¯ããã€ã¯ã¹ãã©æ³ããã«ãã³ãã©ãŒãæ³ãªã©ããããŸãã
以äžã¯ããã€ã¯ã¹ãã©æ³ã䜿çšããŠã°ã©ãã®æççµè·¯ãæ±ããPythonããã°ã©ã ã®äŸã§ãã
ãã®ããã°ã©ã ã§ã¯ãGraphã¯ã©ã¹ã®__init__ã¡ãœããã§ã°ã©ããåæåããadd_edgeã¡ãœããã§é ç¹uãšvã®éã«éã¿wã®èŸºãè¿œå ããŸããdijkstraã¡ãœããã§ã¯ãstartããåé ç¹ãŸã§ã®æçè·é¢ãèšç®ããŸããheapqã䜿çšããŠãè·é¢ãæãè¿ãããŒããåªå
çã«åŠçããdistancesãªã¹ãã«æçè·é¢ãæŽæ°ããŠãããŸãã
以äžã¯äœ¿çšäŸãšãªãããã°ã©ã ã§ããããã§ã¯ãã°ã©ãã®é ç¹æ°ã5ãšãã0ãã4ãŸã§ã®é ç¹ãæã€ã°ã©ããäœæãã0ããåé ç¹ãžã®æçè·é¢ãèšç®ããŠããŸãã
ãã®ããã°ã©ã ã®åºåçµæã¯ä»¥äžã®ããã«ãªããŸãã
ããã¯ã0ããã®æçè·é¢ã0ã§ã1ããã¯10ã2ããã¯12ã3ããã¯3ã4ããã¯3ãšããæå³ã§ãã
以äžããã°ã©ãã䜿çšããããã°ã©ã äŸã®äžéšã§ããã°ã©ãã¯ãæ§ã
ãªåé¡ã解決ããããã«äœ¿çšãããããŒã¿æ§é ã§ããããããã®äŸãéããŠã°ã©ãã®åºæ¬çãªæäœãã¢ã«ãŽãªãºã ã«ã€ããŠç解ãæ·±ããããšãã§ããŸãã
é£æ³é
åã¯ãããŒãšå€ã®ãã¢ãæ ŒçŽããããŒã¿æ§é ã§ããé
åãšåãããè€æ°ã®èŠçŽ ãæ ŒçŽããããšãã§ããŸãããèŠçŽ ã«ã€ã³ããã¯ã¹ã䜿ãã®ã§ã¯ãªããããŒã䜿ã£ãŠèŠçŽ ã«ã¢ã¯ã»ã¹ããŸãã
é£æ³é
åã¯ãããŒã䜿ã£ãŠèŠçŽ ãæ€çŽ¢ããããšãã§ãããããæ€çŽ¢é床ãéåžžã«éããªããŸãããŸããããŒã®éè€ãã§ããªããããããŒã¿ã®æŽåæ§ãä¿ã¡ããããªããŸãã
é£æ³é
åã¯ãèŸæžãããããªã©ã®ååã§åŒã°ããããšããããããã°ã©ã ã§ãã䜿ãããŸãã
以äžã¯Pythonã§é£æ³é
å(èŸæž)ã䜿çšããäŸã§ãã
ãã®äŸã§ã¯ã空ã®èŸæžãäœæããããŒãšå€ãè¿œå ããããŒã䜿çšããŠå€ãååŸããèŸæžãã«ãŒãããŠããŒãšå€ã衚瀺ããããŒãååšãããã©ããã確èªããããŒãåé€ããèŸæžã®ããŒã®ãªã¹ããšå€ã®ãªã¹ããååŸããŠããŸãã
éåã¯ãããŒã¿æ§é ã®äžã€ã§ãéè€ãèš±ãããé åºã®æŠå¿µããªãèŠçŽ ã®éãŸããè¡šããŸããéåã¯ãæ°åŠã®éåè«ã«åºã¥ããŠèšèšããããã®ã§ãããéåãæäœããããã®æ§ã
ãªæŒç®ãå®çŸ©ãããŠããŸãã
éåã«ã¯ä»¥äžã®ãããªåºæ¬çãªæäœããããŸãã
以äžããããã°ã©ãã³ã°ã«ãããåºæ¬çãªããŒã¿æ§é ã§ããé©åãªããŒã¿æ§é ã®éžæã¯ãããã°ã©ã ã®å®è¡é床ãã¡ã¢ãªäœ¿çšéã«å€§ããªåœ±é¿ãäžãããããããŒã¿ã®æ§è³ªã«å¿ããŠé©åãªããŒã¿æ§é ãéžæããããšãéèŠã§ãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "ããŒã¿æ§é ã¯ãããã°ã©ãã³ã°ã«ãããŠæ¥µããŠéèŠãªåœ¹å²ãæãããŸããã³ã³ãã¥ãŒã¿ããã°ã©ã ã¯ãããŒã¿ãæ±ãããã®æ段ãšããŠæ©èœãããã®ããŒã¿ãã©ã®ããã«çµç¹åããã管çããããã¯ãããã°ã©ã ã®ããã©ãŒãã³ã¹ãå¹çã«çŽæ¥åœ±é¿ãäžããŸãããããã£ãŠãé©åãªããŒã¿æ§é ã®éžæãšå®è£
ã¯ãããã°ã©ãã³ã°ã«ãããåºæ¬çãªã¹ãã«ã®äžã€ãšèšããŸãã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ããŒã¿æ§é ã®éèŠæ§ãç解ããããã«ãæã
ã¯ããŒã¿ãåãªãæ
å ±ã®å¡ãšããŠã§ã¯ãªããããã°ã©ã ãå©çšãããã圢ã§çµç¹åããå¹ççã«æäœã§ããããã«ããå¿
èŠããããŸããäŸãã°ãé
åã¯é£ç¶ããã¡ã¢ãªé åã«èŠçŽ ãæ ŒçŽããããšã§ãã©ã³ãã ã¢ã¯ã»ã¹ã«åªããŠããŸããäžæ¹ãé£çµãªã¹ãã¯ãã€ã³ã¿ã䜿çšããŠèŠçŽ ããªã³ã¯ããããšã§ãæ¿å
¥ãåé€ã容æã§ãããããã®éãã¯ãããŒã¿æ§é ã®éžæãããã°ã©ã ã®åäœãããã©ãŒãã³ã¹ã«äžãã圱é¿ã瀺ããŠããŸãã",
"title": ""
},
{
"paragraph_id": 2,
"tag": "p",
"text": "ãŸããããŒã¿æ§é ã¯ã¢ã«ãŽãªãºã ãšå¯æ¥ã«é¢é£ããŠããŸããå¹ççãªã¢ã«ãŽãªãºã ã®å®è£
ã¯ãé©åãªããŒã¿æ§é ã®éžæãšçµã¿åãããããšã§å®çŸãããŸããäŸãã°ãæ¢çŽ¢ããœãŒããšãã£ãåºæ¬çãªã¢ã«ãŽãªãºã ã¯ãããŒã¿æ§é ã«ãã£ãŠãã®å¹çæ§ã倧ããç°ãªããŸãã",
"title": ""
},
{
"paragraph_id": 3,
"tag": "p",
"text": "ãããã£ãŠãããã°ã©ãã³ã°ã«ãããŠæåããããã«ã¯ãããŒã¿æ§é ã®ç解ãšãã®é©åãªå©çšãäžå¯æ¬ ã§ããæ¬æžã§ã¯ãããŒã¿æ§é ã®åºæ¬ååããå¿çšãŸã§ã網çŸ
ããèªè
ãããã°ã©ã ã®å¹çæ§ãä¿¡é Œæ§ãåäžãããããã®æ段ãæäŸããŸãã",
"title": ""
},
{
"paragraph_id": 4,
"tag": "p",
"text": "æ¬ããŒãžã§ã¯äž»ã« Python ãçšããŸããä»ãC++, Javascript, Java , ãªã©ãçšããŸã",
"title": "â» æ¬ããŒãžã§äœ¿çšããèšèª"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "ããŒã¿æ§é (Data Structures)ã¯ãã³ã³ãã¥ãŒã¿ãµã€ãšã³ã¹ã«ãããŠããã°ã©ãã³ã°èšèªãã¢ã«ãŽãªãºã ãšäžŠãã§éèŠãªæŠå¿µã§ããããã°ã©ãã³ã°ã«ãããŠãããŒã¿ãå¹ççã«ç®¡çããæäœããããã®åºç€ãšãªãä»çµã¿ãæäŸããŸãããã®ç« ã§ã¯ãããŒã¿æ§é ã®éèŠæ§ãšåœ¹å²ãåºæ¬æŠå¿µãããã³äž»èŠãªããŒã¿æ§é ã®çš®é¡ãšåé¡ã«ã€ããŠæ¢æ±ããŸãã",
"title": "å°å
¥"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "ããŒã¿æ§é ã¯ãããã°ã©ã ãæ±ãããŒã¿ãæŽçããŠä¿æããããã®æ¹æ³ãå®çŸ©ããŸããå¹ççãªããŒã¿æ§é ã®éžæã¯ãããã°ã©ã ã®ããã©ãŒãã³ã¹ãã¡ã¢ãªã®äœ¿çšéãå®è¡æéã«çŽçµããŸããé©åãªããŒã¿æ§é ãéžæããããšã§ãããã°ã©ã ã®å¹çæ§ãä¿å®æ§ãé«ããããšãã§ããŸãããŸããããŒã¿æ§é ã¯ã¢ã«ãŽãªãºã ã®å®è£
ã«ãããŠãéèŠãªåœ¹å²ãæãããŸããå¹ççãªã¢ã«ãŽãªãºã ã¯ãé©åãªããŒã¿æ§é ã«åºã¥ããŠããŸãã",
"title": "å°å
¥"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "ããŒã¿æ§é ã®åºæ¬æŠå¿µã«ã¯ã以äžã®ãããªèŠçŽ ãå«ãŸããŸãã",
"title": "å°å
¥"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "ãããã®åºæ¬æŠå¿µãç解ããããšã§ãé©åãªããŒã¿æ§é ã®éžæãå®è£
ãå¯èœã«ãªããŸãã",
"title": "å°å
¥"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "ããŒã¿æ§é ã¯ãããŸããŸãªã¿ã€ãã«åé¡ãããŸããäžè¬çãªããŒã¿æ§é ã®çš®é¡ã«ã¯ã以äžã®ãããªãã®ããããŸãã",
"title": "å°å
¥"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "ãããã®ããŒã¿æ§é ã¯ãããã«æ§ã
ãªæŽŸç圢æ
ãçµã¿åãããååšãããããããç¹å®ã®ç®çãå©çšäºäŸã«é©ããŠããŸããããŒã¿æ§é ã®ç解ã¯ãããã°ã©ãã³ã°ã«ãããåºç€çãªã¹ãã«ã®äžã€ã§ãããæ¬æžã§ã¯ãããã®æŠå¿µã詳现ã«æãäžããŠãããŸãã",
"title": "å°å
¥"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "é
åã¯ãããã°ã©ãã³ã°ã«ãããŠæãåºæ¬çãªããŒã¿æ§é ã®äžã€ã§ããé£ç¶ããã¡ã¢ãªé åã«åãåã®èŠçŽ ãæ ŒçŽããããšãã§ããå¹ççãªèŠçŽ ã®ã¢ã¯ã»ã¹ãå¯èœã§ãããã®ç« ã§ã¯ãé
åã®æŠèŠãšç¹æ§ãäžæ¬¡å
é
åãšå€æ¬¡å
é
åãé
åã®æäœããããŠé
åã䜿ã£ãæŒç¿åé¡ã«ã€ããŠæ¢æ±ããŸãã",
"title": "é
å (Array)"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "é
åã¯ãèŠçŽ ãé£ç¶ããã¡ã¢ãªé åã«æ ŒçŽãããŠãããããããã®èŠçŽ ã«ã¯ã€ã³ããã¯ã¹ã䜿ã£ãŠã¢ã¯ã»ã¹ããããšãã§ããŸããé
åã®ç¹æ§ã«ã¯ä»¥äžã®ãããªãã®ããããŸãã",
"title": "é
å (Array)"
},
{
"paragraph_id": 13,
"tag": "p",
"text": "é
åã¯ãèŠçŽ ã®è¿œå ãåé€ãå¹ççã§ã¯ãªããããéçãªããŒã¿æ§é ãšããŠäœ¿çšãããŸãã",
"title": "é
å (Array)"
},
{
"paragraph_id": 14,
"tag": "p",
"text": "é
åã¯ãäžæ¬¡å
ã®ãã®ã ãã§ãªããå€æ¬¡å
ã®ãã®ãæ±ãããšãã§ããŸãã",
"title": "é
å (Array)"
},
{
"paragraph_id": 15,
"tag": "p",
"text": "å€æ¬¡å
é
åã¯ãè¡åãç»åãªã©ã®ããŒã¿ãå¹ççã«è¡šçŸããã®ã«åœ¹ç«ã¡ãŸãã",
"title": "é
å (Array)"
},
{
"paragraph_id": 16,
"tag": "p",
"text": "é
åã®æäœã«ã¯ãèŠçŽ ã®è¿œå ãåé€ãæ€çŽ¢ãªã©ãå«ãŸããŸãã",
"title": "é
å (Array)"
},
{
"paragraph_id": 17,
"tag": "p",
"text": "ãããã®æäœã¯ãé
åå
ã®èŠçŽ ã®é
眮ããµã€ãºã®å€æŽã«é¢ãããããå¹ççãªå®è£
ãæ±ããããŸãã",
"title": "é
å (Array)"
},
{
"paragraph_id": 18,
"tag": "p",
"text": "é
åã䜿ã£ãæŒç¿åé¡ã§ã¯ã以äžã®ãããªèª²é¡ãäžããããããšããããŸãã",
"title": "é
å (Array)"
},
{
"paragraph_id": 19,
"tag": "p",
"text": "ãããã®æŒç¿åé¡ãéããŠãé
åã®æäœãã¢ã«ãŽãªãºã ã®ç解ãæ·±ããããšãã§ããŸãã",
"title": "é
å (Array)"
},
{
"paragraph_id": 20,
"tag": "p",
"text": "é£çµãªã¹ãã¯ãããã°ã©ãã³ã°ã«ãããŠéèŠãªããŒã¿æ§é ã®äžã€ã§ãããèŠçŽ ããã€ã³ã¿ã«ãã£ãŠãªã³ã¯ãããããŒãããæ§æãããŸãããã®ç« ã§ã¯ãé£çµãªã¹ãã®æŠèŠãšç¹æ§ãåæ¹åé£çµãªã¹ããšåæ¹åé£çµãªã¹ããé£çµãªã¹ãã®æäœããããŠé£çµãªã¹ãã䜿ã£ãæŒç¿åé¡ã«ã€ããŠæ¢æ±ããŸãã",
"title": "é£çµãªã¹ã (Linked List)"
},
{
"paragraph_id": 21,
"tag": "p",
"text": "é£çµãªã¹ãã¯ãèŠçŽ (ããŒã)ããã€ã³ã¿ã«ãã£ãŠãªã³ã¯ãããããŒã¿æ§é ã§ããåããŒãã¯ãããŒã¿ãšæ¬¡ã®ããŒããžã®ãã€ã³ã¿(ãŸãã¯åç
§)ãæã¡ãŸããé£çµãªã¹ãã®ç¹æ§ã«ã¯ä»¥äžã®ãããªãã®ããããŸãã",
"title": "é£çµãªã¹ã (Linked List)"
},
{
"paragraph_id": 22,
"tag": "p",
"text": "é£çµãªã¹ãã¯ãèŠçŽ ã®è¿œå ãåé€ãé »ç¹ã«çºçããå Žåããéçãªã¡ã¢ãªç®¡çãå°é£ãªå Žåã«é©ããŠããŸãã",
"title": "é£çµãªã¹ã (Linked List)"
},
{
"paragraph_id": 23,
"tag": "p",
"text": "é£çµãªã¹ãã«ã¯ãåæ¹åé£çµãªã¹ããšåæ¹åé£çµãªã¹ãã®äºã€ã®äž»èŠãªã¿ã€ãããããŸãã",
"title": "é£çµãªã¹ã (Linked List)"
},
{
"paragraph_id": 24,
"tag": "p",
"text": "ã©ã¡ãã®ã¿ã€ãããç¹å®ã®èŠä»¶ã䜿çšã±ãŒã¹ã«å¿ããŠéžæãããŸãã",
"title": "é£çµãªã¹ã (Linked List)"
},
{
"paragraph_id": 25,
"tag": "p",
"text": "é£çµãªã¹ãã®äž»ãªæäœã«ã¯ãèŠçŽ ã®æ¿å
¥ãåé€ãæ€çŽ¢ãªã©ãå«ãŸããŸãã",
"title": "é£çµãªã¹ã (Linked List)"
},
{
"paragraph_id": 26,
"tag": "p",
"text": "ãããã®æäœã¯ãé£çµãªã¹ãã®åºæ¬çãªæ©èœã§ãããå¹ççãªå®è£
ãæ±ããããŸãã",
"title": "é£çµãªã¹ã (Linked List)"
},
{
"paragraph_id": 27,
"tag": "p",
"text": "é£çµãªã¹ãã䜿ã£ãæŒç¿åé¡ã§ã¯ã以äžã®ãããªèª²é¡ãäžããããããšããããŸãã",
"title": "é£çµãªã¹ã (Linked List)"
},
{
"paragraph_id": 28,
"tag": "p",
"text": "ãããã®æŒç¿åé¡ãéããŠãé£çµãªã¹ãã®æäœãã¢ã«ãŽãªãºã ã®ç解ãæ·±ããããšãã§ããŸãã",
"title": "é£çµãªã¹ã (Linked List)"
},
{
"paragraph_id": 29,
"tag": "p",
"text": "ã¹ã¿ãã¯ã¯ãããŒã¿ãåŸå
¥ãå
åºã(LIFO: Last In, First Out)ã®ååã«åºã¥ããŠç®¡çããããŒã¿æ§é ã§ãããã®ç« ã§ã¯ãã¹ã¿ãã¯ã®æŠèŠãšç¹æ§ãã¹ã¿ãã¯ã®å®è£
ãšæäœ(pushãpopãpeekãªã©)ããããŠã¹ã¿ãã¯ã䜿ã£ãæŒç¿åé¡ã«ã€ããŠè§£èª¬ããŸãã",
"title": "ã¹ã¿ã㯠(Stack)"
},
{
"paragraph_id": 30,
"tag": "p",
"text": "ã¹ã¿ãã¯ã¯ãäžè¬çã«ç®±ãå±±ãšæ¯å©ãããæ°ããèŠçŽ ãåžžã«æäžéšã«è¿œå ãããèŠçŽ ã®åé€ãæäžéšããè¡ãããŸããã¹ã¿ãã¯ã®ç¹æ§ã¯æ¬¡ã®éãã§ã:",
"title": "ã¹ã¿ã㯠(Stack)"
},
{
"paragraph_id": 31,
"tag": "p",
"text": "ã¹ã¿ãã¯ã¯ãããã°ã©ã ã®é¢æ°ã®åŒã³åºããåŒã®è©äŸ¡ãããã¯ãã©ããã³ã°ãªã©ãããŸããŸãªã¢ããªã±ãŒã·ã§ã³ã§äœ¿çšãããŸãã",
"title": "ã¹ã¿ã㯠(Stack)"
},
{
"paragraph_id": 32,
"tag": "p",
"text": "ã¹ã¿ãã¯ã¯ãé
åãŸãã¯é£çµãªã¹ãã䜿çšããŠå®è£
ããããšãã§ããŸããäž»ãªæäœã¯æ¬¡ã®éãã§ã:",
"title": "ã¹ã¿ã㯠(Stack)"
},
{
"paragraph_id": 33,
"tag": "p",
"text": "ãããã®æäœã¯ãã¹ã¿ãã¯ã®åºæ¬çãªæ©èœãæäŸããèŠçŽ ã®è¿œå ãåé€ãå¹ççã«è¡ãããšãã§ããŸãã",
"title": "ã¹ã¿ã㯠(Stack)"
},
{
"paragraph_id": 34,
"tag": "p",
"text": "ã¹ã¿ãã¯ã䜿ã£ãæŒç¿åé¡ã¯ã以äžã®ãããªãã®ããããŸã:",
"title": "ã¹ã¿ã㯠(Stack)"
},
{
"paragraph_id": 35,
"tag": "p",
"text": "ãããã®æŒç¿åé¡ã¯ãã¹ã¿ãã¯ã䜿ã£ãã¢ã«ãŽãªãºã ãåé¡è§£æ±ºèœåãåäžãããã®ã«åœ¹ç«ã¡ãŸãã",
"title": "ã¹ã¿ã㯠(Stack)"
},
{
"paragraph_id": 36,
"tag": "p",
"text": "ãã¥ãŒã¯ãããŒã¿ãå
å
¥ãå
åºã(FIFO: First In, First Out)ã®ååã«åºã¥ããŠç®¡çããããŒã¿æ§é ã§ãããã®ç« ã§ã¯ããã¥ãŒã®æŠèŠãšç¹æ§ããã¥ãŒã®å®è£
ãšæäœ(enqueueãdequeueãpeekãªã©)ããããŠãã¥ãŒã䜿ã£ãæŒç¿åé¡ã«ã€ããŠè§£èª¬ããŸãã",
"title": "ãã¥ãŒ (Queue)"
},
{
"paragraph_id": 37,
"tag": "p",
"text": "ãã¥ãŒã¯ãåãåŸ
ã¡è¡åãšæ¯å©ãããæ°ããèŠçŽ ãåžžã«æ«å°Ÿã«è¿œå ãããèŠçŽ ã®åé€ãå
é ããè¡ãããŸãããã¥ãŒã®ç¹æ§ã¯æ¬¡ã®éãã§ã:",
"title": "ãã¥ãŒ (Queue)"
},
{
"paragraph_id": 38,
"tag": "p",
"text": "ãã¥ãŒã¯ãã¿ã¹ã¯ã®åŠçããªãœãŒã¹ã®ç®¡çãã€ãã³ãåŸ
ã¡è¡åãªã©ãé çªãç¶æããå¿
èŠãããå Žé¢ã§äœ¿çšãããŸãã",
"title": "ãã¥ãŒ (Queue)"
},
{
"paragraph_id": 39,
"tag": "p",
"text": "ãã¥ãŒã¯ãé
åãŸãã¯é£çµãªã¹ãã䜿çšããŠå®è£
ããããšãã§ããŸããäž»ãªæäœã¯æ¬¡ã®éãã§ã:",
"title": "ãã¥ãŒ (Queue)"
},
{
"paragraph_id": 40,
"tag": "p",
"text": "ãããã®æäœã¯ããã¥ãŒã®åºæ¬çãªæ©èœãæäŸããèŠçŽ ã®è¿œå ãåé€ãå¹ççã«è¡ãããšãã§ããŸãã",
"title": "ãã¥ãŒ (Queue)"
},
{
"paragraph_id": 41,
"tag": "p",
"text": "ãã¥ãŒã䜿ã£ãæŒç¿åé¡ã¯ã以äžã®ãããªãã®ããããŸã:",
"title": "ãã¥ãŒ (Queue)"
},
{
"paragraph_id": 42,
"tag": "p",
"text": "ãããã®æŒç¿åé¡ã¯ããã¥ãŒã䜿ã£ãã¢ã«ãŽãªãºã ãåé¡è§£æ±ºèœåãåäžãããã®ã«åœ¹ç«ã¡ãŸãã",
"title": "ãã¥ãŒ (Queue)"
},
{
"paragraph_id": 43,
"tag": "p",
"text": "ããªãŒã¯ãéå±€æ§é ãæã€ããŒã¿æ§é ã§ããã1ã€ã®æ ¹(ã«ãŒã)ããŒãããå§ãŸããè€æ°ã®å(ãŸãã¯åå«)ããŒããæã€ããšãã§ããŸããããªãŒã®ç¹æ§ã¯ä»¥äžã®éãã§ã:",
"title": "ããªãŒ (Tree)"
},
{
"paragraph_id": 44,
"tag": "p",
"text": "äºåæšã¯ãåããŒããæ倧2ã€ã®åããŒããæã€ããªãŒæ§é ã§ããäºåæšã«ã¯ã以äžã®ãããªæŽŸç圢æ
ããããŸã:",
"title": "ããªãŒ (Tree)"
},
{
"paragraph_id": 45,
"tag": "p",
"text": "ããªãŒã®äž»ãªæäœã«ã¯ä»¥äžãå«ãŸããŸã:",
"title": "ããªãŒ (Tree)"
},
{
"paragraph_id": 46,
"tag": "p",
"text": "ããªãŒã䜿ã£ãæŒç¿åé¡ã¯ã以äžã®ãããªãã®ããããŸã:",
"title": "ããªãŒ (Tree)"
},
{
"paragraph_id": 47,
"tag": "p",
"text": "ãããã®æŒç¿åé¡ã¯ãããªãŒæ§é ã®ç解ãšã¢ã«ãŽãªãºã ã®å®è£
èœåãåäžãããã®ã«åœ¹ç«ã¡ãŸãã",
"title": "ããªãŒ (Tree)"
},
{
"paragraph_id": 48,
"tag": "p",
"text": "ã°ã©ãã¯ãé ç¹(ããŒã)ãšããããæ¥ç¶ãã蟺(ãšããž)ããæ§æãããããŒãéã®é¢ä¿ãè¡šçŸããããŒã¿æ§é ã§ããã°ã©ãã®ç¹æ§ã¯ä»¥äžã®éãã§ã:",
"title": "ã°ã©ã (Graph)"
},
{
"paragraph_id": 49,
"tag": "p",
"text": "ã°ã©ãã䜿ã£ãæŒç¿åé¡ã¯ã以äžã®ãããªãã®ããããŸã:",
"title": "ã°ã©ã (Graph)"
},
{
"paragraph_id": 50,
"tag": "p",
"text": "ãããã®æŒç¿åé¡ã¯ãã°ã©ãæ§é ã®ç解ãšã¢ã«ãŽãªãºã ã®å®è£
èœåãåäžãããã®ã«åœ¹ç«ã¡ãŸãã",
"title": "ã°ã©ã (Graph)"
},
{
"paragraph_id": 51,
"tag": "p",
"text": "ããã·ã¥ããŒãã«ã¯ãããŒãšå€ã®ãã¢ãæ ŒçŽããé«éãªããŒã¿ã®æ€çŽ¢ãæ¿å
¥ãåé€ãæäŸããããŒã¿æ§é ã§ããããã·ã¥ããŒãã«ã®ç¹æ§ã¯ä»¥äžã®éãã§ã:",
"title": "é«åºŠãªããŒã¿æ§é ãšå¿çš"
},
{
"paragraph_id": 52,
"tag": "p",
"text": "åªå
床ä»ããã¥ãŒã¯ãèŠçŽ ã«åªå
床ãä»äžããããã¥ãŒã§ãããåªå
床ã®é«ãèŠçŽ ãåãåºãããŸããåªå
床ä»ããã¥ãŒã®ç¹æ§ã¯ä»¥äžã®éãã§ã:",
"title": "é«åºŠãªããŒã¿æ§é ãšå¿çš"
},
{
"paragraph_id": 53,
"tag": "p",
"text": "平衡äºåæšãèµ€é»æšãªã©ã®é«åºŠãªããŒã¿æ§é ã¯ãå¹ççãªæäœãæäŸããããã«æšã®ãã©ã³ã¹ãä¿æããæ¹æ³ãå®è£
ããŸãããããã®ç¹æ§ã¯ä»¥äžã®éãã§ã:",
"title": "é«åºŠãªããŒã¿æ§é ãšå¿çš"
},
{
"paragraph_id": 54,
"tag": "p",
"text": "ããŒã¿æ§é ã䜿ã£ãå¿çšäŸããããžã§ã¯ãã¯ä»¥äžã®ããã«ãªããŸã:",
"title": "é«åºŠãªããŒã¿æ§é ãšå¿çš"
},
{
"paragraph_id": 55,
"tag": "p",
"text": "ãããã®å¿çšäŸããããžã§ã¯ãã¯ãããŒã¿æ§é ã®ç解ãšå®è£
èœåãåäžãããã®ã«åœ¹ç«ã¡ãŸãã",
"title": "é«åºŠãªããŒã¿æ§é ãšå¿çš"
},
{
"paragraph_id": 56,
"tag": "p",
"text": "ã¢ã«ãŽãªãºã ãšããŒã¿æ§é ã¯ãå¯æ¥ã«é¢é£ããŠãããå¹ççãªåé¡è§£æ±ºã«ãããŠã¯äºãã«è£å®ããããŸãã",
"title": "ã¢ã«ãŽãªãºã ãšããŒã¿æ§é ã®çµ±å"
},
{
"paragraph_id": 57,
"tag": "p",
"text": "åé¡è§£æ±ºã«ãããŠã¯ãããŒã¿æ§é ã®éžæãšãã®æŽ»çšãéèŠã§ãã",
"title": "ã¢ã«ãŽãªãºã ãšããŒã¿æ§é ã®çµ±å"
},
{
"paragraph_id": 58,
"tag": "p",
"text": "è€éãªã¢ã«ãŽãªãºã ãšããŒã¿æ§é ãçµã¿åãããå¿çšãããžã§ã¯ããæŒç¿ã¯ãå®è·µçãªã¹ãã«ãåäžãããŸãã ã°ã©ãã¢ã«ãŽãªãºã ã®å®è£
: ã°ã©ãã®æé©çµè·¯æ¢çŽ¢ãæå°å
šåæšã®æ§ç¯ãªã©ãè€éãªã¢ã«ãŽãªãºã ã䜿çšãããããžã§ã¯ããå®è£
ããŸãã",
"title": "ããè€éãªã¢ã«ãŽãªãºã ãšããŒã¿æ§é ã®å¿çšäºäŸ"
},
{
"paragraph_id": 59,
"tag": "p",
"text": "å®è·µçãªãããžã§ã¯ãã課é¡ãéããŠãå¿çšåãé€æããŸãã",
"title": "ããè€éãªã¢ã«ãŽãªãºã ãšããŒã¿æ§é ã®å¿çšäºäŸ"
},
{
"paragraph_id": 60,
"tag": "p",
"text": "ããŒã¿æ§é ãšã¢ã«ãŽãªãºã ã®å®è·µçãªæŽ»çšæ¹æ³ãç解ããããšã§ãåé¡è§£æ±ºèœåãé«ããŸãã",
"title": "ããè€éãªã¢ã«ãŽãªãºã ãšããŒã¿æ§é ã®å¿çšäºäŸ"
},
{
"paragraph_id": 61,
"tag": "p",
"text": "ãããã®åãçµã¿ãéããŠãå®è·µçãªã¹ãã«ãšå¿çšåã磚ããŸãã",
"title": "ããè€éãªã¢ã«ãŽãªãºã ãšããŒã¿æ§é ã®å¿çšäºäŸ"
},
{
"paragraph_id": 62,
"tag": "p",
"text": "æãåºæ¬çãªããŒã¿æ§é ã¯ãé
åã§ããé
åã¯ãåãåã®è€æ°ã®èŠçŽ ãé£ç¶ããŠæ ŒçŽããããšãã§ããŸããé
åã®èŠçŽ ã«ã¯ãã€ã³ããã¯ã¹ã䜿çšããŠã¢ã¯ã»ã¹ã§ããŸãã",
"title": "é
å"
},
{
"paragraph_id": 63,
"tag": "p",
"text": "é
åã¯ãèŠçŽ ã®è¿œå ãåé€ãå¹ççã§ãªããããåºå®æ°ã®èŠçŽ ãæ ŒçŽããå Žåã«æé©ã§ãããã ããé
åã®èŠçŽ æ°ãå€æŽããå¿
èŠãããå Žåã¯ãæ°ããé
åãäœæããŠããŒã¿ãã³ããŒããå¿
èŠããããŸãã",
"title": "é
å"
},
{
"paragraph_id": 64,
"tag": "p",
"text": "以äžã¯ãPythonã§é
åã宣èšããåæåããé
åèŠçŽ ã«ã¢ã¯ã»ã¹ããããã°ã©ã ã®äŸã§ãã",
"title": "é
å"
},
{
"paragraph_id": 65,
"tag": "p",
"text": "ãã®ããã°ã©ã ã§ã¯ãæåã«numbersãšããååã®é
åã宣èšããåæåããŠããŸãããã®åŸãé
åã®èŠçŽ ã«ã¢ã¯ã»ã¹ããŠãå€æŽããããã«ãŒãããããèŠçŽ ãè¿œå ããããã¹ã©ã€ã¹ãããããæ¹æ³ã瀺ããŠããŸãã",
"title": "é
å"
},
{
"paragraph_id": 66,
"tag": "p",
"text": "以äžãæ§ã
ãªèšèªã§ã®ç䟡ãªå®è£
ã",
"title": "é
å"
},
{
"paragraph_id": 67,
"tag": "p",
"text": "ãªã¹ãã¯ãé
åã®ããã«åãåã®èŠçŽ ãæ ŒçŽããŸãããèŠçŽ ãé£ç¶ããŠæ ŒçŽããã®ã§ã¯ãªããããããããã€ã³ã¿ã§æ¥ç¶ãããŠããŸããããã«ãããèŠçŽ ã®è¿œå ãåé€ã容æã«ãªããŸãããã ããèŠçŽ ã«ã©ã³ãã ã«ã¢ã¯ã»ã¹ããããšã¯ã§ããŸããã",
"title": "ãªã¹ã"
},
{
"paragraph_id": 68,
"tag": "p",
"text": "ãªã¹ãã¯ãèŠçŽ æ°ãå¯å€ã§ããå Žåããé »ç¹ã«èŠçŽ ã®è¿œå ãåé€ãè¡ãå¿
èŠãããå Žåã«æé©ã§ãã",
"title": "ãªã¹ã"
},
{
"paragraph_id": 69,
"tag": "p",
"text": "以äžã¯Pythonã§ç·åœ¢ãªã¹ãã䜿ã£ãããã°ã©ã äŸã§ãããã®äŸã§ã¯ãç·åœ¢ãªã¹ãã䜿ã£ãŠæŽæ°ã®ãªã¹ããäœæãããªã¹ãã®å
é ã«èŠçŽ ãè¿œå ããããæå®ããäœçœ®ã«èŠçŽ ãæ¿å
¥ãããããªã¹ãããèŠçŽ ãåé€ãããããæ¹æ³ã瀺ããŸãã",
"title": "ãªã¹ã"
},
{
"paragraph_id": 70,
"tag": "p",
"text": "ãã®ããã°ã©ã ã§ã¯ãNodeã¯ã©ã¹ã¯ãªã¹ãã®èŠçŽ ãè¡šããLinkedListã¯ã©ã¹ã¯ç·åœ¢ãªã¹ããè¡šããŸããprependã¡ãœããã¯ããªã¹ãã®å
é ã«èŠçŽ ãè¿œå ããinsertã¡ãœããã¯æå®ããäœçœ®ã«èŠçŽ ãæ¿å
¥ããŸããdeleteã¡ãœããã¯æå®ããäœçœ®ã®èŠçŽ ãåé€ããŸããdisplayã¡ãœããã¯ããªã¹ãã衚瀺ããŸãããã®ããã°ã©ã ãå®è¡ãããšã次ã®ããã«åºåãããŸãã",
"title": "ãªã¹ã"
},
{
"paragraph_id": 71,
"tag": "p",
"text": "以äžã¯Pythonã§åæ¹å埪ç°ãªã¹ããå®è£
ããäŸã§ããããŒã㯠\"Node\" ã¯ã©ã¹ã§è¡šãããŸããåããŒãã¯ãåã®ããŒããšæ¬¡ã®ããŒããžã®åç
§ãæã£ãŠããŸãããªã¹ãèªäœã¯ \"CircularLinkedList\" ã¯ã©ã¹ã§è¡šãããŸãã",
"title": "ãªã¹ã"
},
{
"paragraph_id": 72,
"tag": "p",
"text": "äžèšã®ã³ãŒãã䜿çšããŠã以äžã®ããã«åæ¹å埪ç°ãªã¹ããäœæãæäœã§ããŸãã",
"title": "ãªã¹ã"
},
{
"paragraph_id": 73,
"tag": "p",
"text": "ã¹ã¿ãã¯ã¯ãèŠçŽ ã®è¿œå ãåé€ãäžæ¹åã«å¶éããããªã¹ãã§ããã¹ã¿ãã¯ã§ã¯ãèŠçŽ ã®è¿œå ã¯åžžã«æåŸå°Ÿã«è¡ãããèŠçŽ ã®åé€ã¯æåŸå°Ÿããè¡ãããŸããããããåŸå
¥ãå
åºã(LIFO:Last In, First Out)ããšåŒã³ãŸãã",
"title": "ã¹ã¿ãã¯"
},
{
"paragraph_id": 74,
"tag": "p",
"text": "ã¹ã¿ãã¯ã¯ãååž°çãªé¢æ°åŒã³åºããåŒã®è©äŸ¡ãªã©ãããŒã¿ã®ã¹ã¿ãã¯ãå¿
èŠãªå Žåã«æé©ã§ãã",
"title": "ã¹ã¿ãã¯"
},
{
"paragraph_id": 75,
"tag": "p",
"text": "以äžã¯Pythonã§ã¹ã¿ãã¯ãå®è£
ããäŸã§ãã",
"title": "ã¹ã¿ãã¯"
},
{
"paragraph_id": 76,
"tag": "p",
"text": "ãã®ã¯ã©ã¹ã¯ãã¹ã¿ãã¯ã®åºæ¬çãªæäœãå®è£
ããŠããŸãã以äžã¯ãããã€ãã®äŸã§ãã",
"title": "ã¹ã¿ãã¯"
},
{
"paragraph_id": 77,
"tag": "p",
"text": "ãã®ããã°ã©ã ã¯ãStackãšããã¯ã©ã¹ãäœæãããã®ã¯ã©ã¹ã®äžã« pushãpopãpeekãis_emptyãsize ãšãã£ãã¡ãœãããå®è£
ããŠããŸããpushã¡ãœããã¯ãæ°ããèŠçŽ ãã¹ã¿ãã¯ã«è¿œå ããŸããpopã¡ãœããã¯ãã¹ã¿ãã¯ã®äžçªäžã®èŠçŽ ãåãåºããŠè¿ããŸããpeekã¡ãœããã¯ãã¹ã¿ãã¯ã®äžçªäžã®èŠçŽ ãè¿ããŸãããã¹ã¿ãã¯ããã¯åé€ããŸãããis_emptyã¡ãœããã¯ãã¹ã¿ãã¯ã空ãã©ãããå€å®ããŸããsizeã¡ãœããã¯ãã¹ã¿ãã¯ã®èŠçŽ æ°ãè¿ããŸãã",
"title": "ã¹ã¿ãã¯"
},
{
"paragraph_id": 78,
"tag": "p",
"text": "ãã¥ãŒã¯ãèŠçŽ ã®è¿œå ãåé€ãäžæ¹åã«å¶éããããªã¹ãã§ãããã¥ãŒã§ã¯ãèŠçŽ ã®è¿œå ã¯åžžã«æ«å°Ÿã«è¡ãããèŠçŽ ã®åé€ã¯å
é ããè¡ãããŸããããããå
å
¥ãå
åºã(FIFO:First In, First Out)ããšåŒã³ãŸãã",
"title": "ãã¥ãŒ"
},
{
"paragraph_id": 79,
"tag": "p",
"text": "ãã¥ãŒã¯ãããã°ã©ã ã§ãžã§ãã®ã¹ã±ãžã¥ãŒãªã³ã°ãããŒã¿ã®ãããã¡ãªã³ã°ãå¿
èŠãªå Žåã«æé©ã§ãã",
"title": "ãã¥ãŒ"
},
{
"paragraph_id": 80,
"tag": "p",
"text": "以äžã¯Pythonã§ãã¥ãŒãå®è£
ããåºæ¬çãªäŸã§ãã",
"title": "ãã¥ãŒ"
},
{
"paragraph_id": 81,
"tag": "p",
"text": "ãã®Queueã¯ã©ã¹ã¯ããªã¹ãã䜿çšããŠãã¥ãŒãå®è£
ããŠããŸããenqueueã¡ãœããã¯ãªã¹ãã®æ«å°Ÿã«èŠçŽ ãè¿œå ããdequeueã¡ãœããã¯ãªã¹ãã®å
é ããèŠçŽ ãåé€ããŸããis_emptyã¡ãœãããšsizeã¡ãœããã¯ããããããã¥ãŒã空ãã©ãããšãã¥ãŒã®ãµã€ãºãè¿ããŸããäŸãã°ã以äžã®ããã«ããŠãã®Queueã¯ã©ã¹ã䜿çšã§ããŸãã",
"title": "ãã¥ãŒ"
},
{
"paragraph_id": 82,
"tag": "p",
"text": "ãã®ããã°ã©ã ã¯ãæåã«ç©ºã®ãã¥ãŒãäœæãã3ã€ã®èŠçŽ ãè¿œå ããŠããŸããdequeueã¡ãœããã¯ããã¥ãŒããèŠçŽ ãåé€ããŠãããããæåã®2ã€ã®åŒã³åºãã¯ãè¿œå ãããé çªã§ãã\"apple\"ãš\"banana\"ãè¿ããŸããæåŸã«ããã¥ãŒã®ãµã€ãºã1ã§ããããšã確èªããŠããŸãã",
"title": "ãã¥ãŒ"
},
{
"paragraph_id": 83,
"tag": "p",
"text": "ããªãŒã¯ã芪åé¢ä¿ãæã£ãããŒã¿ãéå±€çã«è¡šçŸããããã®ããŒã¿æ§é ã§ãã ããªãŒã¯ãã«ãŒã(æäžäœã®ããŒã)ããå§ãŸããè€æ°ã®åããŒããæã€ããŒãããããŸããåããŒããããã«åããŒããæã€ããšãã§ããŸãã",
"title": "ããªãŒ"
},
{
"paragraph_id": 84,
"tag": "p",
"text": "ããªãŒã¯ããã¡ã€ã«ã·ã¹ãã ã®ãããªéå±€çãªããŒã¿ã®è¡šçŸã«æé©ã§ãããŸããããŒã¿ã®æ€çŽ¢ããœãŒãã«ãå©çšãããŸãã",
"title": "ããªãŒ"
},
{
"paragraph_id": 85,
"tag": "p",
"text": "以äžã«ãæ§ã
ãªããªãŒæ§é ã®Pythonããã°ã©ã äŸã瀺ããŸãã",
"title": "ããªãŒ"
},
{
"paragraph_id": 86,
"tag": "p",
"text": "äºåæšã¯ãåããŒããæ倧2ã€ã®åããŒããæã€æšæ§é ã§ãã以äžã¯ãäºåæšãè¡šãNodeã¯ã©ã¹ãšBinaryTreeã¯ã©ã¹ã®äŸã§ãã",
"title": "ããªãŒ"
},
{
"paragraph_id": 87,
"tag": "p",
"text": "äºåæ¢çŽ¢æšã¯ãäºåæšã®äžçš®ã§ãããå·ŠåŽã®åããŒãã¯èŠªããŒãã®å€ããå°ãããå³åŽã®åããŒãã¯èŠªããŒãã®å€ãã倧ãããªãããã«æ§æãããæšæ§é ã§ãã以äžã¯ãäºåæ¢çŽ¢æšãè¡šãNodeã¯ã©ã¹ãšBinarySearchTreeã¯ã©ã¹ã®äŸã§ãã",
"title": "ããªãŒ"
},
{
"paragraph_id": 88,
"tag": "p",
"text": "n-aryããªãŒã¯ãåããŒããnå以äžã®åããŒããæã€æšæ§é ã§ãã以äžã¯ãn-aryããªãŒãè¡šãNodeã¯ã©ã¹ãšNAryTreeã¯ã©ã¹ã®äŸã§ãã",
"title": "ããªãŒ"
},
{
"paragraph_id": 89,
"tag": "p",
"text": "ãã©ã€æšã¯ãæååã®éåãè¡šãæšæ§é ã§ãããåããŒããæååã®äžéšãè¡šãããã«æ§æãããŠããŸãã以äžã¯ããã©ã€æšãè¡šãTrieNodeã¯ã©ã¹ãšTrieã¯ã©ã¹ã®äŸã§ãã",
"title": "ããªãŒ"
},
{
"paragraph_id": 90,
"tag": "p",
"text": "ã°ã©ãã¯ãããŒããšãšããž(ããŒãéã®é¢ä¿)ããæ§æãããããŒã¿æ§é ã§ããã°ã©ãã¯ãè€æ°ã®ããŒããäºãã«ã€ãªãã£ãŠãããããããŒãéã®ãã¹ããã©ã£ãŠããŒã¿ãæ€çŽ¢ããããšãã§ããŸãã",
"title": "ã°ã©ã"
},
{
"paragraph_id": 91,
"tag": "p",
"text": "ã°ã©ãã¯ããœãŒã·ã£ã«ãããã¯ãŒã¯ã®ãããªããŒãéã®é¢ä¿ãè¡šçŸããããã«æé©ã§ãããŸããã°ã©ãã®æççµè·¯ãæ±ããã¢ã«ãŽãªãºã ããããŒãã®ã¯ã©ã¹ã¿ãªã³ã°ãªã©ã®ã¢ã«ãŽãªãºã ã«ãå©çšãããŸãã",
"title": "ã°ã©ã"
},
{
"paragraph_id": 92,
"tag": "p",
"text": "ã°ã©ãã¯ãå€ãã®å ŽåãããŒã¿ãå¯èŠåããããã«äœ¿çšãããèŠèŠçãªæ段ãšããŠèª¬æãããŸããããããã°ã©ãã¯ãŸããã³ã³ãã¥ãŒã¿ãµã€ãšã³ã¹ã«ãããéèŠãªããŒã¿æ§é ã®äžã€ã§ããããŸããããã§ã¯ãã°ã©ãã䜿çšããããã°ã©ã äŸãããã€ã玹ä»ããŸãã",
"title": "ã°ã©ã"
},
{
"paragraph_id": 93,
"tag": "p",
"text": "ã°ã©ããè¡šãäžè¬çãªæ¹æ³ã¯ãé£æ¥è¡åã䜿çšããããšã§ãã以äžã¯ãé£æ¥è¡åã䜿çšããŠã°ã©ããè¡šãPythonããã°ã©ã ã®äŸã§ãã",
"title": "ã°ã©ã"
},
{
"paragraph_id": 94,
"tag": "p",
"text": "ãã®ããã°ã©ã ã§ã¯ãã°ã©ãã¯é£æ¥è¡åãšããŠè¡šãããŸããGraphã¯ã©ã¹ã®__init__ã¡ãœããã§ã¯ãverticesæ°ã ãã®äºæ¬¡å
ãªã¹ããäœæããŠããŸããadd_edgeã¡ãœããã§ã¯ãé ç¹uãšvéã«èŸºãè¿œå ããããšãã§ããŸããprint_graphã¡ãœããã§ã¯ãã°ã©ããé£æ¥ãªã¹ã圢åŒã§è¡šç€ºããŸãã",
"title": "ã°ã©ã"
},
{
"paragraph_id": 95,
"tag": "p",
"text": "ã°ã©ããæ¢çŽ¢ããããã«äœ¿çšãããäžè¬çãªã¢ã«ãŽãªãºã ã«ã¯ãå¹
åªå
æ¢çŽ¢(BFS)ãšæ·±ãåªå
æ¢çŽ¢(DFS)ããããŸãã",
"title": "ã°ã©ã"
},
{
"paragraph_id": 96,
"tag": "p",
"text": "以äžã¯ãDFSã䜿çšããŠã°ã©ããæ¢çŽ¢ããPythonããã°ã©ã ã®äŸã§ãã",
"title": "ã°ã©ã"
},
{
"paragraph_id": 97,
"tag": "p",
"text": "ãã®ããã°ã©ã ã§ã¯ãGraphã¯ã©ã¹ã®__init__ã¡ãœããã§ã°ã©ããåæåããŸããadd_edgeã¡ãœããã§ã¯ãé ç¹uãšvã®éã«èŸºãè¿œå ããŸããdfs_utilã¡ãœããã§ã¯ãé ç¹vã蚪åãããã®é£æ¥é ç¹ãååž°çã«èšªåããŸããæåŸã«ãdfsã¡ãœããã¯ãstartããå§ãŸãæ·±ãåªå
æ¢çŽ¢ãå®è¡ãã蚪åãããé ç¹ã衚瀺ããŸãã",
"title": "ã°ã©ã"
},
{
"paragraph_id": 98,
"tag": "p",
"text": "ã°ã©ãã䜿çšããŠãæççµè·¯ã¢ã«ãŽãªãºã ãå®è£
ããããšãã§ããŸããæççµè·¯ã¢ã«ãŽãªãºã ã«ã¯ããã€ã¯ã¹ãã©æ³ããã«ãã³ãã©ãŒãæ³ãªã©ããããŸãã",
"title": "ã°ã©ã"
},
{
"paragraph_id": 99,
"tag": "p",
"text": "以äžã¯ããã€ã¯ã¹ãã©æ³ã䜿çšããŠã°ã©ãã®æççµè·¯ãæ±ããPythonããã°ã©ã ã®äŸã§ãã",
"title": "ã°ã©ã"
},
{
"paragraph_id": 100,
"tag": "p",
"text": "ãã®ããã°ã©ã ã§ã¯ãGraphã¯ã©ã¹ã®__init__ã¡ãœããã§ã°ã©ããåæåããadd_edgeã¡ãœããã§é ç¹uãšvã®éã«éã¿wã®èŸºãè¿œå ããŸããdijkstraã¡ãœããã§ã¯ãstartããåé ç¹ãŸã§ã®æçè·é¢ãèšç®ããŸããheapqã䜿çšããŠãè·é¢ãæãè¿ãããŒããåªå
çã«åŠçããdistancesãªã¹ãã«æçè·é¢ãæŽæ°ããŠãããŸãã",
"title": "ã°ã©ã"
},
{
"paragraph_id": 101,
"tag": "p",
"text": "以äžã¯äœ¿çšäŸãšãªãããã°ã©ã ã§ããããã§ã¯ãã°ã©ãã®é ç¹æ°ã5ãšãã0ãã4ãŸã§ã®é ç¹ãæã€ã°ã©ããäœæãã0ããåé ç¹ãžã®æçè·é¢ãèšç®ããŠããŸãã",
"title": "ã°ã©ã"
},
{
"paragraph_id": 102,
"tag": "p",
"text": "ãã®ããã°ã©ã ã®åºåçµæã¯ä»¥äžã®ããã«ãªããŸãã",
"title": "ã°ã©ã"
},
{
"paragraph_id": 103,
"tag": "p",
"text": "ããã¯ã0ããã®æçè·é¢ã0ã§ã1ããã¯10ã2ããã¯12ã3ããã¯3ã4ããã¯3ãšããæå³ã§ãã",
"title": "ã°ã©ã"
},
{
"paragraph_id": 104,
"tag": "p",
"text": "以äžããã°ã©ãã䜿çšããããã°ã©ã äŸã®äžéšã§ããã°ã©ãã¯ãæ§ã
ãªåé¡ã解決ããããã«äœ¿çšãããããŒã¿æ§é ã§ããããããã®äŸãéããŠã°ã©ãã®åºæ¬çãªæäœãã¢ã«ãŽãªãºã ã«ã€ããŠç解ãæ·±ããããšãã§ããŸãã",
"title": "ã°ã©ã"
},
{
"paragraph_id": 105,
"tag": "p",
"text": "é£æ³é
åã¯ãããŒãšå€ã®ãã¢ãæ ŒçŽããããŒã¿æ§é ã§ããé
åãšåãããè€æ°ã®èŠçŽ ãæ ŒçŽããããšãã§ããŸãããèŠçŽ ã«ã€ã³ããã¯ã¹ã䜿ãã®ã§ã¯ãªããããŒã䜿ã£ãŠèŠçŽ ã«ã¢ã¯ã»ã¹ããŸãã",
"title": "é£æ³é
å"
},
{
"paragraph_id": 106,
"tag": "p",
"text": "é£æ³é
åã¯ãããŒã䜿ã£ãŠèŠçŽ ãæ€çŽ¢ããããšãã§ãããããæ€çŽ¢é床ãéåžžã«éããªããŸãããŸããããŒã®éè€ãã§ããªããããããŒã¿ã®æŽåæ§ãä¿ã¡ããããªããŸãã",
"title": "é£æ³é
å"
},
{
"paragraph_id": 107,
"tag": "p",
"text": "é£æ³é
åã¯ãèŸæžãããããªã©ã®ååã§åŒã°ããããšããããããã°ã©ã ã§ãã䜿ãããŸãã",
"title": "é£æ³é
å"
},
{
"paragraph_id": 108,
"tag": "p",
"text": "以äžã¯Pythonã§é£æ³é
å(èŸæž)ã䜿çšããäŸã§ãã",
"title": "é£æ³é
å"
},
{
"paragraph_id": 109,
"tag": "p",
"text": "ãã®äŸã§ã¯ã空ã®èŸæžãäœæããããŒãšå€ãè¿œå ããããŒã䜿çšããŠå€ãååŸããèŸæžãã«ãŒãããŠããŒãšå€ã衚瀺ããããŒãååšãããã©ããã確èªããããŒãåé€ããèŸæžã®ããŒã®ãªã¹ããšå€ã®ãªã¹ããååŸããŠããŸãã",
"title": "é£æ³é
å"
},
{
"paragraph_id": 110,
"tag": "p",
"text": "éåã¯ãããŒã¿æ§é ã®äžã€ã§ãéè€ãèš±ãããé åºã®æŠå¿µããªãèŠçŽ ã®éãŸããè¡šããŸããéåã¯ãæ°åŠã®éåè«ã«åºã¥ããŠèšèšããããã®ã§ãããéåãæäœããããã®æ§ã
ãªæŒç®ãå®çŸ©ãããŠããŸãã",
"title": "éå"
},
{
"paragraph_id": 111,
"tag": "p",
"text": "éåã«ã¯ä»¥äžã®ãããªåºæ¬çãªæäœããããŸãã",
"title": "éå"
},
{
"paragraph_id": 112,
"tag": "p",
"text": "以äžããããã°ã©ãã³ã°ã«ãããåºæ¬çãªããŒã¿æ§é ã§ããé©åãªããŒã¿æ§é ã®éžæã¯ãããã°ã©ã ã®å®è¡é床ãã¡ã¢ãªäœ¿çšéã«å€§ããªåœ±é¿ãäžãããããããŒã¿ã®æ§è³ªã«å¿ããŠé©åãªããŒã¿æ§é ãéžæããããšãéèŠã§ãã",
"title": "éå"
}
] | ããŒã¿æ§é ã¯ãããã°ã©ãã³ã°ã«ãããŠæ¥µããŠéèŠãªåœ¹å²ãæãããŸããã³ã³ãã¥ãŒã¿ããã°ã©ã ã¯ãããŒã¿ãæ±ãããã®æ段ãšããŠæ©èœãããã®ããŒã¿ãã©ã®ããã«çµç¹åããã管çããããã¯ãããã°ã©ã ã®ããã©ãŒãã³ã¹ãå¹çã«çŽæ¥åœ±é¿ãäžããŸãããããã£ãŠãé©åãªããŒã¿æ§é ã®éžæãšå®è£
ã¯ãããã°ã©ãã³ã°ã«ãããåºæ¬çãªã¹ãã«ã®äžã€ãšèšããŸãã ããŒã¿æ§é ã®éèŠæ§ãç解ããããã«ãæã
ã¯ããŒã¿ãåãªãæ
å ±ã®å¡ãšããŠã§ã¯ãªããããã°ã©ã ãå©çšãããã圢ã§çµç¹åããå¹ççã«æäœã§ããããã«ããå¿
èŠããããŸããäŸãã°ãé
åã¯é£ç¶ããã¡ã¢ãªé åã«èŠçŽ ãæ ŒçŽããããšã§ãã©ã³ãã ã¢ã¯ã»ã¹ã«åªããŠããŸããäžæ¹ãé£çµãªã¹ãã¯ãã€ã³ã¿ã䜿çšããŠèŠçŽ ããªã³ã¯ããããšã§ãæ¿å
¥ãåé€ã容æã§ãããããã®éãã¯ãããŒã¿æ§é ã®éžæãããã°ã©ã ã®åäœãããã©ãŒãã³ã¹ã«äžãã圱é¿ã瀺ããŠããŸãã ãŸããããŒã¿æ§é ã¯ã¢ã«ãŽãªãºã ãšå¯æ¥ã«é¢é£ããŠããŸããå¹ççãªã¢ã«ãŽãªãºã ã®å®è£
ã¯ãé©åãªããŒã¿æ§é ã®éžæãšçµã¿åãããããšã§å®çŸãããŸããäŸãã°ãæ¢çŽ¢ããœãŒããšãã£ãåºæ¬çãªã¢ã«ãŽãªãºã ã¯ãããŒã¿æ§é ã«ãã£ãŠãã®å¹çæ§ã倧ããç°ãªããŸãã ãããã£ãŠãããã°ã©ãã³ã°ã«ãããŠæåããããã«ã¯ãããŒã¿æ§é ã®ç解ãšãã®é©åãªå©çšãäžå¯æ¬ ã§ããæ¬æžã§ã¯ãããŒã¿æ§é ã®åºæ¬ååããå¿çšãŸã§ã網çŸ
ããèªè
ãããã°ã©ã ã®å¹çæ§ãä¿¡é Œæ§ãåäžãããããã®æ段ãæäŸããŸãã | ããŒã¿æ§é ã¯ãããã°ã©ãã³ã°ã«ãããŠæ¥µããŠéèŠãªåœ¹å²ãæãããŸããã³ã³ãã¥ãŒã¿ããã°ã©ã ã¯ãããŒã¿ãæ±ãããã®æ段ãšããŠæ©èœãããã®ããŒã¿ãã©ã®ããã«çµç¹åããã管çããããã¯ãããã°ã©ã ã®ããã©ãŒãã³ã¹ãå¹çã«çŽæ¥åœ±é¿ãäžããŸãããããã£ãŠãé©åãªããŒã¿æ§é ã®éžæãšå®è£
ã¯ãããã°ã©ãã³ã°ã«ãããåºæ¬çãªã¹ãã«ã®äžã€ãšèšããŸãã
ããŒã¿æ§é ã®éèŠæ§ãç解ããããã«ãæã
ã¯ããŒã¿ãåãªãæ
å ±ã®å¡ãšããŠã§ã¯ãªããããã°ã©ã ãå©çšãããã圢ã§çµç¹åããå¹ççã«æäœã§ããããã«ããå¿
èŠããããŸããäŸãã°ãé
åã¯é£ç¶ããã¡ã¢ãªé åã«èŠçŽ ãæ ŒçŽããããšã§ãã©ã³ãã ã¢ã¯ã»ã¹ã«åªããŠããŸããäžæ¹ãé£çµãªã¹ãã¯ãã€ã³ã¿ã䜿çšããŠèŠçŽ ããªã³ã¯ããããšã§ãæ¿å
¥ãåé€ã容æã§ãããããã®éãã¯ãããŒã¿æ§é ã®éžæãããã°ã©ã ã®åäœãããã©ãŒãã³ã¹ã«äžãã圱é¿ã瀺ããŠããŸãã
ãŸããããŒã¿æ§é ã¯ã¢ã«ãŽãªãºã ãšå¯æ¥ã«é¢é£ããŠããŸããå¹ççãªã¢ã«ãŽãªãºã ã®å®è£
ã¯ãé©åãªããŒã¿æ§é ã®éžæãšçµã¿åãããããšã§å®çŸãããŸããäŸãã°ãæ¢çŽ¢ããœãŒããšãã£ãåºæ¬çãªã¢ã«ãŽãªãºã ã¯ãããŒã¿æ§é ã«ãã£ãŠãã®å¹çæ§ã倧ããç°ãªããŸãã
ãããã£ãŠãããã°ã©ãã³ã°ã«ãããŠæåããããã«ã¯ãããŒã¿æ§é ã®ç解ãšãã®é©åãªå©çšãäžå¯æ¬ ã§ããæ¬æžã§ã¯ãããŒã¿æ§é ã®åºæ¬ååããå¿çšãŸã§ã網çŸ
ããèªè
ãããã°ã©ã ã®å¹çæ§ãä¿¡é Œæ§ãåäžãããããã®æ段ãæäŸããŸãã
== å°å
¥ ==
ããŒã¿æ§é ïŒData StructuresïŒã¯ãã³ã³ãã¥ãŒã¿ãµã€ãšã³ã¹ã«ãããŠããã°ã©ãã³ã°èšèªãã¢ã«ãŽãªãºã ãšäžŠãã§éèŠãªæŠå¿µã§ããããã°ã©ãã³ã°ã«ãããŠãããŒã¿ãå¹ççã«ç®¡çããæäœããããã®åºç€ãšãªãä»çµã¿ãæäŸããŸãããã®ç« ã§ã¯ãããŒã¿æ§é ã®éèŠæ§ãšåœ¹å²ãåºæ¬æŠå¿µãããã³äž»èŠãªããŒã¿æ§é ã®çš®é¡ãšåé¡ã«ã€ããŠæ¢æ±ããŸãã
=== ããŒã¿æ§é ã®éèŠæ§ãšåœ¹å² ===
ããŒã¿æ§é ã¯ãããã°ã©ã ãæ±ãããŒã¿ãæŽçããŠä¿æããããã®æ¹æ³ãå®çŸ©ããŸããå¹ççãªããŒã¿æ§é ã®éžæã¯ãããã°ã©ã ã®ããã©ãŒãã³ã¹ãã¡ã¢ãªã®äœ¿çšéãå®è¡æéã«çŽçµããŸããé©åãªããŒã¿æ§é ãéžæããããšã§ãããã°ã©ã ã®å¹çæ§ãä¿å®æ§ãé«ããããšãã§ããŸãããŸããããŒã¿æ§é ã¯ã¢ã«ãŽãªãºã ã®å®è£
ã«ãããŠãéèŠãªåœ¹å²ãæãããŸããå¹ççãªã¢ã«ãŽãªãºã ã¯ãé©åãªããŒã¿æ§é ã«åºã¥ããŠããŸãã
=== ããŒã¿æ§é ã®åºæ¬æŠå¿µ ===
ããŒã¿æ§é ã®åºæ¬æŠå¿µã«ã¯ã以äžã®ãããªèŠçŽ ãå«ãŸããŸãã
* '''ããŒã¿:''' ããã°ã©ã ãæ±ãæ
å ±ã®å¡ã
* '''æäœ:''' ããŒã¿ã«å¯ŸããŠè¡ãããæäœãåŠçã
* '''çµç¹å:''' ããŒã¿ã®æŽçãé
眮ã®æ¹æ³ã
* '''å¹çæ§:''' ããŒã¿ã®ã¢ã¯ã»ã¹ãæäœã®å¹çæ§ã®ç¢ºä¿ã
ãããã®åºæ¬æŠå¿µãç解ããããšã§ãé©åãªããŒã¿æ§é ã®éžæãå®è£
ãå¯èœã«ãªããŸãã
=== ããŒã¿æ§é ã®çš®é¡ãšåé¡ ===
ããŒã¿æ§é ã¯ãããŸããŸãªã¿ã€ãã«åé¡ãããŸããäžè¬çãªããŒã¿æ§é ã®çš®é¡ã«ã¯ã以äžã®ãããªãã®ããããŸãã
* '''é
å (Array):''' é£ç¶ããã¡ã¢ãªé åã«èŠçŽ ãæ ŒçŽããããŒã¿æ§é ã
* '''é£çµãªã¹ã (Linked List):''' ãã€ã³ã¿ã䜿çšããŠèŠçŽ ããªã³ã¯ããããŒã¿æ§é ã
* '''ã¹ã¿ã㯠(Stack):''' åŸå
¥ãå
åºãïŒLIFOïŒã®åäœãæã€ããŒã¿æ§é ã
* '''ãã¥ãŒ (Queue):''' å
å
¥ãå
åºãïŒFIFOïŒã®åäœãæã€ããŒã¿æ§é ã
* '''ããªãŒ (Tree):''' éå±€çãªããŒã¿æ§é ãè¡šçŸããããã®ããŒã¿æ§é ã
* '''ã°ã©ã (Graph):''' é ç¹ãšèŸºãæã€ããŒã¿æ§é ã§ãè€éãªé¢ä¿ãè¡šçŸããã®ã«äœ¿çšãããã
ãããã®ããŒã¿æ§é ã¯ãããã«æ§ã
ãªæŽŸç圢æ
ãçµã¿åãããååšãããããããç¹å®ã®ç®çãå©çšäºäŸã«é©ããŠããŸããããŒã¿æ§é ã®ç解ã¯ãããã°ã©ãã³ã°ã«ãããåºç€çãªã¹ãã«ã®äžã€ã§ãããæ¬æžã§ã¯ãããã®æŠå¿µã詳现ã«æãäžããŠãããŸãã
== é
å (Array) ==
é
åã¯ãããã°ã©ãã³ã°ã«ãããŠæãåºæ¬çãªããŒã¿æ§é ã®äžã€ã§ããé£ç¶ããã¡ã¢ãªé åã«åãåã®èŠçŽ ãæ ŒçŽããããšãã§ããå¹ççãªèŠçŽ ã®ã¢ã¯ã»ã¹ãå¯èœã§ãããã®ç« ã§ã¯ãé
åã®æŠèŠãšç¹æ§ãäžæ¬¡å
é
åãšå€æ¬¡å
é
åãé
åã®æäœããããŠé
åã䜿ã£ãæŒç¿åé¡ã«ã€ããŠæ¢æ±ããŸãã
{{Main|é
å}}
=== é
åã®æŠèŠãšç¹æ§ ===
é
åã¯ãèŠçŽ ãé£ç¶ããã¡ã¢ãªé åã«æ ŒçŽãããŠãããããããã®èŠçŽ ã«ã¯ã€ã³ããã¯ã¹ã䜿ã£ãŠã¢ã¯ã»ã¹ããããšãã§ããŸããé
åã®ç¹æ§ã«ã¯ä»¥äžã®ãããªãã®ããããŸãã
* '''åãåã®èŠçŽ :''' é
åå
ã®èŠçŽ ã¯ãã¹ãŠåãåã§ããå¿
èŠããããŸãã
* '''é£ç¶ããã¡ã¢ãªé
眮:''' èŠçŽ ã¯ã¡ã¢ãªäžã§é£ç¶ããŠé
眮ãããŠããŸãã
* '''ã©ã³ãã ã¢ã¯ã»ã¹:''' ã€ã³ããã¯ã¹ã䜿çšããŠä»»æã®èŠçŽ ã«çŽæ¥ã¢ã¯ã»ã¹ã§ããŸãã
é
åã¯ãèŠçŽ ã®è¿œå ãåé€ãå¹ççã§ã¯ãªããããéçãªããŒã¿æ§é ãšããŠäœ¿çšãããŸãã
=== äžæ¬¡å
é
åãšå€æ¬¡å
é
å ===
é
åã¯ãäžæ¬¡å
ã®ãã®ã ãã§ãªããå€æ¬¡å
ã®ãã®ãæ±ãããšãã§ããŸãã
* '''äžæ¬¡å
é
å:''' èŠçŽ ãäžåã«äžŠãã é
åã§ããèŠçŽ ãžã®ã¢ã¯ã»ã¹ã«ã¯1ã€ã®ã€ã³ããã¯ã¹ã䜿çšãããŸãã
* '''å€æ¬¡å
é
å:''' èŠçŽ ãè€æ°ã®æ¬¡å
ã«é
眮ãããé
åã§ããäºæ¬¡å
é
åãäžæ¬¡å
é
åãªã©ããããèŠçŽ ãžã®ã¢ã¯ã»ã¹ã«ã¯è€æ°ã®ã€ã³ããã¯ã¹ã䜿çšãããŸãã
å€æ¬¡å
é
åã¯ãè¡åãç»åãªã©ã®ããŒã¿ãå¹ççã«è¡šçŸããã®ã«åœ¹ç«ã¡ãŸãã
=== é
åã®æäœ (èŠçŽ ã®è¿œå ãåé€ãæ€çŽ¢ãªã©) ===
é
åã®æäœã«ã¯ãèŠçŽ ã®è¿œå ãåé€ãæ€çŽ¢ãªã©ãå«ãŸããŸãã
* '''èŠçŽ ã®è¿œå :''' é
åã®æ«å°Ÿã«æ°ããèŠçŽ ãè¿œå ããããšãã§ããŸãããã ããé
åã®ãµã€ãºãè¶
ããŠèŠçŽ ãè¿œå ããå Žåã¯ãæ°ããé
åãäœæããŠããŒã¿ãã³ããŒããå¿
èŠããããŸãã
* '''èŠçŽ ã®åé€:''' æå®ãããã€ã³ããã¯ã¹ã®èŠçŽ ãåé€ããããšãã§ããŸããåé€åŸãé
åå
ã®èŠçŽ ã¯è©°ããããã€ã³ããã¯ã¹ãåé
眮ãããŸãã
* '''èŠçŽ ã®æ€çŽ¢:''' æå®ãããå€ãæã€èŠçŽ ãæ€çŽ¢ããããšãã§ããŸããç·åœ¢æ¢çŽ¢ãäºåæ¢çŽ¢ãªã©ã®ã¢ã«ãŽãªãºã ã䜿çšããŠæ€çŽ¢ãè¡ããŸãã
ãããã®æäœã¯ãé
åå
ã®èŠçŽ ã®é
眮ããµã€ãºã®å€æŽã«é¢ãããããå¹ççãªå®è£
ãæ±ããããŸãã
=== é
åã䜿ã£ãæŒç¿åé¡ ===
é
åã䜿ã£ãæŒç¿åé¡ã§ã¯ã以äžã®ãããªèª²é¡ãäžããããããšããããŸãã
# é
åå
ã®èŠçŽ ã®åèšãå¹³åãèšç®ããããã°ã©ã ãäœæããã
# é
åå
ã®ç¹å®ã®å€ãæã€èŠçŽ ã®æ°ãæ°ããããã°ã©ã ãäœæããã
# é
åå
ã®èŠçŽ ããœãŒãããããã°ã©ã ãäœæããã
# äºã€ã®é
åãããŒãžããŠæ°ããé
åãäœæããããã°ã©ã ãäœæããã
ãããã®æŒç¿åé¡ãéããŠãé
åã®æäœãã¢ã«ãŽãªãºã ã®ç解ãæ·±ããããšãã§ããŸãã
== é£çµãªã¹ã (Linked List) ==
é£çµãªã¹ãã¯ãããã°ã©ãã³ã°ã«ãããŠéèŠãªããŒã¿æ§é ã®äžã€ã§ãããèŠçŽ ããã€ã³ã¿ã«ãã£ãŠãªã³ã¯ãããããŒãããæ§æãããŸãããã®ç« ã§ã¯ãé£çµãªã¹ãã®æŠèŠãšç¹æ§ãåæ¹åé£çµãªã¹ããšåæ¹åé£çµãªã¹ããé£çµãªã¹ãã®æäœããããŠé£çµãªã¹ãã䜿ã£ãæŒç¿åé¡ã«ã€ããŠæ¢æ±ããŸãã
{{Main|ãªã¹ãæ§é }}
=== é£çµãªã¹ãã®æŠèŠãšç¹æ§ ===
é£çµãªã¹ãã¯ãèŠçŽ ïŒããŒãïŒããã€ã³ã¿ã«ãã£ãŠãªã³ã¯ãããããŒã¿æ§é ã§ããåããŒãã¯ãããŒã¿ãšæ¬¡ã®ããŒããžã®ãã€ã³ã¿ïŒãŸãã¯åç
§ïŒãæã¡ãŸããé£çµãªã¹ãã®ç¹æ§ã«ã¯ä»¥äžã®ãããªãã®ããããŸãã
* '''åçãªãµã€ãº:''' ãªã¹ãã®ãµã€ãºã¯å®è¡æã«å€æŽã§ããŸãã
* '''æ¿å
¥ãšåé€ã®å¹çæ§:''' èŠçŽ ã®æ¿å
¥ãšåé€ã容æã§ãããããŒã¿ã®ç§»åãäžèŠã§ãã
* '''ã¡ã¢ãªäœ¿çšé:''' ãã€ã³ã¿ã®è¿œå ã«ãããã¡ã¢ãªäœ¿çšéãå€ããªãå ŽåããããŸãã
é£çµãªã¹ãã¯ãèŠçŽ ã®è¿œå ãåé€ãé »ç¹ã«çºçããå Žåããéçãªã¡ã¢ãªç®¡çãå°é£ãªå Žåã«é©ããŠããŸãã
=== åæ¹åé£çµãªã¹ããšåæ¹åé£çµãªã¹ã ===
é£çµãªã¹ãã«ã¯ãåæ¹åé£çµãªã¹ããšåæ¹åé£çµãªã¹ãã®äºã€ã®äž»èŠãªã¿ã€ãããããŸãã
* '''åæ¹åé£çµãªã¹ã:''' åããŒãã次ã®ããŒããžã®ãã€ã³ã¿ã®ã¿ãæã€ãªã¹ãã§ããèŠçŽ ã®è¿œå ãšåé€ã¯ã次ã®ããŒããžã®ãã€ã³ã¿ã®å€æŽã«ãã£ãŠè¡ãããŸãã
* '''åæ¹åé£çµãªã¹ã:''' åããŒãã次ã®ããŒããšåã®ããŒããžã®ãã€ã³ã¿ãæã€ãªã¹ãã§ããèŠçŽ ã®è¿œå ãåé€ãããå¹ççã«è¡ããŸãããã¡ã¢ãªäœ¿çšéãå¢å ããŸãã
ã©ã¡ãã®ã¿ã€ãããç¹å®ã®èŠä»¶ã䜿çšã±ãŒã¹ã«å¿ããŠéžæãããŸãã
=== é£çµãªã¹ãã®æäœ (èŠçŽ ã®æ¿å
¥ãåé€ãæ€çŽ¢ãªã©) ===
é£çµãªã¹ãã®äž»ãªæäœã«ã¯ãèŠçŽ ã®æ¿å
¥ãåé€ãæ€çŽ¢ãªã©ãå«ãŸããŸãã
* '''èŠçŽ ã®æ¿å
¥:''' æ°ããããŒãããªã¹ãå
ã®ç¹å®ã®äœçœ®ã«æ¿å
¥ããŸããæ¿å
¥æäœã¯ãæå®ãããäœçœ®ã®ååŸã®ããŒããžã®ãã€ã³ã¿ãæŽæ°ããããšã«ãã£ãŠè¡ãããŸãã
* '''èŠçŽ ã®åé€:''' ç¹å®ã®äœçœ®ã®ããŒãããªã¹ãããåé€ããŸããåé€æäœã¯ãåé€ãããããŒããžã®ãã€ã³ã¿ãã¹ãããããããšã«ãã£ãŠè¡ãããŸãã
* '''èŠçŽ ã®æ€çŽ¢:''' ç¹å®ã®å€ãæã€ããŒãããªã¹ãå
ã§æ€çŽ¢ããŸããç·åœ¢æ¢çŽ¢ãªã©ã®ã¢ã«ãŽãªãºã ã䜿çšããŠæ€çŽ¢ãè¡ããŸãã
ãããã®æäœã¯ãé£çµãªã¹ãã®åºæ¬çãªæ©èœã§ãããå¹ççãªå®è£
ãæ±ããããŸãã
=== é£çµãªã¹ãã䜿ã£ãæŒç¿åé¡ ===
é£çµãªã¹ãã䜿ã£ãæŒç¿åé¡ã§ã¯ã以äžã®ãããªèª²é¡ãäžããããããšããããŸãã
# é£çµãªã¹ãå
ã®èŠçŽ ãéé ã«ããããã°ã©ã ãäœæããã
# é£çµãªã¹ãå
ã®éè€èŠçŽ ãåé€ããããã°ã©ã ãäœæããã
# äºã€ã®é£çµãªã¹ããããŒãžããŠæ°ããé£çµãªã¹ããäœæããããã°ã©ã ãäœæããã
# é£çµãªã¹ãå
ã®äžå€®ã®èŠçŽ ãèŠã€ããããã°ã©ã ãäœæããã
ãããã®æŒç¿åé¡ãéããŠãé£çµãªã¹ãã®æäœãã¢ã«ãŽãªãºã ã®ç解ãæ·±ããããšãã§ããŸãã
== ã¹ã¿ã㯠(Stack) ==
ã¹ã¿ãã¯ã¯ãããŒã¿ãåŸå
¥ãå
åºãïŒLIFO: Last In, First OutïŒã®ååã«åºã¥ããŠç®¡çããããŒã¿æ§é ã§ãããã®ç« ã§ã¯ãã¹ã¿ãã¯ã®æŠèŠãšç¹æ§ãã¹ã¿ãã¯ã®å®è£
ãšæäœïŒpushãpopãpeekãªã©ïŒããããŠã¹ã¿ãã¯ã䜿ã£ãæŒç¿åé¡ã«ã€ããŠè§£èª¬ããŸãã
{{Main|ã¹ã¿ãã¯æ§é }}
=== ã¹ã¿ãã¯ã®æŠèŠãšç¹æ§ ===
ã¹ã¿ãã¯ã¯ãäžè¬çã«ç®±ãå±±ãšæ¯å©ãããæ°ããèŠçŽ ãåžžã«æäžéšã«è¿œå ãããèŠçŽ ã®åé€ãæäžéšããè¡ãããŸããã¹ã¿ãã¯ã®ç¹æ§ã¯æ¬¡ã®éãã§ãïŒ
* '''åŸå
¥ãå
åºãïŒLIFOïŒ:''' æåŸã«è¿œå ãããèŠçŽ ãæåã«åãåºãããŸãã
* '''éãããã¢ã¯ã»ã¹:''' ã¹ã¿ãã¯ã®äžéšã®èŠçŽ ããã¢ã¯ã»ã¹ã§ããŸããã
* '''é«éãªè¿œå ãšåé€:''' èŠçŽ ã®è¿œå ãšåé€ã¯åžžã«äžå®ã®æéã§è¡ãããŸãã
ã¹ã¿ãã¯ã¯ãããã°ã©ã ã®é¢æ°ã®åŒã³åºããåŒã®è©äŸ¡ãããã¯ãã©ããã³ã°ãªã©ãããŸããŸãªã¢ããªã±ãŒã·ã§ã³ã§äœ¿çšãããŸãã
=== ã¹ã¿ãã¯ã®å®è£
ãšæäœ (pushãpopãpeekãªã©) ===
ã¹ã¿ãã¯ã¯ãé
åãŸãã¯é£çµãªã¹ãã䜿çšããŠå®è£
ããããšãã§ããŸããäž»ãªæäœã¯æ¬¡ã®éãã§ãïŒ
* '''push:''' ã¹ã¿ãã¯ã®ãããã«æ°ããèŠçŽ ãè¿œå ããŸãã
* '''pop:''' ã¹ã¿ãã¯ã®ãããããèŠçŽ ãåé€ããŠè¿ããŸãã
* '''peek:''' ã¹ã¿ãã¯ã®ãããã«ããèŠçŽ ãåç
§ããŸãããåé€ã¯è¡ããŸããã
ãããã®æäœã¯ãã¹ã¿ãã¯ã®åºæ¬çãªæ©èœãæäŸããèŠçŽ ã®è¿œå ãåé€ãå¹ççã«è¡ãããšãã§ããŸãã
=== ã¹ã¿ãã¯ã䜿ã£ãæŒç¿åé¡ ===
ã¹ã¿ãã¯ã䜿ã£ãæŒç¿åé¡ã¯ã以äžã®ãããªãã®ããããŸãïŒ
# ã¹ã¿ãã¯ã䜿çšããŠéããŒã©ã³ãèšæ³åŒïŒåŸçœ®èšæ³ïŒãèšç®ããããã°ã©ã ãå®è£
ããã
# ã¹ã¿ãã¯ã䜿çšããŠæ¬åŒ§ã®å¯Ÿå¿ããã§ãã¯ããããã°ã©ã ãäœæããã
# ã¹ã¿ãã¯ã䜿çšããŠæååãéé ã«ããããã°ã©ã ãå®è£
ããã
# ã¹ã¿ãã¯ã䜿çšããŠããã¯ãã©ããã³ã°ã¢ã«ãŽãªãºã ãå®è£
ããåé¡ã®è§£ãæ¢çŽ¢ããããã°ã©ã ãäœæããã
ãããã®æŒç¿åé¡ã¯ãã¹ã¿ãã¯ã䜿ã£ãã¢ã«ãŽãªãºã ãåé¡è§£æ±ºèœåãåäžãããã®ã«åœ¹ç«ã¡ãŸãã
== ãã¥ãŒ (Queue) ==
ãã¥ãŒã¯ãããŒã¿ãå
å
¥ãå
åºãïŒFIFO: First In, First OutïŒã®ååã«åºã¥ããŠç®¡çããããŒã¿æ§é ã§ãããã®ç« ã§ã¯ããã¥ãŒã®æŠèŠãšç¹æ§ããã¥ãŒã®å®è£
ãšæäœïŒenqueueãdequeueãpeekãªã©ïŒããããŠãã¥ãŒã䜿ã£ãæŒç¿åé¡ã«ã€ããŠè§£èª¬ããŸãã
{{Main|ãã¥ãŒ}}
=== ãã¥ãŒã®æŠèŠãšç¹æ§ ===
ãã¥ãŒã¯ãåãåŸ
ã¡è¡åãšæ¯å©ãããæ°ããèŠçŽ ãåžžã«æ«å°Ÿã«è¿œå ãããèŠçŽ ã®åé€ãå
é ããè¡ãããŸãããã¥ãŒã®ç¹æ§ã¯æ¬¡ã®éãã§ãïŒ
* '''å
å
¥ãå
åºãïŒFIFOïŒ:''' æåã«è¿œå ãããèŠçŽ ãæåã«åãåºãããŸãã
* '''éãããã¢ã¯ã»ã¹:''' ãã¥ãŒã®å
é ãšæ«å°Ÿã®èŠçŽ ããã¢ã¯ã»ã¹ã§ããŸããã
* '''é«éãªè¿œå ãšåé€:''' èŠçŽ ã®è¿œå ãšåé€ã¯åžžã«äžå®ã®æéã§è¡ãããŸãã
ãã¥ãŒã¯ãã¿ã¹ã¯ã®åŠçããªãœãŒã¹ã®ç®¡çãã€ãã³ãåŸ
ã¡è¡åãªã©ãé çªãç¶æããå¿
èŠãããå Žé¢ã§äœ¿çšãããŸãã
=== ãã¥ãŒã®å®è£
ãšæäœ (enqueueãdequeueãpeekãªã©) ===
ãã¥ãŒã¯ãé
åãŸãã¯é£çµãªã¹ãã䜿çšããŠå®è£
ããããšãã§ããŸããäž»ãªæäœã¯æ¬¡ã®éãã§ãïŒ
* '''enqueue:''' ãã¥ãŒã®æ«å°Ÿã«æ°ããèŠçŽ ãè¿œå ããŸãã
* '''dequeue:''' ãã¥ãŒã®å
é ããèŠçŽ ãåé€ããŠè¿ããŸãã
* '''peek:''' ãã¥ãŒã®å
é ã«ããèŠçŽ ãåç
§ããŸãããåé€ã¯è¡ããŸããã
ãããã®æäœã¯ããã¥ãŒã®åºæ¬çãªæ©èœãæäŸããèŠçŽ ã®è¿œå ãåé€ãå¹ççã«è¡ãããšãã§ããŸãã
=== ãã¥ãŒã䜿ã£ãæŒç¿åé¡ ===
ãã¥ãŒã䜿ã£ãæŒç¿åé¡ã¯ã以äžã®ãããªãã®ããããŸãïŒ
# ãã¥ãŒã䜿çšããŠåŸ
ã¡è¡åã®ã·ãã¥ã¬ãŒã·ã§ã³ãè¡ãããã°ã©ã ãå®è£
ããã
# ãã¥ãŒã䜿çšããŠãããã¡ãŒã®ç®¡çãè¡ãããã°ã©ã ãäœæããã
# ãã¥ãŒã䜿çšããŠãã©ãã£ãã¯ã®ã·ãã¥ã¬ãŒã·ã§ã³ãè¡ããåŸ
ã¡æéãåŠçæéãèšç®ããããã°ã©ã ãå®è£
ããã
# ãã¥ãŒã䜿çšããŠè€æ°ã®ãžã§ããåŠçããã¹ã±ãžã¥ãŒã©ãŒãå®è£
ããã
ãããã®æŒç¿åé¡ã¯ããã¥ãŒã䜿ã£ãã¢ã«ãŽãªãºã ãåé¡è§£æ±ºèœåãåäžãããã®ã«åœ¹ç«ã¡ãŸãã
== ããªãŒ (Tree) ==
===ããªãŒã®æŠèŠãšç¹æ§===
ããªãŒã¯ãéå±€æ§é ãæã€ããŒã¿æ§é ã§ããã1ã€ã®æ ¹ïŒã«ãŒãïŒããŒãããå§ãŸããè€æ°ã®åïŒãŸãã¯åå«ïŒããŒããæã€ããšãã§ããŸãã
{{Main|ããªãŒæ§é }}
ããªãŒã®ç¹æ§ã¯ä»¥äžã®éãã§ãïŒ
* '''éå±€æ§é :''' ããªãŒã¯éå±€çãªæ§é ãæã¡ãæ ¹ããŒãããå§ãŸãäžé£ã®éå±€ããããŸãã
* '''芪åé¢ä¿:''' åããŒãã¯1ã€ã®èŠªããŒããšè€æ°ã®åããŒããæã€ããšãã§ããŸãã
* '''æåã°ã©ã:''' ããªãŒã¯ãæåéå·¡åã°ã©ãïŒDAGïŒã®äžçš®ã§ãããããŒãéã®é¢ä¿ãæ¹åæ§ãæã¡ãŸãã
===äºåæš (Binary Tree) ãšãã®æŽŸç圢æ
===
äºåæšã¯ãåããŒããæ倧2ã€ã®åããŒããæã€ããªãŒæ§é ã§ããäºåæšã«ã¯ã以äžã®ãããªæŽŸç圢æ
ããããŸãïŒ
* '''äºåæ¢çŽ¢æš (Binary Search Tree, BST):''' å·Šã®ãµãããªãŒã®ãã¹ãŠã®ããŒãã®å€ãã芪ããŒãã®å€ããå°ãããå³ã®ãµãããªãŒã®ãã¹ãŠã®ããŒãã®å€ã芪ããŒãã®å€ãã倧ããäºåæšã§ãã
* '''AVLæš:''' ãã©ã³ã¹ãåããäºåæšã§ãããåããŒãã®ãµãããªãŒã®é«ãã®å·®ã1以äžã§ããæšã§ãã
* '''èµ€é»æš (Red-Black Tree):''' äºåæ¢çŽ¢æšã®äžçš®ã§ããããã©ã³ã¹ãåããç¶æ
ãç¶æããããã«è²ä»ãã®ããŒãã䜿çšããæšã§ãã
===ããªãŒã®æäœ (æ¿å
¥ãåé€ãæ€çŽ¢ãªã©)===
ããªãŒã®äž»ãªæäœã«ã¯ä»¥äžãå«ãŸããŸãïŒ
* '''æ¿å
¥:''' æ°ããèŠçŽ ãããªãŒã«æ¿å
¥ããŸããæ¿å
¥æäœã¯ãé©åãªäœçœ®ãèŠã€ããŠããŒããè¿œå ããããšã§è¡ãããŸãã
* '''åé€:''' ããªãŒããæå®ãããèŠçŽ ãåé€ããŸããåé€æäœã¯ãåé€ããããŒãã®äœçœ®ã«å¿ããŠç°ãªãæ¹æ³ã§è¡ãããŸãã
* '''æ€çŽ¢:''' æå®ãããå€ãæã€ããŒããããªãŒå
ã§æ€çŽ¢ããŸããäºåæ¢çŽ¢æšã§ã¯ãæ€çŽ¢æäœãç¹ã«å¹ççã«è¡ãããŸãã
===ããªãŒã䜿ã£ãæŒç¿åé¡===
ããªãŒã䜿ã£ãæŒç¿åé¡ã¯ã以äžã®ãããªãã®ããããŸãïŒ
# äºåæ¢çŽ¢æšã䜿çšããŠãç¹å®ã®å€ãæ¢ãããã°ã©ã ãå®è£
ããã
# ããªãŒã®é«ããèšç®ããããã°ã©ã ãäœæããã
# AVLæšã®æ¿å
¥æäœãå®è£
ãããã©ã³ã¹ãç¶æããããã°ã©ã ãäœæããã
# èµ€é»æšã䜿çšããŠãããŒã¿ã®æ¿å
¥ãšåé€ãè¡ãããã°ã©ã ãå®è£
ããã
ãããã®æŒç¿åé¡ã¯ãããªãŒæ§é ã®ç解ãšã¢ã«ãŽãªãºã ã®å®è£
èœåãåäžãããã®ã«åœ¹ç«ã¡ãŸãã
== ã°ã©ã (Graph) ==
=== ã°ã©ãã®æŠèŠãšç¹æ§ ===
ã°ã©ãã¯ãé ç¹ïŒããŒãïŒãšããããæ¥ç¶ãã蟺ïŒãšããžïŒããæ§æãããããŒãéã®é¢ä¿ãè¡šçŸããããŒã¿æ§é ã§ãã
{{Main|ã°ã©ãæ§é }}
ã°ã©ãã®ç¹æ§ã¯ä»¥äžã®éãã§ãïŒ
* '''ããŒããšãšããž:''' ã°ã©ãã¯ãããŒãïŒé ç¹ïŒãšãšããžïŒèŸºïŒã®ãã¢ããæ§æãããŸãã
* '''æåæ§:''' ã°ã©ãã¯ããšããžã«åããããæåã°ã©ããšãåãããªãç¡åã°ã©ãã®äºã€ã®ã¿ã€ãããããŸãã
* '''é£çµæ§:''' ã°ã©ãå
ã®é ç¹éã«ãã¹ãååšããå Žåãã°ã©ãã¯é£çµããŠããŸãã
=== æåã°ã©ããšç¡åã°ã©ã ===
* '''æåã°ã©ã:''' ãšããžã«åãããããããŒãéã®é¢ä¿ãæ¹åæ§ãæã€ã°ã©ãã§ããæåã°ã©ãã®ãšããžã¯ãå§ç¹ãšçµç¹ãæã¡ãŸãã
* '''ç¡åã°ã©ã:''' ãšããžã«åãããªããããŒãéã®é¢ä¿ãåæ¹åæ§ãæã€ã°ã©ãã§ããç¡åã°ã©ãã®ãšããžã¯ãå§ç¹ãšçµç¹ã®åºå¥ããããŸããã
=== ã°ã©ãã®è¡šçŸæ¹æ³ (é£æ¥è¡åãé£æ¥ãªã¹ããªã©) ===
* '''é£æ¥è¡å:''' ã°ã©ãã®æ¥ç¶é¢ä¿ãè¡åã§è¡šçŸããæ¹æ³ã§ãããè¡åã®èŠçŽ ã¯ããŒãéã®æ¥ç¶é¢ä¿ã瀺ããŸãã
* '''é£æ¥ãªã¹ã:''' ã°ã©ãã®æ¥ç¶é¢ä¿ããªã¹ãã§è¡šçŸããæ¹æ³ã§ãããåããŒãããšã«æ¥ç¶ãããããŒãã®ãªã¹ããæ ŒçŽãããŸãã
=== ã°ã©ãæ¢çŽ¢ã¢ã«ãŽãªãºã (æ·±ãåªå
æ¢çŽ¢ãå¹
åªå
æ¢çŽ¢) ===
* '''æ·±ãåªå
æ¢çŽ¢ (Depth-First Search, DFS):''' ã°ã©ãå
ã®åé ç¹ãæ·±ãæ¹åã«æ¢çŽ¢ããç®çã®ããŒããèŠã€ãããŸã§é²ãã¢ã«ãŽãªãºã ã§ãã
* '''å¹
åªå
æ¢çŽ¢ (Breadth-First Search, BFS):''' ã°ã©ãå
ã®åé ç¹ãé£æ¥ããé ç¹ããæ¢çŽ¢ããç®çã®ããŒããèŠã€ãããŸã§å±€ããšã«é²ãã¢ã«ãŽãªãºã ã§ãã
===ã°ã©ãã䜿ã£ãæŒç¿åé¡===
ã°ã©ãã䜿ã£ãæŒç¿åé¡ã¯ã以äžã®ãããªãã®ããããŸãïŒ
#ã°ã©ãå
ã®æççµè·¯ãèŠã€ããããã°ã©ã ãå®è£
ããã
#ã°ã©ãå
ã®ãµã€ã¯ã«ãæ€åºããããã°ã©ã ãäœæããã
#ã°ã©ãå
ã®é£çµæåãèŠã€ããããã°ã©ã ãå®è£
ããã
#ã°ã©ãå
ã®ããããžã«ã«ãœãŒããè¡ãããã°ã©ã ãäœæããã
ãããã®æŒç¿åé¡ã¯ãã°ã©ãæ§é ã®ç解ãšã¢ã«ãŽãªãºã ã®å®è£
èœåãåäžãããã®ã«åœ¹ç«ã¡ãŸãã
== é«åºŠãªããŒã¿æ§é ãšå¿çš ==
=== ããã·ã¥ããŒãã« (Hash Table) ã®æŠèŠãšç¹æ§ ===
ããã·ã¥ããŒãã«ã¯ãããŒãšå€ã®ãã¢ãæ ŒçŽããé«éãªããŒã¿ã®æ€çŽ¢ãæ¿å
¥ãåé€ãæäŸããããŒã¿æ§é ã§ããããã·ã¥ããŒãã«ã®ç¹æ§ã¯ä»¥äžã®éãã§ãïŒ
* '''ããã·ã¥é¢æ°:''' ããŒããäžæã®ããã·ã¥å€ãèšç®ãããã®å€ãå
ã«é
åã«ããŒã¿ãæ ŒçŽããŸãã
* '''é«éãªæäœ:''' æ£ããããã·ã¥é¢æ°ã䜿çšããå Žåãããã·ã¥ããŒãã«ã¯å¹³åçã«å®æ°æéã§ã®æäœãæäŸããŸãã
* '''è¡çªåŠç:''' ç°ãªãããŒãåãããã·ã¥å€ãçæããå Žåãè¡çªãçºçããè¡çªã解決ããæ¹æ³ãå¿
èŠã§ãã
=== åªå
床ä»ããã¥ãŒ (Priority Queue) ã®æŠèŠãšç¹æ§ ===
åªå
床ä»ããã¥ãŒã¯ãèŠçŽ ã«åªå
床ãä»äžããããã¥ãŒã§ãããåªå
床ã®é«ãèŠçŽ ãåãåºãããŸããåªå
床ä»ããã¥ãŒã®ç¹æ§ã¯ä»¥äžã®éãã§ãïŒ
* '''åªå
床ã®ä»äž:''' åèŠçŽ ã¯åªå
床ãæã¡ãåªå
床ãé«ãèŠçŽ ãåªå
çã«åãåºãããŸãã
* '''æ¿å
¥ãšåé€:''' èŠçŽ ã®æ¿å
¥ãšåé€ã¯ãåªå
床ã«åºã¥ããŠè¡ãããŸãã
* '''å¿çš:''' ã°ã©ãã¢ã«ãŽãªãºã ïŒãã€ã¯ã¹ãã©æ³ãããªã æ³ãªã©ïŒãªã©ãããŸããŸãªã¢ã«ãŽãªãºã ã§äœ¿çšãããŸãã
=== 平衡äºåæš (Balanced Binary Tree)ãèµ€é»æš (Red-Black Tree) ãªã©ã®é«åºŠãªããŒã¿æ§é ===
平衡äºåæšãèµ€é»æšãªã©ã®é«åºŠãªããŒã¿æ§é ã¯ãå¹ççãªæäœãæäŸããããã«æšã®ãã©ã³ã¹ãä¿æããæ¹æ³ãå®è£
ããŸãããããã®ç¹æ§ã¯ä»¥äžã®éãã§ãïŒ
* '''ãã©ã³ã¹ã®ç¶æ:''' åããŒãã®ãµãããªãŒã®é«ãã®å·®ã1以äžã«ãªãããã«èª¿æŽãããŸãã
* '''é«éãªæäœ:''' 平衡ãç¶æããããããæäœïŒæ¿å
¥ãåé€ãæ€çŽ¢ïŒã®å¹³åæéã察æ°æéã§æžã¿ãŸãã
* '''èµ€é»æšã®ç¹æ§:''' èµ€é»æšã¯ã平衡ãä¿æããªããè¿œå ã®èŠçŽ ãæ¿å
¥ããããã®ã¢ã«ãŽãªãºã ãå®è£
ããããã«äœ¿çšãããŸãã
=== ããŒã¿æ§é ã䜿ã£ãå¿çšäŸãšãããžã§ã¯ã ===
ããŒã¿æ§é ã䜿ã£ãå¿çšäŸããããžã§ã¯ãã¯ä»¥äžã®ããã«ãªããŸãïŒ
* '''ãããã¯ãŒã¯ã«ãŒãã£ã³ã°:''' ããã·ã¥ããŒãã«ã䜿çšããŠã«ãŒãã£ã³ã°ããŒãã«ã管çããŸãã
* '''ã¿ã¹ã¯ã¹ã±ãžã¥ãŒãªã³ã°:''' åªå
床ä»ããã¥ãŒã䜿çšããŠã¿ã¹ã¯ãåªå
é äœã«åºã¥ããŠã¹ã±ãžã¥ãŒãªã³ã°ããŸãã
* '''ããŒã¿ããŒã¹ã€ã³ããã¯ã¹:''' 平衡äºåæšã䜿çšããŠããŒã¿ããŒã¹ã®ã€ã³ããã¯ã¹ã管çããé«éãªæ€çŽ¢ãå®çŸããŸãã
* '''ã³ã³ãã€ã©ã®æ§æ解æ:''' èµ€é»æšã䜿çšããŠæ§ææšãæ§ç¯ããã³ã³ãã€ã©ãææ³ãšã©ãŒãæ€åºããã®ã«åœ¹ç«ã¡ãŸãã
ãããã®å¿çšäŸããããžã§ã¯ãã¯ãããŒã¿æ§é ã®ç解ãšå®è£
èœåãåäžãããã®ã«åœ¹ç«ã¡ãŸãã
== ã¢ã«ãŽãªãºã ãšããŒã¿æ§é ã®çµ±å ==
=== ã¢ã«ãŽãªãºã ãšããŒã¿æ§é ã®çžäºé¢ä¿ ===
ã¢ã«ãŽãªãºã ãšããŒã¿æ§é ã¯ãå¯æ¥ã«é¢é£ããŠãããå¹ççãªåé¡è§£æ±ºã«ãããŠã¯äºãã«è£å®ããããŸãã
* '''ããŒã¿æ§é ã®éžæ:''' åé¡ã®æ§è³ªã«åãããŠé©åãªããŒã¿æ§é ãéžæããããšãéèŠã§ããäŸãã°ãæ€çŽ¢ãæ¿å
¥ãé »ç¹ã«è¡ãããå Žåã«ã¯ãããã·ã¥ããŒãã«ãäºåæ¢çŽ¢æšãæå¹ã§ãã
* '''ã¢ã«ãŽãªãºã ã®é©çš:''' éžæããããŒã¿æ§é ã«å¯ŸããŠå¹ççãªã¢ã«ãŽãªãºã ãé©çšããããšã§ãåé¡ã®è§£æ±ºãããå¹ççã«è¡ãããšãã§ããŸããäŸãã°ãã°ã©ãã®æççµè·¯æ¢çŽ¢ã«ã¯ãã€ã¯ã¹ãã©æ³ãå¹
åªå
æ¢çŽ¢ãé©çšããŸãã
=== åé¡è§£æ±ºã«ãããããŒã¿æ§é ã®éžæãšæŽ»çš ===
åé¡è§£æ±ºã«ãããŠã¯ãããŒã¿æ§é ã®éžæãšãã®æŽ»çšãéèŠã§ãã
* '''åé¡ã®æ§è³ªã®ç解:''' åé¡ã®æ§è³ªãå¶çŽãç解ããããã«å¿ããŠæé©ãªããŒã¿æ§é ãéžæããŸããäŸãã°ãããŒã¿ã®æ¿å
¥ãåé€ãé »ç¹ã«è¡ãããå Žåã«ã¯ã平衡äºåæšã䜿çšããããšãé©åã§ãã
* '''å¹ççãªæäœã®å®çŸ:''' éžæããããŒã¿æ§é ãå¹ççã«æäœããããšã§ãåé¡ãå¹ççã«è§£æ±ºããããšãã§ããŸããäŸãã°ãããã·ã¥ããŒãã«ã䜿çšããŠé«éãªããŒã¿ã®æ€çŽ¢ãå®çŸããŸãã
== ããè€éãªã¢ã«ãŽãªãºã ãšããŒã¿æ§é ã®å¿çšäºäŸ ==
=== å¿çšãããžã§ã¯ããšæŒç¿ ===
è€éãªã¢ã«ãŽãªãºã ãšããŒã¿æ§é ãçµã¿åãããå¿çšãããžã§ã¯ããæŒç¿ã¯ãå®è·µçãªã¹ãã«ãåäžãããŸãã
ã°ã©ãã¢ã«ãŽãªãºã ã®å®è£
: ã°ã©ãã®æé©çµè·¯æ¢çŽ¢ãæå°å
šåæšã®æ§ç¯ãªã©ãè€éãªã¢ã«ãŽãªãºã ã䜿çšãããããžã§ã¯ããå®è£
ããŸãã
* '''倧èŠæš¡ããŒã¿ã®åŠç:''' ããã·ã¥ããŒãã«ãåªå
床ä»ããã¥ãŒã䜿çšããŠã倧èŠæš¡ããŒã¿ã»ããã®åŠçãåæãè¡ããããžã§ã¯ããå®æœããŸãã
=== å®è·µçãªãããžã§ã¯ãã課é¡ãéããå¿çšåã®é€æ ===
å®è·µçãªãããžã§ã¯ãã課é¡ãéããŠãå¿çšåãé€æããŸãã
* '''åé¡è§£æ±ºåã®åäž:''' å®éã®åé¡ã«åãçµãããšã§ãã¢ã«ãŽãªãºã ãšããŒã¿æ§é ã®çµ±åãå®æããåé¡è§£æ±ºåãåäžãããŸãã
* '''å®è·µçãªçµéšã®ç²åŸ:''' å®éã®ãããžã§ã¯ãã課é¡ãéããŠãããŒã¿æ§é ãšã¢ã«ãŽãªãºã ã®å®è·µçãªæŽ»çšæ¹æ³ãåŠã³ãŸãã
=== ããŒã¿æ§é ãšã¢ã«ãŽãªãºã ã®å®è·µçãªæŽ»çšæ¹æ³ã®ç解 ===
ããŒã¿æ§é ãšã¢ã«ãŽãªãºã ã®å®è·µçãªæŽ»çšæ¹æ³ãç解ããããšã§ãåé¡è§£æ±ºèœåãé«ããŸãã
* '''å¹ççãªããã°ã©ãã³ã°:''' é©åãªããŒã¿æ§é ãšã¢ã«ãŽãªãºã ãéžæããå¹ççãªããã°ã©ãã³ã°ãå®çŸããŸãã
* '''ãªã¢ã«ã¯ãŒã«ãã®å¿çš:''' å®äžçã®åé¡ã«å¯ŸããŠãããŒã¿æ§é ãšã¢ã«ãŽãªãºã ãé©åã«é©çšããåé¡ã解決ããŸãã
ãããã®åãçµã¿ãéããŠãå®è·µçãªã¹ãã«ãšå¿çšåã磚ããŸãã
== é¢é£é
ç® ==
* [[ããŒã¿æ§é ãšã¢ã«ãŽãªãºã ]]
** [[ããŒã¿æ§é ãšã¢ã«ãŽãªãºã #ããŒã¿æ§é |ããŒã¿æ§é ]]
* [[ããŒã¿æ§é ]]
[[ã«ããŽãª:ããã°ã©ãã³ã°|ãŠããããããã]] | 2023-03-24T00:20:57Z | 2024-03-03T12:17:41Z | [] | https://ja.wikibooks.org/wiki/%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0/%E3%83%87%E3%83%BC%E3%82%BF%E6%A7%8B%E9%80%A0 |
37,360 | ããã°ã©ãã³ã°/Ruby ã§åŠã¶ãªããžã§ã¯ãæåããã°ã©ãã³ã° | ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã¯ãçŸä»£ã®ãœãããŠã§ã¢éçºã«ãããŠåºç€ãšãªãéèŠãªæŠå¿µã§ãã ãã®ã«ãªãã¥ã©ã ã¯ãRubyã䜿çšããååŠè
ããäžçŽè
ãŸã§ã®ããã°ã©ããŒã察象ã«ãã¯ã©ã¹ãã¢ãžã¥ãŒã«ãç¶æ¿ãªã©ã®åºæ¬çãªOOPååãããé«åºŠãªãããã¯ã¹åŠäœã«è³ããŸã§ãå
æ¬ããŠããŸãã å®è·µçãªæŒç¿ããããžã§ã¯ããéããŠãçè«ãå®éã®ã³ãŒãã£ã³ã°ã«çµã³ã€ããåŠç¿è
ãæè»ãã€å¹æçã«ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã®ã¹ãã«ã磚ãããšãç®æããŸãã
ããã°ã©ãã³ã°ãšã¯ãã³ã³ãã¥ãŒã¿ã«æ瀺ãäžããŠãããã¿ã¹ã¯ãèªåçã«å®è¡ãããããã®æ段ã§ããããã°ã©ã ãæžãããšã§ãã³ã³ãã¥ãŒã¿ãåçŽãªäœæ¥ãè¡ã£ãŠãããããã人éãããã¹ãã§ã¯ãªãç¹°ãè¿ãäœæ¥ãå¹çåããããšãã§ããŸãã
Rubyã¯ãæ¥æ¬äººã®æŸæ¬è¡åŒæ°ã«ãã£ãŠéçºãããããã°ã©ãã³ã°èšèªã§ããã·ã³ãã«ãªæ§æãè±å¯ãªæ©èœããããŠçŸããã³ãŒããæžããããç¹æ§ãããäžçäžã§åºãå©çšãããŠããŸãã
Rubyã®åºæ¬çãªããŒã¿åã«ã¯ä»¥äžãå«ãŸããŸã:
ãããã®åºæ¬çãªããŒã¿åãçµã¿åãããŠãè€éãªããŒã¿æ§é ãæ§ç¯ããããšãã§ããŸãã ãŸããRubyã¯åçåä»ãèšèªã§ãããå€æ°ã®åãæ瀺çã«å®£èšããå¿
èŠããªããããæè»ã§äœ¿ããããèšèªã§ãã
Rubyã®ããã°ã©ã ãå®è¡ããã«ã¯ãã¿ãŒããã«äžã§ãruby ãã¡ã€ã«å.rbããšããã³ãã³ããå®è¡ããŸããããã§ãããã¡ã€ã«å.rbãã«ã¯ãå®è¡ãããããã°ã©ã ã®ãã¡ã€ã«åãæå®ããŸãã
ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãšã¯ãããã°ã©ã ãããªããžã§ã¯ãããšåŒã°ããéšåã«åå²ãããããã®ãªããžã§ã¯ãå士ã®ãããšããéããŠããã°ã©ã ãäœæããææ³ã§ãããªããžã§ã¯ããšã¯ãããŒã¿ãšããã«é¢é£ããæäœãã«ãã»ã«åãããã®ã§ãããªããžã§ã¯ãæåããã°ã©ãã³ã°ã¯ãããã°ã©ã ã®åå©çšæ§ãã¡ã³ããã³ã¹æ§ãæ¡åŒµæ§ãé«ããããã«äœ¿çšãããŸãã
ã¯ã©ã¹ãšã¯ããªããžã§ã¯ããå®çŸ©ããããã®èšèšå³ã®ãããªãã®ã§ããã¯ã©ã¹ã«ã¯ããªããžã§ã¯ããæã€ã¹ãããŒã¿ãæäœãå®çŸ©ããããšãã§ããŸããäžæ¹ãã€ã³ã¹ã¿ã³ã¹ãšã¯ãã¯ã©ã¹ãå
ã«äœæãããå
·äœçãªãªããžã§ã¯ãã®ããšã§ãã
ã¡ãœãããšã¯ããªããžã§ã¯ããæã€æäœã®ããšã§ããã¯ã©ã¹ã«å®çŸ©ããã¡ãœããã¯ããã®ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãæã€æäœãšããŠå©çšããããšãã§ããŸãã
ç¶æ¿ãšã¯ãæ¢åã®ã¯ã©ã¹ãå
ã«ããŠãæ°ããã¯ã©ã¹ãäœæããææ³ã§ããç¶æ¿å
ã®ã¯ã©ã¹ã¯ãç¶æ¿å
ã®ã¯ã©ã¹ã«å®çŸ©ãããŠããããŒã¿ãæäœãåŒãç¶ãããšãã§ããŸããããã«ãããæ¢åã®ã¯ã©ã¹ãåºç€ãšããŠãããè€éãªã¯ã©ã¹ãäœæããããšãã§ããŸãã
Rubyã§ã¯ãã¯ã©ã¹ãå®çŸ©ããããã«ãclassããšããããŒã¯ãŒãã䜿çšããŸãããŸããã€ã³ã¹ã¿ã³ã¹ãäœæããããã«ã¯ããnewããšããã¡ãœããã䜿çšããŸãã以äžã¯ãã¯ã©ã¹ã®å®çŸ©ãšã€ã³ã¹ã¿ã³ã¹ã®äœæã®äŸã§ãã
Rubyã§ã¯ãã¡ãœãããå®çŸ©ããããã«ãdefããšããããŒã¯ãŒãã䜿çšããŸãããŸããã¡ãœãããåŒã³åºãããã«ã¯ããªããžã§ã¯ãã®ã€ã³ã¹ã¿ã³ã¹ã«å¯ŸããŠã.ãã䜿çšããŠåŒã³åºãããšãã§ããŸãã
Rubyã§ãç¶æ¿ã䜿çšããããšãã§ããŸããç¶æ¿å
ã®ã¯ã©ã¹ã«å®çŸ©ãããŠããããŒã¿ãæäœãåŒãç¶ãã äžã§ãæ°ããããŒã¿ãæäœãè¿œå ããããšãã§ããŸãã
Rubyã§ã¯ãã€ã³ã¹ã¿ã³ã¹å€æ°ãå€éšããã¢ã¯ã»ã¹ããããã®ã¢ã¯ã»ãµãç°¡åã«å®çŸ©ã§ããŸããã¢ã¯ã»ãµã䜿çšãããšãå€éšããã€ã³ã¹ã¿ã³ã¹å€æ°ã«ã¢ã¯ã»ã¹ããããã®getterã¡ãœãã(ååŸçšã®ã¡ãœãã)ãsetterã¡ãœãã(èšå®çšã®ã¡ãœãã)ãèªåçã«å®çŸ©ã§ããŸãã
ã¢ã¯ã»ãµãå®çŸ©ããæ¹æ³ã¯ã以äžã®éãã§ãã
ãã®ããã«ãattr_accessorã¡ãœããã䜿çšããŠã:nameãš:ageã®ã¢ã¯ã»ãµãå®çŸ©ããŠããŸããããã«ãããã€ã³ã¹ã¿ã³ã¹å€æ°ã«ã¢ã¯ã»ã¹ã§ããŸãã
attr_accessorã¡ãœããã¯ã:nameãš:ageã®ã¢ã¯ã»ãµãå®çŸ©ããã ãã§ã以äžã®2ã€ã®ã¡ãœãããèªåçã«å®çŸ©ããŸãã
åæ§ã«ã:ageã®ã¢ã¯ã»ãµã«å¯ŸããŠãèªåçã«getterã¡ãœãããšsetterã¡ãœãããå®çŸ©ãããŸãã
ãŸããattr_readerã¡ãœããã䜿çšãããšãgetterã¡ãœããã ããå®çŸ©ããããšãã§ããŸããéã«ãattr_writerã¡ãœããã䜿çšãããšãsetterã¡ãœããã ããå®çŸ©ããããšãã§ããŸãã
ãã®ããã«ã:nameã®getterã¡ãœãããš:ageã®setterã¡ãœãããå®çŸ©ããŠããŸããããã«ããã以äžã®ããã«ã€ã³ã¹ã¿ã³ã¹å€æ°ã«ã¢ã¯ã»ã¹ã§ããŸãã
Rubyã§ã¯ãã¢ãžã¥ãŒã«ã䜿çšããŠãå
±éã®æ©èœããŸãšããããšãã§ããŸããã¢ãžã¥ãŒã«ã¯ãã¯ã©ã¹ã®ããã«æäœãå®çŸ©ããããšãã§ããŸãããã€ã³ã¹ã¿ã³ã¹ãäœæããããšã¯ã§ããŸããã
Rubyã¯ãå€ãã®äŸ¿å©ãªããŒã¿æ§é ããµããŒãããŠããŸãã以äžã«ããã€ãã®ä»£è¡šçãªããŒã¿æ§é ã®å®è£
äŸã瀺ããŸãã
Rubyã®Array(é
å)ã¯ãè€æ°ã®èŠçŽ ãé åºä»ããŠæ ŒçŽããããŒã¿æ§é ã§ããé
åå
ã®èŠçŽ ã¯ã€ã³ããã¯ã¹ã«ãã£ãŠã¢ã¯ã»ã¹ããã0ããå§ãŸãæŽæ°ã®ã€ã³ããã¯ã¹ãå²ãåœãŠãããŸããRubyã®é
åã¯å¯å€é·ã§ãããç°ãªãããŒã¿åã®èŠçŽ ãå«ãããšãã§ããŸããé
åã¯äžæ¬åŒ§ [] ã䜿ã£ãŠäœæãããèŠçŽ ã¯ã«ã³ãã§åºåãããŸããäŸãã°ã[1, "apple", :symbol, [2, 3], true]ã®ããã«ãªããŸããé
åã¯ã€ãã¬ãŒã·ã§ã³ãæäœãæ€çŽ¢ãªã©å€ãã®æäœã«äŸ¿å©ã§ãããRubyã®ããã°ã©ãã³ã°ã§åºã䜿çšãããŸãã
Rubyã®é
å (Array) ã¯ãã¹ã¿ãã¯ããã¥ãŒã®æ©èœãæã£ãŠããŸãããããã§ã¯åºæ¬çãªãªãã©ã«ãšã€ã³ããã¯ã¹ã䜿ã£ãèŠçŽ åç
§ãšæäœäŸããã¹ãã±ãŒã¹ã§ç€ºããŸãã
ã¹ã¿ãã¯æ§é (Stack)ã¯ãããŒã¿ãäžæçã«ä¿åããããã®æœè±¡ããŒã¿åã®äžã€ã§ãããåŸå
¥ãå
åºã(Last-In, First-Out; LIFO)ã®åäœãæã¡ãŸããããã¯ãæåŸã«è¿œå ãããèŠçŽ ãæåã«åãåºããããšããæå³ã§ããã¹ã¿ãã¯ã¯ãç©ççãªã¹ã¿ãã¯ãå±±ã®ãããªã€ã¡ãŒãžã§èª¬æãããããšããããŸãã
ã¹ã¿ãã¯ã¯ã以äžã®ãããªåºæ¬çãªæäœãæã¡ãŸã:
ã¹ã¿ãã¯ã¯ãååž°çãªã¢ã«ãŽãªãºã ã®å®è£
ããããã¯ãã©ããã³ã°ãéããŒã©ã³ãèšæ³ãªã©ã®è¡šçŸæ¹æ³ã«äœ¿ãããããšããããŸãã
Rubyã®é
åã¯ã¹ã¿ãã¯ã®æ©èœãæã£ãŠããŠãpeek ã last ã®å¥åã«ããçšåºŠã§ã¹ã¿ãã¯ãå®è£
ã§ããŸãã
Ruby㯠Queue(ãã¥ãŒ)ãæšæºã©ã€ãã©ãªã«æã£ãŠããŸãããããã¯Thread safeãªé«åºŠãªå®è£
ã§ãããã·ã³ã°ã«ã¹ã¬ããã§äœ¿ããšç©ºã®ãã¥ãŒããdeqãããšãããããã¯æ€ç¥ã«æµè§Šãããªã©ãã¹ã¬ããééä¿¡ã«ç¹åããŠããŸãã
ãŸããRubyã®é
åã¯ãã¥ãŒã®æ©èœãæã£ãŠããŠãpeek ã first ã®å¥åã«ãããªã©ã§ãã¥ãŒãå®è£
ã§ããŸãã
Rubyã«ã¯ãæšæºã©ã€ãã©ãªã«é£çµãªã¹ã (Linked List)ã®å®è£
ã¯å«ãŸããŠããŸããããé
å(Array)ã¯æäŸãããŠããŸããé
åã¯ã€ã³ããã¯ã¹ã«ããã©ã³ãã ã¢ã¯ã»ã¹ãåçãªãµã€ãºå€æŽãå¯èœã§ãå€ãã®å Žåã§å¹ççãªããŒã¿æ§é ã§ãã
äžæ¹ã§ããªã³ã¯ãªã¹ãã¯ã¡ã¢ãªå
ã®é£ç¶ããé åã䜿çšããããã€ã³ã¿ãŒã«ãã£ãŠåèŠçŽ ã次ã®èŠçŽ ãæã瀺ã圢ã§ããŒã¿ãæ ŒçŽããŸããããã«ãããæ¿å
¥ãåé€ãªã©ã®æäœãå¹ççã«è¡ããŸãããã©ã³ãã ã¢ã¯ã»ã¹ãã§ããªããããèŠçŽ ãé ã«ãã©ãå¿
èŠããããŸãã
Rubyã§ãªã³ã¯ãªã¹ããå®è£
ããå Žåãç¬èªã®ã¯ã©ã¹ãå®çŸ©ããããããã®èŠçŽ ã次ã®èŠçŽ ãæããã€ã³ã¿ãŒãæã€ããã«ããããšãäžè¬çã§ãããã ããRubyã«ãããŠé
åãå€ãã®ã±ãŒã¹ã§ååã«å¹ççãªããŒã¿æ§é ã§ããããããªã³ã¯ãªã¹ããå®è£
ããå¿
èŠãããå Žåã¯ããã®äœ¿çšã±ãŒã¹ãç¹å®ã®æ¡ä»¶ãæºãããŠãããã©ãããæ€èšããããšãéèŠã§ãã
Rubyã®Hash(ããã·ã¥)ã¯ãããŒãšå€ã®ãã¢ãæ ŒçŽããããŒã¿æ§é ã§ããããŒãšå€ã¯é¢é£ä»ããããããŒã¯äžæã§éè€ããªãå¿
èŠããããŸããHashã¯ããã·ã¥ããŒãã«ãåºã«ããŠãããé«éãªããŒã¿ã®æ€çŽ¢ãååŸãå¯èœã§ããHashã¯äžæ¬åŒ§ {} ã䜿ã£ãŠäœæããããŒãšå€ã¯ ã㌠=> å€ ã®åœ¢åŒã§èšè¿°ããŸããäŸãã°ã{ key1 => value1, key2 => value2 } ã®ããã«ãªããŸããããŸããŸãªãªããžã§ã¯ããããŒãšããŠå©çšã§ããHashã¯Rubyããã°ã©ãã³ã°ã§é »ç¹ã«äœ¿çšãããŸãããŸãããŒãã·ã³ãã«(Symbol)ã®å Žå㯠{ :key1 => value1, :key2 => value2 } ã{ key1: value1, key2: value2 } ãšæžãçç¥èšæ³ããããŸãã
Rubyã«ã¯ãæšæºã©ã€ãã©ãªã«æšæ§é ã®å®è£
ã¯å«ãŸããŠããŸããããç¬èªã®ã¯ã©ã¹ãå®çŸ©ããŠæšæ§é ãå®è£
ããããšãã§ããŸãã
éåžžãæšæ§é ã¯ããŒããšåŒã°ãããªããžã§ã¯ãããæ§æãããåããŒãã¯ããŒã¿ãä¿æããä»ã®ããŒããžã®åç
§ãæã¡ãŸããæ ¹ããŒãããå§ãŸããããããã®ããŒããåããŒããæã€ããšããããŸããéåžžãæšæ§é ã¯ååž°çãªããŒã¿æ§é ã§ãããååž°çãªã¢ã«ãŽãªãºã ã䜿çšããŠæäœãããŸãã
ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã¯ãããã°ã©ãã³ã°ã®äžçš®ã§ããªããžã§ã¯ããšåŒã°ããããŒã¿æ§é ãšãããããæäœããã¡ãœãããäžå¿ã«æ§æãããŠããŸãããªããžã§ã¯ãã¯ãããèªäœãç¬èªã®ç¶æ
ãæã¡ãä»ã®ãªããžã§ã¯ããšçžäºäœçšããããšãã§ããŸãããã®ããã«ããªããžã§ã¯ãæåããã°ã©ãã³ã°ã¯ãè€éãªåé¡ãæ±ãããããä¿å®æ§ãšæ¡åŒµæ§ã«åªããã³ãŒããæžãããšãã§ããŸãã
ãã¶ã€ã³ãã¿ãŒã³ã¯ããªããžã§ã¯ãæåããã°ã©ãã³ã°ã«ãããåå©çšå¯èœãªãœãªã¥ãŒã·ã§ã³ã®ããšã§ãããã¶ã€ã³ãã¿ãŒã³ã¯ãå
±éã®åé¡ã«å¯Ÿãã解決çãæäŸããã³ãŒãã®åå©çšæ§ãä¿å®æ§ãæ¡åŒµæ§ãåäžãããŸãããã¶ã€ã³ãã¿ãŒã³ã¯ãäžè¬çãªã³ãŒãã£ã³ã°ã®ãã¹ããã©ã¯ãã£ã¹ãäœç³»åããæšæºåãããæ¹æ³ã§åé¡ã解決ããããã®æ çµã¿ãæäŸããããããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®éèŠãªæŠå¿µã§ãã
ãã¶ã€ã³ãã¿ãŒã³ã¯ãGoF(Gang of Four)ãå®çŸ©ãã23ã®ãã¿ãŒã³ãæãæåã§ãããããã®ãã¿ãŒã³ã¯ãããããç¹å®ã®åé¡ã解決ããããã«äœ¿çšãããŸããäŸãã°ãã·ã³ã°ã«ãã³ãã¿ãŒã³ã¯ãç¹å®ã®ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãå¿
èŠãªå Žåã«ã1ã€ã®ã€ã³ã¹ã¿ã³ã¹ããäœæããªãããã«ããããã«äœ¿çšãããŸãããã¡ã¯ããªãŒãã¿ãŒã³ã¯ãç°ãªãçš®é¡ã®ãªããžã§ã¯ããäœæããããã«äœ¿çšãããŸãããŸããã¹ãã©ããžãŒãã¿ãŒã³ã¯ãã¢ã«ãŽãªãºã ã®ãã¡ããªãŒãå®çŸ©ããããããã«ãã»ã«åããçžäºã«äº€æå¯èœã«ããããã«äœ¿çšãããŸãã
ãã¶ã€ã³ãã¿ãŒã³ã¯ããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®åºç€ã§ãããåå©çšå¯èœãªã³ãŒããæžãããã«éåžžã«éèŠã§ãããªããžã§ã¯ãæåããã°ã©ãã³ã°ãåŠã¶éã«ã¯ããã¶ã€ã³ãã¿ãŒã³ãäžç·ã«åŠã¶ããšããå§ãããŸãã
ãã¡ã¯ããªãŒã¡ãœãããã¿ãŒã³ã¯ãã€ã³ã¹ã¿ã³ã¹ã®çæãå°éã«è¡ãã¯ã©ã¹ãå®çŸ©ããããšã§ãè€éãªã€ã³ã¹ã¿ã³ã¹ã®çæåŠçãé èœãããã¿ãŒã³ã§ãã
ã·ã³ã°ã«ãã³ãã¿ãŒã³ã¯ãã€ã³ã¹ã¿ã³ã¹ã1ã€ã ãçæãããããå
±æãããã¿ãŒã³ã§ãã
äžèšã®ã³ãŒãã¯èª¬æã®ããã«å®è£
ã®çŽ°éšã瀺ããŸããããRubyã«ã¯ã·ã³ã°ã«ãã³ãå®è£
ããããã®ã¢ãžã¥ãŒã« Singleton ããããŸãã
Singleton ã¢ãžã¥ãŒã«ã¯ãã·ã³ã°ã«ãã³ãã¿ãŒã³ã®å®è£
ãæ¯æŽããããã®ãã®ã§ãããã¯ã©ã¹ã« include Singleton ãè¿œå ããããšã§ã·ã³ã°ã«ãã³ãã¿ãŒã³ãå©çšã§ããããã«ãªããŸããSingleton ã¢ãžã¥ãŒã«ã¯ã¯ã©ã¹ã¡ãœãã instance ãæäŸãããã®ã¡ãœãããåŒã³åºãããšã§å¯äžã®ã€ã³ã¹ã¿ã³ã¹ãååŸã§ããŸãããŸããclone ã dup ã¡ãœããããªãŒããŒã©ã€ããããŠãããããã«ããã·ã³ã°ã«ãã³ã€ã³ã¹ã¿ã³ã¹ã®ã¯ããŒã³ãè€è£œãé²ãããŠããŸãã
ãã®æ¬ã§ã¯ãRubyã䜿çšãããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®åºæ¬çãªæŠå¿µãšäœ¿ãæ¹ã«ã€ããŠåŠã³ãŸããããŸããå¿çšçãªäœ¿ãæ¹ãšããŠããã¡ã¯ããªãŒã¡ãœãããã¿ãŒã³ãã·ã³ã°ã«ãã³ãã¿ãŒã³ã«ã€ããŠã玹ä»ããŸããã
ãããã®æŠå¿µã䜿ãæ¹ã¯ãããã°ã©ãã³ã°ã«ãããŠéåžžã«éèŠãªãã®ã§ããããããã®ç解ãšç¿åŸã¯ãããã°ã©ãã³ã°ã¹ãã«ã®åäžã«ã€ãªãããŸãã
ç¹ã«ããªããžã§ã¯ãæåããã°ã©ãã³ã°ã¯ãè€éãªåŠçãæ±ãå Žåã«éåžžã«æçšã§ãããªããžã§ã¯ãæåããã°ã©ãã³ã°ã«ãã£ãŠãåŠçããªããžã§ã¯ãã«åå²ããããšã§ã倧èŠæš¡ãªããã°ã©ã ã®éçºã容æã«ãªããä¿å®æ§ãæ¡åŒµæ§ãåäžããŸãã
æ¬æžã§åŠãã å
容ãå®è·µçã«æŽ»çšãããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®ã¹ãã«ãåäžãããããšããå§ãããŸãããŸããæ¬æžãããã°ã©ãã³ã°ã®åå¿è
ã§ãç解ã§ããããã«é
æ
®ããŠå·çããŠããŸãã®ã§ãããã°ã©ãã³ã°ã®ååŠè
ã«ãæ¯éææŠããŠããã ããããšæããŸãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã¯ãçŸä»£ã®ãœãããŠã§ã¢éçºã«ãããŠåºç€ãšãªãéèŠãªæŠå¿µã§ãã ãã®ã«ãªãã¥ã©ã ã¯ãRubyã䜿çšããååŠè
ããäžçŽè
ãŸã§ã®ããã°ã©ããŒã察象ã«ãã¯ã©ã¹ãã¢ãžã¥ãŒã«ãç¶æ¿ãªã©ã®åºæ¬çãªOOPååãããé«åºŠãªãããã¯ã¹åŠäœã«è³ããŸã§ãå
æ¬ããŠããŸãã å®è·µçãªæŒç¿ããããžã§ã¯ããéããŠãçè«ãå®éã®ã³ãŒãã£ã³ã°ã«çµã³ã€ããåŠç¿è
ãæè»ãã€å¹æçã«ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã®ã¹ãã«ã磚ãããšãç®æããŸãã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ããã°ã©ãã³ã°ãšã¯ãã³ã³ãã¥ãŒã¿ã«æ瀺ãäžããŠãããã¿ã¹ã¯ãèªåçã«å®è¡ãããããã®æ段ã§ããããã°ã©ã ãæžãããšã§ãã³ã³ãã¥ãŒã¿ãåçŽãªäœæ¥ãè¡ã£ãŠãããããã人éãããã¹ãã§ã¯ãªãç¹°ãè¿ãäœæ¥ãå¹çåããããšãã§ããŸãã",
"title": "ããã°ã©ãã³ã°ã®åºç€ãšRubyã®çŽ¹ä»"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "Rubyã¯ãæ¥æ¬äººã®æŸæ¬è¡åŒæ°ã«ãã£ãŠéçºãããããã°ã©ãã³ã°èšèªã§ããã·ã³ãã«ãªæ§æãè±å¯ãªæ©èœããããŠçŸããã³ãŒããæžããããç¹æ§ãããäžçäžã§åºãå©çšãããŠããŸãã",
"title": "ããã°ã©ãã³ã°ã®åºç€ãšRubyã®çŽ¹ä»"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "Rubyã®åºæ¬çãªããŒã¿åã«ã¯ä»¥äžãå«ãŸããŸã:",
"title": "ããã°ã©ãã³ã°ã®åºç€ãšRubyã®çŽ¹ä»"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "ãããã®åºæ¬çãªããŒã¿åãçµã¿åãããŠãè€éãªããŒã¿æ§é ãæ§ç¯ããããšãã§ããŸãã ãŸããRubyã¯åçåä»ãèšèªã§ãããå€æ°ã®åãæ瀺çã«å®£èšããå¿
èŠããªããããæè»ã§äœ¿ããããèšèªã§ãã",
"title": "ããã°ã©ãã³ã°ã®åºç€ãšRubyã®çŽ¹ä»"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "Rubyã®ããã°ã©ã ãå®è¡ããã«ã¯ãã¿ãŒããã«äžã§ãruby ãã¡ã€ã«å.rbããšããã³ãã³ããå®è¡ããŸããããã§ãããã¡ã€ã«å.rbãã«ã¯ãå®è¡ãããããã°ã©ã ã®ãã¡ã€ã«åãæå®ããŸãã",
"title": "ããã°ã©ãã³ã°ã®åºç€ãšRubyã®çŽ¹ä»"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãšã¯ãããã°ã©ã ãããªããžã§ã¯ãããšåŒã°ããéšåã«åå²ãããããã®ãªããžã§ã¯ãå士ã®ãããšããéããŠããã°ã©ã ãäœæããææ³ã§ãããªããžã§ã¯ããšã¯ãããŒã¿ãšããã«é¢é£ããæäœãã«ãã»ã«åãããã®ã§ãããªããžã§ã¯ãæåããã°ã©ãã³ã°ã¯ãããã°ã©ã ã®åå©çšæ§ãã¡ã³ããã³ã¹æ§ãæ¡åŒµæ§ãé«ããããã«äœ¿çšãããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãšã¯äœãïŒ"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "ã¯ã©ã¹ãšã¯ããªããžã§ã¯ããå®çŸ©ããããã®èšèšå³ã®ãããªãã®ã§ããã¯ã©ã¹ã«ã¯ããªããžã§ã¯ããæã€ã¹ãããŒã¿ãæäœãå®çŸ©ããããšãã§ããŸããäžæ¹ãã€ã³ã¹ã¿ã³ã¹ãšã¯ãã¯ã©ã¹ãå
ã«äœæãããå
·äœçãªãªããžã§ã¯ãã®ããšã§ãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãšã¯äœãïŒ"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "ã¡ãœãããšã¯ããªããžã§ã¯ããæã€æäœã®ããšã§ããã¯ã©ã¹ã«å®çŸ©ããã¡ãœããã¯ããã®ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãæã€æäœãšããŠå©çšããããšãã§ããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãšã¯äœãïŒ"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "ç¶æ¿ãšã¯ãæ¢åã®ã¯ã©ã¹ãå
ã«ããŠãæ°ããã¯ã©ã¹ãäœæããææ³ã§ããç¶æ¿å
ã®ã¯ã©ã¹ã¯ãç¶æ¿å
ã®ã¯ã©ã¹ã«å®çŸ©ãããŠããããŒã¿ãæäœãåŒãç¶ãããšãã§ããŸããããã«ãããæ¢åã®ã¯ã©ã¹ãåºç€ãšããŠãããè€éãªã¯ã©ã¹ãäœæããããšãã§ããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãšã¯äœãïŒ"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "Rubyã§ã¯ãã¯ã©ã¹ãå®çŸ©ããããã«ãclassããšããããŒã¯ãŒãã䜿çšããŸãããŸããã€ã³ã¹ã¿ã³ã¹ãäœæããããã«ã¯ããnewããšããã¡ãœããã䜿çšããŸãã以äžã¯ãã¯ã©ã¹ã®å®çŸ©ãšã€ã³ã¹ã¿ã³ã¹ã®äœæã®äŸã§ãã",
"title": "Rubyã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "Rubyã§ã¯ãã¡ãœãããå®çŸ©ããããã«ãdefããšããããŒã¯ãŒãã䜿çšããŸãããŸããã¡ãœãããåŒã³åºãããã«ã¯ããªããžã§ã¯ãã®ã€ã³ã¹ã¿ã³ã¹ã«å¯ŸããŠã.ãã䜿çšããŠåŒã³åºãããšãã§ããŸãã",
"title": "Rubyã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "Rubyã§ãç¶æ¿ã䜿çšããããšãã§ããŸããç¶æ¿å
ã®ã¯ã©ã¹ã«å®çŸ©ãããŠããããŒã¿ãæäœãåŒãç¶ãã äžã§ãæ°ããããŒã¿ãæäœãè¿œå ããããšãã§ããŸãã",
"title": "Rubyã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 13,
"tag": "p",
"text": "Rubyã§ã¯ãã€ã³ã¹ã¿ã³ã¹å€æ°ãå€éšããã¢ã¯ã»ã¹ããããã®ã¢ã¯ã»ãµãç°¡åã«å®çŸ©ã§ããŸããã¢ã¯ã»ãµã䜿çšãããšãå€éšããã€ã³ã¹ã¿ã³ã¹å€æ°ã«ã¢ã¯ã»ã¹ããããã®getterã¡ãœãã(ååŸçšã®ã¡ãœãã)ãsetterã¡ãœãã(èšå®çšã®ã¡ãœãã)ãèªåçã«å®çŸ©ã§ããŸãã",
"title": "Rubyã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 14,
"tag": "p",
"text": "ã¢ã¯ã»ãµãå®çŸ©ããæ¹æ³ã¯ã以äžã®éãã§ãã",
"title": "Rubyã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 15,
"tag": "p",
"text": "ãã®ããã«ãattr_accessorã¡ãœããã䜿çšããŠã:nameãš:ageã®ã¢ã¯ã»ãµãå®çŸ©ããŠããŸããããã«ãããã€ã³ã¹ã¿ã³ã¹å€æ°ã«ã¢ã¯ã»ã¹ã§ããŸãã",
"title": "Rubyã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 16,
"tag": "p",
"text": "attr_accessorã¡ãœããã¯ã:nameãš:ageã®ã¢ã¯ã»ãµãå®çŸ©ããã ãã§ã以äžã®2ã€ã®ã¡ãœãããèªåçã«å®çŸ©ããŸãã",
"title": "Rubyã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 17,
"tag": "p",
"text": "åæ§ã«ã:ageã®ã¢ã¯ã»ãµã«å¯ŸããŠãèªåçã«getterã¡ãœãããšsetterã¡ãœãããå®çŸ©ãããŸãã",
"title": "Rubyã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 18,
"tag": "p",
"text": "ãŸããattr_readerã¡ãœããã䜿çšãããšãgetterã¡ãœããã ããå®çŸ©ããããšãã§ããŸããéã«ãattr_writerã¡ãœããã䜿çšãããšãsetterã¡ãœããã ããå®çŸ©ããããšãã§ããŸãã",
"title": "Rubyã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 19,
"tag": "p",
"text": "ãã®ããã«ã:nameã®getterã¡ãœãããš:ageã®setterã¡ãœãããå®çŸ©ããŠããŸããããã«ããã以äžã®ããã«ã€ã³ã¹ã¿ã³ã¹å€æ°ã«ã¢ã¯ã»ã¹ã§ããŸãã",
"title": "Rubyã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 20,
"tag": "p",
"text": "Rubyã§ã¯ãã¢ãžã¥ãŒã«ã䜿çšããŠãå
±éã®æ©èœããŸãšããããšãã§ããŸããã¢ãžã¥ãŒã«ã¯ãã¯ã©ã¹ã®ããã«æäœãå®çŸ©ããããšãã§ããŸãããã€ã³ã¹ã¿ã³ã¹ãäœæããããšã¯ã§ããŸããã",
"title": "Rubyã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 21,
"tag": "p",
"text": "Rubyã¯ãå€ãã®äŸ¿å©ãªããŒã¿æ§é ããµããŒãããŠããŸãã以äžã«ããã€ãã®ä»£è¡šçãªããŒã¿æ§é ã®å®è£
äŸã瀺ããŸãã",
"title": "ããŒã¿æ§é "
},
{
"paragraph_id": 22,
"tag": "p",
"text": "Rubyã®Array(é
å)ã¯ãè€æ°ã®èŠçŽ ãé åºä»ããŠæ ŒçŽããããŒã¿æ§é ã§ããé
åå
ã®èŠçŽ ã¯ã€ã³ããã¯ã¹ã«ãã£ãŠã¢ã¯ã»ã¹ããã0ããå§ãŸãæŽæ°ã®ã€ã³ããã¯ã¹ãå²ãåœãŠãããŸããRubyã®é
åã¯å¯å€é·ã§ãããç°ãªãããŒã¿åã®èŠçŽ ãå«ãããšãã§ããŸããé
åã¯äžæ¬åŒ§ [] ã䜿ã£ãŠäœæãããèŠçŽ ã¯ã«ã³ãã§åºåãããŸããäŸãã°ã[1, \"apple\", :symbol, [2, 3], true]ã®ããã«ãªããŸããé
åã¯ã€ãã¬ãŒã·ã§ã³ãæäœãæ€çŽ¢ãªã©å€ãã®æäœã«äŸ¿å©ã§ãããRubyã®ããã°ã©ãã³ã°ã§åºã䜿çšãããŸãã",
"title": "ããŒã¿æ§é "
},
{
"paragraph_id": 23,
"tag": "p",
"text": "Rubyã®é
å (Array) ã¯ãã¹ã¿ãã¯ããã¥ãŒã®æ©èœãæã£ãŠããŸãããããã§ã¯åºæ¬çãªãªãã©ã«ãšã€ã³ããã¯ã¹ã䜿ã£ãèŠçŽ åç
§ãšæäœäŸããã¹ãã±ãŒã¹ã§ç€ºããŸãã",
"title": "ããŒã¿æ§é "
},
{
"paragraph_id": 24,
"tag": "p",
"text": "ã¹ã¿ãã¯æ§é (Stack)ã¯ãããŒã¿ãäžæçã«ä¿åããããã®æœè±¡ããŒã¿åã®äžã€ã§ãããåŸå
¥ãå
åºã(Last-In, First-Out; LIFO)ã®åäœãæã¡ãŸããããã¯ãæåŸã«è¿œå ãããèŠçŽ ãæåã«åãåºããããšããæå³ã§ããã¹ã¿ãã¯ã¯ãç©ççãªã¹ã¿ãã¯ãå±±ã®ãããªã€ã¡ãŒãžã§èª¬æãããããšããããŸãã",
"title": "ããŒã¿æ§é "
},
{
"paragraph_id": 25,
"tag": "p",
"text": "ã¹ã¿ãã¯ã¯ã以äžã®ãããªåºæ¬çãªæäœãæã¡ãŸã:",
"title": "ããŒã¿æ§é "
},
{
"paragraph_id": 26,
"tag": "p",
"text": "ã¹ã¿ãã¯ã¯ãååž°çãªã¢ã«ãŽãªãºã ã®å®è£
ããããã¯ãã©ããã³ã°ãéããŒã©ã³ãèšæ³ãªã©ã®è¡šçŸæ¹æ³ã«äœ¿ãããããšããããŸãã",
"title": "ããŒã¿æ§é "
},
{
"paragraph_id": 27,
"tag": "p",
"text": "Rubyã®é
åã¯ã¹ã¿ãã¯ã®æ©èœãæã£ãŠããŠãpeek ã last ã®å¥åã«ããçšåºŠã§ã¹ã¿ãã¯ãå®è£
ã§ããŸãã",
"title": "ããŒã¿æ§é "
},
{
"paragraph_id": 28,
"tag": "p",
"text": "Ruby㯠Queue(ãã¥ãŒ)ãæšæºã©ã€ãã©ãªã«æã£ãŠããŸãããããã¯Thread safeãªé«åºŠãªå®è£
ã§ãããã·ã³ã°ã«ã¹ã¬ããã§äœ¿ããšç©ºã®ãã¥ãŒããdeqãããšãããããã¯æ€ç¥ã«æµè§Šãããªã©ãã¹ã¬ããééä¿¡ã«ç¹åããŠããŸãã",
"title": "ããŒã¿æ§é "
},
{
"paragraph_id": 29,
"tag": "p",
"text": "ãŸããRubyã®é
åã¯ãã¥ãŒã®æ©èœãæã£ãŠããŠãpeek ã first ã®å¥åã«ãããªã©ã§ãã¥ãŒãå®è£
ã§ããŸãã",
"title": "ããŒã¿æ§é "
},
{
"paragraph_id": 30,
"tag": "p",
"text": "Rubyã«ã¯ãæšæºã©ã€ãã©ãªã«é£çµãªã¹ã (Linked List)ã®å®è£
ã¯å«ãŸããŠããŸããããé
å(Array)ã¯æäŸãããŠããŸããé
åã¯ã€ã³ããã¯ã¹ã«ããã©ã³ãã ã¢ã¯ã»ã¹ãåçãªãµã€ãºå€æŽãå¯èœã§ãå€ãã®å Žåã§å¹ççãªããŒã¿æ§é ã§ãã",
"title": "ããŒã¿æ§é "
},
{
"paragraph_id": 31,
"tag": "p",
"text": "äžæ¹ã§ããªã³ã¯ãªã¹ãã¯ã¡ã¢ãªå
ã®é£ç¶ããé åã䜿çšããããã€ã³ã¿ãŒã«ãã£ãŠåèŠçŽ ã次ã®èŠçŽ ãæã瀺ã圢ã§ããŒã¿ãæ ŒçŽããŸããããã«ãããæ¿å
¥ãåé€ãªã©ã®æäœãå¹ççã«è¡ããŸãããã©ã³ãã ã¢ã¯ã»ã¹ãã§ããªããããèŠçŽ ãé ã«ãã©ãå¿
èŠããããŸãã",
"title": "ããŒã¿æ§é "
},
{
"paragraph_id": 32,
"tag": "p",
"text": "Rubyã§ãªã³ã¯ãªã¹ããå®è£
ããå Žåãç¬èªã®ã¯ã©ã¹ãå®çŸ©ããããããã®èŠçŽ ã次ã®èŠçŽ ãæããã€ã³ã¿ãŒãæã€ããã«ããããšãäžè¬çã§ãããã ããRubyã«ãããŠé
åãå€ãã®ã±ãŒã¹ã§ååã«å¹ççãªããŒã¿æ§é ã§ããããããªã³ã¯ãªã¹ããå®è£
ããå¿
èŠãããå Žåã¯ããã®äœ¿çšã±ãŒã¹ãç¹å®ã®æ¡ä»¶ãæºãããŠãããã©ãããæ€èšããããšãéèŠã§ãã",
"title": "ããŒã¿æ§é "
},
{
"paragraph_id": 33,
"tag": "p",
"text": "Rubyã®Hash(ããã·ã¥)ã¯ãããŒãšå€ã®ãã¢ãæ ŒçŽããããŒã¿æ§é ã§ããããŒãšå€ã¯é¢é£ä»ããããããŒã¯äžæã§éè€ããªãå¿
èŠããããŸããHashã¯ããã·ã¥ããŒãã«ãåºã«ããŠãããé«éãªããŒã¿ã®æ€çŽ¢ãååŸãå¯èœã§ããHashã¯äžæ¬åŒ§ {} ã䜿ã£ãŠäœæããããŒãšå€ã¯ ã㌠=> å€ ã®åœ¢åŒã§èšè¿°ããŸããäŸãã°ã{ key1 => value1, key2 => value2 } ã®ããã«ãªããŸããããŸããŸãªãªããžã§ã¯ããããŒãšããŠå©çšã§ããHashã¯Rubyããã°ã©ãã³ã°ã§é »ç¹ã«äœ¿çšãããŸãããŸãããŒãã·ã³ãã«(Symbol)ã®å Žå㯠{ :key1 => value1, :key2 => value2 } ã{ key1: value1, key2: value2 } ãšæžãçç¥èšæ³ããããŸãã",
"title": "ããŒã¿æ§é "
},
{
"paragraph_id": 34,
"tag": "p",
"text": "Rubyã«ã¯ãæšæºã©ã€ãã©ãªã«æšæ§é ã®å®è£
ã¯å«ãŸããŠããŸããããç¬èªã®ã¯ã©ã¹ãå®çŸ©ããŠæšæ§é ãå®è£
ããããšãã§ããŸãã",
"title": "ããŒã¿æ§é "
},
{
"paragraph_id": 35,
"tag": "p",
"text": "éåžžãæšæ§é ã¯ããŒããšåŒã°ãããªããžã§ã¯ãããæ§æãããåããŒãã¯ããŒã¿ãä¿æããä»ã®ããŒããžã®åç
§ãæã¡ãŸããæ ¹ããŒãããå§ãŸããããããã®ããŒããåããŒããæã€ããšããããŸããéåžžãæšæ§é ã¯ååž°çãªããŒã¿æ§é ã§ãããååž°çãªã¢ã«ãŽãªãºã ã䜿çšããŠæäœãããŸãã",
"title": "ããŒã¿æ§é "
},
{
"paragraph_id": 36,
"tag": "p",
"text": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã¯ãããã°ã©ãã³ã°ã®äžçš®ã§ããªããžã§ã¯ããšåŒã°ããããŒã¿æ§é ãšãããããæäœããã¡ãœãããäžå¿ã«æ§æãããŠããŸãããªããžã§ã¯ãã¯ãããèªäœãç¬èªã®ç¶æ
ãæã¡ãä»ã®ãªããžã§ã¯ããšçžäºäœçšããããšãã§ããŸãããã®ããã«ããªããžã§ã¯ãæåããã°ã©ãã³ã°ã¯ãè€éãªåé¡ãæ±ãããããä¿å®æ§ãšæ¡åŒµæ§ã«åªããã³ãŒããæžãããšãã§ããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãšãã¶ã€ã³ãã¿ãŒã³"
},
{
"paragraph_id": 37,
"tag": "p",
"text": "ãã¶ã€ã³ãã¿ãŒã³ã¯ããªããžã§ã¯ãæåããã°ã©ãã³ã°ã«ãããåå©çšå¯èœãªãœãªã¥ãŒã·ã§ã³ã®ããšã§ãããã¶ã€ã³ãã¿ãŒã³ã¯ãå
±éã®åé¡ã«å¯Ÿãã解決çãæäŸããã³ãŒãã®åå©çšæ§ãä¿å®æ§ãæ¡åŒµæ§ãåäžãããŸãããã¶ã€ã³ãã¿ãŒã³ã¯ãäžè¬çãªã³ãŒãã£ã³ã°ã®ãã¹ããã©ã¯ãã£ã¹ãäœç³»åããæšæºåãããæ¹æ³ã§åé¡ã解決ããããã®æ çµã¿ãæäŸããããããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®éèŠãªæŠå¿µã§ãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãšãã¶ã€ã³ãã¿ãŒã³"
},
{
"paragraph_id": 38,
"tag": "p",
"text": "ãã¶ã€ã³ãã¿ãŒã³ã¯ãGoF(Gang of Four)ãå®çŸ©ãã23ã®ãã¿ãŒã³ãæãæåã§ãããããã®ãã¿ãŒã³ã¯ãããããç¹å®ã®åé¡ã解決ããããã«äœ¿çšãããŸããäŸãã°ãã·ã³ã°ã«ãã³ãã¿ãŒã³ã¯ãç¹å®ã®ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãå¿
èŠãªå Žåã«ã1ã€ã®ã€ã³ã¹ã¿ã³ã¹ããäœæããªãããã«ããããã«äœ¿çšãããŸãããã¡ã¯ããªãŒãã¿ãŒã³ã¯ãç°ãªãçš®é¡ã®ãªããžã§ã¯ããäœæããããã«äœ¿çšãããŸãããŸããã¹ãã©ããžãŒãã¿ãŒã³ã¯ãã¢ã«ãŽãªãºã ã®ãã¡ããªãŒãå®çŸ©ããããããã«ãã»ã«åããçžäºã«äº€æå¯èœã«ããããã«äœ¿çšãããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãšãã¶ã€ã³ãã¿ãŒã³"
},
{
"paragraph_id": 39,
"tag": "p",
"text": "ãã¶ã€ã³ãã¿ãŒã³ã¯ããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®åºç€ã§ãããåå©çšå¯èœãªã³ãŒããæžãããã«éåžžã«éèŠã§ãããªããžã§ã¯ãæåããã°ã©ãã³ã°ãåŠã¶éã«ã¯ããã¶ã€ã³ãã¿ãŒã³ãäžç·ã«åŠã¶ããšããå§ãããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãšãã¶ã€ã³ãã¿ãŒã³"
},
{
"paragraph_id": 40,
"tag": "p",
"text": "ãã¡ã¯ããªãŒã¡ãœãããã¿ãŒã³ã¯ãã€ã³ã¹ã¿ã³ã¹ã®çæãå°éã«è¡ãã¯ã©ã¹ãå®çŸ©ããããšã§ãè€éãªã€ã³ã¹ã¿ã³ã¹ã®çæåŠçãé èœãããã¿ãŒã³ã§ãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãšãã¶ã€ã³ãã¿ãŒã³"
},
{
"paragraph_id": 41,
"tag": "p",
"text": "ã·ã³ã°ã«ãã³ãã¿ãŒã³ã¯ãã€ã³ã¹ã¿ã³ã¹ã1ã€ã ãçæãããããå
±æãããã¿ãŒã³ã§ãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãšãã¶ã€ã³ãã¿ãŒã³"
},
{
"paragraph_id": 42,
"tag": "p",
"text": "äžèšã®ã³ãŒãã¯èª¬æã®ããã«å®è£
ã®çŽ°éšã瀺ããŸããããRubyã«ã¯ã·ã³ã°ã«ãã³ãå®è£
ããããã®ã¢ãžã¥ãŒã« Singleton ããããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãšãã¶ã€ã³ãã¿ãŒã³"
},
{
"paragraph_id": 43,
"tag": "p",
"text": "Singleton ã¢ãžã¥ãŒã«ã¯ãã·ã³ã°ã«ãã³ãã¿ãŒã³ã®å®è£
ãæ¯æŽããããã®ãã®ã§ãããã¯ã©ã¹ã« include Singleton ãè¿œå ããããšã§ã·ã³ã°ã«ãã³ãã¿ãŒã³ãå©çšã§ããããã«ãªããŸããSingleton ã¢ãžã¥ãŒã«ã¯ã¯ã©ã¹ã¡ãœãã instance ãæäŸãããã®ã¡ãœãããåŒã³åºãããšã§å¯äžã®ã€ã³ã¹ã¿ã³ã¹ãååŸã§ããŸãããŸããclone ã dup ã¡ãœããããªãŒããŒã©ã€ããããŠãããããã«ããã·ã³ã°ã«ãã³ã€ã³ã¹ã¿ã³ã¹ã®ã¯ããŒã³ãè€è£œãé²ãããŠããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãšãã¶ã€ã³ãã¿ãŒã³"
},
{
"paragraph_id": 44,
"tag": "p",
"text": "ãã®æ¬ã§ã¯ãRubyã䜿çšãããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®åºæ¬çãªæŠå¿µãšäœ¿ãæ¹ã«ã€ããŠåŠã³ãŸããããŸããå¿çšçãªäœ¿ãæ¹ãšããŠããã¡ã¯ããªãŒã¡ãœãããã¿ãŒã³ãã·ã³ã°ã«ãã³ãã¿ãŒã³ã«ã€ããŠã玹ä»ããŸããã",
"title": "ãŸãšã"
},
{
"paragraph_id": 45,
"tag": "p",
"text": "ãããã®æŠå¿µã䜿ãæ¹ã¯ãããã°ã©ãã³ã°ã«ãããŠéåžžã«éèŠãªãã®ã§ããããããã®ç解ãšç¿åŸã¯ãããã°ã©ãã³ã°ã¹ãã«ã®åäžã«ã€ãªãããŸãã",
"title": "ãŸãšã"
},
{
"paragraph_id": 46,
"tag": "p",
"text": "ç¹ã«ããªããžã§ã¯ãæåããã°ã©ãã³ã°ã¯ãè€éãªåŠçãæ±ãå Žåã«éåžžã«æçšã§ãããªããžã§ã¯ãæåããã°ã©ãã³ã°ã«ãã£ãŠãåŠçããªããžã§ã¯ãã«åå²ããããšã§ã倧èŠæš¡ãªããã°ã©ã ã®éçºã容æã«ãªããä¿å®æ§ãæ¡åŒµæ§ãåäžããŸãã",
"title": "ãŸãšã"
},
{
"paragraph_id": 47,
"tag": "p",
"text": "æ¬æžã§åŠãã å
容ãå®è·µçã«æŽ»çšãããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®ã¹ãã«ãåäžãããããšããå§ãããŸãããŸããæ¬æžãããã°ã©ãã³ã°ã®åå¿è
ã§ãç解ã§ããããã«é
æ
®ããŠå·çããŠããŸãã®ã§ãããã°ã©ãã³ã°ã®ååŠè
ã«ãæ¯éææŠããŠããã ããããšæããŸãã",
"title": "ãŸãšã"
}
] | ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã¯ãçŸä»£ã®ãœãããŠã§ã¢éçºã«ãããŠåºç€ãšãªãéèŠãªæŠå¿µã§ãã
ãã®ã«ãªãã¥ã©ã ã¯ãRubyã䜿çšããååŠè
ããäžçŽè
ãŸã§ã®ããã°ã©ããŒã察象ã«ãã¯ã©ã¹ãã¢ãžã¥ãŒã«ãç¶æ¿ãªã©ã®åºæ¬çãªOOPååãããé«åºŠãªãããã¯ã¹åŠäœã«è³ããŸã§ãå
æ¬ããŠããŸãã
å®è·µçãªæŒç¿ããããžã§ã¯ããéããŠãçè«ãå®éã®ã³ãŒãã£ã³ã°ã«çµã³ã€ããåŠç¿è
ãæè»ãã€å¹æçã«ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã®ã¹ãã«ã磚ãããšãç®æããŸãã | ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã¯ãçŸä»£ã®ãœãããŠã§ã¢éçºã«ãããŠåºç€ãšãªãéèŠãªæŠå¿µã§ãã
ãã®ã«ãªãã¥ã©ã ã¯ãRubyã䜿çšããååŠè
ããäžçŽè
ãŸã§ã®ããã°ã©ããŒã察象ã«ãã¯ã©ã¹ãã¢ãžã¥ãŒã«ãç¶æ¿ãªã©ã®åºæ¬çãªOOPååãããé«åºŠãªãããã¯ã¹åŠäœã«è³ããŸã§ãå
æ¬ããŠããŸãã
å®è·µçãªæŒç¿ããããžã§ã¯ããéããŠãçè«ãå®éã®ã³ãŒãã£ã³ã°ã«çµã³ã€ããåŠç¿è
ãæè»ãã€å¹æçã«ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã®ã¹ãã«ã磚ãããšãç®æããŸãã
== ããã°ã©ãã³ã°ã®åºç€ãšRubyã®çŽ¹ä» ==
=== ããã°ã©ãã³ã°ãšã¯äœãïŒ ===
ããã°ã©ãã³ã°ãšã¯ãã³ã³ãã¥ãŒã¿ã«æ瀺ãäžããŠãããã¿ã¹ã¯ãèªåçã«å®è¡ãããããã®æ段ã§ããããã°ã©ã ãæžãããšã§ãã³ã³ãã¥ãŒã¿ãåçŽãªäœæ¥ãè¡ã£ãŠãããããã人éãããã¹ãã§ã¯ãªãç¹°ãè¿ãäœæ¥ãå¹çåããããšãã§ããŸãã
=== Rubyãšã¯äœãïŒ ===
Rubyã¯ãæ¥æ¬äººã®æŸæ¬è¡åŒæ°ã«ãã£ãŠéçºãããããã°ã©ãã³ã°èšèªã§ããã·ã³ãã«ãªæ§æãè±å¯ãªæ©èœããããŠçŸããã³ãŒããæžããããç¹æ§ãããäžçäžã§åºãå©çšãããŠããŸãã
=== Rubyã®åºæ¬çãªããŒã¿å ===
Rubyã®åºæ¬çãªããŒã¿åã«ã¯ä»¥äžãå«ãŸããŸãïŒ
# '''IntegerïŒæŽæ°ïŒ:''' æŽæ°ãè¡šçŸããŸããäŸãã°ã<code>42</code> ã <code>-10</code> ãªã©ãæŽæ°ã§ãã
# '''FloatïŒæµ®åå°æ°ç¹æ°ïŒ:''' å°æ°ãè¡šçŸããŸããäŸãã°ã<code>3.14</code> ã <code>-0.5</code> ãªã©ãæµ®åå°æ°ç¹æ°ã§ãã
# '''StringïŒæååïŒ:''' æåã®é£ç¶ãè¡šçŸããŸããã·ã³ã°ã«ã¯ã©ãŒã <code>' '</code> ãŸãã¯ããã«ã¯ã©ãŒã <code>" "</code> ã§å²ãŸããæååã§ããäŸãã°ã<code>"Hello, World!"</code> ãæååã§ãã
# '''SymbolïŒã·ã³ãã«ïŒ:''' äžæã®èå¥åãè¡šçŸããŸããå
é ã«ã³ãã³ <code>:</code> ãä»ããŠè¡šçŸããŸããäŸãã°ã<code>:foo</code> ã <code>:bar</code> ãã·ã³ãã«ã§ãã
# '''BooleanïŒçåœå€ïŒ:''' çåœå€ãè¡šçŸããŸãã<code>true</code> ãš <code>false</code> ã®2ã€ã®å€ããããŸãã
# '''ArrayïŒé
åïŒ:''' è€æ°ã®èŠçŽ ãé åºä»ããŠæ ŒçŽããŸããäžæ¬åŒ§ <code>[]</code> ã§å²ãŸããã«ã³ãã§èŠçŽ ãåºåãããŸããäŸãã°ã<code>[1, 2, 3]</code> ãé
åã§ããRubyã§ã¯ãé
åã®ã»ãã¹ã¿ãã¯ããã¥ãŒã®æ§è³ªã䜵ãæã£ãŠããŸãã
# '''HashïŒããã·ã¥ïŒ:''' ããŒãšå€ã®ãã¢ãæ ŒçŽããŸããäžæ¬åŒ§ <code>{}</code> ã§å²ãŸããããŒãšå€ã¯ <code>ã㌠=> å€</code> ã®åœ¢åŒã§è¡šçŸãããŸããäŸãã°ã<code>{ :name => "John", :age => 30 }</code> ãããã·ã¥ã§ãã
ãããã®åºæ¬çãªããŒã¿åãçµã¿åãããŠãè€éãªããŒã¿æ§é ãæ§ç¯ããããšãã§ããŸãã
ãŸããRubyã¯åçåä»ãèšèªã§ãããå€æ°ã®åãæ瀺çã«å®£èšããå¿
èŠããªããããæè»ã§äœ¿ããããèšèªã§ãã
=== ããã°ã©ã ã®å®è¡æ¹æ³ ===
Rubyã®ããã°ã©ã ãå®è¡ããã«ã¯ãã¿ãŒããã«äžã§ãruby ãã¡ã€ã«å.rbããšããã³ãã³ããå®è¡ããŸããããã§ãããã¡ã€ã«å.rbãã«ã¯ãå®è¡ãããããã°ã©ã ã®ãã¡ã€ã«åãæå®ããŸãã
{{ã³ã©ã |Rubyã®ç¹è²|2=Rubyã¯ã以äžã®ãããªç¹è²ãæã€ããã°ã©ãã³ã°èšèªã§ãã
;ãªããžã§ã¯ãæåèšèª
Rubyã¯ãçŽç²ãªãªããžã§ã¯ãæåèšèªã§ããããã¹ãŠã®å€ããªããžã§ã¯ãã§ããããšãç¹åŸŽã§ãããŸããã¯ã©ã¹ããªããžã§ã¯ãã®å®çŸ©ã容æã§ãããã¡ãœããåŒã³åºãã®ã·ã³ã¿ãã¯ã¹ãç°¡æœã§èªã¿ãããããããªããžã§ã¯ãæåã®èšèšãéçºã«åããŠããŸãã
;åçåä»ãèšèª
Rubyã¯ãå€æ°ã®åãæ瀺çã«å®£èšããå¿
èŠããªãåçåä»ãèšèªã§ãããã®ãããæè»æ§ããããå®è¡æã«å€æ°ã®åã決å®ãããããæè»ãªããã°ã©ãã³ã°ãå¯èœã§ãã
;ãªãã¬ã¯ã·ã§ã³
Rubyã¯ããªãã¬ã¯ã·ã§ã³æ©èœãåããŠããŸããã€ãŸããããã°ã©ã ã®å®è¡äžã«ããªããžã§ã¯ããã¯ã©ã¹ã®æ
å ±ãååŸã§ããããšã§ãããã®ãããå®è¡æã«ããã°ã©ã ã®æ¯ãèããå€æŽããããšãã§ããæè»æ§ã®ããããã°ã©ãã³ã°ãå¯èœã«ãªããŸãã
;ã¡ã¿ããã°ã©ãã³ã°
Rubyã¯ãã¡ã¿ããã°ã©ãã³ã°ããµããŒãããŠããŸããã€ãŸããããã°ã©ã ãèªå·±ä¿®æ£ãèªå·±åçããããšãã§ããŸããäŸãã°ãã¯ã©ã¹ã®å®çŸ©ãã¡ãœããã®åå®çŸ©ãªã©ãå¯èœã§ãæè»ãªããã°ã©ãã³ã°ãå¯èœã§ãã
;è±å¯ãªã©ã€ãã©ãª
Rubyã«ã¯ãè±å¯ãªæšæºã©ã€ãã©ãªãå«ãŸããŠããŸãããŸããRubyGemsãšåŒã°ããããã±ãŒãžç®¡çã·ã¹ãã ããããå€æ°ã®ã©ã€ãã©ãªããã¬ãŒã ã¯ãŒã¯ã容æã«ã€ã³ã¹ããŒã«ã§ãããããå¹ççãªéçºãå¯èœã§ãã
;ã·ã³ãã«ã§èªã¿ãããæ§æ
Rubyã¯ãç°¡æœã§èªã¿ãããæ§æãç¹åŸŽã§ãããŸããèªç¶èšèªã«è¿ãæ§æãæ¡çšããŠãããããã°ã©ã ã®å¯èªæ§ãé«ããªã£ãŠããŸããç¹ã«ãRuby on RailsãšããWebã¢ããªã±ãŒã·ã§ã³ãã¬ãŒã ã¯ãŒã¯ãæåã§ãRubyã®ã·ã³ãã«ã§èªã¿ãããæ§æããã¬ãŒã ã¯ãŒã¯ã®å©çšè
ã«é«ãè©äŸ¡ãåŸãŠããŸãã
}}
== ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãšã¯äœãïŒ ==
ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãšã¯ãããã°ã©ã ãããªããžã§ã¯ãããšåŒã°ããéšåã«åå²ãããããã®ãªããžã§ã¯ãå士ã®ãããšããéããŠããã°ã©ã ãäœæããææ³ã§ãããªããžã§ã¯ããšã¯ãããŒã¿ãšããã«é¢é£ããæäœãã«ãã»ã«åãããã®ã§ãããªããžã§ã¯ãæåããã°ã©ãã³ã°ã¯ãããã°ã©ã ã®åå©çšæ§ãã¡ã³ããã³ã¹æ§ãæ¡åŒµæ§ãé«ããããã«äœ¿çšãããŸãã
=== ã¯ã©ã¹ãšã€ã³ã¹ã¿ã³ã¹ ===
ã¯ã©ã¹ãšã¯ããªããžã§ã¯ããå®çŸ©ããããã®èšèšå³ã®ãããªãã®ã§ããã¯ã©ã¹ã«ã¯ããªããžã§ã¯ããæã€ã¹ãããŒã¿ãæäœãå®çŸ©ããããšãã§ããŸããäžæ¹ãã€ã³ã¹ã¿ã³ã¹ãšã¯ãã¯ã©ã¹ãå
ã«äœæãããå
·äœçãªãªããžã§ã¯ãã®ããšã§ãã
=== ã¡ãœãããšã¯äœãïŒ ===
ã¡ãœãããšã¯ããªããžã§ã¯ããæã€æäœã®ããšã§ããã¯ã©ã¹ã«å®çŸ©ããã¡ãœããã¯ããã®ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãæã€æäœãšããŠå©çšããããšãã§ããŸãã
=== ç¶æ¿ãšã¯äœãïŒ ===
ç¶æ¿ãšã¯ãæ¢åã®ã¯ã©ã¹ãå
ã«ããŠãæ°ããã¯ã©ã¹ãäœæããææ³ã§ããç¶æ¿å
ã®ã¯ã©ã¹ã¯ãç¶æ¿å
ã®ã¯ã©ã¹ã«å®çŸ©ãããŠããããŒã¿ãæäœãåŒãç¶ãããšãã§ããŸããããã«ãããæ¢åã®ã¯ã©ã¹ãåºç€ãšããŠãããè€éãªã¯ã©ã¹ãäœæããããšãã§ããŸãã
== Rubyã®ãªããžã§ã¯ãæåããã°ã©ãã³ã° ==
=== Rubyã®ã¯ã©ã¹å®çŸ©ãšã€ã³ã¹ã¿ã³ã¹äœæ ===
Rubyã§ã¯ãã¯ã©ã¹ãå®çŸ©ããããã«ãclassããšããããŒã¯ãŒãã䜿çšããŸãããŸããã€ã³ã¹ã¿ã³ã¹ãäœæããããã«ã¯ããnewããšããã¡ãœããã䜿çšããŸãã以äžã¯ãã¯ã©ã¹ã®å®çŸ©ãšã€ã³ã¹ã¿ã³ã¹ã®äœæã®äŸã§ãã
:<syntaxhighlight lang=ruby>
class Person
def initialize(name, age)
@name = name
@age = age
end
def introduce
puts "ç§ã®ååã¯#{@name}ã§ãã#{@age}æ³ã§ãã"
end
end
person1 = Person.new("å±±ç°å€ªé", 20)
person2 = Person.new("éŽæšè±å", 25)
person1.introduce # => ç§ã®ååã¯å±±ç°å€ªéã§ãã20æ³ã§ãã
person2.introduce # => ç§ã®ååã¯éŽæšè±åã§ãã25æ³ã§ãã
</syntaxhighlight>
=== ã¡ãœããã®å®çŸ©ãšåŒã³åºã ===
Rubyã§ã¯ãã¡ãœãããå®çŸ©ããããã«ãdefããšããããŒã¯ãŒãã䜿çšããŸãããŸããã¡ãœãããåŒã³åºãããã«ã¯ããªããžã§ã¯ãã®ã€ã³ã¹ã¿ã³ã¹ã«å¯ŸããŠã.ãã䜿çšããŠåŒã³åºãããšãã§ããŸãã
:<syntaxhighlight lang=ruby>
class Person
def initialize(name, age)
@name = name
@age = age
end
def introduce
puts "ç§ã®ååã¯#{@name}ã§ãã#{@age}æ³ã§ãã"
end
def add_age(years)
@age += years
end
end
person = Person.new("å±±ç°å€ªé", 20)
person.introduce # => ç§ã®ååã¯å±±ç°å€ªéã§ãã20æ³ã§ãã
person.add_age(5)
person.introduce # => ç§ã®ååã¯å±±ç°å€ªéã§ãã25æ³ã§ãã
</syntaxhighlight>
=== ç¶æ¿ ===
Rubyã§ãç¶æ¿ã䜿çšããããšãã§ããŸããç¶æ¿å
ã®ã¯ã©ã¹ã«å®çŸ©ãããŠããããŒã¿ãæäœãåŒãç¶ãã äžã§ãæ°ããããŒã¿ãæäœãè¿œå ããããšãã§ããŸãã
:<syntaxhighlight lang=ruby>
class Animal
def initialize(name)
@name = name
end
def speak
puts "#{@name}ã鳎ããŸããã"
end
end
class Dog < Animal
def speak
puts "#{@name}ãã¯ã³ã¯ã³é³ŽããŸããã"
end
end
animal = Animal.new("ç«")
animal.speak # => ç«ã鳎ããŸããã
dog = Dog.new("ç¬")
dog.speak # => ç¬ãã¯ã³ã¯ã³é³ŽããŸããã
</syntaxhighlight>
=== ã¢ã¯ã»ãµãŒ ===
Rubyã§ã¯ãã€ã³ã¹ã¿ã³ã¹å€æ°ãå€éšããã¢ã¯ã»ã¹ããããã®ã¢ã¯ã»ãµãç°¡åã«å®çŸ©ã§ããŸããã¢ã¯ã»ãµã䜿çšãããšãå€éšããã€ã³ã¹ã¿ã³ã¹å€æ°ã«ã¢ã¯ã»ã¹ããããã®getterã¡ãœããïŒååŸçšã®ã¡ãœããïŒãsetterã¡ãœããïŒèšå®çšã®ã¡ãœããïŒãèªåçã«å®çŸ©ã§ããŸãã
ã¢ã¯ã»ãµãå®çŸ©ããæ¹æ³ã¯ã以äžã®éãã§ãã
:<syntaxhighlight lang=ruby>
class Person
attr_accessor :name, :age
def initialize(name, age)
@name = name
@age = age
end
end
person = Person.new("å±±ç°å€ªé", 20)
puts person.name # => å±±ç°å€ªé
puts person.age # => 20
person.age = 25
puts person.age # => 25
</syntaxhighlight>
ãã®ããã«ãattr_accessorã¡ãœããã䜿çšããŠã:nameãš:ageã®ã¢ã¯ã»ãµãå®çŸ©ããŠããŸããããã«ãããã€ã³ã¹ã¿ã³ã¹å€æ°ã«ã¢ã¯ã»ã¹ã§ããŸãã
attr_accessorã¡ãœããã¯ã:nameãš:ageã®ã¢ã¯ã»ãµãå®çŸ©ããã ãã§ã以äžã®2ã€ã®ã¡ãœãããèªåçã«å®çŸ©ããŸãã
* nameã¡ãœããïŒã€ã³ã¹ã¿ã³ã¹å€æ°@nameã®å€ãååŸããgetterã¡ãœãã
* name=ã¡ãœããïŒã€ã³ã¹ã¿ã³ã¹å€æ°@nameã®å€ãèšå®ããsetterã¡ãœãã
åæ§ã«ã:ageã®ã¢ã¯ã»ãµã«å¯ŸããŠãèªåçã«getterã¡ãœãããšsetterã¡ãœãããå®çŸ©ãããŸãã
ãŸããattr_readerã¡ãœããã䜿çšãããšãgetterã¡ãœããã ããå®çŸ©ããããšãã§ããŸããéã«ãattr_writerã¡ãœããã䜿çšãããšãsetterã¡ãœããã ããå®çŸ©ããããšãã§ããŸãã
:<syntaxhighlight lang=ruby>
class Person
attr_reader :name
attr_writer :age
end
</syntaxhighlight>
ãã®ããã«ã:nameã®getterã¡ãœãããš:ageã®setterã¡ãœãããå®çŸ©ããŠããŸããããã«ããã以äžã®ããã«ã€ã³ã¹ã¿ã³ã¹å€æ°ã«ã¢ã¯ã»ã¹ã§ããŸãã
:<syntaxhighlight lang=ruby>
person = Person.new
person.name = "Alice" # getterã¡ãœããã¯å®çŸ©ãããŠããªãããããšã©ãŒã«ãªã
person.age = 30 # setterã¡ãœãã
puts person.name # getterã¡ãœãããåŒã³åºããŠåºåãã
puts person.age # ã€ã³ã¹ã¿ã³ã¹å€æ°ãçŽæ¥åç
§ããŠåºåãã
</syntaxhighlight>
=== ã¢ãžã¥ãŒã« ===
Rubyã§ã¯ãã¢ãžã¥ãŒã«ã䜿çšããŠãå
±éã®æ©èœããŸãšããããšãã§ããŸããã¢ãžã¥ãŒã«ã¯ãã¯ã©ã¹ã®ããã«æäœãå®çŸ©ããããšãã§ããŸãããã€ã³ã¹ã¿ã³ã¹ãäœæããããšã¯ã§ããŸããã
:<syntaxhighlight lang=ruby>
module Greeting
def hello
puts "Hello, Ruby!"
end
def goodbye
puts "Goodbye, Ruby!"
end
end
class Person
include Greeting
def initialize(name)
@name = name
end
def introduce
hello
puts "ç§ã¯#{@name}ã§ãã"
goodbye
end
end
person = Person.new("å±±ç°å€ªé")
person.introduce
</syntaxhighlight>
;å®è¡çµæ:<syntaxhighlight lang=text>
Hello, Ruby!
ç§ã¯å±±ç°å€ªéã§ãã
Goodbye, Ruby!
</syntaxhighlight>
== ããŒã¿æ§é ==
Rubyã¯ãå€ãã®äŸ¿å©ãªããŒã¿æ§é ããµããŒãããŠããŸãã以äžã«ããã€ãã®ä»£è¡šçãªããŒã¿æ§é ã®å®è£
äŸã瀺ããŸãã
=== é
å (Array) ===
Rubyã®ArrayïŒé
åïŒã¯ãè€æ°ã®èŠçŽ ãé åºä»ããŠæ ŒçŽããããŒã¿æ§é ã§ããé
åå
ã®èŠçŽ ã¯ã€ã³ããã¯ã¹ã«ãã£ãŠã¢ã¯ã»ã¹ããã0ããå§ãŸãæŽæ°ã®ã€ã³ããã¯ã¹ãå²ãåœãŠãããŸããRubyã®é
åã¯å¯å€é·ã§ãããç°ãªãããŒã¿åã®èŠçŽ ãå«ãããšãã§ããŸããé
åã¯äžæ¬åŒ§ <code>[]</code> ã䜿ã£ãŠäœæãããèŠçŽ ã¯ã«ã³ãã§åºåãããŸããäŸãã°ã<code>[1, "apple", :symbol, [2, 3], true]</code>ã®ããã«ãªããŸããé
åã¯ã€ãã¬ãŒã·ã§ã³ãæäœãæ€çŽ¢ãªã©å€ãã®æäœã«äŸ¿å©ã§ãããRubyã®ããã°ã©ãã³ã°ã§åºã䜿çšãããŸãã
{{See also|[https://docs.ruby-lang.org/en/3.3/Array.html class Array - Documentation for Ruby 3.3]}}
Rubyã®é
å (Array) ã¯ãã¹ã¿ãã¯ããã¥ãŒã®æ©èœãæã£ãŠããŸãããããã§ã¯åºæ¬çãªãªãã©ã«ãšã€ã³ããã¯ã¹ã䜿ã£ãèŠçŽ åç
§ãšæäœäŸããã¹ãã±ãŒã¹ã§ç€ºããŸãã
: [https://paiza.io/projects/qPb-Sy1CN5uYmFYbw7eyqA?language=ruby array.rb]
:<syntaxhighlight lang=ruby>
# frozen_string_literal: true
require 'minitest/spec'
require 'minitest/autorun'
describe Array do
let(:ary) { [] }
let(:numbers) { [1, 2, 3, 4, 5] }
let(:fruits) { %w[apple banana orange] }
describe 'empty array creation' do
it 'creates an empty array' do
expect(ary).must_equal []
end
it '#empty?' do
expect(ary.empty?).must_equal true
end
end
describe 'Array Manipulation' do
let(:ary) { [2, 3, 5, 7] }
it '#[]' do
expect(ary[2]).must_equal 5
expect(ary[-1]).must_equal 7
end
it '#[]=' do
ary[2] = 11
expect(ary).must_equal [2, 3, 11, 7]
ary[-3] = 13
expect(ary).must_equal [2, 13, 11, 7]
end
end
describe 'element deletion' do
it '#delete' do
fruits.delete('banana')
expect(fruits).must_equal %w[apple orange]
end
end
end
</syntaxhighlight>
=== ã¹ã¿ã㯠(Stack) ===
ã¹ã¿ãã¯æ§é ïŒStackïŒã¯ãããŒã¿ãäžæçã«ä¿åããããã®æœè±¡ããŒã¿åã®äžã€ã§ãããåŸå
¥ãå
åºãïŒLast-In, First-Out; LIFOïŒã®åäœãæã¡ãŸããããã¯ãæåŸã«è¿œå ãããèŠçŽ ãæåã«åãåºããããšããæå³ã§ããã¹ã¿ãã¯ã¯ãç©ççãªã¹ã¿ãã¯ãå±±ã®ãããªã€ã¡ãŒãžã§èª¬æãããããšããããŸãã
ã¹ã¿ãã¯ã¯ã以äžã®ãããªåºæ¬çãªæäœãæã¡ãŸã:
# push: ã¹ã¿ãã¯ã®äžçªäžïŒãããïŒã«èŠçŽ ãè¿œå ããæäœã
# pop: ã¹ã¿ãã¯ã®äžçªäžïŒãããïŒããèŠçŽ ãåãåºãæäœã
# peek: ã¹ã¿ãã¯ã®äžçªäžïŒãããïŒã«ããèŠçŽ ãååŸããããã¹ã¿ãã¯ããåé€ã¯ããªãæäœã
# empty?: ã¹ã¿ãã¯ã空ãã©ããã確èªããæäœã
ã¹ã¿ãã¯ã¯ãååž°çãªã¢ã«ãŽãªãºã ã®å®è£
ããããã¯ãã©ããã³ã°ãéããŒã©ã³ãèšæ³ãªã©ã®è¡šçŸæ¹æ³ã«äœ¿ãããããšããããŸãã
Rubyã®é
åã¯ã¹ã¿ãã¯ã®æ©èœãæã£ãŠããŠãpeek ã last ã®å¥åã«ããçšåºŠã§ã¹ã¿ãã¯ãå®è£
ã§ããŸãã
; [https://paiza.io/projects/-LZ4fZoivsXnMhX__NpRiw?language=ruby stack.rb]
:<syntaxhighlight lang=ruby>
class Stack < Array
alias peek last
end
# ãã¹ãã±ãŒã¹
require 'minitest/autorun'
describe Stack do
let(:stack) { Stack.new }
describe '#push' do
it 'adds an item to the stack' do
stack.push(1)
expect(stack.peek).must_equal 1
end
end
describe '#pop' do
it 'removes and returns the last item from the stack' do
stack.push(1)
expect(stack.pop).must_equal 1
expect(stack.empty?).must_equal true
end
end
describe '#peek' do
it 'returns the last item from the stack without removing it' do
stack.push(1)
expect(stack.peek).must_equal 1
expect(stack.empty?).must_equal false
end
end
describe '#empty?' do
it 'returns true if the stack is empty' do
expect(stack.empty?).must_equal true
end
it 'returns false if the stack is not empty' do
stack.push(1)
expect(stack.empty?).must_equal false
end
end
describe '#size' do
it 'returns the number of items in the stack' do
expect(stack.size).must_equal 0
stack.push(1)
expect(stack.size).must_equal 1
stack.push(2)
expect(stack.size).must_equal 2
end
end
describe 'Stack-specific behavior' do
it 'pops items in Last-In-First-Out order' do
stack.push(1)
stack.push(7)
stack.push(3)
stack.push(2)
stack.push(0)
expect(stack.pop).must_equal 0
expect(stack.pop).must_equal 2
expect(stack.pop).must_equal 3
expect(stack.pop).must_equal 7
expect(stack.pop).must_equal 1
expect(stack.pop).must_be_nil
end
end
end
</syntaxhighlight>
=== ãã¥ãŒ (Queue) ===
Ruby㯠QueueïŒãã¥ãŒïŒãæšæºã©ã€ãã©ãªã«æã£ãŠããŸãããããã¯Thread safeãªé«åºŠãªå®è£
ã§ãããã·ã³ã°ã«ã¹ã¬ããã§äœ¿ããšç©ºã®ãã¥ãŒããdeqãããšãããããã¯æ€ç¥ã«æµè§Šãããªã©ãã¹ã¬ããééä¿¡ã«ç¹åããŠããŸãã
ãŸããRubyã®é
åã¯ãã¥ãŒã®æ©èœãæã£ãŠããŠãpeek ã first ã®å¥åã«ãããªã©ã§ãã¥ãŒãå®è£
ã§ããŸãã
; [https://paiza.io/projects/srAPQ_fCPDzkQFvtDb_WcQ?language=ruby queue.rb]
:<syntaxhighlight lang=ruby>
class MyQueue < Array
alias enqueue push
alias dequeue shift
alias size length
alias peek first
end
require 'minitest/spec'
require 'minitest/autorun'
describe MyQueue do
let(:queue) { MyQueue.new }
describe 'empty queue creation' do
it 'creates an empty queue' do
expect(queue).must_equal []
end
it '#empty?' do
expect(queue.empty?).must_equal true
end
end
describe 'queue operation' do
it '#dequeue' do
expect(queue.dequeue).must_be_nil
end
it '#enqueue and #dequeue' do
queue.enqueue(1)
queue.enqueue(2).enqueue(3)
expect(queue.dequeue).must_equal 1
expect(queue.dequeue).must_equal 2
expect(queue.dequeue).must_equal 3
expect(queue.dequeue).must_be_nil
end
it '#size' do
expect(queue.size).must_equal 0
queue.enqueue(1)
queue.enqueue(2)
expect(queue.size).must_equal 2
end
it '#peek' do
queue.enqueue(1)
queue.enqueue(2)
expect(queue.peek).must_equal 1
expect(queue.size).must_equal 2
end
end
end
</syntaxhighlight>
=== é£çµãªã¹ã (Linked List) ===
Rubyã«ã¯ãæšæºã©ã€ãã©ãªã«é£çµãªã¹ã (Linked List)ã®å®è£
ã¯å«ãŸããŠããŸããããé
åïŒArrayïŒã¯æäŸãããŠããŸããé
åã¯ã€ã³ããã¯ã¹ã«ããã©ã³ãã ã¢ã¯ã»ã¹ãåçãªãµã€ãºå€æŽãå¯èœã§ãå€ãã®å Žåã§å¹ççãªããŒã¿æ§é ã§ãã
äžæ¹ã§ããªã³ã¯ãªã¹ãã¯ã¡ã¢ãªå
ã®é£ç¶ããé åã䜿çšããããã€ã³ã¿ãŒã«ãã£ãŠåèŠçŽ ã次ã®èŠçŽ ãæã瀺ã圢ã§ããŒã¿ãæ ŒçŽããŸããããã«ãããæ¿å
¥ãåé€ãªã©ã®æäœãå¹ççã«è¡ããŸãããã©ã³ãã ã¢ã¯ã»ã¹ãã§ããªããããèŠçŽ ãé ã«ãã©ãå¿
èŠããããŸãã
Rubyã§ãªã³ã¯ãªã¹ããå®è£
ããå Žåãç¬èªã®ã¯ã©ã¹ãå®çŸ©ããããããã®èŠçŽ ã次ã®èŠçŽ ãæããã€ã³ã¿ãŒãæã€ããã«ããããšãäžè¬çã§ãããã ããRubyã«ãããŠé
åãå€ãã®ã±ãŒã¹ã§ååã«å¹ççãªããŒã¿æ§é ã§ããããããªã³ã¯ãªã¹ããå®è£
ããå¿
èŠãããå Žåã¯ããã®äœ¿çšã±ãŒã¹ãç¹å®ã®æ¡ä»¶ãæºãããŠãããã©ãããæ€èšããããšãéèŠã§ãã
: [https://paiza.io/projects/YXAK9IuJRbULI1TlDM7lFQ?language=ruby list.rb]
:<syntaxhighlight lang=ruby>
# frozen_string_literal: true
class List < Array
def to_s = "(#{join(' ')})"
def inspect = "#{self.class}(#{to_a.join ', '})"
end
require 'minitest/spec'
describe List do
let(:list0) { List.new }
let(:list3) do
list = List.new
[1, 2, 3].each{ |el| list.push el }
list
end
describe '#initialize' do
it 'initializes an empty list if no arguments are provided' do
list = List.new
expect(list.to_a).must_equal []
end
end
describe '#unshift' do
it 'adds elements to the beginning of the list' do
list0.unshift(1).unshift(2).unshift(3)
expect(list0.to_a).must_equal [3, 2, 1]
end
end
describe '#push' do
it 'adds elements to the end of the list' do
list0.push(1).push(2).push(3)
expect(list0.to_a).must_equal [1, 2, 3]
end
end
describe '#shift' do
it 'removes and returns the first element from the list' do
expect(list3.shift).must_equal 1
expect(list3.to_a).must_equal [2, 3]
end
it 'Ill. shift args.' do
expect { list3.shift('unexpected') }.must_raise TypeError
end
it 'returns nil if the list is empty' do
expect(list0.shift).must_be_nil
end
end
describe '#pop' do
it 'removes and returns the last element from the list' do
expect(list3.pop).must_equal 3
expect(list3.to_a).must_equal [1, 2]
end
it 'Ill. pop args.' do
expect { list3.shift('unexpected') }.must_raise TypeError
end
it 'returns nil if the list is empty' do
expect(list0.pop).must_be_nil
end
end
describe '#each' do
it 'iterates over each element in the list' do
result = []
list3.each { |x| result << x }
expect(result).must_equal [1, 2, 3]
end
it 'returns an enumerator if no block is given' do
expect(list3.each).must_be_kind_of Enumerator
end
end
describe '#to_s' do
it 'returns a string representation of the list' do
expect(list3.to_s).must_equal "(1 2 3)"
end
end
describe '#inspect' do
it 'returns a debug representation of the list' do
expect(list3.inspect).must_equal "List(1, 2, 3)"
end
end
describe '#empty?' do
it 'empty' do
expect(list0.empty?).must_equal true
expect(list3.empty?).must_equal false
end
end
end
Minitest.run if $PROGRAM_NAME == __FILE__
</syntaxhighlight>
=== ããã·ã¥ (Hash) ===
Rubyã®HashïŒããã·ã¥ïŒã¯ãããŒãšå€ã®ãã¢ãæ ŒçŽããããŒã¿æ§é ã§ããããŒãšå€ã¯é¢é£ä»ããããããŒã¯äžæã§éè€ããªãå¿
èŠããããŸããHashã¯ããã·ã¥ããŒãã«ãåºã«ããŠãããé«éãªããŒã¿ã®æ€çŽ¢ãååŸãå¯èœã§ããHashã¯äžæ¬åŒ§ <code>{}</code> ã䜿ã£ãŠäœæããããŒãšå€ã¯ <code>ã㌠=> å€</code> ã®åœ¢åŒã§èšè¿°ããŸããäŸãã°ã<code>{ key1 => value1, key2 => value2 }</code> ã®ããã«ãªããŸããããŸããŸãªãªããžã§ã¯ããããŒãšããŠå©çšã§ããHashã¯Rubyããã°ã©ãã³ã°ã§é »ç¹ã«äœ¿çšãããŸãããŸãããŒãã·ã³ãã«ïŒSymbolïŒã®å Žå㯠<code>{ :key1 => value1, :key2 => value2 }</code> ã<code>{ key1: value1, key2: value2 }</code> ãšæžãçç¥èšæ³ããããŸãã
{{See also|[https://docs.ruby-lang.org/en/3.3/Hash.html class Hash - Documentation for Ruby 3.3]}}
; [https://paiza.io/projects/HFHVJMD-W6ld_zd2FEF2rA?language=ruby hash.rb]
:<syntaxhighlight lang=ruby>
# frozen_string_literal: true
require 'minitest/spec'
require 'minitest/autorun'
describe Hash do
let(:assoc) { {} }
let(:fruits) { {apple: 150, banana: 230, orange: 198 } }
describe 'empty array creation' do
it 'creates an empty array' do
expect(assoc).must_equal ({})
end
it '#empty?' do
expect(assoc.empty?).must_equal true
end
end
describe 'Hash Manipulation' do
let(:tbl) { {a:2, b:3, c:5, d:7} }
it '#[]' do
expect(tbl[:c]).must_equal 5
expect(tbl[:d]).must_equal 7
expect(tbl[:x]).must_be_nil
end
it '#[]=' do
tbl[:x] = 11
tbl[:a] = 13
expect(tbl).must_equal ({:a=>13, :b=>3, :c=>5, :d=>7, :x=>11})
end
end
describe 'element deletion' do
it '#delete' do
fruits.delete('banana')
expect(fruits).must_equal ({:apple=>150, :banana=>230, :orange=>198})
fruits.delete('cherry')
expect(fruits).must_equal ({:apple=>150, :banana=>230, :orange=>198})
end
end
end
</syntaxhighlight>
=== æšæ§é (Tree) ===
Rubyã«ã¯ãæšæºã©ã€ãã©ãªã«æšæ§é ã®å®è£
ã¯å«ãŸããŠããŸããããç¬èªã®ã¯ã©ã¹ãå®çŸ©ããŠæšæ§é ãå®è£
ããããšãã§ããŸãã
éåžžãæšæ§é ã¯ããŒããšåŒã°ãããªããžã§ã¯ãããæ§æãããåããŒãã¯ããŒã¿ãä¿æããä»ã®ããŒããžã®åç
§ãæã¡ãŸããæ ¹ããŒãããå§ãŸããããããã®ããŒããåããŒããæã€ããšããããŸããéåžžãæšæ§é ã¯ååž°çãªããŒã¿æ§é ã§ãããååž°çãªã¢ã«ãŽãªãºã ã䜿çšããŠæäœãããŸãã
; [https://paiza.io/projects/zgh4iFJ7W7qToza__t_OKQ?language=ruby tree.rb]
:<syntaxhighlight lang=ruby>
# frozen_string_literal: true
class Tree
include Enumerable
Node = Struct.new(:value, :left, :right)
def initialize(*_args)
@root = nil
end
def height(node = @root) = node.nil? ? 0 : 1 + [height(node.left), height(node.right)].max
def each(node = @root, &block)
return to_enum(__method__, node) unless block
def core(node, &block)
return if node.nil?
core(node.left, &block)
yield node.value
core(node.right, &block)
end
core(node, &block)
self
end
def insert(value, node = @root)
check_value(value)
def core(value, node)
return Node.new(value) if node.nil?
case value <=> node.value
when -1 then node.left = core(value, node.left)
when 1 then node.right = core(value, node.right)
when 0 # sum value
else raise TypeError, value.inspect
end
node
end
@root = core(value, node)
self
end
def search(key, node = @root)
check_value(key)
def core(key, node)
return false if node.nil?
case key <=> node.value
when -1 then core(key, node.left)
when +1 then core(key, node.right)
when 0 then true
else raise TypeError, "#{self.class}#core: #{key.inspect}"
end
end
core(key, node)
end
def delete(key, node = @root)
check_value(key)
def core(key, node)
return node if node.nil?
case key <=> node.value
when -1
node.left = core(key, node.left)
return node
when +1
node.right = core(key, node.right)
return node
when 0 # sum value
else raise TypeError, value.inspect
end
if node.left.nil?
return node.right
else
succParent, succ = node, node.right
succParent, succ = succ, succ.left while succ.left
if succParent != node
succParent.left = succ.right
else
succParent.right = succ.right
end
node.value = succ.value
node
end
end
@root = core(key, node)
self
end
def to_s = "(#{to_a.join ' '})"
def inspect ="#{self.class}(#{to_a.join ', '})"
protected
def check_value(value)
raise TypeError, "Invalid value: #{value.inspect}" unless value.respond_to?(:<)
raise TypeError, "Invalid value: #{value.inspect}" if value.is_a?(Numeric) && !value.finite?
end
end
require 'minitest/spec'
require 'minitest/autorun'
describe Tree do
let(:tree0) { Tree.new }
let(:tree3) do
tree = Tree.new
[1, 2, 3].each { |el| tree.insert el }
tree
end
describe '#initialize' do
it 'initializes an empty list if no arguments are provided' do
expect(tree0.to_a).must_equal []
end
end
describe '#insert' do
let(:ary) { (0...1000).to_a }
it 'adds elements to tree' do
tree0.insert 10
expect(tree0.to_a).must_equal [10]
tree0.insert 20
expect(tree0.to_a).must_equal [10, 20]
tree0.insert 30
expect(tree0.to_a).must_equal [10, 20, 30]
tree0.insert 25
expect(tree0.to_a).must_equal [10, 20, 25, 30]
tree0.insert 15
expect(tree0.to_a).must_equal [10, 15, 20, 25, 30]
end
it 'adds elements to tree by sequebce order' do
ary.each { |el| tree0.insert el }
expect(tree0.to_a).must_equal ary
end
it 'adds elements to tree by shuffle' do
ary.shuffle.each { |el| tree0.insert el }
expect(tree0.to_a).must_equal ary
end
end
describe '#search' do
it 'find' do
expect(tree3.to_a).must_equal [1, 2, 3]
expect(tree3.search(1)).must_equal true
expect(tree3.search(3)).must_equal true
expect(tree3.search(2)).must_equal true
end
it 'nofound' do
expect(tree3.to_a).must_equal [1, 2, 3]
expect(tree3.search(0)).must_equal false
expect(tree3.search(100)).must_equal false
expect(tree3.search(4)).must_equal false
end
end
describe '#delete' do
it 'find' do
expect(tree3.to_a).must_equal [1, 2, 3]
expect(tree3.delete(1)).must_be_kind_of Tree
expect(tree3.to_a).must_equal [2, 3]
expect(tree3.delete(3)).must_be_kind_of Tree
expect(tree3.to_a).must_equal [2]
expect(tree3.delete(2)).must_be_kind_of Tree
expect(tree3.to_a).must_equal []
end
it 'nofound' do
expect(tree3.to_a).must_equal [1, 2, 3]
expect(tree3.delete(0)).must_be_kind_of Tree
expect(tree3.delete(100)).must_be_kind_of Tree
expect(tree3.delete(4)).must_be_kind_of Tree
expect(tree3.to_a).must_equal [1, 2, 3]
end
end
end
</syntaxhighlight>
== ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãšãã¶ã€ã³ãã¿ãŒã³ ==
ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã¯ãããã°ã©ãã³ã°ã®äžçš®ã§ããªããžã§ã¯ããšåŒã°ããããŒã¿æ§é ãšãããããæäœããã¡ãœãããäžå¿ã«æ§æãããŠããŸãããªããžã§ã¯ãã¯ãããèªäœãç¬èªã®ç¶æ
ãæã¡ãä»ã®ãªããžã§ã¯ããšçžäºäœçšããããšãã§ããŸãããã®ããã«ããªããžã§ã¯ãæåããã°ã©ãã³ã°ã¯ãè€éãªåé¡ãæ±ãããããä¿å®æ§ãšæ¡åŒµæ§ã«åªããã³ãŒããæžãããšãã§ããŸãã
ãã¶ã€ã³ãã¿ãŒã³ã¯ããªããžã§ã¯ãæåããã°ã©ãã³ã°ã«ãããåå©çšå¯èœãªãœãªã¥ãŒã·ã§ã³ã®ããšã§ãããã¶ã€ã³ãã¿ãŒã³ã¯ãå
±éã®åé¡ã«å¯Ÿãã解決çãæäŸããã³ãŒãã®åå©çšæ§ãä¿å®æ§ãæ¡åŒµæ§ãåäžãããŸãããã¶ã€ã³ãã¿ãŒã³ã¯ãäžè¬çãªã³ãŒãã£ã³ã°ã®ãã¹ããã©ã¯ãã£ã¹ãäœç³»åããæšæºåãããæ¹æ³ã§åé¡ã解決ããããã®æ çµã¿ãæäŸããããããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®éèŠãªæŠå¿µã§ãã
ãã¶ã€ã³ãã¿ãŒã³ã¯ãGoF(Gang of Four)ãå®çŸ©ãã23ã®ãã¿ãŒã³ãæãæåã§ãããããã®ãã¿ãŒã³ã¯ãããããç¹å®ã®åé¡ã解決ããããã«äœ¿çšãããŸããäŸãã°ãã·ã³ã°ã«ãã³ãã¿ãŒã³ã¯ãç¹å®ã®ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãå¿
èŠãªå Žåã«ã1ã€ã®ã€ã³ã¹ã¿ã³ã¹ããäœæããªãããã«ããããã«äœ¿çšãããŸãããã¡ã¯ããªãŒãã¿ãŒã³ã¯ãç°ãªãçš®é¡ã®ãªããžã§ã¯ããäœæããããã«äœ¿çšãããŸãããŸããã¹ãã©ããžãŒãã¿ãŒã³ã¯ãã¢ã«ãŽãªãºã ã®ãã¡ããªãŒãå®çŸ©ããããããã«ãã»ã«åããçžäºã«äº€æå¯èœã«ããããã«äœ¿çšãããŸãã
ãã¶ã€ã³ãã¿ãŒã³ã¯ããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®åºç€ã§ãããåå©çšå¯èœãªã³ãŒããæžãããã«éåžžã«éèŠã§ãããªããžã§ã¯ãæåããã°ã©ãã³ã°ãåŠã¶éã«ã¯ããã¶ã€ã³ãã¿ãŒã³ãäžç·ã«åŠã¶ããšããå§ãããŸãã
{{See|ãã¶ã€ã³ãã¿ãŒã³}}
=== ãã¡ã¯ããªãŒã¡ãœãããã¿ãŒã³ ===
ãã¡ã¯ããªãŒã¡ãœãããã¿ãŒã³ã¯ãã€ã³ã¹ã¿ã³ã¹ã®çæãå°éã«è¡ãã¯ã©ã¹ãå®çŸ©ããããšã§ãè€éãªã€ã³ã¹ã¿ã³ã¹ã®çæåŠçãé èœãããã¿ãŒã³ã§ãã
:<syntaxhighlight lang=ruby>
class AnimalFactory
def create_animal(type, name)
case type
when :cat
Cat.new(name)
when :dog
Dog.new(name)
end
end
end
class Cat
def initialize(name)
@name = name
end
def speak
puts "#{@name}ããã£ãŒãšé³ŽããŸããã"
end
end
class Dog
def initialize(name)
@name = name
end
def speak
puts "#{@name}ãã¯ã³ã¯ã³é³ŽããŸããã"
end
end
factory = AnimalFactory.new
animal1 = factory.create_animal(:cat, "ããŸ")
animal1.speak # => ããŸããã£ãŒãšé³ŽããŸããã
animal2 = factory.create_animal(:dog, "ãã")
animal2.speak # => ãããã¯ã³ã¯ã³é³ŽããŸããã
</syntaxhighlight>
=== ã·ã³ã°ã«ãã³ãã¿ãŒã³ ===
ã·ã³ã°ã«ãã³ãã¿ãŒã³ã¯ãã€ã³ã¹ã¿ã³ã¹ã1ã€ã ãçæãããããå
±æãããã¿ãŒã³ã§ãã
:<syntaxhighlight lang=ruby>
class SingletonObject
private_class_method :new
@@instance = nil
def self.instance
@@instance ||= new
end
def message
puts "Hello, Singleton!"
end
end
singleton1 = SingletonObject.instance
singleton1.message # => Hello, Singleton!
singleton2 = SingletonObject.instance
puts singleton1 == singleton2 # => true
</syntaxhighlight>
äžèšã®ã³ãŒãã¯èª¬æã®ããã«å®è£
ã®çŽ°éšã瀺ããŸããããRubyã«ã¯ã·ã³ã°ã«ãã³ãå®è£
ããããã®ã¢ãžã¥ãŒã« <code>Singleton</code> ããããŸãã
:<syntaxhighlight lang=ruby>
require 'singleton'
class SingletonObject
include Singleton
def message
puts "Hello, Singleton!"
end
end
singleton1 = SingletonObject.instance
singleton1.message # => Hello, Singleton!
singleton2 = SingletonObject.instance
puts singleton1 == singleton2 # => true
</syntaxhighlight>
<code>Singleton</code> ã¢ãžã¥ãŒã«ã¯ãã·ã³ã°ã«ãã³ãã¿ãŒã³ã®å®è£
ãæ¯æŽããããã®ãã®ã§ãããã¯ã©ã¹ã« <code>include Singleton</code> ãè¿œå ããããšã§ã·ã³ã°ã«ãã³ãã¿ãŒã³ãå©çšã§ããããã«ãªããŸãã<code>Singleton</code> ã¢ãžã¥ãŒã«ã¯ã¯ã©ã¹ã¡ãœãã <code>instance</code> ãæäŸãããã®ã¡ãœãããåŒã³åºãããšã§å¯äžã®ã€ã³ã¹ã¿ã³ã¹ãååŸã§ããŸãããŸãã<code>clone</code> ã <code>dup</code> ã¡ãœããããªãŒããŒã©ã€ããããŠãããããã«ããã·ã³ã°ã«ãã³ã€ã³ã¹ã¿ã³ã¹ã®ã¯ããŒã³ãè€è£œãé²ãããŠããŸãã
== ãŸãšã ==
ãã®æ¬ã§ã¯ãRubyã䜿çšãããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®åºæ¬çãªæŠå¿µãšäœ¿ãæ¹ã«ã€ããŠåŠã³ãŸããããŸããå¿çšçãªäœ¿ãæ¹ãšããŠããã¡ã¯ããªãŒã¡ãœãããã¿ãŒã³ãã·ã³ã°ã«ãã³ãã¿ãŒã³ã«ã€ããŠã玹ä»ããŸããã
ãããã®æŠå¿µã䜿ãæ¹ã¯ãããã°ã©ãã³ã°ã«ãããŠéåžžã«éèŠãªãã®ã§ããããããã®ç解ãšç¿åŸã¯ãããã°ã©ãã³ã°ã¹ãã«ã®åäžã«ã€ãªãããŸãã
ç¹ã«ããªããžã§ã¯ãæåããã°ã©ãã³ã°ã¯ãè€éãªåŠçãæ±ãå Žåã«éåžžã«æçšã§ãããªããžã§ã¯ãæåããã°ã©ãã³ã°ã«ãã£ãŠãåŠçããªããžã§ã¯ãã«åå²ããããšã§ã倧èŠæš¡ãªããã°ã©ã ã®éçºã容æã«ãªããä¿å®æ§ãæ¡åŒµæ§ãåäžããŸãã
æ¬æžã§åŠãã å
容ãå®è·µçã«æŽ»çšãããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®ã¹ãã«ãåäžãããããšããå§ãããŸãããŸããæ¬æžãããã°ã©ãã³ã°ã®åå¿è
ã§ãç解ã§ããããã«é
æ
®ããŠå·çããŠããŸãã®ã§ãããã°ã©ãã³ã°ã®ååŠè
ã«ãæ¯éææŠããŠããã ããããšæããŸãã
[[ã«ããŽãª:Ruby]] | 2023-03-26T02:43:19Z | 2024-03-08T01:22:46Z | [
"ãã³ãã¬ãŒã:ã³ã©ã ",
"ãã³ãã¬ãŒã:See also",
"ãã³ãã¬ãŒã:See"
] | https://ja.wikibooks.org/wiki/%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0/Ruby_%E3%81%A7%E5%AD%A6%E3%81%B6%E3%82%AA%E3%83%96%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E6%8C%87%E5%90%91%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0 |
37,362 | ããã°ã©ãã³ã°/JavaScript ã§åŠã¶ãããã¿ã€ãããŒã¹ãªããžã§ã¯ãæåããã°ã©ãã³ã° | JavaScriptã¯ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåèšèªã§ãããã¯ã©ã¹ããŒã¹ã®ãªããžã§ã¯ãæåèšèªãšã¯ç°ãªãã¢ãããŒããæ¡çšããŠããŸãã以äžã§ã¯ãJavaScriptã§ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãåŠã¶ããã®åºæ¬çãªæŠå¿µã玹ä»ããŸãã
ãããã¿ã€ãã¯ããªããžã§ã¯ãã®ååãè¡šããŸããJavaScriptã§ã¯ããã¹ãŠã®ãªããžã§ã¯ãã¯ãããã¿ã€ããæã¡ããã®ãããã¿ã€ãã¯å¥ã®ãªããžã§ã¯ããšããŠå®çŸ©ãããŸãããªããžã§ã¯ããæã€ããããã£ãã¡ãœããã¯ããã®ãªããžã§ã¯ãã®ãããã¿ã€ãããç¶æ¿ãããŸãã
以äžã¯ããããã¿ã€ããå®çŸ©ããæ¹æ³ã®äžäŸã§ãã
ãã®äŸã§ã¯ãPersonãšããã³ã³ã¹ãã©ã¯ã¿é¢æ°ãå®çŸ©ãããã®ãããã¿ã€ãã«greetãšããã¡ãœãããè¿œå ããŠããŸããnewããŒã¯ãŒãã䜿ã£ãŠPersonãã€ã³ã¹ã¿ã³ã¹åããgreetã¡ãœãããåŒã³åºãããšãã§ããŸãã
JavaScriptã§ã¯ããªããžã§ã¯ããæã€ããããã£ãã¡ãœãããååšããªãå Žåããã®ãªããžã§ã¯ãã®ãããã¿ã€ãããé ã«æ¢çŽ¢ãè¡ãããŸãããã®æ¢çŽ¢ã®ä»çµã¿ããããã¿ã€ããã§ãŒã³ãšåŒã³ãŸãã
以äžã¯ããããã¿ã€ããã§ãŒã³ãå©çšããäŸã§ãã
ãã®äŸã§ã¯ãEmployeeãšããã³ã³ã¹ãã©ã¯ã¿é¢æ°ãå®çŸ©ããPersonããç¶æ¿ããŠgreetã¡ãœãããå©çšããŠããŸããObject.createã¡ãœããã䜿ã£ãŠPerson.prototypeãç¶æ¿ããEmployee.prototypeãå®çŸ©ããEmployeeèªèº«ã®workã¡ãœãããè¿œå ããŠããŸããnewãã¯ãŒãã䜿ã£ãŠEmployeeãã€ã³ã¹ã¿ã³ã¹åããgreetã¡ãœãããšworkã¡ãœãããåŒã³åºãããšãã§ããŸãã
ES6以éãJavaScriptã§ã¯ã¯ã©ã¹ã®ãããªæ§æãå°å
¥ãããããç°¡æœã«ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãè¡ãããšãã§ããããã«ãªããŸããã
以äžã¯ãã¯ã©ã¹ã®ãããªæ§æã䜿ã£ãäŸã§ãã
ãã®äŸã§ã¯ãclassããŒã¯ãŒãã䜿ã£ãŠPersonã¯ã©ã¹ãšEmployeeã¯ã©ã¹ãå®çŸ©ããextendsããŒã¯ãŒãã䜿ã£ãŠPersonãç¶æ¿ããŠããŸãããŸããconstructorã¡ãœãããå®çŸ©ããŠã€ã³ã¹ã¿ã³ã¹ã®åæåãè¡ããããããã®ã¯ã©ã¹ã«ã¡ãœãããè¿œå ããŠããŸããsuperããŒã¯ãŒãã䜿ã£ãŠèŠªã¯ã©ã¹ã®ã³ã³ã¹ãã©ã¯ã¿ãã¡ãœãããåŒã³åºãããšãã§ããŸãã
ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã«ã¯ã以äžã®ãããªé·æãšçæããããŸãã
以äžãããããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã®é·æãšçæã§ããããã°ã©ããŒã¯ãèªåãéçºããã¢ããªã±ãŒã·ã§ã³ã®èŠä»¶ã«åãããŠããããã¿ã€ãããŒã¹ãªèšèªãéžæããããã¯ã©ã¹ããŒã¹ãªèšèªãéžæããããå€æããå¿
èŠããããŸãã
以äžã¯ããããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã«é¢é£ããçšèªéã§ãã
以äžãããããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã«é¢é£ããçšèªéã§ãã
ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã¯ãå€æ°ååšããŸãã以äžã«ããã®äžãã代衚çãªãã®ãããã€ã玹ä»ããŸãã
JavaScriptã¯ãWebãã©ãŠã¶ã§åäœããã¹ã¯ãªããèšèªã§ãããçŸåšæãåºã䜿çšãããŠãããããã¿ã€ãããŒã¹ãªèšèªã®äžã€ã§ããJavaScriptã¯ããªããžã§ã¯ãããããã¿ã€ããã§ãŒã³ã§ç¶æ¿ããããšãã§ãããŸããmixinã䜿çšããããšã§è€æ°ã®ãªããžã§ã¯ãããæ©èœãåã蟌ãããšãã§ããŸãã
Luaã¯ã軜éã§é«éãªã¹ã¯ãªããèšèªã§ããããããã¿ã€ãããŒã¹ãªèšèªã®äžã€ã§ããLuaã¯ããªããžã§ã¯ããããŒãã«ãšããŠè¡šçŸããããŒãã«ã®äžã«ä»ã®ããŒãã«ãå«ããããšã§ç¶æ¿ãå®çŸããŸãã
Selfã¯ããªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã®äžã€ã§ããããããã¿ã€ãããŒã¹ãªèšèªã®å
é§ããšãªããŸãããSelfã¯ããªããžã§ã¯ãããããã¿ã€ããšããŠè¡šçŸãããããã¿ã€ãããç¶æ¿ããããšã§ããªããžã§ã¯ãã®æ¯ãèããå®çŸ©ããŸãã
Ioã¯ãå°èŠæš¡ãªã¹ã¯ãªããèšèªã§ããããããã¿ã€ãããŒã¹ãªèšèªã®äžã€ã§ããIoã¯ãã¡ãã»ãŒãžããã·ã³ã°ã«ãã£ãŠãªããžã§ã¯ãéã®éä¿¡ãè¡ããŸãããŸããIoã¯ããããã¿ã€ããã³ããŒããŠæ°ãããªããžã§ã¯ããäœæããããšã§ç¶æ¿ãå®çŸããŸãã
NewtonScriptã¯ãAppleã®PDAãNewtonãã§äœ¿çšãããã¹ã¯ãªããèšèªã§ããããããã¿ã€ãããŒã¹ãªèšèªã®äžã€ã§ããNewtonScriptã¯ããªããžã§ã¯ããã¹ããããšããŠè¡šçŸããã¹ãããããç¶æ¿ããããšã§ããªããžã§ã¯ãã®æ¯ãèããå®çŸ©ããŸãã
以äžãããããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã®äžéšã§ããä»ã«ãå€æ°ã®èšèªãååšããŸãã
JavaScriptã§ã¯ããããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãæ¡çšãããŠããŸãããããã¿ã€ãã¯ãªããžã§ã¯ãã®ååãè¡šãããããã¿ã€ããã§ãŒã³ã«ãã£ãŠç¶æ¿ãè¡ãããŸããES6以éã§ã¯ãã¯ã©ã¹ã®ãããªæ§æãå°å
¥ãããããç°¡æœã«ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãè¡ãããšãã§ããŸãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "JavaScriptã¯ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåèšèªã§ãããã¯ã©ã¹ããŒã¹ã®ãªããžã§ã¯ãæåèšèªãšã¯ç°ãªãã¢ãããŒããæ¡çšããŠããŸãã以äžã§ã¯ãJavaScriptã§ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãåŠã¶ããã®åºæ¬çãªæŠå¿µã玹ä»ããŸãã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ãããã¿ã€ãã¯ããªããžã§ã¯ãã®ååãè¡šããŸããJavaScriptã§ã¯ããã¹ãŠã®ãªããžã§ã¯ãã¯ãããã¿ã€ããæã¡ããã®ãããã¿ã€ãã¯å¥ã®ãªããžã§ã¯ããšããŠå®çŸ©ãããŸãããªããžã§ã¯ããæã€ããããã£ãã¡ãœããã¯ããã®ãªããžã§ã¯ãã®ãããã¿ã€ãããç¶æ¿ãããŸãã",
"title": "ãããã¿ã€ã"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "以äžã¯ããããã¿ã€ããå®çŸ©ããæ¹æ³ã®äžäŸã§ãã",
"title": "ãããã¿ã€ã"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "ãã®äŸã§ã¯ãPersonãšããã³ã³ã¹ãã©ã¯ã¿é¢æ°ãå®çŸ©ãããã®ãããã¿ã€ãã«greetãšããã¡ãœãããè¿œå ããŠããŸããnewããŒã¯ãŒãã䜿ã£ãŠPersonãã€ã³ã¹ã¿ã³ã¹åããgreetã¡ãœãããåŒã³åºãããšãã§ããŸãã",
"title": "ãããã¿ã€ã"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "JavaScriptã§ã¯ããªããžã§ã¯ããæã€ããããã£ãã¡ãœãããååšããªãå Žåããã®ãªããžã§ã¯ãã®ãããã¿ã€ãããé ã«æ¢çŽ¢ãè¡ãããŸãããã®æ¢çŽ¢ã®ä»çµã¿ããããã¿ã€ããã§ãŒã³ãšåŒã³ãŸãã",
"title": "ãããã¿ã€ããã§ãŒã³"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "以äžã¯ããããã¿ã€ããã§ãŒã³ãå©çšããäŸã§ãã",
"title": "ãããã¿ã€ããã§ãŒã³"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "ãã®äŸã§ã¯ãEmployeeãšããã³ã³ã¹ãã©ã¯ã¿é¢æ°ãå®çŸ©ããPersonããç¶æ¿ããŠgreetã¡ãœãããå©çšããŠããŸããObject.createã¡ãœããã䜿ã£ãŠPerson.prototypeãç¶æ¿ããEmployee.prototypeãå®çŸ©ããEmployeeèªèº«ã®workã¡ãœãããè¿œå ããŠããŸããnewãã¯ãŒãã䜿ã£ãŠEmployeeãã€ã³ã¹ã¿ã³ã¹åããgreetã¡ãœãããšworkã¡ãœãããåŒã³åºãããšãã§ããŸãã",
"title": "ãããã¿ã€ããã§ãŒã³"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "ES6以éãJavaScriptã§ã¯ã¯ã©ã¹ã®ãããªæ§æãå°å
¥ãããããç°¡æœã«ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãè¡ãããšãã§ããããã«ãªããŸããã",
"title": "ã¯ã©ã¹ã®ãããªæ§æ"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "以äžã¯ãã¯ã©ã¹ã®ãããªæ§æã䜿ã£ãäŸã§ãã",
"title": "ã¯ã©ã¹ã®ãããªæ§æ"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "ãã®äŸã§ã¯ãclassããŒã¯ãŒãã䜿ã£ãŠPersonã¯ã©ã¹ãšEmployeeã¯ã©ã¹ãå®çŸ©ããextendsããŒã¯ãŒãã䜿ã£ãŠPersonãç¶æ¿ããŠããŸãããŸããconstructorã¡ãœãããå®çŸ©ããŠã€ã³ã¹ã¿ã³ã¹ã®åæåãè¡ããããããã®ã¯ã©ã¹ã«ã¡ãœãããè¿œå ããŠããŸããsuperããŒã¯ãŒãã䜿ã£ãŠèŠªã¯ã©ã¹ã®ã³ã³ã¹ãã©ã¯ã¿ãã¡ãœãããåŒã³åºãããšãã§ããŸãã",
"title": "ã¯ã©ã¹ã®ãããªæ§æ"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã«ã¯ã以äžã®ãããªé·æãšçæããããŸãã",
"title": "ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã®é·æãšçæ"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "以äžãããããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã®é·æãšçæã§ããããã°ã©ããŒã¯ãèªåãéçºããã¢ããªã±ãŒã·ã§ã³ã®èŠä»¶ã«åãããŠããããã¿ã€ãããŒã¹ãªèšèªãéžæããããã¯ã©ã¹ããŒã¹ãªèšèªãéžæããããå€æããå¿
èŠããããŸãã",
"title": "ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã®é·æãšçæ"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "以äžã¯ããããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã«é¢é£ããçšèªéã§ãã",
"title": "ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªçšèªé"
},
{
"paragraph_id": 13,
"tag": "p",
"text": "以äžãããããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã«é¢é£ããçšèªéã§ãã",
"title": "ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªçšèªé"
},
{
"paragraph_id": 14,
"tag": "p",
"text": "ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã¯ãå€æ°ååšããŸãã以äžã«ããã®äžãã代衚çãªãã®ãããã€ã玹ä»ããŸãã",
"title": "ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªäŸ¿èŠ§"
},
{
"paragraph_id": 15,
"tag": "p",
"text": "JavaScriptã¯ãWebãã©ãŠã¶ã§åäœããã¹ã¯ãªããèšèªã§ãããçŸåšæãåºã䜿çšãããŠãããããã¿ã€ãããŒã¹ãªèšèªã®äžã€ã§ããJavaScriptã¯ããªããžã§ã¯ãããããã¿ã€ããã§ãŒã³ã§ç¶æ¿ããããšãã§ãããŸããmixinã䜿çšããããšã§è€æ°ã®ãªããžã§ã¯ãããæ©èœãåã蟌ãããšãã§ããŸãã",
"title": "ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªäŸ¿èŠ§"
},
{
"paragraph_id": 16,
"tag": "p",
"text": "Luaã¯ã軜éã§é«éãªã¹ã¯ãªããèšèªã§ããããããã¿ã€ãããŒã¹ãªèšèªã®äžã€ã§ããLuaã¯ããªããžã§ã¯ããããŒãã«ãšããŠè¡šçŸããããŒãã«ã®äžã«ä»ã®ããŒãã«ãå«ããããšã§ç¶æ¿ãå®çŸããŸãã",
"title": "ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªäŸ¿èŠ§"
},
{
"paragraph_id": 17,
"tag": "p",
"text": "Selfã¯ããªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã®äžã€ã§ããããããã¿ã€ãããŒã¹ãªèšèªã®å
é§ããšãªããŸãããSelfã¯ããªããžã§ã¯ãããããã¿ã€ããšããŠè¡šçŸãããããã¿ã€ãããç¶æ¿ããããšã§ããªããžã§ã¯ãã®æ¯ãèããå®çŸ©ããŸãã",
"title": "ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªäŸ¿èŠ§"
},
{
"paragraph_id": 18,
"tag": "p",
"text": "Ioã¯ãå°èŠæš¡ãªã¹ã¯ãªããèšèªã§ããããããã¿ã€ãããŒã¹ãªèšèªã®äžã€ã§ããIoã¯ãã¡ãã»ãŒãžããã·ã³ã°ã«ãã£ãŠãªããžã§ã¯ãéã®éä¿¡ãè¡ããŸãããŸããIoã¯ããããã¿ã€ããã³ããŒããŠæ°ãããªããžã§ã¯ããäœæããããšã§ç¶æ¿ãå®çŸããŸãã",
"title": "ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªäŸ¿èŠ§"
},
{
"paragraph_id": 19,
"tag": "p",
"text": "NewtonScriptã¯ãAppleã®PDAãNewtonãã§äœ¿çšãããã¹ã¯ãªããèšèªã§ããããããã¿ã€ãããŒã¹ãªèšèªã®äžã€ã§ããNewtonScriptã¯ããªããžã§ã¯ããã¹ããããšããŠè¡šçŸããã¹ãããããç¶æ¿ããããšã§ããªããžã§ã¯ãã®æ¯ãèããå®çŸ©ããŸãã",
"title": "ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªäŸ¿èŠ§"
},
{
"paragraph_id": 20,
"tag": "p",
"text": "以äžãããããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã®äžéšã§ããä»ã«ãå€æ°ã®èšèªãååšããŸãã",
"title": "ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªäŸ¿èŠ§"
},
{
"paragraph_id": 21,
"tag": "p",
"text": "JavaScriptã§ã¯ããããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãæ¡çšãããŠããŸãããããã¿ã€ãã¯ãªããžã§ã¯ãã®ååãè¡šãããããã¿ã€ããã§ãŒã³ã«ãã£ãŠç¶æ¿ãè¡ãããŸããES6以éã§ã¯ãã¯ã©ã¹ã®ãããªæ§æãå°å
¥ãããããç°¡æœã«ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãè¡ãããšãã§ããŸãã",
"title": "ãŸãšã"
}
] | JavaScriptã¯ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåèšèªã§ãããã¯ã©ã¹ããŒã¹ã®ãªããžã§ã¯ãæåèšèªãšã¯ç°ãªãã¢ãããŒããæ¡çšããŠããŸãã以äžã§ã¯ãJavaScriptã§ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãåŠã¶ããã®åºæ¬çãªæŠå¿µã玹ä»ããŸãã | JavaScriptã¯ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåèšèªã§ãããã¯ã©ã¹ããŒã¹ã®ãªããžã§ã¯ãæåèšèªãšã¯ç°ãªãã¢ãããŒããæ¡çšããŠããŸãã以äžã§ã¯ãJavaScriptã§ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãåŠã¶ããã®åºæ¬çãªæŠå¿µã玹ä»ããŸãã
== ãããã¿ã€ã ==
ãããã¿ã€ãã¯ããªããžã§ã¯ãã®ååãè¡šããŸããJavaScriptã§ã¯ããã¹ãŠã®ãªããžã§ã¯ãã¯ãããã¿ã€ããæã¡ããã®ãããã¿ã€ãã¯å¥ã®ãªããžã§ã¯ããšããŠå®çŸ©ãããŸãããªããžã§ã¯ããæã€ããããã£ãã¡ãœããã¯ããã®ãªããžã§ã¯ãã®ãããã¿ã€ãããç¶æ¿ãããŸãã
以äžã¯ããããã¿ã€ããå®çŸ©ããæ¹æ³ã®äžäŸã§ãã
:<syntaxhighlight lang=js>
function Person(name) {
this.name = name;
}
Person.prototype.greet = function() {
console.log(`Hello, my name is ${this.name}.`);
}
const john = new Person('John');
john.greet(); // Hello, my name is John.
</syntaxhighlight>
ãã®äŸã§ã¯ãPersonãšããã³ã³ã¹ãã©ã¯ã¿é¢æ°ãå®çŸ©ãããã®ãããã¿ã€ãã«greetãšããã¡ãœãããè¿œå ããŠããŸããnewããŒã¯ãŒãã䜿ã£ãŠPersonãã€ã³ã¹ã¿ã³ã¹åããgreetã¡ãœãããåŒã³åºãããšãã§ããŸãã
== ãããã¿ã€ããã§ãŒã³ ==
JavaScriptã§ã¯ããªããžã§ã¯ããæã€ããããã£ãã¡ãœãããååšããªãå Žåããã®ãªããžã§ã¯ãã®ãããã¿ã€ãããé ã«æ¢çŽ¢ãè¡ãããŸãããã®æ¢çŽ¢ã®ä»çµã¿ããããã¿ã€ããã§ãŒã³ãšåŒã³ãŸãã
以äžã¯ããããã¿ã€ããã§ãŒã³ãå©çšããäŸã§ãã
:<syntaxhighlight lang=js>
function Person(name) {
this.name = name;
}
Person.prototype.greet = function() {
console.log(`Hello, my name is ${this.name}.`);
}
function Employee(name, title) {
Person.call(this, name);
this.title = title;
}
Employee.prototype = Object.create(Person.prototype);
Employee.prototype.constructor = Employee;
Employee.prototype.work = function() {
console.log(`${this.name} is working as a ${this.title}.`);
}
const bob = new Employee('Bob', 'Manager');
bob.greet(); // Hello, my name is Bob.
bob.work(); // Bob is working as a Manager.
</syntaxhighlight>
ãã®äŸã§ã¯ãEmployeeãšããã³ã³ã¹ãã©ã¯ã¿é¢æ°ãå®çŸ©ããPersonããç¶æ¿ããŠgreetã¡ãœãããå©çšããŠããŸããObject.createã¡ãœããã䜿ã£ãŠPerson.prototypeãç¶æ¿ããEmployee.prototypeãå®çŸ©ããEmployeeèªèº«ã®workã¡ãœãããè¿œå ããŠããŸããnewãã¯ãŒãã䜿ã£ãŠEmployeeãã€ã³ã¹ã¿ã³ã¹åããgreetã¡ãœãããšworkã¡ãœãããåŒã³åºãããšãã§ããŸãã
== ã¯ã©ã¹ã®ãããªæ§æ ==
ES6以éãJavaScriptã§ã¯ã¯ã©ã¹ã®ãããªæ§æãå°å
¥ãããããç°¡æœã«ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãè¡ãããšãã§ããããã«ãªããŸããã
以äžã¯ãã¯ã©ã¹ã®ãããªæ§æã䜿ã£ãäŸã§ãã
:<syntaxhighlight lang=js>
class Person {
constructor(name) {
this.name = name;
}
greet() {
console.log(`Hello, my name is ${this.name}.`);
}
}
class Employee extends Person {
constructor(name, title) {
super(name);
this.title = title;
}
work() {
console.log(`${this.name} is working as a ${this.title}.`);
}
}
const alice = new Employee('Alice', 'Engineer');
alice.greet(); // Hello, my name is Alice.
alice.work(); // Alice is working as a Engineer.
</syntaxhighlight>
ãã®äŸã§ã¯ãclassããŒã¯ãŒãã䜿ã£ãŠPersonã¯ã©ã¹ãšEmployeeã¯ã©ã¹ãå®çŸ©ããextendsããŒã¯ãŒãã䜿ã£ãŠPersonãç¶æ¿ããŠããŸãããŸããconstructorã¡ãœãããå®çŸ©ããŠã€ã³ã¹ã¿ã³ã¹ã®åæåãè¡ããããããã®ã¯ã©ã¹ã«ã¡ãœãããè¿œå ããŠããŸããsuperããŒã¯ãŒãã䜿ã£ãŠèŠªã¯ã©ã¹ã®ã³ã³ã¹ãã©ã¯ã¿ãã¡ãœãããåŒã³åºãããšãã§ããŸãã
== ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã®é·æãšçæ ==
ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã«ã¯ã以äžã®ãããªé·æãšçæããããŸãã
;é·æ
# ãã€ãããã¯ãªãªããžã§ã¯ãã®çæãå¯èœ {{---}} ãããã¿ã€ãããŒã¹ãªèšèªã§ã¯ããªããžã§ã¯ãã®ããããã£ãã¡ãœãããåçã«å€æŽããããšãã§ããŸããããã«ãããå®è¡æã«ãªããžã§ã¯ãã®æ§é ãå€æŽããããšãã§ããŸãããŸãããªããžã§ã¯ãã®çææ¹æ³ãæè»ã§ãå¿
èŠãªãšãã«ãªããžã§ã¯ããçæããããšãã§ããŸãã
# ç¶æ¿ãæè»ã§å¹çç {{---}} ãããã¿ã€ãããŒã¹ãªèšèªã§ã¯ãç¶æ¿ãæè»ã§å¹ççã«è¡ããŸãããªããžã§ã¯ãã®ãããã¿ã€ããå€æŽããããšã§ãç¶æ¿ãå®çŸããããšãã§ããŸãããŸãããããã¿ã€ããã§ãŒã³ã䜿ã£ãŠç¶æ¿ãå®çŸãããããå€éç¶æ¿ãå¯èœã§ãã
# èšèªã®ã·ã³ãã«ã {{---}} ãããã¿ã€ãããŒã¹ãªèšèªã¯ããªããžã§ã¯ãæåããã°ã©ãã³ã°ã«å¿
èŠãªæ©èœã ããæã¡ãã·ã³ãã«ã§ããããšãå€ãã§ãããã®ãããåŠç¿ã³ã¹ããäœããã³ãŒããæžãã®ã«å¿
èŠãªæéãçããŠæžãããšããããŸãã
; çæ
# ããã°ã©ããŒã®éã§ã®å
±éç解ãå°é£ {{---}} ãããã¿ã€ãããŒã¹ãªèšèªã¯ãåŸæ¥ã®ã¯ã©ã¹ããŒã¹ãªèšèªãšã¯ç°ãªãæŠå¿µãæã€ãããããã°ã©ããŒã®éã§ã®å
±éç解ãå°é£ã§ããããšããããŸãããŸããããã°ã©ããŒããããã¿ã€ãããŒã¹ãªèšèªãåŠã¶éã«ãæ°ããæŠå¿µãèãæ¹ãç¿åŸããå¿
èŠããããããåŠç¿ã³ã¹ããé«ãããšããããŸãã
# ãããã¿ã€ãã®åçãªå€æŽãäºæããªãå¯äœçšãããããããšããã {{---}} ãããã¿ã€ãããŒã¹ãªèšèªã§ã¯ããªããžã§ã¯ãã®ãããã¿ã€ããåçã«å€æŽããããšãã§ããŸããããã®ãããªå€æŽãäºæããªãå¯äœçšãããããããšãããããã泚æãå¿
èŠã§ãã
# ããã©ãŒãã³ã¹ã®äœäž {{---}} ãããã¿ã€ãããŒã¹ãªèšèªã¯ããããã¿ã€ããã§ãŒã³ããã©ãå¿
èŠããããããã¯ã©ã¹ããŒã¹ãªèšèªãããããã©ãŒãã³ã¹ãäœäžããããšããããŸããç¹ã«ãè€éãªãªããžã§ã¯ãã®æ§é ãæã€å Žåãããããã¿ã€ããã§ãŒã³ã®æ·±ããæ·±ãå Žåã«ã¯ãããã©ãŒãã³ã¹ã®åé¡ãé¡èã«ãªãããšããããŸãã
# ãšã©ãŒãçºçãããã {{---}} ãããã¿ã€ãããŒã¹ãªèšèªã¯ãåçã«å€æŽããããªããžã§ã¯ãã®ããããã£ãã¡ãœããããäºæããªãå Žæã§åç
§ãããããå€æŽããããããããšããããŸãããã®ãããªå Žåããšã©ãŒãçºçããå¯èœæ§ãé«ããªãããã泚æãå¿
èŠã§ãã
# ãªããžã§ã¯ãã®èå¥ãå°é£ {{---}} ãããã¿ã€ãããŒã¹ãªèšèªã§ã¯ããªããžã§ã¯ããã©ã®ãããªãããã¿ã€ããã§ãŒã³ãæã€ãã«ãã£ãŠããã®æ§è³ªã決ãŸãããããªããžã§ã¯ãã®èå¥ãå°é£ã«ãªãããšããããŸããç¹ã«ãå€éç¶æ¿ã䜿çšããå Žåã«ã¯ãã©ã®ãããã¿ã€ããã§ãŒã³ãã©ã®ãªããžã§ã¯ãã«å±ããããè€éã«ãªããããèå¥ãå°é£ã«ãªãããšããããŸãã
以äžãããããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã®é·æãšçæã§ããããã°ã©ããŒã¯ãèªåãéçºããã¢ããªã±ãŒã·ã§ã³ã®èŠä»¶ã«åãããŠããããã¿ã€ãããŒã¹ãªèšèªãéžæããããã¯ã©ã¹ããŒã¹ãªèšèªãéžæããããå€æããå¿
èŠããããŸãã
== ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªçšèªé ==
以äžã¯ããããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã«é¢é£ããçšèªéã§ãã
* ãªããžã§ã¯ãïŒãããã¿ã€ãããŒã¹ãªèšèªã«ãããŠããã¹ãŠã®å€ã¯ãªããžã§ã¯ããšããŠæ±ãããŸãããªããžã§ã¯ãã¯ãããããã£ãšåŒã°ããååãšå€ã®ãã¢ã®éåãæã¡ãã¡ãœãããšåŒã°ããé¢æ°ãå®è¡ããããšãã§ããŸãã
* ãããã¿ã€ãïŒãããã¿ã€ãã¯ããªããžã§ã¯ãã®ãã³ãã¬ãŒãã®ãããªãã®ã§ãããæ°ãããªããžã§ã¯ããäœæããéã«åç
§ãããŸãããããã¿ã€ãã¯ãããããã£ãšã¡ãœãããæã¡ãæ°ãããªããžã§ã¯ãã«ããããç¶æ¿ããããšãã§ããŸãã
* ãããã¿ã€ããã§ãŒã³ïŒãããã¿ã€ããã§ãŒã³ã¯ããªããžã§ã¯ãã®ç¶æ¿é¢ä¿ã瀺ããã®ã§ããããªããžã§ã¯ããæã€ããããã£ãã¡ãœãããã©ã®ãããªãããã¿ã€ãããç¶æ¿ããããã瀺ããŸãããããã¿ã€ããã§ãŒã³ã¯ããªããžã§ã¯ãã® __proto__ ããããã£ããã©ãããšã§èŸ¿ãããšãã§ããŸãã
* ã³ã³ã¹ãã©ã¯ã¿ïŒã³ã³ã¹ãã©ã¯ã¿ã¯ãæ°ãããªããžã§ã¯ããäœæããããã®é¢æ°ã§ãããéåžžã¯å€§æåã§å§ãŸãååãæã¡ãŸããã³ã³ã¹ãã©ã¯ã¿ãåŒã³åºãããšã§ãæ°ãããªããžã§ã¯ããäœæããããã®ãªããžã§ã¯ãã®ãããã¿ã€ããæå®ããããã®ã«ãªããŸãã
* ã€ã³ã¹ã¿ã³ã¹ïŒã€ã³ã¹ã¿ã³ã¹ã¯ãã³ã³ã¹ãã©ã¯ã¿ãåŒã³åºããŠäœæããããªããžã§ã¯ãã®ããšãæããŸããã€ã³ã¹ã¿ã³ã¹ã¯ããã®ã³ã³ã¹ãã©ã¯ã¿ãæã€ããããã£ãšã¡ãœãããç¶æ¿ããŸãã
* å€éç¶æ¿å€éç¶æ¿ãšã¯ããããªããžã§ã¯ããè€æ°ã®ãããã¿ã€ããç¶æ¿ããããšãæããŸãããããã¿ã€ããã§ãŒã³ã«ãããŠãå€éç¶æ¿ã䜿çšããå Žåã«ã¯ãã©ã®ãããã¿ã€ããã§ãŒã³ãã©ã®ãªããžã§ã¯ãã«å±ããããè€éã«ãªãããšããããŸãã
* mixinïŒmixinã¯ãæ¢åã®ãªããžã§ã¯ãã«æ°ããããããã£ãã¡ãœãããè¿œå ããããã®æ¹æ³ã§ãããè€æ°ã®ãªããžã§ã¯ãããæ©èœãåã蟌ãããšãã§ããŸããmixinã¯ããããã¿ã€ãããŒã¹ãªèšèªã«ãããŠç¹ã«ãã䜿ãããææ³ã®äžã€ã§ãããã³ãŒãã®åå©çšæ§ãé«ããããšãã§ããŸãã
* ã¯ã©ã¹ïŒãããã¿ã€ãããŒã¹ãªèšèªã«ãããŠãã¯ã©ã¹ã¯ååšããŸããããäžéšã®èšèªã§ã¯ã¯ã©ã¹é¢šã®æ§æãæäŸããŠããŸããã¯ã©ã¹é¢šã®æ§æã䜿çšããããšã§ããããã¿ã€ãããŒã¹ãªèšèªã§ããã¯ã©ã¹ããŒã¹ã®èšèªã®ãããªã³ãŒãã£ã³ã°ã¹ã¿ã€ã«ã§ããã°ã©ã ãæžãããšãã§ããŸãã
* ãªããžã§ã¯ããªãã©ã«ïŒãªããžã§ã¯ããªãã©ã«ã¯ããªããžã§ã¯ããçŽæ¥èšè¿°ããããã®æ§æã§ãããªããžã§ã¯ããªãã©ã«ã䜿çšããããšã§ãæ°ãããªããžã§ã¯ããç°¡åã«äœæããããšãã§ããŸãã
* ãã¡ã¯ããªé¢æ°ïŒãã¡ã¯ããªé¢æ°ã¯ãæ°ãããªããžã§ã¯ããäœæããããã®é¢æ°ã§ãããéåžžã¯å°æåã§å§ãŸãååãæã¡ãŸãããã¡ã¯ããªé¢æ°ã¯ããªããžã§ã¯ããçæããããã®æé ãã«ãã»ã«åããã³ãŒãã®åå©çšæ§ãé«ããããšãã§ããŸãã
* thisïŒthisã¯ãçŸåšã®ãªããžã§ã¯ããåç
§ããããã®ããŒã¯ãŒãã§ãããã¡ãœããå
ã§äœ¿çšãããŸããthisã䜿çšããããšã§ãã¡ãœãããåŒã³åºããããªããžã§ã¯ãèªèº«ãåç
§ããããšãã§ããŸãã
*call, apply, bindïŒcallãapplyãbindã¯ãthisãèšå®ããããã®ã¡ãœããã§ãããé¢æ°å
ã§thisã䜿ã£ãŠãªããžã§ã¯ããåç
§ããå Žåã«äœ¿çšãããŸããcallãapplyãbindã䜿çšããããšã§ãé¢æ°ãå®è¡ãããéã«thisãã©ã®ãªããžã§ã¯ããåç
§ããããæ瀺çã«æå®ããããšãã§ããŸãã
以äžãããããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã«é¢é£ããçšèªéã§ãã
== ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªäŸ¿èŠ§ ==
ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã¯ãå€æ°ååšããŸãã以äžã«ããã®äžãã代衚çãªãã®ãããã€ã玹ä»ããŸãã
;JavaScript
[[JavaScript]]ã¯ãWebãã©ãŠã¶ã§åäœããã¹ã¯ãªããèšèªã§ãããçŸåšæãåºã䜿çšãããŠãããããã¿ã€ãããŒã¹ãªèšèªã®äžã€ã§ããJavaScriptã¯ããªããžã§ã¯ãããããã¿ã€ããã§ãŒã³ã§ç¶æ¿ããããšãã§ãããŸããmixinã䜿çšããããšã§è€æ°ã®ãªããžã§ã¯ãããæ©èœãåã蟌ãããšãã§ããŸãã
;Lua
[[Lua]]ã¯ã軜éã§é«éãªã¹ã¯ãªããèšèªã§ããããããã¿ã€ãããŒã¹ãªèšèªã®äžã€ã§ããLuaã¯ããªããžã§ã¯ããããŒãã«ãšããŠè¡šçŸããããŒãã«ã®äžã«ä»ã®ããŒãã«ãå«ããããšã§ç¶æ¿ãå®çŸããŸãã
;Self
[[Self]]ã¯ããªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã®äžã€ã§ããããããã¿ã€ãããŒã¹ãªèšèªã®å
é§ããšãªããŸãããSelfã¯ããªããžã§ã¯ãããããã¿ã€ããšããŠè¡šçŸãããããã¿ã€ãããç¶æ¿ããããšã§ããªããžã§ã¯ãã®æ¯ãèããå®çŸ©ããŸãã
;Io
Ioã¯ãå°èŠæš¡ãªã¹ã¯ãªããèšèªã§ããããããã¿ã€ãããŒã¹ãªèšèªã®äžã€ã§ããIoã¯ãã¡ãã»ãŒãžããã·ã³ã°ã«ãã£ãŠãªããžã§ã¯ãéã®éä¿¡ãè¡ããŸãããŸããIoã¯ããããã¿ã€ããã³ããŒããŠæ°ãããªããžã§ã¯ããäœæããããšã§ç¶æ¿ãå®çŸããŸãã
;NewtonScript
NewtonScriptã¯ãAppleã®PDAãNewtonãã§äœ¿çšãããã¹ã¯ãªããèšèªã§ããããããã¿ã€ãããŒã¹ãªèšèªã®äžã€ã§ããNewtonScriptã¯ããªããžã§ã¯ããã¹ããããšããŠè¡šçŸããã¹ãããããç¶æ¿ããããšã§ããªããžã§ã¯ãã®æ¯ãèããå®çŸ©ããŸãã
以äžãããããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã®äžéšã§ããä»ã«ãå€æ°ã®èšèªãååšããŸãã
== ãŸãšã ==
JavaScriptã§ã¯ããããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãæ¡çšãããŠããŸãããããã¿ã€ãã¯ãªããžã§ã¯ãã®ååãè¡šãããããã¿ã€ããã§ãŒã³ã«ãã£ãŠç¶æ¿ãè¡ãããŸããES6以éã§ã¯ãã¯ã©ã¹ã®ãããªæ§æãå°å
¥ãããããç°¡æœã«ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°ãè¡ãããšãã§ããŸãã
[[ã«ããŽãª:JavaScript]] | 2023-03-26T05:38:46Z | 2024-01-19T03:28:32Z | [
"ãã³ãã¬ãŒã:---"
] | https://ja.wikibooks.org/wiki/%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0/JavaScript_%E3%81%A7%E5%AD%A6%E3%81%B6%E3%83%97%E3%83%AD%E3%83%88%E3%82%BF%E3%82%A4%E3%83%97%E3%83%99%E3%83%BC%E3%82%B9%E3%82%AA%E3%83%96%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E6%8C%87%E5%90%91%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0 |
37,363 | ããã°ã©ãã³ã°/Haskell ã§åŠã¶é¢æ°åããã°ã©ãã³ã° | é¢æ°åããã°ã©ãã³ã°ã®äžã§éç«ã€ååšã§ããHaskellã¯ãæ°åŠçãªçè«ã«åºã¥ããã¯ãªãŒã³ã§ãšã¬ã¬ã³ããªæ§æãæäŸããéçåä»ãã«ããå®å
šæ§ãé«ããŠããŸãã å€æ°ãé¢æ°ã¯å³æ Œãªåã«çžãããããã«ãã£ãŠãã°ã®çºçãé²ããŸãã é¢æ°ã®çŽç²æ§ãšäžå€æ§ã¯ã䞊è¡ããã°ã©ãã³ã°ã«ãããŠãåšåãçºæ®ããå¯äœçšãæå°éã«æãã€ã€é«ãå¹çãå®çŸããŸãã ãŸããHaskellã®åŒ·åãªåã·ã¹ãã ã¯ãæè»ãªå€çžæ§ãšåã¯ã©ã¹ã«ããæ¡åŒµæ§ãæäŸããã³ãŒãã®åå©çšæ§ãåäžãããŸãã ãã¿ãŒã³ãããã³ã°ã¯çŽæçã§åŒ·åãªå¶åŸ¡æ§é ãæäŸããã³ãŒãã®å¯èªæ§ãåäžãããŸããHaskellãåŠã¶ããšã¯ãé¢æ°åããã°ã©ãã³ã°ã®ç念ããã©ãã€ã ãç解ãã宣èšçãã€å¹æçãªã³ãŒããæžãã¹ãã«ã身ã«ã€ããããšã«ç¹ãããŸãã ãã®èšèªã¯åŠç¿è
ã«æŽç·Žãããããã°ã©ãã³ã°ã®ã¢ãããŒããæäŸããæ°ããèŠç¹ã§åé¡ã«åãçµãããšãã§ããããã«ãªããŸãã
Haskellã¯éåžžã«æž
æœã§æ°åŠçãªæ§æãæã£ãŠããŸãã以äžã¯åºæ¬çãªæ§æã®ããã€ãã§ãã
Haskellã¯éçåä»ãèšèªã§ãããå€æ°ã¯å¿
ãåãæã¡ãŸããåã¯ã³ãã³ã§ç€ºãããŸãã
é¢æ°ã®å®çŸ©ã¯ä»¥äžã®ããã«è¡ããŸããå泚éã¯ãªãã·ã§ã³ã§ãããã³ãŒãã®èªã¿ãããã®ããã«æšå¥šãããŸãã
ãã¿ãŒã³ãããã³ã°ã¯Haskellã®åŒ·åãªæ©èœã®äžã€ã§ããé¢æ°ãåŒæ°ã«å¯ŸããŠç°ãªããã¿ãŒã³ã§æ¯ãèãããšãã§ããŸãã
äžèšã®é¢æ° saySomething ã¯ãåŒæ°ã1ãªã"One"ã2ãªã"Two"ããã以å€ãªã"Other"ãè¿ããŸããã¯ã€ã«ãã«ãŒã _ ã¯ã©ã®ãã¿ãŒã³ã«ããããããŸãã
ãããã®åºæ¬çãªæ§æãç解ããããšã§ãHaskellã§ã®ããã°ã©ãã³ã°ã®åºç€ãç¯ããŸãã次ã«ãåã¯ã©ã¹ããªã¹ããªã©ã®æŠå¿µã«é²ãã§ãããšãããé«åºŠãªããã°ã©ã ãæžãããšãã§ããŸãã
åã·ã¹ãã ã¯ãããã°ã©ãã³ã°èšèªã«ãããŠå€ã®çš®é¡ãæ§è³ªãåé¡ããä»çµã¿ã§ããHaskellã®åã·ã¹ãã ã¯åŒ·åã§éçãªãã®ã§ãããåãšã©ãŒãã³ã³ãã€ã«æã«æ€åºããããšãã§ããŸãã
åã¯ã©ã¹ã¯ãé¢é£ããåã«å¯ŸããŠäžé£ã®æäœãæ¯ãèããå®çŸ©ããæ段ã§ããå
·äœçãªåãåã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ã§ããã°ããã®åã¯ã¯ã©ã¹ãå®çŸ©ããæäœããµããŒãããŠããŸããäŸãã°ãEqåã¯ã©ã¹ã¯çå€æ§ãå®çŸ©ããShowåã¯ã©ã¹ã¯è¡šç€ºãå®çŸ©ããŸãã
åã·ã°ããã£ã¯é¢æ°ãå€æ°ã«å¯ŸããŠãã®åãæ瀺çã«æå®ãããã®ã§ããäžæ¹ã§ãHaskellã¯åæšè«ã«ãããã³ã³ãã€ã©ãèªåçã«åãå°åºããããšãã§ããŸããåæšè«ã«ãããã³ãŒããããç°¡æœã§ãããªãããåå®å
šæ§ãç¶æã§ããŸãã
å€çžæ§ã¯ãç°ãªãåã«å¯ŸããŠåãæäœãè¡ãããšãã§ããç¹æ§ãæããŸããHaskellã§ã¯ãå€çžæ§ã¯ãžã§ããªã¯ã¹ãããªã¢ãŒãã£ãºã ãšãåŒã°ããŸããããã«ãããé¢æ°ãããŒã¿åãç°ãªãåã«å¯ŸããŠæœè±¡çã«åäœã§ããŸãã
å€çžæ§ã«ãããæè»æ§ãåäžããæ±çšçã§åå©çšå¯èœãªã³ãŒããæžãããšãã§ããŸããããªã¢ãŒãã£ãºã ã¯ãåã«äŸåããã«æœè±¡çãªããã°ã©ãã³ã°ãå¯èœã«ããŸãã
ãªã¹ãã¯Haskellã§æããã䜿çšãããããŒã¿æ§é ã®äžã€ã§ãããèŠçŽ ã®é åºä»ãã®ã³ã¬ã¯ã·ã§ã³ã§ãããã¿ãŒã³ãããã³ã°ã¯ãªã¹ããå¹æçã«æäœããæ段ã®äžã€ã§ãã
ãªã¹ãå
å
è¡šèšã¯ãç°¡æœã§è¡šçŸåè±ããªãªã¹ãã®çæãå€æãè¡ãæ段ã§ããæ¡ä»¶ãæå®ããŠãªã¹ããçæããããšãã§ããŸãã
ã¿ãã«ã¯ç°ãªãåã®èŠçŽ ãçµã¿åãããäžå€ã®ããŒã¿æ§é ã§ããã¿ãã«ã¯åºå®ããããµã€ãºãæã¡ãŸãã
ãªã¹ããšã¿ãã«ã¯Haskellã§é »ç¹ã«äœ¿çšããããªã¹ãå
å
è¡šèšããã¿ãŒã³ãããã³ã°ãå«ããããã®æŠå¿µãç解ããããšã§ãããŒã¿æäœãå€æããã容æã«ãªããŸãã
ååž°ã¯ãé¢æ°ãèªåèªèº«ãåŒã³åºããã¯ããã¯ã§ãããHaskellã®ç¹ã«åŒ·åãªæ©èœã§ããååž°ã䜿ãããšã§ãåé¡ãåçŽåãããããªããŸãã
é«éé¢æ°ã¯ãä»ã®é¢æ°ãåŒæ°ã«åãããé¢æ°ãè¿ãé¢æ°ã®ããšã§ããããã«ãããæœè±¡åºŠãé«ãŸããæ±çšçãªé¢æ°ãäœæã§ããŸãã
Haskellã«ã¯æšæºã§ããã€ãã®é«éé¢æ°ãçµã¿èŸŒãŸããŠããããããã¯ãªã¹ããªã©ã®ããŒã¿æ§é ãæäœããéã«äŸ¿å©ã§ãã
ãããã®é«éé¢æ°ã¯ååž°ãšçµã¿åãããŠéåžžã«åŒ·åãªæ©èœãæäŸããã³ãŒããããç°¡æœãã€å¹æçã«ããã®ã«åœ¹ç«ã¡ãŸãã
ã©ã ãåŒã¯ãç¡åã®é¢æ°ãäœæããããã®åŒã§ããéåžžãç°¡æœãªé¢æ°ãå³åº§ã«å®çŸ©ããå Žåã«äœ¿çšãããŸãã
ã«ãªãŒåã¯ãé¢æ°ãè€æ°ã®åŒæ°ãåãéãååŒæ°ãäžã€ãã€åãåãæ°ããé¢æ°ãè¿ãæŠå¿µã§ããããã«ãããéšåé©çšãå¯èœã«ãªããŸãã
ã©ã ãåŒãšã«ãªãŒåã«ãããé¢æ°ã®æè»æ§ãåäžããŸãããããã®æŠå¿µãçµã¿åãããŠãç°¡æœã§åå©çšå¯èœãªé¢æ°ãäœæã§ããŸãã
ãããã®ãã¹ããã©ã¯ãã£ã¹ãå®ãããšã§ãååž°ãšé«éé¢æ°ãçšããã³ãŒããç解ãããããä¿å®æ§ãåäžããŸãã
ãããã®ãŠãŒã¹ã±ãŒã¹ã¯ååž°ãšé«éé¢æ°ã®ç¹æ§ã掻ãããŠãã³ãŒããå¹æçã«æ§é åããæè»ãã€åå©çšå¯èœãªããã°ã©ã ãäœæããã®ã«åœ¹ç«ã¡ãŸãã
Haskellã¯é¢æ°åããã°ã©ãã³ã°ã®äžã§ç¹ã«çŽç²ãªèšèªãšããŠç¥ãããŠããŸãããHaskellåºæã®ç¹åŸŽãšäžè¬çãªé¢æ°åããã°ã©ãã³ã°ã®ååã«ã¯ããã€ãã®å
±éç¹ãšå·®ç°ããããŸãã以äžã¯ããã®äž»ãªå·®ç°ãšå
±éç¹ã§ãã
ãããã®ååã¯ãHaskellã«éããé¢æ°åããã°ã©ãã³ã°ã®äžè¬çãªååãšããŠå
±æãããŠããŸãããã ããHaskellã¯ãã®çŽç²æ§ãåæšè«ãã¢ãããšãã£ãç¬èªã®ç¹åŸŽã«ãã£ãŠãä»ã®é¢æ°åããã°ã©ãã³ã°èšèªãšå·®ç°ãçãŸããŠããŸãã
æ°ãã€ããæ¹ãããããããããããŸããããåçŽç·šã§ã¯ã€ãšããŠäžè¬çãªé¢æ°åããã°ã©ãã³ã°ã®ååãåãäžããŸããã
äžçŽç·šã§ã¯ã段éçã«Haskellåºæã®ç¹åŸŽã段éçã«å¢ãããŠãããŸãã
é¢æ°åããã°ã©ãã³ã°èšèªã«ã¯å€ãã®çš®é¡ããããŸãã以äžã«ã代衚çãªé¢æ°åããã°ã©ãã³ã°èšèªãããã€ã玹ä»ããŸãã
çŽç²ãªé¢æ°åããã°ã©ãã³ã°èšèªã§ããã匷ãéçåä»ããæã¡ãŸããé
延è©äŸ¡ãã¢ãããªã©ã®æ©èœãæã¡ãé«åºŠãªæœè±¡åãå®çŸããããšãã§ããŸãã
é¢æ°åããã°ã©ãã³ã°èšèªãšããŠã¯çããã匷ãéçåä»ããæã€èšèªã§ããé«éé¢æ°ãã«ãªãŒåããã¿ãŒã³ãããã³ã°ãªã©ã®æ©èœããããç¹ã«æ°å€èšç®ãã³ã³ãã€ã©ãªã©ã®åéã§æŽ»èºããŠããŸãã
Javaãã©ãããã©ãŒã äžã§åäœããé¢æ°åããã°ã©ãã³ã°èšèªã§ããããªããžã§ã¯ãæåããã°ã©ãã³ã°ãšã®èåãç¹åŸŽçã§ããéçåä»ãããžã§ããªã¯ã¹ããã¿ãŒã³ãããã³ã°ãªã©ã®æ©èœããããåæ£åŠçãã¬ãŒã ã¯ãŒã¯ã§ããApache Sparkã«ãæ¡çšãããŠããŸãã
Lispã®æ¹èšã§ãããJVMäžã§åäœããé¢æ°åããã°ã©ãã³ã°èšèªã§ãããã¯ããäžå€æ§ããŒã¿æ§é ãSTMãªã©ã®æ©èœããããã³ã³ã«ã¬ã³ãããã°ã©ãã³ã°ã«ç¹åããŠããŸãã
.NET Frameworkäžã§åäœãããã«ããã©ãã€ã èšèªã§ãããé¢æ°åããã°ã©ãã³ã°ã«ç¹åããŠããŸããéçåä»ããã¿ãã«ããã€ãã©ã€ã³æŒç®åãªã©ã®æ©èœããããC#ãšçµã¿åãããããšã§åŒ·åãªããã°ã©ãã³ã°ç°å¢ãæ§ç¯ããããšãã§ããŸãã
以äžãã代衚çãªé¢æ°åããã°ã©ãã³ã°èšèªã®äžéšã§ããããããã®èšèªã«ã¯ç¹åŸŽçãªæ©èœããããããã°ã©ã ã®ç®çã«å¿ããŠéžæããããšãéèŠã§ãã
以äžã«ãé¢æ°åããã°ã©ãã³ã°èšèªã§çšããããäž»èŠãªçšèªã玹ä»ããŸãã
ã³ã³ãã€ã©ãå€æ°ãé¢æ°ã®åãèªåçã«æšè«ããä»çµã¿ãæããŸããåæšè«ãçšããããšã§ãã³ãŒãã®å¯èªæ§ãåäžãããã³ãŒããçããã€ä¿å®æ§ãé«ããã®ã«ããããšãã§ããŸãã
以äžããé¢æ°åããã°ã©ãã³ã°èšèªã§çšããããäž»èŠãªçšèªã®äžéšã§ãããããã®æŠå¿µãç解ããããšã§ãé¢æ°åããã°ã©ãã³ã°ã®åºç€ãç解ããããšãã§ããŸãã
é¢æ°åããã°ã©ãã³ã°èšèªã¯ãããã°ã©ã ãé¢æ°ã®éåãšããŠæããããã°ã©ãã³ã°ãã©ãã€ã ã§ãããå€æ°ã®å代å
¥ãçŠæ¢ãããŠããŸãã代ããã«ãé¢æ°ã®é©çšã«ãã£ãŠå€ãå€æŽããããšãã§ããŸããé¢æ°åããã°ã©ãã³ã°èšèªã®ä»£è¡šçãªèšèªãšããŠãHaskellãOCamlãScalaãªã©ããããŸãã
é¢æ°åããã°ã©ãã³ã°èšèªã§ã¯ãäžå€æ§ãååž°ãªã©ã®æŠå¿µãéèŠèŠãããŸãããŸããé«éé¢æ°ãã«ãªãŒåãé
延è©äŸ¡ãªã©ã®æ©èœããããããæ±çšçãªé¢æ°ãå®çŸããããšãã§ããŸãã
é¢æ°åããã°ã©ãã³ã°èšèªã¯ã䞊ååŠçãåæ£åŠçãªã©ãè€éãªåŠçãç°¡åã«æ±ãããšãã§ããç¹ãé
åçã§ãããŸããããã°ã©ã ã®ä¿å®æ§ãåå©çšæ§ãé«ããªããšããå©ç¹ããããŸãã
ããããé¢æ°åããã°ã©ãã³ã°èšèªã¯ããªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªãšã¯ç°ãªãæ§æãæ©èœãæã€ãããåŠç¿ã³ã¹ããé«ããšãããã¡ãªããããããŸãããŸããäžéšã®åŠçã§ã¯ãæç¶ãåã®æ¹ãå¹ççã§ããããšãããããããã¹ãŠã®åŠçã«é¢æ°åããã°ã©ãã³ã°èšèªãå©çšããããã§ã¯ãããŸããã
以äžããé¢æ°åããã°ã©ãã³ã°èšèªã®åºæ¬çãªæŠå¿µãšç¹åŸŽã§ããé¢æ°åããã°ã©ãã³ã°èšèªã¯ãããã°ã©ã ã®æœè±¡åãåå©çšæ§ãé«ããããã®æåãªããŒã«ã®äžã€ã§ãããä»åŸãŸããŸã泚ç®ãããããšãäºæ³ãããŸãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "é¢æ°åããã°ã©ãã³ã°ã®äžã§éç«ã€ååšã§ããHaskellã¯ãæ°åŠçãªçè«ã«åºã¥ããã¯ãªãŒã³ã§ãšã¬ã¬ã³ããªæ§æãæäŸããéçåä»ãã«ããå®å
šæ§ãé«ããŠããŸãã å€æ°ãé¢æ°ã¯å³æ Œãªåã«çžãããããã«ãã£ãŠãã°ã®çºçãé²ããŸãã é¢æ°ã®çŽç²æ§ãšäžå€æ§ã¯ã䞊è¡ããã°ã©ãã³ã°ã«ãããŠãåšåãçºæ®ããå¯äœçšãæå°éã«æãã€ã€é«ãå¹çãå®çŸããŸãã ãŸããHaskellã®åŒ·åãªåã·ã¹ãã ã¯ãæè»ãªå€çžæ§ãšåã¯ã©ã¹ã«ããæ¡åŒµæ§ãæäŸããã³ãŒãã®åå©çšæ§ãåäžãããŸãã ãã¿ãŒã³ãããã³ã°ã¯çŽæçã§åŒ·åãªå¶åŸ¡æ§é ãæäŸããã³ãŒãã®å¯èªæ§ãåäžãããŸããHaskellãåŠã¶ããšã¯ãé¢æ°åããã°ã©ãã³ã°ã®ç念ããã©ãã€ã ãç解ãã宣èšçãã€å¹æçãªã³ãŒããæžãã¹ãã«ã身ã«ã€ããããšã«ç¹ãããŸãã ãã®èšèªã¯åŠç¿è
ã«æŽç·Žãããããã°ã©ãã³ã°ã®ã¢ãããŒããæäŸããæ°ããèŠç¹ã§åé¡ã«åãçµãããšãã§ããããã«ãªããŸãã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "Haskellã¯éåžžã«æž
æœã§æ°åŠçãªæ§æãæã£ãŠããŸãã以äžã¯åºæ¬çãªæ§æã®ããã€ãã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "Haskellã¯éçåä»ãèšèªã§ãããå€æ°ã¯å¿
ãåãæã¡ãŸããåã¯ã³ãã³ã§ç€ºãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "é¢æ°ã®å®çŸ©ã¯ä»¥äžã®ããã«è¡ããŸããå泚éã¯ãªãã·ã§ã³ã§ãããã³ãŒãã®èªã¿ãããã®ããã«æšå¥šãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "ãã¿ãŒã³ãããã³ã°ã¯Haskellã®åŒ·åãªæ©èœã®äžã€ã§ããé¢æ°ãåŒæ°ã«å¯ŸããŠç°ãªããã¿ãŒã³ã§æ¯ãèãããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "äžèšã®é¢æ° saySomething ã¯ãåŒæ°ã1ãªã\"One\"ã2ãªã\"Two\"ããã以å€ãªã\"Other\"ãè¿ããŸããã¯ã€ã«ãã«ãŒã _ ã¯ã©ã®ãã¿ãŒã³ã«ããããããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "ãããã®åºæ¬çãªæ§æãç解ããããšã§ãHaskellã§ã®ããã°ã©ãã³ã°ã®åºç€ãç¯ããŸãã次ã«ãåã¯ã©ã¹ããªã¹ããªã©ã®æŠå¿µã«é²ãã§ãããšãããé«åºŠãªããã°ã©ã ãæžãããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "åã·ã¹ãã ã¯ãããã°ã©ãã³ã°èšèªã«ãããŠå€ã®çš®é¡ãæ§è³ªãåé¡ããä»çµã¿ã§ããHaskellã®åã·ã¹ãã ã¯åŒ·åã§éçãªãã®ã§ãããåãšã©ãŒãã³ã³ãã€ã«æã«æ€åºããããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "åã¯ã©ã¹ã¯ãé¢é£ããåã«å¯ŸããŠäžé£ã®æäœãæ¯ãèããå®çŸ©ããæ段ã§ããå
·äœçãªåãåã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ã§ããã°ããã®åã¯ã¯ã©ã¹ãå®çŸ©ããæäœããµããŒãããŠããŸããäŸãã°ãEqåã¯ã©ã¹ã¯çå€æ§ãå®çŸ©ããShowåã¯ã©ã¹ã¯è¡šç€ºãå®çŸ©ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "åã·ã°ããã£ã¯é¢æ°ãå€æ°ã«å¯ŸããŠãã®åãæ瀺çã«æå®ãããã®ã§ããäžæ¹ã§ãHaskellã¯åæšè«ã«ãããã³ã³ãã€ã©ãèªåçã«åãå°åºããããšãã§ããŸããåæšè«ã«ãããã³ãŒããããç°¡æœã§ãããªãããåå®å
šæ§ãç¶æã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "å€çžæ§ã¯ãç°ãªãåã«å¯ŸããŠåãæäœãè¡ãããšãã§ããç¹æ§ãæããŸããHaskellã§ã¯ãå€çžæ§ã¯ãžã§ããªã¯ã¹ãããªã¢ãŒãã£ãºã ãšãåŒã°ããŸããããã«ãããé¢æ°ãããŒã¿åãç°ãªãåã«å¯ŸããŠæœè±¡çã«åäœã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "å€çžæ§ã«ãããæè»æ§ãåäžããæ±çšçã§åå©çšå¯èœãªã³ãŒããæžãããšãã§ããŸããããªã¢ãŒãã£ãºã ã¯ãåã«äŸåããã«æœè±¡çãªããã°ã©ãã³ã°ãå¯èœã«ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "ãªã¹ãã¯Haskellã§æããã䜿çšãããããŒã¿æ§é ã®äžã€ã§ãããèŠçŽ ã®é åºä»ãã®ã³ã¬ã¯ã·ã§ã³ã§ãããã¿ãŒã³ãããã³ã°ã¯ãªã¹ããå¹æçã«æäœããæ段ã®äžã€ã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 13,
"tag": "p",
"text": "ãªã¹ãå
å
è¡šèšã¯ãç°¡æœã§è¡šçŸåè±ããªãªã¹ãã®çæãå€æãè¡ãæ段ã§ããæ¡ä»¶ãæå®ããŠãªã¹ããçæããããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 14,
"tag": "p",
"text": "ã¿ãã«ã¯ç°ãªãåã®èŠçŽ ãçµã¿åãããäžå€ã®ããŒã¿æ§é ã§ããã¿ãã«ã¯åºå®ããããµã€ãºãæã¡ãŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 15,
"tag": "p",
"text": "ãªã¹ããšã¿ãã«ã¯Haskellã§é »ç¹ã«äœ¿çšããããªã¹ãå
å
è¡šèšããã¿ãŒã³ãããã³ã°ãå«ããããã®æŠå¿µãç解ããããšã§ãããŒã¿æäœãå€æããã容æã«ãªããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 16,
"tag": "p",
"text": "ååž°ã¯ãé¢æ°ãèªåèªèº«ãåŒã³åºããã¯ããã¯ã§ãããHaskellã®ç¹ã«åŒ·åãªæ©èœã§ããååž°ã䜿ãããšã§ãåé¡ãåçŽåãããããªããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 17,
"tag": "p",
"text": "é«éé¢æ°ã¯ãä»ã®é¢æ°ãåŒæ°ã«åãããé¢æ°ãè¿ãé¢æ°ã®ããšã§ããããã«ãããæœè±¡åºŠãé«ãŸããæ±çšçãªé¢æ°ãäœæã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 18,
"tag": "p",
"text": "Haskellã«ã¯æšæºã§ããã€ãã®é«éé¢æ°ãçµã¿èŸŒãŸããŠããããããã¯ãªã¹ããªã©ã®ããŒã¿æ§é ãæäœããéã«äŸ¿å©ã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 19,
"tag": "p",
"text": "ãããã®é«éé¢æ°ã¯ååž°ãšçµã¿åãããŠéåžžã«åŒ·åãªæ©èœãæäŸããã³ãŒããããç°¡æœãã€å¹æçã«ããã®ã«åœ¹ç«ã¡ãŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 20,
"tag": "p",
"text": "ã©ã ãåŒã¯ãç¡åã®é¢æ°ãäœæããããã®åŒã§ããéåžžãç°¡æœãªé¢æ°ãå³åº§ã«å®çŸ©ããå Žåã«äœ¿çšãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 21,
"tag": "p",
"text": "ã«ãªãŒåã¯ãé¢æ°ãè€æ°ã®åŒæ°ãåãéãååŒæ°ãäžã€ãã€åãåãæ°ããé¢æ°ãè¿ãæŠå¿µã§ããããã«ãããéšåé©çšãå¯èœã«ãªããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 22,
"tag": "p",
"text": "ã©ã ãåŒãšã«ãªãŒåã«ãããé¢æ°ã®æè»æ§ãåäžããŸãããããã®æŠå¿µãçµã¿åãããŠãç°¡æœã§åå©çšå¯èœãªé¢æ°ãäœæã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 23,
"tag": "p",
"text": "ãããã®ãã¹ããã©ã¯ãã£ã¹ãå®ãããšã§ãååž°ãšé«éé¢æ°ãçšããã³ãŒããç解ãããããä¿å®æ§ãåäžããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 24,
"tag": "p",
"text": "ãããã®ãŠãŒã¹ã±ãŒã¹ã¯ååž°ãšé«éé¢æ°ã®ç¹æ§ã掻ãããŠãã³ãŒããå¹æçã«æ§é åããæè»ãã€åå©çšå¯èœãªããã°ã©ã ãäœæããã®ã«åœ¹ç«ã¡ãŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 25,
"tag": "p",
"text": "Haskellã¯é¢æ°åããã°ã©ãã³ã°ã®äžã§ç¹ã«çŽç²ãªèšèªãšããŠç¥ãããŠããŸãããHaskellåºæã®ç¹åŸŽãšäžè¬çãªé¢æ°åããã°ã©ãã³ã°ã®ååã«ã¯ããã€ãã®å
±éç¹ãšå·®ç°ããããŸãã以äžã¯ããã®äž»ãªå·®ç°ãšå
±éç¹ã§ãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 26,
"tag": "p",
"text": "ãããã®ååã¯ãHaskellã«éããé¢æ°åããã°ã©ãã³ã°ã®äžè¬çãªååãšããŠå
±æãããŠããŸãããã ããHaskellã¯ãã®çŽç²æ§ãåæšè«ãã¢ãããšãã£ãç¬èªã®ç¹åŸŽã«ãã£ãŠãä»ã®é¢æ°åããã°ã©ãã³ã°èšèªãšå·®ç°ãçãŸããŠããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 27,
"tag": "p",
"text": "æ°ãã€ããæ¹ãããããããããããŸããããåçŽç·šã§ã¯ã€ãšããŠäžè¬çãªé¢æ°åããã°ã©ãã³ã°ã®ååãåãäžããŸããã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 28,
"tag": "p",
"text": "äžçŽç·šã§ã¯ã段éçã«Haskellåºæã®ç¹åŸŽã段éçã«å¢ãããŠãããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 29,
"tag": "p",
"text": "é¢æ°åããã°ã©ãã³ã°èšèªã«ã¯å€ãã®çš®é¡ããããŸãã以äžã«ã代衚çãªé¢æ°åããã°ã©ãã³ã°èšèªãããã€ã玹ä»ããŸãã",
"title": "é¢æ°åããã°ã©ãã³ã°èšèªäŸ¿èŠ§"
},
{
"paragraph_id": 30,
"tag": "p",
"text": "çŽç²ãªé¢æ°åããã°ã©ãã³ã°èšèªã§ããã匷ãéçåä»ããæã¡ãŸããé
延è©äŸ¡ãã¢ãããªã©ã®æ©èœãæã¡ãé«åºŠãªæœè±¡åãå®çŸããããšãã§ããŸãã",
"title": "é¢æ°åããã°ã©ãã³ã°èšèªäŸ¿èŠ§"
},
{
"paragraph_id": 31,
"tag": "p",
"text": "é¢æ°åããã°ã©ãã³ã°èšèªãšããŠã¯çããã匷ãéçåä»ããæã€èšèªã§ããé«éé¢æ°ãã«ãªãŒåããã¿ãŒã³ãããã³ã°ãªã©ã®æ©èœããããç¹ã«æ°å€èšç®ãã³ã³ãã€ã©ãªã©ã®åéã§æŽ»èºããŠããŸãã",
"title": "é¢æ°åããã°ã©ãã³ã°èšèªäŸ¿èŠ§"
},
{
"paragraph_id": 32,
"tag": "p",
"text": "Javaãã©ãããã©ãŒã äžã§åäœããé¢æ°åããã°ã©ãã³ã°èšèªã§ããããªããžã§ã¯ãæåããã°ã©ãã³ã°ãšã®èåãç¹åŸŽçã§ããéçåä»ãããžã§ããªã¯ã¹ããã¿ãŒã³ãããã³ã°ãªã©ã®æ©èœããããåæ£åŠçãã¬ãŒã ã¯ãŒã¯ã§ããApache Sparkã«ãæ¡çšãããŠããŸãã",
"title": "é¢æ°åããã°ã©ãã³ã°èšèªäŸ¿èŠ§"
},
{
"paragraph_id": 33,
"tag": "p",
"text": "Lispã®æ¹èšã§ãããJVMäžã§åäœããé¢æ°åããã°ã©ãã³ã°èšèªã§ãããã¯ããäžå€æ§ããŒã¿æ§é ãSTMãªã©ã®æ©èœããããã³ã³ã«ã¬ã³ãããã°ã©ãã³ã°ã«ç¹åããŠããŸãã",
"title": "é¢æ°åããã°ã©ãã³ã°èšèªäŸ¿èŠ§"
},
{
"paragraph_id": 34,
"tag": "p",
"text": ".NET Frameworkäžã§åäœãããã«ããã©ãã€ã èšèªã§ãããé¢æ°åããã°ã©ãã³ã°ã«ç¹åããŠããŸããéçåä»ããã¿ãã«ããã€ãã©ã€ã³æŒç®åãªã©ã®æ©èœããããC#ãšçµã¿åãããããšã§åŒ·åãªããã°ã©ãã³ã°ç°å¢ãæ§ç¯ããããšãã§ããŸãã",
"title": "é¢æ°åããã°ã©ãã³ã°èšèªäŸ¿èŠ§"
},
{
"paragraph_id": 35,
"tag": "p",
"text": "以äžãã代衚çãªé¢æ°åããã°ã©ãã³ã°èšèªã®äžéšã§ããããããã®èšèªã«ã¯ç¹åŸŽçãªæ©èœããããããã°ã©ã ã®ç®çã«å¿ããŠéžæããããšãéèŠã§ãã",
"title": "é¢æ°åããã°ã©ãã³ã°èšèªäŸ¿èŠ§"
},
{
"paragraph_id": 36,
"tag": "p",
"text": "以äžã«ãé¢æ°åããã°ã©ãã³ã°èšèªã§çšããããäž»èŠãªçšèªã玹ä»ããŸãã",
"title": "é¢æ°åããã°ã©ãã³ã°èšèªçšèªé"
},
{
"paragraph_id": 37,
"tag": "p",
"text": "ã³ã³ãã€ã©ãå€æ°ãé¢æ°ã®åãèªåçã«æšè«ããä»çµã¿ãæããŸããåæšè«ãçšããããšã§ãã³ãŒãã®å¯èªæ§ãåäžãããã³ãŒããçããã€ä¿å®æ§ãé«ããã®ã«ããããšãã§ããŸãã",
"title": "é¢æ°åããã°ã©ãã³ã°èšèªçšèªé"
},
{
"paragraph_id": 38,
"tag": "p",
"text": "以äžããé¢æ°åããã°ã©ãã³ã°èšèªã§çšããããäž»èŠãªçšèªã®äžéšã§ãããããã®æŠå¿µãç解ããããšã§ãé¢æ°åããã°ã©ãã³ã°ã®åºç€ãç解ããããšãã§ããŸãã",
"title": "é¢æ°åããã°ã©ãã³ã°èšèªçšèªé"
},
{
"paragraph_id": 39,
"tag": "p",
"text": "é¢æ°åããã°ã©ãã³ã°èšèªã¯ãããã°ã©ã ãé¢æ°ã®éåãšããŠæããããã°ã©ãã³ã°ãã©ãã€ã ã§ãããå€æ°ã®å代å
¥ãçŠæ¢ãããŠããŸãã代ããã«ãé¢æ°ã®é©çšã«ãã£ãŠå€ãå€æŽããããšãã§ããŸããé¢æ°åããã°ã©ãã³ã°èšèªã®ä»£è¡šçãªèšèªãšããŠãHaskellãOCamlãScalaãªã©ããããŸãã",
"title": "ãŸãšã"
},
{
"paragraph_id": 40,
"tag": "p",
"text": "é¢æ°åããã°ã©ãã³ã°èšèªã§ã¯ãäžå€æ§ãååž°ãªã©ã®æŠå¿µãéèŠèŠãããŸãããŸããé«éé¢æ°ãã«ãªãŒåãé
延è©äŸ¡ãªã©ã®æ©èœããããããæ±çšçãªé¢æ°ãå®çŸããããšãã§ããŸãã",
"title": "ãŸãšã"
},
{
"paragraph_id": 41,
"tag": "p",
"text": "é¢æ°åããã°ã©ãã³ã°èšèªã¯ã䞊ååŠçãåæ£åŠçãªã©ãè€éãªåŠçãç°¡åã«æ±ãããšãã§ããç¹ãé
åçã§ãããŸããããã°ã©ã ã®ä¿å®æ§ãåå©çšæ§ãé«ããªããšããå©ç¹ããããŸãã",
"title": "ãŸãšã"
},
{
"paragraph_id": 42,
"tag": "p",
"text": "ããããé¢æ°åããã°ã©ãã³ã°èšèªã¯ããªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªãšã¯ç°ãªãæ§æãæ©èœãæã€ãããåŠç¿ã³ã¹ããé«ããšãããã¡ãªããããããŸãããŸããäžéšã®åŠçã§ã¯ãæç¶ãåã®æ¹ãå¹ççã§ããããšãããããããã¹ãŠã®åŠçã«é¢æ°åããã°ã©ãã³ã°èšèªãå©çšããããã§ã¯ãããŸããã",
"title": "ãŸãšã"
},
{
"paragraph_id": 43,
"tag": "p",
"text": "以äžããé¢æ°åããã°ã©ãã³ã°èšèªã®åºæ¬çãªæŠå¿µãšç¹åŸŽã§ããé¢æ°åããã°ã©ãã³ã°èšèªã¯ãããã°ã©ã ã®æœè±¡åãåå©çšæ§ãé«ããããã®æåãªããŒã«ã®äžã€ã§ãããä»åŸãŸããŸã泚ç®ãããããšãäºæ³ãããŸãã",
"title": "ãŸãšã"
}
] | é¢æ°åããã°ã©ãã³ã°ã®äžã§éç«ã€ååšã§ããHaskellã¯ãæ°åŠçãªçè«ã«åºã¥ããã¯ãªãŒã³ã§ãšã¬ã¬ã³ããªæ§æãæäŸããéçåä»ãã«ããå®å
šæ§ãé«ããŠããŸãã
å€æ°ãé¢æ°ã¯å³æ Œãªåã«çžãããããã«ãã£ãŠãã°ã®çºçãé²ããŸãã
é¢æ°ã®çŽç²æ§ãšäžå€æ§ã¯ã䞊è¡ããã°ã©ãã³ã°ã«ãããŠãåšåãçºæ®ããå¯äœçšãæå°éã«æãã€ã€é«ãå¹çãå®çŸããŸãã
ãŸããHaskellã®åŒ·åãªåã·ã¹ãã ã¯ãæè»ãªå€çžæ§ãšåã¯ã©ã¹ã«ããæ¡åŒµæ§ãæäŸããã³ãŒãã®åå©çšæ§ãåäžãããŸãã
ãã¿ãŒã³ãããã³ã°ã¯çŽæçã§åŒ·åãªå¶åŸ¡æ§é ãæäŸããã³ãŒãã®å¯èªæ§ãåäžãããŸããHaskellãåŠã¶ããšã¯ãé¢æ°åããã°ã©ãã³ã°ã®ç念ããã©ãã€ã ãç解ãã宣èšçãã€å¹æçãªã³ãŒããæžãã¹ãã«ã身ã«ã€ããããšã«ç¹ãããŸãã
ãã®èšèªã¯åŠç¿è
ã«æŽç·Žãããããã°ã©ãã³ã°ã®ã¢ãããŒããæäŸããæ°ããèŠç¹ã§åé¡ã«åãçµãããšãã§ããããã«ãªããŸãã | é¢æ°åããã°ã©ãã³ã°ã®äžã§éç«ã€ååšã§ããHaskellã¯ãæ°åŠçãªçè«ã«åºã¥ããã¯ãªãŒã³ã§ãšã¬ã¬ã³ããªæ§æãæäŸããéçåä»ãã«ããå®å
šæ§ãé«ããŠããŸãã
å€æ°ãé¢æ°ã¯å³æ Œãªåã«çžãããããã«ãã£ãŠãã°ã®çºçãé²ããŸãã
é¢æ°ã®çŽç²æ§ãšäžå€æ§ã¯ã䞊è¡ããã°ã©ãã³ã°ã«ãããŠãåšåãçºæ®ããå¯äœçšãæå°éã«æãã€ã€é«ãå¹çãå®çŸããŸãã
ãŸããHaskellã®åŒ·åãªåã·ã¹ãã ã¯ãæè»ãªå€çžæ§ãšåã¯ã©ã¹ã«ããæ¡åŒµæ§ãæäŸããã³ãŒãã®åå©çšæ§ãåäžãããŸãã
ãã¿ãŒã³ãããã³ã°ã¯çŽæçã§åŒ·åãªå¶åŸ¡æ§é ãæäŸããã³ãŒãã®å¯èªæ§ãåäžãããŸããHaskellãåŠã¶ããšã¯ãé¢æ°åããã°ã©ãã³ã°ã®ç念ããã©ãã€ã ãç解ãã宣èšçãã€å¹æçãªã³ãŒããæžãã¹ãã«ã身ã«ã€ããããšã«ç¹ãããŸãã
ãã®èšèªã¯åŠç¿è
ã«æŽç·Žãããããã°ã©ãã³ã°ã®ã¢ãããŒããæäŸããæ°ããèŠç¹ã§åé¡ã«åãçµãããšãã§ããããã«ãªããŸãã
== åçŽç·š ==
=== Haskellã®åºæ¬ ===
==== Haskellã®åºæ¬çãªæ§æ ====
Haskellã¯éåžžã«æž
æœã§æ°åŠçãªæ§æãæã£ãŠããŸãã以äžã¯åºæ¬çãªæ§æã®ããã€ãã§ãã
:<syntaxhighlight lang=hs>
-- ã³ã¡ã³ã㯠"--" ããå§ãŸããŸã
-- å€æ°ã®å®çŸ©
x :: Int
x = 5
-- é¢æ°ã®å®çŸ©
add :: Int -> Int -> Int
add a b = a + b
-- ifåŒ
maxValue :: Int -> Int -> Int
maxValue a b = if a > b then a else b
</syntaxhighlight>
==== å€æ°ãšå ====
Haskellã¯éçåä»ãèšèªã§ãããå€æ°ã¯å¿
ãåãæã¡ãŸããåã¯ã³ãã³ã§ç€ºãããŸãã
:<syntaxhighlight lang=hs>
-- æŽæ°å
x :: Int
x = 42
-- æµ®åå°æ°ç¹æ°å
y :: Double
y = 3.14
-- æåå
char :: Char
char = 'A'
</syntaxhighlight>
==== é¢æ°ã®å®çŸ©ãšåŒã³åºã ====
é¢æ°ã®å®çŸ©ã¯ä»¥äžã®ããã«è¡ããŸããå泚éã¯ãªãã·ã§ã³ã§ãããã³ãŒãã®èªã¿ãããã®ããã«æšå¥šãããŸãã
:<syntaxhighlight lang=hs>
add :: Int -> Int -> Int
add a b = a + b
-- é¢æ°ã®åŒã³åºã
result :: Int
result = add 3 5
</syntaxhighlight>
==== ãã¿ãŒã³ãããã³ã° ====
ãã¿ãŒã³ãããã³ã°ã¯Haskellã®åŒ·åãªæ©èœã®äžã€ã§ããé¢æ°ãåŒæ°ã«å¯ŸããŠç°ãªããã¿ãŒã³ã§æ¯ãèãããšãã§ããŸãã
:<syntaxhighlight lang=hs>
saySomething :: Int -> String
saySomething 1 = "One"
saySomething 2 = "Two"
saySomething _ = "Other" -- ã¯ã€ã«ãã«ãŒããã¿ãŒã³
</syntaxhighlight>
äžèšã®é¢æ° <code>saySomething</code> ã¯ãåŒæ°ã1ãªã"One"ã2ãªã"Two"ããã以å€ãªã"Other"ãè¿ããŸããã¯ã€ã«ãã«ãŒã <code>_</code> ã¯ã©ã®ãã¿ãŒã³ã«ããããããŸãã
ãããã®åºæ¬çãªæ§æãç解ããããšã§ãHaskellã§ã®ããã°ã©ãã³ã°ã®åºç€ãç¯ããŸãã次ã«ãåã¯ã©ã¹ããªã¹ããªã©ã®æŠå¿µã«é²ãã§ãããšãããé«åºŠãªããã°ã©ã ãæžãããšãã§ããŸãã
=== åã·ã¹ãã ===
åã·ã¹ãã ã¯ãããã°ã©ãã³ã°èšèªã«ãããŠå€ã®çš®é¡ãæ§è³ªãåé¡ããä»çµã¿ã§ããHaskellã®åã·ã¹ãã ã¯åŒ·åã§éçãªãã®ã§ãããåãšã©ãŒãã³ã³ãã€ã«æã«æ€åºããããšãã§ããŸãã
==== åã¯ã©ã¹ã®æŠå¿µ ====
åã¯ã©ã¹ã¯ãé¢é£ããåã«å¯ŸããŠäžé£ã®æäœãæ¯ãèããå®çŸ©ããæ段ã§ããå
·äœçãªåãåã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ã§ããã°ããã®åã¯ã¯ã©ã¹ãå®çŸ©ããæäœããµããŒãããŠããŸããäŸãã°ãEqåã¯ã©ã¹ã¯çå€æ§ãå®çŸ©ããShowåã¯ã©ã¹ã¯è¡šç€ºãå®çŸ©ããŸãã
:<syntaxhighlight lang=hs>
-- Eqåã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹
instance Eq MyType where
(==) a b = ...
-- Showåã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹
instance Show MyType where
show x = ...
</syntaxhighlight>
==== åã·ã°ããã£ãšåæšè« ====
åã·ã°ããã£ã¯é¢æ°ãå€æ°ã«å¯ŸããŠãã®åãæ瀺çã«æå®ãããã®ã§ããäžæ¹ã§ãHaskellã¯åæšè«ã«ãããã³ã³ãã€ã©ãèªåçã«åãå°åºããããšãã§ããŸããåæšè«ã«ãããã³ãŒããããç°¡æœã§ãããªãããåå®å
šæ§ãç¶æã§ããŸãã
:<syntaxhighlight lang=hs>
-- åã·ã°ããã£
add :: Int -> Int -> Int
add a b = a + b
-- åæšè«ã«ããIntåãå°åºããã
result = add 3 5
</syntaxhighlight>
==== å€çžæ§ãšããªã¢ãŒãã£ãºã ====
å€çžæ§ã¯ãç°ãªãåã«å¯ŸããŠåãæäœãè¡ãããšãã§ããç¹æ§ãæããŸããHaskellã§ã¯ãå€çžæ§ã¯ãžã§ããªã¯ã¹ãããªã¢ãŒãã£ãºã ãšãåŒã°ããŸããããã«ãããé¢æ°ãããŒã¿åãç°ãªãåã«å¯ŸããŠæœè±¡çã«åäœã§ããŸãã
:<syntaxhighlight lang=hs>
-- å€çžçãªé¢æ°
identity :: a -> a
identity x = x
-- åãæå®ããã«åŒã³åºãããšãã§ãã
resultInt = identity 42
resultChar = identity 'A'
</syntaxhighlight>
å€çžæ§ã«ãããæè»æ§ãåäžããæ±çšçã§åå©çšå¯èœãªã³ãŒããæžãããšãã§ããŸããããªã¢ãŒãã£ãºã ã¯ãåã«äŸåããã«æœè±¡çãªããã°ã©ãã³ã°ãå¯èœã«ããŸãã
=== ãªã¹ããšã¿ãã« ===
==== ãªã¹ããšãã¿ãŒã³ããã ====
'''ãªã¹ã'''ã¯Haskellã§æããã䜿çšãããããŒã¿æ§é ã®äžã€ã§ãããèŠçŽ ã®é åºä»ãã®ã³ã¬ã¯ã·ã§ã³ã§ãããã¿ãŒã³ãããã³ã°ã¯ãªã¹ããå¹æçã«æäœããæ段ã®äžã€ã§ãã
:<syntaxhighlight lang=hs>
-- ãã¿ãŒã³ãããã³ã°ãå©çšãããªã¹ãã®æäœ
sumList :: [Int] -> Int
sumList [] = 0 -- 空ãªã¹ãã®å Žå
sumList (x:xs) = x + sumList xs -- å
é èŠçŽ ãšæ®ãã®ãªã¹ãã«å解
</syntaxhighlight>
==== ãªã¹ãå
å
è¡šèš ====
ãªã¹ãå
å
è¡šèšã¯ãç°¡æœã§è¡šçŸåè±ããªãªã¹ãã®çæãå€æãè¡ãæ段ã§ããæ¡ä»¶ãæå®ããŠãªã¹ããçæããããšãã§ããŸãã
:<syntaxhighlight lang=hs>
-- ãªã¹ãå
å
è¡šèšãå©çšãããªã¹ãã®çæ
evens :: [Int]
evens = [x | x <- [1..10], even x] -- 1ãã10ãŸã§ã®å¶æ°ãªã¹ã
</syntaxhighlight>
==== ã¿ãã«ã®å©çš ====
'''ã¿ãã«'''ã¯ç°ãªãåã®èŠçŽ ãçµã¿åãããäžå€ã®ããŒã¿æ§é ã§ããã¿ãã«ã¯åºå®ããããµã€ãºãæã¡ãŸãã
:<syntaxhighlight lang=hs>
-- ã¿ãã«ã®å©çš
person :: (String, Int, Char)
person = ("Alice", 25, 'F')
-- ãã¿ãŒã³ãããã³ã°ãå©çšããã¿ãã«ã®æäœ
getAge :: (String, Int, Char) -> Int
getAge (_, age, _) = age
</syntaxhighlight>
ãªã¹ããšã¿ãã«ã¯Haskellã§é »ç¹ã«äœ¿çšããããªã¹ãå
å
è¡šèšããã¿ãŒã³ãããã³ã°ãå«ããããã®æŠå¿µãç解ããããšã§ãããŒã¿æäœãå€æããã容æã«ãªããŸãã
=== ååž°ãšé«éé¢æ° ===
==== ååž°ã®åºæ¬ ====
ååž°ã¯ãé¢æ°ãèªåèªèº«ãåŒã³åºããã¯ããã¯ã§ãããHaskellã®ç¹ã«åŒ·åãªæ©èœã§ããååž°ã䜿ãããšã§ãåé¡ãåçŽåãããããªããŸãã
:<syntaxhighlight lang=hs>
-- ååž°ãå©çšããéä¹ã®èšç®
factorial :: Integer -> Integer
factorial 0 = 1
factorial n = n * factorial (n - 1)
</syntaxhighlight>
=== ååž°ã®ãã¹ããã©ã¯ãã£ã¹ ===
# ããŒã¹ã±ãŒã¹ã®èšå®: ååž°é¢æ°ãäœæããéã«ã¯ãé©åãªããŒã¹ã±ãŒã¹ãèšå®ããŠãã ãããããã¯ååž°åŒã³åºããåæ¢ãããåºæºã§ãã
#:<syntaxhighlight lang=hs>
factorial :: Integer -> Integer
factorial 0 = 1
factorial n = n * factorial (n - 1)
</syntaxhighlight>
# æ«å°Ÿååž°ã®æé©å: æ«å°Ÿååž°ã®æé©åãæ€èšããŠãã ãããHaskellã®ã³ã³ãã€ã©ã¯æ«å°Ÿååž°ãæé©åããŠããããããã¹ã¿ãã¯ãªãŒããŒãããŒãé¿ããããšãã§ããŸãã
#:<syntaxhighlight lang=hs>
factorialTailRec :: Integer -> Integer
factorialTailRec n = go n 1
where
go 0 acc = acc
go m acc = go (m - 1) (m * acc)
</syntaxhighlight>
# ãã¿ãŒã³ãããã³ã°ã®å©çš: ãã¿ãŒã³ãããã³ã°ã掻çšããŠãååž°åŒã³åºããåãããããããŠãã ããã
#:<syntaxhighlight lang=hs>
sumList :: [Int] -> Int
sumList [] = 0
sumList (x:xs) = x + sumList xs
</syntaxhighlight>
=== ååž°ã®ãŠãŒã¹ã±ãŒã¹ ===
# ããŒã¿æ§é ã®æ¢çŽ¢ãå€æ: ååž°ã䜿çšããŠãæšæ§é ããªã¹ããªã©ã®ããŒã¿æ§é ãååž°çã«æ¢çŽ¢ãããå€æãããããããšããããŸãã
#:<syntaxhighlight lang=hs>
-- äºåæšã®èŠçŽ ã®åèšãèšç®
data BinaryTree a = Leaf a | Node (BinaryTree a) (BinaryTree a)
treeSum :: Num a => BinaryTree a -> a
treeSum (Leaf x) = x
treeSum (Node l r) = treeSum l + treeSum r
</syntaxhighlight>
# æ°åŠçãªèšç®: ååž°ã䜿çšããŠãæ°åŠçãªèšç®ãæäœãè¡ãããšããããŸããéä¹ããã£ããããæ°åãªã©ãå
žåçãªäŸã§ãã
#:<syntaxhighlight lang=hs>
-- ãã£ããããæ°åã® n çªç®ã®èŠçŽ ãèšç®
fibonacci :: Integer -> Integer
fibonacci 0 = 0
fibonacci 1 = 1
fibonacci n = fibonacci (n - 1) + fibonacci (n - 2)
</syntaxhighlight>
{{ã³ã©ã |é¢æ°åããã°ã©ãã³ã°ã§ã¯ã«ãŒãã¯æ¬é ããååž°ãåžžçšããã|2=é¢æ°åããã°ã©ãã³ã°ã§ã¯ãã«ãŒããããååž°ãããå©çšãããåŸåããããŸããããã«ã¯ããã€ãã®çç±ããããŸãã
# äžå€æ§ãšåç
§ééæ§: é¢æ°åããã°ã©ãã³ã°ã§ã¯ãå€æ°ã®å€ãäžå€ã§ãããé¢æ°ã®è©äŸ¡ãåç
§ééæ§ãæã€ããšãéèŠã§ããååž°çãªé¢æ°åŒã³åºãã«ãããäžå€æ§ãšåç
§ééæ§ãç¶æãããããªããŸãã
# ç°¡æœã§æœè±¡çãªã³ãŒã: ååž°ã¯ãã°ãã°ç°¡æœã§æœè±¡çãªã³ãŒããæžãã®ã«é©ããŠããŸããååž°ã䜿çšãããšãè€éãªåé¡ãåçŽã§ç解ããããå°ããªéšåã«åå²ã§ããŸãã
# ååž°ãæ°åŠçåž°çŽæ³ã«äŒŒãŠãã: æ°åŠçåž°çŽæ³ãšåæ§ã«ãååž°ã¯åé¡ãåºæ¬ã±ãŒã¹ãšåž°çŽã¹ãããã«åå²ããæ¹æ³ãæäŸããŸããããã«ãããåé¡å
šäœã«å¯Ÿããã¢ãããŒããæ§ç¯ãããããªããŸãã
# é«éé¢æ°ãšã®çžæ§: é«éé¢æ°ãšååž°ã¯çžæ§ãè¯ããååž°ã䜿çšããããšã§é«éé¢æ°ã掻çšãããããªããŸããé«éé¢æ°ã䜿çšããããšã§ãããäžè¬çã§åå©çšå¯èœãªã³ãŒããæžãããšãã§ããŸãã
äŸãã°ãHaskellã®ãªã¹ãåŠçã§ã¯ã<code>map</code>ã<code>filter</code>ã<code>foldl</code>ã<code>foldr</code>ãªã©ã®é«éé¢æ°ãšååž°ãçµã¿åãããŠéåžžã«å¹æçãªã³ãŒããæžãããšãã§ããŸãã
}}
==== é«éé¢æ°ã®å°å
¥ ====
'''é«éé¢æ°'''ã¯ãä»ã®é¢æ°ãåŒæ°ã«åãããé¢æ°ãè¿ãé¢æ°ã®ããšã§ããããã«ãããæœè±¡åºŠãé«ãŸããæ±çšçãªé¢æ°ãäœæã§ããŸãã
:<syntaxhighlight lang=hs>
-- é«éé¢æ°ãå©çšããé¢æ°
applyTwice :: (a -> a) -> a -> a
applyTwice f x = f (f x)
</syntaxhighlight>
==== map, filter, foldãªã©ã®é«éé¢æ°ã®å©çš ====
Haskellã«ã¯æšæºã§ããã€ãã®é«éé¢æ°ãçµã¿èŸŒãŸããŠããããããã¯ãªã¹ããªã©ã®ããŒã¿æ§é ãæäœããéã«äŸ¿å©ã§ãã
:<syntaxhighlight lang=hs>
-- map: ãªã¹ãã®åèŠçŽ ã«é¢æ°ãé©çšãã
squaredList :: [Int] -> [Int]
squaredList xs = map (\x -> x * x) xs
-- filter: æ¡ä»¶ã«åèŽããèŠçŽ ã ããæœåºãã
evenNumbers :: [Int] -> [Int]
evenNumbers xs = filter even xs
-- foldl: å·Šããé ã«ç³ã¿èŸŒã
sumList :: [Int] -> Int
sumList xs = foldl (\acc x -> acc + x) 0 xs
</syntaxhighlight>
ãããã®é«éé¢æ°ã¯ååž°ãšçµã¿åãããŠéåžžã«åŒ·åãªæ©èœãæäŸããã³ãŒããããç°¡æœãã€å¹æçã«ããã®ã«åœ¹ç«ã¡ãŸãã
=== ã©ã ãåŒãšç¡åé¢æ° ===
==== ã©ã ãåŒã®æ§æãšå©çš ====
'''ã©ã ãåŒ'''ã¯ãç¡åã®é¢æ°ãäœæããããã®åŒã§ããéåžžãç°¡æœãªé¢æ°ãå³åº§ã«å®çŸ©ããå Žåã«äœ¿çšãããŸãã
:<syntaxhighlight lang=hs>
-- ã©ã ãåŒã®äŸ: åŒæ° x ã 2 åããé¢æ°
double = \x -> x * 2
</syntaxhighlight>
==== ã«ãªãŒåãšéšåé©çš ====
'''ã«ãªãŒå'''ã¯ãé¢æ°ãè€æ°ã®åŒæ°ãåãéãååŒæ°ãäžã€ãã€åãåãæ°ããé¢æ°ãè¿ãæŠå¿µã§ããããã«ãããéšåé©çšãå¯èœã«ãªããŸãã
:<syntaxhighlight lang=hs>
-- ã«ãªãŒåãããé¢æ°
add :: Int -> Int -> Int
add x y = x + y
-- éšåé©çšã®äŸ: add é¢æ°ã« 5 ãéšåé©çšããŠæ°ããé¢æ°ãäœæ
addFive :: Int -> Int
addFive = add 5
</syntaxhighlight>
ã©ã ãåŒãšã«ãªãŒåã«ãããé¢æ°ã®æè»æ§ãåäžããŸãããããã®æŠå¿µãçµã¿åãããŠãç°¡æœã§åå©çšå¯èœãªé¢æ°ãäœæã§ããŸãã
=== é«éé¢æ°ã®ãã¹ããã©ã¯ãã£ã¹ ===
# åã·ã°ããã£ã®å©çš: é«éé¢æ°ãå®çŸ©ããéã«ã¯ãæ瀺çãªåã·ã°ããã£ãä»ããããšã§ã³ãŒãã®ç解ã容æã«ãªããŸãã
#:<syntaxhighlight lang=hs>
applyTwice :: (a -> a) -> a -> a
applyTwice f x = f (f x)
</syntaxhighlight>
# é¢æ°åæã®æŽ»çš: <code>.</code> (é¢æ°åææŒç®å) ã䜿çšããŠé¢æ°ãåæããããšã§ãã³ãŒããç°¡æœã«ããããšãã§ããŸãã
#:<syntaxhighlight lang=hs>
sumOfSquaresEven = sum . map (\x -> x * x) . filter even
</syntaxhighlight>
# ã©ã ãåŒã®æŽ»çš: ç¡åé¢æ°ãã©ã ãåŒã䜿çšããŠãç°¡æœãã€ã€ã³ã©ã€ã³ã§é¢æ°ãå®çŸ©ããããšãã§ããŸãã
#:<syntaxhighlight lang=hs>
squaredList = map (\x -> x * x)
</syntaxhighlight>
# äžè¬åãšæœè±¡å: é«éé¢æ°ãäžè¬çã§æœè±¡çãªåœ¢ã§èšèšããåå©çšå¯èœã§æè»ãªã³ãŒããç®æããŸãããã
#:<syntaxhighlight lang=hs>
applyOperationToList :: (a -> b) -> [a] -> [b]
applyOperationToList _ [] = []
applyOperationToList f (x:xs) = f x : applyOperationToList f xs
</syntaxhighlight>
ãããã®ãã¹ããã©ã¯ãã£ã¹ãå®ãããšã§ãååž°ãšé«éé¢æ°ãçšããã³ãŒããç解ãããããä¿å®æ§ãåäžããŸãã
=== é«éé¢æ°ã®ãŠãŒã¹ã±ãŒã¹ ===
#ããŒã¿å€æ: é«éé¢æ°ã䜿çšããŠããªã¹ããªã©ã®ããŒã¿æ§é ãå€æããããã£ã«ã¿ãªã³ã°ãããããããšããããŸãã
#:<syntaxhighlight lang=hs>
-- ãªã¹ãã®åèŠçŽ ã2åãã
doubleList :: [Int] -> [Int]
doubleList = map (\x -> x * 2)
</syntaxhighlight>
#æœè±¡å: é«éé¢æ°ã䜿çšããŠãã³ãŒããæœè±¡åããäžè¬çã§åå©çšå¯èœãªé¢æ°ãäœæããããšããããŸãã
#:<syntaxhighlight lang=hs>
-- ãªã¹ãã®åèŠçŽ ã«é¢æ°ãé©çšããé«éé¢æ°
applyToAll :: (a -> b) -> [a] -> [b]
applyToAll f xs = map f xs
</syntaxhighlight>
#ç³ã¿èŸŒã¿ (Folding): é«éé¢æ°ã䜿çšããŠããªã¹ããªã©ã®ããŒã¿æ§é ãç³ã¿èŸŒãã§æ°ããå€ãçæããããšããããŸãã
#:<syntaxhighlight lang=hs>
-- ãªã¹ãã®åèšãèšç®ãã
sumList :: [Int] -> Int
sumList = foldl (+) 0
</syntaxhighlight>
ãããã®ãŠãŒã¹ã±ãŒã¹ã¯ååž°ãšé«éé¢æ°ã®ç¹æ§ã掻ãããŠãã³ãŒããå¹æçã«æ§é åããæè»ãã€åå©çšå¯èœãªããã°ã©ã ãäœæããã®ã«åœ¹ç«ã¡ãŸãã
{{ã³ã©ã |Haskellã®çŽç²æ§|2=Haskellã¯çŽç²ãªé¢æ°åããã°ã©ãã³ã°èšèªãšããŠç¥ãããŠããããã®ç¹åŸŽã®äžã€ããçŽåºŠãã§ããHaskellã®çŽåºŠã«ã¯ããã€ãã®åŽé¢ããããŸãã
;çŽç²ãªé¢æ°: Haskellã®é¢æ°ã¯çŽç²ã§ãããšããç¹æ§ããããŸããã€ãŸããåãå
¥åã«å¯ŸããŠåžžã«åãåºåãè¿ããå€éšã®ç¶æ
ã«åœ±é¿ãäžããŸãããããã¯åç
§ééæ§ã®æŠå¿µã«åºã¥ããŠããŸãã
;äžå€æ§: Haskellã«ãããŠå€æ°ã¯äžå€ã§ããå€æ°ãäžåºŠæçžããããããã®å€ã¯å€æŽãããŸãããããã«ãããããã°ã©ã ã®æåãäºæž¬å¯èœã§ãç解ãããããªããŸãã
;å¯äœçšã®åé¢: Haskellã§ã¯ãå¯äœçšïŒSide EffectïŒãå³å¯ã«å¶åŸ¡ãããŠããŸããçŽç²ãªé¢æ°ã¯å¯äœçšãæããªããããå¯äœçšãçºçããã³ãŒãã¯ç¹å®ã®ç®æã§éå®ããããã®ä»ã®ã³ãŒãã¯çŽç²ãªé¢æ°ãšããŠæ±ãããŸãã
;é
延è©äŸ¡: Haskellã¯é
延è©äŸ¡ãæ¡çšããŠããŸããããã¯ãåŒãå®éã«è©äŸ¡ããããŸã§å€ãèšç®ãããªããšããèãæ¹ã§ããããã«ãããå¿
èŠãªæç¹ã§ã®ã¿èšç®ãè¡ãããå¹ççãªè©äŸ¡ãå¯èœã«ãªããŸãã
ãããã®çŽç²æ§ã«ãããHaskellã®ããã°ã©ã ã¯äžè²«æ§ããããç解ããããããã°ã®çºçãæžå°ãããå¹æããããŸãããã ããäžéšã®I/Oæäœãç¶æ
å€æŽãå¿
èŠãšããåŠçã¯ãäžçŽç·šã§çŽ¹ä»ããã¢ãããšåŒã°ããæŠå¿µãéããŠå¶åŸ¡ãããŸããã¢ããã䜿çšããããšã§ãå€éšã®å¯äœçšãçŽç²ãªé¢æ°åããã°ã©ãã³ã°ã®æ çµã¿å
ã§åãæ±ãããšãã§ããŸãã
}}
== äžçŽç·š ==
=== Haskellåºæã®ç¹åŸŽãšäžè¬çãªé¢æ°åããã°ã©ãã³ã°ã®åå ===
Haskellã¯é¢æ°åããã°ã©ãã³ã°ã®äžã§ç¹ã«çŽç²ãªèšèªãšããŠç¥ãããŠããŸãããHaskellåºæã®ç¹åŸŽãšäžè¬çãªé¢æ°åããã°ã©ãã³ã°ã®ååã«ã¯ããã€ãã®å
±éç¹ãšå·®ç°ããããŸãã以äžã¯ããã®äž»ãªå·®ç°ãšå
±éç¹ã§ãã
;Haskellåºæã®ç¹åŸŽ:
:;çŽç²æ§ãšåç
§ééæ§:Haskellã¯çŽç²ãªé¢æ°åããã°ã©ãã³ã°èšèªã§ãããçŽç²æ§ãšåç
§ééæ§ã培åºçã«åŒ·èª¿ãããŠããŸããé¢æ°ã¯å
¥åã«å¯ŸããŠåžžã«åãåºåãè¿ããå¯äœçšãæããªãããšãæåŸ
ãããŸãã
:;åæšè«:Haskellã¯åŒ·åãªéçåä»ããæã¡ãåæšè«ã«ãã£ãŠå€ãã®å Žåãåãæ瀺çã«å®£èšããã«ããã°ã©ã ãæžãããšãã§ããŸããããã«ãããåå®å
šæ§ãåäžããã³ãŒããããæŽç·Žããã圢ã§æžããŸãã
:;ã¢ãã:Haskellã§ã¯ã¢ãããšããæŠå¿µãéèŠã§ããã¢ããã¯å¯äœçšãæã€èšç®ãå¶åŸ¡ããææ³ãæäŸããŸããããã«ãããçŽç²æ§ãä¿ã¡ãªããã I/O æäœãç¶æ
å€æŽãªã©ã®å¯äœçšãæ±ãããšãå¯èœã«ãªããŸãã
;:é
延è©äŸ¡:Haskellã§ã¯é
延è©äŸ¡ãæ¡çšãããŠããŸããããã¯ãå€ãå¿
èŠã«ãªããŸã§è©äŸ¡ãé
延ãããå¿
èŠãªæç¹ã§ã®ã¿èšç®ãè¡ããããšããèãæ¹ã§ããããã«ãããç¡é§ãªèšç®ãé¿ãã€ã€å¹ççã«ããã°ã©ã ãèšè¿°ã§ããŸãã
;äžè¬çãªé¢æ°åããã°ã©ãã³ã°ã®åå:
:;é«éé¢æ°:é¢æ°ã第äžçŽãªããžã§ã¯ããšããŠæ±ããé«éé¢æ°ïŒé¢æ°ãåŒæ°ãæ»ãå€ãšããŠåãé¢æ°ïŒãé »ç¹ã«äœ¿çšããããšãé¢æ°åããã°ã©ãã³ã°ã®éèŠãªååã§ããããã«ãããæè»ã§æœè±¡çãªã³ãŒããæžããŸãã
:;äžå€æ§:é¢æ°åããã°ã©ãã³ã°ã§ã¯ãå€æŽå¯èœãªç¶æ
ãé¿ããäžå€æ§ãéèŠããŸããHaskellããããå°éããŠããŸãããä»ã®é¢æ°åããã°ã©ãã³ã°èšèªã§ãåæ§ã®ååãé©çšãããŸãã
:;é¢æ°åæ:é¢æ°ãçµã¿åãããŠæ°ããé¢æ°ãäœãé¢æ°åæãäžè¬çã§ããé¢æ°åæã«ãããè€éãªåŠçãå°ããªåäœã«åå²ãããããªããŸãã
:;ååž°:ååž°ã¯é¢æ°åããã°ã©ãã³ã°ã«ãããŠãã䜿çšãããææ³ã§ããHaskellãååž°ããµããŒããããããå©çšããŠããŒã¿æ§é ã®æ¢çŽ¢ãå€æãªã©ãè¡ããŸãã
ãããã®ååã¯ãHaskellã«éããé¢æ°åããã°ã©ãã³ã°ã®äžè¬çãªååãšããŠå
±æãããŠããŸãããã ããHaskellã¯ãã®çŽç²æ§ãåæšè«ãã¢ãããšãã£ãç¬èªã®ç¹åŸŽã«ãã£ãŠãä»ã®é¢æ°åããã°ã©ãã³ã°èšèªãšå·®ç°ãçãŸããŠããŸãã
æ°ãã€ããæ¹ãããããããããããŸãããã[[#åçŽç·š|åçŽç·š]]ã§ã¯ã€ãšããŠäžè¬çãªé¢æ°åããã°ã©ãã³ã°ã®ååãåãäžããŸããã
äžçŽç·šã§ã¯ã段éçã«Haskellåºæã®ç¹åŸŽã段éçã«å¢ãããŠãããŸãã
=== ã¢ãžã¥ãŒã«ãšããã±ãŒãž ===
==== ã¢ãžã¥ãŒã«ã®äœæãšå©çš ====
==== Hackageããã®ããã±ãŒãžã®ã€ã³ã¹ããŒã« ====
:<syntaxhighlight lang=hs>
</syntaxhighlight>
=== ã¢ãã ===
==== ã¢ããã®åºæ¬æŠå¿µ ====
==== Maybeã¢ããããªã¹ãã¢ãããªã©ã®å
·äœäŸ ====
==== ã¢ããå€æå ====
=== IOã¢ãã ===
==== Haskellã«ãããå
¥åºåã®åºæ¬ ====
==== doæ§æã®å©çš ====
==== ã¢ããã䜿ã£ãå¯äœçšã®æ±ãæ¹ ====
=== åã¯ã©ã¹ã®è©³çŽ° ===
==== FunctorãApplicativeãMonadãªã©ã®åã¯ã©ã¹ã®è©³çŽ°ãªç解 ====
==== åã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ã®äœæ ====
=== ããã©ãŒãã³ã¹ãšæé©å ===
==== ã¹ããªã¯ãè©äŸ¡ãšé
延è©äŸ¡ ====
==== ããã©ãŒãã³ã¹ã®åäžã®ããã®æé©åãã¯ãã㯠====
== äžçŽç·š ==
=== ãã¡ã³ã¯ã¿ãã¢ããªã«ãã£ããã¢ãããã©ã³ã¹ãã©ãŒã㌠===
==== ãã¡ã³ã¯ã¿ãšã¢ããªã«ãã£ãã®äžè¬å ====
==== ã¢ãããã©ã³ã¹ãã©ãŒããŒã®å©çš ====
=== ããŒãµãŒã³ã³ãããŒã¿ãŒ ===
==== ããŒãµãŒã³ã³ãããŒã¿ãŒã®æŠå¿µ ====
==== Megaparsecãªã©ã®ã©ã€ãã©ãªã®å©çš ====
=== STM (Software Transactional Memory) ===
==== ãã©ã³ã¶ã¯ã·ã§ãã«ã¡ã¢ãªã®åºæ¬åå ====
==== STMãå©çšãã䞊è¡ããã°ã©ãã³ã° ====
=== ããŒã¿æ§é ãšã¢ã«ãŽãªãºã ===
==== æšæ§é ãã°ã©ãæ§é ãªã©ã®ããŒã¿æ§é ã®å©çš ====
==== é«åºŠãªã¢ã«ãŽãªãºã ã®å®è£
====
=== ã°ã©ãã£ã«ã«ãŠãŒã¶ãŒã€ã³ã¿ãŒãã§ãŒã¹ (GUI) ã®æ§ç¯ ===
==== Haskellã§GUIãäœæããããã®ã©ã€ãã©ãªã®å©çš ====
----
== é¢æ°åããã°ã©ãã³ã°èšèªäŸ¿èŠ§ ==
é¢æ°åããã°ã©ãã³ã°èšèªã«ã¯å€ãã®çš®é¡ããããŸãã以äžã«ã代衚çãªé¢æ°åããã°ã©ãã³ã°èšèªãããã€ã玹ä»ããŸãã
;Haskell
çŽç²ãªé¢æ°åããã°ã©ãã³ã°èšèªã§ããã匷ãéçåä»ããæã¡ãŸããé
延è©äŸ¡ãã¢ãããªã©ã®æ©èœãæã¡ãé«åºŠãªæœè±¡åãå®çŸããããšãã§ããŸãã
;OCaml
é¢æ°åããã°ã©ãã³ã°èšèªãšããŠã¯çããã匷ãéçåä»ããæã€èšèªã§ããé«éé¢æ°ãã«ãªãŒåããã¿ãŒã³ãããã³ã°ãªã©ã®æ©èœããããç¹ã«æ°å€èšç®ãã³ã³ãã€ã©ãªã©ã®åéã§æŽ»èºããŠããŸãã
;Scala
Javaãã©ãããã©ãŒã äžã§åäœããé¢æ°åããã°ã©ãã³ã°èšèªã§ããããªããžã§ã¯ãæåããã°ã©ãã³ã°ãšã®èåãç¹åŸŽçã§ããéçåä»ãããžã§ããªã¯ã¹ããã¿ãŒã³ãããã³ã°ãªã©ã®æ©èœããããåæ£åŠçãã¬ãŒã ã¯ãŒã¯ã§ããApache Sparkã«ãæ¡çšãããŠããŸãã
;Clojure
Lispã®æ¹èšã§ãããJVMäžã§åäœããé¢æ°åããã°ã©ãã³ã°èšèªã§ãããã¯ããäžå€æ§ããŒã¿æ§é ãSTMãªã©ã®æ©èœããããã³ã³ã«ã¬ã³ãããã°ã©ãã³ã°ã«ç¹åããŠããŸãã
;F#
.NET Frameworkäžã§åäœãããã«ããã©ãã€ã èšèªã§ãããé¢æ°åããã°ã©ãã³ã°ã«ç¹åããŠããŸããéçåä»ããã¿ãã«ããã€ãã©ã€ã³æŒç®åãªã©ã®æ©èœããããC#ãšçµã¿åãããããšã§åŒ·åãªããã°ã©ãã³ã°ç°å¢ãæ§ç¯ããããšãã§ããŸãã
以äžãã代衚çãªé¢æ°åããã°ã©ãã³ã°èšèªã®äžéšã§ããããããã®èšèªã«ã¯ç¹åŸŽçãªæ©èœããããããã°ã©ã ã®ç®çã«å¿ããŠéžæããããšãéèŠã§ãã
== é¢æ°åããã°ã©ãã³ã°èšèªçšèªé ==
以äžã«ãé¢æ°åããã°ã©ãã³ã°èšèªã§çšããããäž»èŠãªçšèªã玹ä»ããŸãã
* çŽç²é¢æ°ïŒPure functionïŒ {{---}} å€éšç¶æ
ãå€æŽããªããå¯äœçšã®ãªãé¢æ°ã®ããšãæããŸããåãåŒæ°ã«å¯ŸããŠã¯åžžã«åãå€ãè¿ããäºæž¬å¯èœã§ãã¹ãããããã³ãŒããå®çŸããããã«éèŠãªæŠå¿µã§ãã
* é«éé¢æ°ïŒHigher-order functionïŒ {{---}} é¢æ°ãåŒæ°ãšããŠåãåã£ãããæ»ãå€ãšããŠè¿ãããããé¢æ°ã®ããšãæããŸããé¢æ°ãå€ãšããŠæ±ããããšã§ãããæœè±¡çãªã³ãŒããæžãããšãã§ããŸãã
* ã«ãªãŒåïŒCurryingïŒ {{---}} åŒæ°ãè€æ°åãé¢æ°ããåŒæ°ãäžã€ãã€åãé¢æ°ã®é£ç¶åŒã³åºãã«å€æããããšãæããŸããã«ãªãŒåããããšã§ãéšåé©çšãé«éé¢æ°ã®çµã¿åãããªã©ã容æã«ãªããŸãã
* ã¢ããïŒMonadïŒ {{---}} å¯äœçšã®ããã³ãŒããæ±ãéã«äœ¿çšããããæœè±¡çãªæŠå¿µã®ããšãæããŸããå¯äœçšã®ããã³ãŒããçŽç²é¢æ°ãšåæ§ã«æ±ããããã«ããããšã§ãã³ãŒãã®åå©çšæ§ãä¿å®æ§ãé«ããããšãã§ããŸãã
* é
延è©äŸ¡ïŒLazy evaluationïŒ {{---}} å€ãå¿
èŠã«ãªããŸã§è©äŸ¡ãé
延ããããšãæããŸããå¿
èŠãªå€ã®ã¿ãèšç®ããããšã§ãç¡é§ãªèšç®ãé¿ããããšãã§ããŸãã
* ãã¿ãŒã³ãããã³ã°ïŒPattern matchingïŒ {{---}} å€ã®ãã¿ãŒã³ã«åãããŠåŠçãåå²ããããšãæããŸããåå²åŠçãçŽæçã«èšè¿°ããããšãã§ããè€éãªåå²åŠçãç°¡æœã«è¡šçŸããããšãã§ããŸãã
* äžå€æ§ïŒImmutabilityïŒ {{---}} å€æŽäžå¯èœãªå€ãæ±ãããšãæããŸããå€æŽäžå¯èœãªå€ã¯ã¹ã¬ããã»ãŒãã§ãããåãå€ãå
±æããããšã§ãªããžã§ã¯ãã®çæãæžããããšãã§ããŸãã
* ç³ã¿èŸŒã¿ïŒFoldingïŒ {{---}} ãªã¹ããé
åãªã©ã®éåã«å¯ŸããŠãèŠçŽ ãé 次åŠçããŠããæäœãæããŸããç³ã¿èŸŒã¿ãçšããããšã§ãéåã«å¯Ÿããç¹°ãè¿ãåŠçãäžè¡ã§è¡šçŸããããšãã§ããŸãã
* ãžã§ããªã¯ã¹ïŒGenericsïŒ {{---}} åã®æœè±¡åãå¯èœã«ããããšãæããŸãããžã§ããªã¯ã¹ãçšããããšã§ãåå®å
šæ§ãä¿ã¡ã€ã€æ±çšçãªã³ãŒããèšè¿°ããããšãã§ããŸãã
* ã«ããŽãªãŒçè«ïŒCategory theoryïŒ {{---}} é¢æ°åããã°ã©ãã³ã°ã«ãããçè«çãªåºç€ãšãªãæ°åŠçãªåéã®äžã€ã§ããé¢æ°ã察象ãšããé¢æ°å士ã®åæãå°ãšããŠæ±ãããšã§ãé¢æ°ã®çµååŸãæçå°ãªã©ã®æ§è³ªãèå¯ããŸãã
* åæšè«ïŒType inferenceïŒ {{---}}
ã³ã³ãã€ã©ãå€æ°ãé¢æ°ã®åãèªåçã«æšè«ããä»çµã¿ãæããŸããåæšè«ãçšããããšã§ãã³ãŒãã®å¯èªæ§ãåäžãããã³ãŒããçããã€ä¿å®æ§ãé«ããã®ã«ããããšãã§ããŸãã
* ååž°ïŒRecursionïŒ {{---}} èªèº«ãåŒã³åºãããšã§ãåãåŠçãç¹°ãè¿ãããšãæããŸããååž°ãçšããããšã§ãå埩åŠçã«æ¯ã¹ãŠã³ãŒãã®èšè¿°ã容æã«ãªãå ŽåããããŸãã
* ã©ã ãèšç®ïŒLambda calculusïŒ {{---}} é¢æ°ã®æ°åŠçãªã¢ãã«ãšããŠçšããããèšèªã§ãããé¢æ°åããã°ã©ãã³ã°ã®åºç€ãšãªã£ãŠããŸããé¢æ°ãã©ã ãèšæ³ã§è¡šçŸããé¢æ°é©çšãç°¡çŽãè¡ãããšã§ãé¢æ°ã®æå³è«ã圢åŒçã«èå¯ããŸãã
* ã¹ããªãŒã ïŒStreamïŒ {{---}} ç¡éã«ç¶ãããŒã¿åãè¡šçŸããããã®æŠå¿µã§ãé
延è©äŸ¡ãšçžæ§ãè¯ãã§ããã¹ããªãŒã ãçšããããšã§ãç¡éã®ããŒã¿åãã³ã³ãã¯ãã«è¡šçŸããããšãã§ããŸãã
* ã¯ããŒãžã£ãŒïŒClosureïŒ {{---}} é¢æ°ãšãã®é¢æ°ãåç
§ããå€æ°ã®æçžãæã€ãªããžã§ã¯ãã®ããšãæããŸããã¯ããŒãžã£ãŒãçšããããšã§ãé¢æ°ãåç
§ããå€æ°ãå€éšããå€æŽãããªãããã«ããããšãã§ããŸãããŸããã¯ããŒãžã£ãŒãçšããããšã§ãé¢æ°ãçæããé¢æ°ãèšè¿°ããããšãã§ããŸãã
以äžããé¢æ°åããã°ã©ãã³ã°èšèªã§çšããããäž»èŠãªçšèªã®äžéšã§ãããããã®æŠå¿µãç解ããããšã§ãé¢æ°åããã°ã©ãã³ã°ã®åºç€ãç解ããããšãã§ããŸãã
== ãŸãšã ==
é¢æ°åããã°ã©ãã³ã°èšèªã¯ãããã°ã©ã ãé¢æ°ã®éåãšããŠæããããã°ã©ãã³ã°ãã©ãã€ã ã§ãããå€æ°ã®å代å
¥ãçŠæ¢ãããŠããŸãã代ããã«ãé¢æ°ã®é©çšã«ãã£ãŠå€ãå€æŽããããšãã§ããŸããé¢æ°åããã°ã©ãã³ã°èšèªã®ä»£è¡šçãªèšèªãšããŠãHaskellãOCamlãScalaãªã©ããããŸãã
é¢æ°åããã°ã©ãã³ã°èšèªã§ã¯ãäžå€æ§ãååž°ãªã©ã®æŠå¿µãéèŠèŠãããŸãããŸããé«éé¢æ°ãã«ãªãŒåãé
延è©äŸ¡ãªã©ã®æ©èœããããããæ±çšçãªé¢æ°ãå®çŸããããšãã§ããŸãã
é¢æ°åããã°ã©ãã³ã°èšèªã¯ã䞊ååŠçãåæ£åŠçãªã©ãè€éãªåŠçãç°¡åã«æ±ãããšãã§ããç¹ãé
åçã§ãããŸããããã°ã©ã ã®ä¿å®æ§ãåå©çšæ§ãé«ããªããšããå©ç¹ããããŸãã
ããããé¢æ°åããã°ã©ãã³ã°èšèªã¯ããªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªãšã¯ç°ãªãæ§æãæ©èœãæã€ãããåŠç¿ã³ã¹ããé«ããšãããã¡ãªããããããŸãããŸããäžéšã®åŠçã§ã¯ãæç¶ãåã®æ¹ãå¹ççã§ããããšãããããããã¹ãŠã®åŠçã«é¢æ°åããã°ã©ãã³ã°èšèªãå©çšããããã§ã¯ãããŸããã
以äžããé¢æ°åããã°ã©ãã³ã°èšèªã®åºæ¬çãªæŠå¿µãšç¹åŸŽã§ããé¢æ°åããã°ã©ãã³ã°èšèªã¯ãããã°ã©ã ã®æœè±¡åãåå©çšæ§ãé«ããããã®æåãªããŒã«ã®äžã€ã§ãããä»åŸãŸããŸã泚ç®ãããããšãäºæ³ãããŸãã
==ã³ãŒãã®ã£ã©ãªãŒ==
===è¡å===
:<syntaxhighlight lang=hs>
-- ã¢ãžã¥ãŒã«ã®å®£èš
module Main where
import Data.List (intercalate)
-- è¡ååã®å®çŸ©
data Matrix a = Matrix { matData :: [[a]] }
-- è¡åã®æŒç®
instance (Num a) => Num (Matrix a) where
(+) = addMatrix
(-) = subtractMatrix
(*) = multiplyMatrix
abs = undefined
signum = undefined
fromInteger = undefined
-- è¡åã®å ç®
addMatrix :: (Num a) => Matrix a -> Matrix a -> Matrix a
addMatrix (Matrix mat1) (Matrix mat2) = Matrix $ zipWith (zipWith (+)) mat1 mat2
-- è¡åã®æžç®
subtractMatrix :: (Num a) => Matrix a -> Matrix a -> Matrix a
subtractMatrix (Matrix mat1) (Matrix mat2) = Matrix $ zipWith (zipWith (-)) mat1 mat2
-- è¡åã®ä¹ç®
multiplyMatrix :: (Num a) => Matrix a -> Matrix a -> Matrix a
multiplyMatrix (Matrix mat1) (Matrix mat2) = Matrix $ [[sum $ zipWith (*) row col | col <- transpose mat2] | row <- mat1]
where
transpose = foldr (zipWith (:)) (repeat [])
-- è¡åã®é€ç®
instance (Fractional a) => Fractional (Matrix a) where
(/) = divideMatrix
fromRational = undefined
-- è¡åã®é€ç®
divideMatrix :: (Fractional a) => Matrix a -> Matrix a -> Matrix a
divideMatrix (Matrix mat) (Matrix scalarMat) = Matrix $ zipWith (zipWith (/)) mat scalarMat
-- è¡åã®è¡šç€º
instance (Show a) => Show (Matrix a) where
show = matrixToString
-- è¡åã®è¡šç€º
matrixToString :: (Show a) => Matrix a -> String
matrixToString (Matrix mat) = intercalate "\n" $ map (unwords . map show) mat
-- ã¡ã€ã³é¢æ°
main :: IO ()
main = do
let mat1 = Matrix [[1, 2], [3, 4]]
mat2 = Matrix [[5, 6], [7, 8]]
-- å ç®
putStrLn $ matrixToString mat1 ++ "\n +\n" ++ matrixToString mat2 ++ "\n =\n" ++ matrixToString (mat1 + mat2) ++ "\n"
-- æžç®
putStrLn $ matrixToString mat1 ++ "\n -\n" ++ matrixToString mat2 ++ "\n =\n" ++ matrixToString (mat1 - mat2) ++ "\n"
-- ä¹ç®
putStrLn $ matrixToString mat1 ++ "\n *\n" ++ matrixToString mat2 ++ "\n =\n" ++ matrixToString (mat1 * mat2) ++ "\n"
-- é€ç®
putStrLn $ matrixToString mat1 ++ "\n /\n" ++ matrixToString mat2 ++ "\n =\n" ++ matrixToString (mat1 / mat2) ++ "\n"
</syntaxhighlight>
[[ã«ããŽãª:Haskell]] | 2023-03-26T05:53:25Z | 2024-02-01T05:04:18Z | [
"ãã³ãã¬ãŒã:---",
"ãã³ãã¬ãŒã:ã³ã©ã "
] | https://ja.wikibooks.org/wiki/%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0/Haskell_%E3%81%A7%E5%AD%A6%E3%81%B6%E9%96%A2%E6%95%B0%E5%9E%8B%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0 |
37,366 | çŸ
銬å²ç¥/å·»ä¹äº/å¡æäžåé¡ã²é²ç¥ã¹ã«äº | ããã«ç€ºãã®ã¯ãçŽå
å55幎ããçŽå
å54幎ã«ããŒãã®æ¿æ²»å®¶ã»æŠå°ãŠãªãŠã¹ã»ã«ãšãµã«ãããªã¿ã³ãã¢(çŸåšã®ã€ã®ãªã¹)ã®åŸææŠäº(ããŒãã«ããããªã¿ã³ãã¢äŸµæ»)ãèµ·ãããèšäºã§ãããå¡æã¬é«ç§ã²åŸäŒã¹ã«äº(ã«ãšãµã«ãã¬ãªã¢ãåŸäŒããäº)ã®å
容çãªç¶ãã«åœããã
äžè¡šã®å·Šæ¬ã«åæããå³æ¬ã«ä¿®æŽããã¹ãã瀺ããä¿®æŽããã¹ãã¯ãåæãããšã«ããŠæŒ¢åã»ä»®åã¥ãããªã©ã®è¡šèšãããèªã¿ãããããã«ä¿®æŽãããã®ã§ãããåºæ¬ã§ã¯ãåºæåè©ãªã©ã«åç·ãä»ããŠããããäžéšãé€ããŠçç¥ãããèµ€ãæåã¯ã端æ«ã®ç°å¢(OSããã©ãŠã¶ãŒ)ã«ãã£ãŠã¯ãæååããããªã©ãæ£ããåäœã§è¡šç€ºãããªãå Žåãããã
| [
{
"paragraph_id": 0,
"tag": "p",
"text": "ããã«ç€ºãã®ã¯ãçŽå
å55幎ããçŽå
å54幎ã«ããŒãã®æ¿æ²»å®¶ã»æŠå°ãŠãªãŠã¹ã»ã«ãšãµã«ãããªã¿ã³ãã¢(çŸåšã®ã€ã®ãªã¹)ã®åŸææŠäº(ããŒãã«ããããªã¿ã³ãã¢äŸµæ»)ãèµ·ãããèšäºã§ãããå¡æã¬é«ç§ã²åŸäŒã¹ã«äº(ã«ãšãµã«ãã¬ãªã¢ãåŸäŒããäº)ã®å
容çãªç¶ãã«åœããã",
"title": "ã¯ããã«"
},
{
"paragraph_id": 1,
"tag": "p",
"text": "äžè¡šã®å·Šæ¬ã«åæããå³æ¬ã«ä¿®æŽããã¹ãã瀺ããä¿®æŽããã¹ãã¯ãåæãããšã«ããŠæŒ¢åã»ä»®åã¥ãããªã©ã®è¡šèšãããèªã¿ãããããã«ä¿®æŽãããã®ã§ãããåºæ¬ã§ã¯ãåºæåè©ãªã©ã«åç·ãä»ããŠããããäžéšãé€ããŠçç¥ãããèµ€ãæåã¯ã端æ«ã®ç°å¢(OSããã©ãŠã¶ãŒ)ã«ãã£ãŠã¯ãæååããããªã©ãæ£ããåäœã§è¡šç€ºãããªãå Žåãããã",
"title": "åæãšä¿®æŽããã¹ã"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "",
"title": "åæãšä¿®æŽããã¹ã"
}
] | null | <div style="font-family:æžžææ;font-size:35pt;text-align:center;">çŸ
銬å²ç§ å·ä¹äº</div>
<div style="font-family:æžžææ;font-size:20pt;text-align:center;">å¡æäžåé¡ã²é²ç§ã¹ã«äº</div>
== ã¯ããã« ==
ããã«ç€ºãã®ã¯ã[[w:çŽå
å55幎|çŽå
å55幎]]ãã[[w:çŽå
å54幎|çŽå
å54幎]]ã«ããŒãã®æ¿æ²»å®¶ã»æŠå°[[w:ã¬ã€ãŠã¹ã»ãŠãªãŠã¹ã»ã«ãšãµã«|ãŠãªãŠã¹ã»ã«ãšãµã«]]ã[[w:ããªã¿ã³ãã¢|ããªã¿ã³ãã¢]]ïŒçŸåšã®ã€ã®ãªã¹ïŒã®åŸææŠäºïŒ[[w:ããŒãã«ããããªã¿ã³ãã¢äŸµæ» (çŽå
å55幎-çŽå
å54幎)|ããŒãã«ããããªã¿ã³ãã¢äŸµæ»]]ïŒãèµ·ãããèšäºã§ããã'''[[çŸ
銬å²ç¥/å·»ä¹äº/å¡æã¬é«ç§ã²åŸäŒã¹ã«äº|å¡æã¬é«ç§ã²åŸäŒã¹ã«äº]]'''ïŒã«ãšãµã«ãã¬ãªã¢ãåŸäŒããäºïŒã®å
容çãªç¶ãã«åœããã
;ãåºæåè©ã®è¡šèšäŸ
;ãã人å
<div style="font-family:æžžææ;font-size:15pt;">ãã<ruby><rb>å¡æ</rb><rp>ïŒ</rp><rt>ã»ãµã«</rt><rp>ïŒ</rp></ruby> <ref>ãã«ãšãµã«ãã¯çŸä»£äžåœèªïŒç¹äœåïŒã§ã¯ã[[wikt:en:å±æ|å±æ]]ããšè¡šèšãããã</ref> â [[w:ã¬ã€ãŠã¹ã»ãŠãªãŠã¹ã»ã«ãšãµã«|ã«ãšãµã«]]ã</div>
;ããå°å
<div style="font-family:æžžææ;font-size:15pt;">ãã<ruby><rb>é«<!--髙-->ç§</rb><rp>ïŒ</rp><rt>ãŽãŠã«</rt><rp>ïŒ</rp></ruby> <ref>è±èªã® ''[[wikt:en:Gaul#English|Gaul]]'' ã®ä»®åèªã¿ããã¬ãªã¢ãã¯çŸä»£äžåœèªïŒç¹äœåïŒã§ãã[[wikt:en:é«ç§|é«ç§]]ããšè¡šèšãããã</ref> â[[w:ã¬ãªã¢|ã¬ãªã¢]]ã<ruby><rb>äžåé¡</rb><rp>ïŒ</rp><rt>ããªãã³</rt><rp>ïŒ</rp></ruby><ref>[[wikt:en:äžåé¡#Chinese|äžåé¡]] ã¯æŒ¢èªã</ref>â[[w:ããªã¿ã³ãã¢|ããªã¿ã³ãã¢]]ã
</div>
== åæãšä¿®æŽããã¹ã ==
äžè¡šã®å·Šæ¬ã«åæããå³æ¬ã«ä¿®æŽããã¹ãã瀺ãã<br>ä¿®æŽããã¹ãã¯ãåæãããšã«ããŠæŒ¢åã»ä»®åã¥ãããªã©ã®è¡šèšãããèªã¿ãããããã«ä¿®æŽãããã®ã§ããã<br>åºæ¬ã§ã¯ãåºæåè©ãªã©ã«åç·ãä»ããŠããããäžéšãé€ããŠçç¥ããã<br><span style="color:#900;">èµ€ãæå</span>ã¯ã端æ«ã®ç°å¢ïŒOSããã©ãŠã¶ãŒïŒã«ãã£ãŠã¯ãæååããããªã©ãæ£ããåäœã§è¡šç€ºãããªãå Žåãããã
{| class="wikitable" style="vertical-align:top;"
|- style="font-family:æžžææ;font-size:18pt;"
| style="width:17em;text-align:center; background-color:#ddd;" |å¡æäžåé¡ã²é²ç§ã¹ã«äº<br>çŽå
åäºåäºå¹Žãèµ·ã«
| style="width:19em;text-align:center; background-color:#ddd;" |<ruby><rb>å¡æ</rb><rp>ïŒ</rp><rt>ã»ãµã«</rt><rp>ïŒ</rp></ruby> <ruby><rb>äžåé¡</rb><rp>ïŒ</rp><rt>ããªãã³</rt><rp>ïŒ</rp></ruby>ãé²ç¥ããäº<br>çŽå
åäºåäºå¹Žã«èµ·ã
|- style="vertical-align:top; font-family:æžžææ;"
| style="font-size:16pt;" |å¡æããé«ç§ãåšããå
¶çç<!--æªäºãã¯ã³ããããšâ¶-->ãã«è«žéš<span style="color:#900;">ð«<!--âã𫞀--></span>ã²åŸå¹³ã¹ã«ããä¹
ã·ã¯æ³æã²è²»ã»ãªãé<span style="color:#900;">ðª<!--âã𪜈--></span>ãåãå
¶äžåé¡ã²é²ç§ã»ã³ãã¹ã«ã<span style="color:#900;">ð«¹<!--âã𫝹--></span>ã²å¿ã¬ãºãå ããè»<span style="color:#300;">å<!--ã2C3ã僃ãåãã®ç°äœå--></span>æã«ãåã³ããä¹ãå
µè©æžé»ã²èã¡ãäžéãå
µã²åž¥ã°ãã<u>ã«ã©ã€ã¹</u>ã<u>ããŒã«</u><!--w:en:Deal, Kent-->ãéãã«ç¹<!--ãçãã®æ§å-->å°æµ·å³œ<!--ã峡ãã®æ§å-->ã²æž¡ã¬ãªãæ€å°ããé«ç§ãšãªäžåé¡ã<span style="color:#500;">{{lang|zh-tw|èž°}}<!--ã踰--></span>ãŠã«ããæã¢è¿ãæµ·è·¯ããªã
| style="font-size:16pt;" |<ruby><rb>å¡æ</rb><rp>ïŒ</rp><rt>ã»ãµã«</rt><rp>ïŒ</rp></ruby>ã¯ã<ruby><rb>é«<!--髙-->ç§</rb><rp>ïŒ</rp><rt>ãŽãŠã«</rt><rp>ïŒ</rp></ruby>ã«<ruby><rb>åš</rb><rp>ïŒ</rp><rt>ãã</rt><rp>ïŒ</rp></ruby>ãŠã<ruby><rb>å
¶</rb><rp>ïŒ</rp><rt>ãã®</rt><rp>ïŒ</rp></ruby><ruby><rb>çç</rb><rp>ïŒ</rp><rt>ããããã€</rt><rp>ïŒ</rp></ruby><ref name="çç"><span style="font-family:æžžææ;font-size:30pt;">ãççã</span>(ããããã€) ãšã¯ãæªãäºãã¯ã³ããããšããããã¯ãèã
ããäºãçåšãæ¯ããäºã</ref>ãªãè«žéšæ<ref name="æ"><span style="font-size:40pt;"><span style="color:#900;">ð«<!--âã𫞀--></span>([[ç»å:U2b780.svg|border|50px]])</span>ïŒ<span style="font-size:20pt;">ã[[wikt:ð«|𫞀]]ã</span>ã¯<span style="font-size:20pt;">ãæã</span>ã®ä¿åïŒç°äœåïŒã§ããããããæãã«æžãæããã</ref>ãåŸå¹³ããã«ãä¹
ããæ³æã<ruby><rb>è²»</rb><rp>ïŒ</rp><rt>ã€ãã</rt><rp>ïŒ</rp></ruby>ãããš<ruby><rb>é</rb><rp>ïŒ</rp><rt>ãã</rt><rp>ïŒ</rp></ruby>ã©ã<ref name="ãšã"><span style="font-family:æžžææ;font-size:40pt;"><span style="color:#900;">ðª</span><!--âã𪜈-->([[ç»å:GÅryaku 003.svg|border|40px]])</span>ïŒ<span style="font-size:20pt;">ã[[w:ðª|ðª]]ã</span>ã¯ã[[w:ãšã|ãšã]]ããè¡šãã[[w:åç¥ä»®å|åç¥ä»®å]]ãªã®ã§ãããšãããŸãã¯ãã©ãããšæžãæããã</ref>ã<ruby><rb>å</rb><rp>ïŒ</rp><rt>ãã€</rt><rp>ïŒ</rp></ruby><ref name="å">åºæ¬ã§ã¯ãã<span style="font-family:æžžææ;font-size:20pt;">[[wikt:en:å|å]]</span>ãã®ç°äœåã®äžçš®ãçšããŠãããšæãããã[https://glyphwiki.org/wiki/simch-kx_t020202 (ð ¹) - GlyphWiki]ãåç
§ã</ref>ãŠ<ruby><rb>å
¶</rb><rp>ïŒ</rp><rt>ãã®</rt><rp>ïŒ</rp></ruby><ruby><rb>äžåé¡</rb><rp>ïŒ</rp><rt>ããªãã³</rt><rp>ïŒ</rp></ruby>ãé²ç¥<ref name="ç¥"><span style="font-family:æžžææ;font-size:30pt;">ç§âç¥</span>ïŒç°äœåã®æžãæãã</ref>ãããšããã®å¿µ<ref name="念"><span style="font-family:æžžææ;font-size:40pt;"><span style="color:#900;">ð«¹<!--âã𫝹--></span>([[ç»å:U2b779.svg|border|50px]])</span>ïŒ<span style="font-size:20pt;">ã[[wikt:ð«¹|ð«¹]]ã</span>ã¯<span style="font-size:20pt;">ã念ã</span>ã®ç°äœåïŒä¿åïŒãªã®ã§ãæžãæããã</ref>ãå¿ããã<ruby><rb>å </rb><rp>ïŒ</rp><rt>ãã£</rt><rp>ïŒ</rp></ruby>ãŠãè»å<ref name="å"><span style="font-family:æžžææ;font-size:40pt;"><span style="color:#300;">å</span><!--ã2C3ã僃--></span> ïŒ<span style="font-size:20pt;">ã[[wikt:en:å|å]]ã</span>ã¯<span style="font-size:20pt;">ãåã</span>ã®ç°äœåãªã®ã§ãæžãæããã</ref> æãã«åãã§ã<ruby><rb>ä¹</rb><rp>ïŒ</rp><rt>ããªã</rt><rp>ïŒ</rp></ruby>ã¡<ruby><rb>å
µè©</rb><rp>ïŒ</rp><rt>ãžããã</rt><rp>ïŒ</rp></ruby>æ°<ref name="æ°"><span style="font-family:æžžææ;font-size:30pt;">æžâæ°</span>ïŒæ§åäœâæ°åäœã®æžãæãã</ref>é»ã<ruby><rb>è</rb><rp>ïŒ</rp><rt>ãã€</rt><rp>ïŒ</rp></ruby>ããäžéã®å
µã<ruby><rb>垥</rb><rp>ïŒ</rp><rt>ã²ã</rt><rp>ïŒ</rp></ruby>ã<ref>ãã°(ã)ãâãããïŒæ§ä»®åé£ãâæ°ä»®åé£ãã®æžãæãã</ref>ãŠãã«ã©ã€ã¹<ref>ãã«ã©ã€ã¹ããšã¯ããã©ã³ã¹ã®ã[[w:ã«ã¬ãŒ (ãã©ã³ã¹)|ã«ã¬ãŒ]]ã([[w:fr:Calais|Calais]]) ã®ããšããã ããçŸåšã®[[w:ãïŒãïŒã«ã¬ãŒç|ãïŒãïŒã«ã¬ãŒç]]ã®ãã¡ãã«ã¬ãŒåžåšèŸºã¯åœæã¯æµ·åºã§ãã£ããšèããããŠãããã«ãšãµã«ã¯ãã«ã¬ãŒè¿éã®çŸåšã®[[w:ãããŒãã¥ïŒã·ã¥ã«ïŒã¡ãŒã«|ãããŒãã¥ïŒã·ã¥ã«ïŒã¡ãŒã«]]蟺ããç¿å¹Žã«ã¯è¿èŸºã®ã€ãã£ãŠã¹ã»ãã«ãã¥ã¹ïŒ[[w:en:Itius Portus|Itius Portus]]ïŒèŸºãããåºåžãããšèããããã</ref>ãšããŒã«<ref>ãããŒã«ããšã¯ãã€ã®ãªã¹åæ±éš[[w:ã±ã³ã (ã€ã³ã°ã©ã³ã)|ã±ã³ãå·]]ã®ãã£ãŒã«ïŒ[[w:en:Deal, Kent|Deal]]ïŒã®ããšãã«ãšãµã«ãæåã«äžéžããå°ç¹ãšèããããŠããã</ref>ã®éãªãç<ref name="ç"><span style="font-family:æžžææ;font-size:30pt;">ç¹âç</span>ïŒæ§åäœ(æ£å)âæ°åäœã®æžãæãã</ref>å°æµ·å³¡<ref name="峡"><span style="font-family:æžžææ;font-size:30pt;">峜â峡</span>ïŒæ§åäœ(æ£å)âæ°åäœã®æžãæãã</ref>ãæž¡ããã<ruby><rb>æ€</rb><rp>ïŒ</rp><rt>ãã®</rt><rp>ïŒ</rp></ruby>å°ã¯ã<ruby><rb>é«ç§</rb><rp>ïŒ</rp><rt>ãŽãŠã«</rt><rp>ïŒ</rp></ruby>ãã<ruby><rb>äžåé¡</rb><rp>ïŒ</rp><rt>ããªãã³</rt><rp>ïŒ</rp></ruby>ã«<ruby><rb><span style="color:#500;">èž°</span></rb><rp>ïŒ</rp><rt>ã</rt><rp>ïŒ</rp></ruby><ref name="èž°"><span style="font-family:æžžææ;font-size:20pt;"><span style="color:#500;">èž°</span></span>ïŒåºæ¬ã§ã¯ [[ç»å:èž° Chinese character.png|border|50px]] ã®åäœãçšããŠãããã端æ«ã®ç°å¢ïŒOSããã©ãŠã¶ãŒïŒã«ãã£ãŠã¯ [[ç»å:èž° Japanese (Mincho).png|border|50px]] ã®ããã«è¡šç€ºãããå Žåãããã</ref>ãã<ref><span style="font-size:20pt;">ã[[wikt:èž°|èž°]]ãããïŒãèž°ããã</span> ã¯ãæž¡ããã«åãã</ref>ã«ãæãè¿ãæµ·è·¯ãªãã<!--âçŸä»£èªèš³--><ref group="çŸä»£èªèš³"><span style="font-family:æžžææ; font-size:16pt;">ã«ãšãµã«ã¯ãã¬ãªã¢ã«ãããŠãåœå°ã®ç°çãªãè«žéšæãæŠåã§å¹³å®ããããã«é·ã幎æãè²»ããããã[[w:ããªã¿ã³ãã¢|ããªã¿ã³ãã¢]]ã«é²è»ããŠæ»ãåããšããæããå¿ããããšã¯ãªãã£ãããã£ãŠã(ååãª)è»åãæŽãããããšãå€ãã®è»è¹ãéããè»ãçããŠã(çŸåšã®ãã©ã³ã¹ã®)[[w:ã«ã¬ãŒ (ãã©ã³ã¹)|ã«ã¬ãŒ]]ãš(çŸåšã®ã€ã®ãªã¹åæ±éšã®)ãã£ãŒã«ã®éã®çã[[w:ããŒããŒæµ·å³¡|(ããŒããŒ)海峡]]ãæž¡ã£ãããã®å°ã¯ãã¬ãªã¢ããããªã¿ã³ãã¢ã«æž¡èªããã®ã«æçã®æµ·è·¯ã§ããã</span></ref>
|- style="vertical-align:top; font-family:æžžææ;"
| style="font-size:16pt;" |島人ãæµå
µãè¿ã
ã¯ã²èŠã«ã€ãç海濵ã矀é²ã¹ãå
¶äººã身ãããçžç®ã²è¡£ããèãé<span style="color:#500;">{{lang|zh-tw|è}}<!--ã藍--></span>ã²ä»¥ãçš®ã
ãçè²ã»ã«å
çç²éãè »å¥Žããªã
| style="font-size:16pt;" |島人ãæµå
µã®è¿ã¥ããèŠãããçæµ·æµ<ref name="æµ"><span style="font-family:æžžææ;font-size:40pt;">濵</span>ïŒ<span style="font-family:æžžææ;font-size:20pt;">ã[[wikt:en:濵#Japanese|濵]]ã</span> ã¯ç°äœåã®ãæµãã«æžãæããã</ref>ã«çŸ€é²ãã<ruby><rb>å
¶</rb><rp>ïŒ</rp><rt>ãã®</rt><rp>ïŒ</rp></ruby>人ã身ã«ã¯ãç£<ref name="ç£"><span style="font-family:æžžææ;font-size:30pt;">çžâç£</span>ïŒæ§åäœ(æ£å)âæ°åäœã®æžãæãã</ref>ç®ã<ruby><rb>è¡£</rb><rp>ïŒ</rp><rt>ã</rt><rp>ïŒ</rp></ruby>ãŠã<ruby><rb>è</rb><rp>ïŒ</rp><rt>ã¯ã </rt><rp>ïŒ</rp></ruby>ã¯<ruby><rb>é{{lang|zh-tw|è}}<!--ã藍--></rb><rp>ïŒ</rp><rt>ãããã</rt><rp>ïŒ</rp></ruby><ref name="è"><span style="font-family:æžžææ;font-size:30pt;"><span style="color:#600;">{{lang|zh-tw|è}}<!--藍--></span></span>ïŒåºæ¬ã®[[w:èžéš|ãããããã]]㯠<span style="font-family:æžžææ;font-size:30pt;"><span style="color:#900;">艹</span>([[ç»å:Regular Style CJKV Radical 140 (3).svg|border|50px]])</span> ã§ãããã端æ«ã®ç°å¢ïŒOSããã©ãŠã¶ãŒïŒã«ãã£ãŠã<span style="font-family:æžžææ;font-size:30pt;"><span style="color:#500;">艹([[ç»å:Regular Style CJKV Radical 140 (1).svg|border|50px]])</span></span>ã®[[ç»å:Uf923.svg|border|50px]] ãŸã㯠<span style="font-family:æžžææ;font-size:30pt;"><span style="color:#500;">艹</span>([[ç»å:Regular Style CJKV Radical 140 (2).svg|border|50px]])</span>ã®[[ç»å:è Japanese form.png|border|50px]] ãšè¡šç€ºãããã
</ref>ã<ruby><rb>以</rb><rp>ïŒ</rp><rt>ãã£</rt><rp>ïŒ</rp></ruby>ãŠ<ruby><rb>çš®ã
</rb><rp>ïŒ</rp><rt>ãã
ãã
</rt><rp>ïŒ</rp></ruby>ã«çè²ããå¶<ref name="å¶"><span style="font-family:æžžææ;font-size:30pt;">å
</span>ïŒ<span style="font-family:æžžææ;font-size:20pt;">ã[[wikt:å
|å
]]ã</span> ã¯ç°äœåã®ãå¶ãã«æžãæããã</ref>çç²éã®<ruby><rb>è®</rb><rp>ïŒ</rp><rt>ã°ã</rt><rp>ïŒ</rp></ruby><ref name="è®"><span style="font-family:æžžææ;font-size:40pt;">è »</span>ïŒ<span style="font-family:æžžææ;font-size:20pt;">ã[[wikt:è »|è »]]ã</span> ã¯ç°äœåã®<span style="font-size:20pt;">ãè®ã</span>ã«æžãæããã</ref><ruby><rb>奎</rb><rp>ïŒ</rp><rt>ã©</rt><rp>ïŒ</rp></ruby>ãªãã<!--âçŸä»£èªèš³--><ref group="çŸä»£èªèš³"><span style="font-family:æžžææ; font-size:16pt;">ãã®å³¶ã®äººã
ã¯ãæµå
µãã¡ïŒããŒã人ïŒãè¿ã¥ããŠããã®ãèŠããšãïŒããŒãå¢ã®äžéžãé»æ¢ããããã«ïŒæµ·æµã«å€§æããŠé§ãå¯ã£ãã圌ãïŒ[[w:ããªãã³äºº|ããªãã³äºº]]ïŒã¯ãç£ã®ç®ã身ã«ãŸãšããç®èã«<ruby><rb>éè</rb><rp>ïŒ</rp><rt>ãããã</rt><rp>ïŒ</rp></ruby>è²ïŒã®å
¥ã墚ïŒããã£ãŠãããããšçè²ããŠãããèã
ãã<ruby><rb>çã
</rb><rp>ïŒ</rp><rt>ããã ã</rt><rp>ïŒ</rp></ruby>ããç²éãªéè®äººãã¡ã§ããã</span></ref>
|- style="vertical-align:top; font-family:æžžææ;"
| style="font-size:16pt;" |ç¶ã¬<span style="color:#900;">ðª<!--âã𪜈--></span>ãå¡æããä¹
ã·ã¯éè »ãæ°çãçæ
£ã»ã«ãå ãªã島人åæ°ã·ãæã¯<!--ãµãã-->ãé<span style="color:#900;">ðª<!--âã𪜈--></span>ãç«<!--ã€ã-->ãæãäžéžã»ãªã
| style="font-size:16pt;" |<ruby><rb>ç¶</rb><rp>ïŒ</rp><rt>ãã</rt><rp>ïŒ</rp></ruby><ref name="ç¶">åºæ¬ã§ã¯ãç¶ãã®ç°äœåãçšããããŠããããã³ã³ãã¥ãŒã¿ãŒã®æåã§è¡šãããšãã§ããªãããããç¶ãã§ä»£çšããã</ref><span style="font-size:14pt;">ãã©ã</span><ref name="ãšã"/><ref name="ç¶ãã©ã">ãç¶(ãã)ãã©ããïŒãããã§ã¯ãããããããããªããã</ref>ã<ruby><rb>å¡æ</rb><rp>ïŒ</rp><rt>ã»ãµã«</rt><rp>ïŒ</rp></ruby>ã¯ãä¹
<span style="font-size:14pt;">ãã</span><ruby><rb>éè®</rb><rp>ïŒ</rp><rt>ãã°ã</rt><rp>ïŒ</rp></ruby><ref name="è®"/>ã®æŠ<ref name="æŠ"><span style="font-family:æžžææ;font-size:30pt;">æ°âæŠ</span>ïŒæ§åäœâæ°åäœã®æžãæãã</ref>äº<ref name="äº"><span style="font-family:æžžææ;font-size:30pt;">çâäº</span>ïŒæ§åäœâæ°åäœã®æžãæãã</ref>ã«<ruby><rb>çæ
£</rb><rp>ïŒ</rp><rt>ãã
ã£ãã</rt><rp>ïŒ</rp></ruby><ref>ãçæ
£ãïŒãæ
£ããŠå·§ã¿ãªããšãã[https://kotobank.jp/word/%E7%86%9F%E6%85%A3-2049011 çæ
£(ãã
ã£ãã)ãšã¯ïŒ æå³ã䜿ãæ¹ - ã³ããã³ã¯]çãåç
§ã</ref>ããã«<ruby><rb>å </rb><rp>ïŒ</rp><rt>ã</rt><rp>ïŒ</rp></ruby>ãã島人<ruby><rb>åæŠ</rb><rp>ïŒ</rp><rt>ãããã</rt><rp>ïŒ</rp></ruby><ref name="æŠ"/>ããŠ<ruby><rb>æ</rb><rp>ïŒ</rp><rt>ãµã</rt><rp>ïŒ</rp></ruby>ã<ref>ãæ(ãµã)ããã¯ãé²ããã«åãã</ref>ãš<ruby><rb>é</rb><rp>ïŒ</rp><rt>ãã</rt><rp>ïŒ</rp></ruby>ã©ã<ref name="ãšã"/>ã<ruby><rb>ç«</rb><rp>ïŒ</rp><rt>ã€ã</rt><rp>ïŒ</rp></ruby>ã«<ruby><rb>æ</rb><rp>ïŒ</rp><rt>ãã¶ã£</rt><rp>ïŒ</rp></ruby>ãŠäžéžããã<!--âçŸä»£èªèš³--><ref group="çŸä»£èªèš³"><span style="font-family:æžžææ; font-size:16pt;">ããããªãããã«ãšãµã«ã¯ãé·ãéãéè®äººãã¡ãšã®æŠäºã«æ
£ããŠå·§ã¿ã§ãã£ãã®ã§ã島æ°ãã¡ã¯åãå°œãããŠé²æŠããã®ã§ããããïŒã«ãšãµã«ã®è»å¢ã¯ïŒã€ãã«æç ŽããŠäžéžããã®ã§ãã£ãã</span></ref>
|- style="vertical-align:top; font-family:æžžææ;"
| style="font-size:16pt;" |ç¶ã¬<span style="color:#900;">ðª<!--âã𪜈--></span>ãæ€<span style="color:#300;">è</span><!--第ã®éçšåäœâ¶ 苐-->äžåœ¹ããå¿œ<!--ãã¡ãŸã¡ïŒ-->ãã·ãè»ã²ç<!--ã-ãïŒ-->ãã»ãªãè<!--ãã -->ã·ã島äžã<!--ãâ®é ã-->éš<span style="color:#900;">ð«<!--âã𫞀--></span><!--ãæãã®ä¿å 𫞀 𫞀-->äžããçŸ
銬ãéã¬ã«è
ã¢ãªãé<span style="color:#900;">ðª<!--âã𪜈--></span>ãæ€æ³ãæ¢ãæ®<!--æ®ã®æ§åäœ-->è<!--臘 臘--><!--æ®è=幎æ«ã®äœæ¥-->ãåãããå¡æã¢ãç«ã延滯<!--æ»ã®æ§åäœ-->é·é©
<!--é§ã®æ§åäœ-->ã¹ã«ã²æã«ãœã¬æ
ããä¹<!--ããªã-->ãå
<!--ãŸ-->ã
垥<!--垥(ã²ã)ãã/ãã-->ã²é«ç§ãæ<!--ã-ããïŒ-->ãã·ãæ€éå€éŒé ãäžå³¶åãå
¥ããççãã«éè »<!--è®ã®ç°äœåâ·-->ã²åŸã»ã«è<!--第ã®éçšåäœ 苐-->äžçã人ã¿ã«ã²ä»¥ããæ«<!--ãã°-->ã©ã¯èªã©æ
°è«<!--æ
°ããŠçžæãç解ã§ããããã«æããããšã-->ã»ãªãäºã
| style="font-size:16pt;" |<ruby><rb>ç¶</rb><rp>ïŒ</rp><rt>ãã</rt><rp>ïŒ</rp></ruby><ref name="ç¶"/>ãã©ã<ref name="ãšã"/><ref name="ç¶ãã©ã"/>ã<ruby><rb>æ€</rb><rp>ïŒ</rp><rt>ãã®</rt><rp>ïŒ</rp></ruby>第<ref name="è"><span style="font-family:æžžææ;font-size:40pt;"><span style="color:#300;">è</span></span>ïŒ<span style="font-family:æžžææ;font-size:20pt;">ã[[wikt:en:è#Japanese|è]]ã</span>ã¯<span style="font-family:æžžææ;font-size:20pt;">ã第ã</span>ã®éçšåäœãªã®ã§ãæžãæããã</ref>äž<ruby><rb>圹</rb><rp>ïŒ</rp><rt>ãã</rt><rp>ïŒ</rp></ruby>ã¯ã<ruby><rb>å¿œ</rb><rp>ïŒ</rp><rt>ãã¡ãŸã¡</rt><rp>ïŒ</rp></ruby>ã«ããŠè»ã<ruby><rb>ç</rb><rp>ïŒ</rp><rt>ã</rt><rp>ïŒ</rp></ruby><ref name="çãžã"><span style="font-family:æžžææ;font-size:30pt;">ã[[wikt:en:ç#Japanese|ç]]ãžãã</span> ã¯ãããžãïŒãããïŒããšèªãã</ref>ãããã<ruby><rb>è</rb><rp>ïŒ</rp><rt>ãã </rt><rp>ïŒ</rp></ruby>ã<ref name="èã"><span style="font-family:æžžææ;font-size:30pt;">ã[[wikt:en:èã|<ruby><rb>è</rb><rp>ïŒ</rp><rt>ãã </rt><rp>ïŒ</rp></ruby>ã]]ã</span>ã¯ããæãã«ããªã©ã®æå³ [https://kotobank.jp/word/%E8%93%8B%E3%81%97-490205]ã</ref>ã島äžã®éšæ<ref name="æ"/>äžã«ã<ruby><rb>çŸ
銬</rb><rp>ïŒ</rp><rt>ããŒã</rt><rp>ïŒ</rp></ruby>ã«<ruby><rb>é</rb><rp>ïŒ</rp><rt>ãã </rt><rp>ïŒ</rp></ruby>ããè
ãããš<ruby><rb>é</rb><rp>ïŒ</rp><rt>ãã</rt><rp>ïŒ</rp></ruby>ã©ã<ref name="ãšã"/>ã<ruby><rb>æ€</rb><rp>ïŒ</rp><rt>ãã®</rt><rp>ïŒ</rp></ruby><ruby><rb>æ³</rb><rp>ïŒ</rp><rt>ãšã</rt><rp>ïŒ</rp></ruby>ã<ruby><rb>æ¢</rb><rp>ïŒ</rp><rt>ãã§</rt><rp>ïŒ</rp></ruby>ã«<ruby><rb>æ®</rb><rp>ïŒ</rp><rt>ãã</rt><rp>ïŒ</rp></ruby><ref name="æ®"><span style="font-family:æžžææ;font-size:30pt;">æ®</span>ïŒ<span style="font-family:æžžææ;font-size:20pt;">ã[[wikt:en:æ®#Japanese|æ®]]ã</span>ã¯ãæ®ãã®æ§åäœãªã®ã§ãæžãæããã</ref><ruby><rb>è</rb><rp>ïŒ</rp><rt>ãã</rt><rp>ïŒ</rp></ruby><ref name="æ®è"><span style="font-family:æžžææ;font-size:20pt;">ãæ®è(æ®è)ã</span> ã¯ã幎æ«ã®äœæ¥ãã®æå³ã</ref>ã«åã¹ã°ã<ruby><rb>å¡æ</rb><rp>ïŒ</rp><rt>ã»ãµã«</rt><rp>ïŒ</rp></ruby>ãã<ruby><rb>ç«</rb><rp>ïŒ</rp><rt>ã€ã</rt><rp>ïŒ</rp></ruby>ã«å»¶æ»<ref name="æ»"><span style="font-family:æžžææ;font-size:40pt;">滯</span>ïŒ<span style="font-family:æžžææ;font-size:20pt;">ã[[wikt:en:滯#Japanese|滯]]ã</span>ã¯ãæ»ãã®æ§åäœãªã®ã§ãæžãæããã</ref>é·é§<ref name="é§"><span style="font-family:æžžææ;font-size:30pt;">é©
</span>ïŒ<span style="font-family:æžžææ;font-size:20pt;">ã[[wikt:en:é©
#Japanese|é©
]]ã</span>ã¯ãé§ãã®æ§åäœãªã®ã§ãæžãæããã</ref>ãããæããã<ruby><rb>æ
</rb><rp>ïŒ</rp><rt>ãã</rt><rp>ïŒ</rp></ruby>ã«ã<ruby><rb>ä¹</rb><rp>ïŒ</rp><rt>ããªã</rt><rp>ïŒ</rp></ruby>ã¡<ruby><rb>å
</rb><rp>ïŒ</rp><rt>ãŸ</rt><rp>ïŒ</rp></ruby>ã<ruby><rb>垥</rb><rp>ïŒ</rp><rt>ãã</rt><rp>ïŒ</rp></ruby><ref name="垥"><span style="font-family:æžžææ;font-size:20pt;">ã垥ã</span>ã¯ãè»ãçããããšã</ref>ã<ruby><rb>é«ç§</rb><rp>ïŒ</rp><rt>ãŽãŠã«</rt><rp>ïŒ</rp></ruby>ã«<ruby><rb>æ</rb><rp>ïŒ</rp><rt>ã</rt><rp>ïŒ</rp></ruby><ref name="æãã"><span style="font-family:æžžææ;font-size:30pt;">ãæãžãã</span> ã¯ãããžãïŒãããïŒããšèªã¿ããåž°ãããæå³ããããå±æã(æŠãã«åã£ãŠåž°ãããš)ã</ref>ããã<ruby><rb>æ€</rb><rp>ïŒ</rp><rt>ãã®</rt><rp>ïŒ</rp></ruby>蟺<ref name="蟺"><span style="font-family:æžžææ;font-size:40pt;">é</span>ïŒ<span style="font-family:æžžææ;font-size:20pt;">ã[[wikt:en:é#Japanese|é]]ã</span>ã¯ã蟺ãã®ç°äœåãªã®ã§ãæžãæããã</ref>å€éŒé <ref name="éŒé "><span style="font-family:æžžææ;font-size:20pt;">ãéŒé ã</span>ã¯ãã¯ããã«é ãããšãã</ref>ã®äžå³¶åœ<ref name="åœ"><span style="font-family:æžžææ;font-size:30pt;">å</span>ïŒ<span style="font-family:æžžææ;font-size:20pt;">ãåã</span>ã¯ãåœãã®æ§åäœãªã®ã§ãæžãæããã</ref>ã«å
¥ããŠã<ruby><rb>çç</rb><rp>ïŒ</rp><rt>ããããã€</rt><rp>ïŒ</rp></ruby><ref name="çç"/>ãªãéè®<ref name="è®"/>ãåŸãã第<ref name="è"/>äžçã®äººããã<ruby><rb>以</rb><rp>ïŒ</rp><rt>ãã£</rt><rp>ïŒ</rp></ruby>ãŠã<ruby><rb>æ«</rb><rp>ïŒ</rp><rt>ãã°</rt><rp>ïŒ</rp></ruby>ããèªã<ruby><rb>æ
°è«</rb><rp>ïŒ</rp><rt>ãã</rt><rp>ïŒ</rp></ruby><ref name="æ
°è«"><span style="font-family:æžžææ;font-size:20pt;">ãæ
°è«ã</span>ã¯ãæ
°ããŠçžæãç解ã§ããããã«æããããšã</ref>ãããš<ruby><rb>äº</rb><rp>ïŒ</rp><rt>ãã</rt><rp>ïŒ</rp></ruby>ã<!--âçŸä»£èªèš³--><ref group="çŸä»£èªèš³"><span style="font-family:æžžææ; font-size:16pt;">ããããªããããã®äžåç®ã®æŠåœ¹ã¯ããã¡ãŸã¡ã®ãã¡ã«è»å¢ãåž°éããããæãã«ãïŒããªãã³ïŒå³¶ã®éšæã®äžã«ã¯ããŒã人ã®è»éã«éãè
ãã¡ããããšããã©ãããã®å¹Žããã§ã«æ®ãããããšãªã£ãŠããã®ã§ãã«ãšãµã«ããšããšãè»äºè¡åãããããé·åŒãããŠé ããŸã§é åŸãç¶ããŠããŸãããšãå±æ§ããã®ã§ãè»ãçããŠå±æããããã®ã¯ããã«é ã蟺å¢ã®äžã€ã®å³¶åœã«å
¥ã£ãŠçã
ããéè®äººãã¡ãåŸæããæåã®äººã§ããããšããã£ãŠãèªãã<ruby><rb>æ
°</rb><rp>ïŒ</rp><rt>ãªãã</rt><rp>ïŒ</rp></ruby>ã<ruby><rb>è«</rb><rp>ïŒ</rp><rt>ããš</rt><rp>ïŒ</rp></ruby>ãããšããã</span></ref>
|- style="vertical-align:top; font-family:æžžææ;"
| style="font-size:16pt;" |æ幎ãè³ããå¡æããåæã·ããå圹ãå°ãäžéžã·ãæŽ<!--ãã-->ãé²ãã<ruby><rb>æ ¹ç</rb><rp>ïŒ</rp><rt>ã±ã³ã</rt><rp>ïŒ</rp></ruby><!--ã±ã³ã Kent-->ãè³ã«ãæ€å°ããå{{lang|zh-tw|é
}}<ruby><rb><u>å æ¯åšæš<!--楌ã®æ£å-->{{lang|zh-tw|çŽ}}</u></rb><rp>ïŒ</rp><rt>ã«ãã·ãã©ãã¹</rt><rp>ïŒ</rp></ruby><!--ã«ãã·ãã©ãã¹-->ãã«è
ãä¹ã²{{lang|zh|é }}ã»ãªã島人è¡è»ã²é²ãä¹ã²æ¢ã¡ã³ãã¹ã¬<span style="color:#900;">ðª<!--âã𪜈--></span><!--(åç¥ä»®å𪜈ãã¢)-->ãå
ã¿ãºã
| style="font-size:16pt;" |<!--âç·šéäž-->
|- style="vertical-align:top; font-family:æžžææ;"
| style="font-size:16pt;" |å¡æãå
µã²åž¥<!--垥(ã²ã)ãã/ãã-->ã°ãæ·±ã¯é²ããä»<!--ããä»ãã®ç°äœå(ä¿å) 𫝆 𫝆-->ã<u>ã¹ã«ã¬ãŒ</u><!--en:Surrey w:ãµãªãŒ (ã€ã³ã°ã©ã³ã)-->ãå±ãã«å°ãå°ãªã<ruby><rb>éè¿·æ¯</rb><rp>ïŒ</rp><rt>ããŒã ã¹</rt><rp>ïŒ</rp></ruby><!--ããŒã ã¹-->æ²³ãæ°Ž{{lang|zh-tw|è}}<!--掟-->ã{{lang|zh|çš}}<!--çš-->æ·º<!--ãæµ
ãã®æ§åäœ-->ã<span style="color:#900;">𠁅<!--âã𠁅|𠁅--></span>ãå°ãªãä¹<!--ããªã-->ãä¹<!--ãã-->ã²æž¡ã©ã³ãå³<!--決-->ã»ã·ã¬ã島人ãæ²³äžã<ruby><rb>ææš</rb><rp>ïŒ</rp><rt>ã¹ããŒãã¹</rt><rp>ïŒ</rp></ruby><!--ã¹ããŒãã¹-->ã²èšã±ããä¹ã²æ<!--ãµãã-->ã±ãªãå ããåŸäŸ<!--æ¥-->ãæ€å°ã²çš±<!--ã称ãã®æ§åäœ-->ã·ãã<u>ã³ãŠã§ãŒãã¹ããŒã</u><!--Cowley Stakes-->ãåŒããªã
| style="font-size:16pt;" |<!--âç·šéäž-->
|- style="vertical-align:top; font-family:æžžææ;"
| style="font-size:16pt;" |ç¶ã¬<span style="color:#900;">ðª<!--åç¥ä»®åâã𪜈 ãããã©ã--></span>ãå¡æãç Žãä¹ã²<span style="color:#500;">{{lang|zh-tw|èž°}}<!--ã踰--><!--(ã)--></span>ãšãæ²³ã²æž¡ãã<u>å æ¯åšæš<!--楌ã®æ£å-->{{lang|zh-tw|çŽ}}</u><!--ã«ãã·ãã©ãã¹-->ãéœåã²<span style="color:#900;">𨺻<!--âã𨺻 | ã𨺻ãé¥ãã®ç°äœåãããšãã-ãã--></span>ã¬ã<u>ãšãã»ãã¯ã¹</u><!--w:en:Essex ãšã»ãã¯ã¹-->ã<u>ãããã«ã»ãã¯ã¹</u><!--w:en:Middlesex w:ããã«ã»ãã¯ã¹-->ãå°ã倧åã²å¹³ã²ã¿ãªã
| style="font-size:16pt;" |<!--âç·šéäž-->
|- style="vertical-align:top; font-family:æžžææ;"
| style="font-size:16pt;" |æ¯<!--ãããã-->ãæŒãã<u>å æ¯åšæš<!--楌ã®æ£å-->{{lang|zh-tw|çŽ}}</u><!--ã«ãã·ãã©ãã¹-->ã¢ã{{lang|zh-tw|çµ}}ãåã²ä¹ããå©ãã«ã²æãªãå¡æã¢äºŠ<!--ãŸã-->é«ç§ãæè»ã»ã¶ã«ã²åŸã¶ã«äºã¢ãªã·ã«ããä¹<!--ããªã-->ãåã²èš±ã·ãæ³<!--ç°äœåç»å-->è²¢ã²ç£<!--ããªã-ã-->ã·ã質åã²åããä¹<!--ããªã-->ãé«ç§ãæž<!--ãåž°ãã®æ§åäœ-->é£ã»ãªã
| style="font-size:16pt;" |<!--âç·šéäž-->
|- style="vertical-align:top; font-family:æžžææ;"
| style="font-size:16pt;" |ç¶ã¬<span style="color:#900;">ðª<!--åç¥ä»®åâã𪜈 ãããã©ã--></span>ãæŽãé®æ«ãäžå
µã²æ¢ã¡ã¶ãªã·ã«ãã島人ããå
¶çŸ
銬人ãç®åã²å»ã«ã€ãçŽããåä¹ã²å<!--ãã-ãâãåãã§ä»£çš-->ã±ãªãæ¯<!--ã-ã-->ã¬å
¶çãåº<!--ããš-ãã-->ãšãªç¶<!--ãã-->ã«ãã<span style="color:#900;">ð«<!--âã𫝂 (ãšãã)--></span>ããª
| style="font-size:16pt;" |<!--âç·šéäž-->
<!--
<ruby><rb>â挢åâ</rb><rp>ïŒ</rp><rt>âã«ãâ</rt><rp>ïŒ</rp></ruby>
-->
|- style="vertical-align:top; font-family:æžžææ;"
| style="font-size:16pt;" |
| style="font-size:16pt;" |<!--âç·šéäž-->
|-
! style="width:17em;" |
! style="width:19em;" |
|}
<!--
<ruby><rb>â挢åâ</rb><rp>ïŒ</rp><rt>âã«ãâ</rt><rp>ïŒ</rp></ruby>
<span style="color:#900;"></span>
<span style="font-size:14pt;"></span>
<span style="font-size:20pt;"></span>
<ref name="â"><span style="font-family:æžžææ;font-size:20pt;">âââ</span>ïŒæ§åäœâæ°åäœã®æžãæãã</ref>
-->
== çŸä»£èªèš³ ==
<references group="çŸä»£èªèš³"/>
== è泚 ==
<div class="references-small"><references /></div>
== é¢é£é
ç® ==
*[[çŸ
銬å²ç¥]]
**[[çŸ
銬å²ç¥/å·»ä¹äº/å¡æã¬é«ç§ã²åŸäŒã¹ã«äº|../å¡æã¬é«ç§ã²åŸäŒã¹ã«äº]]
**[[çŸ
銬å²ç¥/å·»ä¹äº/å¡æäžåé¡ã²é²ç¥ã¹ã«äº|../å¡æäžåé¡ã²é²ç¥ã¹ã«äº]]
**[[çŸ
銬å²ç¥/挢èªè¡šèšã«ã€ããŠ|../挢èªè¡šèšã«ã€ããŠ]]
== å€éšãªã³ã¯ ==
[[Category:çŸ
銬å²ç¥|5ããã]] | 2023-03-26T13:35:01Z | 2024-01-12T12:34:30Z | [
"ãã³ãã¬ãŒã:Lang"
] | https://ja.wikibooks.org/wiki/%E7%BE%85%E9%A6%AC%E5%8F%B2%E7%95%A5/%E5%B7%BB%E4%B9%8B%E4%BA%94/%E5%A1%9E%E6%92%92%E4%B8%8D%E5%88%97%E9%A1%9B%E3%83%B2%E9%80%B2%E7%95%A5%E3%82%B9%E3%83%AB%E4%BA%8B |
37,378 | Julia | Juliaã¯ãé«åºŠãªæ°å€è§£æãç§åŠèšç®ãããŒã¿åŠçãæ©æ¢°åŠç¿ãªã©ãããŸããŸãªåéã§åºãå©çšãããããã°ã©ãã³ã°èšèªã§ãããã®ãã¥ãŒããªã¢ã«ã¯ãåå¿è
åãã«Juliaã®åºç€ããå§ããåŸã
ã«é«åºŠãªãããã¯ã«é²ãã§ãããŸããJuliaã®ã·ã³ãã«ã§çŽæçãªæ§æã䜿çšããŠãé¢æ°ã®å®çŸ©ããããŒã¿æ§é ã®æäœãå¶åŸ¡ãããŒãããã±ãŒãžã®äœ¿çšãªã©ãåºæ¬çãªããã°ã©ãã³ã°ã®æŠå¿µãç解ããŸããããã«ãJuliaã®ç¹åŸŽçãªæ©èœã§ããå€éãã£ã¹ããããåã·ã¹ãã ã«ã€ããŠã詳ãã説æããŸãã
ãã®ãã¥ãŒããªã¢ã«ã§ã¯ãçè«ã ãã§ãªãå®è·µçãªããã°ã©ãã³ã°ã®ã¹ãã«ã身ã«ã€ããŸããå®éã®ãããžã§ã¯ããåé¡ã«åãçµã¿ãªãããJuliaã䜿ã£ãŠããŒã¿ã®è§£æãåŠçãç§åŠçã·ãã¥ã¬ãŒã·ã§ã³ãæ©æ¢°åŠç¿ã¢ãã«ã®æ§ç¯ãªã©ãããŸããŸãªã¿ã¹ã¯ã«å¯ŸåŠããæ¹æ³ãåŠã³ãŸãããŸããJuliaã®è±å¯ãªãšã³ã·ã¹ãã ãããã±ãŒãžç®¡çã·ã¹ãã ã掻çšããŠãå¹ççãªããã°ã©ãã³ã°ç°å¢ãæ§ç¯ããæ¹æ³ã玹ä»ããŸãã
ãã®ãã¥ãŒããªã¢ã«ã¯ãããã°ã©ãã³ã°åå¿è
ãä»ã®èšèªããJuliaã«ç§»è¡ãã人ã
ã«ãšã£ãŠçæ³çãªãªãœãŒã¹ã§ããJuliaã®ãã¯ãã«ãªæ©èœã掻ãããŠãããŸããŸãªåé¡ã«é©æ°çãªè§£æ±ºçãèŠã€ããå¹ççãªã³ãŒããæžãããã®åºç€ãç¯ãããšãã§ããŸããJuliaã®æè»æ§ãšããã©ãŒãã³ã¹ãæ倧éã«æŽ»çšããããã°ã©ãã³ã°ã®ã¹ãã«ãé«ããŠãããŸãããã
Juliaã¯ãé«éã§åçãªèšèªã§ãç§åŠæè¡èšç®ãããŒã¿åæãæ©æ¢°åŠç¿ãªã©ã®æ°å€èšç®ã¢ããªã±ãŒã·ã§ã³ãéçºããããã«èšèšãããããã°ã©ãã³ã°èšèªã§ããJuliaã¯ãå€ãã®ã¡ãªãããæã¡ãŸãã
ãªãŒãã³ãœãŒã¹ã®èšèªã§ãããããå€ãã®ã©ã€ãã©ãªãéçºãããŠãããåºç¯å²ã«ãããã¢ããªã±ãŒã·ã§ã³éçºã«å¯Ÿå¿ã§ããŸãã
Juliaã®èšèšå²åŠã¯ä»¥äžã®ããã«èŠçŽãããŸãã
Juliaã®äž»ãªå©ç¹ã¯ä»¥äžã®éãã§ãã
以äžãJuliaã®äž»ãªå©ç¹ã§ãããããã掻çšããããšã§ãæ°å€èšç®ãããŒã¿ãµã€ãšã³ã¹ãŸãã¯æ©æ¢°åŠç¿åéã®éçºè
ã«ãšã£ãŠãJuliaã¯éèŠãªããŒã«ãšãªããŸãã
åçŽç·šã§ã¯ããŸãæåã«Juliaã®ã€ã³ã¹ããŒã«æ¹æ³ãæ±ããŸããã€ã³ã¹ããŒã«ã¯ç°¡åã§ãå
¬åŒã®ã€ã³ã¹ããŒã«ã¹ã¯ãªããã䜿çšããããšã§æ°åã§å®äºããŸãããã®ã¹ããããã¯ãªã¢ãããšãJuliaã®ç°å¢ãæŽããããã°ã©ãã³ã°åŠç¿ã®æºåãæŽããŸããJuliaã®ã€ã³ã¹ããŒã«åŸã¯ãå€æ°ãããŒã¿åãå¶åŸ¡æ§é ãªã©ãããã°ã©ãã³ã°ã®åºç€çãªæŠå¿µãåŠã¶ããšãã§ããŸããJuliaã®ã·ã³ãã«ãªæ§æãšè±å¯ãªæ©èœã掻ãããŠãããã°ã©ãã³ã°ã®äžçã«è¶³ãèžã¿å
¥ããŸãããã
Juliaã¯ãmacOSãWindowsãFreeBSDãLinuxã®ãã£ã¹ããªãã¥ãŒã·ã§ã³ãªã©ã®äž»èŠãªãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§å©çšå¯èœã§ããJuliaãã€ã³ã¹ããŒã«ããæé ã¯éåžžã«ç°¡åã§ãå
¬åŒã®ã€ã³ã¹ããŒã«ã¹ã¯ãªããã䜿çšããããšã§ãæ°åã§Juliaãã»ããã¢ããã§ããŸãã
Juliaã¯ãWindowsç°å¢ã§ãç°¡åã«ã€ã³ã¹ããŒã«ã§ããŸãã以äžã®æé ã«åŸã£ãŠãJuliaãã»ããã¢ããããŸãããã
ãã®ã»ã¯ã·ã§ã³ã§ã¯ãããã°ã©ãã³ã°ã®åºæ¬çãªæŠå¿µãåŠã³ãŸãã以äžã®å
容ã«çŠç¹ãåœãŠãŠãããã°ã©ãã³ã°ã®åºç€ãç¯ããŠãããŸãã
ãããã®æŠå¿µã¯ãJuliaã ãã§ãªãä»ã®ããã°ã©ãã³ã°èšèªã§ãå
±éããŠããŸãã
Juliaã®æ§æãåºæ¬çãªæäœæ¹æ³ãç解ããŸããJuliaã®REPL(Read-Eval-Print Loop)ã®äœ¿çšæ¹æ³ãåŠã³ãŸããREPLã¯Juliaã察話çã«äœ¿ãããã®åŒ·åãªããŒã«ã§ãããå¹ççãªåŠç¿ãšéçºã«åœ¹ç«ã¡ãŸãã
ãããã®æ§æèŠçŽ ã¯Juliaã®åºæ¬çãªæ©èœã§ãããããã°ã©ãã³ã°ã®åå¿è
ããäžçŽè
ãŸã§å¹
åºã掻çšãããŠããŸãã
å€æ°ã¯ãå€ã«ã€ããããååã§ãããã°ã©ã å
ã§ããŒã¿ãäžæçã«ä¿åããããåŠçã®éäžçµæãä¿æãããããããã«äœ¿çšãããŸããJuliaã®å€æ°ã¯å®£èšããããšãªã䜿ãå§ããããšãã§ããŸãã
ãã®ããã«ãåãå€æ°ã«ç°ãªãåã®å€ãå代å
¥ããããšãã§ããŸãã
ãã®ããšãããJuliaã¯åçåä»ãããã°ã©ãã³ã°èšèªãšèšããŸãã
Juliaã«ãããŠãå®æ°ã¯å€æŽäžå¯èœãªå€ãè¡šãå€æ°ã§ããå®æ°ã¯ const ããŒã¯ãŒãã䜿ã£ãŠå®£èšãããŸããå®æ°ã¯ãäžåºŠå®£èšããããšããã®åŸå€ãå€æŽããããšã¯ã§ããŸãããå®æ°ã¯ãé¢æ°å
å€ã§å©çšå¯èœã§ãã以äžã¯ãå®æ°ã宣èšããäŸã§ãã
ãã®äŸã§ã¯ãGRAVITY ãšããå®æ°ã宣èšããŠããŸãããã®å®æ°ã¯ãéåå é床ãè¡šãå®æ°ã§ãããå€ã¯ 9.80665 ã§ãããåŸããå€ãå€æŽããããšã¯ã§ããŸããã
Juliaã®å€æ°ã®ã¹ã³ãŒãã¯ãä»ã®å€ãã®ããã°ã©ãã³ã°èšèªãšåæ§ã«ããã®å€æ°ãã¢ã¯ã»ã¹å¯èœãªç¯å²ãæããŸãã
Juliaã§ã¯ã次ã®ãããªã¹ã³ãŒãããããŸã:
ã¹ã³ãŒãå
ã§ã®å€æ°ã®æ¯ãèãã¯ãä»ã®ããã°ã©ãã³ã°èšèªãšåæ§ã§ãããJuliaã®å Žåãç¹ã«é¢æ°å
ã§ã®å€æ°ã®æ¯ãèãã«é¢ããŠã¯ãããŒã«ã«ã¹ã³ãŒãã®èŠåãé©çšãããŸããããšãã°ãé¢æ°å
ã§åãååã®å€æ°ãã°ããŒãã«ã¹ã³ãŒããšåãååã§å®çŸ©ãããšãããã¯é¢æ°å
ã§ã®ã¿æå¹ãªããŒã«ã«å€æ°ãšãªããŸããããã¯ãJuliaã®å€æ°ãããã©ã«ãã§ããŒã«ã«ã¹ã³ãŒããæã€ããã§ãã
Juliaã§ã¯ãé¢æ°å
ã§ã°ããŒãã«å€æ°ãå€æŽããå ŽåãglobalããŒã¯ãŒãã䜿çšããå¿
èŠããããŸããããã«ãããé¢æ°å
ã§ã°ããŒãã«å€æ°ã®å€ãæŽæ°ããããšãã§ããŸããäŸãã°:
ãã®ããã«ãJuliaã§ã¯ã¹ã³ãŒãã®ã«ãŒã«ã«åŸã£ãŠå€æ°ãæ¯ãèããŸãããã°ããŒãã«å€æ°ã®æŽæ°ãªã©ç¹å®ã®ã±ãŒã¹ã§ã¯æ瀺çãªããŒã¯ãŒããå¿
èŠã«ãªãããšããããŸãã
å€æ°ã¯ããã°ã©ãã³ã°ã«ãããŠéåžžã«éèŠãªæŠå¿µã§ãããããŸããŸãªãŠãŒã¹ã±ãŒã¹ããããŸãã
以äžã¯ãå€æ°ã®äž»ãªãŠãŒã¹ã±ãŒã¹ã®ããã€ãã§ã:
ãããã®ãŠãŒã¹ã±ãŒã¹ã¯ãããã°ã©ã ãå¹ççã«èšè¿°ãã管çããããã®åºæ¬çãªããŒã«ãšããŠå€æ°ãã©ãã ãéèŠã§ãããã瀺ããŠããŸãã
ããã°ã©ãã³ã°èšèªã§ã¯ãããŒã¿ãæ±ãéã«ç°ãªãçš®é¡ã®ããŒã¿åã䜿çšãããŸãããããã®ããŒã¿åã«ã¯ãæŽæ°ãæµ®åå°æ°ç¹æ°ãæååãé
åãªã©ããããŸããJuliaã¯ããããã®ããŒã¿åã䜿çšããŠããŒã¿ãæ ŒçŽããåŠçããŸãã
æŽæ°ã¯ãæ°å€ãè¡šãããã®åºæ¬çãªããŒã¿åã§ããæ£ã®æŽæ°ãè² ã®æŽæ°ããŒããè¡šãããšãã§ããŸããJuliaã§ã¯ãæŽæ°ã®ãµã€ãºã«å¿ããŠè€æ°ã®åãæäŸãããŠããŸããäŸãã°ãInt8ãInt16ãInt32ãInt64ãªã©ã®ç¬Šå·ä»ãæŽæ°åããããŸãã
æµ®åå°æ°ç¹æ°ã¯ãå°æ°ç¹ä»¥äžã®æ°å€ãè¡šãããã®ããŒã¿åã§ããæŽæ°ãšã¯ç°ãªããå°æ°ç¹ä»¥äžã®æ¡æ°ãå«ããããšãã§ããŸããJuliaã§ã¯ãFloat32ãFloat64ãªã©ã®æµ®åå°æ°ç¹æ°åãæäŸãããŠããŸãã
æååã¯ãããã¹ãããŒã¿ãè¡šãããã®ããŒã¿åã§ããJuliaã§ã¯ãããã«ã¯ã©ãŒããŒã·ã§ã³ (") ã§å²ãŸããæååã䜿çšãããŸããäŸãã°ã"Hello"ã"Julia"ãªã©ã®æååãè¡šçŸããããšãã§ããŸãã
é
åã¯ãè€æ°ã®èŠçŽ ãé åºä»ããŠæ ŒçŽããããŒã¿æ§é ã§ããJuliaã§ã¯ãè§ãã£ã [ ] å
ã«ã«ã³ãã§åºåãããèŠçŽ ã䞊ã¹ãŠè¡šçŸããŸããäŸãã°ã[1, 2, 3]ã["a", "b", "c"]ãªã©ã®é
åãè¡šçŸããããšãã§ããŸãã
ãããã®åºç€çãªããŒã¿åãšå€æ°ã«é¢ããã³ãŒãäŸã瀺ããŸãã
ãã®ã³ãŒãã§ã¯ãæŽæ°åã®å€æ° xãæµ®åå°æ°ç¹æ°åã®å€æ° yãæåååã®å€æ° nameãé
ååã®å€æ° numbers ãå®çŸ©ããŠããŸããããããã®å€æ°ã®åãå€ã typeof() é¢æ°ã println() é¢æ°ã䜿çšããŠåºåããŠããŸãã
ããã®çŽ¹ä»ããããŒã¿åã¯ãããäžéšã§ããæãé »ç¹ã«äœ¿çšãããã®ã§ãã
åã¢ãããŒã·ã§ã³(Type Annotation)ãšã¯ãããã°ã©ãã³ã°èšèªã«ãããŠå€æ°ãé¢æ°ãªã©ã®èŠçŽ ã«å¯ŸããŠãæ瀺çã«åãæå®ããããšãæããŸããäžè¬çã«ãåçåä»ããæ¡çšããèšèªã§ã¯ãå€æ°ã®åã¯å®è¡æã«å€ã«åºã¥ããŠæšè«ãããŸãããéçåä»ããæ¡çšããèšèªã§ã¯ãå€æ°ã®åã¯ã³ãŒãã®èšè¿°æç¹ã§æ瀺çã«æå®ããå¿
èŠããããŸãã
Juliaã§ã¯ãåçåä»ããæ¡çšããŠããŸãããåã¢ãããŒã·ã§ã³ã䜿çšããŠæ瀺çã«åãæå®ããããšãã§ããŸããããã«ãããã³ãŒãã®èªã¿ããããããã©ãŒãã³ã¹ã®æé©åãå¯èœã«ãªããŸããåã¢ãããŒã·ã§ã³ã¯ãé¢æ°ã®åŒæ°ãæ»ãå€ãå€æ°ã®å®£èšãé
åãèŸæžã®èŠçŽ åãªã©ã«é©çšãããããšããããŸããJuliaã§ã¯ãåã¢ãããŒã·ã§ã³ã¯ :: ãçšããŠè¡šçŸãããŸãã
以äžã¯ãåã¢ãããŒã·ã§ã³ã®äŸã§ãã
ãã®ã³ãŒãäŸã§ã¯ãæŽæ°å (Int)ãæµ®åå°æ°ç¹æ°å (Float64)ãæååå (String) ã®å€æ°ãšãããããã®åãèŠçŽ åãšããé
åãå®çŸ©ãããŠããŸãããããã®èŠçŽ ã«å¯ŸããŠåã¢ãããŒã·ã§ã³ãè¡ãããŠããŸãã
åæšè«(type inference)ã¯ãããã°ã©ãã³ã°èšèªãå€æ°ãåŒã®åãã³ãŒãããæšæž¬ããéçã«æ±ºå®ããããã»ã¹ã§ããJuliaã§ã¯ãã³ã³ãã€ã©ãå€æ°ãé¢æ°ã®åãæšè«ããã³ã³ãã€ã«æã«åã®æŽåæ§ã確èªããŸãã
äŸãã°ã次ã®ã³ãŒããèŠãŠã¿ãŸãããã
ãã®å ŽåãJuliaã¯æ¬¡ã®ããã«åãæšè«ããŸãã
Juliaã®åæšè«ã¯éåžžã«æè»ã§ãããéçåä»ãèšèªã®å©ç¹ãšåçåä»ãèšèªã®æè»æ§ãçµã¿åãããŠããŸããããã«ãããã³ãŒããå®å
šã§é«éã«å®è¡ãããäžæ¹ã§ãåé·ãªåã®æ瀺ãå¿
èŠãªå Žé¢ãæžããããšãã§ããŸãã
Juliaãæ¡çšããŠããåæšè«ã®ã¢ã«ãŽãªãºã ã¯ãéçåä»ããšåçåä»ãã®ç¹æ§ãçµã¿åããããã®ã§ããJuliaã®åæšè«ã¯ãéç解æãè¡ããªããããåçã«åã®æšè«ãè¡ãããšãã§ããŸãã
å
·äœçã«ã¯ãJuliaã®åæšè«ã¯ä»¥äžã®æé ã«åºã¥ããŠããŸãã
ãããã®æé ã«ãããJuliaã¯å€æ°ãé¢æ°ã®åãéçã«æšè«ããã³ã³ãã€ã«æã«åã®æŽåæ§ã確èªããŸããããããå¿
èŠã«å¿ããŠåçã«åã远跡ããããšããããŸãããã®æè»æ§ã«ãããJuliaã¯é«éãªã³ãŒãã®çæãšæè»ãªããã°ã©ãã³ã°ãäž¡ç«ããŠããŸãã
Juliaã«ãããŠãããã°ã©ã ã¯åºæ¬çã«åŒãšæŒç®åã®çµã¿åããã§æ§æãããŸããåŒã¯å€ãçæããæŒç®åã¯ãããã®å€ã«å¯ŸããŠç¹å®ã®æäœãè¡ããŸããããã§ã¯ãJuliaã§äœ¿ãããäž»èŠãªæŒç®åãšåŒã«ã€ããŠèª¬æããŸãã
åŒã¯ããã°ã©ã å
ã§å€ãçæããã³ãŒãã®æçã§ããåŒã¯å€æ°ããªãã©ã«ãé¢æ°åŒã³åºããæŒç®åã®çµã¿åãããªã©ã§æ§æãããŸããJuliaã®åŒã¯ä»ã®åŒãæŒç®åãšçµã¿åãããããšã§ããè€éãªåŒãäœãããšãã§ããŸãã
ãªãã©ã«ã¯ããã°ã©ã å
ã§åºå®ãããå€ãè¡šçŸããæ¹æ³ã§ããäŸãã°ãæŽæ°ãæµ®åå°æ°ç¹æ°ãæååãçåœå€ãªã©ããããŸãã以äžã¯ãããã€ãã®ãªãã©ã«ã®äŸã§ã:
æŒç®åã¯åŒå
ã§å€ã«å¯Ÿããç¹å®ã®æäœãè¡ããŸããJuliaã«ã¯ããŸããŸãªçš®é¡ã®æŒç®åããããŸããã以äžã¯äžè¬çãªæŒç®åã®äŸã§ã:
ãããã®æŒç®åã¯åŒå
ã§äœ¿çšãããå€ãåŒã«å¯ŸããŠç¹å®ã®æäœãå®è¡ããŸãã
æŒç®åã«ã¯åªå
é äœãšçµåæ§ããããŸããåªå
é äœã¯æŒç®åãåŒå
ã§ã©ã®ãããªé åºã§è©äŸ¡ããããã瀺ããçµåæ§ã¯åãåªå
é äœã®æŒç®åãã©ã®ããã«ã°ã«ãŒãåããããã瀺ããŸããJuliaã«ã¯æŒç®åã®åªå
é äœãšçµåæ§ãå®çŸ©ããèŠåããããŸãã
Juliaã®åŒãšæŒç®åãç解ããããšã¯ãããã°ã©ã ãäœæãç解ããäžã§éèŠãªã¹ãã«ã§ãã ãããã®æŠå¿µããã¹ã¿ãŒããããšã§ãããå¹ççã§æ£ç¢ºãªã³ãŒããæžãããšãã§ããŸãã
Juliaã®.æŒç®åã¯ãèŠçŽ ããšã®æŒç®ãè¡ãããã®ãã¯ãã«åæŒç®åã§ããããã¯ãJuliaèšèªã«ãããŠéåžžã«éèŠãªæ©èœã§ããããã¯ãã«ãè¡åãªã©ã®èŠçŽ ããšã®æŒç®ãç°¡æœã«è¡ãããšãã§ããŸãã
.æŒç®åã¯ãéåžžã®æŒç®å(å ç®ãæžç®ãä¹ç®ãé€ç®ãªã©)ã®åã«çœ®ãããšã§ããã¯ãã«ãè¡åã®åèŠçŽ ã«ãã®æŒç®ãé©çšããããšãã§ããŸããããã«ãããèŠçŽ ããšã®æŒç®ãéåžžã«ç°¡æœã«èšè¿°ã§ããé«éãªåŠçãå¯èœãšãªããŸãã
以äžã«ã.æŒç®åã®äœ¿çšäŸã瀺ããŸãã
ãã®ããã«ã.æŒç®åã䜿çšããããšã§ããã¯ãã«ã®èŠçŽ ããšã®æŒç®ãã·ã³ãã«ã«å®è¡ã§ããŸãã
Juliaã®.æŒç®åã¯ãæ°å€æŒç®ã ãã§ãªããé¢æ°ã®é©çšãè«çæŒç®ãªã©ãããŸããŸãªæäœã«å¯ŸããŠã䜿çšããããšãã§ããŸãã以äžã«ã.æŒç®åã䜿ã£ãç°ãªãæäœã®ã³ãŒãäŸã瀺ããŸãã
ãããã®äŸã§ã¯ã.æŒç®åã䜿çšããŠãé¢æ°ãæŒç®åããã¯ãã«ã®åèŠçŽ ã«é©çšããŠããŸããããã«ãããèŠçŽ ããšã®æäœãç°¡æœã«èšè¿°ã§ããæè»æ§ãé«ãŸããŸããJuliaã®.æŒç®åã¯ãããŸããŸãªããŒã¿åãæŒç®ã«å¯ŸããŠå©çšã§ããããã°ã©ãã³ã°ã®å¹çãåäžãããŸãã
ã¢ãããŒã«ç©ã¯ãé
åã®å¯Ÿå¿ããèŠçŽ å士ã®ç©ãèšç®ããŠãæ°ããé
åãçæããæŒç®ã§ããJuliaã§ã¯ãæãåºæ¬çãªã¢ãããŒã«ç©ã®èšç®æ¹æ³ã¯ãèŠçŽ å士ã®æãç®æŒç®å.ã䜿çšããããšã§ããäŸãã°ã次ã®ããã«2ã€ã®é
åãçšæãããããã®ã¢ãããŒã«ç©ãèšç®ããããšãã§ããŸãã
ãã®ã³ãŒãã§ã¯ã.*ã䜿ã£ãŠãèŠçŽ ããšã®æãç®æŒç®åãé
åaãšé
åbã«é©çšããæ°ããé
åcãçæããŠããŸãããããã£ãŠãã¢ãããŒã«ç©ã¯æ°ããé
åãçæãããããå
ã®2ã€ã®é
åãšã¯ç°ãªããŸãã
ãŸããè¡åã®ã¢ãããŒã«ç©ãèšç®ããã«ã¯ãåãããã«åèŠçŽ ã«æãç®æŒç®åãé©çšããŸããäŸãã°ã次ã®ããã«è€æ°ã®è¡åã®ã¢ãããŒã«ç©ãèšç®ããããšãã§ããŸãã
ãã®ã³ãŒãã§ã¯ãåè¡åã«å¯ŸããŠãæãç®æŒç®åãé©çšããæ°ããè¡åãçæããŠããŸããããã§ããå
ã®è¡åãšã¯ç°ãªãæ°ããè¡åãçæãããŸãã
Juliaã§ã¯ãä¹ç®æŒç®åãçç¥ããããšãã§ããŸãããã®æ©èœã䜿ããšããªãã©ã«ãå€æ°ãšæ°å€ã®éã«ä¹ç®æŒç®å * ãæ瀺çã«æžããã«ãæ°å€ãšä¹ç®ããããšãã§ããŸãã
å
·äœçãªäŸãèŠãŠã¿ãŸããã:
äžèšã®äŸã§ã¯ã10xã¯10 * xãšåãã§ãããä¹ç®æŒç®å * ãçç¥ããŠèšè¿°ãããŠããŸããããã«ãããããç°¡æœãªã³ãŒããæžãããšãã§ããŸãããã ããå€æ°åãšæ°å€ã®éã«ã¹ããŒã¹ããªãããšã«æ³šæããŠãã ãããã¹ããŒã¹ããããšJuliaã¯å¥ã®æ§æãšè§£éãããšã©ãŒãçºçããŸãã
以äžã¯ãmapé¢æ°ãšdoãããã¯ã䜿çšããŠä¹ç®æŒç®åãçç¥ããäŸã§ã:
ãã®äŸã§ã¯ãmapé¢æ°ã䜿çšããŠé
å [1, 2, 3] ã®åèŠçŽ ã2åã«ããŠããŸããdoãããã¯å
ã§ä¹ç®æŒç®å * ãçç¥ããŠèšè¿°ããŠããŸããããã®æ§æã¯æ£ãã解éãããŸããdoãããã¯å
ã®åŒã¯ãéåžžã®ã³ãŒããšåãããã«è©äŸ¡ãããŸãã
Juliaã§ã¯ããã€ãæŒç®å |> ã䜿çšããŠãé¢æ°ã®åºåã次ã®é¢æ°ã®å
¥åã«çŽæ¥æž¡ãããšãã§ããŸãã ããã«ãããé¢æ°ãé£éãããããšãã§ããã³ãŒãã®èªã¿ããããåäžããŸãã
ãã€ãæŒç®åã®äžè¬çãªæ§æã¯æ¬¡ã®ãšããã§ã:
ããã¯ãinput ã function1 ã«é©çšãããã®çµæã function2 ã«é©çšãããã®çµæã function3 ã«é©çšãããããŠæçµçã« functionN ã«é©çšãããšããæå³ã§ãã
äŸãã°ã次ã®ãããªã³ãŒããèããŠã¿ãŸããã:
ããããã€ãæŒç®åã䜿çšããŠæžãçŽããšæ¬¡ã®ããã«ãªããŸã:
ãã®ããã«ãã€ãæŒç®åã䜿çšããããšã§ãã³ãŒããå·Šããå³ãžãšèªç¶ã«èªãã圢ã«ãªãããã¹ããæ·±ããªãã®ãé²ãããšãã§ããŸãã
Juliaã§ã¯ãæ°ããæŒç®åãå®çŸ©ããäºãã§ããŸãã ããã§ã¯ãâãšããæ°ããæŒç®åãå®çŸ©ããŠããã¯ãã«ã®ãã³ãœã«ç©ãèšç®ããé¢æ°ãå®è£
ããŠã¿ãŸãããã
ãã®ã³ãŒãã¯ãæ°ããæŒç®å â ãå®çŸ©ãããã®æŒç®åã䜿çšããŠãã¯ãã«ã®ãã³ãœã«ç©ãèšç®ããçµæãåºåããŠããŸãã以äžã«ããããã®éšåã®è§£èª¬ãæäŸããŸãã
å¶åŸ¡æ§é (Control structures)ãšã¯ãããã°ã©ã ã®ãããŒãå¶åŸ¡ããããã®æ§é ãæ©èœã®ããšã§ããããã°ã©ãã³ã°èšèªã§ã¯ãæ¡ä»¶ã«å¿ããŠç°ãªãæäœãè¡ã£ãããåãæäœãç¹°ãè¿ãããããšã©ãŒãåŠçãããããããã«å¶åŸ¡æ§é ã䜿çšãããŸãã
è€ååŒã¯ãè€æ°ã®åŒããŸãšããŠäžã€ã®åŒãšããŠæ±ãããã®æ¹æ³ã§ããJuliaã§ã¯ãbegin ããŒã¯ãŒãã䜿çšããŠè€ååŒãéå§ããend ããŒã¯ãŒãã§çµäºããŸãããŸãã; ã䜿çšããŠè€æ°ã®åŒã1è¡ã«ãŸãšããããšãã§ããŸãã
ãŸãã¯
æ¡ä»¶ä»ãè©äŸ¡ã¯ãç¹å®ã®æ¡ä»¶ãæºããããå Žåã«ç¹å®ã®ã³ãŒããããã¯ãå®è¡ããããã®æ¹æ³ã§ããJuliaã§ã¯ãif-elseif-else æãäžé
æŒç®å ?: ã䜿çšããŠæ¡ä»¶ä»ãè©äŸ¡ãè¡ããŸãã
ãŸãã¯
ç絡è©äŸ¡ã¯ãè«çæŒç®å &&(è«çç©)ãš ||(è«çå)ã䜿çšãããæ¡ä»¶åŒã®è©äŸ¡æ¹æ³ã§ããJuliaã§ã¯ãè«çæŒç®åãç絡è©äŸ¡ãè¡ããŸããå·Šã®æ¡ä»¶åŒã ãã§çµæã確å®ããå Žåãå³ã®æ¡ä»¶åŒã¯è©äŸ¡ãããŸããã
ç¹°ãè¿ãè©äŸ¡ã¯ãã«ãŒãæ§é ã䜿çšããŠç¹å®ã®ã³ãŒããããã¯ãè€æ°åå®è¡ããæ¹æ³ã§ããJuliaã§ã¯ãwhile ã«ãŒããš for ã«ãŒãã䜿çšãããŸãã
Juliaã«ãããäŸå€åŠçã¯ãäºæããªãç¶æ³ããšã©ãŒãçºçããå Žåã«ããã°ã©ã ã®æ£åžžãªæµããäžæãããšã©ãŒãåŠçããä»çµã¿ã§ããäž»ãªäŸå€åŠçã®æ§æèŠçŽ ã¯ä»¥äžã®éãã§ã:
äŸå€åŠçãé©åã«äœ¿çšããããšã§ãããã°ã©ã ãäºæãã¬ç¶æ³ããšã©ãŒã«ééãããšãã«ãããã«é©åã«å¯ŸåŠã§ããããã«ãªããŸãã
ã¿ã¹ã¯ã¯ãããã°ã©ã ã®å®è¡ãäžæåæ¢ããåŸã§åéããããã®æ©èœã§ããJuliaã§ã¯ãyieldto é¢æ°ã䜿çšããŠã¿ã¹ã¯ãå®çŸ©ããŸãã
æ¡ä»¶åŒã§ã¯ççå€å(Boolean)ãèŠæ±ãããŸãã Juliaã§ã¯ãæŽæ°å€ããççå€åãžã®æé»ã®å€æã¯è¡ãããªãã®ã§ãæ¡ä»¶åŒã¯æ瀺çã«ççå€ãæäŸããå¿
èŠããããŸãã
äŸãã°ãJuliaã§ã¯æ¬¡ã®ãããªã³ãŒããèããããŸã:
ãã®å Žåãæ¡ä»¶åŒ x > 0 ã¯æŽæ°å€ x ã®å€ã0ã§ãªããã©ãããè©äŸ¡ããŸããx ã®å€ãæ£ã®å Žåã«æ¡ä»¶ãçãšãªããprintln é¢æ°ãå®è¡ãããŸããæŽæ°å€ããã®ãŸãŸæ¡ä»¶åŒã«äœ¿çšãããããšã¯ãªãããã®å€ãè©äŸ¡ããããã«æ¯èŒæŒç®åãªã©ã®æ¡ä»¶åŒã䜿çšããŸãã
ãã®ã³ãŒãäŸã§ã¯ãæ¡ä»¶åå²ãç¹°ãè¿ããäŸå€åŠçãäžé
æŒç®åãè«çæŒç®åã®ç絡è©äŸ¡ã®åå¶åŸ¡æ§é ã䜿çšãããŠããŸããããããã®ãããã¯ã«ã¯ã³ã¡ã³ããä»ããŠãããåå¶åŸ¡æ§é ãã©ã®ããã«æ©èœãããã説æãããŠããŸãã
Juliaã«ã¯ãã«ãŒãã®å¶åŸ¡ãäŸå€åŠçã®å¶åŸ¡ãªã©ãè¡ãããã®ããŸããŸãªå¶åŸ¡æããããŸãã以äžã«ããã€ãã®äž»èŠãªãã®ã瀺ããŸãã
ãããã®å¶åŸ¡æã¯ãããã°ã©ã ã®å®è¡ãããŒãå¶åŸ¡ããããã«äœ¿çšãããŸããäŸãã°ãbreakæã¯ã«ãŒãå
ã®ç¹å®ã®æ¡ä»¶äžã§ã«ãŒããçµäºããããã«äœ¿çšãããreturnæã¯é¢æ°ã®å®è¡ãçµäºããŠå€ãè¿ãããã«äœ¿çšãããŸããthrowæã¯ãç¹å®ã®æ¡ä»¶äžã§ãšã©ãŒãçºçããããããåŠçããããã®äŸå€åŠçãããã¯ã«å¶åŸ¡ã移ãããã«äœ¿çšãããŸãã
ãã®ã³ãŒãäŸã§ã¯ãåçš®ã®å¶åŸ¡æ(ifæãwhileã«ãŒããforã«ãŒããbreakæãreturnæãthrowæ)ã䜿çšããŠããŸããããããã®å¶åŸ¡æ§é ããé©åã«ããã°ã©ã ã®ãããŒãå¶åŸ¡ããŠããŸãã
å
å
è¡šèš(comprehension)ã¯ãããã°ã©ãã³ã°èšèªã«ãããŠãã³ã¬ã¯ã·ã§ã³(é
åããªã¹ããã»ãããèŸæžãªã©)ãçæããããã®æ§ææ©èœã§ããéåžžãå
å
è¡šèšã¯ãã«ãŒããæ¡ä»¶æã䜿çšããã«ãç°¡æœãã€å¹ççã«ã³ã¬ã¯ã·ã§ã³ãçæããããšãã§ããŸãã
å
å
è¡šèšã¯ãããã³ã³ãã¯ãã§èªã¿ãããã³ãŒããæžãããã®äŸ¿å©ãªæ段ã§ãã
è¡å(Matrix)ãçæããããã«ããå
å
è¡šèšã¯éåžžã«äŸ¿å©ã§ãã ç¹ã«ã2次å
é
åãå¹ççã«çæããéã«åœ¹ç«ã¡ãŸãã以äžã«ããããªãã¯ã¹ãçæããå
å
è¡šèšã®äŸã瀺ããŸãã
ãã®äŸã§ã¯ã3x3ã®ãããªãã¯ã¹ãçæãããŸããåèŠçŽ ã¯ããã®è¡çªå·ãšåçªå·ã®ç©ã«ãªããŸããçæããããããªãã¯ã¹ã¯ä»¥äžã®ããã«ãªããŸã:
ãã®ããã«ãå
å
è¡šèšã䜿çšããããšã§ããã¹ããããã«ãŒããé¿ããŠãããªãã¯ã¹ãå¹ççã«çæããããšãã§ããŸãããŸããå
å
è¡šèšã䜿çšããããšã§ãã³ãŒããç°¡æœã«ãªããå¯èªæ§ãåäžããŸãã
ããã«ãå
å
è¡šèšã掻çšããŠæ¡ä»¶ã«åºã¥ãããããªãã¯ã¹ã®çæãå¯èœã§ããäŸãã°ãç¹å®ã®æ¡ä»¶ãæºããèŠçŽ ã®ã¿ãå«ããããªãã¯ã¹ãçæããããšãã§ããŸããå
å
è¡šèšãå©çšããããšã§ããã®ãããªæäœãç°¡æœã«èšè¿°ããããšãã§ããŸãã
é
åãã¿ãã«ãèŸæžãªã©ã®ããŒã¿æ§é ãåŠã³ãŸãããããã®æ§é ã¯ããŒã¿ãå¹æçã«æ±ãããã®åºæ¬çãªããŒã«ã§ããããã«ãããŒã¿ã®ã€ã³ãã¯ã·ã³ã°ãã¹ã©ã€ã·ã³ã°ã®æ¹æ³ãç解ããŸããããŒã¿æ§é ã®éžæãšæäœã¯ããã°ã©ã ã®å¹çæ§ã«å€§ãã圱é¿ããããããã£ãããšç解ããŠãããŸãããã
Juliaã«ã¯ãæ§ã
ãªããŒã¿åããããŸããäž»ãªããŒã¿åã¯ä»¥äžã®éãã§ãã
Juliaã®Stringã¯ãããã¹ãããŒã¿ãè¡šãäžå€ã®ããŒã¿åã§ããæååã¯äžé£ã®æå(Unicodeæå)ããæ§æãããããã«ã¯ã©ãŒããŒã·ã§ã³ã§å²ãŸããŸããäŸãã°ã"Hello, world!"ã®ãããªæååã¯ãæåHãeãlãlãoã,ãã¹ããŒã¹ãwãoãrãlãdã!ã®é£ç¶ããã·ãŒã±ã³ã¹ã§ãã
Juliaã®Stringã¯äžå€ã®ãããäžåºŠäœæãããæååã¯å€æŽã§ããŸãããããã¯ãæååãå€æŽãã代ããã«ãæ°ããæååãçæããããšã«ãªããŸããJuliaã®æååã¯UTF-8ã§ãšã³ã³ãŒããããŠãããUnicodeã®å
šãŠã®æåããµããŒãããŠããŸãã
Juliaã®Stringåã«ã¯ãæ§ã
ãªã¡ãœãããçšæãããŠãããæååã®æäœãåŠçãè¡ãããã®æ©èœãè±å¯ã«æäŸãããŠããŸãããŸããæååè£éãæ£èŠè¡šçŸãªã©ã®æ©èœãå©çšããããšãã§ããŸãã
æååã¯ãJuliaã§ã®ããã¹ãåŠçãããŒã¿æäœãæååæäœãªã©ã®å€ãã®å Žé¢ã§åºã䜿çšãããŸãã
以äžã«juliaã®æååã®ã¡ãœããã®äžéšã瀺ããŸãã
ãããã¯äžéšã®åºæ¬çãªæååã¡ãœããã§ãããJuliaã«ã¯ããã«å€ãã®æåååŠçé¢æ°ãçšæãããŠããŸãããããã®ã¡ãœãããçµã¿åãããŠãããŸããŸãªæååæäœãå®è¡ããããšãã§ããŸãã
Juliaã®ã³ã¬ã¯ã·ã§ã³åã¯ãè€æ°ã®èŠçŽ ãäžã€ã®ãŸãšãŸããšããŠæ ŒçŽããããŒã¿æ§é ãæããŸããã³ã¬ã¯ã·ã§ã³åã¯ç°ãªãèŠçŽ ã®éãŸããè¡šçŸãããããã®èŠçŽ ã«ã¢ã¯ã»ã¹ãããæäœãããããããã®æ¹æ³ãæäŸããŸãã
Juliaã®äž»èŠãªã³ã¬ã¯ã·ã§ã³åã«ã¯ä»¥äžã®ãããªãã®ããããŸãã
ãããã®ã³ã¬ã¯ã·ã§ã³åã¯ãç°ãªãããŒã¿æ§é ãæäœæ¹æ³ãæäŸããããŸããŸãªåé¡ãã¢ã«ãŽãªãºã ã«å¯ŸããŠé©ããæ¹æ³ã§ããŒã¿ãè¡šçŸããŸãã
é
å(Array)ã¯ãåãåã®èŠçŽ ãé åºä»ãã§æ ŒçŽããããŒã¿æ§é ã§ããJuliaã§ã¯ãé
åã¯1次å
ããå€æ¬¡å
ãŸã§ã®æ¬¡å
ãæã€ããšãã§ããŸããé
åã¯éåžžã«æè»ã§ãããæ°å€ãæååãæ§é äœãªã©ãããŸããŸãªçš®é¡ã®ããŒã¿ãæ ŒçŽã§ããŸãã
以äžã¯ãJuliaã§ã®é
åã®äŸã§ã:
é
åã®èŠçŽ ãžã®ã¢ã¯ã»ã¹ã¯ãæ·»åã䜿çšããŠè¡ããŸããäŸãã°ãarray1ã®2çªç®ã®èŠçŽ ã«ã¢ã¯ã»ã¹ããå Žåã¯array1[2]ãšããŸããJuliaã§ã¯ãæ·»åã¯1ããå§ãŸãããšã«æ³šæããŠãã ããã
é
åã¯å¯å€é·ã§ãããèŠçŽ ã®è¿œå ãåé€ãå€æŽãå¯èœã§ããäŸãã°ãpush!()é¢æ°ã䜿çšããŠé
åã«èŠçŽ ãè¿œå ããããpop!()é¢æ°ã䜿çšããŠé
åããèŠçŽ ãåé€ãããããããšãã§ããŸãã
Juliaã®é
åã¯ãå€ãã®äŸ¿å©ãªã¡ãœãããæäŸããŠããŸãã以äžã«ãäžéšã®äž»èŠãªé
åã¡ãœããã瀺ããŸãã
ãããã¯äžéšã®äž»èŠãªé
åã¡ãœããã§ãããJuliaã«ã¯ããã«å€ãã®é
åæäœé¢æ°ãçšæãããŠããŸãããããã®ã¡ãœãããçµã¿åãããŠãããŸããŸãªé
åæäœãå®è¡ã§ããŸãã
Juliaã§é
åãå¹æçã«æäœããããã®ããã€ãã®ã€ãã£ãªã (æ
£çšå¥)ããããŸãããããã®ã€ãã£ãªã ã¯ãã³ãŒããç°¡æœã«ä¿ã¡ãªããå¹ççã«ããŒã¿ãåŠçããã®ã«åœ¹ç«ã¡ãŸãã以äžã«ããã€ãã®äžè¬çãªé
åã®ã€ãã£ãªã ã瀺ããŸãã
ãããã®ã€ãã£ãªã ã䜿ãããšã§ãå¹ççã§èªã¿ãããJuliaã³ãŒããèšè¿°ã§ããŸããããããã®ç¶æ³ã«å¿ããŠãæé©ãªã€ãã£ãªã ãéžæãã掻çšããŠãã ããã
Juliaã®å€æ¬¡å
é
åã¯ã1次å
é
åã«äŒŒã圢åŒã§å®çŸ©ãããŸãããè€æ°ã®æ¬¡å
ãæã€é
åã§ãããèŠçŽ ãžã®ã¢ã¯ã»ã¹ã«ã¯ã€ã³ããã¯ã¹ã®ã¿ãã«ã䜿çšãããŸãã
ãã¡ããJuliaã§å€æ¬¡å
é
åã䜿çšãã代衚çãªã³ãŒãäŸã§ãã
å€æ¬¡å
é
å(è¡åãªã©)ãæ±ãéã«ã䟿å©ãªã¡ãœãããããã€ããããŸãã以äžã«ãJuliaã®å€æ¬¡å
é
åã«é¢é£ããäž»èŠãªã¡ãœããã®ããã€ãã瀺ããŸãã
ãããã®ã¡ãœããã¯ãå€æ¬¡å
é
åãå¹æçã«æäœããããã®ããŒã«ãšããŠåœ¹ç«ã¡ãŸããJuliaã®å€æ¬¡å
é
åã¯ãæ°å€èšç®ãããŒã¿åŠçãªã©ã®å€ãã®ã¢ããªã±ãŒã·ã§ã³ã§åºã䜿çšãããŠããŸãã
å€æ¬¡å
é
åãå¹æçã«æäœããããã®ããã€ãã®ã€ãã£ãªã (æ
£çšå¥)ããããŸãããããã®ã€ãã£ãªã ã䜿çšããããšã§ãã³ãŒããããå¹ççã«èšè¿°ã§ããŸãã以äžã«ãå€æ¬¡å
é
åã®ã€ãã£ãªã ã®ããã€ãã瀺ããŸãã
ãããã®ã€ãã£ãªã ã¯ãå€æ¬¡å
é
åãæäœããéã«åœ¹ç«ã¡ãŸããé©åãªã€ãã£ãªã ãéžæããã³ãŒããå¹æçã«èšè¿°ããŠãã ããã
ã¿ãã«(Tuple)ã¯ãåºå®é·ã®é åºä»ãã³ã¬ã¯ã·ã§ã³ã§ãããç°ãªãåã®èŠçŽ ãæ ŒçŽã§ããŸããã¿ãã«ã¯ãªã¹ããé
åãšåæ§ã«èŠçŽ ãå«ã¿ãŸãããäžåºŠäœæãããã¿ãã«ã®èŠçŽ ã¯å€æŽã§ããŸãããã€ãŸããã¿ãã«ã¯äžå€(immutable)ã§ãã
ã¿ãã«ã¯äžžæ¬åŒ§ () ã§å²ãŸããã«ã³ã , ã§åºåãããèŠçŽ ã®ãªã¹ãã§è¡šçŸãããŸãã以äžã¯ãããã€ãã®ã¿ãã«ã®äŸã§ãã
ã¿ãã«ã¯ãé¢æ°ã®è¿ãå€ãè€æ°ã®å€ããŸãšããŠæ±ãããå Žåãªã©ã«äŸ¿å©ã§ãããŸãããã¿ãŒã³ãããã³ã°ãé¢æ°ã®åŒæ°ã®åãæž¡ããããŒã¿ã®ã°ã«ãŒãåãªã©ãããŸããŸãªçšéã§äœ¿çšãããŸãã
ã¿ãã«ã®èŠçŽ ãžã®ã¢ã¯ã»ã¹ã¯ãã€ã³ããã¯ã¹ã䜿çšããŠè¡ããŸããã€ã³ããã¯ã¹ã¯1ããå§ãŸããŸããäŸãã°ãtuple1ã®3çªç®ã®èŠçŽ ã«ã¢ã¯ã»ã¹ããã«ã¯ãtuple1[3]ãšããŸãã
ã¿ãã«ã¯ã€ãã¥ãŒã¿ãã«ã§ãããããäžåºŠäœæããããšèŠçŽ ãå€æŽããããšã¯ã§ããŸãããããããã¿ãã«ã䜿çšããŠæ°ããã¿ãã«ãäœæããããšã¯ã§ããŸãã
ã¿ãã«ã¯äžå€(immutable)ãªã®ã§ãã¿ãã«èªäœã«å€æŽãå ããã¡ãœããã¯ãããŸãããããããã¿ãã«ã«é¢ããããã€ãã®é¢æ°ãã¡ãœãããæäŸãããŠããŸãã以äžã«ããã€ãã®äŸã瀺ããŸãã
ãããã®ã¡ãœãããé¢æ°ã䜿çšããããšã§ãã¿ãã«ã®å
容ãååŸããããæäœãããããããšãã§ããŸãããã ããã¿ãã«èªäœã¯äžå€ãªã®ã§ãèŠçŽ ã®å€æŽãè¿œå ãåé€ã¯ã§ããŸããã
ã¿ãã«ãå¹æçã«äœ¿çšããããã®ããã€ãã®ã€ãã£ãªã (æ
£çšå¥)ããããŸããã¿ãã«ã¯äžå€(immutable)ãªã®ã§ãèŠçŽ ãå€æŽããããšã¯ã§ããŸãããããã®æ§è³ªã掻ãããŠããŸããŸãªçšéã«å©çšã§ããŸãã
以äžã«ãã¿ãã«ã®ã€ãã£ãªã ã®äžéšã瀺ããŸãã
ãããã®ã€ãã£ãªã ã䜿çšããããšã§ãã¿ãã«ãå¹æçã«æŽ»çšããæè»ãªã³ãŒããèšè¿°ããããšãã§ããŸãã
èŸæž(Dict; Dictionary)ã¯ãããŒãšå€ã®ãã¢ãé¢é£ä»ããããŒã¿æ§é ã§ããä»ã®èšèªã§ã¯é£æ³é
åãããã·ã¥ããããšãåŒã°ããŸããJuliaã®èŸæžã¯éåžžã«æè»ã§ãç°ãªãåã®ããŒãšå€ãæã€ããšãã§ããŸãã
èŸæžã¯æ³¢æ¬åŒ§ {} ã§å²ãŸããããŒãšå€ã®ãã¢ã¯ã³ãã³ : ã§åºåãããŸãã以äžã¯ãããã€ãã®èŸæžã®äŸã§ãã
èŸæžã¯ãããŒã䜿çšããŠå€ã«ã¢ã¯ã»ã¹ããããšãã§ããŸããããŒã¯ãŠããŒã¯ã§ãããåãããŒã«å¯ŸããŠç°ãªãå€ãé¢é£ä»ããããšã¯ã§ããŸãããããŒãååšããªãå Žåããšã©ãŒãçºçããŸãã
èŸæžã®æäœã«ã¯ãããŒãšå€ã®è¿œå ãåé€ãå€æŽãæ€çŽ¢ãªã©ãå«ãŸããŸããèŸæžã¯ãããŒã¿ãå¹ççã«æ€çŽ¢ããã³æŽæ°ããããã«åºã䜿çšãããŸããJuliaã®èŸæžã¯ãããã·ã¥ããŒãã«ãšããŠå®è£
ãããŠãããé«éãªããŒã®æ€çŽ¢ãæäŸããŸãã
Juliaã®èŸæž(Dict)ã«ã¯ãããŸããŸãªäŸ¿å©ãªã¡ãœãããçšæãããŠããŸãã以äžã«ããã䜿ãããèŸæžã®ã¡ãœããã®äžéšã瀺ããŸãã
ãããã®ã¡ãœããã䜿çšããããšã§ãèŸæžãå¹æçã«æäœããããŒã¿ãååŸããã³æŽæ°ããããšãã§ããŸããJuliaã®èŸæžã¯éåžžã«æè»ã§ãããããŸããŸãªããŒã¿æäœã«åœ¹ç«ã¡ãŸãã
èŸæžãå¹æçã«äœ¿çšããããã®ããã€ãã®ã€ãã£ãªã (æ
£çšè¡šçŸ)ããããŸãã ãããã®ã€ãã£ãªã ã¯ãã³ãŒããããèªã¿ããããå¹ççã«ããããã«åœ¹ç«ã¡ãŸãã
以äžã«ããã䜿ãããèŸæžã®ã€ãã£ãªã ã®ããã€ãã瀺ããŸãã
ãããã®ã€ãã£ãªã ã䜿çšããããšã§ãèŸæžãå¹æçã«æäœããã³ãŒããããèªã¿ããããå¹ççã«ããããšãã§ããŸããJuliaã®èŸæžã¯ãããŒã¿ã®ãããã³ã°ãé¢é£ä»ãã«åºã䜿çšãããå€ãã®ã¢ããªã±ãŒã·ã§ã³ã§éèŠãªåœ¹å²ãæãããŠããŸãã
éåã¯ãéè€ããªãèŠçŽ ãè€æ°åä¿æããããšãã§ããã³ã¬ã¯ã·ã§ã³ã§ãã
以äžã¯Juliaã§éåãæ±ãå
žåçãªã³ãŒãäŸã§ã:
äžèšã®ã³ãŒãã¯ã次ã®ããšãè¡ããŸã:
以äžã¯Juliaã®Setåã«å«ãŸããå
žåçãªã¡ãœãããšãã®åŒæ°ãæ»ãå€ãããã³ç°¡åãªèª¬æã衚圢åŒã§ãŸãšãããã®ã§ãã
泚æ:äžèšã®è¡šã¯ãSetåãæã€ã¡ãœããã®äžéšã®ã¿ã玹ä»ãããã®ã§ãããŸããå®éã®ã³ãŒãã§ãããã®ã¡ãœãããåŒã³åºãéã«ã¯ãåŒæ°ã®åãæ°ãæ»ãå€ã®åãå
·äœçãªç¶æ³ã«å¿ããŠå€ããå¿
èŠããããŸãã
Juliaã«ãããstructã¯ãæ°ããããŒã¿åãå®çŸ©ããããã®ããŒã¯ãŒãã§ããstructã䜿çšããŠå®çŸ©ãããããŒã¿åã¯ãè€æ°ã®ãã£ãŒã«ã(å±æ§)ãæã€ããšãã§ããŸãããããã®ãã£ãŒã«ãã¯ãããŒã¿åã®æ§é ãè¡šçŸããããã«äœ¿çšãããŸãã
structã®æ§æã¯æ¬¡ã®ããã«ãªããŸã:
äŸãã°ã2次å
ã®åº§æšãè¡šãããŒã¿åãå®çŸ©ããå Žåã次ã®ããã«structã䜿çšããŸã:
ãã®äŸã§ã¯ãPointãšããååã®æ°ããããŒã¿åãå®çŸ©ãããŠããŸãããã®ããŒã¿åã¯ã2ã€ã®æµ®åå°æ°ç¹æ°ãã£ãŒã«ãxãšyãæã¡ãŸãã
structã§å®çŸ©ãããããŒã¿åã¯ãããããã®ã€ã³ã¹ã¿ã³ã¹ãåºæã®å±æ§ãæã¡ãŸããäŸãã°ã次ã®ããã«ããŠæ°ããPointã€ã³ã¹ã¿ã³ã¹ãäœæã§ããŸã:
ãã®ã³ãŒãã§ã¯ãPointåã®æ°ããã€ã³ã¹ã¿ã³ã¹pãäœæãããã®xå±æ§ã«ã¯3.0ãyå±æ§ã«ã¯4.0ãæ ŒçŽãããŸãã
structã䜿çšããããšã§ãé¢é£ããããŒã¿ãã²ãšãŸãšãã«ããç¬èªã®ããŒã¿åãå®çŸ©ããããšãã§ããŸããããã«ãããã³ãŒãã®æ§é ãããæ確ã«ãªããåå©çšæ§ãåäžããŸãã
Juliaã«ãããŠãstructãšã¡ãœããã¯å¯æ¥ã«é¢é£ããŠããŸããstructã§å®çŸ©ãããããŒã¿åã«ã¯ããã®ããŒã¿åã«é¢ããæäœãå®è¡ããããã®ã¡ãœãããå®çŸ©ããããšãã§ããŸãã
ããšãã°ãå
ã»ã©ã®Pointæ§é äœãäŸã«æãããšããã®æ§é äœã«ã¯åº§æšéã®è·é¢ãèšç®ããã¡ãœãããå®çŸ©ã§ããŸãã次ã®ããã«ããŠã¡ãœãããå®çŸ©ããŸã:
ãã®äŸã§ã¯ãdistanceãšããååã®é¢æ°ãå®çŸ©ããŠããŸãããã®é¢æ°ã¯ã2ã€ã®Pointåã®ã€ã³ã¹ã¿ã³ã¹ãåãåãããããã®éã®è·é¢ãèšç®ããŸãããã®ããã«ãé¢æ°ã®åŒæ°ã«åãæå®ããããšã§ããã®é¢æ°ã¯æå®ãããåã®ã€ã³ã¹ã¿ã³ã¹ã«å¯ŸããŠã®ã¿åäœããŸãã
ãã®ã¡ãœããã䜿çšãããšãäŸãã°æ¬¡ã®ããã«ããŠ2ã€ã®åº§æšéã®è·é¢ãèšç®ã§ããŸã:
ãã®äŸã§ã¯ã2ã€ã®Pointåã®ã€ã³ã¹ã¿ã³ã¹p1ãšp2ãäœæãããããã®éã®è·é¢ãdistanceã¡ãœããã§èšç®ããŠããŸãã
structãšã¡ãœãããçµã¿åãããããšã§ãç¹å®ã®ããŒã¿åã«å¯Ÿããæäœã容æã«å®çŸ©ããã³ãŒãã®åå©çšæ§ãåäžãããããšãã§ããŸãã
ãã®ç¯ã§ã¯ãJuliaã«ãããé¢æ°ãšã¡ãœããã®åºæ¬çãªæŠå¿µã«ã€ããŠèª¬æããŸããJuliaã§ã¯ãé¢æ°ã¯ç¹å®ã®åŠçãå®è¡ããããã®äžé£ã®åœä»€ããŸãšãããã®ã§ãããã¡ãœããã¯é¢æ°ã®äžçš®ã§ããªããžã§ã¯ãã®åã«ãã£ãŠæ¯ãèããç°ãªãé¢æ°ã®ããšã§ããJuliaã®é¢æ°ã¯å€éãã£ã¹ãããããµããŒãããŠãããåãé¢æ°åã§ãåŒæ°ã®åãæ°ã«ãã£ãŠç°ãªãã¡ãœãããåŒã³åºãããŸããããã«ãããæè»æ§ã®é«ãããã°ã©ãã³ã°ãå¯èœã«ãªããŸããé¢æ°ãã¡ãœããã®å®çŸ©ã¯ç°¡æœã§çŽæçã§ãããé¢æ°åããã°ã©ãã³ã°ããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®äž¡æ¹ã®æŠå¿µãçµã¿åãããŠããŸãããŸããJuliaã§ã¯é«éé¢æ°ãã¯ããŒãžã£ãªã©ã®æ©èœãè±å¯ã«åãã£ãŠãããããããçµã¿åãããããšã§ãããè€éãªåŠçãã·ã³ãã«ãªåœ¢ã§èšè¿°ããããšãå¯èœã§ãããã®ç¯ã§ã¯ãJuliaã«ãããé¢æ°ãšã¡ãœããã®äœ¿ãæ¹ãå®çŸ©æ¹æ³ããããŠå€éãã£ã¹ããããã©ã®ããã«åäœããããªã©ã«ã€ããŠè©³ãã解説ããŸãã
é¢æ°ã¯ãå
¥åå€ãåãåããããããåŠçããçµæãåºåããæç¶ããæäœãæããŸããããã°ã©ãã³ã°ã«ãããŠãé¢æ°ã¯åå©çšå¯èœã§ç¬ç«ããã³ãŒããããã¯ãè¡šããç¹å®ã®ã¿ã¹ã¯ãèšç®ãå®è¡ããããã«äœ¿çšãããŸããé¢æ°ã¯ãããã°ã©ã ã®æ§é åãå¹ççãªã³ãŒãã®èšè¿°ãåŠçã®åå²ãšæœè±¡åãå¯èœã«ããŸãã
é¢æ°ã¯ã次ã®ãããªç¹æ§ãæã€ããšããããŸã:
é¢æ°ã¯ãããã°ã©ã èšèªããã¬ãŒã ã¯ãŒã¯ã«ãã£ãŠç°ãªãæ§æãæ©èœãæã€ããšããããŸãããåºæ¬çãªæŠå¿µãšç®çã¯ã»ãŒåãã§ãã
é¢æ°ã®å®çŸ©ãšåŒã³åºãã¯ãJuliaã«ãããŠéåžžã«ã·ã³ãã«ã§çŽæçã§ãã以äžã«ãåºæ¬çãªæ¹æ³ã瀺ããŸãã
Juliaã§ã¯ãé¢æ°ã¯ function ããŒã¯ãŒãã䜿ã£ãŠå®çŸ©ãããŸããé¢æ°ã1ã€ã®åŒã§è¡šãããå Žåãçã圢åŒã®å®çŸ©ãå¯èœã§ãã
Juliaã«ãããåºæ¬çãªé¢æ°å®çŸ©ã®æ§æã¯ä»¥äžã®éãã§ãã
ãŸãã¯ãç瞮圢ãšããŠä»¥äžã®ããã«æžãããšãã§ããŸãã
ãããã®æ§æã«ã€ããŠè©³çŽ°ã«èª¬æããŸãã
function ããŒã¯ãŒããš end ããŒã¯ãŒãã䜿çšããŠé¢æ°ãå®çŸ©ããå Žåãend ã®çŽåã« return ã䜿çšããŠæ»ãå€ãæå®ããŸããç瞮圢ã®æ§æã§ã¯ãreturn ããŒã¯ãŒãã¯çç¥ãããé¢æ°æ¬äœã®æåŸã®åŒã®å€ãèªåçã«æ»ãå€ãšãªããŸãã
é¢æ°ã®æ»ãå€ã¯ãé¢æ°ãåŠçãå®è¡ããåŸã«åŒã³åºãå
ã«è¿ãããå€ã§ããJuliaã§ã¯ãé¢æ°ãå€ãè¿ãéã« return ããŒã¯ãŒãã䜿çšããŸãããreturn ãæ瀺çã«æžããªããŠããé¢æ°ã®æåŸã«è©äŸ¡ãããåŒãèªåçã«æ»ãå€ãšãªããŸãã
以äžã«ãé¢æ°ã®æ»ãå€ã®å®çŸ©æ¹æ³ãšåŒã³åºãæ¹ã®äŸã瀺ããŸãã
ãããã¯
äžèšã®äŸã§ã¯ãadd é¢æ°ã x ãš y ã®åèšãè¿ããŸãã
add(3, 5) ãåŒã³åºããšãé¢æ°å
㧠x ãš y ãåèšããçµæãæ»ãå€ãšãªããresult å€æ°ã«ä»£å
¥ãããŸãããã®åŸãprintln(result) ã䜿ã£ãŠçµæãåºåãããŸãã
Juliaã§ã¯ãé¢æ°ã®æåŸã«è©äŸ¡ãããåŒãèªåçã«æ»ãå€ãšãªããããreturn ããŒã¯ãŒããçç¥ããŠãåé¡ãããŸããã
é¢æ°ã®åŒã³åºãã¯ãé¢æ°åã«åŒæ°ãæž¡ãããšã§è¡ããŸããåŒæ°ã¯ã«ã³ãã§åºåãããŸãã
Juliaã§ã¯ãããã©ã«ãåŒæ°ãæã€é¢æ°ãå®çŸ©ããããšãã§ããŸããããã©ã«ãåŒæ°ãæã€ãã©ã¡ãŒã¿ã¯ãé¢æ°ã®åŒã³åºãæã«çç¥ããããšãã§ããŸãã
ãŸããããŒã¯ãŒãåŒæ°ã䜿ã£ãŠé¢æ°ãå®çŸ©ããããšãã§ããŸããããã«ãããåŒæ°ã®æå³ãæ確ã«ããããšãã§ããŸãã
Juliaã®é¢æ°ã¯éåžžã«æè»ã§ãããæ§ã
ãªåŒæ°ã®åœ¢åŒããµããŒãããŠããŸããããã«ãããé¢æ°ãããå¹æçã«äœ¿çšããããšãã§ããŸãã
Juliaã¯åçåä»ãèšèªã§ãããé¢æ°ã®åŒæ°ãæ»ãå€ã®åãæ瀺çã«æå®ããå¿
èŠã¯ãããŸããã代ããã«ãJuliaã®åæšè«æ©èœãé¢æ°ã®åŒæ°ãæ»ãå€ã®åãèªåçã«æšè«ããŸãã
以äžã¯ãåæšè«ãè¡ãããäŸã§ãã
ãã®äŸã§ã¯ãadd é¢æ°ã®åŒæ° x ãš y ã¯æ瀺çãªå泚éãäžããããŠããŸããããJuliaã¯äžããããåŒæ°ãæŽæ°ã§ããããšãæšè«ããŸãããŸããadd é¢æ°ã®æ»ãå€ã®åãæŽæ°ãšããŠæšè«ãããŸãã
ãã®äŸã§ã¯ãadd é¢æ°ã¯ãžã§ããªãã¯é¢æ°ãšããŠå®çŸ©ãããŠããŸãããžã§ããªãã¯é¢æ°ã¯ãç¹å®ã®åã«äŸåãããç°ãªãåã®åŒæ°ã«å¯ŸããŠåäœããããã«èšèšãããŠããŸããJuliaã®åæšè«æ©èœãé¢æ°ã®åŒæ°ãæ»ãå€ã®åãèªåçã«æšè«ããããšã§ããžã§ããªãã¯é¢æ°ãç°ãªãåã®åŒæ°ã«å¯ŸããŠé©åã«åäœããããšãå¯èœã«ãªããŸãã
以äžã¯ãåæšè«ã倱æããå¯èœæ§ã®ããã³ãŒãäŸã§ãã
ãã®äŸã§ã¯ãmy_funcé¢æ°ã¯åŒæ° x ãåãåããŸãããæ¡ä»¶ã«å¿ããŠæååãŸãã¯æŽæ°ãè¿ããŸãããã®ãããªå Žåãåæšè«ã¯å€±æããJuliaã¯é©åãªåãæšè«ã§ããŸããããã®çµæãmy_func(5)ãåŒã³åºããšãåã®äžè²«æ§ããªããããšã©ãŒãçºçããå¯èœæ§ããããŸãããã®åé¡ã解決ããã«ã¯ãé¢æ°ã®æ»ãå€ã®åãæ瀺çã«æå®ããããé¢æ°ãåèšèšããŠåã®äžè²«æ§ã確ä¿ããå¿
èŠããããŸãã
å€éãã£ã¹ããã(Multiple Dispatch)ã¯ãããã°ã©ãã³ã°èšèªã«ãããŠãé¢æ°ã®æ¯ãèããåŒæ°ã®åãåæ°ã«ãã£ãŠåçã«æ±ºå®ããæ©èœã§ããéåžžã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã§ã¯ãã¡ãœããã®åŒã³åºãã¯äžè¬çã«ã¬ã·ãŒã(ãªããžã§ã¯ã)ã®åã«åºã¥ããŠè¡ãããŸãããå€éãã£ã¹ãããã§ã¯ãåŒæ°ã®åãåæ°ã«åºã¥ããŠã¡ãœããã®åŒã³åºãã解決ããŸãã
Juliaã®å€éãã£ã¹ãããã¯ãé¢æ°ãè€æ°ã®ã·ã°ããã£(åŒæ°ã®åãšåæ°ã®çµã¿åãã)ãæã¡ãå®è¡æã«æé©ãªã·ã°ããã£ãéžæããããšããä»çµã¿ã§ããããã«ãããåãé¢æ°åã䜿çšããŠç°ãªãåŒæ°åã«å¯Ÿå¿ããè€æ°ã®å®è£
ãå®çŸ©ããããšãã§ããŸããããã«ãæ°ããåãå®çŸ©ãããšãã«æ¢åã®é¢æ°ã«å¯ŸããŠæ°ããå®è£
ãè¿œå ããããšã容æã§ãã
å€éãã£ã¹ãããã¯ãéçãªåä»ãèšèªãåçãªåä»ãèšèªã®äž¡æ¹ã§å©çšãããŸãããJuliaã®ãããªåçåä»ãèšèªã§ã¯ç¹ã«åŒ·åãªæ©èœãšããŠæŽ»çšãããŠããŸããå€éãã£ã¹ãããã«ãããæè»æ§ãšå¹çæ§ãäž¡ç«ãããªãããè€éãªããã°ã©ã ã®èšè¿°ãæ¡åŒµã容æã«ãªããŸãã
以äžã¯ãJuliaã§ã®å€éãã£ã¹ãããã®ã³ãŒãäŸã§ãã
ãã®äŸã§ã¯ãadd é¢æ°ãæŽæ°åãæµ®åå°æ°ç¹æ°åãæåååã®åŒæ°ãåãåããããããã®åã«å¯Ÿå¿ããæ¯ãèããå®çŸ©ããŠããŸããé¢æ°ãåŒã³åºãéã«ã¯ãåŒæ°ã®åã«å¿ããŠé©åãªå®è£
ãéžæãããŸãã
å€éãã£ã¹ãããã¯ä»ã®ããã°ã©ãã³ã°èšèªã§ã¯ãå€éå®çŸ©(Overloading)ãããã¯å€æ
æ§(Polymorphism)ãšãèšãããŸãã
å¯å€åŒæ°ã¯ãé¢æ°ã«å¯å€é·ã®åŒæ°ãæž¡ãããã®ä»çµã¿ã§ããJuliaã§ã¯ãé¢æ°ã®åŒæ°ã®æåŸã«äžç¹ãªãŒããŒ(...)ã䜿ã£ãŠå¯å€åŒæ°ãæå®ããŸããããã«ãããé¢æ°åŒã³åºãæã«ä»»æã®æ°ã®åŒæ°ãæž¡ãããšãã§ããŸãã
以äžã¯ãå¯å€åŒæ°ãæã€é¢æ°ã®äŸã§ãã
ãã®äŸã§ã¯ãsum_valuesé¢æ°ã¯æåã®åŒæ° x ãšå¯å€é·ã®åŒæ° y ãåãåãããããã®å€ãåèšããŠè¿ããŸããy ã®éšåã«ã¯ä»»æã®æ°ã®åŒæ°ãæž¡ãããããšãã§ããŸãã
å€å€è¿ãã¯ãé¢æ°ãè€æ°ã®å€ãè¿ãããšãæå³ããŸããJuliaã§ã¯ãã¿ãã«ã䜿çšããŠè€æ°ã®å€ããŸãšããŠè¿ãããšãã§ããŸãã以äžã¯ãå€å€è¿ãã®äŸã§ãã
ãã®äŸã§ã¯ãdivide_remainderé¢æ°ã2ã€ã®æŽæ°ãåãåããåãšäœããèšç®ããŠã¿ãã«ãšããŠè¿ããŸããé¢æ°ãåŒã³åºããåŸãã¿ãã«ã®èŠçŽ ã«ã¯ã€ã³ããã¯ã¹ã䜿çšããŠã¢ã¯ã»ã¹ã§ããŸãã
Juliaã§ã¯ãé¢æ°åŒã³åºãæã«é
åãå±éããŠãè€æ°ã®åŒæ°ãšããŠæž¡ãããšãã§ããŸããããã«ãããé¢æ°ãå¯å€æ°ã®åŒæ°ãåãå Žåããè€æ°ã®èŠçŽ ããŸãšããŠé¢æ°ã«æž¡ãå Žåã«äŸ¿å©ã§ãã以äžã¯ãé
åå±éã䜿çšããé¢æ°åŒã³åºãã®äŸã§ãã
ãã®äŸã§ã¯ãsum_of_three_numbersé¢æ°ã3ã€ã®åŒæ°ãåãããããã®å€ã®åèšãè¿ããŸããargsãšããé
åãå®çŸ©ãããã®é
åã...ã䜿ã£ãŠé¢æ°åŒã³åºãæã«å±éããŠããŸããããã«ãããé
åã®åèŠçŽ ãåå¥ã®åŒæ°ãšããŠé¢æ°ã«æž¡ãããŸãã
ç¡åé¢æ°(Anonymous Function)ã¯ãååãæããªãé¢æ°ã®ããšã§ããéåžžãé¢æ°ãå®çŸ©ããéã«ã¯ååãæå®ãããŸãããç¡åé¢æ°ã¯ååããªãããã®å Žã§å®çŸ©ãããŸããç¡åé¢æ°ã¯ãäžè¬çã«ä»ã®é¢æ°ã®åŒæ°ãšããŠæž¡ãããããé«éé¢æ°å
ã§äœ¿çšããããããŸããJuliaã§ã¯ãç¡åé¢æ°ã¯functionããŒã¯ãŒãã䜿çšããã«ãç°¡æœã«è¡šçŸããããšãã§ããŸããäŸãã°ãx -> x^2ãšããåŒã¯ãåŒæ°xã«å¯ŸããŠxã®äºä¹ãè¿ãç¡åé¢æ°ãè¡šããŸãã
以äžã¯ãJuliaã§ç¡åé¢æ°ã䜿çšããã³ãŒãäŸã§ãã
Juliaã§ã¯ãç¡åé¢æ°ãå®çŸ©ããŠããã«å®è¡ããããšãã§ããŸãããããå³æé¢æ°ãšåŒã³ãŸãã以äžã¯ãã®äŸã§ãã
ãã®ã³ãŒãã§ã¯ã(x -> x^2)ãç¡åé¢æ°ã§ããããã®åŸã®(5)ã§ãã®ç¡åé¢æ°ãããã«å®è¡ãããŠããŸãããã®çµæãresultã«ã¯5^2ã§ãã25ã代å
¥ãããŸãã
Juliaã§ã¯ãç¡åé¢æ°ãã©ã ãåŒãŸãã¯å¿åé¢æ°ãšåŒã³ãŸãããã®ãããäžèšã®äŸã¯ã©ã ãåŒã䜿ã£ãŠç¡åé¢æ°ãå®çŸ©ããå³æã«å®è¡ããŠããŸãã
Juliaã«ãããdoãããã¯ã¯ãé¢æ°ããã¯ãã®åŒã³åºãæã«ããã®é¢æ°ããã¯ãã«å¯ŸããŠãããã¯ãæž¡ãããã®æ§æã§ããéåžžãé¢æ°ããã¯ãã«å¯ŸããŠ1ã€ä»¥äžã®åŒãæž¡ãå¿
èŠãããå Žåã«äœ¿çšãããŸããdoãããã¯ã¯ãé¢æ°åããã°ã©ãã³ã°ãã³ãŒã«ããã¯é¢æ°ã®å®çŸ©ãªã©ã®å Žé¢ã§ãã䜿çšãããŸãã
å
·äœçã«ã¯ã以äžã®ãããªåœ¢åŒã§äœ¿çšãããŸã:
ãŸãã¯ããã¯ãã®å Žå:
doãããã¯å
ã«ã¯ãä»»æã®ã³ãŒããå«ãŸããããšãã§ããŸãããã®ãããã¯å
ã®ã³ãŒãã¯ãé¢æ°ããã¯ãã®æ¬äœå
ã§åç
§ãããããšããããŸããdoãããã¯ã¯ãé¢æ°ã®åŒæ°ãšããŠæž¡ãããšãã§ããç¡åé¢æ°ãã¯ããŒãžã£ãå®çŸ©ããã®ã«äŸ¿å©ã§ãã
doãããã¯ã¯ãã€ãã¬ãŒã¿ããžã§ãã¬ãŒã¿ãšçµã¿åãããŠäœ¿çšãããããšããããããŸãã ãã®å Žåãdoãããã¯å
ã®ã³ãŒãã¯ãã€ãã¬ãŒã·ã§ã³äžã«å®è¡ãããåŠçãå®çŸ©ããŸãã
äŸãã°ã次ã®ã³ãŒãã¯é
åã®åèŠçŽ ã2åã«ããäŸã§ãã
ãã®äŸã§ã¯ãmapé¢æ°ã«doãããã¯ã䜿çšããŠãåèŠçŽ ã2åã«ããç¡åã®é¢æ°ãå®çŸ©ããŠããŸãããã®ç¡åã®é¢æ°ã¯ãxãšããåŒæ°ãåãããã®åŒæ°ã2åã«ããŠè¿ããŸããmapé¢æ°ã¯ãã®ç¡åã®é¢æ°ãé
åã®åèŠçŽ ã«é©çšããçµæãresultå€æ°ã«æ ŒçŽããŸãã
doãããã¯ã䜿çšããããšã§ãã³ãŒããããç°¡æœã§èªã¿ããããªããé¢æ°ãããæè»ã«äœ¿çšããããšãã§ããŸãã
Juliaã§ã¯doãããã¯ã䜿çšããŠãæè»ã§æ¡åŒµå¯èœãªã³ãŒããæžãããšãã§ããŸãã
ã³ãŒããããã¯ã¯ãããã°ã©ã å
ã§è€æ°ã®æããŸãšããŠå®è¡ããããã®æ§é ã§ããJuliaã§ã¯ãbeginããŒã¯ãŒããšendããŒã¯ãŒãã§å²ãã éšåãã³ãŒããããã¯ãšãªããŸããããã«ãããè€æ°ã®æã1ã€ã®ãŸãšãŸããšããŠæ±ãããšãã§ããŸããã³ãŒããããã¯ã®æåŸã®åŒã®å€ãããã®ãããã¯å
šäœã®å€ãšãªããŸããã³ãŒããããã¯ã¯ãé¢æ°ã®äžã§ã®ã¿äœ¿çšããã®ã§ã¯ãªããä»»æã®ã¹ã³ãŒãå
ã§äœ¿çšããããšãã§ããŸãã
以äžã¯ãJuliaã§ã®ã³ãŒããããã¯ã®äœ¿çšäŸã§ãã
ãããã®äŸã§ã¯ãbeginããŒã¯ãŒããšendããŒã¯ãŒãããŸãã¯ã«ãã³ã§ããã£ãéšåãã³ãŒããããã¯ãšããŠæ©èœãããã®äžã«è€æ°ã®æãå«ãŸããŠããŸããæåŸã®åŒã§ããx + yã®çµæãããããã®ã³ãŒããããã¯å
šäœã®å€ãšãªããŸãã
é«éé¢æ°ãšã¯ãä»ã®é¢æ°ãåŒæ°ãšããŠåãåããããŸãã¯é¢æ°ãæ»ãå€ãšããŠè¿ãé¢æ°ã®ããšã§ããå
·äœçã«ã¯ãmapãreduceãfilter ãªã©ã®é¢æ°ããã®ä»£è¡šçãªäŸã§ãã
ãããã®é¢æ°ã¯ãã³ãŒãã®ç°¡æœããšå¯èªæ§ãåäžãããåããããªæäœãç¹°ãè¿ãå®è¡ããå¿
èŠæ§ã軜æžããŸãã
å
å
è¡šèšã䜿çšããŠåãããžãã¯ãè¡šçŸããããšãã§ããŸãã以äžã«ãmapãfilterãreduce ãããããå
å
è¡šèšã§å®è£
ããäŸã瀺ããŸãã
å
å
è¡šèšã¯ãé¢æ°ã®åŒã³åºããæžãããã³ãŒããããç°¡æœã«ããã®ã«åœ¹ç«ã¡ãŸãããã®ãããªæ©èœã¯ãJuliaã®æè»æ§ãšè¡šçŸåã®äžéšã§ãããããç°¡æœãªã³ãŒããæžãããã®åŒ·åãªããŒã«ãšãªããŸãã
ååž°çåŒã³åºãã¯ãé¢æ°ãèªåèªèº«ãåŒã³åºãããšãæããŸããããã¯åé¡ã解ãã®ã«éåžžã«åŒ·åãªææ³ã§ãããç¹ã«åé¡ãååž°çãªæ§è³ªãæã€å Žåã«æçšã§ããJuliaã§ã¯ãååž°çåŒã³åºãã¯éåžžã®é¢æ°åŒã³åºããšåãããã«è¡ãããŸãããé©åãªçµäºæ¡ä»¶ãèšå®ããããšãéèŠã§ããå
žåçãªäŸãšããŠã¯ãéä¹ã®èšç®ãååž°çãªããŒã¿æ§é ã®æäœããããŸãã
ãã®äŸã§ã¯ãfactorialé¢æ°ãèªåèªèº«ãåŒã³åºããŠããŸããçµäºæ¡ä»¶ãšããŠãnã0ãŸãã¯1ã®å Žåã«ã¯1ãè¿ãããã以å€ã®å Žåã«ã¯nãšfactorial(n - 1)ã®ç©ãè¿ããŸããããã«ããã5ã®éä¹ãèšç®ãããŸãã
æ«å°Ÿååž°(tail recursion)ã¯ãååž°é¢æ°ãèªå·±åŒã³åºãã®æåŸã®æäœãšããŠååž°ãè¡ã圢åŒãæããŸããæ«å°Ÿååž°ã®ç¹åŸŽã¯ãååž°åŒã³åºããé¢æ°ã®æåŸã«äœçœ®ãããããæ°ããã¹ã¿ãã¯ãã¬ãŒã ãçæãããããšãªããååž°ã®å¹çãåäžããããšã§ããããã«ãããååž°ãæ·±ããªã£ãŠãã¹ã¿ãã¯ãªãŒããŒãããŒã®ãªã¹ã¯ã軜æžãããŸãã
Juliaã§ã¯ãæ«å°Ÿååž°æé©åãå¯èœã§ãããååž°é¢æ°ãæ«å°Ÿååž°ã®åœ¢åŒã§ããã°ãæé©åãèªåçã«é©çšãããŸããã€ãŸããæ«å°Ÿååž°ã䜿ã£ãé¢æ°ã¯ãéåžžã«å€§ããªå
¥åã«å¯ŸããŠãå¹ççã«åäœããŸãã
ãã®äŸã§ã¯ãfactorialé¢æ°ãæ«å°Ÿååž°ã®åœ¢åŒã§å®è£
ãããŠããŸããååž°åŒã³åºããé¢æ°ã®æåŸã®æäœãšããŠè¡ãããŠãããæé©åãããããŒãžã§ã³ã®æ«å°Ÿååž°ãšããŠå®è¡ãããŸãã
ã¯ããŒãžã£ã¯ãé¢æ°ãšãã®é¢æ°ãåç
§ããç°å¢(å€æ°ãé¢æ°ãªã©)ãå
ã¿èŸŒãã ãã®ã§ããããã«ãããå€éšå€æ°ãå€éšé¢æ°ãå
éšã®é¢æ°ãå©çšã§ããããã«ãªããŸããã¯ããŒãžã£ã¯ãç¹å®ã®ç¶æ
ãä¿æãããããå©çšããŠåäœããé¢æ°ãå®çŸ©ããå Žåã«äŸ¿å©ã§ãã
ãã®äŸã§ã¯ãmake_multiplieré¢æ°ãã¯ããŒãžã£ãçæããŸããmake_multiplieré¢æ°ã¯ãxãåŒæ°ãšããŠåãåããç¡åé¢æ°y -> x * yãè¿ããŸãããã®ç¡åé¢æ°ã¯å€éšã®å€æ°xãåç
§ããŠããããã®å€ãä¿æããŠããŸããmake_multiplier(5)ãè¿ãé¢æ°ãmul_by_5ã«å²ãåœãŠãŠåŒã³åºãããšã§ãå€éšå€æ°xã®å€ã5ã§ããã¯ããŒãžã£ãäœæãããåŒæ°ã«æž¡ãããå€ãšã®ä¹ç®ãè¡ãããŸãã
ã«ãªãŒå(currying)ã¯ãè€æ°ã®åŒæ°ãæã€é¢æ°ãã1ã€ã®åŒæ°ãåãåãé¢æ°ã®é£éã«å€æããããã»ã¹ã§ããå
·äœçã«ã¯ãè€æ°ã®åŒæ°ãæã€é¢æ°ãéšåé©çšããŠæ°ããé¢æ°ãçæããããšã§ã1ã€ã®åŒæ°ãåãåãé¢æ°ã«å€æããŸãã
ãã®äŸã§ã¯ãaddé¢æ°ã2ã€ã®åŒæ°ãåãåãé¢æ°ã§ããcurried_addé¢æ°ã¯ãaddé¢æ°ãã«ãªãŒåããŠ1ã€ã®åŒæ°ãåãåãé¢æ°ãè¿ããŸãããã®ã«ãªãŒåãããé¢æ°ã䜿ã£ãŠãæ°ããé¢æ°add_fiveãçæããããã«åŒæ°3ãäžããŠåŒã³åºãããšã§ãæçµçãªçµæãåŸãŸãã
ãžã§ããªãã¯é¢æ°ã¯ãè€æ°ã®ããŒã¿åã«å¯ŸããŠåãååã®é¢æ°ãå®çŸ©ããããããã®ããŒã¿åã«å¿ããåäœãè¡ãä»çµã¿ã§ããããã«ãããåã«äŸåããªãæ±çšçãªé¢æ°ãäœæããããšãã§ããŸããJuliaã§ã¯ãé¢æ°ã®å€éãã£ã¹ããããå©çšããŠãžã§ããªãã¯é¢æ°ãå®çŸ©ããŸãã
ãã®äŸã§ã¯ãmyfuncãšããååã®ãžã§ããªãã¯é¢æ°ãå®çŸ©ãããŠããŸãããã®é¢æ°ã¯ãæŽæ°åãšæµ®åå°æ°ç¹æ°åã®åŒæ°ãåã2ã€ã®ããŒãžã§ã³ããããŸããåŒæ°ã®åã«å¿ããŠãé©åãªé¢æ°ãåŒã³åºãããŸãã
Juliaã®å Žåãåã¢ãããŒã·ã§ã³ãæ瀺çã«è¡ãããšãå°ãªãã®ã§ãç¡èªèŠã«ãžã§ããªãã¯é¢æ°ãå®çŸ©ããŠããããšãå€ãã§ãã
ãžã§ãã¬ãŒã¿(Generators)ã¯ãé
延è©äŸ¡ãå©çšããŠèŠçŽ ãåçã«çæããããã®æ©èœã§ãããžã§ãã¬ãŒã¿ã¯ãéåžžã®é¢æ°ãšåæ§ã«å®çŸ©ãããŸãããyieldããŒã¯ãŒãã䜿çšããŠèŠçŽ ãçæããŸãããžã§ãã¬ãŒã¿ã¯ãäžåºŠã«ãã¹ãŠã®èŠçŽ ãçæãããå¿
èŠã«å¿ããŠèŠçŽ ãçæããŸããããã«ããã倧èŠæš¡ãªããŒã¿ã»ãããå¹ççã«åŠçããããšãã§ããŸãã
以äžã¯ããžã§ãã¬ãŒã¿ã®åºæ¬çãªäŸã§ã:
ãã®äŸã§ã¯ãmygeneratoré¢æ°ããžã§ãã¬ãŒã¿ãå®çŸ©ãã1ãã5ãŸã§ã®æ°å€ãé çªã«è¿ããŸãããžã§ãã¬ãŒã¿ã¯ãforã«ãŒããªã©ã®ã€ãã¬ãŒã·ã§ã³æ§é ã§äœ¿çšãããããšãäžè¬çã§ãããžã§ãã¬ãŒã¿ã¯é
延è©äŸ¡ãè¡ãããã倧èŠæš¡ãªããŒã¿ã»ãããæ±ãéã«éåžžã«äŸ¿å©ã§ãã
Juliaã®ã€ãã¬ãŒã¿(Iterators)ã¯ãããŒã¿ã®ã·ãŒã±ã³ã¹ãå埩åŠçããããã®æ©èœã§ããã€ãã¬ãŒã¿ã¯ãç¹å®ã®ããŒã¿æ§é (é
åãç¯å²ãã³ã¬ã¯ã·ã§ã³ãªã©)ã®èŠçŽ ã«é çªã«ã¢ã¯ã»ã¹ããæ¹æ³ãæäŸããŸããããã«ããã倧ããªããŒã¿ã»ãããç¡éã®ã·ãŒã±ã³ã¹ãå¹ççã«æ±ãããšãã§ããŸãã
Juliaã®ã€ãã¬ãŒã¿ã¯ãé
延è©äŸ¡(Lazy evaluation)ã®æŠå¿µãå©çšããŠãããã€ãã¬ãŒã·ã§ã³ãå¿
èŠãªæç¹ã§ã®ã¿èŠçŽ ãèšç®ãããŸããããã«ãããã¡ã¢ãªãèšç®ãªãœãŒã¹ãç¯çŽãã€ã€ãå¿
èŠãªèŠçŽ ã«é çªã«ã¢ã¯ã»ã¹ã§ããŸãã
ããŸããŸãªã€ãã¬ãŒã¿é¢æ°ãæäŸãããŠãããããããçµã¿åãããããšã§ãããŒã¿ã®ãã£ã«ã¿ãªã³ã°ãååãéçŽãçµåãªã©ã®æäœãæè»ã«å®è¡ã§ããŸããã€ãã¬ãŒã¿ã¯ãJuliaã®ã³ãŒããããå¹ççãã€ç°¡æœã«ããããã®éèŠãªèŠçŽ ã§ãã
ãã®ã³ãŒãã¯ãJuliaã§çŽ æ°ãå€å®ããé¢æ° is_prime ãšãçŽ æ°ãè¿ãã€ãã¬ãŒã¿ PrimeIter ãå®çŸ©ããŠããŸãã以äžã«ãããããã®éšåã®è§£èª¬ãè¡ããŸãã
ãã®ã³ãŒããå®è¡ãããšã2ãã7ãŸã§ã®çŽ æ°ãé çªã«åºåãããŸãã
ãã¡ã€ã«ã®èªã¿æžããã¢ãžã¥ãŒã«ã®äœæã»äœ¿çšæ¹æ³ãåŠã³ãŸããå€éšãã¡ã€ã«ããããŒã¿ãèªã¿èŸŒãã ããçµæããã¡ã€ã«ã«æžãåºãããããããšã¯ãå®éã®ããã°ã©ãã³ã°ã§éåžžã«éèŠã§ãããŸããã¢ãžã¥ãŒã«ã䜿çšããããšã§ãé¢é£ããé¢æ°ãåããŸãšããŠå¹æçã«ç®¡çããåå©çšå¯èœãªã³ãŒããäœæããããšãã§ããŸãã
Juliaã§ãã¡ã€ã«ã®å
¥åºåãè¡ãããã«ã¯ãæšæºã®ãã¡ã€ã«æäœé¢æ°ãããã±ãŒãžã䜿çšããŸãã以äžã«ãåºæ¬çãªãã¡ã€ã«ã®èªã¿æžãæäœã®æ¹æ³ã瀺ããŸãã
ãããã¯ãJuliaã§ãã¡ã€ã«ã®å
¥åºåãè¡ãåºæ¬çãªæ¹æ³ã®äžéšã§ãã ãã¡ã€ã«ã®èªã¿èŸŒã¿ãæžã蟌ã¿æäœãè¡ãéã«ã¯ãé©åãªãšã©ãŒãã³ããªã³ã°ãè¡ãããšãéèŠã§ãã
Juliaã®ãã¡ã€ã«I/Oã¯ãããŸããŸãªãŠãŒã¹ã±ãŒã¹ã§æŽ»çšãããŸãã以äžã«ãäžè¬çãªãŠãŒã¹ã±ãŒã¹ã®äŸã瀺ããŸãã
ãããã®ãŠãŒã¹ã±ãŒã¹ã¯ãJuliaã®ãã¡ã€ã«I/Oæ©èœãåºã掻çšãããŠããäŸã§ããJuliaã®æè»ãªãã¡ã€ã«I/Oæ©èœã掻çšããããšã§ãããŸããŸãªããŒã¿åŠçããã¡ã€ã«æäœãå¹ççã«è¡ãããšãã§ããŸãã
Juliaã§ãã¡ã€ã«ã®å
¥åºå(I/O)ãè¡ãéã®ãã¹ããã©ã¯ãã£ã¹ã«ã¯ã以äžã®ãããªãã®ããããŸãã
ãããã®ãã¹ããã©ã¯ãã£ã¹ã«åŸãããšã§ãJuliaã§ã®ãã¡ã€ã«ã®å
¥åºåæäœãããå®å
šã§å¹ççã«è¡ãããšãã§ããŸãã
Juliaã®ã¢ãžã¥ãŒã«ã¯ãã³ãŒãããŸãšããŠç®¡çããããã®æ©æ§ã§ãã以äžã¯ãJuliaã®ã¢ãžã¥ãŒã«ã«é¢ããäž»ãªãã€ã³ãã§ã:
Juliaã®åå空é管çã«ã¯ã修食åããšã¯ã¹ããŒããªã¹ããç¹å®ã®èå¥åã®ã€ã³ããŒãããšã¯ã¹ããŒããªã©ã®æŠå¿µãå«ãŸããŸã:
Juliaã®ã¢ãžã¥ãŒã«ã·ã¹ãã ã¯ãæè»æ§ããããå¹æçãªåå空é管çæ©èœãæäŸããŠããŸãã
Juliaã§ã®ã¢ãžã¥ãŒã«ã®å®çŸ©ãšäœ¿çšã®äŸã瀺ããŸãã
ãã®äŸã§ã¯ãMyModule ãšããååã®ã¢ãžã¥ãŒã«ãå®çŸ©ãããã®äžã§ my_function ãšããé¢æ°ãå®çŸ©ããŠããŸãããã®åŸãusing .MyModule ã䜿ã£ãŠã¢ãžã¥ãŒã«ãããŒãããMyModule.my_function ãåŒã³åºããŠããŸãã
Juliaã§ã¯ãé¢æ°ãã¢ãžã¥ãŒã«ã®ããã¥ã¡ã³ããèšè¿°ããããã«ãããã¥ã¡ã³ãæåå(docstrings)ã䜿çšããŸãã ãããã®docstringsã¯ãé¢æ°ãã¢ãžã¥ãŒã«ã®å
é ã«é
眮ãããé¢æ°ã®æ©èœãåŒæ°ãè¿ãå€ã䜿çšäŸãªã©ã説æããŸãã
以äžã¯ãJuliaã®ããã¥ã¡ã³ãã®äŸã§ãã
ãã®äŸã§ã¯ãMyModule ãšããååã®ã¢ãžã¥ãŒã«ãå®çŸ©ãããã®äžã§ my_function ãšããé¢æ°ãå®çŸ©ããŠããŸãããã®åŸãusing .MyModule ã䜿ã£ãŠã¢ãžã¥ãŒã«ãããŒããããã®ããã«ããŠãé¢æ°ã®å®çŸ©ã®çŽåã«ã3é£ã®ããã«ã¯ã©ãŒãã§å²ãŸããããã¥ã¡ã³ãæååãèšè¿°ããŸããããã«ãããé¢æ°addã®äœ¿ãæ¹ãæ©èœãæ確ã«èª¬æãããŸãã
ããã¥ã¡ã³ãæååã¯ãMarkdownãLaTeXã®äžéšã®æžåŒããµããŒãããããèŠããããèªã¿ãããããã¥ã¡ã³ããæäŸããŸããJuliaã®REPLããã«ãã·ã¹ãã ã¯ããããã®ããã¥ã¡ã³ãæååã䜿çšããŠé¢æ°ãã¢ãžã¥ãŒã«ã®ããã¥ã¡ã³ãã衚瀺ããŸãã
Documenter.jlã¯ãJuliaã®ããã¥ã¡ã³ãäœæã®ããã®ããŒã«ã§ããMarkdownãã¡ã€ã«ãšJuliaã®ã€ã³ã©ã€ã³docstringsãçµã¿åãããŠã1ã€ã®çžäºã«ãªã³ã¯ãããããã¥ã¡ã³ãã«ãŸãšããŸãã
Juliaã®ããã±ãŒãžãããŒãžã£ãŒã䜿çšããŠDocumenter.jlãã€ã³ã¹ããŒã«ããŸãã
DocumenterãæåŸ
ããåºæ¬æ§é ãçæããããã«ãDocumenterToolsããã±ãŒãžã®DocumenterTools.generateé¢æ°ã䜿çšã§ããŸãã
ãŸããããã¥ã¡ã³ãåããJuliaã¢ãžã¥ãŒã«ãå¿
èŠã§ããããã¯ãPkgDev.generateã§çæãããããã±ãŒãžãŸãã¯Juliaã®LOAD_PATHã§ã¢ã¯ã»ã¹å¯èœãªåäžã®.jlã¹ã¯ãªããã§ããå¿
èŠããããŸãããã®ã¬ã€ãã§ã¯ã次ã®ãã£ã¬ã¯ããªã¬ã€ã¢ãŠããæã€Example.jlãšããããã±ãŒãžã䜿çšããŸãã
ããã¥ã¡ã³ããæ ŒçŽããå Žæã決å®ããå¿
èŠããããŸãããã®ããã±ãŒãžã®ãããã¬ãã«ã«docs/ãšããååã®ãã©ã«ããŒã䜿çšããããšãæšå¥šãããŸãã
docs/ãã©ã«ããŒå
ã«ã¯ã2ã€ã®èŠçŽ ãè¿œå ããå¿
èŠããããŸããMarkdownãã¡ã€ã«ãå«ãŸããå®æããããã¥ã¡ã³ãã®æ§ç¯ã«äœ¿çšãããJuliaã¹ã¯ãªããã§ãã
docs/ãã£ã¬ã¯ããªãã»ããã¢ãããããã®ã§ãæåã®ããã¥ã¡ã³ãããã«ãããŸãããã®æç¹ã§ã¯åäžã®ç©ºã®ãã¡ã€ã«ã§ãããåŸã§è¿œå ããŠãããŸãã
make.jlãã¡ã€ã«ã«ä»¥äžãè¿œå ããŸãã
ããã«ãããDocumenterãã€ã³ã¹ããŒã«ãããŠããããšãšãExample.jlããã±ãŒãžãJuliaã«ãã£ãŠèŠã€ããããšãåæãšãªããŸãã
次ã«ãsrc/ãã£ã¬ã¯ããªã«index.mdãã¡ã€ã«ãè¿œå ããŸãã
ãã®åŸãdocs/ãã£ã¬ã¯ããªãã次ã®ã³ãã³ããå®è¡ããŸãã
ããã«ãããbuild/ãã£ã¬ã¯ããªãçæãããŸãã
次ã«ãExampleã¢ãžã¥ãŒã«ã§å®çŸ©ãããããã¥ã¡ã³ãæååãindex.mdãã¡ã€ã«ã«çµã¿èŸŒã¿ãŸãã
src/index.mdãã¡ã€ã«ã«æ¬¡ãè¿œå ããŸãã
make.jlãã¡ã€ã«ãåå®è¡ãããšãbuild/index.mdã«Example.func(x)ã®ããã¥ã¡ã³ãæååã衚瀺ãããã¯ãã§ãã
DataFrames.jlãPlots.jlãªã©ã®ããã±ãŒãžã䜿ã£ãŠããŒã¿è§£æãå¯èŠåãè¡ãæ¹æ³ãåŠã³ãŸããããŒã¿è§£æãšå¯èŠåã¯Juliaã®åŒ·åãªæ©èœã®äžã€ã§ããããããã®ããã±ãŒãžã䜿çšããããšã§ããŒã¿ãå¹æçã«åæããå¯èŠåããããšãã§ããŸããããŒã¿ã®ãã¿ãŒã³ããã¬ã³ããçºèŠããæŽå¯ãåŸãããã«å¿
èŠãªã¹ãã«ã身ã«ã€ããŸãããã
Juliaã®ããã±ãŒãžã¯ãJuliaããã°ã©ãã³ã°èšèªã®æ©èœãæ©èœæ¡åŒµãæäŸããããã®ã³ãŒãããªãœãŒã¹ã®éåäœã§ãããããã®ããã±ãŒãžã¯ãJuliaã®æ©èœãæ¡åŒµããç¹å®ã®ã¿ã¹ã¯ãã¢ããªã±ãŒã·ã§ã³ã®éçºãæ¯æŽããŸããJuliaã®ããã±ãŒãžã¯ãé¢æ°ãåãã¢ãžã¥ãŒã«ãããŒã¿ã»ãããããã°ã©ã ãããã³ãã®ä»ã®ãªãœãŒã¹ãæäŸããããšããããŸãã
äžè¬çãªçšéã«ã¯ãããŒã¿è§£æãæ©æ¢°åŠç¿ãç§åŠèšç®ãã°ã©ãã£ã«ã«ãŠãŒã¶ãŒã€ã³ã¿ãŒãã§ã€ã¹(GUI)ããŠã§ãã¢ããªã±ãŒã·ã§ã³éçºãªã©ãå«ãŸããŸãããããã®ããã±ãŒãžã¯ãJuliaã®è±å¯ãªãšã³ã·ã¹ãã ã®äžéšã§ãããã³ãã¥ããã£ã«ãã£ãŠéçºã管çãããŠããŸãã
Juliaã®ããã±ãŒãžç®¡çã·ã¹ãã ã§ããPkgã䜿çšããããšã§ãJuliaã®æ©èœãæ¡åŒµããããã®ããã±ãŒãžã®ã€ã³ã¹ããŒã«ã管çãè¡ãããšãã§ããŸããããã±ãŒãžã¯ãããŸããŸãªã¿ã¹ã¯ãã¢ããªã±ãŒã·ã§ã³ã®éçºã«åœ¹ç«ã¡ãŸãããã®ã»ã¯ã·ã§ã³ã§ã¯ãPkgã䜿çšããŠããã±ãŒãžãå¹æçã«ç®¡çããæ¹æ³ã«ã€ããŠèª¬æããŸãã
æ°ããããã±ãŒãžãã€ã³ã¹ããŒã«ããã«ã¯ã以äžã®æé ã«åŸããŸãã
ã€ã³ã¹ããŒã«ãããŠããããã±ãŒãžãææ°ã®ããŒãžã§ã³ã«ã¢ããããŒãããã«ã¯ã以äžã®æé ã«åŸããŸãã
update ã³ãã³ããå
¥åããŠããã¹ãŠã®ããã±ãŒãžãã¢ããããŒãããŸãã
äžèŠãªããã±ãŒãžãåé€ããã«ã¯ã以äžã®æé ã«åŸããŸãã
rm PackageName ãå
¥åããŠãåé€ãããããã±ãŒãžãæå®ããŸãã
å©çšå¯èœãªããã±ãŒãžãæ€çŽ¢ããã«ã¯ã以äžã®æé ã«åŸããŸãã
search Keyword ãå
¥åããŠãããŒã¯ãŒãã«äžèŽããããã±ãŒãžãæ€çŽ¢ããŸãã
ã€ã³ã¹ããŒã«ãããŠããããã±ãŒãžã®æ
å ±ã衚瀺ããã«ã¯ã以äžã®æé ã«åŸããŸãã
status ã³ãã³ããå
¥åããŠãã€ã³ã¹ããŒã«ãããŠããããã±ãŒãžã®äžèŠ§ãšããããã®ããŒãžã§ã³ã衚瀺ããŸãã
ãããã®æäœãéããŠãJuliaã®ããã±ãŒãžãå¹æçã«ç®¡çãããããžã§ã¯ãã®éçºãåæ»ã«é²ããããšãã§ããŸãã Juliaã®ããã±ãŒãžãšã³ã·ã¹ãã ã¯éåžžã«è±å¯ã§ãããããŸããŸãªããŒãºã«å¯Ÿå¿ã§ããããã±ãŒãžãæäŸãããŠããŸãã
Juliaã®ããã±ãŒãžç®¡çã·ã¹ãã ã§ããPkgã¯ãREPL(Read-Eval-Print Loop)ã¢ãŒããæäŸããŠããŸãããã®ã¢ãŒãã§ã¯ãããã±ãŒãžã®ã€ã³ã¹ããŒã«ãæŽæ°ãåé€ãªã©ã®æäœãè¡ããŸãã以äžã«ãPkgã®äž»ãªã³ãã³ããšãã®æ©èœã瀺ããŸãã
ããã«ãããã±ãŒãžã¬ãžã¹ããªã«é¢é£ããã³ãã³ãããããŸãã
ãããã®ã³ãã³ãã䜿çšããŠãJuliaã®ããã±ãŒãžãå¹æçã«ç®¡çã§ããŸãã
?ãŸãã¯helpã³ãã³ãã¯ãå©çšå¯èœãªã³ãã³ããšããããã®ç°¡åãªèª¬æã衚瀺ããŸããããã¯ãPkgã®ã³ãã³ããç解ããããã®äŸ¿å©ãªæ¹æ³ã§ãã
以äžã«ã?ãŸãã¯helpã³ãã³ãã®äœ¿çšæ¹æ³ã瀺ããŸãã
ãã®ããã«ããŠã?ãŸãã¯helpã³ãã³ãã䜿çšããããšã§ãPkgã®ã³ãã³ããå¹æçã«ç解ããå©çšã§ããŸãã
é«åºŠãªããŒã¿æ§é ãšã¢ã«ãŽãªãºã ã¯ãè€éãªåé¡ã解決ããããã®äžå¯æ¬ ãªããŒã«ã§ããã°ã©ããæšæ§é ãããŒããªã©ã®ããŒã¿æ§é ã¯ãããŒã¿ã®çµç¹åãšå¹ççãªæäœãå¯èœã«ããæ§ã
ãªã¢ããªã±ãŒã·ã§ã³ãåéã§åºã掻çšãããŠããŸããJuliaã®æè»ãªèšèªæ©èœã掻çšããŠããããã®ããŒã¿æ§é ãšã¢ã«ãŽãªãºã ãå®è£
ããåé¡ãå¹ççã«è§£æ±ºããæ¹æ³ãåŠã³ãŸãããã
ã°ã©ãã¯ãé ç¹(ããŒã)ãšããããæ¥ç¶ãã蟺(ãšããž)ããæ§æãããããŒã¿æ§é ã§ããã°ã©ãã¯ãçŸå®äžçã®ããŸããŸãªãããã¯ãŒã¯ãé¢ä¿æ§ãã¢ãã«åããããã«åºã䜿çšãããŠããŸãããœãŒã·ã£ã«ãããã¯ãŒã¯ãçµè·¯èšç»ã亀éãããã¯ãŒã¯ãéä¿¡ãããã¯ãŒã¯ãªã©ãå€ãã®åé¡ãã°ã©ããšããŠè¡šçŸãããŸãã
ãããã®ã¢ã«ãŽãªãºã ãç解ããé©åãªåé¡ã«é©çšããããšã§ãå¹ççãªã°ã©ãã®æäœã解æãå¯èœã«ãªããŸãã
æšæ§é ã¯ãéå±€çãªããŒã¿ãè¡šçŸããããã®ããŒã¿æ§é ã§ãããã«ãŒãããŒãããå§ãŸããåããŒããæåããããŠãã圢ãããŠããŸããæšæ§é ã¯ãå€ãã®åéã§äœ¿çšãããéå±€çãªé¢ä¿æ§ãååž°çãªããŒã¿ã®è¡šçŸã«é©ããŠããŸãã代衚çãªçšéãšããŠã¯ããã¡ã€ã«ã·ã¹ãã ãããŒã¿ããŒã¹ã®çŽ¢åŒãååž°çãªã¢ã«ãŽãªãºã ã®å®è£
ãªã©ãæããããŸãã
芪ããŒããšåããŒã(Parent and Child Nodes): 芪ããŒãã¯ãçŽäžã«1ã€ä»¥äžã®åããŒããæã€ããŒãã§ããåããŒãã¯ã芪ããŒãã®äžã«é
眮ããããã®èŠªããŒãã«é¢é£ä»ããããŸãã
ãããã®æäœãç解ããé©åã«å®è£
ããããšã§ãæšæ§é ãå¹æçã«æŽ»çšããããšãã§ããŸãã
ããŒãã¯ãåªå
床ä»ããã¥ãŒãå®è£
ããããã®ããŒã¿æ§é ã§ãããæå°å€ãæ倧å€ãé«éã«ååŸããããšãã§ããŸããããŒãã¯ãåªå
床ä»ããã¥ãŒã®æäœãå¹ççã«è¡ãããã«èšèšãããŠããããã€ã¯ã¹ãã©æ³ãããŒããœãŒããªã©ã®ã¢ã«ãŽãªãºã ã§åºã䜿çšãããŠããŸãã
ããŒãã¯ã以äžã®æäœããµããŒãããŸãã
ããŒãã¯ãéåžžãé
åã䜿çšããŠå®è£
ãããŸããé
åã®ã€ã³ããã¯ã¹ã䜿çšããŠããŒãéã®èŠªåé¢ä¿ãè¡šçŸããèŠçŽ ã®æ¿å
¥ãåé€ãå¹ççã«è¡ãããŸããæå°ããŒãã®å Žåã芪ããŒãã®ã€ã³ããã¯ã¹ã i ãšãããšãå·Šã®åããŒãã®ã€ã³ããã¯ã¹ã¯ 2i + 1ãå³ã®åããŒãã®ã€ã³ããã¯ã¹ã¯ 2i + 2 ãšãªããŸãã
ããŒãã¯ãå¹ççãªåªå
床ä»ããã¥ãŒã®å®è£
ãšããŠåºã䜿çšãããå€ãã®ã¢ã«ãŽãªãºã ãããŒã¿æ§é ã«ãããŠéèŠãªåœ¹å²ãæãããŠããŸãã
ãããã®ããŒã¿æ§é ãç解ãããããããã䜿çšããããŸããŸãªã¢ã«ãŽãªãºã ãå®è£
ããããšãã§ããŸããäŸãã°ãã°ã©ãæ¢çŽ¢ã¢ã«ãŽãªãºã ãæççµè·¯æ¢çŽ¢ã¢ã«ãŽãªãºã ããœãŒãã¢ã«ãŽãªãºã ãªã©ããããŸãããããã®ã¢ã«ãŽãªãºã ã¯ãåé¡ã®æ§è³ªã«å¿ããŠé©åã«éžæãããå®è£
ãããå¿
èŠããããŸãã
ããã¯ãåºæ¬çãªäºåæšã®å®è£
ãšãããŒãã®æ¿å
¥ãšæ€çŽ¢ã®æ¹æ³ã瀺ããŠããŸãããããã®åºæ¬çãªããŒã¿æ§é ãšã¢ã«ãŽãªãºã ãç解ããããšã§ãããŸããŸãªåé¡ã解決ããããã®åºç€ãç¯ãããšãã§ããŸãã
Juliaã®äžŠååŠçæ©èœã掻çšããŠãåŠçã䞊ååããæ¹æ³ãåŠã³ãŸãã䞊ååŠçã¯ãèšç®ãé«éåãã倧èŠæš¡ãªåé¡ãå¹ççã«è§£æ±ºããããã®éèŠãªææ³ã§ãããŸããåæ£åŠçãéããŠè€æ°ã®èšç®è³æºãå¹æçã«æŽ»çšããæ¹æ³ãåŠã³ãŸãã
æ°å€èšç®ãæé©ååé¡ã解ãããã®ããã±ãŒãžã䜿çšããŠãæ°å€èšç®ãšæé©åã®æè¡ãåŠã³ãŸããæ°å€èšç®ã¯ç§åŠæè¡èšç®ããšã³ãžãã¢ãªã³ã°ãªã©ã®ããŸããŸãªåéã§éèŠãªåœ¹å²ãæãããŸãããŸããæé©åã¯åé¡ã®æé©ãªè§£ãèŠã€ããããã®éèŠãªææ³ã§ãã
Flux.jlãMLJ.jlãªã©ã®æ©æ¢°åŠç¿ã©ã€ãã©ãªã䜿çšããŠãæ©æ¢°åŠç¿ã¢ãã«ãå®è£
ããããŒã¿ã«å¯ŸããŠåŠç¿ãããæ¹æ³ãåŠã³ãŸããæ©æ¢°åŠç¿ã¯ããŒã¿è§£æãäºæž¬ã¢ããªã³ã°ãªã©ã®æ§ã
ãªã¿ã¹ã¯ã§å©çšãããçŸä»£ã®æè¡ãããžãã¹ã«ãããŠéèŠãªåœ¹å²ãæãããŠããŸããJuliaã®è±å¯ãªããã±ãŒãžã掻çšããŠãæ©æ¢°åŠç¿ã®ã¹ãã«ã磚ããŸãããã
ââââ
Juliaã®LinearAlgebraã¢ãžã¥ãŒã«ã¯ãç·åœ¢ä»£æ°ã®åºæ¬çãªæ©èœãæäŸããŠããŸããå
·äœçã«ã¯ããã¯ãã«ãè¡åã®æŒç®ãåºæå€ãåºæãã¯ãã«ã®èšç®ãçè¡åã®æäœãLUå解ãQRå解ãªã©ãå©çšå¯èœã§ãã
Juliaã®LinearAlgebraã¢ãžã¥ãŒã«ã§å®çŸ©ãããŠããäž»ãªé¢æ°ãšæŒç®åã¯ä»¥äžã®éãã§ãã
以äžã¯ãJuliaã®LinearAlgebraã¢ãžã¥ãŒã«ã䜿ã£ãåºæ¬çãªæäœäŸã§ãã
ãã®ã³ãŒãã§ã¯ããŸããã¯ãã« v1 ãš v2 ãå®çŸ©ããŠããŸãããã®åŸããã¯ãã«ã®ã¹ã«ã©ãŒåãå æ³ãæžæ³ãå
ç©ããã«ã ãèšç®ããçµæã衚瀺ããŠããŸãã
次ã«ãè¡å A ãå®çŸ©ããŠããŸãããã®è¡å㯠3x3 ã®æŽæ°è¡åã§ããã転眮ãéè¡åãè¡ååŒããã¯ãã«ãšã®ç©ãè¡åãšã®ç©ãèšç®ããŠããŸãããŸãã察è§è¡å D ãå®çŸ©ããŠããŸãã
ããã«ã察称è¡å S ãå®çŸ©ãããã®åºæå€ãšåºæãã¯ãã«ãèšç®ããŠããŸãã
æåŸã«ãæå°äºä¹æ³ã®æŒç®ãè¡ã£ãŠããŸããããã¯é£ç«æ¹çšåŒ Ax = b ã®è§£ x ãæ±ããæäœã§ãã
ãã®ããã«ãLinearAlgebraã¢ãžã¥ãŒã«ã¯ãæ°å€èšç®ã«ãããŠåºæ¬çãã€éèŠãªèŠçŽ ã§ãããã¯ãã«ãè¡åã®æ§ã
ãªæäœãæäŸããŠããŸãã
ãŸããå
ç©(ãããç©)ãèšç®ããæ¹æ³ã¯ä»¥äžã®éãã§ãã
LinearAlgebraã¢ãžã¥ãŒã«(ç·åœ¢ä»£æ°æŒç®ã¢ãžã¥ãŒã«)ã®èªã¿èŸŒã¿
å
ç©ã¯ãã¯ãã«ã®èŠçŽ å士ãæãåããããã®ã足ãåãããå€ãšãªããŸãã Juliaã§ã®å
ç©ã®èšç®ã¯ä»¥äžã®ããã«è¡ããŸãã
次ã«ãå€ç©ãèšç®ããæ¹æ³ã¯ä»¥äžã®éãã§ãã
å€ç©ã¯2ã€ã®ãã¯ãã«ããããã®ãã¯ãã«ã匵ãå¹³è¡å蟺圢ã®é¢ç©ãæ±ããããšã§èšç®ã§ããŸãã Juliaã§ã®å€ç©ã®èšç®ã¯ä»¥äžã®ããã«è¡ããŸãã
ãã ããå€ç©ã®çµæã¯ãã¯ãã«ã§ããããã®ãã¯ãã«ã匵ãå¹³è¡å蟺圢ã®é¢ç©ã«ãªã£ãŠããããã§ã¯ãããŸãããå€ç©ã®çµæã«çµ¶å¯Ÿå€ãåãããšã§å¹³è¡å蟺圢ã®é¢ç©ãæ±ããããšãã§ããŸãã
以äžããJuliaã䜿ã£ãŠå
ç©ãšå€ç©ãæ±ããæ¹æ³ã®ç°¡åãªè§£èª¬ã§ãã
ââââ
ã³ãŒãã®ããã©ãŒãã³ã¹ãåäžãããããã®ãã¯ããã¯ãæé©åææ³ãåŠã³ãŸããJuliaã¯é«éãªèšèªã§ããããããªãããã©ãŒãã³ã¹ã®åäžãæ±ããããå ŽåããããŸããå¹ççãªã¢ã«ãŽãªãºã ã®éžæãã¡ã¢ãªç®¡çã®æé©åã䞊ååŠçã®æŽ»çšãªã©ãæ§ã
ãªæ¹æ³ãåŠã³ãŸãã
Juliaã®ã¡ã¿ããã°ã©ãã³ã°æ©èœã䜿çšããŠãã³ãŒãçæãDSL(Domain Specific Language)ã®æ§ç¯ãªã©ãè¡ãæ¹æ³ãåŠã³ãŸããã¡ã¿ããã°ã©ãã³ã°ã¯ãã³ãŒãã®èªåçæãæè»ãªèšèªæ¡åŒµãå¯èœã«ããå¹ççãªããã°ã©ã ã®äœæã«åœ¹ç«ã¡ãŸãã
Flux.jlãKnet.jlãªã©ã®æ·±å±€åŠç¿ãã¬ãŒã ã¯ãŒã¯ã䜿çšããŠããã¥ãŒã©ã«ãããã¯ãŒã¯ã¢ãã«ãæ§ç¯ãããã¬ãŒãã³ã°ããæ¹æ³ãåŠã³ãŸãã深局åŠç¿ã¯ãç»åèªèãèªç¶èšèªåŠçãé³å£°èªèãªã©ã®åéã§åºãå©çšãããŠãããJuliaã䜿ã£ãå¹æçãªå®è£
æ¹æ³ãç¿åŸããŸãã
Juliaã䜿çšããŠãé«æ§èœãªèšç®ãå®è¡ããããã®ãã¯ããã¯ãããŒã«ãåŠã³ãŸãã䞊ååŠçãGPUããã°ã©ãã³ã°ãåæ£ã³ã³ãã¥ãŒãã£ã³ã°ãªã©ãããŸããŸãªã¢ãããŒããéããŠã倧èŠæš¡ãªèšç®åé¡ã«å¯ŸåŠããã¹ãã«ã磚ããŸãã
ââââ ââââ
ãé«åºŠãªãããã¯ã¹ãã®ç« ã§ã¯ãJuliaèšèªã§ããé«åºŠãªãããã¯ã¹ãæ±ããŸãããã®ç« ã§ã¯ãã¡ã¿ããã°ã©ãã³ã°ã䞊ååŠçãšåæ£åŠçãããã°ã©ãã³ã°ã®æé©åãGPUããã°ã©ãã³ã°ã®4ã€ã®ã»ã¯ã·ã§ã³ã«åãããŸãã
ãã®ç¯ã§ã¯ãJuliaã®ã¡ã¿ããã°ã©ãã³ã°ã«ã€ããŠèª¬æããŸããã¡ã¿ããã°ã©ãã³ã°ã¯ãããã°ã©ã ãèªåèªèº«ãæäœããããèªåèªèº«ãå€æŽãããããããšãæããŸããJuliaã¯ãéåžžã«åŒ·åãªã¡ã¿ããã°ã©ãã³ã°æ©èœãæäŸããŠãããããã«ãããé«åºŠãªããã°ã©ã ãæžãããšãã§ããŸãã
Juliaã«ããããã¯ãã¯ãããã°ã©ã ã®æçµçãªæ¬äœã«çæãããã³ãŒããå«ããã¡ã«ããºã ãæäŸããŸãããã¯ãã¯ãåŒæ°ã®ã¿ãã«ãè¿ãããåŒã«ããããããã®çµæã®åŒã¯å®è¡æã® eval åŒã³åºããå¿
èŠãšããã«çŽæ¥ã³ã³ãã€ã«ãããŸãããã¯ãã®åŒæ°ã«ã¯ãåŒããªãã©ã«å€ãããã³ã·ã³ãã«ãå«ããããšãã§ããŸãã
Juliaã®ãã¯ãã¯ãããã€ãã®ç¹åŸŽãæã£ãŠããŸã:
åŒããªãã©ã«ãã·ã³ãã«ã®åŒæ°: ãã¯ãã¯åŒããªãã©ã«å€ãããã³ã·ã³ãã«ãåŒæ°ãšããŠåãåãããšãã§ããŸããããã«ããããã¯ãã¯ããŸããŸãªã¿ã€ãã®åŒæ°ãåãå
¥ããé©åãªåŠçãè¡ãããšãã§ããŸãã
ãããã®ç¹åŸŽã«ãããJuliaã®ãã¯ãã¯éåžžã«æè»ã§åŒ·åãªããã°ã©ãã³ã°ããŒã«ãšãªã£ãŠããŸãã
Juliaã®ãã¯ãã¯ã@(ã¢ããããŒã¯)ã«ç¶ããŠããŒã¯ãªååã§å®£èšããããããã¯å
ã§å®çŸ©ãããŸãã以äžã¯éåžžã«ã·ã³ãã«ãªãã¯ãã®äŸã§ã:
ãã®äŸã§ã¯ãã³ã³ãã€ã©ã¯@sayhelloã®ãã¹ãŠã®ã€ã³ã¹ã¿ã³ã¹ã以äžã®ããã«çœ®ãæããŸã:
@sayhelloãREPLã«å
¥åããããšãåŒãããã«å®è¡ããããããè©äŸ¡çµæã®ã¿ã衚瀺ãããŸã:
ããã«å°ãè€éãªãã¯ããèããŠã¿ãŸããã:
ãã®ãã¯ãã¯1ã€ã®åŒæ°ãã€ãŸãnameãåããŸãã@sayhelloãåºäŒããããšãã¯ã©ãŒããããåŒã¯æçµåŒã«åŒæ°ã®å€ãå±éããŸã:
ãã¯ããå±éããæ»ãå€ã®åŒçšåŒã衚瀺ããã«ã¯ãé¢æ°macroexpandã䜿çšã§ããŸã(éèŠãªæ³šæ:ããã¯ãã¯ãã®ãããã°ã«éåžžã«äŸ¿å©ãªããŒã«ã§ã):
ããã§ã"human"ãªãã©ã«ãåŒã«å±éãããŠããããšãããããŸãã
ãã¯ãã䜿çšããŠãJuliaã§ç°¡åãªè¡åæäœãè¡ãã¢ã«ãŽãªãºã ã®äŸã瀺ããŸãããã®äŸã§ã¯ã2ã€ã®è¡åã®ç©ãèšç®ããé¢æ°ããã¯ãã§å®çŸ©ããŸãã
ãã®ãã¯ãã§ã¯ã2ã€ã®è¡åAãšBãåŒæ°ãšããŠåãåãããããã®ç©ãèšç®ããŸãããŸããè¡åã®æ¬¡å
ããã§ãã¯ãã次å
ãäžèŽããªãå Žåã¯ãšã©ãŒãè¿ããŸãã次ã«ãçµæã®è¡åCãåæåãã3éã®ã«ãŒãã䜿çšããŠç©ãèšç®ããŸããæåŸã«ãçµæã®è¡åCãè¿ããŸãã
ãã®ãã¯ãã䜿çšãããšã次ã®ããã«2ã€ã®è¡åã®ç©ãèšç®ã§ããŸãã
ãã®äŸã§ã¯ãè¡åAãšBãå®çŸ©ãã@matrix_multiplyãã¯ãã䜿çšããŠãããã®ç©ãèšç®ããŠããŸãã
Juliaã®ãã¯ãã¯ãããã€ãã®äžè¬çãªãŠãŒã¹ã±ãŒã¹ã§åœ¹ç«ã¡ãŸã:
ãããã®ãŠãŒã¹ã±ãŒã¹ã掻çšããããšã§ãJuliaã®ãã¯ãã¯ã³ãŒãã®æè»æ§ãå¹çæ§ãããã³ä¿å®æ§ãåäžãããããšãã§ããŸãã
Juliaã®ãã¯ãã䜿çšããéã®ãã¹ããã©ã¯ãã£ã¹ã«ã¯ã以äžã®ãããªãã®ããããŸã:
ãããã®ãã¹ããã©ã¯ãã£ã¹ã«åŸãããšã§ãJuliaã®ãã¯ããå¹æçã«äœ¿çšããã³ãŒãã®å質ãšä¿å®æ§ãåäžãããããšãã§ããŸãã
Juliaã®ãã¯ãã䜿çšããéã«ããèŠãããã€ãã£ãªã (æ
£çšå¥)ã«ã¯æ¬¡ã®ãããªãã®ããããŸã:
ãããã®ã€ãã£ãªã ã䜿çšããããšã§ãJuliaã®ãã¯ããå¹æçã«å®çŸ©ããä»ã®éçºè
ãç解ããããã³ãŒããæžãããšãã§ããŸãã
Juliaã®ã¡ã¿ããã°ã©ãã³ã°ã«ã¯ããã¯ããšåŒã°ããç¹æ®ãªé¢æ°ã䜿çšãããŸãããã¯ãã¯ãå®è¡æã§ã¯ãªããã³ã³ãã€ã«æã«è©äŸ¡ãããŸããã€ãŸããã³ã³ãã€ã«åã«ãã¯ããå®è¡ããããã¯ããçæããã³ãŒããå®è¡ãããŸãããã¯ãã¯ãç¹å¥ãªæ§æã䜿çšããŠå®çŸ©ãããŸããäŸãã°ã以äžã®ããã«å®çŸ©ãããŸãã
ãã¯ãã®åŒæ°ã¯ãéåžžã®é¢æ°ãšåãããã«æ±ãããŸãããã³ã³ãã€ã«æã«è©äŸ¡ãããŸãããã¯ãã®æ»ãå€ã¯ãå®è¡æã§ã¯ãªããã³ã³ãã€ã«æã«è©äŸ¡ãããJuliaã®åŒã§ãªããã°ãªããŸããããã®ããããã¯ãã¯ãåçãªåŒãçæããããã«äœ¿çšãããŸãã
ãã¯ããåŒã³åºãã«ã¯ã@ãã¯ãåã®ããã«@ãä»ããŸããäŸãã°ãå
ã»ã©å®çŸ©ãããã¯ããåŒã³åºãã«ã¯ã以äžã®ããã«ããŸãã
Juliaã®ã¡ã¿ããã°ã©ãã³ã°ã«ã¯ãæ§ã
ãªå¿çšäŸããããŸãã以äžã«ããã€ãäŸãæããŸãã
ã䞊ååŠçããšã¯ãã³ã³ãã¥ãŒã¿ãŒäžã§åæã«è€æ°ã®åŠçãå®è¡ããããšãæããŸããäžæ¹ããåæ£åŠçããšã¯ãè€æ°ã®ã³ã³ãã¥ãŒã¿ãŒã§åŠçãåæ£ããå調ããŠåŠçãè¡ãããšãæããŸããJuliaã¯ã䞊ååŠçãšåæ£åŠçã«å¯Ÿå¿ããŠãããããããã«é©ããæ¹æ³ã§ããã°ã©ãã³ã°ããããšãã§ããŸãã
Juliaã¯ããã«ãã¹ã¬ããåŠçããµããŒãããŠããŸãããã«ãã¹ã¬ããåŠçã䜿çšããããšã§ãè€æ°ã®ã¿ã¹ã¯ãåæã«å®è¡ããããšãã§ããŸããJuliaã®ãã«ãã¹ã¬ããåŠçã¯ãã¹ã¬ããééä¿¡ã®ããã®ãã£ã³ãã«ãæäŸããŠããŸãã
以äžã¯ããã«ãã¹ã¬ããåŠçã䜿çšããŠã1ãã10ãŸã§ã®æ°åã®åèšãèšç®ããäŸã§ãã
ãã®äŸã§ã¯ãsum_rangeé¢æ°ããæå®ãããç¯å²ã®æ°åã®åèšãèšç®ããŠãChannelã«çµæãéä¿¡ããŸããparallel_sumé¢æ°ã§ã¯ãæå®ãããç¯å²ãè€æ°ã®ãã£ã³ã¯ã«åå²ããããããã®ãã£ã³ã¯ãå¥ã
ã®ã¹ã¬ããã§åŠçããŸããåã¹ã¬ããã®çµæã¯ãChannelã«éä¿¡ãããparallel_sumé¢æ°ã¯åã¹ã¬ããããã®çµæãåéããŠãæçµçãªçµæãè¿ããŸãã
ããã°ã©ã ã®å®è¡é床ã¯ãå€ãã®å Žåãæé©åã®å¯Ÿè±¡ãšãªããŸããããã°ã©ã ã®é«éåã«ã¯ãæ§ã
ãªæ¹æ³ããããŸãããæ¬æžã§ã¯ã次ã®ãããªã¢ãããŒãã«çŠç¹ãããŠãŸãã
ã¢ã«ãŽãªãºã ã®æé©åã¯ããã®ã¢ã«ãŽãªãºã ãåŠçããåé¡ã«é©ããã¢ã«ãŽãªãºã ãéžæããããšã«ãã£ãŠå®çŸã§ããŸããé©åãªã¢ã«ãŽãªãºã ãéžæããããšã§ãããã°ã©ã ã®å®è¡é床ã倧å¹
ã«åäžãããããšãã§ããŸãã
äŸãã°ããªã¹ãå
ã®èŠçŽ ãæ€çŽ¢ããå Žåãç·åœ¢æ¢çŽ¢ã¢ã«ãŽãªãºã ãããäºåæ¢çŽ¢ã¢ã«ãŽãªãºã ã®æ¹ãå¹ççã§ãããŸãããœãŒãã¢ã«ãŽãªãºã ãéžæããéã«ããåé¡ã«ãã£ãŠæé©ãªã¢ã«ãŽãªãºã ãç°ãªããŸãã
ããŒã¿æ§é ã®æé©åã¯ãããã°ã©ã ã®å®è¡é床ã«å€§ããªåœ±é¿ãäžããŸããããŒã¿æ§é ãé©åã«èšèšããããšã«ãã£ãŠãã¡ã¢ãªäœ¿çšéãåæžããããŒã¿ã¢ã¯ã»ã¹ã®åŠçæéãççž®ããããšãã§ããŸãã
äŸãã°ãå€ãã®å Žåãé
åã®äœ¿çšããããé£çµãªã¹ãã®äœ¿çšã®æ¹ãå¹ççã§ãããŸããããã·ã¥ããŒãã«ã¯ã倧éã®ããŒã¿ãå¹ççã«æ€çŽ¢ããå Žåã«æå¹ã§ãã
æé©ãªã¢ã«ãŽãªãºã ãšæé©ãªããŒã¿æ§é ãéžæããŠããããã°ã©ã ã®å®è¡æéã倧å¹
ã«äžããããšãã§ããŸããã³ãŒãã®æé©åã¯ãã¢ã«ãŽãªãºã ãããŒã¿æ§é ãå®çŸããããã®ã³ãŒããæé©åããããšã«ãã£ãŠå®çŸã§ããŸãã
äŸãã°ãç¹°ãè¿ãåŠçå
ã§åãèšç®ãäœåºŠãå®è¡ããå Žåãèšç®ãå€çšããªãããã«ã³ãŒããæžãããšã§ãããã°ã©ã ã®å®è¡é床ãäžããããšãã§ããŸãããŸããé«éãªã«ãŒãèšæ³ã䜿çšããããšããããã°ã©ã ã®é床ãåäžãããããšãã§ããŸãã
ããã°ã©ã ã®æé©åã«ã¯ãã¢ã«ãŽãªãºã ã®æé©åãããŒã¿æ§é ã®æé©åãã³ãŒãã®æé©åã®3ã€ã®ã¢ãããŒãããããŸãããããã®ã¢ãããŒããé§äœ¿ããŠãããã°ã©ã ã®å®è¡é床ãé«éåããããšãã§ããŸãã
GPU(Graphics Processing Unit)ã¯ãã°ã©ãã£ãã¯ã¹åŠçã®ããã«éçºãããããã»ããµã§ãããæ°å€èšç®ãç§åŠæè¡èšç®ã®åéã§ãå©çšãããããã«ãªã£ãŠããŸããGPUã¯SIMD(Single Instruction Multiple Data)ã¢ãŒããã¯ãã£ãæ¡çšããŠãããåæã«å€æ°ã®æŒç®ãè¡ãããšãã§ããŸãããã®ç¹æ§ã掻ããããšã§ãCPUã«æ¯ã¹ãŠé«éãªæ°å€èšç®ãå¯èœã«ãªããŸãã
juliaã¯GPUããã°ã©ãã³ã°ããµããŒãããŠãããCuArraysãšåŒã°ããã©ã€ãã©ãªãä»ããŠCUDA APIãå©çšããããšãã§ããŸããCUDAã¯NVIDIAãéçºããŠããGPUåãã®äžŠåã³ã³ãã¥ãŒãã£ã³ã°ãã©ãããã©ãŒã ã§ãããGPUã®ããã©ãŒãã³ã¹ãæ倧éåŒãåºãããšãã§ããŸãã
CuArraysã䜿çšããã«ã¯ã以äžã®ããã«ããŠã€ã³ã¹ããŒã«ããå¿
èŠããããŸãã
ãªããCuArraysãå©çšããããã«ã¯CUDAãã€ã³ã¹ããŒã«ãããŠããå¿
èŠããããŸãã
CuArraysã¯ãjuliaã®æšæºçãªé
åãšåãããã«æ±ãããšãã§ããŸãã以äžã¯CuArraysã§ãã¯ãã«ãäœæããäŸã§ãã
ãã®ããã«ããããšã§ããã¹ãåŽã®ã¡ã¢ãªå
ã«ããé
åãããGPUåŽã®ã¡ã¢ãªå
ã«é
åãã³ããŒããããšãã§ããŸãã CuArraysã䜿ã£ãèšç®ã¯ãéåžžã®juliaã®é
åãšåãããã«è¡ããŸãããã ããèšç®ãè¡ãé¢æ°ã«ã¯ãGPUåŽã®ã¡ã¢ãªäžã«ããé
åãåŒæ°ãšããå¿
èŠããããŸãã以äžã¯CuArraysã§ãã¯ãã«ã®åãèšç®ããäŸã§ãã
ãã®ããã«ããããšã§ããã¯ãã«aãšãã¯ãã«bã®èŠçŽ ããšã®åãããã¹ãåŽã®ã¡ã¢ãªããGPUåŽã®ã¡ã¢ãªã«è»¢éããèšç®ãè¡ããçµæãGPUåŽã®ã¡ã¢ãªãããã¹ãåŽã®ã¡ã¢ãªã«è»¢éããŸãã
ã«ã¹ã¿ã ã«ãŒãã«ã¯ãGPUäžã§äžŠåã«å®è¡ã§ããé¢æ°ã®ããšã§ããCuArraysã¯ãCuKernelãã¯ããçšããŠã«ã¹ã¿ã ã«ãŒãã«ãå®çŸ©ããããšãã§ããŸãã以äžã¯ãCuKernelãã¯ããçšããŠããã¯ãã«ã®åãèšç®ããã«ã¹ã¿ã ã«ãŒãã«ãå®çŸ©ããäŸã§ãã
ãã®ã«ã¹ã¿ã ã«ãŒãã«ã§ã¯ãåã¹ã¬ãããé
åã®èŠçŽ ã®åèšå€ãèšç®ããçµæãããããã®ã¹ã¬ããã«è¿ããŸããCuKernelãè¿ãå€ã¯ã䞊ååŠçãããã¹ã¬ããæ°ãšåãã§ãã
CuArraysã«ã¯ãCuKernelãå®è¡ããããã®é¢æ°ãçšæãããŠããŸãã以äžã¯ãCuArraysã§ãã¯ãã«ã®åãèšç®ããäŸã§ãã
ãã®äŸã§ã¯ãã«ã¹ã¿ã ã«ãŒãã«ã128åã®ã¹ã¬ããã§äžŠåã«å®è¡ããŠããŸãã䞊ååŠçã®ãããã¹ã¬ããæ°ã¯GPUã®ã³ã¢æ°ã«æ¯äŸããããã«æ±ºå®ãããŸãããŸããçµæãæ ŒçŽããããã«ãCuArrays.@cudaãã¯ãã§simialar()é¢æ°ã䜿çšããŠããã¹ãã¡ã¢ãªäžã«ããå€æ°cãšåãåã®å€æ°ãGPUã¡ã¢ãªå
ã§äœæããŠããŸãã
CuArraysãçšããããšã§ãjuliaã§GPUããã°ã©ãã³ã°ãç°¡åã«è¡ãããšãã§ããŸããã«ã¹ã¿ã ã«ãŒãã«ãå©çšããããšã§ãGPUã®æ§èœãæ倧éã«åŒãåºãããšãã§ããæ°å€èšç®ãç§åŠæè¡èšç®ã«ãããŠé«éãªåŠçãå®çŸããããšãã§ããŸãã
ãšã©ãã¹ããã¹ã®ç¯©ããè¥å¹² Julia ãããæžããŠã¿ãŸããã
ã¯ã€ãã¯ãœãŒãããè¥å¹² Julia ãããæžããŠã¿ãŸããã
æ倧å
¬çŽæ°ãšæå°å
¬åæ°ããè¥å¹² Julia ãããæžããŠã¿ãŸããã
äºåæ³ããè¥å¹² Julia ãããæžããŠã¿ãŸããã
以äžã¯ãJuliaèšèªã§äœ¿çšãããçšèªã®èª¬æã§ãã
以äžã¯ãJuliaèšèªã§ãã䜿ãããæ§æã®äžèŠ§ã§ãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "Juliaã¯ãé«åºŠãªæ°å€è§£æãç§åŠèšç®ãããŒã¿åŠçãæ©æ¢°åŠç¿ãªã©ãããŸããŸãªåéã§åºãå©çšãããããã°ã©ãã³ã°èšèªã§ãããã®ãã¥ãŒããªã¢ã«ã¯ãåå¿è
åãã«Juliaã®åºç€ããå§ããåŸã
ã«é«åºŠãªãããã¯ã«é²ãã§ãããŸããJuliaã®ã·ã³ãã«ã§çŽæçãªæ§æã䜿çšããŠãé¢æ°ã®å®çŸ©ããããŒã¿æ§é ã®æäœãå¶åŸ¡ãããŒãããã±ãŒãžã®äœ¿çšãªã©ãåºæ¬çãªããã°ã©ãã³ã°ã®æŠå¿µãç解ããŸããããã«ãJuliaã®ç¹åŸŽçãªæ©èœã§ããå€éãã£ã¹ããããåã·ã¹ãã ã«ã€ããŠã詳ãã説æããŸãã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ãã®ãã¥ãŒããªã¢ã«ã§ã¯ãçè«ã ãã§ãªãå®è·µçãªããã°ã©ãã³ã°ã®ã¹ãã«ã身ã«ã€ããŸããå®éã®ãããžã§ã¯ããåé¡ã«åãçµã¿ãªãããJuliaã䜿ã£ãŠããŒã¿ã®è§£æãåŠçãç§åŠçã·ãã¥ã¬ãŒã·ã§ã³ãæ©æ¢°åŠç¿ã¢ãã«ã®æ§ç¯ãªã©ãããŸããŸãªã¿ã¹ã¯ã«å¯ŸåŠããæ¹æ³ãåŠã³ãŸãããŸããJuliaã®è±å¯ãªãšã³ã·ã¹ãã ãããã±ãŒãžç®¡çã·ã¹ãã ã掻çšããŠãå¹ççãªããã°ã©ãã³ã°ç°å¢ãæ§ç¯ããæ¹æ³ã玹ä»ããŸãã",
"title": ""
},
{
"paragraph_id": 2,
"tag": "p",
"text": "ãã®ãã¥ãŒããªã¢ã«ã¯ãããã°ã©ãã³ã°åå¿è
ãä»ã®èšèªããJuliaã«ç§»è¡ãã人ã
ã«ãšã£ãŠçæ³çãªãªãœãŒã¹ã§ããJuliaã®ãã¯ãã«ãªæ©èœã掻ãããŠãããŸããŸãªåé¡ã«é©æ°çãªè§£æ±ºçãèŠã€ããå¹ççãªã³ãŒããæžãããã®åºç€ãç¯ãããšãã§ããŸããJuliaã®æè»æ§ãšããã©ãŒãã³ã¹ãæ倧éã«æŽ»çšããããã°ã©ãã³ã°ã®ã¹ãã«ãé«ããŠãããŸãããã",
"title": ""
},
{
"paragraph_id": 3,
"tag": "p",
"text": "Juliaã¯ãé«éã§åçãªèšèªã§ãç§åŠæè¡èšç®ãããŒã¿åæãæ©æ¢°åŠç¿ãªã©ã®æ°å€èšç®ã¢ããªã±ãŒã·ã§ã³ãéçºããããã«èšèšãããããã°ã©ãã³ã°èšèªã§ããJuliaã¯ãå€ãã®ã¡ãªãããæã¡ãŸãã",
"title": "ã€ã³ãããã¯ã·ã§ã³"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "ãªãŒãã³ãœãŒã¹ã®èšèªã§ãããããå€ãã®ã©ã€ãã©ãªãéçºãããŠãããåºç¯å²ã«ãããã¢ããªã±ãŒã·ã§ã³éçºã«å¯Ÿå¿ã§ããŸãã",
"title": "ã€ã³ãããã¯ã·ã§ã³"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "Juliaã®èšèšå²åŠã¯ä»¥äžã®ããã«èŠçŽãããŸãã",
"title": "ã€ã³ãããã¯ã·ã§ã³"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "Juliaã®äž»ãªå©ç¹ã¯ä»¥äžã®éãã§ãã",
"title": "ã€ã³ãããã¯ã·ã§ã³"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "以äžãJuliaã®äž»ãªå©ç¹ã§ãããããã掻çšããããšã§ãæ°å€èšç®ãããŒã¿ãµã€ãšã³ã¹ãŸãã¯æ©æ¢°åŠç¿åéã®éçºè
ã«ãšã£ãŠãJuliaã¯éèŠãªããŒã«ãšãªããŸãã",
"title": "ã€ã³ãããã¯ã·ã§ã³"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "åçŽç·šã§ã¯ããŸãæåã«Juliaã®ã€ã³ã¹ããŒã«æ¹æ³ãæ±ããŸããã€ã³ã¹ããŒã«ã¯ç°¡åã§ãå
¬åŒã®ã€ã³ã¹ããŒã«ã¹ã¯ãªããã䜿çšããããšã§æ°åã§å®äºããŸãããã®ã¹ããããã¯ãªã¢ãããšãJuliaã®ç°å¢ãæŽããããã°ã©ãã³ã°åŠç¿ã®æºåãæŽããŸããJuliaã®ã€ã³ã¹ããŒã«åŸã¯ãå€æ°ãããŒã¿åãå¶åŸ¡æ§é ãªã©ãããã°ã©ãã³ã°ã®åºç€çãªæŠå¿µãåŠã¶ããšãã§ããŸããJuliaã®ã·ã³ãã«ãªæ§æãšè±å¯ãªæ©èœã掻ãããŠãããã°ã©ãã³ã°ã®äžçã«è¶³ãèžã¿å
¥ããŸãããã",
"title": "åçŽç·š"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "Juliaã¯ãmacOSãWindowsãFreeBSDãLinuxã®ãã£ã¹ããªãã¥ãŒã·ã§ã³ãªã©ã®äž»èŠãªãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§å©çšå¯èœã§ããJuliaãã€ã³ã¹ããŒã«ããæé ã¯éåžžã«ç°¡åã§ãå
¬åŒã®ã€ã³ã¹ããŒã«ã¹ã¯ãªããã䜿çšããããšã§ãæ°åã§Juliaãã»ããã¢ããã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "Juliaã¯ãWindowsç°å¢ã§ãç°¡åã«ã€ã³ã¹ããŒã«ã§ããŸãã以äžã®æé ã«åŸã£ãŠãJuliaãã»ããã¢ããããŸãããã",
"title": "åçŽç·š"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "ãã®ã»ã¯ã·ã§ã³ã§ã¯ãããã°ã©ãã³ã°ã®åºæ¬çãªæŠå¿µãåŠã³ãŸãã以äžã®å
容ã«çŠç¹ãåœãŠãŠãããã°ã©ãã³ã°ã®åºç€ãç¯ããŠãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "ãããã®æŠå¿µã¯ãJuliaã ãã§ãªãä»ã®ããã°ã©ãã³ã°èšèªã§ãå
±éããŠããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 13,
"tag": "p",
"text": "Juliaã®æ§æãåºæ¬çãªæäœæ¹æ³ãç解ããŸããJuliaã®REPL(Read-Eval-Print Loop)ã®äœ¿çšæ¹æ³ãåŠã³ãŸããREPLã¯Juliaã察話çã«äœ¿ãããã®åŒ·åãªããŒã«ã§ãããå¹ççãªåŠç¿ãšéçºã«åœ¹ç«ã¡ãŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 14,
"tag": "p",
"text": "ãããã®æ§æèŠçŽ ã¯Juliaã®åºæ¬çãªæ©èœã§ãããããã°ã©ãã³ã°ã®åå¿è
ããäžçŽè
ãŸã§å¹
åºã掻çšãããŠããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 15,
"tag": "p",
"text": "å€æ°ã¯ãå€ã«ã€ããããååã§ãããã°ã©ã å
ã§ããŒã¿ãäžæçã«ä¿åããããåŠçã®éäžçµæãä¿æãããããããã«äœ¿çšãããŸããJuliaã®å€æ°ã¯å®£èšããããšãªã䜿ãå§ããããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 16,
"tag": "p",
"text": "ãã®ããã«ãåãå€æ°ã«ç°ãªãåã®å€ãå代å
¥ããããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 17,
"tag": "p",
"text": "ãã®ããšãããJuliaã¯åçåä»ãããã°ã©ãã³ã°èšèªãšèšããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 18,
"tag": "p",
"text": "Juliaã«ãããŠãå®æ°ã¯å€æŽäžå¯èœãªå€ãè¡šãå€æ°ã§ããå®æ°ã¯ const ããŒã¯ãŒãã䜿ã£ãŠå®£èšãããŸããå®æ°ã¯ãäžåºŠå®£èšããããšããã®åŸå€ãå€æŽããããšã¯ã§ããŸãããå®æ°ã¯ãé¢æ°å
å€ã§å©çšå¯èœã§ãã以äžã¯ãå®æ°ã宣èšããäŸã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 19,
"tag": "p",
"text": "ãã®äŸã§ã¯ãGRAVITY ãšããå®æ°ã宣èšããŠããŸãããã®å®æ°ã¯ãéåå é床ãè¡šãå®æ°ã§ãããå€ã¯ 9.80665 ã§ãããåŸããå€ãå€æŽããããšã¯ã§ããŸããã",
"title": "åçŽç·š"
},
{
"paragraph_id": 20,
"tag": "p",
"text": "Juliaã®å€æ°ã®ã¹ã³ãŒãã¯ãä»ã®å€ãã®ããã°ã©ãã³ã°èšèªãšåæ§ã«ããã®å€æ°ãã¢ã¯ã»ã¹å¯èœãªç¯å²ãæããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 21,
"tag": "p",
"text": "Juliaã§ã¯ã次ã®ãããªã¹ã³ãŒãããããŸã:",
"title": "åçŽç·š"
},
{
"paragraph_id": 22,
"tag": "p",
"text": "ã¹ã³ãŒãå
ã§ã®å€æ°ã®æ¯ãèãã¯ãä»ã®ããã°ã©ãã³ã°èšèªãšåæ§ã§ãããJuliaã®å Žåãç¹ã«é¢æ°å
ã§ã®å€æ°ã®æ¯ãèãã«é¢ããŠã¯ãããŒã«ã«ã¹ã³ãŒãã®èŠåãé©çšãããŸããããšãã°ãé¢æ°å
ã§åãååã®å€æ°ãã°ããŒãã«ã¹ã³ãŒããšåãååã§å®çŸ©ãããšãããã¯é¢æ°å
ã§ã®ã¿æå¹ãªããŒã«ã«å€æ°ãšãªããŸããããã¯ãJuliaã®å€æ°ãããã©ã«ãã§ããŒã«ã«ã¹ã³ãŒããæã€ããã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 23,
"tag": "p",
"text": "Juliaã§ã¯ãé¢æ°å
ã§ã°ããŒãã«å€æ°ãå€æŽããå ŽåãglobalããŒã¯ãŒãã䜿çšããå¿
èŠããããŸããããã«ãããé¢æ°å
ã§ã°ããŒãã«å€æ°ã®å€ãæŽæ°ããããšãã§ããŸããäŸãã°:",
"title": "åçŽç·š"
},
{
"paragraph_id": 24,
"tag": "p",
"text": "ãã®ããã«ãJuliaã§ã¯ã¹ã³ãŒãã®ã«ãŒã«ã«åŸã£ãŠå€æ°ãæ¯ãèããŸãããã°ããŒãã«å€æ°ã®æŽæ°ãªã©ç¹å®ã®ã±ãŒã¹ã§ã¯æ瀺çãªããŒã¯ãŒããå¿
èŠã«ãªãããšããããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 25,
"tag": "p",
"text": "å€æ°ã¯ããã°ã©ãã³ã°ã«ãããŠéåžžã«éèŠãªæŠå¿µã§ãããããŸããŸãªãŠãŒã¹ã±ãŒã¹ããããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 26,
"tag": "p",
"text": "以äžã¯ãå€æ°ã®äž»ãªãŠãŒã¹ã±ãŒã¹ã®ããã€ãã§ã:",
"title": "åçŽç·š"
},
{
"paragraph_id": 27,
"tag": "p",
"text": "ãããã®ãŠãŒã¹ã±ãŒã¹ã¯ãããã°ã©ã ãå¹ççã«èšè¿°ãã管çããããã®åºæ¬çãªããŒã«ãšããŠå€æ°ãã©ãã ãéèŠã§ãããã瀺ããŠããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 28,
"tag": "p",
"text": "ããã°ã©ãã³ã°èšèªã§ã¯ãããŒã¿ãæ±ãéã«ç°ãªãçš®é¡ã®ããŒã¿åã䜿çšãããŸãããããã®ããŒã¿åã«ã¯ãæŽæ°ãæµ®åå°æ°ç¹æ°ãæååãé
åãªã©ããããŸããJuliaã¯ããããã®ããŒã¿åã䜿çšããŠããŒã¿ãæ ŒçŽããåŠçããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 29,
"tag": "p",
"text": "æŽæ°ã¯ãæ°å€ãè¡šãããã®åºæ¬çãªããŒã¿åã§ããæ£ã®æŽæ°ãè² ã®æŽæ°ããŒããè¡šãããšãã§ããŸããJuliaã§ã¯ãæŽæ°ã®ãµã€ãºã«å¿ããŠè€æ°ã®åãæäŸãããŠããŸããäŸãã°ãInt8ãInt16ãInt32ãInt64ãªã©ã®ç¬Šå·ä»ãæŽæ°åããããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 30,
"tag": "p",
"text": "æµ®åå°æ°ç¹æ°ã¯ãå°æ°ç¹ä»¥äžã®æ°å€ãè¡šãããã®ããŒã¿åã§ããæŽæ°ãšã¯ç°ãªããå°æ°ç¹ä»¥äžã®æ¡æ°ãå«ããããšãã§ããŸããJuliaã§ã¯ãFloat32ãFloat64ãªã©ã®æµ®åå°æ°ç¹æ°åãæäŸãããŠããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 31,
"tag": "p",
"text": "æååã¯ãããã¹ãããŒã¿ãè¡šãããã®ããŒã¿åã§ããJuliaã§ã¯ãããã«ã¯ã©ãŒããŒã·ã§ã³ (\") ã§å²ãŸããæååã䜿çšãããŸããäŸãã°ã\"Hello\"ã\"Julia\"ãªã©ã®æååãè¡šçŸããããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 32,
"tag": "p",
"text": "é
åã¯ãè€æ°ã®èŠçŽ ãé åºä»ããŠæ ŒçŽããããŒã¿æ§é ã§ããJuliaã§ã¯ãè§ãã£ã [ ] å
ã«ã«ã³ãã§åºåãããèŠçŽ ã䞊ã¹ãŠè¡šçŸããŸããäŸãã°ã[1, 2, 3]ã[\"a\", \"b\", \"c\"]ãªã©ã®é
åãè¡šçŸããããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 33,
"tag": "p",
"text": "ãããã®åºç€çãªããŒã¿åãšå€æ°ã«é¢ããã³ãŒãäŸã瀺ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 34,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãæŽæ°åã®å€æ° xãæµ®åå°æ°ç¹æ°åã®å€æ° yãæåååã®å€æ° nameãé
ååã®å€æ° numbers ãå®çŸ©ããŠããŸããããããã®å€æ°ã®åãå€ã typeof() é¢æ°ã println() é¢æ°ã䜿çšããŠåºåããŠããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 35,
"tag": "p",
"text": "ããã®çŽ¹ä»ããããŒã¿åã¯ãããäžéšã§ããæãé »ç¹ã«äœ¿çšãããã®ã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 36,
"tag": "p",
"text": "åã¢ãããŒã·ã§ã³(Type Annotation)ãšã¯ãããã°ã©ãã³ã°èšèªã«ãããŠå€æ°ãé¢æ°ãªã©ã®èŠçŽ ã«å¯ŸããŠãæ瀺çã«åãæå®ããããšãæããŸããäžè¬çã«ãåçåä»ããæ¡çšããèšèªã§ã¯ãå€æ°ã®åã¯å®è¡æã«å€ã«åºã¥ããŠæšè«ãããŸãããéçåä»ããæ¡çšããèšèªã§ã¯ãå€æ°ã®åã¯ã³ãŒãã®èšè¿°æç¹ã§æ瀺çã«æå®ããå¿
èŠããããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 37,
"tag": "p",
"text": "Juliaã§ã¯ãåçåä»ããæ¡çšããŠããŸãããåã¢ãããŒã·ã§ã³ã䜿çšããŠæ瀺çã«åãæå®ããããšãã§ããŸããããã«ãããã³ãŒãã®èªã¿ããããããã©ãŒãã³ã¹ã®æé©åãå¯èœã«ãªããŸããåã¢ãããŒã·ã§ã³ã¯ãé¢æ°ã®åŒæ°ãæ»ãå€ãå€æ°ã®å®£èšãé
åãèŸæžã®èŠçŽ åãªã©ã«é©çšãããããšããããŸããJuliaã§ã¯ãåã¢ãããŒã·ã§ã³ã¯ :: ãçšããŠè¡šçŸãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 38,
"tag": "p",
"text": "以äžã¯ãåã¢ãããŒã·ã§ã³ã®äŸã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 39,
"tag": "p",
"text": "ãã®ã³ãŒãäŸã§ã¯ãæŽæ°å (Int)ãæµ®åå°æ°ç¹æ°å (Float64)ãæååå (String) ã®å€æ°ãšãããããã®åãèŠçŽ åãšããé
åãå®çŸ©ãããŠããŸãããããã®èŠçŽ ã«å¯ŸããŠåã¢ãããŒã·ã§ã³ãè¡ãããŠããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 40,
"tag": "p",
"text": "åæšè«(type inference)ã¯ãããã°ã©ãã³ã°èšèªãå€æ°ãåŒã®åãã³ãŒãããæšæž¬ããéçã«æ±ºå®ããããã»ã¹ã§ããJuliaã§ã¯ãã³ã³ãã€ã©ãå€æ°ãé¢æ°ã®åãæšè«ããã³ã³ãã€ã«æã«åã®æŽåæ§ã確èªããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 41,
"tag": "p",
"text": "äŸãã°ã次ã®ã³ãŒããèŠãŠã¿ãŸãããã",
"title": "åçŽç·š"
},
{
"paragraph_id": 42,
"tag": "p",
"text": "ãã®å ŽåãJuliaã¯æ¬¡ã®ããã«åãæšè«ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 43,
"tag": "p",
"text": "Juliaã®åæšè«ã¯éåžžã«æè»ã§ãããéçåä»ãèšèªã®å©ç¹ãšåçåä»ãèšèªã®æè»æ§ãçµã¿åãããŠããŸããããã«ãããã³ãŒããå®å
šã§é«éã«å®è¡ãããäžæ¹ã§ãåé·ãªåã®æ瀺ãå¿
èŠãªå Žé¢ãæžããããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 44,
"tag": "p",
"text": "Juliaãæ¡çšããŠããåæšè«ã®ã¢ã«ãŽãªãºã ã¯ãéçåä»ããšåçåä»ãã®ç¹æ§ãçµã¿åããããã®ã§ããJuliaã®åæšè«ã¯ãéç解æãè¡ããªããããåçã«åã®æšè«ãè¡ãããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 45,
"tag": "p",
"text": "å
·äœçã«ã¯ãJuliaã®åæšè«ã¯ä»¥äžã®æé ã«åºã¥ããŠããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 46,
"tag": "p",
"text": "ãããã®æé ã«ãããJuliaã¯å€æ°ãé¢æ°ã®åãéçã«æšè«ããã³ã³ãã€ã«æã«åã®æŽåæ§ã確èªããŸããããããå¿
èŠã«å¿ããŠåçã«åã远跡ããããšããããŸãããã®æè»æ§ã«ãããJuliaã¯é«éãªã³ãŒãã®çæãšæè»ãªããã°ã©ãã³ã°ãäž¡ç«ããŠããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 47,
"tag": "p",
"text": "Juliaã«ãããŠãããã°ã©ã ã¯åºæ¬çã«åŒãšæŒç®åã®çµã¿åããã§æ§æãããŸããåŒã¯å€ãçæããæŒç®åã¯ãããã®å€ã«å¯ŸããŠç¹å®ã®æäœãè¡ããŸããããã§ã¯ãJuliaã§äœ¿ãããäž»èŠãªæŒç®åãšåŒã«ã€ããŠèª¬æããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 48,
"tag": "p",
"text": "åŒã¯ããã°ã©ã å
ã§å€ãçæããã³ãŒãã®æçã§ããåŒã¯å€æ°ããªãã©ã«ãé¢æ°åŒã³åºããæŒç®åã®çµã¿åãããªã©ã§æ§æãããŸããJuliaã®åŒã¯ä»ã®åŒãæŒç®åãšçµã¿åãããããšã§ããè€éãªåŒãäœãããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 49,
"tag": "p",
"text": "ãªãã©ã«ã¯ããã°ã©ã å
ã§åºå®ãããå€ãè¡šçŸããæ¹æ³ã§ããäŸãã°ãæŽæ°ãæµ®åå°æ°ç¹æ°ãæååãçåœå€ãªã©ããããŸãã以äžã¯ãããã€ãã®ãªãã©ã«ã®äŸã§ã:",
"title": "åçŽç·š"
},
{
"paragraph_id": 50,
"tag": "p",
"text": "æŒç®åã¯åŒå
ã§å€ã«å¯Ÿããç¹å®ã®æäœãè¡ããŸããJuliaã«ã¯ããŸããŸãªçš®é¡ã®æŒç®åããããŸããã以äžã¯äžè¬çãªæŒç®åã®äŸã§ã:",
"title": "åçŽç·š"
},
{
"paragraph_id": 51,
"tag": "p",
"text": "ãããã®æŒç®åã¯åŒå
ã§äœ¿çšãããå€ãåŒã«å¯ŸããŠç¹å®ã®æäœãå®è¡ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 52,
"tag": "p",
"text": "æŒç®åã«ã¯åªå
é äœãšçµåæ§ããããŸããåªå
é äœã¯æŒç®åãåŒå
ã§ã©ã®ãããªé åºã§è©äŸ¡ããããã瀺ããçµåæ§ã¯åãåªå
é äœã®æŒç®åãã©ã®ããã«ã°ã«ãŒãåããããã瀺ããŸããJuliaã«ã¯æŒç®åã®åªå
é äœãšçµåæ§ãå®çŸ©ããèŠåããããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 53,
"tag": "p",
"text": "Juliaã®åŒãšæŒç®åãç解ããããšã¯ãããã°ã©ã ãäœæãç解ããäžã§éèŠãªã¹ãã«ã§ãã ãããã®æŠå¿µããã¹ã¿ãŒããããšã§ãããå¹ççã§æ£ç¢ºãªã³ãŒããæžãããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 54,
"tag": "p",
"text": "Juliaã®.æŒç®åã¯ãèŠçŽ ããšã®æŒç®ãè¡ãããã®ãã¯ãã«åæŒç®åã§ããããã¯ãJuliaèšèªã«ãããŠéåžžã«éèŠãªæ©èœã§ããããã¯ãã«ãè¡åãªã©ã®èŠçŽ ããšã®æŒç®ãç°¡æœã«è¡ãããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 55,
"tag": "p",
"text": ".æŒç®åã¯ãéåžžã®æŒç®å(å ç®ãæžç®ãä¹ç®ãé€ç®ãªã©)ã®åã«çœ®ãããšã§ããã¯ãã«ãè¡åã®åèŠçŽ ã«ãã®æŒç®ãé©çšããããšãã§ããŸããããã«ãããèŠçŽ ããšã®æŒç®ãéåžžã«ç°¡æœã«èšè¿°ã§ããé«éãªåŠçãå¯èœãšãªããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 56,
"tag": "p",
"text": "以äžã«ã.æŒç®åã®äœ¿çšäŸã瀺ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 57,
"tag": "p",
"text": "ãã®ããã«ã.æŒç®åã䜿çšããããšã§ããã¯ãã«ã®èŠçŽ ããšã®æŒç®ãã·ã³ãã«ã«å®è¡ã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 58,
"tag": "p",
"text": "Juliaã®.æŒç®åã¯ãæ°å€æŒç®ã ãã§ãªããé¢æ°ã®é©çšãè«çæŒç®ãªã©ãããŸããŸãªæäœã«å¯ŸããŠã䜿çšããããšãã§ããŸãã以äžã«ã.æŒç®åã䜿ã£ãç°ãªãæäœã®ã³ãŒãäŸã瀺ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 59,
"tag": "p",
"text": "ãããã®äŸã§ã¯ã.æŒç®åã䜿çšããŠãé¢æ°ãæŒç®åããã¯ãã«ã®åèŠçŽ ã«é©çšããŠããŸããããã«ãããèŠçŽ ããšã®æäœãç°¡æœã«èšè¿°ã§ããæè»æ§ãé«ãŸããŸããJuliaã®.æŒç®åã¯ãããŸããŸãªããŒã¿åãæŒç®ã«å¯ŸããŠå©çšã§ããããã°ã©ãã³ã°ã®å¹çãåäžãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 60,
"tag": "p",
"text": "ã¢ãããŒã«ç©ã¯ãé
åã®å¯Ÿå¿ããèŠçŽ å士ã®ç©ãèšç®ããŠãæ°ããé
åãçæããæŒç®ã§ããJuliaã§ã¯ãæãåºæ¬çãªã¢ãããŒã«ç©ã®èšç®æ¹æ³ã¯ãèŠçŽ å士ã®æãç®æŒç®å.ã䜿çšããããšã§ããäŸãã°ã次ã®ããã«2ã€ã®é
åãçšæãããããã®ã¢ãããŒã«ç©ãèšç®ããããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 61,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ã.*ã䜿ã£ãŠãèŠçŽ ããšã®æãç®æŒç®åãé
åaãšé
åbã«é©çšããæ°ããé
åcãçæããŠããŸãããããã£ãŠãã¢ãããŒã«ç©ã¯æ°ããé
åãçæãããããå
ã®2ã€ã®é
åãšã¯ç°ãªããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 62,
"tag": "p",
"text": "ãŸããè¡åã®ã¢ãããŒã«ç©ãèšç®ããã«ã¯ãåãããã«åèŠçŽ ã«æãç®æŒç®åãé©çšããŸããäŸãã°ã次ã®ããã«è€æ°ã®è¡åã®ã¢ãããŒã«ç©ãèšç®ããããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 63,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãåè¡åã«å¯ŸããŠãæãç®æŒç®åãé©çšããæ°ããè¡åãçæããŠããŸããããã§ããå
ã®è¡åãšã¯ç°ãªãæ°ããè¡åãçæãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 64,
"tag": "p",
"text": "Juliaã§ã¯ãä¹ç®æŒç®åãçç¥ããããšãã§ããŸãããã®æ©èœã䜿ããšããªãã©ã«ãå€æ°ãšæ°å€ã®éã«ä¹ç®æŒç®å * ãæ瀺çã«æžããã«ãæ°å€ãšä¹ç®ããããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 65,
"tag": "p",
"text": "å
·äœçãªäŸãèŠãŠã¿ãŸããã:",
"title": "åçŽç·š"
},
{
"paragraph_id": 66,
"tag": "p",
"text": "äžèšã®äŸã§ã¯ã10xã¯10 * xãšåãã§ãããä¹ç®æŒç®å * ãçç¥ããŠèšè¿°ãããŠããŸããããã«ãããããç°¡æœãªã³ãŒããæžãããšãã§ããŸãããã ããå€æ°åãšæ°å€ã®éã«ã¹ããŒã¹ããªãããšã«æ³šæããŠãã ãããã¹ããŒã¹ããããšJuliaã¯å¥ã®æ§æãšè§£éãããšã©ãŒãçºçããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 67,
"tag": "p",
"text": "以äžã¯ãmapé¢æ°ãšdoãããã¯ã䜿çšããŠä¹ç®æŒç®åãçç¥ããäŸã§ã:",
"title": "åçŽç·š"
},
{
"paragraph_id": 68,
"tag": "p",
"text": "ãã®äŸã§ã¯ãmapé¢æ°ã䜿çšããŠé
å [1, 2, 3] ã®åèŠçŽ ã2åã«ããŠããŸããdoãããã¯å
ã§ä¹ç®æŒç®å * ãçç¥ããŠèšè¿°ããŠããŸããããã®æ§æã¯æ£ãã解éãããŸããdoãããã¯å
ã®åŒã¯ãéåžžã®ã³ãŒããšåãããã«è©äŸ¡ãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 69,
"tag": "p",
"text": "Juliaã§ã¯ããã€ãæŒç®å |> ã䜿çšããŠãé¢æ°ã®åºåã次ã®é¢æ°ã®å
¥åã«çŽæ¥æž¡ãããšãã§ããŸãã ããã«ãããé¢æ°ãé£éãããããšãã§ããã³ãŒãã®èªã¿ããããåäžããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 70,
"tag": "p",
"text": "ãã€ãæŒç®åã®äžè¬çãªæ§æã¯æ¬¡ã®ãšããã§ã:",
"title": "åçŽç·š"
},
{
"paragraph_id": 71,
"tag": "p",
"text": "ããã¯ãinput ã function1 ã«é©çšãããã®çµæã function2 ã«é©çšãããã®çµæã function3 ã«é©çšãããããŠæçµçã« functionN ã«é©çšãããšããæå³ã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 72,
"tag": "p",
"text": "äŸãã°ã次ã®ãããªã³ãŒããèããŠã¿ãŸããã:",
"title": "åçŽç·š"
},
{
"paragraph_id": 73,
"tag": "p",
"text": "ããããã€ãæŒç®åã䜿çšããŠæžãçŽããšæ¬¡ã®ããã«ãªããŸã:",
"title": "åçŽç·š"
},
{
"paragraph_id": 74,
"tag": "p",
"text": "ãã®ããã«ãã€ãæŒç®åã䜿çšããããšã§ãã³ãŒããå·Šããå³ãžãšèªç¶ã«èªãã圢ã«ãªãããã¹ããæ·±ããªãã®ãé²ãããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 75,
"tag": "p",
"text": "Juliaã§ã¯ãæ°ããæŒç®åãå®çŸ©ããäºãã§ããŸãã ããã§ã¯ãâãšããæ°ããæŒç®åãå®çŸ©ããŠããã¯ãã«ã®ãã³ãœã«ç©ãèšç®ããé¢æ°ãå®è£
ããŠã¿ãŸãããã",
"title": "åçŽç·š"
},
{
"paragraph_id": 76,
"tag": "p",
"text": "ãã®ã³ãŒãã¯ãæ°ããæŒç®å â ãå®çŸ©ãããã®æŒç®åã䜿çšããŠãã¯ãã«ã®ãã³ãœã«ç©ãèšç®ããçµæãåºåããŠããŸãã以äžã«ããããã®éšåã®è§£èª¬ãæäŸããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 77,
"tag": "p",
"text": "å¶åŸ¡æ§é (Control structures)ãšã¯ãããã°ã©ã ã®ãããŒãå¶åŸ¡ããããã®æ§é ãæ©èœã®ããšã§ããããã°ã©ãã³ã°èšèªã§ã¯ãæ¡ä»¶ã«å¿ããŠç°ãªãæäœãè¡ã£ãããåãæäœãç¹°ãè¿ãããããšã©ãŒãåŠçãããããããã«å¶åŸ¡æ§é ã䜿çšãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 78,
"tag": "p",
"text": "è€ååŒã¯ãè€æ°ã®åŒããŸãšããŠäžã€ã®åŒãšããŠæ±ãããã®æ¹æ³ã§ããJuliaã§ã¯ãbegin ããŒã¯ãŒãã䜿çšããŠè€ååŒãéå§ããend ããŒã¯ãŒãã§çµäºããŸãããŸãã; ã䜿çšããŠè€æ°ã®åŒã1è¡ã«ãŸãšããããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 79,
"tag": "p",
"text": "ãŸãã¯",
"title": "åçŽç·š"
},
{
"paragraph_id": 80,
"tag": "p",
"text": "æ¡ä»¶ä»ãè©äŸ¡ã¯ãç¹å®ã®æ¡ä»¶ãæºããããå Žåã«ç¹å®ã®ã³ãŒããããã¯ãå®è¡ããããã®æ¹æ³ã§ããJuliaã§ã¯ãif-elseif-else æãäžé
æŒç®å ?: ã䜿çšããŠæ¡ä»¶ä»ãè©äŸ¡ãè¡ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 81,
"tag": "p",
"text": "ãŸãã¯",
"title": "åçŽç·š"
},
{
"paragraph_id": 82,
"tag": "p",
"text": "ç絡è©äŸ¡ã¯ãè«çæŒç®å &&(è«çç©)ãš ||(è«çå)ã䜿çšãããæ¡ä»¶åŒã®è©äŸ¡æ¹æ³ã§ããJuliaã§ã¯ãè«çæŒç®åãç絡è©äŸ¡ãè¡ããŸããå·Šã®æ¡ä»¶åŒã ãã§çµæã確å®ããå Žåãå³ã®æ¡ä»¶åŒã¯è©äŸ¡ãããŸããã",
"title": "åçŽç·š"
},
{
"paragraph_id": 83,
"tag": "p",
"text": "ç¹°ãè¿ãè©äŸ¡ã¯ãã«ãŒãæ§é ã䜿çšããŠç¹å®ã®ã³ãŒããããã¯ãè€æ°åå®è¡ããæ¹æ³ã§ããJuliaã§ã¯ãwhile ã«ãŒããš for ã«ãŒãã䜿çšãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 84,
"tag": "p",
"text": "Juliaã«ãããäŸå€åŠçã¯ãäºæããªãç¶æ³ããšã©ãŒãçºçããå Žåã«ããã°ã©ã ã®æ£åžžãªæµããäžæãããšã©ãŒãåŠçããä»çµã¿ã§ããäž»ãªäŸå€åŠçã®æ§æèŠçŽ ã¯ä»¥äžã®éãã§ã:",
"title": "åçŽç·š"
},
{
"paragraph_id": 85,
"tag": "p",
"text": "äŸå€åŠçãé©åã«äœ¿çšããããšã§ãããã°ã©ã ãäºæãã¬ç¶æ³ããšã©ãŒã«ééãããšãã«ãããã«é©åã«å¯ŸåŠã§ããããã«ãªããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 86,
"tag": "p",
"text": "ã¿ã¹ã¯ã¯ãããã°ã©ã ã®å®è¡ãäžæåæ¢ããåŸã§åéããããã®æ©èœã§ããJuliaã§ã¯ãyieldto é¢æ°ã䜿çšããŠã¿ã¹ã¯ãå®çŸ©ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 87,
"tag": "p",
"text": "æ¡ä»¶åŒã§ã¯ççå€å(Boolean)ãèŠæ±ãããŸãã Juliaã§ã¯ãæŽæ°å€ããççå€åãžã®æé»ã®å€æã¯è¡ãããªãã®ã§ãæ¡ä»¶åŒã¯æ瀺çã«ççå€ãæäŸããå¿
èŠããããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 88,
"tag": "p",
"text": "äŸãã°ãJuliaã§ã¯æ¬¡ã®ãããªã³ãŒããèããããŸã:",
"title": "åçŽç·š"
},
{
"paragraph_id": 89,
"tag": "p",
"text": "ãã®å Žåãæ¡ä»¶åŒ x > 0 ã¯æŽæ°å€ x ã®å€ã0ã§ãªããã©ãããè©äŸ¡ããŸããx ã®å€ãæ£ã®å Žåã«æ¡ä»¶ãçãšãªããprintln é¢æ°ãå®è¡ãããŸããæŽæ°å€ããã®ãŸãŸæ¡ä»¶åŒã«äœ¿çšãããããšã¯ãªãããã®å€ãè©äŸ¡ããããã«æ¯èŒæŒç®åãªã©ã®æ¡ä»¶åŒã䜿çšããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 90,
"tag": "p",
"text": "ãã®ã³ãŒãäŸã§ã¯ãæ¡ä»¶åå²ãç¹°ãè¿ããäŸå€åŠçãäžé
æŒç®åãè«çæŒç®åã®ç絡è©äŸ¡ã®åå¶åŸ¡æ§é ã䜿çšãããŠããŸããããããã®ãããã¯ã«ã¯ã³ã¡ã³ããä»ããŠãããåå¶åŸ¡æ§é ãã©ã®ããã«æ©èœãããã説æãããŠããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 91,
"tag": "p",
"text": "Juliaã«ã¯ãã«ãŒãã®å¶åŸ¡ãäŸå€åŠçã®å¶åŸ¡ãªã©ãè¡ãããã®ããŸããŸãªå¶åŸ¡æããããŸãã以äžã«ããã€ãã®äž»èŠãªãã®ã瀺ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 92,
"tag": "p",
"text": "ãããã®å¶åŸ¡æã¯ãããã°ã©ã ã®å®è¡ãããŒãå¶åŸ¡ããããã«äœ¿çšãããŸããäŸãã°ãbreakæã¯ã«ãŒãå
ã®ç¹å®ã®æ¡ä»¶äžã§ã«ãŒããçµäºããããã«äœ¿çšãããreturnæã¯é¢æ°ã®å®è¡ãçµäºããŠå€ãè¿ãããã«äœ¿çšãããŸããthrowæã¯ãç¹å®ã®æ¡ä»¶äžã§ãšã©ãŒãçºçããããããåŠçããããã®äŸå€åŠçãããã¯ã«å¶åŸ¡ã移ãããã«äœ¿çšãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 93,
"tag": "p",
"text": "ãã®ã³ãŒãäŸã§ã¯ãåçš®ã®å¶åŸ¡æ(ifæãwhileã«ãŒããforã«ãŒããbreakæãreturnæãthrowæ)ã䜿çšããŠããŸããããããã®å¶åŸ¡æ§é ããé©åã«ããã°ã©ã ã®ãããŒãå¶åŸ¡ããŠããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 94,
"tag": "p",
"text": "å
å
è¡šèš(comprehension)ã¯ãããã°ã©ãã³ã°èšèªã«ãããŠãã³ã¬ã¯ã·ã§ã³(é
åããªã¹ããã»ãããèŸæžãªã©)ãçæããããã®æ§ææ©èœã§ããéåžžãå
å
è¡šèšã¯ãã«ãŒããæ¡ä»¶æã䜿çšããã«ãç°¡æœãã€å¹ççã«ã³ã¬ã¯ã·ã§ã³ãçæããããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 95,
"tag": "p",
"text": "å
å
è¡šèšã¯ãããã³ã³ãã¯ãã§èªã¿ãããã³ãŒããæžãããã®äŸ¿å©ãªæ段ã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 96,
"tag": "p",
"text": "è¡å(Matrix)ãçæããããã«ããå
å
è¡šèšã¯éåžžã«äŸ¿å©ã§ãã ç¹ã«ã2次å
é
åãå¹ççã«çæããéã«åœ¹ç«ã¡ãŸãã以äžã«ããããªãã¯ã¹ãçæããå
å
è¡šèšã®äŸã瀺ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 97,
"tag": "p",
"text": "ãã®äŸã§ã¯ã3x3ã®ãããªãã¯ã¹ãçæãããŸããåèŠçŽ ã¯ããã®è¡çªå·ãšåçªå·ã®ç©ã«ãªããŸããçæããããããªãã¯ã¹ã¯ä»¥äžã®ããã«ãªããŸã:",
"title": "åçŽç·š"
},
{
"paragraph_id": 98,
"tag": "p",
"text": "ãã®ããã«ãå
å
è¡šèšã䜿çšããããšã§ããã¹ããããã«ãŒããé¿ããŠãããªãã¯ã¹ãå¹ççã«çæããããšãã§ããŸãããŸããå
å
è¡šèšã䜿çšããããšã§ãã³ãŒããç°¡æœã«ãªããå¯èªæ§ãåäžããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 99,
"tag": "p",
"text": "ããã«ãå
å
è¡šèšã掻çšããŠæ¡ä»¶ã«åºã¥ãããããªãã¯ã¹ã®çæãå¯èœã§ããäŸãã°ãç¹å®ã®æ¡ä»¶ãæºããèŠçŽ ã®ã¿ãå«ããããªãã¯ã¹ãçæããããšãã§ããŸããå
å
è¡šèšãå©çšããããšã§ããã®ãããªæäœãç°¡æœã«èšè¿°ããããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 100,
"tag": "p",
"text": "é
åãã¿ãã«ãèŸæžãªã©ã®ããŒã¿æ§é ãåŠã³ãŸãããããã®æ§é ã¯ããŒã¿ãå¹æçã«æ±ãããã®åºæ¬çãªããŒã«ã§ããããã«ãããŒã¿ã®ã€ã³ãã¯ã·ã³ã°ãã¹ã©ã€ã·ã³ã°ã®æ¹æ³ãç解ããŸããããŒã¿æ§é ã®éžæãšæäœã¯ããã°ã©ã ã®å¹çæ§ã«å€§ãã圱é¿ããããããã£ãããšç解ããŠãããŸãããã",
"title": "åçŽç·š"
},
{
"paragraph_id": 101,
"tag": "p",
"text": "Juliaã«ã¯ãæ§ã
ãªããŒã¿åããããŸããäž»ãªããŒã¿åã¯ä»¥äžã®éãã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 102,
"tag": "p",
"text": "Juliaã®Stringã¯ãããã¹ãããŒã¿ãè¡šãäžå€ã®ããŒã¿åã§ããæååã¯äžé£ã®æå(Unicodeæå)ããæ§æãããããã«ã¯ã©ãŒããŒã·ã§ã³ã§å²ãŸããŸããäŸãã°ã\"Hello, world!\"ã®ãããªæååã¯ãæåHãeãlãlãoã,ãã¹ããŒã¹ãwãoãrãlãdã!ã®é£ç¶ããã·ãŒã±ã³ã¹ã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 103,
"tag": "p",
"text": "Juliaã®Stringã¯äžå€ã®ãããäžåºŠäœæãããæååã¯å€æŽã§ããŸãããããã¯ãæååãå€æŽãã代ããã«ãæ°ããæååãçæããããšã«ãªããŸããJuliaã®æååã¯UTF-8ã§ãšã³ã³ãŒããããŠãããUnicodeã®å
šãŠã®æåããµããŒãããŠããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 104,
"tag": "p",
"text": "Juliaã®Stringåã«ã¯ãæ§ã
ãªã¡ãœãããçšæãããŠãããæååã®æäœãåŠçãè¡ãããã®æ©èœãè±å¯ã«æäŸãããŠããŸãããŸããæååè£éãæ£èŠè¡šçŸãªã©ã®æ©èœãå©çšããããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 105,
"tag": "p",
"text": "æååã¯ãJuliaã§ã®ããã¹ãåŠçãããŒã¿æäœãæååæäœãªã©ã®å€ãã®å Žé¢ã§åºã䜿çšãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 106,
"tag": "p",
"text": "以äžã«juliaã®æååã®ã¡ãœããã®äžéšã瀺ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 107,
"tag": "p",
"text": "ãããã¯äžéšã®åºæ¬çãªæååã¡ãœããã§ãããJuliaã«ã¯ããã«å€ãã®æåååŠçé¢æ°ãçšæãããŠããŸãããããã®ã¡ãœãããçµã¿åãããŠãããŸããŸãªæååæäœãå®è¡ããããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 108,
"tag": "p",
"text": "Juliaã®ã³ã¬ã¯ã·ã§ã³åã¯ãè€æ°ã®èŠçŽ ãäžã€ã®ãŸãšãŸããšããŠæ ŒçŽããããŒã¿æ§é ãæããŸããã³ã¬ã¯ã·ã§ã³åã¯ç°ãªãèŠçŽ ã®éãŸããè¡šçŸãããããã®èŠçŽ ã«ã¢ã¯ã»ã¹ãããæäœãããããããã®æ¹æ³ãæäŸããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 109,
"tag": "p",
"text": "Juliaã®äž»èŠãªã³ã¬ã¯ã·ã§ã³åã«ã¯ä»¥äžã®ãããªãã®ããããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 110,
"tag": "p",
"text": "ãããã®ã³ã¬ã¯ã·ã§ã³åã¯ãç°ãªãããŒã¿æ§é ãæäœæ¹æ³ãæäŸããããŸããŸãªåé¡ãã¢ã«ãŽãªãºã ã«å¯ŸããŠé©ããæ¹æ³ã§ããŒã¿ãè¡šçŸããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 111,
"tag": "p",
"text": "é
å(Array)ã¯ãåãåã®èŠçŽ ãé åºä»ãã§æ ŒçŽããããŒã¿æ§é ã§ããJuliaã§ã¯ãé
åã¯1次å
ããå€æ¬¡å
ãŸã§ã®æ¬¡å
ãæã€ããšãã§ããŸããé
åã¯éåžžã«æè»ã§ãããæ°å€ãæååãæ§é äœãªã©ãããŸããŸãªçš®é¡ã®ããŒã¿ãæ ŒçŽã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 112,
"tag": "p",
"text": "以äžã¯ãJuliaã§ã®é
åã®äŸã§ã:",
"title": "åçŽç·š"
},
{
"paragraph_id": 113,
"tag": "p",
"text": "é
åã®èŠçŽ ãžã®ã¢ã¯ã»ã¹ã¯ãæ·»åã䜿çšããŠè¡ããŸããäŸãã°ãarray1ã®2çªç®ã®èŠçŽ ã«ã¢ã¯ã»ã¹ããå Žåã¯array1[2]ãšããŸããJuliaã§ã¯ãæ·»åã¯1ããå§ãŸãããšã«æ³šæããŠãã ããã",
"title": "åçŽç·š"
},
{
"paragraph_id": 114,
"tag": "p",
"text": "é
åã¯å¯å€é·ã§ãããèŠçŽ ã®è¿œå ãåé€ãå€æŽãå¯èœã§ããäŸãã°ãpush!()é¢æ°ã䜿çšããŠé
åã«èŠçŽ ãè¿œå ããããpop!()é¢æ°ã䜿çšããŠé
åããèŠçŽ ãåé€ãããããããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 115,
"tag": "p",
"text": "Juliaã®é
åã¯ãå€ãã®äŸ¿å©ãªã¡ãœãããæäŸããŠããŸãã以äžã«ãäžéšã®äž»èŠãªé
åã¡ãœããã瀺ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 116,
"tag": "p",
"text": "ãããã¯äžéšã®äž»èŠãªé
åã¡ãœããã§ãããJuliaã«ã¯ããã«å€ãã®é
åæäœé¢æ°ãçšæãããŠããŸãããããã®ã¡ãœãããçµã¿åãããŠãããŸããŸãªé
åæäœãå®è¡ã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 117,
"tag": "p",
"text": "Juliaã§é
åãå¹æçã«æäœããããã®ããã€ãã®ã€ãã£ãªã (æ
£çšå¥)ããããŸãããããã®ã€ãã£ãªã ã¯ãã³ãŒããç°¡æœã«ä¿ã¡ãªããå¹ççã«ããŒã¿ãåŠçããã®ã«åœ¹ç«ã¡ãŸãã以äžã«ããã€ãã®äžè¬çãªé
åã®ã€ãã£ãªã ã瀺ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 118,
"tag": "p",
"text": "ãããã®ã€ãã£ãªã ã䜿ãããšã§ãå¹ççã§èªã¿ãããJuliaã³ãŒããèšè¿°ã§ããŸããããããã®ç¶æ³ã«å¿ããŠãæé©ãªã€ãã£ãªã ãéžæãã掻çšããŠãã ããã",
"title": "åçŽç·š"
},
{
"paragraph_id": 119,
"tag": "p",
"text": "Juliaã®å€æ¬¡å
é
åã¯ã1次å
é
åã«äŒŒã圢åŒã§å®çŸ©ãããŸãããè€æ°ã®æ¬¡å
ãæã€é
åã§ãããèŠçŽ ãžã®ã¢ã¯ã»ã¹ã«ã¯ã€ã³ããã¯ã¹ã®ã¿ãã«ã䜿çšãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 120,
"tag": "p",
"text": "ãã¡ããJuliaã§å€æ¬¡å
é
åã䜿çšãã代衚çãªã³ãŒãäŸã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 121,
"tag": "p",
"text": "å€æ¬¡å
é
å(è¡åãªã©)ãæ±ãéã«ã䟿å©ãªã¡ãœãããããã€ããããŸãã以äžã«ãJuliaã®å€æ¬¡å
é
åã«é¢é£ããäž»èŠãªã¡ãœããã®ããã€ãã瀺ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 122,
"tag": "p",
"text": "ãããã®ã¡ãœããã¯ãå€æ¬¡å
é
åãå¹æçã«æäœããããã®ããŒã«ãšããŠåœ¹ç«ã¡ãŸããJuliaã®å€æ¬¡å
é
åã¯ãæ°å€èšç®ãããŒã¿åŠçãªã©ã®å€ãã®ã¢ããªã±ãŒã·ã§ã³ã§åºã䜿çšãããŠããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 123,
"tag": "p",
"text": "å€æ¬¡å
é
åãå¹æçã«æäœããããã®ããã€ãã®ã€ãã£ãªã (æ
£çšå¥)ããããŸãããããã®ã€ãã£ãªã ã䜿çšããããšã§ãã³ãŒããããå¹ççã«èšè¿°ã§ããŸãã以äžã«ãå€æ¬¡å
é
åã®ã€ãã£ãªã ã®ããã€ãã瀺ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 124,
"tag": "p",
"text": "ãããã®ã€ãã£ãªã ã¯ãå€æ¬¡å
é
åãæäœããéã«åœ¹ç«ã¡ãŸããé©åãªã€ãã£ãªã ãéžæããã³ãŒããå¹æçã«èšè¿°ããŠãã ããã",
"title": "åçŽç·š"
},
{
"paragraph_id": 125,
"tag": "p",
"text": "ã¿ãã«(Tuple)ã¯ãåºå®é·ã®é åºä»ãã³ã¬ã¯ã·ã§ã³ã§ãããç°ãªãåã®èŠçŽ ãæ ŒçŽã§ããŸããã¿ãã«ã¯ãªã¹ããé
åãšåæ§ã«èŠçŽ ãå«ã¿ãŸãããäžåºŠäœæãããã¿ãã«ã®èŠçŽ ã¯å€æŽã§ããŸãããã€ãŸããã¿ãã«ã¯äžå€(immutable)ã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 126,
"tag": "p",
"text": "ã¿ãã«ã¯äžžæ¬åŒ§ () ã§å²ãŸããã«ã³ã , ã§åºåãããèŠçŽ ã®ãªã¹ãã§è¡šçŸãããŸãã以äžã¯ãããã€ãã®ã¿ãã«ã®äŸã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 127,
"tag": "p",
"text": "ã¿ãã«ã¯ãé¢æ°ã®è¿ãå€ãè€æ°ã®å€ããŸãšããŠæ±ãããå Žåãªã©ã«äŸ¿å©ã§ãããŸãããã¿ãŒã³ãããã³ã°ãé¢æ°ã®åŒæ°ã®åãæž¡ããããŒã¿ã®ã°ã«ãŒãåãªã©ãããŸããŸãªçšéã§äœ¿çšãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 128,
"tag": "p",
"text": "ã¿ãã«ã®èŠçŽ ãžã®ã¢ã¯ã»ã¹ã¯ãã€ã³ããã¯ã¹ã䜿çšããŠè¡ããŸããã€ã³ããã¯ã¹ã¯1ããå§ãŸããŸããäŸãã°ãtuple1ã®3çªç®ã®èŠçŽ ã«ã¢ã¯ã»ã¹ããã«ã¯ãtuple1[3]ãšããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 129,
"tag": "p",
"text": "ã¿ãã«ã¯ã€ãã¥ãŒã¿ãã«ã§ãããããäžåºŠäœæããããšèŠçŽ ãå€æŽããããšã¯ã§ããŸãããããããã¿ãã«ã䜿çšããŠæ°ããã¿ãã«ãäœæããããšã¯ã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 130,
"tag": "p",
"text": "ã¿ãã«ã¯äžå€(immutable)ãªã®ã§ãã¿ãã«èªäœã«å€æŽãå ããã¡ãœããã¯ãããŸãããããããã¿ãã«ã«é¢ããããã€ãã®é¢æ°ãã¡ãœãããæäŸãããŠããŸãã以äžã«ããã€ãã®äŸã瀺ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 131,
"tag": "p",
"text": "ãããã®ã¡ãœãããé¢æ°ã䜿çšããããšã§ãã¿ãã«ã®å
容ãååŸããããæäœãããããããšãã§ããŸãããã ããã¿ãã«èªäœã¯äžå€ãªã®ã§ãèŠçŽ ã®å€æŽãè¿œå ãåé€ã¯ã§ããŸããã",
"title": "åçŽç·š"
},
{
"paragraph_id": 132,
"tag": "p",
"text": "ã¿ãã«ãå¹æçã«äœ¿çšããããã®ããã€ãã®ã€ãã£ãªã (æ
£çšå¥)ããããŸããã¿ãã«ã¯äžå€(immutable)ãªã®ã§ãèŠçŽ ãå€æŽããããšã¯ã§ããŸãããããã®æ§è³ªã掻ãããŠããŸããŸãªçšéã«å©çšã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 133,
"tag": "p",
"text": "以äžã«ãã¿ãã«ã®ã€ãã£ãªã ã®äžéšã瀺ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 134,
"tag": "p",
"text": "ãããã®ã€ãã£ãªã ã䜿çšããããšã§ãã¿ãã«ãå¹æçã«æŽ»çšããæè»ãªã³ãŒããèšè¿°ããããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 135,
"tag": "p",
"text": "èŸæž(Dict; Dictionary)ã¯ãããŒãšå€ã®ãã¢ãé¢é£ä»ããããŒã¿æ§é ã§ããä»ã®èšèªã§ã¯é£æ³é
åãããã·ã¥ããããšãåŒã°ããŸããJuliaã®èŸæžã¯éåžžã«æè»ã§ãç°ãªãåã®ããŒãšå€ãæã€ããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 136,
"tag": "p",
"text": "èŸæžã¯æ³¢æ¬åŒ§ {} ã§å²ãŸããããŒãšå€ã®ãã¢ã¯ã³ãã³ : ã§åºåãããŸãã以äžã¯ãããã€ãã®èŸæžã®äŸã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 137,
"tag": "p",
"text": "èŸæžã¯ãããŒã䜿çšããŠå€ã«ã¢ã¯ã»ã¹ããããšãã§ããŸããããŒã¯ãŠããŒã¯ã§ãããåãããŒã«å¯ŸããŠç°ãªãå€ãé¢é£ä»ããããšã¯ã§ããŸãããããŒãååšããªãå Žåããšã©ãŒãçºçããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 138,
"tag": "p",
"text": "èŸæžã®æäœã«ã¯ãããŒãšå€ã®è¿œå ãåé€ãå€æŽãæ€çŽ¢ãªã©ãå«ãŸããŸããèŸæžã¯ãããŒã¿ãå¹ççã«æ€çŽ¢ããã³æŽæ°ããããã«åºã䜿çšãããŸããJuliaã®èŸæžã¯ãããã·ã¥ããŒãã«ãšããŠå®è£
ãããŠãããé«éãªããŒã®æ€çŽ¢ãæäŸããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 139,
"tag": "p",
"text": "Juliaã®èŸæž(Dict)ã«ã¯ãããŸããŸãªäŸ¿å©ãªã¡ãœãããçšæãããŠããŸãã以äžã«ããã䜿ãããèŸæžã®ã¡ãœããã®äžéšã瀺ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 140,
"tag": "p",
"text": "ãããã®ã¡ãœããã䜿çšããããšã§ãèŸæžãå¹æçã«æäœããããŒã¿ãååŸããã³æŽæ°ããããšãã§ããŸããJuliaã®èŸæžã¯éåžžã«æè»ã§ãããããŸããŸãªããŒã¿æäœã«åœ¹ç«ã¡ãŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 141,
"tag": "p",
"text": "èŸæžãå¹æçã«äœ¿çšããããã®ããã€ãã®ã€ãã£ãªã (æ
£çšè¡šçŸ)ããããŸãã ãããã®ã€ãã£ãªã ã¯ãã³ãŒããããèªã¿ããããå¹ççã«ããããã«åœ¹ç«ã¡ãŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 142,
"tag": "p",
"text": "以äžã«ããã䜿ãããèŸæžã®ã€ãã£ãªã ã®ããã€ãã瀺ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 143,
"tag": "p",
"text": "ãããã®ã€ãã£ãªã ã䜿çšããããšã§ãèŸæžãå¹æçã«æäœããã³ãŒããããèªã¿ããããå¹ççã«ããããšãã§ããŸããJuliaã®èŸæžã¯ãããŒã¿ã®ãããã³ã°ãé¢é£ä»ãã«åºã䜿çšãããå€ãã®ã¢ããªã±ãŒã·ã§ã³ã§éèŠãªåœ¹å²ãæãããŠããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 144,
"tag": "p",
"text": "éåã¯ãéè€ããªãèŠçŽ ãè€æ°åä¿æããããšãã§ããã³ã¬ã¯ã·ã§ã³ã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 145,
"tag": "p",
"text": "以äžã¯Juliaã§éåãæ±ãå
žåçãªã³ãŒãäŸã§ã:",
"title": "åçŽç·š"
},
{
"paragraph_id": 146,
"tag": "p",
"text": "äžèšã®ã³ãŒãã¯ã次ã®ããšãè¡ããŸã:",
"title": "åçŽç·š"
},
{
"paragraph_id": 147,
"tag": "p",
"text": "以äžã¯Juliaã®Setåã«å«ãŸããå
žåçãªã¡ãœãããšãã®åŒæ°ãæ»ãå€ãããã³ç°¡åãªèª¬æã衚圢åŒã§ãŸãšãããã®ã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 148,
"tag": "p",
"text": "泚æ:äžèšã®è¡šã¯ãSetåãæã€ã¡ãœããã®äžéšã®ã¿ã玹ä»ãããã®ã§ãããŸããå®éã®ã³ãŒãã§ãããã®ã¡ãœãããåŒã³åºãéã«ã¯ãåŒæ°ã®åãæ°ãæ»ãå€ã®åãå
·äœçãªç¶æ³ã«å¿ããŠå€ããå¿
èŠããããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 149,
"tag": "p",
"text": "Juliaã«ãããstructã¯ãæ°ããããŒã¿åãå®çŸ©ããããã®ããŒã¯ãŒãã§ããstructã䜿çšããŠå®çŸ©ãããããŒã¿åã¯ãè€æ°ã®ãã£ãŒã«ã(å±æ§)ãæã€ããšãã§ããŸãããããã®ãã£ãŒã«ãã¯ãããŒã¿åã®æ§é ãè¡šçŸããããã«äœ¿çšãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 150,
"tag": "p",
"text": "structã®æ§æã¯æ¬¡ã®ããã«ãªããŸã:",
"title": "åçŽç·š"
},
{
"paragraph_id": 151,
"tag": "p",
"text": "äŸãã°ã2次å
ã®åº§æšãè¡šãããŒã¿åãå®çŸ©ããå Žåã次ã®ããã«structã䜿çšããŸã:",
"title": "åçŽç·š"
},
{
"paragraph_id": 152,
"tag": "p",
"text": "ãã®äŸã§ã¯ãPointãšããååã®æ°ããããŒã¿åãå®çŸ©ãããŠããŸãããã®ããŒã¿åã¯ã2ã€ã®æµ®åå°æ°ç¹æ°ãã£ãŒã«ãxãšyãæã¡ãŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 153,
"tag": "p",
"text": "structã§å®çŸ©ãããããŒã¿åã¯ãããããã®ã€ã³ã¹ã¿ã³ã¹ãåºæã®å±æ§ãæã¡ãŸããäŸãã°ã次ã®ããã«ããŠæ°ããPointã€ã³ã¹ã¿ã³ã¹ãäœæã§ããŸã:",
"title": "åçŽç·š"
},
{
"paragraph_id": 154,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãPointåã®æ°ããã€ã³ã¹ã¿ã³ã¹pãäœæãããã®xå±æ§ã«ã¯3.0ãyå±æ§ã«ã¯4.0ãæ ŒçŽãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 155,
"tag": "p",
"text": "structã䜿çšããããšã§ãé¢é£ããããŒã¿ãã²ãšãŸãšãã«ããç¬èªã®ããŒã¿åãå®çŸ©ããããšãã§ããŸããããã«ãããã³ãŒãã®æ§é ãããæ確ã«ãªããåå©çšæ§ãåäžããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 156,
"tag": "p",
"text": "Juliaã«ãããŠãstructãšã¡ãœããã¯å¯æ¥ã«é¢é£ããŠããŸããstructã§å®çŸ©ãããããŒã¿åã«ã¯ããã®ããŒã¿åã«é¢ããæäœãå®è¡ããããã®ã¡ãœãããå®çŸ©ããããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 157,
"tag": "p",
"text": "ããšãã°ãå
ã»ã©ã®Pointæ§é äœãäŸã«æãããšããã®æ§é äœã«ã¯åº§æšéã®è·é¢ãèšç®ããã¡ãœãããå®çŸ©ã§ããŸãã次ã®ããã«ããŠã¡ãœãããå®çŸ©ããŸã:",
"title": "åçŽç·š"
},
{
"paragraph_id": 158,
"tag": "p",
"text": "ãã®äŸã§ã¯ãdistanceãšããååã®é¢æ°ãå®çŸ©ããŠããŸãããã®é¢æ°ã¯ã2ã€ã®Pointåã®ã€ã³ã¹ã¿ã³ã¹ãåãåãããããã®éã®è·é¢ãèšç®ããŸãããã®ããã«ãé¢æ°ã®åŒæ°ã«åãæå®ããããšã§ããã®é¢æ°ã¯æå®ãããåã®ã€ã³ã¹ã¿ã³ã¹ã«å¯ŸããŠã®ã¿åäœããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 159,
"tag": "p",
"text": "ãã®ã¡ãœããã䜿çšãããšãäŸãã°æ¬¡ã®ããã«ããŠ2ã€ã®åº§æšéã®è·é¢ãèšç®ã§ããŸã:",
"title": "åçŽç·š"
},
{
"paragraph_id": 160,
"tag": "p",
"text": "ãã®äŸã§ã¯ã2ã€ã®Pointåã®ã€ã³ã¹ã¿ã³ã¹p1ãšp2ãäœæãããããã®éã®è·é¢ãdistanceã¡ãœããã§èšç®ããŠããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 161,
"tag": "p",
"text": "structãšã¡ãœãããçµã¿åãããããšã§ãç¹å®ã®ããŒã¿åã«å¯Ÿããæäœã容æã«å®çŸ©ããã³ãŒãã®åå©çšæ§ãåäžãããããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 162,
"tag": "p",
"text": "ãã®ç¯ã§ã¯ãJuliaã«ãããé¢æ°ãšã¡ãœããã®åºæ¬çãªæŠå¿µã«ã€ããŠèª¬æããŸããJuliaã§ã¯ãé¢æ°ã¯ç¹å®ã®åŠçãå®è¡ããããã®äžé£ã®åœä»€ããŸãšãããã®ã§ãããã¡ãœããã¯é¢æ°ã®äžçš®ã§ããªããžã§ã¯ãã®åã«ãã£ãŠæ¯ãèããç°ãªãé¢æ°ã®ããšã§ããJuliaã®é¢æ°ã¯å€éãã£ã¹ãããããµããŒãããŠãããåãé¢æ°åã§ãåŒæ°ã®åãæ°ã«ãã£ãŠç°ãªãã¡ãœãããåŒã³åºãããŸããããã«ãããæè»æ§ã®é«ãããã°ã©ãã³ã°ãå¯èœã«ãªããŸããé¢æ°ãã¡ãœããã®å®çŸ©ã¯ç°¡æœã§çŽæçã§ãããé¢æ°åããã°ã©ãã³ã°ããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®äž¡æ¹ã®æŠå¿µãçµã¿åãããŠããŸãããŸããJuliaã§ã¯é«éé¢æ°ãã¯ããŒãžã£ãªã©ã®æ©èœãè±å¯ã«åãã£ãŠãããããããçµã¿åãããããšã§ãããè€éãªåŠçãã·ã³ãã«ãªåœ¢ã§èšè¿°ããããšãå¯èœã§ãããã®ç¯ã§ã¯ãJuliaã«ãããé¢æ°ãšã¡ãœããã®äœ¿ãæ¹ãå®çŸ©æ¹æ³ããããŠå€éãã£ã¹ããããã©ã®ããã«åäœããããªã©ã«ã€ããŠè©³ãã解説ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 163,
"tag": "p",
"text": "é¢æ°ã¯ãå
¥åå€ãåãåããããããåŠçããçµæãåºåããæç¶ããæäœãæããŸããããã°ã©ãã³ã°ã«ãããŠãé¢æ°ã¯åå©çšå¯èœã§ç¬ç«ããã³ãŒããããã¯ãè¡šããç¹å®ã®ã¿ã¹ã¯ãèšç®ãå®è¡ããããã«äœ¿çšãããŸããé¢æ°ã¯ãããã°ã©ã ã®æ§é åãå¹ççãªã³ãŒãã®èšè¿°ãåŠçã®åå²ãšæœè±¡åãå¯èœã«ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 164,
"tag": "p",
"text": "é¢æ°ã¯ã次ã®ãããªç¹æ§ãæã€ããšããããŸã:",
"title": "åçŽç·š"
},
{
"paragraph_id": 165,
"tag": "p",
"text": "é¢æ°ã¯ãããã°ã©ã èšèªããã¬ãŒã ã¯ãŒã¯ã«ãã£ãŠç°ãªãæ§æãæ©èœãæã€ããšããããŸãããåºæ¬çãªæŠå¿µãšç®çã¯ã»ãŒåãã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 166,
"tag": "p",
"text": "é¢æ°ã®å®çŸ©ãšåŒã³åºãã¯ãJuliaã«ãããŠéåžžã«ã·ã³ãã«ã§çŽæçã§ãã以äžã«ãåºæ¬çãªæ¹æ³ã瀺ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 167,
"tag": "p",
"text": "Juliaã§ã¯ãé¢æ°ã¯ function ããŒã¯ãŒãã䜿ã£ãŠå®çŸ©ãããŸããé¢æ°ã1ã€ã®åŒã§è¡šãããå Žåãçã圢åŒã®å®çŸ©ãå¯èœã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 168,
"tag": "p",
"text": "Juliaã«ãããåºæ¬çãªé¢æ°å®çŸ©ã®æ§æã¯ä»¥äžã®éãã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 169,
"tag": "p",
"text": "ãŸãã¯ãç瞮圢ãšããŠä»¥äžã®ããã«æžãããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 170,
"tag": "p",
"text": "ãããã®æ§æã«ã€ããŠè©³çŽ°ã«èª¬æããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 171,
"tag": "p",
"text": "function ããŒã¯ãŒããš end ããŒã¯ãŒãã䜿çšããŠé¢æ°ãå®çŸ©ããå Žåãend ã®çŽåã« return ã䜿çšããŠæ»ãå€ãæå®ããŸããç瞮圢ã®æ§æã§ã¯ãreturn ããŒã¯ãŒãã¯çç¥ãããé¢æ°æ¬äœã®æåŸã®åŒã®å€ãèªåçã«æ»ãå€ãšãªããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 172,
"tag": "p",
"text": "é¢æ°ã®æ»ãå€ã¯ãé¢æ°ãåŠçãå®è¡ããåŸã«åŒã³åºãå
ã«è¿ãããå€ã§ããJuliaã§ã¯ãé¢æ°ãå€ãè¿ãéã« return ããŒã¯ãŒãã䜿çšããŸãããreturn ãæ瀺çã«æžããªããŠããé¢æ°ã®æåŸã«è©äŸ¡ãããåŒãèªåçã«æ»ãå€ãšãªããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 173,
"tag": "p",
"text": "以äžã«ãé¢æ°ã®æ»ãå€ã®å®çŸ©æ¹æ³ãšåŒã³åºãæ¹ã®äŸã瀺ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 174,
"tag": "p",
"text": "ãããã¯",
"title": "åçŽç·š"
},
{
"paragraph_id": 175,
"tag": "p",
"text": "äžèšã®äŸã§ã¯ãadd é¢æ°ã x ãš y ã®åèšãè¿ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 176,
"tag": "p",
"text": "add(3, 5) ãåŒã³åºããšãé¢æ°å
㧠x ãš y ãåèšããçµæãæ»ãå€ãšãªããresult å€æ°ã«ä»£å
¥ãããŸãããã®åŸãprintln(result) ã䜿ã£ãŠçµæãåºåãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 177,
"tag": "p",
"text": "Juliaã§ã¯ãé¢æ°ã®æåŸã«è©äŸ¡ãããåŒãèªåçã«æ»ãå€ãšãªããããreturn ããŒã¯ãŒããçç¥ããŠãåé¡ãããŸããã",
"title": "åçŽç·š"
},
{
"paragraph_id": 178,
"tag": "p",
"text": "é¢æ°ã®åŒã³åºãã¯ãé¢æ°åã«åŒæ°ãæž¡ãããšã§è¡ããŸããåŒæ°ã¯ã«ã³ãã§åºåãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 179,
"tag": "p",
"text": "Juliaã§ã¯ãããã©ã«ãåŒæ°ãæã€é¢æ°ãå®çŸ©ããããšãã§ããŸããããã©ã«ãåŒæ°ãæã€ãã©ã¡ãŒã¿ã¯ãé¢æ°ã®åŒã³åºãæã«çç¥ããããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 180,
"tag": "p",
"text": "ãŸããããŒã¯ãŒãåŒæ°ã䜿ã£ãŠé¢æ°ãå®çŸ©ããããšãã§ããŸããããã«ãããåŒæ°ã®æå³ãæ確ã«ããããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 181,
"tag": "p",
"text": "Juliaã®é¢æ°ã¯éåžžã«æè»ã§ãããæ§ã
ãªåŒæ°ã®åœ¢åŒããµããŒãããŠããŸããããã«ãããé¢æ°ãããå¹æçã«äœ¿çšããããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 182,
"tag": "p",
"text": "Juliaã¯åçåä»ãèšèªã§ãããé¢æ°ã®åŒæ°ãæ»ãå€ã®åãæ瀺çã«æå®ããå¿
èŠã¯ãããŸããã代ããã«ãJuliaã®åæšè«æ©èœãé¢æ°ã®åŒæ°ãæ»ãå€ã®åãèªåçã«æšè«ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 183,
"tag": "p",
"text": "以äžã¯ãåæšè«ãè¡ãããäŸã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 184,
"tag": "p",
"text": "ãã®äŸã§ã¯ãadd é¢æ°ã®åŒæ° x ãš y ã¯æ瀺çãªå泚éãäžããããŠããŸããããJuliaã¯äžããããåŒæ°ãæŽæ°ã§ããããšãæšè«ããŸãããŸããadd é¢æ°ã®æ»ãå€ã®åãæŽæ°ãšããŠæšè«ãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 185,
"tag": "p",
"text": "ãã®äŸã§ã¯ãadd é¢æ°ã¯ãžã§ããªãã¯é¢æ°ãšããŠå®çŸ©ãããŠããŸãããžã§ããªãã¯é¢æ°ã¯ãç¹å®ã®åã«äŸåãããç°ãªãåã®åŒæ°ã«å¯ŸããŠåäœããããã«èšèšãããŠããŸããJuliaã®åæšè«æ©èœãé¢æ°ã®åŒæ°ãæ»ãå€ã®åãèªåçã«æšè«ããããšã§ããžã§ããªãã¯é¢æ°ãç°ãªãåã®åŒæ°ã«å¯ŸããŠé©åã«åäœããããšãå¯èœã«ãªããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 186,
"tag": "p",
"text": "以äžã¯ãåæšè«ã倱æããå¯èœæ§ã®ããã³ãŒãäŸã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 187,
"tag": "p",
"text": "ãã®äŸã§ã¯ãmy_funcé¢æ°ã¯åŒæ° x ãåãåããŸãããæ¡ä»¶ã«å¿ããŠæååãŸãã¯æŽæ°ãè¿ããŸãããã®ãããªå Žåãåæšè«ã¯å€±æããJuliaã¯é©åãªåãæšè«ã§ããŸããããã®çµæãmy_func(5)ãåŒã³åºããšãåã®äžè²«æ§ããªããããšã©ãŒãçºçããå¯èœæ§ããããŸãããã®åé¡ã解決ããã«ã¯ãé¢æ°ã®æ»ãå€ã®åãæ瀺çã«æå®ããããé¢æ°ãåèšèšããŠåã®äžè²«æ§ã確ä¿ããå¿
èŠããããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 188,
"tag": "p",
"text": "å€éãã£ã¹ããã(Multiple Dispatch)ã¯ãããã°ã©ãã³ã°èšèªã«ãããŠãé¢æ°ã®æ¯ãèããåŒæ°ã®åãåæ°ã«ãã£ãŠåçã«æ±ºå®ããæ©èœã§ããéåžžã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã§ã¯ãã¡ãœããã®åŒã³åºãã¯äžè¬çã«ã¬ã·ãŒã(ãªããžã§ã¯ã)ã®åã«åºã¥ããŠè¡ãããŸãããå€éãã£ã¹ãããã§ã¯ãåŒæ°ã®åãåæ°ã«åºã¥ããŠã¡ãœããã®åŒã³åºãã解決ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 189,
"tag": "p",
"text": "Juliaã®å€éãã£ã¹ãããã¯ãé¢æ°ãè€æ°ã®ã·ã°ããã£(åŒæ°ã®åãšåæ°ã®çµã¿åãã)ãæã¡ãå®è¡æã«æé©ãªã·ã°ããã£ãéžæããããšããä»çµã¿ã§ããããã«ãããåãé¢æ°åã䜿çšããŠç°ãªãåŒæ°åã«å¯Ÿå¿ããè€æ°ã®å®è£
ãå®çŸ©ããããšãã§ããŸããããã«ãæ°ããåãå®çŸ©ãããšãã«æ¢åã®é¢æ°ã«å¯ŸããŠæ°ããå®è£
ãè¿œå ããããšã容æã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 190,
"tag": "p",
"text": "å€éãã£ã¹ãããã¯ãéçãªåä»ãèšèªãåçãªåä»ãèšèªã®äž¡æ¹ã§å©çšãããŸãããJuliaã®ãããªåçåä»ãèšèªã§ã¯ç¹ã«åŒ·åãªæ©èœãšããŠæŽ»çšãããŠããŸããå€éãã£ã¹ãããã«ãããæè»æ§ãšå¹çæ§ãäž¡ç«ãããªãããè€éãªããã°ã©ã ã®èšè¿°ãæ¡åŒµã容æã«ãªããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 191,
"tag": "p",
"text": "以äžã¯ãJuliaã§ã®å€éãã£ã¹ãããã®ã³ãŒãäŸã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 192,
"tag": "p",
"text": "ãã®äŸã§ã¯ãadd é¢æ°ãæŽæ°åãæµ®åå°æ°ç¹æ°åãæåååã®åŒæ°ãåãåããããããã®åã«å¯Ÿå¿ããæ¯ãèããå®çŸ©ããŠããŸããé¢æ°ãåŒã³åºãéã«ã¯ãåŒæ°ã®åã«å¿ããŠé©åãªå®è£
ãéžæãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 193,
"tag": "p",
"text": "å€éãã£ã¹ãããã¯ä»ã®ããã°ã©ãã³ã°èšèªã§ã¯ãå€éå®çŸ©(Overloading)ãããã¯å€æ
æ§(Polymorphism)ãšãèšãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 194,
"tag": "p",
"text": "å¯å€åŒæ°ã¯ãé¢æ°ã«å¯å€é·ã®åŒæ°ãæž¡ãããã®ä»çµã¿ã§ããJuliaã§ã¯ãé¢æ°ã®åŒæ°ã®æåŸã«äžç¹ãªãŒããŒ(...)ã䜿ã£ãŠå¯å€åŒæ°ãæå®ããŸããããã«ãããé¢æ°åŒã³åºãæã«ä»»æã®æ°ã®åŒæ°ãæž¡ãããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 195,
"tag": "p",
"text": "以äžã¯ãå¯å€åŒæ°ãæã€é¢æ°ã®äŸã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 196,
"tag": "p",
"text": "ãã®äŸã§ã¯ãsum_valuesé¢æ°ã¯æåã®åŒæ° x ãšå¯å€é·ã®åŒæ° y ãåãåãããããã®å€ãåèšããŠè¿ããŸããy ã®éšåã«ã¯ä»»æã®æ°ã®åŒæ°ãæž¡ãããããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 197,
"tag": "p",
"text": "å€å€è¿ãã¯ãé¢æ°ãè€æ°ã®å€ãè¿ãããšãæå³ããŸããJuliaã§ã¯ãã¿ãã«ã䜿çšããŠè€æ°ã®å€ããŸãšããŠè¿ãããšãã§ããŸãã以äžã¯ãå€å€è¿ãã®äŸã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 198,
"tag": "p",
"text": "ãã®äŸã§ã¯ãdivide_remainderé¢æ°ã2ã€ã®æŽæ°ãåãåããåãšäœããèšç®ããŠã¿ãã«ãšããŠè¿ããŸããé¢æ°ãåŒã³åºããåŸãã¿ãã«ã®èŠçŽ ã«ã¯ã€ã³ããã¯ã¹ã䜿çšããŠã¢ã¯ã»ã¹ã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 199,
"tag": "p",
"text": "Juliaã§ã¯ãé¢æ°åŒã³åºãæã«é
åãå±éããŠãè€æ°ã®åŒæ°ãšããŠæž¡ãããšãã§ããŸããããã«ãããé¢æ°ãå¯å€æ°ã®åŒæ°ãåãå Žåããè€æ°ã®èŠçŽ ããŸãšããŠé¢æ°ã«æž¡ãå Žåã«äŸ¿å©ã§ãã以äžã¯ãé
åå±éã䜿çšããé¢æ°åŒã³åºãã®äŸã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 200,
"tag": "p",
"text": "ãã®äŸã§ã¯ãsum_of_three_numbersé¢æ°ã3ã€ã®åŒæ°ãåãããããã®å€ã®åèšãè¿ããŸããargsãšããé
åãå®çŸ©ãããã®é
åã...ã䜿ã£ãŠé¢æ°åŒã³åºãæã«å±éããŠããŸããããã«ãããé
åã®åèŠçŽ ãåå¥ã®åŒæ°ãšããŠé¢æ°ã«æž¡ãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 201,
"tag": "p",
"text": "ç¡åé¢æ°(Anonymous Function)ã¯ãååãæããªãé¢æ°ã®ããšã§ããéåžžãé¢æ°ãå®çŸ©ããéã«ã¯ååãæå®ãããŸãããç¡åé¢æ°ã¯ååããªãããã®å Žã§å®çŸ©ãããŸããç¡åé¢æ°ã¯ãäžè¬çã«ä»ã®é¢æ°ã®åŒæ°ãšããŠæž¡ãããããé«éé¢æ°å
ã§äœ¿çšããããããŸããJuliaã§ã¯ãç¡åé¢æ°ã¯functionããŒã¯ãŒãã䜿çšããã«ãç°¡æœã«è¡šçŸããããšãã§ããŸããäŸãã°ãx -> x^2ãšããåŒã¯ãåŒæ°xã«å¯ŸããŠxã®äºä¹ãè¿ãç¡åé¢æ°ãè¡šããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 202,
"tag": "p",
"text": "以äžã¯ãJuliaã§ç¡åé¢æ°ã䜿çšããã³ãŒãäŸã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 203,
"tag": "p",
"text": "Juliaã§ã¯ãç¡åé¢æ°ãå®çŸ©ããŠããã«å®è¡ããããšãã§ããŸãããããå³æé¢æ°ãšåŒã³ãŸãã以äžã¯ãã®äŸã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 204,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ã(x -> x^2)ãç¡åé¢æ°ã§ããããã®åŸã®(5)ã§ãã®ç¡åé¢æ°ãããã«å®è¡ãããŠããŸãããã®çµæãresultã«ã¯5^2ã§ãã25ã代å
¥ãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 205,
"tag": "p",
"text": "Juliaã§ã¯ãç¡åé¢æ°ãã©ã ãåŒãŸãã¯å¿åé¢æ°ãšåŒã³ãŸãããã®ãããäžèšã®äŸã¯ã©ã ãåŒã䜿ã£ãŠç¡åé¢æ°ãå®çŸ©ããå³æã«å®è¡ããŠããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 206,
"tag": "p",
"text": "Juliaã«ãããdoãããã¯ã¯ãé¢æ°ããã¯ãã®åŒã³åºãæã«ããã®é¢æ°ããã¯ãã«å¯ŸããŠãããã¯ãæž¡ãããã®æ§æã§ããéåžžãé¢æ°ããã¯ãã«å¯ŸããŠ1ã€ä»¥äžã®åŒãæž¡ãå¿
èŠãããå Žåã«äœ¿çšãããŸããdoãããã¯ã¯ãé¢æ°åããã°ã©ãã³ã°ãã³ãŒã«ããã¯é¢æ°ã®å®çŸ©ãªã©ã®å Žé¢ã§ãã䜿çšãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 207,
"tag": "p",
"text": "å
·äœçã«ã¯ã以äžã®ãããªåœ¢åŒã§äœ¿çšãããŸã:",
"title": "åçŽç·š"
},
{
"paragraph_id": 208,
"tag": "p",
"text": "ãŸãã¯ããã¯ãã®å Žå:",
"title": "åçŽç·š"
},
{
"paragraph_id": 209,
"tag": "p",
"text": "doãããã¯å
ã«ã¯ãä»»æã®ã³ãŒããå«ãŸããããšãã§ããŸãããã®ãããã¯å
ã®ã³ãŒãã¯ãé¢æ°ããã¯ãã®æ¬äœå
ã§åç
§ãããããšããããŸããdoãããã¯ã¯ãé¢æ°ã®åŒæ°ãšããŠæž¡ãããšãã§ããç¡åé¢æ°ãã¯ããŒãžã£ãå®çŸ©ããã®ã«äŸ¿å©ã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 210,
"tag": "p",
"text": "doãããã¯ã¯ãã€ãã¬ãŒã¿ããžã§ãã¬ãŒã¿ãšçµã¿åãããŠäœ¿çšãããããšããããããŸãã ãã®å Žåãdoãããã¯å
ã®ã³ãŒãã¯ãã€ãã¬ãŒã·ã§ã³äžã«å®è¡ãããåŠçãå®çŸ©ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 211,
"tag": "p",
"text": "äŸãã°ã次ã®ã³ãŒãã¯é
åã®åèŠçŽ ã2åã«ããäŸã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 212,
"tag": "p",
"text": "ãã®äŸã§ã¯ãmapé¢æ°ã«doãããã¯ã䜿çšããŠãåèŠçŽ ã2åã«ããç¡åã®é¢æ°ãå®çŸ©ããŠããŸãããã®ç¡åã®é¢æ°ã¯ãxãšããåŒæ°ãåãããã®åŒæ°ã2åã«ããŠè¿ããŸããmapé¢æ°ã¯ãã®ç¡åã®é¢æ°ãé
åã®åèŠçŽ ã«é©çšããçµæãresultå€æ°ã«æ ŒçŽããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 213,
"tag": "p",
"text": "doãããã¯ã䜿çšããããšã§ãã³ãŒããããç°¡æœã§èªã¿ããããªããé¢æ°ãããæè»ã«äœ¿çšããããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 214,
"tag": "p",
"text": "Juliaã§ã¯doãããã¯ã䜿çšããŠãæè»ã§æ¡åŒµå¯èœãªã³ãŒããæžãããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 215,
"tag": "p",
"text": "ã³ãŒããããã¯ã¯ãããã°ã©ã å
ã§è€æ°ã®æããŸãšããŠå®è¡ããããã®æ§é ã§ããJuliaã§ã¯ãbeginããŒã¯ãŒããšendããŒã¯ãŒãã§å²ãã éšåãã³ãŒããããã¯ãšãªããŸããããã«ãããè€æ°ã®æã1ã€ã®ãŸãšãŸããšããŠæ±ãããšãã§ããŸããã³ãŒããããã¯ã®æåŸã®åŒã®å€ãããã®ãããã¯å
šäœã®å€ãšãªããŸããã³ãŒããããã¯ã¯ãé¢æ°ã®äžã§ã®ã¿äœ¿çšããã®ã§ã¯ãªããä»»æã®ã¹ã³ãŒãå
ã§äœ¿çšããããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 216,
"tag": "p",
"text": "以äžã¯ãJuliaã§ã®ã³ãŒããããã¯ã®äœ¿çšäŸã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 217,
"tag": "p",
"text": "ãããã®äŸã§ã¯ãbeginããŒã¯ãŒããšendããŒã¯ãŒãããŸãã¯ã«ãã³ã§ããã£ãéšåãã³ãŒããããã¯ãšããŠæ©èœãããã®äžã«è€æ°ã®æãå«ãŸããŠããŸããæåŸã®åŒã§ããx + yã®çµæãããããã®ã³ãŒããããã¯å
šäœã®å€ãšãªããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 218,
"tag": "p",
"text": "é«éé¢æ°ãšã¯ãä»ã®é¢æ°ãåŒæ°ãšããŠåãåããããŸãã¯é¢æ°ãæ»ãå€ãšããŠè¿ãé¢æ°ã®ããšã§ããå
·äœçã«ã¯ãmapãreduceãfilter ãªã©ã®é¢æ°ããã®ä»£è¡šçãªäŸã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 219,
"tag": "p",
"text": "ãããã®é¢æ°ã¯ãã³ãŒãã®ç°¡æœããšå¯èªæ§ãåäžãããåããããªæäœãç¹°ãè¿ãå®è¡ããå¿
èŠæ§ã軜æžããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 220,
"tag": "p",
"text": "å
å
è¡šèšã䜿çšããŠåãããžãã¯ãè¡šçŸããããšãã§ããŸãã以äžã«ãmapãfilterãreduce ãããããå
å
è¡šèšã§å®è£
ããäŸã瀺ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 221,
"tag": "p",
"text": "å
å
è¡šèšã¯ãé¢æ°ã®åŒã³åºããæžãããã³ãŒããããç°¡æœã«ããã®ã«åœ¹ç«ã¡ãŸãããã®ãããªæ©èœã¯ãJuliaã®æè»æ§ãšè¡šçŸåã®äžéšã§ãããããç°¡æœãªã³ãŒããæžãããã®åŒ·åãªããŒã«ãšãªããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 222,
"tag": "p",
"text": "ååž°çåŒã³åºãã¯ãé¢æ°ãèªåèªèº«ãåŒã³åºãããšãæããŸããããã¯åé¡ã解ãã®ã«éåžžã«åŒ·åãªææ³ã§ãããç¹ã«åé¡ãååž°çãªæ§è³ªãæã€å Žåã«æçšã§ããJuliaã§ã¯ãååž°çåŒã³åºãã¯éåžžã®é¢æ°åŒã³åºããšåãããã«è¡ãããŸãããé©åãªçµäºæ¡ä»¶ãèšå®ããããšãéèŠã§ããå
žåçãªäŸãšããŠã¯ãéä¹ã®èšç®ãååž°çãªããŒã¿æ§é ã®æäœããããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 223,
"tag": "p",
"text": "ãã®äŸã§ã¯ãfactorialé¢æ°ãèªåèªèº«ãåŒã³åºããŠããŸããçµäºæ¡ä»¶ãšããŠãnã0ãŸãã¯1ã®å Žåã«ã¯1ãè¿ãããã以å€ã®å Žåã«ã¯nãšfactorial(n - 1)ã®ç©ãè¿ããŸããããã«ããã5ã®éä¹ãèšç®ãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 224,
"tag": "p",
"text": "æ«å°Ÿååž°(tail recursion)ã¯ãååž°é¢æ°ãèªå·±åŒã³åºãã®æåŸã®æäœãšããŠååž°ãè¡ã圢åŒãæããŸããæ«å°Ÿååž°ã®ç¹åŸŽã¯ãååž°åŒã³åºããé¢æ°ã®æåŸã«äœçœ®ãããããæ°ããã¹ã¿ãã¯ãã¬ãŒã ãçæãããããšãªããååž°ã®å¹çãåäžããããšã§ããããã«ãããååž°ãæ·±ããªã£ãŠãã¹ã¿ãã¯ãªãŒããŒãããŒã®ãªã¹ã¯ã軜æžãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 225,
"tag": "p",
"text": "Juliaã§ã¯ãæ«å°Ÿååž°æé©åãå¯èœã§ãããååž°é¢æ°ãæ«å°Ÿååž°ã®åœ¢åŒã§ããã°ãæé©åãèªåçã«é©çšãããŸããã€ãŸããæ«å°Ÿååž°ã䜿ã£ãé¢æ°ã¯ãéåžžã«å€§ããªå
¥åã«å¯ŸããŠãå¹ççã«åäœããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 226,
"tag": "p",
"text": "ãã®äŸã§ã¯ãfactorialé¢æ°ãæ«å°Ÿååž°ã®åœ¢åŒã§å®è£
ãããŠããŸããååž°åŒã³åºããé¢æ°ã®æåŸã®æäœãšããŠè¡ãããŠãããæé©åãããããŒãžã§ã³ã®æ«å°Ÿååž°ãšããŠå®è¡ãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 227,
"tag": "p",
"text": "ã¯ããŒãžã£ã¯ãé¢æ°ãšãã®é¢æ°ãåç
§ããç°å¢(å€æ°ãé¢æ°ãªã©)ãå
ã¿èŸŒãã ãã®ã§ããããã«ãããå€éšå€æ°ãå€éšé¢æ°ãå
éšã®é¢æ°ãå©çšã§ããããã«ãªããŸããã¯ããŒãžã£ã¯ãç¹å®ã®ç¶æ
ãä¿æãããããå©çšããŠåäœããé¢æ°ãå®çŸ©ããå Žåã«äŸ¿å©ã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 228,
"tag": "p",
"text": "ãã®äŸã§ã¯ãmake_multiplieré¢æ°ãã¯ããŒãžã£ãçæããŸããmake_multiplieré¢æ°ã¯ãxãåŒæ°ãšããŠåãåããç¡åé¢æ°y -> x * yãè¿ããŸãããã®ç¡åé¢æ°ã¯å€éšã®å€æ°xãåç
§ããŠããããã®å€ãä¿æããŠããŸããmake_multiplier(5)ãè¿ãé¢æ°ãmul_by_5ã«å²ãåœãŠãŠåŒã³åºãããšã§ãå€éšå€æ°xã®å€ã5ã§ããã¯ããŒãžã£ãäœæãããåŒæ°ã«æž¡ãããå€ãšã®ä¹ç®ãè¡ãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 229,
"tag": "p",
"text": "ã«ãªãŒå(currying)ã¯ãè€æ°ã®åŒæ°ãæã€é¢æ°ãã1ã€ã®åŒæ°ãåãåãé¢æ°ã®é£éã«å€æããããã»ã¹ã§ããå
·äœçã«ã¯ãè€æ°ã®åŒæ°ãæã€é¢æ°ãéšåé©çšããŠæ°ããé¢æ°ãçæããããšã§ã1ã€ã®åŒæ°ãåãåãé¢æ°ã«å€æããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 230,
"tag": "p",
"text": "ãã®äŸã§ã¯ãaddé¢æ°ã2ã€ã®åŒæ°ãåãåãé¢æ°ã§ããcurried_addé¢æ°ã¯ãaddé¢æ°ãã«ãªãŒåããŠ1ã€ã®åŒæ°ãåãåãé¢æ°ãè¿ããŸãããã®ã«ãªãŒåãããé¢æ°ã䜿ã£ãŠãæ°ããé¢æ°add_fiveãçæããããã«åŒæ°3ãäžããŠåŒã³åºãããšã§ãæçµçãªçµæãåŸãŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 231,
"tag": "p",
"text": "ãžã§ããªãã¯é¢æ°ã¯ãè€æ°ã®ããŒã¿åã«å¯ŸããŠåãååã®é¢æ°ãå®çŸ©ããããããã®ããŒã¿åã«å¿ããåäœãè¡ãä»çµã¿ã§ããããã«ãããåã«äŸåããªãæ±çšçãªé¢æ°ãäœæããããšãã§ããŸããJuliaã§ã¯ãé¢æ°ã®å€éãã£ã¹ããããå©çšããŠãžã§ããªãã¯é¢æ°ãå®çŸ©ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 232,
"tag": "p",
"text": "ãã®äŸã§ã¯ãmyfuncãšããååã®ãžã§ããªãã¯é¢æ°ãå®çŸ©ãããŠããŸãããã®é¢æ°ã¯ãæŽæ°åãšæµ®åå°æ°ç¹æ°åã®åŒæ°ãåã2ã€ã®ããŒãžã§ã³ããããŸããåŒæ°ã®åã«å¿ããŠãé©åãªé¢æ°ãåŒã³åºãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 233,
"tag": "p",
"text": "Juliaã®å Žåãåã¢ãããŒã·ã§ã³ãæ瀺çã«è¡ãããšãå°ãªãã®ã§ãç¡èªèŠã«ãžã§ããªãã¯é¢æ°ãå®çŸ©ããŠããããšãå€ãã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 234,
"tag": "p",
"text": "ãžã§ãã¬ãŒã¿(Generators)ã¯ãé
延è©äŸ¡ãå©çšããŠèŠçŽ ãåçã«çæããããã®æ©èœã§ãããžã§ãã¬ãŒã¿ã¯ãéåžžã®é¢æ°ãšåæ§ã«å®çŸ©ãããŸãããyieldããŒã¯ãŒãã䜿çšããŠèŠçŽ ãçæããŸãããžã§ãã¬ãŒã¿ã¯ãäžåºŠã«ãã¹ãŠã®èŠçŽ ãçæãããå¿
èŠã«å¿ããŠèŠçŽ ãçæããŸããããã«ããã倧èŠæš¡ãªããŒã¿ã»ãããå¹ççã«åŠçããããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 235,
"tag": "p",
"text": "以äžã¯ããžã§ãã¬ãŒã¿ã®åºæ¬çãªäŸã§ã:",
"title": "åçŽç·š"
},
{
"paragraph_id": 236,
"tag": "p",
"text": "ãã®äŸã§ã¯ãmygeneratoré¢æ°ããžã§ãã¬ãŒã¿ãå®çŸ©ãã1ãã5ãŸã§ã®æ°å€ãé çªã«è¿ããŸãããžã§ãã¬ãŒã¿ã¯ãforã«ãŒããªã©ã®ã€ãã¬ãŒã·ã§ã³æ§é ã§äœ¿çšãããããšãäžè¬çã§ãããžã§ãã¬ãŒã¿ã¯é
延è©äŸ¡ãè¡ãããã倧èŠæš¡ãªããŒã¿ã»ãããæ±ãéã«éåžžã«äŸ¿å©ã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 237,
"tag": "p",
"text": "Juliaã®ã€ãã¬ãŒã¿(Iterators)ã¯ãããŒã¿ã®ã·ãŒã±ã³ã¹ãå埩åŠçããããã®æ©èœã§ããã€ãã¬ãŒã¿ã¯ãç¹å®ã®ããŒã¿æ§é (é
åãç¯å²ãã³ã¬ã¯ã·ã§ã³ãªã©)ã®èŠçŽ ã«é çªã«ã¢ã¯ã»ã¹ããæ¹æ³ãæäŸããŸããããã«ããã倧ããªããŒã¿ã»ãããç¡éã®ã·ãŒã±ã³ã¹ãå¹ççã«æ±ãããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 238,
"tag": "p",
"text": "Juliaã®ã€ãã¬ãŒã¿ã¯ãé
延è©äŸ¡(Lazy evaluation)ã®æŠå¿µãå©çšããŠãããã€ãã¬ãŒã·ã§ã³ãå¿
èŠãªæç¹ã§ã®ã¿èŠçŽ ãèšç®ãããŸããããã«ãããã¡ã¢ãªãèšç®ãªãœãŒã¹ãç¯çŽãã€ã€ãå¿
èŠãªèŠçŽ ã«é çªã«ã¢ã¯ã»ã¹ã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 239,
"tag": "p",
"text": "ããŸããŸãªã€ãã¬ãŒã¿é¢æ°ãæäŸãããŠãããããããçµã¿åãããããšã§ãããŒã¿ã®ãã£ã«ã¿ãªã³ã°ãååãéçŽãçµåãªã©ã®æäœãæè»ã«å®è¡ã§ããŸããã€ãã¬ãŒã¿ã¯ãJuliaã®ã³ãŒããããå¹ççãã€ç°¡æœã«ããããã®éèŠãªèŠçŽ ã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 240,
"tag": "p",
"text": "ãã®ã³ãŒãã¯ãJuliaã§çŽ æ°ãå€å®ããé¢æ° is_prime ãšãçŽ æ°ãè¿ãã€ãã¬ãŒã¿ PrimeIter ãå®çŸ©ããŠããŸãã以äžã«ãããããã®éšåã®è§£èª¬ãè¡ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 241,
"tag": "p",
"text": "ãã®ã³ãŒããå®è¡ãããšã2ãã7ãŸã§ã®çŽ æ°ãé çªã«åºåãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 242,
"tag": "p",
"text": "ãã¡ã€ã«ã®èªã¿æžããã¢ãžã¥ãŒã«ã®äœæã»äœ¿çšæ¹æ³ãåŠã³ãŸããå€éšãã¡ã€ã«ããããŒã¿ãèªã¿èŸŒãã ããçµæããã¡ã€ã«ã«æžãåºãããããããšã¯ãå®éã®ããã°ã©ãã³ã°ã§éåžžã«éèŠã§ãããŸããã¢ãžã¥ãŒã«ã䜿çšããããšã§ãé¢é£ããé¢æ°ãåããŸãšããŠå¹æçã«ç®¡çããåå©çšå¯èœãªã³ãŒããäœæããããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 243,
"tag": "p",
"text": "Juliaã§ãã¡ã€ã«ã®å
¥åºåãè¡ãããã«ã¯ãæšæºã®ãã¡ã€ã«æäœé¢æ°ãããã±ãŒãžã䜿çšããŸãã以äžã«ãåºæ¬çãªãã¡ã€ã«ã®èªã¿æžãæäœã®æ¹æ³ã瀺ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 244,
"tag": "p",
"text": "ãããã¯ãJuliaã§ãã¡ã€ã«ã®å
¥åºåãè¡ãåºæ¬çãªæ¹æ³ã®äžéšã§ãã ãã¡ã€ã«ã®èªã¿èŸŒã¿ãæžã蟌ã¿æäœãè¡ãéã«ã¯ãé©åãªãšã©ãŒãã³ããªã³ã°ãè¡ãããšãéèŠã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 245,
"tag": "p",
"text": "Juliaã®ãã¡ã€ã«I/Oã¯ãããŸããŸãªãŠãŒã¹ã±ãŒã¹ã§æŽ»çšãããŸãã以äžã«ãäžè¬çãªãŠãŒã¹ã±ãŒã¹ã®äŸã瀺ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 246,
"tag": "p",
"text": "ãããã®ãŠãŒã¹ã±ãŒã¹ã¯ãJuliaã®ãã¡ã€ã«I/Oæ©èœãåºã掻çšãããŠããäŸã§ããJuliaã®æè»ãªãã¡ã€ã«I/Oæ©èœã掻çšããããšã§ãããŸããŸãªããŒã¿åŠçããã¡ã€ã«æäœãå¹ççã«è¡ãããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 247,
"tag": "p",
"text": "Juliaã§ãã¡ã€ã«ã®å
¥åºå(I/O)ãè¡ãéã®ãã¹ããã©ã¯ãã£ã¹ã«ã¯ã以äžã®ãããªãã®ããããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 248,
"tag": "p",
"text": "ãããã®ãã¹ããã©ã¯ãã£ã¹ã«åŸãããšã§ãJuliaã§ã®ãã¡ã€ã«ã®å
¥åºåæäœãããå®å
šã§å¹ççã«è¡ãããšãã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 249,
"tag": "p",
"text": "Juliaã®ã¢ãžã¥ãŒã«ã¯ãã³ãŒãããŸãšããŠç®¡çããããã®æ©æ§ã§ãã以äžã¯ãJuliaã®ã¢ãžã¥ãŒã«ã«é¢ããäž»ãªãã€ã³ãã§ã:",
"title": "åçŽç·š"
},
{
"paragraph_id": 250,
"tag": "p",
"text": "Juliaã®åå空é管çã«ã¯ã修食åããšã¯ã¹ããŒããªã¹ããç¹å®ã®èå¥åã®ã€ã³ããŒãããšã¯ã¹ããŒããªã©ã®æŠå¿µãå«ãŸããŸã:",
"title": "åçŽç·š"
},
{
"paragraph_id": 251,
"tag": "p",
"text": "Juliaã®ã¢ãžã¥ãŒã«ã·ã¹ãã ã¯ãæè»æ§ããããå¹æçãªåå空é管çæ©èœãæäŸããŠããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 252,
"tag": "p",
"text": "Juliaã§ã®ã¢ãžã¥ãŒã«ã®å®çŸ©ãšäœ¿çšã®äŸã瀺ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 253,
"tag": "p",
"text": "ãã®äŸã§ã¯ãMyModule ãšããååã®ã¢ãžã¥ãŒã«ãå®çŸ©ãããã®äžã§ my_function ãšããé¢æ°ãå®çŸ©ããŠããŸãããã®åŸãusing .MyModule ã䜿ã£ãŠã¢ãžã¥ãŒã«ãããŒãããMyModule.my_function ãåŒã³åºããŠããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 254,
"tag": "p",
"text": "Juliaã§ã¯ãé¢æ°ãã¢ãžã¥ãŒã«ã®ããã¥ã¡ã³ããèšè¿°ããããã«ãããã¥ã¡ã³ãæåå(docstrings)ã䜿çšããŸãã ãããã®docstringsã¯ãé¢æ°ãã¢ãžã¥ãŒã«ã®å
é ã«é
眮ãããé¢æ°ã®æ©èœãåŒæ°ãè¿ãå€ã䜿çšäŸãªã©ã説æããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 255,
"tag": "p",
"text": "以äžã¯ãJuliaã®ããã¥ã¡ã³ãã®äŸã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 256,
"tag": "p",
"text": "ãã®äŸã§ã¯ãMyModule ãšããååã®ã¢ãžã¥ãŒã«ãå®çŸ©ãããã®äžã§ my_function ãšããé¢æ°ãå®çŸ©ããŠããŸãããã®åŸãusing .MyModule ã䜿ã£ãŠã¢ãžã¥ãŒã«ãããŒããããã®ããã«ããŠãé¢æ°ã®å®çŸ©ã®çŽåã«ã3é£ã®ããã«ã¯ã©ãŒãã§å²ãŸããããã¥ã¡ã³ãæååãèšè¿°ããŸããããã«ãããé¢æ°addã®äœ¿ãæ¹ãæ©èœãæ確ã«èª¬æãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 257,
"tag": "p",
"text": "ããã¥ã¡ã³ãæååã¯ãMarkdownãLaTeXã®äžéšã®æžåŒããµããŒãããããèŠããããèªã¿ãããããã¥ã¡ã³ããæäŸããŸããJuliaã®REPLããã«ãã·ã¹ãã ã¯ããããã®ããã¥ã¡ã³ãæååã䜿çšããŠé¢æ°ãã¢ãžã¥ãŒã«ã®ããã¥ã¡ã³ãã衚瀺ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 258,
"tag": "p",
"text": "Documenter.jlã¯ãJuliaã®ããã¥ã¡ã³ãäœæã®ããã®ããŒã«ã§ããMarkdownãã¡ã€ã«ãšJuliaã®ã€ã³ã©ã€ã³docstringsãçµã¿åãããŠã1ã€ã®çžäºã«ãªã³ã¯ãããããã¥ã¡ã³ãã«ãŸãšããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 259,
"tag": "p",
"text": "Juliaã®ããã±ãŒãžãããŒãžã£ãŒã䜿çšããŠDocumenter.jlãã€ã³ã¹ããŒã«ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 260,
"tag": "p",
"text": "DocumenterãæåŸ
ããåºæ¬æ§é ãçæããããã«ãDocumenterToolsããã±ãŒãžã®DocumenterTools.generateé¢æ°ã䜿çšã§ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 261,
"tag": "p",
"text": "ãŸããããã¥ã¡ã³ãåããJuliaã¢ãžã¥ãŒã«ãå¿
èŠã§ããããã¯ãPkgDev.generateã§çæãããããã±ãŒãžãŸãã¯Juliaã®LOAD_PATHã§ã¢ã¯ã»ã¹å¯èœãªåäžã®.jlã¹ã¯ãªããã§ããå¿
èŠããããŸãããã®ã¬ã€ãã§ã¯ã次ã®ãã£ã¬ã¯ããªã¬ã€ã¢ãŠããæã€Example.jlãšããããã±ãŒãžã䜿çšããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 262,
"tag": "p",
"text": "ããã¥ã¡ã³ããæ ŒçŽããå Žæã決å®ããå¿
èŠããããŸãããã®ããã±ãŒãžã®ãããã¬ãã«ã«docs/ãšããååã®ãã©ã«ããŒã䜿çšããããšãæšå¥šãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 263,
"tag": "p",
"text": "docs/ãã©ã«ããŒå
ã«ã¯ã2ã€ã®èŠçŽ ãè¿œå ããå¿
èŠããããŸããMarkdownãã¡ã€ã«ãå«ãŸããå®æããããã¥ã¡ã³ãã®æ§ç¯ã«äœ¿çšãããJuliaã¹ã¯ãªããã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 264,
"tag": "p",
"text": "docs/ãã£ã¬ã¯ããªãã»ããã¢ãããããã®ã§ãæåã®ããã¥ã¡ã³ãããã«ãããŸãããã®æç¹ã§ã¯åäžã®ç©ºã®ãã¡ã€ã«ã§ãããåŸã§è¿œå ããŠãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 265,
"tag": "p",
"text": "make.jlãã¡ã€ã«ã«ä»¥äžãè¿œå ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 266,
"tag": "p",
"text": "ããã«ãããDocumenterãã€ã³ã¹ããŒã«ãããŠããããšãšãExample.jlããã±ãŒãžãJuliaã«ãã£ãŠèŠã€ããããšãåæãšãªããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 267,
"tag": "p",
"text": "次ã«ãsrc/ãã£ã¬ã¯ããªã«index.mdãã¡ã€ã«ãè¿œå ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 268,
"tag": "p",
"text": "ãã®åŸãdocs/ãã£ã¬ã¯ããªãã次ã®ã³ãã³ããå®è¡ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 269,
"tag": "p",
"text": "ããã«ãããbuild/ãã£ã¬ã¯ããªãçæãããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 270,
"tag": "p",
"text": "次ã«ãExampleã¢ãžã¥ãŒã«ã§å®çŸ©ãããããã¥ã¡ã³ãæååãindex.mdãã¡ã€ã«ã«çµã¿èŸŒã¿ãŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 271,
"tag": "p",
"text": "src/index.mdãã¡ã€ã«ã«æ¬¡ãè¿œå ããŸãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 272,
"tag": "p",
"text": "",
"title": "åçŽç·š"
},
{
"paragraph_id": 273,
"tag": "p",
"text": "make.jlãã¡ã€ã«ãåå®è¡ãããšãbuild/index.mdã«Example.func(x)ã®ããã¥ã¡ã³ãæååã衚瀺ãããã¯ãã§ãã",
"title": "åçŽç·š"
},
{
"paragraph_id": 274,
"tag": "p",
"text": "DataFrames.jlãPlots.jlãªã©ã®ããã±ãŒãžã䜿ã£ãŠããŒã¿è§£æãå¯èŠåãè¡ãæ¹æ³ãåŠã³ãŸããããŒã¿è§£æãšå¯èŠåã¯Juliaã®åŒ·åãªæ©èœã®äžã€ã§ããããããã®ããã±ãŒãžã䜿çšããããšã§ããŒã¿ãå¹æçã«åæããå¯èŠåããããšãã§ããŸããããŒã¿ã®ãã¿ãŒã³ããã¬ã³ããçºèŠããæŽå¯ãåŸãããã«å¿
èŠãªã¹ãã«ã身ã«ã€ããŸãããã",
"title": "åçŽç·š"
},
{
"paragraph_id": 275,
"tag": "p",
"text": "Juliaã®ããã±ãŒãžã¯ãJuliaããã°ã©ãã³ã°èšèªã®æ©èœãæ©èœæ¡åŒµãæäŸããããã®ã³ãŒãããªãœãŒã¹ã®éåäœã§ãããããã®ããã±ãŒãžã¯ãJuliaã®æ©èœãæ¡åŒµããç¹å®ã®ã¿ã¹ã¯ãã¢ããªã±ãŒã·ã§ã³ã®éçºãæ¯æŽããŸããJuliaã®ããã±ãŒãžã¯ãé¢æ°ãåãã¢ãžã¥ãŒã«ãããŒã¿ã»ãããããã°ã©ã ãããã³ãã®ä»ã®ãªãœãŒã¹ãæäŸããããšããããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 276,
"tag": "p",
"text": "äžè¬çãªçšéã«ã¯ãããŒã¿è§£æãæ©æ¢°åŠç¿ãç§åŠèšç®ãã°ã©ãã£ã«ã«ãŠãŒã¶ãŒã€ã³ã¿ãŒãã§ã€ã¹(GUI)ããŠã§ãã¢ããªã±ãŒã·ã§ã³éçºãªã©ãå«ãŸããŸãããããã®ããã±ãŒãžã¯ãJuliaã®è±å¯ãªãšã³ã·ã¹ãã ã®äžéšã§ãããã³ãã¥ããã£ã«ãã£ãŠéçºã管çãããŠããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 277,
"tag": "p",
"text": "Juliaã®ããã±ãŒãžç®¡çã·ã¹ãã ã§ããPkgã䜿çšããããšã§ãJuliaã®æ©èœãæ¡åŒµããããã®ããã±ãŒãžã®ã€ã³ã¹ããŒã«ã管çãè¡ãããšãã§ããŸããããã±ãŒãžã¯ãããŸããŸãªã¿ã¹ã¯ãã¢ããªã±ãŒã·ã§ã³ã®éçºã«åœ¹ç«ã¡ãŸãããã®ã»ã¯ã·ã§ã³ã§ã¯ãPkgã䜿çšããŠããã±ãŒãžãå¹æçã«ç®¡çããæ¹æ³ã«ã€ããŠèª¬æããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 278,
"tag": "p",
"text": "æ°ããããã±ãŒãžãã€ã³ã¹ããŒã«ããã«ã¯ã以äžã®æé ã«åŸããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 279,
"tag": "p",
"text": "ã€ã³ã¹ããŒã«ãããŠããããã±ãŒãžãææ°ã®ããŒãžã§ã³ã«ã¢ããããŒãããã«ã¯ã以äžã®æé ã«åŸããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 280,
"tag": "p",
"text": "update ã³ãã³ããå
¥åããŠããã¹ãŠã®ããã±ãŒãžãã¢ããããŒãããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 281,
"tag": "p",
"text": "äžèŠãªããã±ãŒãžãåé€ããã«ã¯ã以äžã®æé ã«åŸããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 282,
"tag": "p",
"text": "rm PackageName ãå
¥åããŠãåé€ãããããã±ãŒãžãæå®ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 283,
"tag": "p",
"text": "å©çšå¯èœãªããã±ãŒãžãæ€çŽ¢ããã«ã¯ã以äžã®æé ã«åŸããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 284,
"tag": "p",
"text": "search Keyword ãå
¥åããŠãããŒã¯ãŒãã«äžèŽããããã±ãŒãžãæ€çŽ¢ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 285,
"tag": "p",
"text": "ã€ã³ã¹ããŒã«ãããŠããããã±ãŒãžã®æ
å ±ã衚瀺ããã«ã¯ã以äžã®æé ã«åŸããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 286,
"tag": "p",
"text": "status ã³ãã³ããå
¥åããŠãã€ã³ã¹ããŒã«ãããŠããããã±ãŒãžã®äžèŠ§ãšããããã®ããŒãžã§ã³ã衚瀺ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 287,
"tag": "p",
"text": "ãããã®æäœãéããŠãJuliaã®ããã±ãŒãžãå¹æçã«ç®¡çãããããžã§ã¯ãã®éçºãåæ»ã«é²ããããšãã§ããŸãã Juliaã®ããã±ãŒãžãšã³ã·ã¹ãã ã¯éåžžã«è±å¯ã§ãããããŸããŸãªããŒãºã«å¯Ÿå¿ã§ããããã±ãŒãžãæäŸãããŠããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 288,
"tag": "p",
"text": "Juliaã®ããã±ãŒãžç®¡çã·ã¹ãã ã§ããPkgã¯ãREPL(Read-Eval-Print Loop)ã¢ãŒããæäŸããŠããŸãããã®ã¢ãŒãã§ã¯ãããã±ãŒãžã®ã€ã³ã¹ããŒã«ãæŽæ°ãåé€ãªã©ã®æäœãè¡ããŸãã以äžã«ãPkgã®äž»ãªã³ãã³ããšãã®æ©èœã瀺ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 289,
"tag": "p",
"text": "ããã«ãããã±ãŒãžã¬ãžã¹ããªã«é¢é£ããã³ãã³ãããããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 290,
"tag": "p",
"text": "ãããã®ã³ãã³ãã䜿çšããŠãJuliaã®ããã±ãŒãžãå¹æçã«ç®¡çã§ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 291,
"tag": "p",
"text": "?ãŸãã¯helpã³ãã³ãã¯ãå©çšå¯èœãªã³ãã³ããšããããã®ç°¡åãªèª¬æã衚瀺ããŸããããã¯ãPkgã®ã³ãã³ããç解ããããã®äŸ¿å©ãªæ¹æ³ã§ãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 292,
"tag": "p",
"text": "以äžã«ã?ãŸãã¯helpã³ãã³ãã®äœ¿çšæ¹æ³ã瀺ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 293,
"tag": "p",
"text": "ãã®ããã«ããŠã?ãŸãã¯helpã³ãã³ãã䜿çšããããšã§ãPkgã®ã³ãã³ããå¹æçã«ç解ããå©çšã§ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 294,
"tag": "p",
"text": "é«åºŠãªããŒã¿æ§é ãšã¢ã«ãŽãªãºã ã¯ãè€éãªåé¡ã解決ããããã®äžå¯æ¬ ãªããŒã«ã§ããã°ã©ããæšæ§é ãããŒããªã©ã®ããŒã¿æ§é ã¯ãããŒã¿ã®çµç¹åãšå¹ççãªæäœãå¯èœã«ããæ§ã
ãªã¢ããªã±ãŒã·ã§ã³ãåéã§åºã掻çšãããŠããŸããJuliaã®æè»ãªèšèªæ©èœã掻çšããŠããããã®ããŒã¿æ§é ãšã¢ã«ãŽãªãºã ãå®è£
ããåé¡ãå¹ççã«è§£æ±ºããæ¹æ³ãåŠã³ãŸãããã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 295,
"tag": "p",
"text": "ã°ã©ãã¯ãé ç¹(ããŒã)ãšããããæ¥ç¶ãã蟺(ãšããž)ããæ§æãããããŒã¿æ§é ã§ããã°ã©ãã¯ãçŸå®äžçã®ããŸããŸãªãããã¯ãŒã¯ãé¢ä¿æ§ãã¢ãã«åããããã«åºã䜿çšãããŠããŸãããœãŒã·ã£ã«ãããã¯ãŒã¯ãçµè·¯èšç»ã亀éãããã¯ãŒã¯ãéä¿¡ãããã¯ãŒã¯ãªã©ãå€ãã®åé¡ãã°ã©ããšããŠè¡šçŸãããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 296,
"tag": "p",
"text": "ãããã®ã¢ã«ãŽãªãºã ãç解ããé©åãªåé¡ã«é©çšããããšã§ãå¹ççãªã°ã©ãã®æäœã解æãå¯èœã«ãªããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 297,
"tag": "p",
"text": "æšæ§é ã¯ãéå±€çãªããŒã¿ãè¡šçŸããããã®ããŒã¿æ§é ã§ãããã«ãŒãããŒãããå§ãŸããåããŒããæåããããŠãã圢ãããŠããŸããæšæ§é ã¯ãå€ãã®åéã§äœ¿çšãããéå±€çãªé¢ä¿æ§ãååž°çãªããŒã¿ã®è¡šçŸã«é©ããŠããŸãã代衚çãªçšéãšããŠã¯ããã¡ã€ã«ã·ã¹ãã ãããŒã¿ããŒã¹ã®çŽ¢åŒãååž°çãªã¢ã«ãŽãªãºã ã®å®è£
ãªã©ãæããããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 298,
"tag": "p",
"text": "芪ããŒããšåããŒã(Parent and Child Nodes): 芪ããŒãã¯ãçŽäžã«1ã€ä»¥äžã®åããŒããæã€ããŒãã§ããåããŒãã¯ã芪ããŒãã®äžã«é
眮ããããã®èŠªããŒãã«é¢é£ä»ããããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 299,
"tag": "p",
"text": "ãããã®æäœãç解ããé©åã«å®è£
ããããšã§ãæšæ§é ãå¹æçã«æŽ»çšããããšãã§ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 300,
"tag": "p",
"text": "ããŒãã¯ãåªå
床ä»ããã¥ãŒãå®è£
ããããã®ããŒã¿æ§é ã§ãããæå°å€ãæ倧å€ãé«éã«ååŸããããšãã§ããŸããããŒãã¯ãåªå
床ä»ããã¥ãŒã®æäœãå¹ççã«è¡ãããã«èšèšãããŠããããã€ã¯ã¹ãã©æ³ãããŒããœãŒããªã©ã®ã¢ã«ãŽãªãºã ã§åºã䜿çšãããŠããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 301,
"tag": "p",
"text": "ããŒãã¯ã以äžã®æäœããµããŒãããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 302,
"tag": "p",
"text": "ããŒãã¯ãéåžžãé
åã䜿çšããŠå®è£
ãããŸããé
åã®ã€ã³ããã¯ã¹ã䜿çšããŠããŒãéã®èŠªåé¢ä¿ãè¡šçŸããèŠçŽ ã®æ¿å
¥ãåé€ãå¹ççã«è¡ãããŸããæå°ããŒãã®å Žåã芪ããŒãã®ã€ã³ããã¯ã¹ã i ãšãããšãå·Šã®åããŒãã®ã€ã³ããã¯ã¹ã¯ 2i + 1ãå³ã®åããŒãã®ã€ã³ããã¯ã¹ã¯ 2i + 2 ãšãªããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 303,
"tag": "p",
"text": "ããŒãã¯ãå¹ççãªåªå
床ä»ããã¥ãŒã®å®è£
ãšããŠåºã䜿çšãããå€ãã®ã¢ã«ãŽãªãºã ãããŒã¿æ§é ã«ãããŠéèŠãªåœ¹å²ãæãããŠããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 304,
"tag": "p",
"text": "ãããã®ããŒã¿æ§é ãç解ãããããããã䜿çšããããŸããŸãªã¢ã«ãŽãªãºã ãå®è£
ããããšãã§ããŸããäŸãã°ãã°ã©ãæ¢çŽ¢ã¢ã«ãŽãªãºã ãæççµè·¯æ¢çŽ¢ã¢ã«ãŽãªãºã ããœãŒãã¢ã«ãŽãªãºã ãªã©ããããŸãããããã®ã¢ã«ãŽãªãºã ã¯ãåé¡ã®æ§è³ªã«å¿ããŠé©åã«éžæãããå®è£
ãããå¿
èŠããããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 305,
"tag": "p",
"text": "ããã¯ãåºæ¬çãªäºåæšã®å®è£
ãšãããŒãã®æ¿å
¥ãšæ€çŽ¢ã®æ¹æ³ã瀺ããŠããŸãããããã®åºæ¬çãªããŒã¿æ§é ãšã¢ã«ãŽãªãºã ãç解ããããšã§ãããŸããŸãªåé¡ã解決ããããã®åºç€ãç¯ãããšãã§ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 306,
"tag": "p",
"text": "Juliaã®äžŠååŠçæ©èœã掻çšããŠãåŠçã䞊ååããæ¹æ³ãåŠã³ãŸãã䞊ååŠçã¯ãèšç®ãé«éåãã倧èŠæš¡ãªåé¡ãå¹ççã«è§£æ±ºããããã®éèŠãªææ³ã§ãããŸããåæ£åŠçãéããŠè€æ°ã®èšç®è³æºãå¹æçã«æŽ»çšããæ¹æ³ãåŠã³ãŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 307,
"tag": "p",
"text": "æ°å€èšç®ãæé©ååé¡ã解ãããã®ããã±ãŒãžã䜿çšããŠãæ°å€èšç®ãšæé©åã®æè¡ãåŠã³ãŸããæ°å€èšç®ã¯ç§åŠæè¡èšç®ããšã³ãžãã¢ãªã³ã°ãªã©ã®ããŸããŸãªåéã§éèŠãªåœ¹å²ãæãããŸãããŸããæé©åã¯åé¡ã®æé©ãªè§£ãèŠã€ããããã®éèŠãªææ³ã§ãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 308,
"tag": "p",
"text": "Flux.jlãMLJ.jlãªã©ã®æ©æ¢°åŠç¿ã©ã€ãã©ãªã䜿çšããŠãæ©æ¢°åŠç¿ã¢ãã«ãå®è£
ããããŒã¿ã«å¯ŸããŠåŠç¿ãããæ¹æ³ãåŠã³ãŸããæ©æ¢°åŠç¿ã¯ããŒã¿è§£æãäºæž¬ã¢ããªã³ã°ãªã©ã®æ§ã
ãªã¿ã¹ã¯ã§å©çšãããçŸä»£ã®æè¡ãããžãã¹ã«ãããŠéèŠãªåœ¹å²ãæãããŠããŸããJuliaã®è±å¯ãªããã±ãŒãžã掻çšããŠãæ©æ¢°åŠç¿ã®ã¹ãã«ã磚ããŸãããã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 309,
"tag": "p",
"text": "ââââ",
"title": "äžçŽç·š"
},
{
"paragraph_id": 310,
"tag": "p",
"text": "Juliaã®LinearAlgebraã¢ãžã¥ãŒã«ã¯ãç·åœ¢ä»£æ°ã®åºæ¬çãªæ©èœãæäŸããŠããŸããå
·äœçã«ã¯ããã¯ãã«ãè¡åã®æŒç®ãåºæå€ãåºæãã¯ãã«ã®èšç®ãçè¡åã®æäœãLUå解ãQRå解ãªã©ãå©çšå¯èœã§ãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 311,
"tag": "p",
"text": "Juliaã®LinearAlgebraã¢ãžã¥ãŒã«ã§å®çŸ©ãããŠããäž»ãªé¢æ°ãšæŒç®åã¯ä»¥äžã®éãã§ãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 312,
"tag": "p",
"text": "以äžã¯ãJuliaã®LinearAlgebraã¢ãžã¥ãŒã«ã䜿ã£ãåºæ¬çãªæäœäŸã§ãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 313,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ããŸããã¯ãã« v1 ãš v2 ãå®çŸ©ããŠããŸãããã®åŸããã¯ãã«ã®ã¹ã«ã©ãŒåãå æ³ãæžæ³ãå
ç©ããã«ã ãèšç®ããçµæã衚瀺ããŠããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 314,
"tag": "p",
"text": "次ã«ãè¡å A ãå®çŸ©ããŠããŸãããã®è¡å㯠3x3 ã®æŽæ°è¡åã§ããã転眮ãéè¡åãè¡ååŒããã¯ãã«ãšã®ç©ãè¡åãšã®ç©ãèšç®ããŠããŸãããŸãã察è§è¡å D ãå®çŸ©ããŠããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 315,
"tag": "p",
"text": "ããã«ã察称è¡å S ãå®çŸ©ãããã®åºæå€ãšåºæãã¯ãã«ãèšç®ããŠããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 316,
"tag": "p",
"text": "æåŸã«ãæå°äºä¹æ³ã®æŒç®ãè¡ã£ãŠããŸããããã¯é£ç«æ¹çšåŒ Ax = b ã®è§£ x ãæ±ããæäœã§ãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 317,
"tag": "p",
"text": "ãã®ããã«ãLinearAlgebraã¢ãžã¥ãŒã«ã¯ãæ°å€èšç®ã«ãããŠåºæ¬çãã€éèŠãªèŠçŽ ã§ãããã¯ãã«ãè¡åã®æ§ã
ãªæäœãæäŸããŠããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 318,
"tag": "p",
"text": "ãŸããå
ç©(ãããç©)ãèšç®ããæ¹æ³ã¯ä»¥äžã®éãã§ãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 319,
"tag": "p",
"text": "LinearAlgebraã¢ãžã¥ãŒã«(ç·åœ¢ä»£æ°æŒç®ã¢ãžã¥ãŒã«)ã®èªã¿èŸŒã¿",
"title": "äžçŽç·š"
},
{
"paragraph_id": 320,
"tag": "p",
"text": "å
ç©ã¯ãã¯ãã«ã®èŠçŽ å士ãæãåããããã®ã足ãåãããå€ãšãªããŸãã Juliaã§ã®å
ç©ã®èšç®ã¯ä»¥äžã®ããã«è¡ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 321,
"tag": "p",
"text": "次ã«ãå€ç©ãèšç®ããæ¹æ³ã¯ä»¥äžã®éãã§ãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 322,
"tag": "p",
"text": "å€ç©ã¯2ã€ã®ãã¯ãã«ããããã®ãã¯ãã«ã匵ãå¹³è¡å蟺圢ã®é¢ç©ãæ±ããããšã§èšç®ã§ããŸãã Juliaã§ã®å€ç©ã®èšç®ã¯ä»¥äžã®ããã«è¡ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 323,
"tag": "p",
"text": "ãã ããå€ç©ã®çµæã¯ãã¯ãã«ã§ããããã®ãã¯ãã«ã匵ãå¹³è¡å蟺圢ã®é¢ç©ã«ãªã£ãŠããããã§ã¯ãããŸãããå€ç©ã®çµæã«çµ¶å¯Ÿå€ãåãããšã§å¹³è¡å蟺圢ã®é¢ç©ãæ±ããããšãã§ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 324,
"tag": "p",
"text": "以äžããJuliaã䜿ã£ãŠå
ç©ãšå€ç©ãæ±ããæ¹æ³ã®ç°¡åãªè§£èª¬ã§ãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 325,
"tag": "p",
"text": "ââââ",
"title": "äžçŽç·š"
},
{
"paragraph_id": 326,
"tag": "p",
"text": "",
"title": "äžçŽç·š"
},
{
"paragraph_id": 327,
"tag": "p",
"text": "ã³ãŒãã®ããã©ãŒãã³ã¹ãåäžãããããã®ãã¯ããã¯ãæé©åææ³ãåŠã³ãŸããJuliaã¯é«éãªèšèªã§ããããããªãããã©ãŒãã³ã¹ã®åäžãæ±ããããå ŽåããããŸããå¹ççãªã¢ã«ãŽãªãºã ã®éžæãã¡ã¢ãªç®¡çã®æé©åã䞊ååŠçã®æŽ»çšãªã©ãæ§ã
ãªæ¹æ³ãåŠã³ãŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 328,
"tag": "p",
"text": "Juliaã®ã¡ã¿ããã°ã©ãã³ã°æ©èœã䜿çšããŠãã³ãŒãçæãDSL(Domain Specific Language)ã®æ§ç¯ãªã©ãè¡ãæ¹æ³ãåŠã³ãŸããã¡ã¿ããã°ã©ãã³ã°ã¯ãã³ãŒãã®èªåçæãæè»ãªèšèªæ¡åŒµãå¯èœã«ããå¹ççãªããã°ã©ã ã®äœæã«åœ¹ç«ã¡ãŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 329,
"tag": "p",
"text": "Flux.jlãKnet.jlãªã©ã®æ·±å±€åŠç¿ãã¬ãŒã ã¯ãŒã¯ã䜿çšããŠããã¥ãŒã©ã«ãããã¯ãŒã¯ã¢ãã«ãæ§ç¯ãããã¬ãŒãã³ã°ããæ¹æ³ãåŠã³ãŸãã深局åŠç¿ã¯ãç»åèªèãèªç¶èšèªåŠçãé³å£°èªèãªã©ã®åéã§åºãå©çšãããŠãããJuliaã䜿ã£ãå¹æçãªå®è£
æ¹æ³ãç¿åŸããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 330,
"tag": "p",
"text": "Juliaã䜿çšããŠãé«æ§èœãªèšç®ãå®è¡ããããã®ãã¯ããã¯ãããŒã«ãåŠã³ãŸãã䞊ååŠçãGPUããã°ã©ãã³ã°ãåæ£ã³ã³ãã¥ãŒãã£ã³ã°ãªã©ãããŸããŸãªã¢ãããŒããéããŠã倧èŠæš¡ãªèšç®åé¡ã«å¯ŸåŠããã¹ãã«ã磚ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 331,
"tag": "p",
"text": "ââââ ââââ",
"title": "äžçŽç·š"
},
{
"paragraph_id": 332,
"tag": "p",
"text": "ãé«åºŠãªãããã¯ã¹ãã®ç« ã§ã¯ãJuliaèšèªã§ããé«åºŠãªãããã¯ã¹ãæ±ããŸãããã®ç« ã§ã¯ãã¡ã¿ããã°ã©ãã³ã°ã䞊ååŠçãšåæ£åŠçãããã°ã©ãã³ã°ã®æé©åãGPUããã°ã©ãã³ã°ã®4ã€ã®ã»ã¯ã·ã§ã³ã«åãããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 333,
"tag": "p",
"text": "ãã®ç¯ã§ã¯ãJuliaã®ã¡ã¿ããã°ã©ãã³ã°ã«ã€ããŠèª¬æããŸããã¡ã¿ããã°ã©ãã³ã°ã¯ãããã°ã©ã ãèªåèªèº«ãæäœããããèªåèªèº«ãå€æŽãããããããšãæããŸããJuliaã¯ãéåžžã«åŒ·åãªã¡ã¿ããã°ã©ãã³ã°æ©èœãæäŸããŠãããããã«ãããé«åºŠãªããã°ã©ã ãæžãããšãã§ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 334,
"tag": "p",
"text": "Juliaã«ããããã¯ãã¯ãããã°ã©ã ã®æçµçãªæ¬äœã«çæãããã³ãŒããå«ããã¡ã«ããºã ãæäŸããŸãããã¯ãã¯ãåŒæ°ã®ã¿ãã«ãè¿ãããåŒã«ããããããã®çµæã®åŒã¯å®è¡æã® eval åŒã³åºããå¿
èŠãšããã«çŽæ¥ã³ã³ãã€ã«ãããŸãããã¯ãã®åŒæ°ã«ã¯ãåŒããªãã©ã«å€ãããã³ã·ã³ãã«ãå«ããããšãã§ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 335,
"tag": "p",
"text": "Juliaã®ãã¯ãã¯ãããã€ãã®ç¹åŸŽãæã£ãŠããŸã:",
"title": "äžçŽç·š"
},
{
"paragraph_id": 336,
"tag": "p",
"text": "åŒããªãã©ã«ãã·ã³ãã«ã®åŒæ°: ãã¯ãã¯åŒããªãã©ã«å€ãããã³ã·ã³ãã«ãåŒæ°ãšããŠåãåãããšãã§ããŸããããã«ããããã¯ãã¯ããŸããŸãªã¿ã€ãã®åŒæ°ãåãå
¥ããé©åãªåŠçãè¡ãããšãã§ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 337,
"tag": "p",
"text": "ãããã®ç¹åŸŽã«ãããJuliaã®ãã¯ãã¯éåžžã«æè»ã§åŒ·åãªããã°ã©ãã³ã°ããŒã«ãšãªã£ãŠããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 338,
"tag": "p",
"text": "Juliaã®ãã¯ãã¯ã@(ã¢ããããŒã¯)ã«ç¶ããŠããŒã¯ãªååã§å®£èšããããããã¯å
ã§å®çŸ©ãããŸãã以äžã¯éåžžã«ã·ã³ãã«ãªãã¯ãã®äŸã§ã:",
"title": "äžçŽç·š"
},
{
"paragraph_id": 339,
"tag": "p",
"text": "ãã®äŸã§ã¯ãã³ã³ãã€ã©ã¯@sayhelloã®ãã¹ãŠã®ã€ã³ã¹ã¿ã³ã¹ã以äžã®ããã«çœ®ãæããŸã:",
"title": "äžçŽç·š"
},
{
"paragraph_id": 340,
"tag": "p",
"text": "@sayhelloãREPLã«å
¥åããããšãåŒãããã«å®è¡ããããããè©äŸ¡çµæã®ã¿ã衚瀺ãããŸã:",
"title": "äžçŽç·š"
},
{
"paragraph_id": 341,
"tag": "p",
"text": "ããã«å°ãè€éãªãã¯ããèããŠã¿ãŸããã:",
"title": "äžçŽç·š"
},
{
"paragraph_id": 342,
"tag": "p",
"text": "ãã®ãã¯ãã¯1ã€ã®åŒæ°ãã€ãŸãnameãåããŸãã@sayhelloãåºäŒããããšãã¯ã©ãŒããããåŒã¯æçµåŒã«åŒæ°ã®å€ãå±éããŸã:",
"title": "äžçŽç·š"
},
{
"paragraph_id": 343,
"tag": "p",
"text": "ãã¯ããå±éããæ»ãå€ã®åŒçšåŒã衚瀺ããã«ã¯ãé¢æ°macroexpandã䜿çšã§ããŸã(éèŠãªæ³šæ:ããã¯ãã¯ãã®ãããã°ã«éåžžã«äŸ¿å©ãªããŒã«ã§ã):",
"title": "äžçŽç·š"
},
{
"paragraph_id": 344,
"tag": "p",
"text": "ããã§ã\"human\"ãªãã©ã«ãåŒã«å±éãããŠããããšãããããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 345,
"tag": "p",
"text": "ãã¯ãã䜿çšããŠãJuliaã§ç°¡åãªè¡åæäœãè¡ãã¢ã«ãŽãªãºã ã®äŸã瀺ããŸãããã®äŸã§ã¯ã2ã€ã®è¡åã®ç©ãèšç®ããé¢æ°ããã¯ãã§å®çŸ©ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 346,
"tag": "p",
"text": "ãã®ãã¯ãã§ã¯ã2ã€ã®è¡åAãšBãåŒæ°ãšããŠåãåãããããã®ç©ãèšç®ããŸãããŸããè¡åã®æ¬¡å
ããã§ãã¯ãã次å
ãäžèŽããªãå Žåã¯ãšã©ãŒãè¿ããŸãã次ã«ãçµæã®è¡åCãåæåãã3éã®ã«ãŒãã䜿çšããŠç©ãèšç®ããŸããæåŸã«ãçµæã®è¡åCãè¿ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 347,
"tag": "p",
"text": "ãã®ãã¯ãã䜿çšãããšã次ã®ããã«2ã€ã®è¡åã®ç©ãèšç®ã§ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 348,
"tag": "p",
"text": "ãã®äŸã§ã¯ãè¡åAãšBãå®çŸ©ãã@matrix_multiplyãã¯ãã䜿çšããŠãããã®ç©ãèšç®ããŠããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 349,
"tag": "p",
"text": "Juliaã®ãã¯ãã¯ãããã€ãã®äžè¬çãªãŠãŒã¹ã±ãŒã¹ã§åœ¹ç«ã¡ãŸã:",
"title": "äžçŽç·š"
},
{
"paragraph_id": 350,
"tag": "p",
"text": "ãããã®ãŠãŒã¹ã±ãŒã¹ã掻çšããããšã§ãJuliaã®ãã¯ãã¯ã³ãŒãã®æè»æ§ãå¹çæ§ãããã³ä¿å®æ§ãåäžãããããšãã§ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 351,
"tag": "p",
"text": "Juliaã®ãã¯ãã䜿çšããéã®ãã¹ããã©ã¯ãã£ã¹ã«ã¯ã以äžã®ãããªãã®ããããŸã:",
"title": "äžçŽç·š"
},
{
"paragraph_id": 352,
"tag": "p",
"text": "ãããã®ãã¹ããã©ã¯ãã£ã¹ã«åŸãããšã§ãJuliaã®ãã¯ããå¹æçã«äœ¿çšããã³ãŒãã®å質ãšä¿å®æ§ãåäžãããããšãã§ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 353,
"tag": "p",
"text": "Juliaã®ãã¯ãã䜿çšããéã«ããèŠãããã€ãã£ãªã (æ
£çšå¥)ã«ã¯æ¬¡ã®ãããªãã®ããããŸã:",
"title": "äžçŽç·š"
},
{
"paragraph_id": 354,
"tag": "p",
"text": "ãããã®ã€ãã£ãªã ã䜿çšããããšã§ãJuliaã®ãã¯ããå¹æçã«å®çŸ©ããä»ã®éçºè
ãç解ããããã³ãŒããæžãããšãã§ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 355,
"tag": "p",
"text": "",
"title": "äžçŽç·š"
},
{
"paragraph_id": 356,
"tag": "p",
"text": "",
"title": "äžçŽç·š"
},
{
"paragraph_id": 357,
"tag": "p",
"text": "Juliaã®ã¡ã¿ããã°ã©ãã³ã°ã«ã¯ããã¯ããšåŒã°ããç¹æ®ãªé¢æ°ã䜿çšãããŸãããã¯ãã¯ãå®è¡æã§ã¯ãªããã³ã³ãã€ã«æã«è©äŸ¡ãããŸããã€ãŸããã³ã³ãã€ã«åã«ãã¯ããå®è¡ããããã¯ããçæããã³ãŒããå®è¡ãããŸãããã¯ãã¯ãç¹å¥ãªæ§æã䜿çšããŠå®çŸ©ãããŸããäŸãã°ã以äžã®ããã«å®çŸ©ãããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 358,
"tag": "p",
"text": "ãã¯ãã®åŒæ°ã¯ãéåžžã®é¢æ°ãšåãããã«æ±ãããŸãããã³ã³ãã€ã«æã«è©äŸ¡ãããŸãããã¯ãã®æ»ãå€ã¯ãå®è¡æã§ã¯ãªããã³ã³ãã€ã«æã«è©äŸ¡ãããJuliaã®åŒã§ãªããã°ãªããŸããããã®ããããã¯ãã¯ãåçãªåŒãçæããããã«äœ¿çšãããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 359,
"tag": "p",
"text": "ãã¯ããåŒã³åºãã«ã¯ã@ãã¯ãåã®ããã«@ãä»ããŸããäŸãã°ãå
ã»ã©å®çŸ©ãããã¯ããåŒã³åºãã«ã¯ã以äžã®ããã«ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 360,
"tag": "p",
"text": "Juliaã®ã¡ã¿ããã°ã©ãã³ã°ã«ã¯ãæ§ã
ãªå¿çšäŸããããŸãã以äžã«ããã€ãäŸãæããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 361,
"tag": "p",
"text": "ã䞊ååŠçããšã¯ãã³ã³ãã¥ãŒã¿ãŒäžã§åæã«è€æ°ã®åŠçãå®è¡ããããšãæããŸããäžæ¹ããåæ£åŠçããšã¯ãè€æ°ã®ã³ã³ãã¥ãŒã¿ãŒã§åŠçãåæ£ããå調ããŠåŠçãè¡ãããšãæããŸããJuliaã¯ã䞊ååŠçãšåæ£åŠçã«å¯Ÿå¿ããŠãããããããã«é©ããæ¹æ³ã§ããã°ã©ãã³ã°ããããšãã§ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 362,
"tag": "p",
"text": "Juliaã¯ããã«ãã¹ã¬ããåŠçããµããŒãããŠããŸãããã«ãã¹ã¬ããåŠçã䜿çšããããšã§ãè€æ°ã®ã¿ã¹ã¯ãåæã«å®è¡ããããšãã§ããŸããJuliaã®ãã«ãã¹ã¬ããåŠçã¯ãã¹ã¬ããééä¿¡ã®ããã®ãã£ã³ãã«ãæäŸããŠããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 363,
"tag": "p",
"text": "以äžã¯ããã«ãã¹ã¬ããåŠçã䜿çšããŠã1ãã10ãŸã§ã®æ°åã®åèšãèšç®ããäŸã§ãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 364,
"tag": "p",
"text": "ãã®äŸã§ã¯ãsum_rangeé¢æ°ããæå®ãããç¯å²ã®æ°åã®åèšãèšç®ããŠãChannelã«çµæãéä¿¡ããŸããparallel_sumé¢æ°ã§ã¯ãæå®ãããç¯å²ãè€æ°ã®ãã£ã³ã¯ã«åå²ããããããã®ãã£ã³ã¯ãå¥ã
ã®ã¹ã¬ããã§åŠçããŸããåã¹ã¬ããã®çµæã¯ãChannelã«éä¿¡ãããparallel_sumé¢æ°ã¯åã¹ã¬ããããã®çµæãåéããŠãæçµçãªçµæãè¿ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 365,
"tag": "p",
"text": "ããã°ã©ã ã®å®è¡é床ã¯ãå€ãã®å Žåãæé©åã®å¯Ÿè±¡ãšãªããŸããããã°ã©ã ã®é«éåã«ã¯ãæ§ã
ãªæ¹æ³ããããŸãããæ¬æžã§ã¯ã次ã®ãããªã¢ãããŒãã«çŠç¹ãããŠãŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 366,
"tag": "p",
"text": "ã¢ã«ãŽãªãºã ã®æé©åã¯ããã®ã¢ã«ãŽãªãºã ãåŠçããåé¡ã«é©ããã¢ã«ãŽãªãºã ãéžæããããšã«ãã£ãŠå®çŸã§ããŸããé©åãªã¢ã«ãŽãªãºã ãéžæããããšã§ãããã°ã©ã ã®å®è¡é床ã倧å¹
ã«åäžãããããšãã§ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 367,
"tag": "p",
"text": "äŸãã°ããªã¹ãå
ã®èŠçŽ ãæ€çŽ¢ããå Žåãç·åœ¢æ¢çŽ¢ã¢ã«ãŽãªãºã ãããäºåæ¢çŽ¢ã¢ã«ãŽãªãºã ã®æ¹ãå¹ççã§ãããŸãããœãŒãã¢ã«ãŽãªãºã ãéžæããéã«ããåé¡ã«ãã£ãŠæé©ãªã¢ã«ãŽãªãºã ãç°ãªããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 368,
"tag": "p",
"text": "ããŒã¿æ§é ã®æé©åã¯ãããã°ã©ã ã®å®è¡é床ã«å€§ããªåœ±é¿ãäžããŸããããŒã¿æ§é ãé©åã«èšèšããããšã«ãã£ãŠãã¡ã¢ãªäœ¿çšéãåæžããããŒã¿ã¢ã¯ã»ã¹ã®åŠçæéãççž®ããããšãã§ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 369,
"tag": "p",
"text": "äŸãã°ãå€ãã®å Žåãé
åã®äœ¿çšããããé£çµãªã¹ãã®äœ¿çšã®æ¹ãå¹ççã§ãããŸããããã·ã¥ããŒãã«ã¯ã倧éã®ããŒã¿ãå¹ççã«æ€çŽ¢ããå Žåã«æå¹ã§ãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 370,
"tag": "p",
"text": "æé©ãªã¢ã«ãŽãªãºã ãšæé©ãªããŒã¿æ§é ãéžæããŠããããã°ã©ã ã®å®è¡æéã倧å¹
ã«äžããããšãã§ããŸããã³ãŒãã®æé©åã¯ãã¢ã«ãŽãªãºã ãããŒã¿æ§é ãå®çŸããããã®ã³ãŒããæé©åããããšã«ãã£ãŠå®çŸã§ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 371,
"tag": "p",
"text": "äŸãã°ãç¹°ãè¿ãåŠçå
ã§åãèšç®ãäœåºŠãå®è¡ããå Žåãèšç®ãå€çšããªãããã«ã³ãŒããæžãããšã§ãããã°ã©ã ã®å®è¡é床ãäžããããšãã§ããŸãããŸããé«éãªã«ãŒãèšæ³ã䜿çšããããšããããã°ã©ã ã®é床ãåäžãããããšãã§ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 372,
"tag": "p",
"text": "ããã°ã©ã ã®æé©åã«ã¯ãã¢ã«ãŽãªãºã ã®æé©åãããŒã¿æ§é ã®æé©åãã³ãŒãã®æé©åã®3ã€ã®ã¢ãããŒãããããŸãããããã®ã¢ãããŒããé§äœ¿ããŠãããã°ã©ã ã®å®è¡é床ãé«éåããããšãã§ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 373,
"tag": "p",
"text": "GPU(Graphics Processing Unit)ã¯ãã°ã©ãã£ãã¯ã¹åŠçã®ããã«éçºãããããã»ããµã§ãããæ°å€èšç®ãç§åŠæè¡èšç®ã®åéã§ãå©çšãããããã«ãªã£ãŠããŸããGPUã¯SIMD(Single Instruction Multiple Data)ã¢ãŒããã¯ãã£ãæ¡çšããŠãããåæã«å€æ°ã®æŒç®ãè¡ãããšãã§ããŸãããã®ç¹æ§ã掻ããããšã§ãCPUã«æ¯ã¹ãŠé«éãªæ°å€èšç®ãå¯èœã«ãªããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 374,
"tag": "p",
"text": "juliaã¯GPUããã°ã©ãã³ã°ããµããŒãããŠãããCuArraysãšåŒã°ããã©ã€ãã©ãªãä»ããŠCUDA APIãå©çšããããšãã§ããŸããCUDAã¯NVIDIAãéçºããŠããGPUåãã®äžŠåã³ã³ãã¥ãŒãã£ã³ã°ãã©ãããã©ãŒã ã§ãããGPUã®ããã©ãŒãã³ã¹ãæ倧éåŒãåºãããšãã§ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 375,
"tag": "p",
"text": "CuArraysã䜿çšããã«ã¯ã以äžã®ããã«ããŠã€ã³ã¹ããŒã«ããå¿
èŠããããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 376,
"tag": "p",
"text": "ãªããCuArraysãå©çšããããã«ã¯CUDAãã€ã³ã¹ããŒã«ãããŠããå¿
èŠããããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 377,
"tag": "p",
"text": "CuArraysã¯ãjuliaã®æšæºçãªé
åãšåãããã«æ±ãããšãã§ããŸãã以äžã¯CuArraysã§ãã¯ãã«ãäœæããäŸã§ãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 378,
"tag": "p",
"text": "ãã®ããã«ããããšã§ããã¹ãåŽã®ã¡ã¢ãªå
ã«ããé
åãããGPUåŽã®ã¡ã¢ãªå
ã«é
åãã³ããŒããããšãã§ããŸãã CuArraysã䜿ã£ãèšç®ã¯ãéåžžã®juliaã®é
åãšåãããã«è¡ããŸãããã ããèšç®ãè¡ãé¢æ°ã«ã¯ãGPUåŽã®ã¡ã¢ãªäžã«ããé
åãåŒæ°ãšããå¿
èŠããããŸãã以äžã¯CuArraysã§ãã¯ãã«ã®åãèšç®ããäŸã§ãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 379,
"tag": "p",
"text": "ãã®ããã«ããããšã§ããã¯ãã«aãšãã¯ãã«bã®èŠçŽ ããšã®åãããã¹ãåŽã®ã¡ã¢ãªããGPUåŽã®ã¡ã¢ãªã«è»¢éããèšç®ãè¡ããçµæãGPUåŽã®ã¡ã¢ãªãããã¹ãåŽã®ã¡ã¢ãªã«è»¢éããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 380,
"tag": "p",
"text": "ã«ã¹ã¿ã ã«ãŒãã«ã¯ãGPUäžã§äžŠåã«å®è¡ã§ããé¢æ°ã®ããšã§ããCuArraysã¯ãCuKernelãã¯ããçšããŠã«ã¹ã¿ã ã«ãŒãã«ãå®çŸ©ããããšãã§ããŸãã以äžã¯ãCuKernelãã¯ããçšããŠããã¯ãã«ã®åãèšç®ããã«ã¹ã¿ã ã«ãŒãã«ãå®çŸ©ããäŸã§ãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 381,
"tag": "p",
"text": "ãã®ã«ã¹ã¿ã ã«ãŒãã«ã§ã¯ãåã¹ã¬ãããé
åã®èŠçŽ ã®åèšå€ãèšç®ããçµæãããããã®ã¹ã¬ããã«è¿ããŸããCuKernelãè¿ãå€ã¯ã䞊ååŠçãããã¹ã¬ããæ°ãšåãã§ãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 382,
"tag": "p",
"text": "CuArraysã«ã¯ãCuKernelãå®è¡ããããã®é¢æ°ãçšæãããŠããŸãã以äžã¯ãCuArraysã§ãã¯ãã«ã®åãèšç®ããäŸã§ãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 383,
"tag": "p",
"text": "ãã®äŸã§ã¯ãã«ã¹ã¿ã ã«ãŒãã«ã128åã®ã¹ã¬ããã§äžŠåã«å®è¡ããŠããŸãã䞊ååŠçã®ãããã¹ã¬ããæ°ã¯GPUã®ã³ã¢æ°ã«æ¯äŸããããã«æ±ºå®ãããŸãããŸããçµæãæ ŒçŽããããã«ãCuArrays.@cudaãã¯ãã§simialar()é¢æ°ã䜿çšããŠããã¹ãã¡ã¢ãªäžã«ããå€æ°cãšåãåã®å€æ°ãGPUã¡ã¢ãªå
ã§äœæããŠããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 384,
"tag": "p",
"text": "CuArraysãçšããããšã§ãjuliaã§GPUããã°ã©ãã³ã°ãç°¡åã«è¡ãããšãã§ããŸããã«ã¹ã¿ã ã«ãŒãã«ãå©çšããããšã§ãGPUã®æ§èœãæ倧éã«åŒãåºãããšãã§ããæ°å€èšç®ãç§åŠæè¡èšç®ã«ãããŠé«éãªåŠçãå®çŸããããšãã§ããŸãã",
"title": "äžçŽç·š"
},
{
"paragraph_id": 385,
"tag": "p",
"text": "ãšã©ãã¹ããã¹ã®ç¯©ããè¥å¹² Julia ãããæžããŠã¿ãŸããã",
"title": "éé²ããã"
},
{
"paragraph_id": 386,
"tag": "p",
"text": "ã¯ã€ãã¯ãœãŒãããè¥å¹² Julia ãããæžããŠã¿ãŸããã",
"title": "éé²ããã"
},
{
"paragraph_id": 387,
"tag": "p",
"text": "æ倧å
¬çŽæ°ãšæå°å
¬åæ°ããè¥å¹² Julia ãããæžããŠã¿ãŸããã",
"title": "éé²ããã"
},
{
"paragraph_id": 388,
"tag": "p",
"text": "äºåæ³ããè¥å¹² Julia ãããæžããŠã¿ãŸããã",
"title": "éé²ããã"
},
{
"paragraph_id": 389,
"tag": "p",
"text": "以äžã¯ãJuliaèšèªã§äœ¿çšãããçšèªã®èª¬æã§ãã",
"title": "éé²ããã"
},
{
"paragraph_id": 390,
"tag": "p",
"text": "以äžã¯ãJuliaèšèªã§ãã䜿ãããæ§æã®äžèŠ§ã§ãã",
"title": "éé²ããã"
}
] | Juliaã¯ãé«åºŠãªæ°å€è§£æãç§åŠèšç®ãããŒã¿åŠçãæ©æ¢°åŠç¿ãªã©ãããŸããŸãªåéã§åºãå©çšãããããã°ã©ãã³ã°èšèªã§ãããã®ãã¥ãŒããªã¢ã«ã¯ãåå¿è
åãã«Juliaã®åºç€ããå§ããåŸã
ã«é«åºŠãªãããã¯ã«é²ãã§ãããŸããJuliaã®ã·ã³ãã«ã§çŽæçãªæ§æã䜿çšããŠãé¢æ°ã®å®çŸ©ããããŒã¿æ§é ã®æäœãå¶åŸ¡ãããŒãããã±ãŒãžã®äœ¿çšãªã©ãåºæ¬çãªããã°ã©ãã³ã°ã®æŠå¿µãç解ããŸããããã«ãJuliaã®ç¹åŸŽçãªæ©èœã§ããå€éãã£ã¹ããããåã·ã¹ãã ã«ã€ããŠã詳ãã説æããŸãã ãã®ãã¥ãŒããªã¢ã«ã§ã¯ãçè«ã ãã§ãªãå®è·µçãªããã°ã©ãã³ã°ã®ã¹ãã«ã身ã«ã€ããŸããå®éã®ãããžã§ã¯ããåé¡ã«åãçµã¿ãªãããJuliaã䜿ã£ãŠããŒã¿ã®è§£æãåŠçãç§åŠçã·ãã¥ã¬ãŒã·ã§ã³ãæ©æ¢°åŠç¿ã¢ãã«ã®æ§ç¯ãªã©ãããŸããŸãªã¿ã¹ã¯ã«å¯ŸåŠããæ¹æ³ãåŠã³ãŸãããŸããJuliaã®è±å¯ãªãšã³ã·ã¹ãã ãããã±ãŒãžç®¡çã·ã¹ãã ã掻çšããŠãå¹ççãªããã°ã©ãã³ã°ç°å¢ãæ§ç¯ããæ¹æ³ã玹ä»ããŸãã ãã®ãã¥ãŒããªã¢ã«ã¯ãããã°ã©ãã³ã°åå¿è
ãä»ã®èšèªããJuliaã«ç§»è¡ãã人ã
ã«ãšã£ãŠçæ³çãªãªãœãŒã¹ã§ããJuliaã®ãã¯ãã«ãªæ©èœã掻ãããŠãããŸããŸãªåé¡ã«é©æ°çãªè§£æ±ºçãèŠã€ããå¹ççãªã³ãŒããæžãããã®åºç€ãç¯ãããšãã§ããŸããJuliaã®æè»æ§ãšããã©ãŒãã³ã¹ãæ倧éã«æŽ»çšããããã°ã©ãã³ã°ã®ã¹ãã«ãé«ããŠãããŸãããã | {{Wikipedia|Julia (ããã°ã©ãã³ã°èšèª)}}
Juliaã¯é«æ§èœãªããã°ã©ãã³ã°èšèªã§ãããäž»ã«ç§åŠèšç®ãããŒã¿è§£æã«ç¹åããŠããŸãããã®ç¹åŸŽã¯é«éãªå®è¡é床ãšæè»æ§ã«ãããŸãããã®ãã¥ãŒããªã¢ã«ã§ã¯ãJuliaã®åºæ¬çãªæ©èœãææ³ãããŒã¿åŠçãé¢æ°ã®å®çŸ©æ¹æ³ããããŠããã±ãŒãžã®äœ¿çšæ¹æ³ãªã©ã解説ããŸãã
Juliaã¯åå¿è
ã«ãåªããèšèªã§ãããPythonãMATLABãªã©ä»ã®èšèªã䜿ã£ãçµéšããã人ã«ãšã£ãŠãç解ããããã§ãããããã®ãã¥ãŒããªã¢ã«ãéããŠãJuliaã®ãã¯ãŒãšæè»æ§ã«è§Šããªãããå¹ççãªã³ãŒãã£ã³ã°ãå®çŸããããã®åºç€ã身ã«ã€ããããšãã§ããŸããJuliaã¯ãªãŒãã³ãœãŒã¹ã§ããã掻çºãªã³ãã¥ããã£ãååšãããããåŠç¿ãé²ããäžã§ã®ãµããŒããè±å¯ã§ãã
==ã€ã³ãããã¯ã·ã§ã³==
===Juliaèšèªã®æŠèŠ===
Juliaã¯ãé«æ§èœãªããã°ã©ãã³ã°èšèªã§ãããç¹ã«ç§åŠèšç®ãããŒã¿è§£æã®åéã§åºãå©çšãããŠããŸãã2012幎ã«éçºããããã®åŸæ¥éã«æ®åããå€ãã®ç 究è
ãããŒã¿ãµã€ãšã³ãã£ã¹ãããšã³ãžãã¢ã«ãã£ãŠæ¯æãããŠããŸããJuliaã®èšèšç®æšã¯ãé«ãããã©ãŒãã³ã¹ãšæè»æ§ãäž¡ç«ãããããšã§ããããã®çµæãæ°å€èšç®ã䞊ååŠçãªã©ã®é«åºŠãªã¿ã¹ã¯ã«å¯ŸããŠåªããæ§èœãçºæ®ããŸãã
===Juliaã®èšèšå²åŠ===
Juliaã®èšèšã«ã¯ããã€ãã®éèŠãªå²åŠãåãå
¥ããããŠããŸãããã®äžã§ãç¹çãã¹ãã¯ãå¯èªæ§ãšæ¡åŒµæ§ã«å¯Ÿãã匷ãã³ãããã¡ã³ãã§ããJuliaã®ã³ãŒãã¯ãé«ã¬ãã«ã®æœè±¡åãšåæã«ãäœã¬ãã«ã®è©³çŽ°ãŸã§æ瀺çã«å¶åŸ¡ã§ãããããåå¿è
ãããšãã¹ããŒããŸã§å¹
åºããŠãŒã¶ãŒã«é©ããŠããŸãããŸããJuliaã¯åçèšèªã§ãããªãããéçèšèªã®ãããªåæšè«æ©èœãæã¡ãã³ãŒãã®å¹çæ§ãä¿ã¡ã€ã€éçºé床ãåäžãããããšãã§ããŸãã
===Juliaã䜿ãäžã§ã®å©ç¹===
Juliaãéžæããã¡ãªããã¯å€å²ã«ããããŸãããŸããé«éãªå®è¡é床ãæããããŸããJuliaã¯ãCãFortranã«å¹æµããæ§èœãæã¡ãªãããåçãªã¹ã¯ãªããèšèªã®ãããªäœ¿ãããããå
ŒãåããŠããŸãããŸããè±å¯ãªã©ã€ãã©ãªãããã±ãŒãžãšã³ã·ã¹ãã ããããæ§ã
ãªçšéã«å¯Ÿå¿ã§ããŸããããã«ãPythonãMATLABãšã®èŠªåæ§ãé«ããæ¢åã®ã³ãŒããããŒã«ãåå©çšããªãã移è¡ããããšãã§ããŸãã
Juliaã¯ããã®åªããæ§èœãšæè»æ§ã«ãã£ãŠãç§åŠæè¡èšç®ã®åéã§ãŸããŸãéèŠãªäœçœ®ãå ããŠããŸãããã®ãã¥ãŒããªã¢ã«ã§ã¯ãJuliaã®åºæ¬çãªæ©èœããå¿çšãŸã§å¹
åºãã«ããŒããJuliaã䜿ãããªãããã®ç¥èãæäŸããŸãã
== åçŽç·š ==
åçŽç·šã§ã¯ããŸãæåã«Juliaã®ã€ã³ã¹ããŒã«æ¹æ³ãæ±ããŸããã€ã³ã¹ããŒã«ã¯ç°¡åã§ãå
¬åŒã®ã€ã³ã¹ããŒã«ã¹ã¯ãªããã䜿çšããããšã§æ°åã§å®äºããŸãããã®ã¹ããããã¯ãªã¢ãããšãJuliaã®ç°å¢ãæŽããããã°ã©ãã³ã°åŠç¿ã®æºåãæŽããŸããJuliaã®ã€ã³ã¹ããŒã«åŸã¯ãå€æ°ãããŒã¿åãå¶åŸ¡æ§é ãªã©ãããã°ã©ãã³ã°ã®åºç€çãªæŠå¿µãåŠã¶ããšãã§ããŸããJuliaã®ã·ã³ãã«ãªæ§æãšè±å¯ãªæ©èœã掻ãããŠãããã°ã©ãã³ã°ã®äžçã«è¶³ãèžã¿å
¥ããŸãããã
=== Juliaã®ã€ã³ã¹ããŒã« ===
Juliaã¯ãmacOSãWindowsãFreeBSDãLinuxã®ãã£ã¹ããªãã¥ãŒã·ã§ã³ãªã©ã®äž»èŠãªãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§å©çšå¯èœã§ããJuliaãã€ã³ã¹ããŒã«ããæé ã¯éåžžã«ç°¡åã§ãå
¬åŒã®ã€ã³ã¹ããŒã«ã¹ã¯ãªããã䜿çšããããšã§ãæ°åã§Juliaãã»ããã¢ããã§ããŸãã
==== Unixã¿ã€ãã®ã·ã¹ãã ãžã®ã€ã³ã¹ããŒã« ====
# ã€ã³ã¹ããŒã«ã¹ã¯ãªããã®å®è¡
#: 以äžã®ã³ãã³ããã¿ãŒããã«ã«å
¥åããŠãJuliaã®ææ°ããŒãžã§ã³ãã€ã³ã¹ããŒã«ããŸãã
#:<syntaxhighlight lang=shell>
curl -fsSL https://install.julialang.org | sh
</syntaxhighlight>
#:ãã®ã³ãã³ãã¯ãUnixã¿ã€ãã®ã·ã¹ãã ã§Juliaãã€ã³ã¹ããŒã«ããããã®æšå¥šãããæ¹æ³ã§ãã
#: Windowsã®å Žåã¯ãå¥éæé ããããŸãã
# ã€ã³ã¹ããŒã«ã®ç¢ºèª
#:ã€ã³ã¹ããŒã«ãå®äºãããšã<code>julia</code> ã³ãã³ãã䜿çšããŠJuliaã®REPLïŒRead-Eval-Print LoopïŒãèµ·åã§ããŸããã¿ãŒããã«ã§ä»¥äžã®ã³ãã³ããå
¥åããJuliaã®REPLãéå§ããŸãã
#:<syntaxhighlight lang=julia-repl>
$ julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.10.0 (2023-12-25)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> 1+2*3
7
julia> typeof(3.14)
Float64
julia> a=12/34
0.35294117647058826
julia> typeof(a)
Float64
julia> exit()
$ _
</syntaxhighlight>
#:Juliaã®REPLãèµ·åãããšãã€ã³ã¹ããŒã«ãæ£åžžã«å®äºããããšã確èªã§ããŸãã
# ããŒãžã§ã³ç®¡çãšã¢ããããŒã
#: Juliaã¯ãã€ã³ã¹ããŒã«åŸã«èªåçã«ã¢ããããŒããããJuliaupã€ã³ã¹ããŒã«ãããŒãžã£ãŒãå«ãã§ããŸãã<code>juliaup</code> ã³ãã³ãã䜿çšããŠãJuliaã®ããŒãžã§ã³ã管çããã³ã¢ããããŒãããããšãã§ããŸãã
#:<syntaxhighlight lang=shell>
juliaup --help
</syntaxhighlight>
#:ãã®ã³ãã³ãã¯ãå©çšå¯èœãªãªãã·ã§ã³ã衚瀺ããŸãã
==== Windows ãžã®ã€ã³ã¹ããŒã« ====
Juliaã¯ãWindowsç°å¢ã§ãç°¡åã«ã€ã³ã¹ããŒã«ã§ããŸãã以äžã®æé ã«åŸã£ãŠãJuliaãã»ããã¢ããããŸãããã
# ã€ã³ã¹ããŒã©ãŒã®ããŠã³ããŒã
#: ãŸããJuliaã®ããŠã³ããŒãããŒãž( https://julialang.org/downloads/ )ã«ã¢ã¯ã»ã¹ããŠãWindowsçšã®ã€ã³ã¹ããŒã©ãŒãããŠã³ããŒãããŸãã
# ã€ã³ã¹ããŒã©ãŒã®å®è¡
#: ããŠã³ããŒããå®äºããããããŠã³ããŒãããã€ã³ã¹ããŒã©ãŒãããã«ã¯ãªãã¯ããŠå®è¡ããŸããã»ããã¢ãããŠã£ã¶ãŒãã衚瀺ãããã®ã§ãæ瀺ã«åŸã£ãŠã€ã³ã¹ããŒã«ãé²ããŸãã
# ã€ã³ã¹ããŒã«ã®ç¢ºèª
#: ã€ã³ã¹ããŒã«ãå®äºãããšãã¹ã¿ãŒãã¡ãã¥ãŒããã¹ã¯ãããã«Juliaã®ã·ã§ãŒãã«ãããäœæãããŸããJuliaãèµ·åããã«ã¯ãã·ã§ãŒãã«ãããã¯ãªãã¯ããããã¹ã¿ãŒãã¡ãã¥ãŒããJuliaãæ€çŽ¢ããŠéããŸãã
#: Juliaãæ£åžžã«èµ·åããREPLïŒRead-Eval-Print LoopïŒã衚瀺ãããã°ãã€ã³ã¹ããŒã«ãæåããŠããŸãã
# ããŒãžã§ã³ç®¡çãšã¢ããããŒã
#: Juliaã¯ãã€ã³ã¹ããŒã«ãããããŒãžã§ã³ã®ç®¡çãšã¢ããããŒããç°¡åã«è¡ãããšãã§ããŸããJuliaupã€ã³ã¹ããŒã«ãããŒãžã£ãŒã䜿çšããŠãããŒãžã§ã³ã®ç®¡çãã¢ããããŒããè¡ãããšãã§ããŸãã詳现ã¯ãJuliaupã®ããã¥ã¡ã³ããåç
§ããŠãã ããã
===ããã°ã©ãã³ã°ã®åºç€===
ãã®ã»ã¯ã·ã§ã³ã§ã¯ãããã°ã©ãã³ã°ã®åºæ¬çãªæŠå¿µãåŠã³ãŸãã以äžã®å
容ã«çŠç¹ãåœãŠãŠãããã°ã©ãã³ã°ã®åºç€ãç¯ããŠãããŸãã
;å€æ°: 代å
¥ã«ãã£ãŠå€ã«ä»ããããååã§ããå代å
¥ã«ãã£ãŠå¥ã®å€ãçµã³ã€ããããšãã§ããŸãã
;ããŒã¿å: å€ã®çš®é¡ãè¡šããããããã®æäœæ¹æ³ãç°ãªããŸããæŽæ°ãæµ®åå°æ°ç¹æ°ãæååãªã©ããããŸãã
;å¶åŸ¡æ§é : ããã°ã©ã ã®å®è¡ã®æµããå¶åŸ¡ããŸããæ¡ä»¶åå²ïŒ<code>if</code>æïŒãç¹°ãè¿ãïŒ<code>for</code>ã«ãŒãïŒãªã©ãå«ãŸããŸãã
;é¢æ°: äžé£ã®åŠçããŸãšããŠååãä»ããåå©çšå¯èœã«ããŸãã
ãããã®æŠå¿µã¯ãJuliaã ãã§ãªãä»ã®ããã°ã©ãã³ã°èšèªã§ãå
±éããŠããŸãã
===Juliaã®æ§æãšåºæ¬æäœ===
Juliaã®æ§æãåºæ¬çãªæäœæ¹æ³ãç解ããŸããJuliaã®REPLïŒRead-Eval-Print LoopïŒã®äœ¿çšæ¹æ³ãåŠã³ãŸããREPLã¯Juliaã察話çã«äœ¿ãããã®åŒ·åãªããŒã«ã§ãããå¹ççãªåŠç¿ãšéçºã«åœ¹ç«ã¡ãŸãã
#; ã³ã¡ã³ã
#: Juliaã®ã³ã¡ã³ãã¯åäžè¡ã³ã¡ã³ããšãè€æ°è¡ã³ã¡ã³ãããããŸãã
#:<syntaxhighlight lang=julia>
# ããã¯è¡ã³ã¡ã³ãã§ãã
#=
ããã¯
è€æ°è¡ã®
ã³ã¡ã³ãã§ãã
=#
</syntaxhighlight>
#; å€æ°ãšããŒã¿å
#: å€æ°ã¯åãæã€ããšããããŸãããæ瀺çã«åãæå®ããå¿
èŠã¯ãããŸããã
#:; åæšè«
#:: å€æ°ã«å€ã代å
¥ããããšãããã®å€ããé©åãªããŒã¿åãæšè«ããŸãã
#::<syntaxhighlight lang=julia>
x = 10 # xã®åã¯æŽæ°(Int64)ãšæšè«ããã
y = 3.14 # yã®åã¯æµ®åå°æ°ç¹æ°(Float64)ãšæšè«ããã
z = "Hello" # zã®åã¯æåå(String)ãšæšè«ããã
</syntaxhighlight>
#:; åã¢ãããŒã·ã§ã³
#:: åã¢ãããŒã·ã§ã³ã䜿çšããããšã§ãå€æ°ã®åãæ瀺çã«æå®ããããšãã§ããŸãã
#::<syntaxhighlight lang=julia>
x::Int64 = 10 # xã¯æŽæ°å(Int64)ã§ããããšãæ瀺çã«æå®
y::Float64 = 3.14 # yã¯æµ®åå°æ°ç¹æ°å(Float64)ã§ããããšãæ瀺çã«æå®
z::String = "Hello" # zã¯æååå(String)ã§ããããšãæ瀺çã«æå®
</syntaxhighlight>
#; å¶åŸ¡æ§é
#: <code>if</code>ã<code>for</code>ã<code>while</code>ã䜿çšããŠããã°ã©ã ã®æµããå¶åŸ¡ããŸãã
#:<syntaxhighlight lang=julia>
if x > 5
println("xã¯5ãã倧ããã§ã")
else
println("xã¯5以äžã§ã")
end
for i in 1:5
println("çŸåšã®å€ã¯$iã§ã")
end
</syntaxhighlight>
#; é¢æ°ã®å®çŸ©
#: <code>function</code>ããŒã¯ãŒãã䜿çšããŠé¢æ°ãå®çŸ©ããŸãã
#:<syntaxhighlight lang=julia>
function greet(name)
println("ããã«ã¡ã¯ã$nameããïŒ")
end
greet("倪é")
</syntaxhighlight>
#; é
åãšã¿ãã«
#: é
åã¯èŠçŽ ã®é åºä»ãéåã§ããã¿ãã«ã¯äžå€ã®é
åã§ãããç°ãªãåã®èŠçŽ ãæã€ããšãã§ããŸãã
#:<syntaxhighlight lang=julia>
array = [1, 2, 3, 4, 5] # é
åã®å®çŸ©
tuple = (1, "hello", 3.14) # ã¿ãã«ã®å®çŸ©
</syntaxhighlight>
#; REPLã®äœ¿çš
#: Juliaã®REPLïŒRead-Eval-Print LoopïŒã¯å¯Ÿè©±çãªéçºã«åœ¹ç«ã¡ãŸããã³ãŒãã®æçãè©ŠããŠå®è¡ããçµæãå³åº§ã«ç¢ºèªã§ããŸãã
#:<syntaxhighlight lang=julia-repl>
julia> x = 10
10
julia> x + 5
15
</syntaxhighlight>
ãããã®æ§æèŠçŽ ã¯Juliaã®åºæ¬çãªæ©èœã§ãããããã°ã©ãã³ã°ã®åå¿è
ããäžçŽè
ãŸã§å¹
åºã掻çšãããŠããŸãã
===å€æ°===
å€æ°ã¯ãå€ã«ã€ããããååã§ãããã°ã©ã å
ã§ããŒã¿ãäžæçã«ä¿åããããåŠçã®éäžçµæãä¿æãããããããã«äœ¿çšãããŸããJuliaã®å€æ°ã¯å®£èšããããšãªã䜿ãå§ããããšãã§ããŸãã
;代å
¥ãšåç
§
:<syntaxhighlight lang=julia>
x = 10 # 代å
¥
println(x) # => 10
</syntaxhighlight>
:ãã®ã³ãŒãã¯ãå€æ° <code>x</code> ã«æŽæ°å€ <code>10</code> ã代å
¥ãããã®åŸ <code>println()</code> é¢æ°ã䜿çšã㊠<code>x</code> ã®å€ãåç
§ãåºåããŠããŸããåºåçµæ㯠<code>10</code> ã«ãªããŸãã
;å代å
¥ã«ããå€ã®æŽæ°
:<syntaxhighlight lang=julia>
x = 10 # æåã®ä»£å
¥
println(x) # => 10
x = 20 # æ°ããå€ã代å
¥
println(x) # => 20
</syntaxhighlight>
:ãã®ã³ãŒãã¯ãæåã«å€æ° <code>x</code> ã«æŽæ°å€ <code>10</code> ã代å
¥ãããã®åŸ <code>println()</code> é¢æ°ã䜿çšã㊠<code>x</code> ã®å€ãåºåããŸãã次ã«ãå€æ° <code>x</code> ã«æ°ããå€ã§ããæŽæ°å€ <code>20</code> ãå代å
¥ããåã³ <code>println()</code> é¢æ°ã䜿çšã㊠<code>x</code> ã®å€ãåºåããŸãã
;ç°ãªãåã®å€ã®å代å
¥
:<syntaxhighlight lang=julia>
x = 10 # æåã®ä»£å
¥
println(typeof(x)) # => Int64
println(x) # => 10
x = "Hello" # æ°ããå€ã代å
¥
println(typeof(x)) # => String
println(x) # => Hello
</syntaxhighlight>
:ãã®ã³ãŒãã§ã¯ãæåã«å€æ° <code>x</code> ã«æŽæ°å€ <code>10</code> ã代å
¥ãããŠããŸãããã®åŸã<code>typeof()</code> é¢æ°ã䜿çšããŠå€æ° <code>x</code> ã®åãåºåãã<code>println()</code> é¢æ°ã䜿çšã㊠<code>x</code> ã®å€ãåºåããŠããŸãããã®çµæã<code>x</code> ã®å㯠<code>Int64</code> ã§ãããå€ã¯ <code>10</code> ã«ãªããŸãã
:次ã«ãå€æ° <code>x</code> ã«æåå <code>"Hello"</code> ãå代å
¥ãããŠããŸããåã³ã<code>typeof()</code> é¢æ°ã䜿çšã㊠<code>x</code> ã®åãåºåãã<code>println()</code> é¢æ°ã䜿çšã㊠<code>x</code> ã®å€ãåºåããŠããŸãããã®çµæã<code>x</code> ã®å㯠<code>String</code> ã§ãããå€ã¯ <code>"Hello"</code> ã«ãªããŸãã
ãã®ããã«ãåãå€æ°ã«ç°ãªãåã®å€ãå代å
¥ããããšãã§ããŸãã
ãã®ããšãããJuliaã¯åçåä»ãããã°ã©ãã³ã°èšèªãšèšããŸãã
==== å®æ° ====
Juliaã«ãããŠãå®æ°ã¯å€æŽäžå¯èœãªå€ãè¡šãå€æ°ã§ããå®æ°ã¯ <code>const</code> ããŒã¯ãŒãã䜿ã£ãŠå®£èšãããŸããå®æ°ã¯ãäžåºŠå®£èšããããšããã®åŸå€ãå€æŽããããšã¯ã§ããŸãããå®æ°ã¯ãé¢æ°å
å€ã§å©çšå¯èœã§ãã以äžã¯ãå®æ°ã宣èšããäŸã§ãã
:<syntaxhighlight lang=julia>
const GRAVITY = 9.80665
</syntaxhighlight >
ãã®äŸã§ã¯ã<code>GRAVITY</code> ãšããå®æ°ã宣èšããŠããŸãããã®å®æ°ã¯ãéåå é床ãè¡šãå®æ°ã§ãããå€ã¯ <code>9.80665</code> ã§ãããåŸããå€ãå€æŽããããšã¯ã§ããŸããã
==== å€æ°ã®ã¹ã³ãŒã ====
Juliaã®å€æ°ã®ã¹ã³ãŒãã¯ãä»ã®å€ãã®ããã°ã©ãã³ã°èšèªãšåæ§ã«ããã®å€æ°ãã¢ã¯ã»ã¹å¯èœãªç¯å²ãæããŸãã
Juliaã§ã¯ã次ã®ãããªã¹ã³ãŒãããããŸãïŒ
# ã°ããŒãã«ã¹ã³ãŒãïŒGlobal ScopeïŒ:
#* ã°ããŒãã«ã¹ã³ãŒãã§ã¯ãããã°ã©ã å
šäœããå€æ°ã«ã¢ã¯ã»ã¹ã§ããŸãã
#* ã°ããŒãã«ã¹ã³ãŒãã§å®çŸ©ãããå€æ°ã¯ãã©ãããã§ãã¢ã¯ã»ã¹å¯èœã§ãã
# ããŒã«ã«ã¹ã³ãŒãïŒLocal ScopeïŒ:
#* ããŒã«ã«ã¹ã³ãŒãã§ã¯ãå€æ°ãé¢æ°ããããã¯å
ã§å®çŸ©ããããã®äžã§ã®ã¿ã¢ã¯ã»ã¹å¯èœã§ãã
#* é¢æ°å
ã§å®çŸ©ãããå€æ°ã¯ããã®é¢æ°å
ã§ã®ã¿å©çšã§ããŸãã
# ã¢ãžã¥ãŒã«ã¹ã³ãŒãïŒModule ScopeïŒ:
#* ã¢ãžã¥ãŒã«ã¹ã³ãŒãã§ã¯ãã¢ãžã¥ãŒã«å
ã§å®çŸ©ãããå€æ°ãã¢ã¯ã»ã¹å¯èœã§ãã
#* ã¢ãžã¥ãŒã«å
ã§å®çŸ©ãããå€æ°ã¯ããã®ã¢ãžã¥ãŒã«å
ã®é¢æ°ããããã¯ããã¢ã¯ã»ã¹ã§ããŸãããã¢ãžã¥ãŒã«ã®å€éšããã¯ãããè¡šèšã䜿çšããŠã¢ã¯ã»ã¹ããå¿
èŠããããŸãã
ã¹ã³ãŒãå
ã§ã®å€æ°ã®æ¯ãèãã¯ãä»ã®ããã°ã©ãã³ã°èšèªãšåæ§ã§ãããJuliaã®å Žåãç¹ã«é¢æ°å
ã§ã®å€æ°ã®æ¯ãèãã«é¢ããŠã¯ãããŒã«ã«ã¹ã³ãŒãã®èŠåãé©çšãããŸããããšãã°ãé¢æ°å
ã§åãååã®å€æ°ãã°ããŒãã«ã¹ã³ãŒããšåãååã§å®çŸ©ãããšãããã¯é¢æ°å
ã§ã®ã¿æå¹ãªããŒã«ã«å€æ°ãšãªããŸããããã¯ãJuliaã®å€æ°ãããã©ã«ãã§ããŒã«ã«ã¹ã³ãŒããæã€ããã§ãã
Juliaã§ã¯ãé¢æ°å
ã§ã°ããŒãã«å€æ°ãå€æŽããå Žåã<code>global</code>ããŒã¯ãŒãã䜿çšããå¿
èŠããããŸããããã«ãããé¢æ°å
ã§ã°ããŒãã«å€æ°ã®å€ãæŽæ°ããããšãã§ããŸããäŸãã°ïŒ
:<syntaxhighlight lang=julia>
x = 10 # ã°ããŒãã«ã¹ã³ãŒã
function update_global()
global x = 20 # ã°ããŒãã«å€æ° x ã®å€ãæŽæ°
end
update_global() # é¢æ°ãåŒã³åºã
println(x) # 20 ãšåºåããã
</syntaxhighlight >
ãã®ããã«ãJuliaã§ã¯ã¹ã³ãŒãã®ã«ãŒã«ã«åŸã£ãŠå€æ°ãæ¯ãèããŸãããã°ããŒãã«å€æ°ã®æŽæ°ãªã©ç¹å®ã®ã±ãŒã¹ã§ã¯æ瀺çãªããŒã¯ãŒããå¿
èŠã«ãªãããšããããŸãã
==== ãŠãŒã¹ã±ãŒã¹ ====
å€æ°ã¯ããã°ã©ãã³ã°ã«ãããŠéåžžã«éèŠãªæŠå¿µã§ãããããŸããŸãªãŠãŒã¹ã±ãŒã¹ããããŸãã
以äžã¯ãå€æ°ã®äž»ãªãŠãŒã¹ã±ãŒã¹ã®ããã€ãã§ãïŒ
;å€ã®ä¿æ: å€æ°ã¯å€ãäžæçã«æ ŒçŽããããã®ä»®æ³çãªã³ã³ãããšããŠæ©èœããŸããããã«ãããåãå€ãäœåºŠã䜿çšããå Žåããå€ãåŸã§å€æŽããå¿
èŠãããå Žåã«äŸ¿å©ã§ãã
;èšç®ã®äžéçµæ: è€éãªèšç®ãè¡ãéã«ã¯ãèšç®ã®éäžçµæãå€æ°ã«æ ŒçŽããŠããããšã䟿å©ã§ããããã«ãããã³ãŒãã®å¯èªæ§ãåäžããèšç®ã远跡ãããããªããŸãã
;ããã°ã©ã ã®ç¶æ
管ç: ããã°ã©ã ã®å®è¡äžã«å€æ°ã䜿çšããããšã§ãããã°ã©ã ã®ç¶æ
ã管çããããšãã§ããŸããäŸãã°ãã²ãŒã ã®ã¹ã³ã¢ããŠãŒã¶ãŒã®ãã°ã€ã³ç¶æ
ãªã©ãå€æ°ã«æ ŒçŽããŠããããšãã§ããŸãã
;å埩åŠçã®å¶åŸ¡: ã«ãŒãå
ã§å€æ°ã䜿çšããŠãå埩åŠçã®å¶åŸ¡ãè¡ãããšãã§ããŸããå€æ°ã䜿çšããŠå埩åæ°ãã«ãŠã³ããããããªã¹ããé
åã®èŠçŽ ã«ã¢ã¯ã»ã¹ãããããããšãã§ããŸãã
;é¢æ°ã®åŒæ°ãæ»ãå€: é¢æ°ã®åŒæ°ãæ»ãå€ãšããŠå€æ°ã䜿çšããããšãã§ããŸããé¢æ°ã¯å
¥åãåãåããããã«åºã¥ããŠåŠçãè¡ããçµæãå€æ°ãšããŠè¿ãããšãã§ããŸãã
ãããã®ãŠãŒã¹ã±ãŒã¹ã¯ãããã°ã©ã ãå¹ççã«èšè¿°ãã管çããããã®åºæ¬çãªããŒã«ãšããŠå€æ°ãã©ãã ãéèŠã§ãããã瀺ããŠããŸãã
=== åºç€çãªããŒã¿åãšå€æ° ===
ããã°ã©ãã³ã°èšèªã§ã¯ãããŒã¿ãæ±ãéã«ç°ãªãçš®é¡ã®ããŒã¿åã䜿çšãããŸãããããã®ããŒã¿åã«ã¯ãæŽæ°ãæµ®åå°æ°ç¹æ°ãæååãé
åãªã©ããããŸããJuliaã¯ããããã®ããŒã¿åã䜿çšããŠããŒã¿ãæ ŒçŽããåŠçããŸãã
==== æŽæ° (Integer) ====
æŽæ°ã¯ãæ°å€ãè¡šãããã®åºæ¬çãªããŒã¿åã§ããæ£ã®æŽæ°ãè² ã®æŽæ°ããŒããè¡šãããšãã§ããŸããJuliaã§ã¯ãæŽæ°ã®ãµã€ãºã«å¿ããŠè€æ°ã®åãæäŸãããŠããŸããäŸãã°ã<code>Int8</code>ã<code>Int16</code>ã<code>Int32</code>ã<code>Int64</code>ãªã©ã®ç¬Šå·ä»ãæŽæ°åããããŸãã
==== æµ®åå°æ°ç¹æ° (Float) ====
æµ®åå°æ°ç¹æ°ã¯ãå°æ°ç¹ä»¥äžã®æ°å€ãè¡šãããã®ããŒã¿åã§ããæŽæ°ãšã¯ç°ãªããå°æ°ç¹ä»¥äžã®æ¡æ°ãå«ããããšãã§ããŸããJuliaã§ã¯ã<code>Float32</code>ã<code>Float64</code>ãªã©ã®æµ®åå°æ°ç¹æ°åãæäŸãããŠããŸãã
==== æåå (String) ====
æååã¯ãããã¹ãããŒã¿ãè¡šãããã®ããŒã¿åã§ããJuliaã§ã¯ãããã«ã¯ã©ãŒããŒã·ã§ã³ (<code>"</code>) ã§å²ãŸããæååã䜿çšãããŸããäŸãã°ã<code>"Hello"</code>ã<code>"Julia"</code>ãªã©ã®æååãè¡šçŸããããšãã§ããŸãã
==== é
å (Array) ====
é
åã¯ãè€æ°ã®èŠçŽ ãé åºä»ããŠæ ŒçŽããããŒã¿æ§é ã§ããJuliaã§ã¯ãè§ãã£ã <code>[ ]</code> å
ã«ã«ã³ãã§åºåãããèŠçŽ ã䞊ã¹ãŠè¡šçŸããŸããäŸãã°ã<code>[1, 2, 3]</code>ã<code>["a", "b", "c"]</code>ãªã©ã®é
åãè¡šçŸããããšãã§ããŸãã
ãããã®åºç€çãªããŒã¿åãšå€æ°ã«é¢ããã³ãŒãäŸã瀺ããŸãã
:<syntaxhighlight lang=julia>
# æŽæ°åã®å€æ°
x = 10
println(typeof(x)) # => Int64
println(x) # => 10
# æµ®åå°æ°ç¹æ°åã®å€æ°
y = 3.14
println(typeof(y)) # => Float64
println(y) # => 3.14
# æåååã®å€æ°
name = "Julia"
println(typeof(name)) # => String
println(name) # => Julia
# é
ååã®å€æ°
numbers = [1, 2, 3, 4, 5]
println(typeof(numbers)) # => Array{Int64,1}
println(numbers) # => [1, 2, 3, 4, 5]
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ãæŽæ°åã®å€æ° <code>x</code>ãæµ®åå°æ°ç¹æ°åã®å€æ° <code>y</code>ãæåååã®å€æ° <code>name</code>ãé
ååã®å€æ° <code>numbers</code> ãå®çŸ©ããŠããŸããããããã®å€æ°ã®åãå€ã <code>typeof()</code> é¢æ°ã <code>println()</code> é¢æ°ã䜿çšããŠåºåããŠããŸãã
ããã®çŽ¹ä»ããããŒã¿åã¯ãããäžéšã§ããæãé »ç¹ã«äœ¿çšãããã®ã§ãã
===åã¢ãããŒã·ã§ã³===
åã¢ãããŒã·ã§ã³ïŒType AnnotationïŒãšã¯ãããã°ã©ãã³ã°èšèªã«ãããŠå€æ°ãé¢æ°ãªã©ã®èŠçŽ ã«å¯ŸããŠãæ瀺çã«åãæå®ããããšãæããŸããäžè¬çã«ãåçåä»ããæ¡çšããèšèªã§ã¯ãå€æ°ã®åã¯å®è¡æã«å€ã«åºã¥ããŠæšè«ãããŸãããéçåä»ããæ¡çšããèšèªã§ã¯ãå€æ°ã®åã¯ã³ãŒãã®èšè¿°æç¹ã§æ瀺çã«æå®ããå¿
èŠããããŸãã
Juliaã§ã¯ãåçåä»ããæ¡çšããŠããŸãããåã¢ãããŒã·ã§ã³ã䜿çšããŠæ瀺çã«åãæå®ããããšãã§ããŸããããã«ãããã³ãŒãã®èªã¿ããããããã©ãŒãã³ã¹ã®æé©åãå¯èœã«ãªããŸããåã¢ãããŒã·ã§ã³ã¯ãé¢æ°ã®åŒæ°ãæ»ãå€ãå€æ°ã®å®£èšãé
åãèŸæžã®èŠçŽ åãªã©ã«é©çšãããããšããããŸããJuliaã§ã¯ãåã¢ãããŒã·ã§ã³ã¯ <code>::</code> ãçšããŠè¡šçŸãããŸãã
以äžã¯ãåã¢ãããŒã·ã§ã³ã®äŸã§ãã
:<syntaxhighlight lang=julia>
# æŽæ°åã®å€æ° x
x::Int = 10
# æµ®åå°æ°ç¹æ°åã®å€æ° y
y::Float64 = 3.14
# æåååã®å€æ° greeting
greeting::String = "Hello, Julia!"
# ã€ã³ããã¯ã¹åã®é
å indices
indices::Array{Int, 1} = [1, 2, 3, 4, 5]
# 2次å
ã®æµ®åå°æ°ç¹æ°åã®é
å matrix
matrix::Array{Float64, 2} = [1.0 2.0 3.0; 4.0 5.0 6.0; 7.0 8.0 9.0]
</syntaxhighlight>
ãã®ã³ãŒãäŸã§ã¯ãæŽæ°å (<code>Int</code>)ãæµ®åå°æ°ç¹æ°å (<code>Float64</code>)ãæååå (<code>String</code>) ã®å€æ°ãšãããããã®åãèŠçŽ åãšããé
åãå®çŸ©ãããŠããŸãããããã®èŠçŽ ã«å¯ŸããŠåã¢ãããŒã·ã§ã³ãè¡ãããŠããŸãã
===åæšè«===
åæšè«ïŒtype inferenceïŒã¯ãããã°ã©ãã³ã°èšèªãå€æ°ãåŒã®åãã³ãŒãããæšæž¬ããéçã«æ±ºå®ããããã»ã¹ã§ããJuliaã§ã¯ãã³ã³ãã€ã©ãå€æ°ãé¢æ°ã®åãæšè«ããã³ã³ãã€ã«æã«åã®æŽåæ§ã確èªããŸãã
äŸãã°ã次ã®ã³ãŒããèŠãŠã¿ãŸãããã
:<syntaxhighlight lang=julia>
x = 5
y = "hello"
z = x + 3.5
</syntaxhighlight>
ãã®å ŽåãJuliaã¯æ¬¡ã®ããã«åãæšè«ããŸãã
* <code>x</code> ã¯æŽæ°å (<code>Int</code>) ãšæšè«ãããŸãã
* <code>y</code> ã¯æååå (<code>String</code>) ãšæšè«ãããŸãã
* <code>z</code> ã¯æµ®åå°æ°ç¹æ°å (<code>Float64</code>) ãšæšè«ãããŸãã
Juliaã®åæšè«ã¯éåžžã«æè»ã§ãããéçåä»ãèšèªã®å©ç¹ãšåçåä»ãèšèªã®æè»æ§ãçµã¿åãããŠããŸããããã«ãããã³ãŒããå®å
šã§é«éã«å®è¡ãããäžæ¹ã§ãåé·ãªåã®æ瀺ãå¿
èŠãªå Žé¢ãæžããããšãã§ããŸãã
Juliaãæ¡çšããŠããåæšè«ã®ã¢ã«ãŽãªãºã ã¯ãéçåä»ããšåçåä»ãã®ç¹æ§ãçµã¿åããããã®ã§ããJuliaã®åæšè«ã¯ãéç解æãè¡ããªããããåçã«åã®æšè«ãè¡ãããšãã§ããŸãã
å
·äœçã«ã¯ãJuliaã®åæšè«ã¯ä»¥äžã®æé ã«åºã¥ããŠããŸãã
;å€æ°ã®åæå: å€æ°ã宣èšãããåæåãããéã«ããã®å€ããåãæšè«ãããŸãã
;é¢æ°ã®åŒã³åºã: é¢æ°ãåŒã³åºãããéã«ãåŒæ°ã®åããé¢æ°ã®åãæšè«ããŸãã
;æŒç®åã®é©çš: æŒç®åãé©çšãããéã«ããã®ãªãã©ã³ãã®åããæŒç®çµæã®åãæšè«ããŸãã
;æ¡ä»¶åå²: æ¡ä»¶åå²ã®ãããã¯å
ã§ã®å€æ°ã®åã¯ãæ¡ä»¶æã«ããå¶çŽããæšè«ãããŸãã
;ãžã§ããªãã¯é¢æ°ã®åŒã³åºã: ãžã§ããªãã¯é¢æ°ã®åã¯ãåŒã³åºãæã®åŒæ°ã®åã«åºã¥ããŠæšè«ãããŸãã
ãããã®æé ã«ãããJuliaã¯å€æ°ãé¢æ°ã®åãéçã«æšè«ããã³ã³ãã€ã«æã«åã®æŽåæ§ã確èªããŸããããããå¿
èŠã«å¿ããŠåçã«åã远跡ããããšããããŸãããã®æè»æ§ã«ãããJuliaã¯é«éãªã³ãŒãã®çæãšæè»ãªããã°ã©ãã³ã°ãäž¡ç«ããŠããŸãã
=== åŒãšæŒç®å ===
Juliaã«ãããŠãããã°ã©ã ã¯åºæ¬çã«åŒãšæŒç®åã®çµã¿åããã§æ§æãããŸããåŒã¯å€ãçæããæŒç®åã¯ãããã®å€ã«å¯ŸããŠç¹å®ã®æäœãè¡ããŸããããã§ã¯ãJuliaã§äœ¿ãããäž»èŠãªæŒç®åãšåŒã«ã€ããŠèª¬æããŸãã
==== åŒ (Expressions) ====
åŒã¯ããã°ã©ã å
ã§å€ãçæããã³ãŒãã®æçã§ããåŒã¯å€æ°ããªãã©ã«ãé¢æ°åŒã³åºããæŒç®åã®çµã¿åãããªã©ã§æ§æãããŸããJuliaã®åŒã¯ä»ã®åŒãæŒç®åãšçµã¿åãããããšã§ããè€éãªåŒãäœãããšãã§ããŸãã
==== ãªãã©ã« (Literals) ====
ãªãã©ã«ã¯ããã°ã©ã å
ã§åºå®ãããå€ãè¡šçŸããæ¹æ³ã§ããäŸãã°ãæŽæ°ãæµ®åå°æ°ç¹æ°ãæååãçåœå€ãªã©ããããŸãã以äžã¯ãããã€ãã®ãªãã©ã«ã®äŸã§ãïŒ
* æŽæ°ãªãã©ã«: <code>42</code>, <code>-10</code>, <code>0x1F</code> (16é²æ°)
* æµ®åå°æ°ç¹æ°ãªãã©ã«: <code>3.14</code>, <code>-0.01</code>, <code>2.5e-3</code> (ææ°è¡šèš)
* æååãªãã©ã«: <code>"Hello, World!"</code>, <code>"Julia"</code>
* çåœå€ãªãã©ã«: <code>true</code>, <code>false</code>
==== æŒç®å (Operators) ====
æŒç®åã¯åŒå
ã§å€ã«å¯Ÿããç¹å®ã®æäœãè¡ããŸããJuliaã«ã¯ããŸããŸãªçš®é¡ã®æŒç®åããããŸããã以äžã¯äžè¬çãªæŒç®åã®äŸã§ãïŒ
* ç®è¡æŒç®å: <code>+</code> (å ç®), <code>-</code> (æžç®), <code>*</code> (ä¹ç®), <code>/</code> (é€ç®), <code>÷</code> (æŽæ°é€ç®), <code>%</code> (å°äœ)
* æ¯èŒæŒç®å: <code>==</code> (çãã), <code>!=</code> (çãããªã), <code><</code> (æªæº), <code>></code> (è¶
é), <code><=</code> (以äž), <code>>=</code> (以äž)
* è«çæŒç®å: <code>&&</code> (è«çç©), <code>||</code> (è«çå), <code>!</code> (è«çåŠå®)
* 代å
¥æŒç®å: <code>=</code> (代å
¥), <code>+=</code>, <code>-=</code>, <code>*=</code>, <code>/=</code>, <code>^=</code>, ãªã©
:<syntaxhighlight lang=julia>
# ç®è¡æŒç®å
result_add = 10 + 5
result_subtract = 20 - 8
result_multiply = 6 * 4
result_divide = 100 / 10
# æŽæ°é€ç®æŒç®å
result_integer_divide = 100 ÷ 10
result_integer_remainder = 17 % 5
# æ¯èŒæŒç®å
equality_check = (result_add == result_subtract)
inequality_check = (result_multiply != result_divide)
less_than_check = (result_remainder < result_add)
greater_than_check = (result_divide > result_subtract)
less_than_or_equal_check = (result_multiply <= result_divide)
greater_than_or_equal_check = (result_add >= result_subtract)
# è«çæŒç®å
logical_and = (result_add < 20) && (result_subtract > 0)
logical_or = (result_multiply == 24) || (result_divide != 0)
logical_not = !(result_remainder <= 4)
# 代å
¥æŒç®å
x = 10
x += 5 # x = x + 5
y = 20
y -= 8 # y = y - 8
z = 6
z *= 4 # z = z * 4
w = 100
w /= 10 # w = w / 10
v = 5
v ^= 3 # v = v ^ 3
</syntaxhighlight>
ãããã®æŒç®åã¯åŒå
ã§äœ¿çšãããå€ãåŒã«å¯ŸããŠç¹å®ã®æäœãå®è¡ããŸãã
==== åªå
é äœãšçµåæ§ ====
æŒç®åã«ã¯åªå
é äœãšçµåæ§ããããŸããåªå
é äœã¯æŒç®åãåŒå
ã§ã©ã®ãããªé åºã§è©äŸ¡ããããã瀺ããçµåæ§ã¯åãåªå
é äœã®æŒç®åãã©ã®ããã«ã°ã«ãŒãåããããã瀺ããŸããJuliaã«ã¯æŒç®åã®åªå
é äœãšçµåæ§ãå®çŸ©ããèŠåããããŸãã
:{| class="wikitable"
|+ æŒç®åã®åªå
é äœãšçµåæ¹å
!æŒç®å!!åªå
床!!çµåæ¹å
|-
| () || æãé«ã || å·Šããå³ãž
|-
| . [] || || å·Šããå³ãž
|-
| + - ~ ! || || å³ããå·Šãž
|-
| * / % ÷ \ || || å·Šããå³ãž
|-
| + - || || å·Šããå³ãž
|-
| < <= > >= || || å·Šããå³ãž
|-
| == != || || å·Šããå³ãž
|-
| & || || å·Šããå³ãž
|-
| <nowiki>|</nowiki> || || å·Šããå³ãž
|-
| && || || å·Šããå³ãž
|-
| <nowiki>||</nowiki> || || å·Šããå³ãž
|-
| ? : || || å³ããå·Šãž
|-
| = || æãäœã || å³ããå·Šãž
|}
Juliaã®åŒãšæŒç®åãç解ããããšã¯ãããã°ã©ã ãäœæãç解ããäžã§éèŠãªã¹ãã«ã§ãã
ãããã®æŠå¿µããã¹ã¿ãŒããããšã§ãããå¹ççã§æ£ç¢ºãªã³ãŒããæžãããšãã§ããŸãã
;ããŸããŸãªæŒç®å:<syntaxhighlight lang=julia>
# æŽæ°é€ç®
7 ÷ 3 # => 2
# å°äœ
7 % 3 # => 1
# éä¹ç®
7 \ 3 # => 0.42857142857142855 == 3 / 7
# ã¹ãä¹
2^3 # => 8
# æ¯èŒæŒç®å
2 == 2 # => true
2 != 3 # => true
2 > 1 # => true
2 >= 2 # => true
1 < 2 # => true
2 <= 2 # => true
# è«çæŒç®å
true && false # => false
true || false # => true
!true # => false
# ãããæŒç®å
2 & 3 # => 2
2 | 3 # => 3
~2 # => -3
2 >> 1 # => 1
2 << 1 # => 4
# äžé
æŒç®å
true ? "Yes" : "No" # => "Yes"
</syntaxhighlight>
==== . æŒç®åïŒãã¯ãã«åæŒç®åïŒ ====
Juliaã®<code>.</code>æŒç®åã¯ãèŠçŽ ããšã®æŒç®ãè¡ãããã®ãã¯ãã«åæŒç®åã§ããããã¯ãJuliaèšèªã«ãããŠéåžžã«éèŠãªæ©èœã§ããããã¯ãã«ãè¡åãªã©ã®èŠçŽ ããšã®æŒç®ãç°¡æœã«è¡ãããšãã§ããŸãã
<code>.</code>æŒç®åã¯ãéåžžã®æŒç®åïŒå ç®ãæžç®ãä¹ç®ãé€ç®ãªã©ïŒã®åã«çœ®ãããšã§ããã¯ãã«ãè¡åã®åèŠçŽ ã«ãã®æŒç®ãé©çšããããšãã§ããŸããããã«ãããèŠçŽ ããšã®æŒç®ãéåžžã«ç°¡æœã«èšè¿°ã§ããé«éãªåŠçãå¯èœãšãªããŸãã
以äžã«ã<code>.</code>æŒç®åã®äœ¿çšäŸã瀺ããŸãã
:<syntaxhighlight lang=julia>
# ãã¯ãã«ã®å®çŸ©
a = [1, 2, 3]
b = [4, 5, 6]
# èŠçŽ ããšã®å ç®
result_add = a .+ b
println(result_add) # åºå: [5, 7, 9]
# èŠçŽ ããšã®ä¹ç®
result_mul = a .* b
println(result_mul) # åºå: [4, 10, 18]
</syntaxhighlight>
ãã®ããã«ã<code>.</code>æŒç®åã䜿çšããããšã§ããã¯ãã«ã®èŠçŽ ããšã®æŒç®ãã·ã³ãã«ã«å®è¡ã§ããŸãã
Juliaã®<code>.</code>æŒç®åã¯ãæ°å€æŒç®ã ãã§ãªããé¢æ°ã®é©çšãè«çæŒç®ãªã©ãããŸããŸãªæäœã«å¯ŸããŠã䜿çšããããšãã§ããŸãã以äžã«ã<code>.</code>æŒç®åã䜿ã£ãç°ãªãæäœã®ã³ãŒãäŸã瀺ããŸãã
; é¢æ°ã®é©çš:
:<syntaxhighlight lang=julia>
# é¢æ°ãå®çŸ©
f(x) = x^2
# ãã¯ãã«ã®èŠçŽ ããšã«é¢æ°ãé©çš
a = [1, 2, 3]
result_func = f.(a)
println(result_func) # åºå: [1, 4, 9]
</syntaxhighlight>
ãããã®äŸã§ã¯ã<code>.</code>æŒç®åã䜿çšããŠãé¢æ°ãæŒç®åããã¯ãã«ã®åèŠçŽ ã«é©çšããŠããŸããããã«ãããèŠçŽ ããšã®æäœãç°¡æœã«èšè¿°ã§ããæè»æ§ãé«ãŸããŸããJuliaã®<code>.</code>æŒç®åã¯ãããŸããŸãªããŒã¿åãæŒç®ã«å¯ŸããŠå©çšã§ããããã°ã©ãã³ã°ã®å¹çãåäžãããŸãã
===== ã¢ãããŒã«ç© =====
ã¢ãããŒã«ç©ã¯ãé
åã®å¯Ÿå¿ããèŠçŽ å士ã®ç©ãèšç®ããŠãæ°ããé
åãçæããæŒç®ã§ããJuliaã§ã¯ãæãåºæ¬çãªã¢ãããŒã«ç©ã®èšç®æ¹æ³ã¯ãèŠçŽ å士ã®æãç®æŒç®å.ã䜿çšããããšã§ããäŸãã°ã次ã®ããã«ïŒã€ã®é
åãçšæãããããã®ã¢ãããŒã«ç©ãèšç®ããããšãã§ããŸãã
:<syntaxhighlight lang=julia>
a = [1, 2, 3]
b = [4, 5, 6]
c = a .* b # ã¢ãããŒã«ç©ãèšç®
println(c) # [4, 10, 18] ã衚瀺
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ã<code>.*</code>ã䜿ã£ãŠãèŠçŽ ããšã®æãç®æŒç®åãé
åaãšé
åbã«é©çšããæ°ããé
åcãçæããŠããŸãããããã£ãŠãã¢ãããŒã«ç©ã¯æ°ããé
åãçæãããããå
ã®ïŒã€ã®é
åãšã¯ç°ãªããŸãã
ãŸããè¡åã®ã¢ãããŒã«ç©ãèšç®ããã«ã¯ãåãããã«åèŠçŽ ã«æãç®æŒç®åãé©çšããŸããäŸãã°ã次ã®ããã«è€æ°ã®è¡åã®ã¢ãããŒã«ç©ãèšç®ããããšãã§ããŸãã
:<syntaxhighlight lang=julia>
a = [1 2; 3 4]
b = [5 6; 7 8]
c = [9 10; 11 12]
d = a .* b .* c # ã¢ãããŒã«ç©ãèšç®
println(d) # [45 120 ;231 384] ã衚瀺
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ãåè¡åã«å¯ŸããŠãæãç®æŒç®åãé©çšããæ°ããè¡åãçæããŠããŸããããã§ããå
ã®è¡åãšã¯ç°ãªãæ°ããè¡åãçæãããŸãã
==== ä¹ç®æŒç®åã®çç¥ ====
Juliaã§ã¯ãä¹ç®æŒç®åãçç¥ããããšãã§ããŸãããã®æ©èœã䜿ããšããªãã©ã«ãå€æ°ãšæ°å€ã®éã«ä¹ç®æŒç®å <code>*</code> ãæ瀺çã«æžããã«ãæ°å€ãšä¹ç®ããããšãã§ããŸãã
å
·äœçãªäŸãèŠãŠã¿ãŸãããïŒ
:<syntaxhighlight lang=julia>
x = 3
println(10x) # 30
println(3.14x) # 9.42
println([1, 2, 3]x) # [3, 6, 9]
println([1 2 3; 4 5 6]x) # [3 6 9; 12 15 18]
</syntaxhighlight>
äžèšã®äŸã§ã¯ã<code>10x</code>ã¯<code>10 * x</code>ãšåãã§ãããä¹ç®æŒç®å <code>*</code> ãçç¥ããŠèšè¿°ãããŠããŸããããã«ãããããç°¡æœãªã³ãŒããæžãããšãã§ããŸãããã ããå€æ°åãšæ°å€ã®éã«ã¹ããŒã¹ããªãããšã«æ³šæããŠãã ãããã¹ããŒã¹ããããšJuliaã¯å¥ã®æ§æãšè§£éãããšã©ãŒãçºçããŸãã
以äžã¯ãmapé¢æ°ãšdoãããã¯ã䜿çšããŠä¹ç®æŒç®åãçç¥ããäŸã§ãïŒ
:<syntaxhighlight lang=julia>
# ä¹ç®æŒç®åãçç¥ããŠãmapé¢æ°ã§åèŠçŽ ã2åã«ãã
result = map([1, 2, 3]) do x
2x # ããã§ä¹ç®æŒç®å * ãçç¥ãããŠãã
end
println(result) # [2, 4, 6]
</syntaxhighlight>
ãã®äŸã§ã¯ãmapé¢æ°ã䜿çšããŠé
å [1, 2, 3] ã®åèŠçŽ ã2åã«ããŠããŸããdoãããã¯å
ã§ä¹ç®æŒç®å * ãçç¥ããŠèšè¿°ããŠããŸããããã®æ§æã¯æ£ãã解éãããŸããdoãããã¯å
ã®åŒã¯ãéåžžã®ã³ãŒããšåãããã«è©äŸ¡ãããŸãã
==== ãã€ãæŒç®åïŒ|>ïŒ ====
Juliaã§ã¯ããã€ãæŒç®å <code>|></code> ã䜿çšããŠãé¢æ°ã®åºåã次ã®é¢æ°ã®å
¥åã«çŽæ¥æž¡ãããšãã§ããŸãã
ããã«ãããé¢æ°ãé£éãããããšãã§ããã³ãŒãã®èªã¿ããããåäžããŸãã
ãã€ãæŒç®åã®äžè¬çãªæ§æã¯æ¬¡ã®ãšããã§ãïŒ
:<syntaxhighlight lang=julia>
result = input |> function1 |> function2 |> ... |> functionN
</syntaxhighlight>
ããã¯ã<code>input</code> ã <code>function1</code> ã«é©çšãããã®çµæã <code>function2</code> ã«é©çšãããã®çµæã <code>function3</code> ã«é©çšãããããŠæçµçã« <code>functionN</code> ã«é©çšãããšããæå³ã§ãã
äŸãã°ã次ã®ãããªã³ãŒããèããŠã¿ãŸãããïŒ
:<syntaxhighlight lang=julia>
result = f(g(h(x)))
</syntaxhighlight>
ããããã€ãæŒç®åã䜿çšããŠæžãçŽããšæ¬¡ã®ããã«ãªããŸãïŒ
:<syntaxhighlight lang=julia>
result = x |> h |> g |> f
</syntaxhighlight>
ãã®ããã«ãã€ãæŒç®åã䜿çšããããšã§ãã³ãŒããå·Šããå³ãžãšèªç¶ã«èªãã圢ã«ãªãããã¹ããæ·±ããªãã®ãé²ãããšãã§ããŸãã
==== æŒç®åã®å®çŸ© ====
===== ãã¯ãã«ã«æ°ããæŒç®å<code>â</code>ãå®çŸ©ãã =====
Juliaã§ã¯ãæ°ããæŒç®åãå®çŸ©ããäºãã§ããŸãã
ããã§ã¯ã<code>â</code>ãšããæ°ããæŒç®åãå®çŸ©ããŠããã¯ãã«ã®ãã³ãœã«ç©ãèšç®ããé¢æ°ãå®è£
ããŠã¿ãŸãããã
;tp.jl:<syntaxhighlight lang=julia>
"""
â(v::Vector{T}, w::Vector{T}) where T
ãã¯ãã« `v` ãš `w` ã®ãã³ãœã«ç©ãèšç®ããŸãã
"""
function â(v::Vector{T}, w::Vector{T}) where T
[i * j for i in v for j in w]
end
v = [1, 2]
w = [3, 4]
result = v â w # ãã³ãœã«ç©ãèšç®ãã
println(result) # åºå: [3, 4, 6, 8]
</syntaxhighlight>
ãã®ã³ãŒãã¯ãæ°ããæŒç®å <code>â</code> ãå®çŸ©ãããã®æŒç®åã䜿çšããŠãã¯ãã«ã®ãã³ãœã«ç©ãèšç®ããçµæãåºåããŠããŸãã以äžã«ããããã®éšåã®è§£èª¬ãæäŸããŸãã
# <code>""" ãã¯ãã«</code> v<code>ãš</code>w <code>ã®ãã³ãœã«ç©ãèšç®ããŸãã """</code>
#* ããã¯é¢æ°ã®ããã¥ã¡ã³ããŒã·ã§ã³æååã§ããé¢æ°ã®æ©èœã䜿ãæ¹ã説æããŸãã
# <code>function â(v::Vector{T}, w::Vector{T}) where T</code>
#* ãã®è¡ã¯ãæ°ããæŒç®å <code>â</code> ã®å®çŸ©ã瀺ããŠããŸããé¢æ°ã®ã·ã°ããã£ïŒåæå®ãšåŒæ°ïŒãå®çŸ©ãããŠããŸãã
#* <code>v</code> ãš <code>w</code> ã¯ããããã <code>Vector{T}</code> åã®åŒæ°ã§ãã<code>T</code> ã¯åãã©ã¡ãŒã¿ã§ã<code>Vector</code> å
ã®èŠçŽ ã®åãè¡šããŸãã
# <code>[i * j for i in v for j in w]</code>
#* å
å
è¡šèšã䜿ã£ãŠããã¯ãã« <code>v</code> ãš <code>w</code> ã®åèŠçŽ ã®ãã¢ããšã«ç©ãèšç®ããŠãçµæãäžã€ã®ãªã¹ãã«éããŸãã
#* <code>for i in v for j in w</code> ãšããæ§æã¯ã<code>v</code> ãš <code>w</code> ã®èŠçŽ ã®çµã¿åãããå
šãŠåæããããã«äœ¿çšãããŸãã
# <code>v = [1, 2]</code>ã<code>w = [3, 4]</code>
#* ãã¹ãçšã®ãã¯ãã« <code>v</code> ãš <code>w</code> ãå®çŸ©ããŸãã
# <code>result = v â w</code>
#* å®çŸ©ããæŒç®å <code>â</code> ã䜿ã£ãŠããã¯ãã« <code>v</code> ãš <code>w</code> ã®ãã³ãœã«ç©ãèšç®ããŸãã
# <code>println(result)</code>
#* èšç®ããããã³ãœã«ç©ãåºåããŸãã
;ãã³ãœã«ç©
:ãã³ãœã«ç©ïŒtensor productïŒã¯ãç·å代æ°ãå€å€é解æãªã©ã®æ°åŠåéã§äœ¿çšãããæŠå¿µã§ãããã³ãœã«ç©ã¯ãè€æ°ã®ãã¯ãã«ç©ºéããã³ãœã«ç©ºéãçµã¿åãããŠæ°ãã空éãçæããæäœã§ãã
:ãã¯ãã«ç©ºé ''V'' äžã®ãã¯ãã« '''v''' ãšãã¯ãã«ç©ºé ''W'' äžã®ãã¯ãã« '''w''' ã®ãã³ãœã«ç© '''v'''â'''w''' ã¯ãæ°ãããã¯ãã«ç©ºé ''V''â''W'' äžã®èŠçŽ ãšãªããŸãããã®ãã³ãœã«ç©ã¯ã''V'' ã®åºåºãš ''W'' ã®åºåºã®ãã¹ãŠã®çµã¿åãããèããŠçæãããåºåºãæã€ãã¯ãã«ç©ºéã§ãã
:å
·äœçã«ã¯ããã¯ãã«ç©ºé ''V'' ã®åºåºã {'''e'''1â,'''e'''2â,âŠ,'''e'''''n''â} ããã¯ãã«ç©ºé ''W'' ã®åºåºã {'''f'''1â,'''f'''2â,âŠ,'''f'''''m''â} ãšãããšã''V''â''W'' ã®åºåºã¯ {'''e'''''i''ââ'''f'''''j''â} ãšãªããŸãã
:ãã³ãœã«ç©ã¯ãå€ãã®åéã§äœ¿çšãããŸããäŸãã°ãéåååŠã§ã¯ãè€æ°ã®éåç³»ã®ç¶æ
ãè¡šçŸããããã«ãã³ãœã«ç©ã䜿çšãããŸãããŸããç»ååŠçãæ©æ¢°åŠç¿ã®ãã¥ãŒã©ã«ãããã¯ãŒã¯ãªã©ã®åéã§ãããã³ãœã«ç©ãå©çšãããããšããããŸãã
=== å¶åŸ¡æ§é ===
å¶åŸ¡æ§é ïŒControl structuresïŒãšã¯ãããã°ã©ã ã®ãããŒãå¶åŸ¡ããããã®æ§é ãæ©èœã®ããšã§ããããã°ã©ãã³ã°èšèªã§ã¯ãæ¡ä»¶ã«å¿ããŠç°ãªãæäœãè¡ã£ãããåãæäœãç¹°ãè¿ãããããšã©ãŒãåŠçãããããããã«å¶åŸ¡æ§é ã䜿çšãããŸãã
==== è€ååŒïŒCompound ExpressionsïŒ ====
è€ååŒã¯ãè€æ°ã®åŒããŸãšããŠäžã€ã®åŒãšããŠæ±ãããã®æ¹æ³ã§ããJuliaã§ã¯ã<code>begin</code> ããŒã¯ãŒãã䜿çšããŠè€ååŒãéå§ãã<code>end</code> ããŒã¯ãŒãã§çµäºããŸãããŸãã<code>;</code> ã䜿çšããŠè€æ°ã®åŒã1è¡ã«ãŸãšããããšãã§ããŸãã
:<syntaxhighlight lang=julia>
begin
# è€ååŒã®éå§
statement1
statement2
statement3
end
</syntaxhighlight>
ãŸãã¯
:<syntaxhighlight lang=julia>
statement1; statement2; statement3
</syntaxhighlight>
==== æ¡ä»¶ä»ãè©äŸ¡ïŒConditional EvaluationïŒ ====
æ¡ä»¶ä»ãè©äŸ¡ã¯ãç¹å®ã®æ¡ä»¶ãæºããããå Žåã«ç¹å®ã®ã³ãŒããããã¯ãå®è¡ããããã®æ¹æ³ã§ããJuliaã§ã¯ã<code>if-elseif-else</code> æãäžé
æŒç®å <code>?:</code> ã䜿çšããŠæ¡ä»¶ä»ãè©äŸ¡ãè¡ããŸãã
:<syntaxhighlight lang=julia>
if æ¡ä»¶1
# æ¡ä»¶1ãçã®å Žåã«å®è¡ãããã³ãŒã
elseif æ¡ä»¶2
# æ¡ä»¶2ãçã®å Žåã«å®è¡ãããã³ãŒã
else
# ã©ã®æ¡ä»¶ãæºããããªãå Žåã«å®è¡ãããã³ãŒã
end
</syntaxhighlight>
ãŸãã¯
:<syntaxhighlight lang=julia>
æ¡ä»¶ ? çã ã£ãæã®å€ : åœã ã£ãæã®å€
</syntaxhighlight>
==== ç絡è©äŸ¡ïŒShort-Circuit EvaluationïŒ ====
ç絡è©äŸ¡ã¯ãè«çæŒç®å <code>&&</code>ïŒè«çç©ïŒãš <code>||</code>ïŒè«çåïŒã䜿çšãããæ¡ä»¶åŒã®è©äŸ¡æ¹æ³ã§ããJuliaã§ã¯ãè«çæŒç®åãç絡è©äŸ¡ãè¡ããŸããå·Šã®æ¡ä»¶åŒã ãã§çµæã確å®ããå Žåãå³ã®æ¡ä»¶åŒã¯è©äŸ¡ãããŸããã
:<syntaxhighlight lang=julia>
# ANDïŒè«çç©ïŒã®å Žåãå·Šã®æ¡ä»¶ãåœãªãå³ã®æ¡ä»¶ã¯è©äŸ¡ãããªã
æ¡ä»¶1 && æ¡ä»¶2
# ORïŒè«çåïŒã®å Žåãå·Šã®æ¡ä»¶ãçãªãå³ã®æ¡ä»¶ã¯è©äŸ¡ãããªã
æ¡ä»¶1 || æ¡ä»¶2
</syntaxhighlight>
==== ç¹°ãè¿ãè©äŸ¡ïŒRepeated EvaluationïŒ ====
ç¹°ãè¿ãè©äŸ¡ã¯ãã«ãŒãæ§é ã䜿çšããŠç¹å®ã®ã³ãŒããããã¯ãè€æ°åå®è¡ããæ¹æ³ã§ããJuliaã§ã¯ã<code>while</code> ã«ãŒããš <code>for</code> ã«ãŒãã䜿çšãããŸãã
;while:<syntaxhighlight lang=julia>
while æ¡ä»¶
# æ¡ä»¶ãçã®å Žåã«å®è¡ãããã³ãŒã
end
</syntaxhighlight>
;for:<syntaxhighlight lang=julia>
for element in iterable
# åèŠçŽ ã«å¯ŸããåŠç
end
</syntaxhighlight>
==== äŸå€åŠçïŒException HandlingïŒ ====
Juliaã«ãããäŸå€åŠçã¯ãäºæããªãç¶æ³ããšã©ãŒãçºçããå Žåã«ããã°ã©ã ã®æ£åžžãªæµããäžæãããšã©ãŒãåŠçããä»çµã¿ã§ããäž»ãªäŸå€åŠçã®æ§æèŠçŽ ã¯ä»¥äžã®éãã§ãïŒ
# throwé¢æ°: äºæããªãç¶æ³ããšã©ãŒãçºçãããšãã«ãæ瀺çã«äŸå€ãçæããŸããäŸãã°ã<code>throw(DomainError("Invalid input"))</code>ãšããããšã§ããã¡ã€ã³ãšã©ãŒãçºçããããšã瀺ãäŸå€ãæããŸãã
# try-catchæ: <code>try</code>ãããã¯å
ã®ã³ãŒããå®è¡ããäœããã®äŸå€ãçºçããå Žåã«<code>catch</code>ãããã¯ã§ãã®äŸå€ãææããé©åãªåŠçãè¡ããŸããäŸå€ãææãããªãå Žåãããã°ã©ã ã¯å®è¡ãç¶ããŸãã以äžã¯try-catchæã®äŸã§ãïŒ
#:<syntaxhighlight lang=julia>
try
# äŸå€ãçºçããå¯èœæ§ã®ããã³ãŒã
catch ex
# äŸå€ãçºçããå Žåã®åŠç
println("Error occurred: $ex")
end
</syntaxhighlight>
# finallyç¯: <code>finally</code>ç¯ã¯ã<code>try</code>ãããã¯å
ã®ã³ãŒããã©ã®ãããªçµè·¯ã§çµäºããããšãããã®ã³ãŒããããã¯ãçµäºããéã«å®è¡ãããã³ãŒããæäŸããŸããäž»ã«ããªãœãŒã¹ã®è§£æŸãªã©ã®ã¯ãªãŒã³ã¢ããåŠçã«äœ¿çšãããŸãã以äžã¯<code>finally</code>ç¯ã®äŸã§ãïŒ
#:<syntaxhighlight lang=julia>
try
# äŸå€ãçºçããå¯èœæ§ã®ããã³ãŒã
finally
# ã¯ãªãŒã³ã¢ããåŠç
end
</syntaxhighlight>
äŸå€åŠçãé©åã«äœ¿çšããããšã§ãããã°ã©ã ãäºæãã¬ç¶æ³ããšã©ãŒã«ééãããšãã«ãããã«é©åã«å¯ŸåŠã§ããããã«ãªããŸãã
==== ã¿ã¹ã¯ããŸãã¯ã³ã«ãŒãã³ïŒTasksïŒ ====
ã¿ã¹ã¯ã¯ãããã°ã©ã ã®å®è¡ãäžæåæ¢ããåŸã§åéããããã®æ©èœã§ããJuliaã§ã¯ã<code>yieldto</code> é¢æ°ã䜿çšããŠã¿ã¹ã¯ãå®çŸ©ããŸãã
:<syntaxhighlight lang=julia>
function mytask()
# ã¿ã¹ã¯ã®åŠç
yieldto(main_task) # ã¡ã€ã³ã¿ã¹ã¯ã«å¶åŸ¡ãæ»ã
end
</syntaxhighlight>
===== æ¡ä»¶åŒ =====
æ¡ä»¶åŒã§ã¯ççå€åïŒBooleanïŒãèŠæ±ãããŸãã
Juliaã§ã¯ãæŽæ°å€ããççå€åãžã®æé»ã®å€æã¯è¡ãããªãã®ã§ãæ¡ä»¶åŒã¯æ瀺çã«ççå€ãæäŸããå¿
èŠããããŸãã
äŸãã°ãJuliaã§ã¯æ¬¡ã®ãããªã³ãŒããèããããŸãïŒ
:<syntaxhighlight lang=julia>
x = 5
# xã®å€ã0ã§ãªããã©ããã確èªãã
if x != 0
println("xã¯æ£ã®å€ã§ã")
end
</syntaxhighlight>
ãã®å Žåãæ¡ä»¶åŒ <code>x > 0</code> ã¯æŽæ°å€ <code>x</code> ã®å€ã0ã§ãªããã©ãããè©äŸ¡ããŸãã<code>x</code> ã®å€ãæ£ã®å Žåã«æ¡ä»¶ãçãšãªãã<code>println</code> é¢æ°ãå®è¡ãããŸããæŽæ°å€ããã®ãŸãŸæ¡ä»¶åŒã«äœ¿çšãããããšã¯ãªãããã®å€ãè©äŸ¡ããããã«æ¯èŒæŒç®åãªã©ã®æ¡ä»¶åŒã䜿çšããŸãã
===== å¶åŸ¡æ§é ã®ã³ãŒãã®ã£ã©ãªãŒ =====
:<syntaxhighlight lang=julia>
# æ¡ä»¶åå²ïŒif-elseif-elseïŒ
x = 10
if x > 0
println("Positive") # xãæ£ã®å Žåã«å®è¡
elseif x < 0
println("Negative") # xãè² ã®å Žåã«å®è¡
else
println("Zero") # ã©ã®æ¡ä»¶ã«ã該åœããªãå Žåã«å®è¡
end
# ç¹°ãè¿ãïŒwhileã«ãŒãïŒ
i = 1
while i <= 5
println(i) # iã®å€ã衚瀺
i += 1 # iã1ã€å¢ãã
end
# äŸå€åŠçïŒtry-catchïŒ
try
x = 1 / 0 # ãŒãã§å²ãç®ãè©Šã¿ã
catch
println("Error occurred") # ãšã©ãŒãçºçããå Žåã«å®è¡
end
# äžé
æŒç®å
y = x > 0 ? "Positive" : "Non-positive" # xãæ£ãªã"Positive"ãããã§ãªããã°"Non-positive"ãyã«ä»£å
¥
# è«çæŒç®åã®ç絡è©äŸ¡
z = false && (println("This won't be executed")) # å·ŠåŽãåœãªã®ã§å³åŽã¯è©äŸ¡ãããªã
</syntaxhighlight>
ãã®ã³ãŒãäŸã§ã¯ãæ¡ä»¶åå²ãç¹°ãè¿ããäŸå€åŠçãäžé
æŒç®åãè«çæŒç®åã®ç絡è©äŸ¡ã®åå¶åŸ¡æ§é ã䜿çšãããŠããŸããããããã®ãããã¯ã«ã¯ã³ã¡ã³ããä»ããŠãããåå¶åŸ¡æ§é ãã©ã®ããã«æ©èœãããã説æãããŠããŸãã
==== ãããŒå¶åŸ¡æ ====
Juliaã«ã¯ãã«ãŒãã®å¶åŸ¡ãäŸå€åŠçã®å¶åŸ¡ãªã©ãè¡ãããã®ããŸããŸãªå¶åŸ¡æããããŸãã以äžã«ããã€ãã®äž»èŠãªãã®ã瀺ããŸãã
# breakæ:
#* <code>break</code>: ã«ãŒããéäžã§çµäºããã«ãŒãããæãåºãããã®å¶åŸ¡æã§ãã
# continueæ:
#* <code>continue</code>: ã«ãŒãã®çŸåšã®å埩ãçµäºãã次ã®å埩ãéå§ããããã®å¶åŸ¡æã§ãã
# returnæ:
#* <code>return</code>: é¢æ°ã®å®è¡ãçµäºããé¢æ°ããå€ãè¿ãããã®å¶åŸ¡æã§ãã
# throwæ:
#* <code>throw</code>: äŸå€ãæ瀺çã«çºçãããäŸå€åŠçãããã¯ã§ãã£ãããããããã«ããããã®å¶åŸ¡æã§ãã
ãããã®å¶åŸ¡æã¯ãããã°ã©ã ã®å®è¡ãããŒãå¶åŸ¡ããããã«äœ¿çšãããŸããäŸãã°ã<code>break</code>æã¯ã«ãŒãå
ã®ç¹å®ã®æ¡ä»¶äžã§ã«ãŒããçµäºããããã«äœ¿çšããã<code>return</code>æã¯é¢æ°ã®å®è¡ãçµäºããŠå€ãè¿ãããã«äœ¿çšãããŸãã<code>throw</code>æã¯ãç¹å®ã®æ¡ä»¶äžã§ãšã©ãŒãçºçããããããåŠçããããã®äŸå€åŠçãããã¯ã«å¶åŸ¡ã移ãããã«äœ¿çšãããŸãã
;ã³ãŒãäŸ
:*以äžã¯ãå¶åŸ¡æã網çŸ
ããJuliaã®ã³ãŒãäŸã§ããã³ã¡ã³ãã§åå¶åŸ¡æã®åäœã説æããŠããŸãã
:<syntaxhighlight lang=julia>
function control_flow_example(x)
# ifæã®äŸ
if x > 0
println("xã¯æ£ã®å€ã§ã")
elseif x == 0
println("xã¯ãŒãã§ã")
else
println("xã¯è² ã®å€ã§ã")
end
# whileã«ãŒãã®äŸ
println("ã«ãŠã³ãããŠã³éå§:")
i = x
while i >= 0
println(i)
i -= 1
end
# forã«ãŒãã®äŸ
println("èŠçŽ ã®è¡šç€º:")
for element in ["apple", "banana", "cherry"]
println(element)
end
# breakæã®äŸ
println("3以äžã®å¥æ°ã®è¡šç€º:")
for i in 1:10
if i > 3
break # ã«ãŒããçµäºãã
elseif iseven(i)
continue # å¶æ°ã®å Žåã¯æ¬¡ã®å埩ã«é²ã
end
println(i)
end
# returnæã®äŸ
println("10以äžã®çŽ æ°ã®ã«ãŠã³ã:")
function count_primes(n)
count = 0
for i in 2:n
if isprime(i)
count += 1
end
end
return count # é¢æ°ã®å®è¡ãçµäºããcountã®å€ãè¿ã
end
println("10以äžã®çŽ æ°ã®æ°:", count_primes(10))
# throwæã®äŸ
println("ãšã©ãŒãã§ãã¯:")
function check_positive(x)
if x <= 0
throw(ArgumentError("xã¯æ£ã®å€ã§ãªããã°ãªããŸãã"))
end
println("xã¯æ£ã®å€ã§ã")
end
try
check_positive(-5)
catch e
println("ãšã©ãŒãçºçããŸãã:", e)
end
end
# ã¡ã€ã³ã®å®è¡éšå
control_flow_example(5)
</syntaxhighlight>
ãã®ã³ãŒãäŸã§ã¯ãåçš®ã®å¶åŸ¡æïŒifæãwhileã«ãŒããforã«ãŒããbreakæãreturnæãthrowæïŒã䜿çšããŠããŸããããããã®å¶åŸ¡æ§é ããé©åã«ããã°ã©ã ã®ãããŒãå¶åŸ¡ããŠããŸãã
===å
å
è¡šèš===
å
å
è¡šèšïŒcomprehensionïŒã¯ãããã°ã©ãã³ã°èšèªã«ãããŠãã³ã¬ã¯ã·ã§ã³ïŒé
åããªã¹ããã»ãããèŸæžãªã©ïŒãçæããããã®æ§ææ©èœã§ããéåžžãå
å
è¡šèšã¯ãã«ãŒããæ¡ä»¶æã䜿çšããã«ãç°¡æœãã€å¹ççã«ã³ã¬ã¯ã·ã§ã³ãçæããããšãã§ããŸãã
;é
åïŒArrayïŒã®å
å
è¡šèšïŒ
:é
åå
å
è¡šèšã¯ã次ã®ãããªæ§æãæã¡ãŸãïŒ
:<syntaxhighlight lang=julia>
[åŒ for item in iterable if æ¡ä»¶]
</syntaxhighlight>
:ããã¯ãiterableããèŠçŽ ãåãåºããæ¡ä»¶ãçã®å Žåã«åŒãè©äŸ¡ããŠæ°ããé
åãçæãããšããæå³ã§ãã
:<syntaxhighlight lang=julia>
# 0ãã9ãŸã§ã®æ°å€ã®ãã¡ãå¶æ°ã®ã¿ãå«ãé
åãçæ
evens = [x for x in 0:9 if x % 2 == 0]
</syntaxhighlight>
;ã»ããïŒSetïŒã®å
å
è¡šèšïŒ
:ã»ããå
å
è¡šèšã¯ã次ã®ãããªæ§æãæã¡ãŸãïŒ
:<syntaxhighlight lang=julia>
{åŒ for item in iterable if æ¡ä»¶}
</syntaxhighlight>
:ããã¯ãiterableããèŠçŽ ãåãåºããæ¡ä»¶ãçã®å Žåã«åŒãè©äŸ¡ããŠæ°ããã»ãããçæãããšããæå³ã§ãã
:<syntaxhighlight lang=julia>
# 0ãã9ãŸã§ã®æ°å€ã®ãã¡ãå¶æ°ã®ã¿ãå«ãã»ãããçæ
even_set = {x for x in 0:9 if x % 2 == 0}
</syntaxhighlight>
;èŸæžïŒDictïŒã®å
å
è¡šèšïŒ
:èŸæžå
å
è¡šèšã¯ã次ã®ãããªæ§æãæã¡ãŸãïŒ
:<syntaxhighlight lang=julia>
{ããŒåŒ => å€åŒ for item in iterable if æ¡ä»¶}
</syntaxhighlight>
:ããã¯ãiterableããèŠçŽ ãåãåºããæ¡ä»¶ãçã®å Žåã«ããŒåŒãšå€åŒãè©äŸ¡ããŠæ°ããèŸæžãçæãããšããæå³ã§ãã
:<syntaxhighlight lang=julia>
# 1ãã5ãŸã§ã®æ°å€ãããŒãšããããããã®ããŒã®2åãå€ãšããèŸæžãçæ
double_dict = {x => 2x for x in 1:5}
</syntaxhighlight>
å
å
è¡šèšã¯ãããã³ã³ãã¯ãã§èªã¿ãããã³ãŒããæžãããã®äŸ¿å©ãªæ段ã§ãã
==== è¡åãšå
å
è¡šèš ====
è¡åïŒMatrixïŒãçæããããã«ããå
å
è¡šèšã¯éåžžã«äŸ¿å©ã§ãã
ç¹ã«ã2次å
é
åãå¹ççã«çæããéã«åœ¹ç«ã¡ãŸãã以äžã«ããããªãã¯ã¹ãçæããå
å
è¡šèšã®äŸã瀺ããŸãã
:<syntaxhighlight lang=julia>
matrix = [[i * j for j in range(1, 4)] for i in range(1, 4)]
print(matrix)
</syntaxhighlight>
# 3x3ã®ãããªãã¯ã¹ãçæããäŸ
ãã®äŸã§ã¯ã3x3ã®ãããªãã¯ã¹ãçæãããŸããåèŠçŽ ã¯ããã®è¡çªå·ãšåçªå·ã®ç©ã«ãªããŸããçæããããããªãã¯ã¹ã¯ä»¥äžã®ããã«ãªããŸãïŒ
:<syntaxhighlight lang=julia>
[[1, 2, 3],
[2, 4, 6],
[3, 6, 9]]
</syntaxhighlight>
ãã®ããã«ãå
å
è¡šèšã䜿çšããããšã§ããã¹ããããã«ãŒããé¿ããŠãããªãã¯ã¹ãå¹ççã«çæããããšãã§ããŸãããŸããå
å
è¡šèšã䜿çšããããšã§ãã³ãŒããç°¡æœã«ãªããå¯èªæ§ãåäžããŸãã
ããã«ãå
å
è¡šèšã掻çšããŠæ¡ä»¶ã«åºã¥ãããããªãã¯ã¹ã®çæãå¯èœã§ããäŸãã°ãç¹å®ã®æ¡ä»¶ãæºããèŠçŽ ã®ã¿ãå«ããããªãã¯ã¹ãçæããããšãã§ããŸããå
å
è¡šèšãå©çšããããšã§ããã®ãããªæäœãç°¡æœã«èšè¿°ããããšãã§ããŸãã
===ããŒã¿æ§é ===
é
åãã¿ãã«ãèŸæžãªã©ã®ããŒã¿æ§é ãåŠã³ãŸãããããã®æ§é ã¯ããŒã¿ãå¹æçã«æ±ãããã®åºæ¬çãªããŒã«ã§ããããã«ãããŒã¿ã®ã€ã³ãã¯ã·ã³ã°ãã¹ã©ã€ã·ã³ã°ã®æ¹æ³ãç解ããŸããããŒã¿æ§é ã®éžæãšæäœã¯ããã°ã©ã ã®å¹çæ§ã«å€§ãã圱é¿ããããããã£ãããšç解ããŠãããŸãããã
==== Juliaã®ããŒã¿å ====
Juliaã«ã¯ãæ§ã
ãªããŒã¿åããããŸããäž»ãªããŒã¿åã¯ä»¥äžã®éãã§ãã
:{| class="wikitable"
|+ Juliaã®çµã¿èŸŒã¿åã®äžèŠ§
!åå
!typeof()è¡šçŸ
!説æ
!ãªãã©ã«
|-
|Boolå (Booleans)
|<code>Bool</code>
|ççå€ãè¡šãåãçïŒ<code>true</code>ïŒãŸãã¯åœïŒ<code>false</code>ïŒã®ããããã
|<code>true</code>, <code>false</code>
|-
|æŽæ°å (Integers)
|<code>Int64</code>, <code>Int32</code>, ...;<code>UInt64</code>, <code>UInt32</code>, ...
|笊å·ä»ãæŽæ°ã64ãããã32ããããªã©ã®å¹
ãç°ãªãã
|<code>42</code>, <code>-10</code>
|-
|æµ®åå°æ°ç¹æ°å (Floating Point Numbers)
|<code>Float64</code>, <code>Float32</code>, ...
|æµ®åå°æ°ç¹æ°ã64ãããã32ããããªã©ã®å¹
ãç°ãªãã
|<code>3.14</code>, <code>2.718</code>
|-
|è€çŽ æ°å (Complex Numbers)
|<code>Complex{Float64}</code>, <code>Complex{Float32}</code>, ...
|å®éšãšèéšãããªãè€çŽ æ°ãå®éšãšèéšã¯æµ®åå°æ°ç¹æ°ã
|<code>1 + 2im</code>, <code>3 - 4im</code>
|-
|æçæ°å (Rational Numbers)
|<code>Rational{Int64}</code>
|ååãšåæ¯ãããªãæçæ°ãååãšåæ¯ã¯æŽæ°ã
|<code>2//3</code>, <code>4//5</code>
|-
|æåå (Character)
|<code>Char</code>
|Unicodeæåã
|<code>'a'</code>, <code>'ð'</code>
|-
|æååå (String)
|<code>String</code>
|æååã
|<code>"hello"</code>, <code>"Julia"</code>
|-
|é
åå (Arrays)
|<code>Array{Int64,1}</code>, <code>Array{Float64,2}</code>, ...
|èŠçŽ ã®åãšæ¬¡å
æ°ã«ãã£ãŠå®çŸ©ãããé
åã
|<code>[1, 2, 3]</code>, <code>[1.0 2.0; 3.0 4.0]</code>
|-
|ã¿ãã«å (Tuples)
|<code>Tuple{Int64, String, Float64}</code>
|è€æ°ã®èŠçŽ ããŸãšããäžå€ã®ã³ã¬ã¯ã·ã§ã³ãèŠçŽ ã®åã¯æå®ãããã
|<code>(1, "apple", 3.14")</code>
|-
|èŸæžå (Dictionaries)
|<code>Dict{String, Int64}</code>
|ããŒãšå€ã®ãã¢ã®ã³ã¬ã¯ã·ã§ã³ãããŒãšå€ã®åãæå®ãããã
|<code>Dict("a" => 1, "b" => 2)</code>
|-
|ç¯å²å (Ranges)
|<code>UnitRange{Int64}</code>, <code>StepRangeLen{Float64}</code>, ...
|æ°å€ã®ç¯å²ãè¡šãåã
|<code>1:5</code>, <code>0:0.1:1</code>
|-
|Symbolå (Symbols)
|<code>Symbol</code>
|ã·ã³ãã«ãã·ã³ãã«ã¯äžæã®èå¥åãè¡šããŸãã
|<code>:apple</code>, <code>:Julia</code>
|}
:ãããã®çµã¿èŸŒã¿åã¯ãJuliaã®åºæ¬çãªããŒã¿æ§é ãæ§ç¯ããããã«äœ¿çšãããŸãã
::Juliaã«ã¯ãåæšè«ãããã®ã§ããããã®ããŒã¿åãæ瀺çã«æå®ããå¿
èŠã¯ããŸããããŸããã
==== æåå ====
Juliaã®Stringã¯ãããã¹ãããŒã¿ãè¡šãäžå€ã®ããŒã¿åã§ããæååã¯äžé£ã®æåïŒUnicodeæåïŒããæ§æãããããã«ã¯ã©ãŒããŒã·ã§ã³ã§å²ãŸããŸããäŸãã°ã<code>"Hello, world!"</code>ã®ãããªæååã¯ãæå<code>H</code>ã<code>e</code>ã<code>l</code>ã<code>l</code>ã<code>o</code>ã<code>,</code>ãã¹ããŒã¹ã<code>w</code>ã<code>o</code>ã<code>r</code>ã<code>l</code>ã<code>d</code>ã<code>!</code>ã®é£ç¶ããã·ãŒã±ã³ã¹ã§ãã
Juliaã®Stringã¯äžå€ã®ãããäžåºŠäœæãããæååã¯å€æŽã§ããŸãããããã¯ãæååãå€æŽãã代ããã«ãæ°ããæååãçæããããšã«ãªããŸããJuliaã®æååã¯UTF-8ã§ãšã³ã³ãŒããããŠãããUnicodeã®å
šãŠã®æåããµããŒãããŠããŸãã
Juliaã®Stringåã«ã¯ãæ§ã
ãªã¡ãœãããçšæãããŠãããæååã®æäœãåŠçãè¡ãããã®æ©èœãè±å¯ã«æäŸãããŠããŸãããŸããæååè£éãæ£èŠè¡šçŸãªã©ã®æ©èœãå©çšããããšãã§ããŸãã
æååã¯ãJuliaã§ã®ããã¹ãåŠçãããŒã¿æäœãæååæäœãªã©ã®å€ãã®å Žé¢ã§åºã䜿çšãããŸãã
以äžã«juliaã®æååã®ã¡ãœããã®äžéšã瀺ããŸãã
# æååã®é·ããååŸãã: <code>length(str)</code>
#:<syntaxhighlight lang=julia>
str = "Hello, world!"
len = length(str) # 13
</syntaxhighlight>
# æååã®é£çµ: <code>*</code>æŒç®åãŸãã¯<code>string()</code>é¢æ°ã䜿çšããŸãã
#:<syntaxhighlight lang=julia>
str1 = "Hello, "
str2 = "world!"
concatenated_str = str1 + str2 # "Hello, world!"
concatenated_str = string(str1, str2) # "Hello, world!"
</syntaxhighlight>
# éšåæååãååŸãã: <code>subString(str, start_index, end_index)</code>ãŸãã¯<code>str[start_index:end_index]</code>
#:<syntaxhighlight lang=julia>
str = "Hello, world!"
sub_str = str[1:5] # "Hello"
</syntaxhighlight>
# æååãå転ããã: <code>reverse(str)</code>
#:<syntaxhighlight lang=julia>
str = "Hello"
reversed_str = reverse(str) # "olleH"
</syntaxhighlight>
# 倧æåã»å°æåã®å€æ: <code>uppercase(str)</code>, <code>lowercase(str)</code>
#:<syntaxhighlight lang=julia>
str = "Hello, world!"
uppercase_str = uppercase(str) # "HELLO, WORLD!"
lowercase_str = lowercase(str) # "hello, world!"
</syntaxhighlight>
# æååã®åå²: <code>split(str, [delim])</code>
#:<syntaxhighlight lang=julia>
str = "apple, banana, orange"
words = split(str, ", ") # ["apple", "banana", "orange"]
</syntaxhighlight>
# æååã®çµå: <code>join(collection, [delim])</code>
#:<syntaxhighlight lang=julia>
words = ["apple", "banana", "orange"]
sentence = join(words, ", ") # "apple, banana, orange"
</syntaxhighlight>
# æååã®æ€çŽ¢: <code>search(str, pattern)</code>
#:<syntaxhighlight lang=julia>
str = "Hello, world!"
index = search(str, "world") # 8:12
</syntaxhighlight>
ãããã¯äžéšã®åºæ¬çãªæååã¡ãœããã§ãããJuliaã«ã¯ããã«å€ãã®æåååŠçé¢æ°ãçšæãããŠããŸãããããã®ã¡ãœãããçµã¿åãããŠãããŸããŸãªæååæäœãå®è¡ããããšãã§ããŸãã
{{ã³ã©ã |ã³ã¬ã¯ã·ã§ã³ãš typeof|2=以äžã¯Juliaã®ã³ãŒãäŸã§ããåãªãã©ã«è¡šçŸã«å¯Ÿãã<code>typeof</code>ã衚瀺ããã³ã¬ã¯ã·ã§ã³ãšãã¡ã€ã«å
¥åºåã«é¢ããäžéšã®æäœãå®è¡ããŠããŸãã
:<syntaxhighlight lang=julia>
# é
å
a = [1, 2, 3]
println("a: ", typeof(a))
println("a[2]: ", typeof(a[2]))
println("a[1:2]: ", typeof(a[1:2]))
println("push!(a, 4): ", typeof(push!(a, 4)))
# ã¿ãã«
t = (1, "hello", 3.14)
println("t: ", typeof(t))
println("t[2]: ", typeof(t[2]))
# èŸæž
d = Dict("apple" => 1, "banana" => 2, "orange" => 3)
println("d: ", typeof(d))
println("d[\"apple\"]: ", typeof(d["apple"]))
# éå
s = Set([1, 2, 3])
println("s: ", typeof(s))
println("pop!(s): ", typeof(pop!(s)))
# æåå
str = "hello world"
println("str: ", typeof(str))
println("str[2]: ", typeof(str[2]))
println("split(str): ", typeof(split(str)))
# ãã¡ã€ã«å
¥åºå
open("test.txt", "w") do file
write(file, "hello world")
end
f = open("test.txt", "r")
println("f: ", typeof(f))
println("readline(f): ", typeof(readline(f)))
</syntaxhighlight>
å®è¡çµæã¯ä»¥äžã®ããã«ãªããŸãã
:<syntaxhighlight lang=julia>
a: Array{Int64,1}
a[2]: Int64
a[1:2]: Array{Int64,1}
push!(a, 4): Array{Int64,1}
t: Tuple{Int64, String, Float64}
t[2]: String
d: Dict{String, Int64}
d["apple"]: Int64
s: Set{Int64}
pop!(s): Int64
str: String
str[2]: Char
split(str): Array{SubString{String},1}
f: IOStream
readline(f): String
</syntaxhighlight>
}}
Juliaã®ã³ã¬ã¯ã·ã§ã³åã¯ãè€æ°ã®èŠçŽ ãäžã€ã®ãŸãšãŸããšããŠæ ŒçŽããããŒã¿æ§é ãæããŸããã³ã¬ã¯ã·ã§ã³åã¯ç°ãªãèŠçŽ ã®éãŸããè¡šçŸãããããã®èŠçŽ ã«ã¢ã¯ã»ã¹ãããæäœãããããããã®æ¹æ³ãæäŸããŸãã
Juliaã®äž»èŠãªã³ã¬ã¯ã·ã§ã³åã«ã¯ä»¥äžã®ãããªãã®ããããŸãã
#é
åïŒArrayïŒ:
#*èŠçŽ ã®äžŠã³é ãä¿æãããå¯å€é·ã®ã³ã¬ã¯ã·ã§ã³ã
#*ç°ãªãåã®èŠçŽ ãå«ãããšãã§ããã
#*èŠçŽ ã®è¿œå ãåé€ãå¯èœã
#ã¿ãã«ïŒTupleïŒ:
#*åºå®é·ã®äžå€ãªã³ã¬ã¯ã·ã§ã³ã
#*è€æ°ã®åã®èŠçŽ ãå«ãããšãã§ããã
#*èŠçŽ ã®å€æŽãè¿œå ãã§ããªãã
#èŸæžïŒDictïŒ:
#*ããŒãšå€ã®ãã¢ãé¢é£ä»ããå¯å€é·ã®ã³ã¬ã¯ã·ã§ã³ã
#*ããŒã¯äžæã§ãªããã°ãªããªãã
#*ããŒã䜿çšããŠå€ã«ã¢ã¯ã»ã¹ããã
#ã»ããïŒSetïŒ:
#*äžæãªèŠçŽ ã®ã³ã¬ã¯ã·ã§ã³ã
#*èŠçŽ ã®é åºã¯ä¿æãããªãã
#*åéåãç©éåãªã©ã®éåæŒç®ã«äœ¿çšãããã
ãããã®ã³ã¬ã¯ã·ã§ã³åã¯ãç°ãªãããŒã¿æ§é ãæäœæ¹æ³ãæäŸããããŸããŸãªåé¡ãã¢ã«ãŽãªãºã ã«å¯ŸããŠé©ããæ¹æ³ã§ããŒã¿ãè¡šçŸããŸãã
==== é
å ====
é
åïŒArrayïŒã¯ãåãåã®èŠçŽ ãé åºä»ãã§æ ŒçŽããããŒã¿æ§é ã§ããJuliaã§ã¯ãé
åã¯1次å
ããå€æ¬¡å
ãŸã§ã®æ¬¡å
ãæã€ããšãã§ããŸããé
åã¯éåžžã«æè»ã§ãããæ°å€ãæååãæ§é äœãªã©ãããŸããŸãªçš®é¡ã®ããŒã¿ãæ ŒçŽã§ããŸãã
以äžã¯ãJuliaã§ã®é
åã®äŸã§ãïŒ
:<syntaxhighlight lang=julia>
# 1次å
ã®æŽæ°åã®é
å
array1 = [1, 2, 3, 4, 5]
# 2次å
ã®æµ®åå°æ°ç¹åã®é
å
array2 = [1.0 2.0 3.0; 4.0 5.0 6.0]
# 3次å
ã®æåååã®é
å
array3 = ["a" "b"; "c" "d"][:, :, ones(String, 2)]
# 1次å
ã®ç©ºã®é
å
empty_array = Int[]
</syntaxhighlight>
é
åã®èŠçŽ ãžã®ã¢ã¯ã»ã¹ã¯ãæ·»åã䜿çšããŠè¡ããŸããäŸãã°ã<code>array1</code>ã®2çªç®ã®èŠçŽ ã«ã¢ã¯ã»ã¹ããå Žåã¯<code>array1[2]</code>ãšããŸããJuliaã§ã¯ãæ·»åã¯1ããå§ãŸãããšã«æ³šæããŠãã ããã
é
åã¯å¯å€é·ã§ãããèŠçŽ ã®è¿œå ãåé€ãå€æŽãå¯èœã§ããäŸãã°ã<code>push!()</code>é¢æ°ã䜿çšããŠé
åã«èŠçŽ ãè¿œå ãããã<code>pop!()</code>é¢æ°ã䜿çšããŠé
åããèŠçŽ ãåé€ãããããããšãã§ããŸãã
;é
åã®ã¡ãœãã
Juliaã®é
åã¯ãå€ãã®äŸ¿å©ãªã¡ãœãããæäŸããŠããŸãã以äžã«ãäžéšã®äž»èŠãªé
åã¡ãœããã瀺ããŸãã
# èŠçŽ ã®è¿œå ãšåé€:
#* <code>push!(array, value)</code>: é
åã®æ«å°Ÿã«èŠçŽ ãè¿œå ããŸãã
#* <code>pop!(array)</code>: é
åã®æ«å°Ÿã®èŠçŽ ãåé€ããŠè¿ããŸãã
#* <code>append!(array1, array2)</code>: é
å2ãé
å1ã®æ«å°Ÿã«çµåããŸãã
# èŠçŽ ã®æäœ:
#* <code>sort(array)</code>: é
åã®èŠçŽ ãæé ã«äžŠã³æ¿ããŸãã
#* <code>reverse(array)</code>: é
åã®èŠçŽ ãéé ã«ããŸãã
#* <code>unique(array)</code>: é
åããéè€ããèŠçŽ ãåé€ããŸãã
#* <code>filter(predicate, array)</code>: æ¡ä»¶ãæºããèŠçŽ ã®ã¿ãæœåºããŸãã
# èŠçŽ ã®æ€çŽ¢ãšåç
§:
#* <code>findall(predicate, array)</code>: æ¡ä»¶ãæºããèŠçŽ ã®ã€ã³ããã¯ã¹ãè¿ããŸãã
#* <code>in(element, array)</code>: é
åå
ã«æå®ããèŠçŽ ãå«ãŸããŠãããã©ããã確èªããŸãã
#* <code>getindex(array, indices...)</code>: æå®ãããã€ã³ããã¯ã¹ã«å¯Ÿå¿ããé
åã®èŠçŽ ãååŸããŸãã
# é
åã®å€æ:
#* <code>map(function, array)</code>: é
åã®åèŠçŽ ã«é¢æ°ãé©çšããŸãã
#* <code>reduce(function, array)</code>: é
åã®èŠçŽ ãæžå°ãããŸãã
#* <code>reshape(array, dims)</code>: é
åã®åœ¢ç¶ãå€æŽããŸãã
ãããã¯äžéšã®äž»èŠãªé
åã¡ãœããã§ãããJuliaã«ã¯ããã«å€ãã®é
åæäœé¢æ°ãçšæãããŠããŸãããããã®ã¡ãœãããçµã¿åãããŠãããŸããŸãªé
åæäœãå®è¡ã§ããŸãã
:ãããã®ã¡ãœããã¯ãJuliaã®é
åã«å¯Ÿããäžè¬çãªæäœã®äŸã«ãããŸããã詳现ã«ã€ããŠã¯ãå
¬åŒããã¥ã¡ã³ã ãåç
§ããŠãã ããã
===== ã€ãã£ãªã =====
Juliaã§é
åãå¹æçã«æäœããããã®ããã€ãã®ã€ãã£ãªã ïŒæ
£çšå¥ïŒããããŸãããããã®ã€ãã£ãªã ã¯ãã³ãŒããç°¡æœã«ä¿ã¡ãªããå¹ççã«ããŒã¿ãåŠçããã®ã«åœ¹ç«ã¡ãŸãã以äžã«ããã€ãã®äžè¬çãªé
åã®ã€ãã£ãªã ã瀺ããŸãã
# é
åã®çæ:
#* ãŒãã§åæå: <code>zeros()</code>é¢æ°ã<code>fill()</code>é¢æ°ã䜿çšããŠãç¹å®ã®å€ïŒéåžžã¯ãŒãïŒã§åæåãããé
åãçæããŸãã
#:<syntaxhighlight lang=julia>
zeros(Int, 5) # æŽæ°åã®é
å [0, 0, 0, 0, 0]
fill(0, 5) # 0ã§åæåãããé
å [0, 0, 0, 0, 0]
</syntaxhighlight>
#* ç¯å²ã®çæ: <code>range()</code>é¢æ°ã䜿çšããŠãæå®ãããç¯å²å
ã®å€ãæã€é
åãçæããŸãã
#:<syntaxhighlight lang=julia>
range(1, stop=10, step=2) # [1, 3, 5, 7, 9]
</syntaxhighlight>
#:<syntaxhighlight lang=julia>
</syntaxhighlight>
# èŠçŽ ã®å€æ:
#* ãããé¢æ°: <code>map()</code>é¢æ°ã䜿çšããŠãé
åã®åèŠçŽ ã«é¢æ°ãé©çšããŸãã
#:<syntaxhighlight lang=julia>
array = [1, 2, 3, 4, 5]
doubled_array = map(x -> 2x, array) # [2, 4, 6, 8, 10]
</syntaxhighlight>
# ãã£ã«ã¿ãªã³ã°:
#* ãã£ã«ã¿é¢æ°: <code>filter()</code>é¢æ°ã䜿çšããŠãé
åã®èŠçŽ ãæ¡ä»¶ã«åºã¥ããŠãã£ã«ã¿ãªã³ã°ããŸãã
#:<syntaxhighlight lang=julia>
array = [1, 2, 3, 4, 5]
even_numbers = filter(iseven, array) # [2, 4]
</syntaxhighlight>
# èŠçŽ ã®éçŽ:
#* reduceé¢æ°: <code>reduce()</code>é¢æ°ã䜿çšããŠãé
åã®èŠçŽ ãåäžã®å€ã«éçŽããŸãã
#:<syntaxhighlight lang=julia>
array = [1, 2, 3, 4, 5]
sum_of_array = reduce(+, array) # 15
</syntaxhighlight>
ãããã®ã€ãã£ãªã ã䜿ãããšã§ãå¹ççã§èªã¿ãããJuliaã³ãŒããèšè¿°ã§ããŸããããããã®ç¶æ³ã«å¿ããŠãæé©ãªã€ãã£ãªã ãéžæãã掻çšããŠãã ããã
==== å€æ¬¡å
é
å ====
Juliaã®å€æ¬¡å
é
åã¯ã1次å
é
åã«äŒŒã圢åŒã§å®çŸ©ãããŸãããè€æ°ã®æ¬¡å
ãæã€é
åã§ãããèŠçŽ ãžã®ã¢ã¯ã»ã¹ã«ã¯ã€ã³ããã¯ã¹ã®ã¿ãã«ã䜿çšãããŸãã
ãã¡ããJuliaã§å€æ¬¡å
é
åã䜿çšãã代衚çãªã³ãŒãäŸã§ãã
:<syntaxhighlight lang=julia>
# å€æ¬¡å
é
åã®çæ
A = [i+j for i in 1:3, j in 1:3]
# å€æ¬¡å
é
åã®è¡šç€º
println(A) # [2 3 4; 3 4 5; 4 5 6]
# å€æ¬¡å
é
åã®èŠçŽ ã®åç
§
println(A[2,3]) # 5
# å€æ¬¡å
é
åã®åã®åç
§
println(A[2,:]) # [3, 4, 5]
# å€æ¬¡å
é
åã®åã®åç
§
println(A[:,1]) # [2, 3, 4]
# å€æ¬¡å
é
åã®åã®è€è£œ
println(A[:,:]) # [2 3 4; 3 4 5; 4 5 6]
# å€æ¬¡å
é
åã®éšåé
å
println(A[1:2,2:3]) # [3 4; 4 5]
# å€æ¬¡å
é
åã®å€æŽ
A[2,3] = 10
# å€æ¬¡å
é
åã«å¯ŸããæŒç®
B = A * A
# å€æ¬¡å
é
åã®å埩åŠç
for i in 1:size(B,1), j in 1:size(B,2)
println(B[i,j])
end
</syntaxhighlight>
: ãã®ã³ãŒãã§ã¯ã<code>[i+j for i in 1:3, j in 1:3]</code>ã«ãã3x3ã®å€æ¬¡å
é
å<code>A</code>ãçæããã<code>println(A)</code>ã«ãããã®äžèº«ã衚瀺ãããŸãã
: 次ã«ã<code>println(A[2,3])</code>ã«ãã<code>A</code>ã®2è¡3åã®èŠçŽ ãåºåãããŸãããããŠã<code>A[2,3] = 10</code>ã«ãããã®èŠçŽ ã®å€ãå€æŽãããŸãã
: ãŸãã<code>A * A</code>ã«ãã<code>A</code>èªèº«ãšåã倧ããã®è¡å<code>B</code>ãçæããããã®è¡åã«æŒç®ãè¡ãããŸãããããŠã<code>for</code>ã«ãŒãã䜿çšããŠã<code>B</code>ã®å
šèŠçŽ ãåºåããããšãã§ããŸãã
;å€æ¬¡å
é
åã®ã¡ãœãã
å€æ¬¡å
é
åïŒè¡åãªã©ïŒãæ±ãéã«ã䟿å©ãªã¡ãœãããããã€ããããŸãã以äžã«ãJuliaã®å€æ¬¡å
é
åã«é¢é£ããäž»èŠãªã¡ãœããã®ããã€ãã瀺ããŸãã
# 次å
ãšãµã€ãº:
#* <code>ndims(array)</code>: é
åã®æ¬¡å
æ°ãè¿ããŸãã
#* <code>size(array)</code>: é
åã®å次å
ã®ãµã€ãºãã¿ãã«ã§è¿ããŸãã
# èŠçŽ ã®ã¢ã¯ã»ã¹:
#* <code>getindex(array, indices...)</code>ãŸãã¯<code>array[indices...]</code>: æå®ãããã€ã³ããã¯ã¹ã«å¯Ÿå¿ããèŠçŽ ãååŸããŸãã
#* <code>setindex!(array, value, indices...)</code>ãŸãã¯<code>array[indices...] = value</code>: æå®ãããã€ã³ããã¯ã¹ã«å¯Ÿå¿ããèŠçŽ ã«å€ãèšå®ããŸãã
# 次å
ã®å€æ:
#* <code>reshape(array, dims)</code>: é
åã®åœ¢ç¶ãå€æŽããŸãã
#* <code>permutedims(array, perm)</code>: é
åã®æ¬¡å
ãå
¥ãæ¿ããŸãã
# èŠçŽ ã®çµ±èšæ
å ±:
#* <code>minimum(array)</code>, <code>maximum(array)</code>: é
åå
ã®æå°å€ãæ倧å€ãååŸããŸãã
#* <code>sum(array)</code>, <code>mean(array)</code>: é
åå
ã®åèšãå¹³åãèšç®ããŸãã
# èŠçŽ ã®æäœ:
#* <code>map(f, array)</code>: é
åã®åèŠçŽ ã«é¢æ°ãé©çšããŸãã
#* <code>filter(f, array)</code>: æ¡ä»¶ãæºããèŠçŽ ã®ã¿ãæœåºããŸãã
ãããã®ã¡ãœããã¯ãå€æ¬¡å
é
åãå¹æçã«æäœããããã®ããŒã«ãšããŠåœ¹ç«ã¡ãŸããJuliaã®å€æ¬¡å
é
åã¯ãæ°å€èšç®ãããŒã¿åŠçãªã©ã®å€ãã®ã¢ããªã±ãŒã·ã§ã³ã§åºã䜿çšãããŠããŸãã
===== å€æ¬¡å
é
åã®ã€ãã£ãªã =====
å€æ¬¡å
é
åãå¹æçã«æäœããããã®ããã€ãã®ã€ãã£ãªã ïŒæ
£çšå¥ïŒããããŸãããããã®ã€ãã£ãªã ã䜿çšããããšã§ãã³ãŒããããå¹ççã«èšè¿°ã§ããŸãã以äžã«ãå€æ¬¡å
é
åã®ã€ãã£ãªã ã®ããã€ãã瀺ããŸãã
# å€æ¬¡å
é
åã®åæå:
#* ã©ã³ãã ãªå€ã§åæå: <code>rand()</code>é¢æ°ã䜿çšããŠãæå®ãããç¯å²å
ã®ã©ã³ãã ãªå€ã§åæåãããå€æ¬¡å
é
åãçæããŸãã
#:<syntaxhighlight lang=julia>
rand(3, 3) # 3x3ã®ã©ã³ãã ãªå€ã§åæåãããé
å
</syntaxhighlight>
# é
åæäœ:
#* 転眮: <code>transpose()</code>é¢æ°ã䜿çšããŠãè¡åã®è»¢çœ®ãè¡ããŸãã
#:<syntaxhighlight lang=julia>
A = [1 2; 3 4]
transpose(A) # 転眮ãããè¡å
</syntaxhighlight>
# èŠçŽ ãžã®ã¢ã¯ã»ã¹:
#* è¡ãŸãã¯åã®éžæ: åãŸãã¯è¡ã®éžæã«ã¯ãé
åã®ã€ã³ããã¯ã¹ãŸãã¯ã¹ã©ã€ã¹ã䜿çšããŸãã
#:<syntaxhighlight lang=julia>
A = [1 2 3; 4 5 6; 7 8 9]
A[:, 2] # 2åç®ã®èŠçŽ
</syntaxhighlight>
# å€æ¬¡å
é
åã®å€æ:
#* 1次å
é
åãžã®å€æ: <code>vec()</code>é¢æ°ã䜿çšããŠãå€æ¬¡å
é
åã1次å
é
åã«å€æããŸãã
#:<syntaxhighlight lang=julia>
A = [1 2; 3 4]
vec(A) # å€æ¬¡å
é
åã1次å
é
åã«å€æ
</syntaxhighlight>
# å€æ¬¡å
é
åã®æäœ:
#* èŠçŽ ã®çµ±èšæ
å ±ã®èšç®: <code>minimum()</code>ã<code>maximum()</code>ã<code>mean()</code>ãªã©ã®é¢æ°ã䜿çšããŠãå€æ¬¡å
é
åã®çµ±èšæ
å ±ãèšç®ããŸãã
#:<syntaxhighlight lang=julia>
A = [1 2 3; 4 5 6; 7 8 9]
minimum(A) # æå°å€
</syntaxhighlight>
ãããã®ã€ãã£ãªã ã¯ãå€æ¬¡å
é
åãæäœããéã«åœ¹ç«ã¡ãŸããé©åãªã€ãã£ãªã ãéžæããã³ãŒããå¹æçã«èšè¿°ããŠãã ããã
==== ã¿ãã« ====
ã¿ãã«ïŒTupleïŒã¯ãåºå®é·ã®é åºä»ãã³ã¬ã¯ã·ã§ã³ã§ãããç°ãªãåã®èŠçŽ ãæ ŒçŽã§ããŸããã¿ãã«ã¯ãªã¹ããé
åãšåæ§ã«èŠçŽ ãå«ã¿ãŸãããäžåºŠäœæãããã¿ãã«ã®èŠçŽ ã¯å€æŽã§ããŸãããã€ãŸããã¿ãã«ã¯äžå€ïŒimmutableïŒã§ãã
ã¿ãã«ã¯äžžæ¬åŒ§ <code>()</code> ã§å²ãŸããã«ã³ã <code>,</code> ã§åºåãããèŠçŽ ã®ãªã¹ãã§è¡šçŸãããŸãã以äžã¯ãããã€ãã®ã¿ãã«ã®äŸã§ãã
:<syntaxhighlight lang=julia>
# æŽæ°åã®ã¿ãã«
tuple1 = (1, 2, 3, 4, 5)
# æåååãšæµ®åå°æ°ç¹åã®ã¿ãã«
tuple2 = ("apple", 3.14, "banana")
# 空ã®ã¿ãã«
empty_tuple = ()
</syntaxhighlight>
ã¿ãã«ã¯ãé¢æ°ã®è¿ãå€ãè€æ°ã®å€ããŸãšããŠæ±ãããå Žåãªã©ã«äŸ¿å©ã§ãããŸãããã¿ãŒã³ãããã³ã°ãé¢æ°ã®åŒæ°ã®åãæž¡ããããŒã¿ã®ã°ã«ãŒãåãªã©ãããŸããŸãªçšéã§äœ¿çšãããŸãã
ã¿ãã«ã®èŠçŽ ãžã®ã¢ã¯ã»ã¹ã¯ãã€ã³ããã¯ã¹ã䜿çšããŠè¡ããŸããã€ã³ããã¯ã¹ã¯1ããå§ãŸããŸããäŸãã°ã<code>tuple1</code>ã®3çªç®ã®èŠçŽ ã«ã¢ã¯ã»ã¹ããã«ã¯ã<code>tuple1[3]</code>ãšããŸãã
:<syntaxhighlight lang=julia>
println(tuple1[3]) # åºå: 3
</syntaxhighlight>
ã¿ãã«ã¯ã€ãã¥ãŒã¿ãã«ã§ãããããäžåºŠäœæããããšèŠçŽ ãå€æŽããããšã¯ã§ããŸãããããããã¿ãã«ã䜿çšããŠæ°ããã¿ãã«ãäœæããããšã¯ã§ããŸãã
;ã¿ãã«ã®ã¡ãœãã
ã¿ãã«ã¯äžå€ïŒimmutableïŒãªã®ã§ãã¿ãã«èªäœã«å€æŽãå ããã¡ãœããã¯ãããŸãããããããã¿ãã«ã«é¢ããããã€ãã®é¢æ°ãã¡ãœãããæäŸãããŠããŸãã以äžã«ããã€ãã®äŸã瀺ããŸãã
# èŠçŽ ãžã®ã¢ã¯ã»ã¹:
#* <code>getindex(tuple, index)</code>: æå®ãããã€ã³ããã¯ã¹ã®èŠçŽ ãååŸããŸãã
# èŠçŽ ã®æäœ:
#* <code>iterate(tuple)</code>: ã€ãã¬ãŒã·ã§ã³ãããã³ã«ã®äžéšãšããŠãã¿ãã«ã®ã€ãã¬ãŒã¿ãè¿ããŸãã
# é·ãã®ååŸ:
#* <code>length(tuple)</code>: ã¿ãã«ã®èŠçŽ æ°ãè¿ããŸãã
ãããã®ã¡ãœãããé¢æ°ã䜿çšããããšã§ãã¿ãã«ã®å
容ãååŸããããæäœãããããããšãã§ããŸãããã ããã¿ãã«èªäœã¯äžå€ãªã®ã§ãèŠçŽ ã®å€æŽãè¿œå ãåé€ã¯ã§ããŸããã
;ãŸãšã:<syntaxhighlight lang=julia>
# 1ã€ã®ã¿ãã«ãäœæããå Žå
t1 = (1, 2, 3)
# t1㯠(1, 2, 3)ãšããã¿ãã«ãè¡šããŸã
# èŠçŽ ã1ã€ã®ã¿ãã«ãäœæããå Žå
t2 = (4,) # t2㯠(4,)ãšããã¿ãã«ãè¡šããŸã
# ã¿ãã«ã®èŠçŽ ã«ã¯ç°ãªãåã®ãªããžã§ã¯ããå«ããããšãã§ããŸã
t3 = ("apple", 3, true)
# t3㯠("apple",3,true)ãšããã¿ãã«ãè¡šããŸã
# ã¿ãã«ã®äžã«å¥ã®ã¿ãã«ãå«ããããšãã§ããŸã
t4 = ((1, 2), "hello")
# t4㯠((1,2),"hello")ãšããã¿ãã«ãè¡šããŸã
# ã¿ãã«ã®èŠçŽ ã«å€æ°ãå«ããããšãã§ããŸã
a = 5
b = "World"
t5 = (a, b)
# t5㯠(5,"World")ãšããã¿ãã«ãè¡šããŸã
# 2ã€ã®ã¿ãã«ãé£çµããå Žåãã¿ãã«ã®é£çµæŒç®åã§ãã..ã䜿çšã§ããŸãã
t6 = t1..t2
# ããã«ãé
åãã¿ãã«ã«å€æããããšãã§ããŸãã
a = [1, 2, 3]
t7 = tuple(a)
# ã¿ãã«ã®èŠçŽ ã«ã€ã³ããã¯ã¹ãšå€ã®ãã¢ãå«ããå Žåãenumerateã䜿çšã§ããŸãã
t8 = tuple(enumerate(a))
# è€æ°ã®èŠçŽ ãåæã«ååŸããããã«ãã¿ãã«ãå解ããããšãã§ããŸãã
x, y, z = t1
# ã¿ãã«ã®èŠçŽ ãåé€ããããšã¯ã§ããŸããããç¯å²ãæå®ããŠæ°ããã¿ãã«ãäœæããããšãã§ããŸãã
t9 = t1[1:2]
# ã¿ãã«ã®èŠçŽ ã®åãç©ãæ倧å€ãæå°å€ãååŸããã«ã¯ãsumãprodãmaximumãminimumé¢æ°ã䜿çšã§ããŸãã
s = sum(t1)
p = prod(t1)
max_val = maximum(t1)
min_val = minimum(t1)
# ã¿ãã«ã«å¯ŸããŠiteré¢æ°ã䜿çšããããšã«ãããå埩åŠçãè¡ãããšãã§ããŸãã
for i in t1
println(i)
end
</syntaxhighlight>
: 以äžã®ããã«ãJuliaã§ã¯ã()ã§å€ãã«ã³ãã§åºåã£ãŠå²ãã ããã¿ãã«å
ã«åŒãå«ããããã³ã³ã¹ãã©ã¯ã¿ã䜿çšããããšã§ã¿ãã«ãäœæããããšãã§ããŸãããŸããæ·»ãåã䜿çšããŠåäžã®èŠçŽ ãååŸããã ãã§ãªããè€æ°ã®èŠçŽ ãåæã«ååŸããããã«ã¿ãã«ãå解ããããšãã§ããŸããããã«ãã¿ãã«ã®èŠçŽ ãåé€ã§ããªããããç¯å²ãæå®ããŠæ°ããã¿ãã«ãäœæããå¿
èŠããããŸããã¿ãã«ãçµåããã«ã¯ã..æŒç®åã䜿çšããé
åãã¿ãã«ã«å€æããããšãã§ããŸããã¿ãã«ã¯ãsumãprodãmaximumãminimumé¢æ°ã䜿çšããŠèŠçŽ ã®åãç©ãæ倧å€ãæå°å€ãèŠã€ããããšãã§ããå埩åŠçãè¡ãããšãã§ããŸãã
===== ã€ãã£ãªã ======
ã¿ãã«ãå¹æçã«äœ¿çšããããã®ããã€ãã®ã€ãã£ãªã ïŒæ
£çšå¥ïŒããããŸããã¿ãã«ã¯äžå€ïŒimmutableïŒãªã®ã§ãèŠçŽ ãå€æŽããããšã¯ã§ããŸãããããã®æ§è³ªã掻ãããŠããŸããŸãªçšéã«å©çšã§ããŸãã
以äžã«ãã¿ãã«ã®ã€ãã£ãªã ã®äžéšã瀺ããŸãã
#è€æ°ã®å€ã®åæå²ãåœãŠ
#* ã¿ãã«ã䜿çšããŠé¢æ°ããè€æ°ã®å€ãè¿ãããšãã§ããŸããé¢æ°ã®è¿ãå€ãšããŠã¿ãã«ã䜿çšãããšãè€æ°ã®å€æ°ã«å€ãåæã«å²ãåœãŠãããšãã§ããŸãã
#:<syntaxhighlight lang=julia>
function get_coordinates()
return (3, 4)
end
x, y = get_coordinates()
</syntaxhighlight>
#ã¿ãã«ã®å解
#* ã¿ãã«ã®èŠçŽ ã«åã
ã®å€æ°ãå²ãåœãŠãããšãã§ããŸããããã«ãããã¿ãã«ã®èŠçŽ ãåå¥ã«æäœã§ããŸãã
#:<syntaxhighlight lang=julia>
coordinates = (3, 4)
x, y = coordinates
</syntaxhighlight>
#ã€ãã¬ãŒã¿ãšããŠã®å©çš
#* ã¿ãã«ã¯ã€ãã¬ãŒã¿ãšããŠäœ¿çšã§ããŸããããã¯ãforã«ãŒããªã©ã®å埩åŠçã«åœ¹ç«ã¡ãŸãã
#:<syntaxhighlight lang=julia>
coordinates = (3, 4)
for coord in coordinates
println(coord)
end
</syntaxhighlight>
#* ã¿ãã«ã®èŠçŽ ããã¿ãŒã³ãããã³ã°ããããšã§ãç¹å®ã®æ§é ãæã€ããŒã¿ãæœåºãããæäœãããããããšãã§ããŸãã
#:<syntaxhighlight lang=julia>
coordinates = (3, 4)
x, y = coordinates
</syntaxhighlight>
ãããã®ã€ãã£ãªã ã䜿çšããããšã§ãã¿ãã«ãå¹æçã«æŽ»çšããæè»ãªã³ãŒããèšè¿°ããããšãã§ããŸãã
==== èŸæž ====
èŸæžïŒDict; DictionaryïŒã¯ãããŒãšå€ã®ãã¢ãé¢é£ä»ããããŒã¿æ§é ã§ããä»ã®èšèªã§ã¯é£æ³é
åãããã·ã¥ããããšãåŒã°ããŸããJuliaã®èŸæžã¯éåžžã«æè»ã§ãç°ãªãåã®ããŒãšå€ãæã€ããšãã§ããŸãã
èŸæžã¯æ³¢æ¬åŒ§ <code>{}</code> ã§å²ãŸããããŒãšå€ã®ãã¢ã¯ã³ãã³ <code>:</code> ã§åºåãããŸãã以äžã¯ãããã€ãã®èŸæžã®äŸã§ãã
:<syntaxhighlight lang=julia>
# æåååã®ããŒãšæŽæ°åã®å€ãæã€èŸæž
dict1 = Dict("apple" => 3, "banana" => 5, "orange" => 2)
# æŽæ°åã®ããŒãšæåååã®å€ãæã€èŸæž
dict2 = Dict(1 => "one", 2 => "two", 3 => "three")
# 空ã®èŸæž
empty_dict = Dict()
</syntaxhighlight>
èŸæžã¯ãããŒã䜿çšããŠå€ã«ã¢ã¯ã»ã¹ããããšãã§ããŸããããŒã¯ãŠããŒã¯ã§ãããåãããŒã«å¯ŸããŠç°ãªãå€ãé¢é£ä»ããããšã¯ã§ããŸãããããŒãååšããªãå Žåããšã©ãŒãçºçããŸãã
:<syntaxhighlight lang=julia>
println(dict1["apple"]) # åºå: 3
println(dict2[2]) # åºå: "two"
</syntaxhighlight>
èŸæžã®æäœã«ã¯ãããŒãšå€ã®è¿œå ãåé€ãå€æŽãæ€çŽ¢ãªã©ãå«ãŸããŸããèŸæžã¯ãããŒã¿ãå¹ççã«æ€çŽ¢ããã³æŽæ°ããããã«åºã䜿çšãããŸããJuliaã®èŸæžã¯ãããã·ã¥ããŒãã«ãšããŠå®è£
ãããŠãããé«éãªããŒã®æ€çŽ¢ãæäŸããŸãã
;èŸæžã®ã¡ãœãã
Juliaã®èŸæžïŒDictïŒã«ã¯ãããŸããŸãªäŸ¿å©ãªã¡ãœãããçšæãããŠããŸãã以äžã«ããã䜿ãããèŸæžã®ã¡ãœããã®äžéšã瀺ããŸãã
# èŠçŽ ã®æäœ:
#* <code>get(dict, key, default)</code>: æå®ãããããŒã«å¯Ÿå¿ããå€ãååŸããŸããããŒãååšããªãå Žåã¯ãããã©ã«ãå€ãè¿ããŸãã
#* <code>setdefault!(dict, key, default)</code>: æå®ãããããŒãååšããªãå Žåã«ãããŒãšããã©ã«ãå€ãèŸæžã«è¿œå ããŸãã
# èŠçŽ ã®è¿œå ãšåé€:
#* <code>push!(dict, key => value)</code>: æ°ããããŒãšå€ã®ãã¢ãèŸæžã«è¿œå ããŸãã
#* <code>delete!(dict, key)</code>: æå®ãããããŒã«å¯Ÿå¿ããèŠçŽ ãèŸæžããåé€ããŸãã
# èŠçŽ ã®æ€æ»:
#* <code>haskey(dict, key)</code>: æå®ãããããŒãèŸæžã«ååšãããã©ããã確èªããŸãã
#* <code>isempty(dict)</code>: èŸæžã空ã§ãããã©ããã確èªããŸãã
# ããŒãšå€ã®ååŸ:
#* <code>keys(dict)</code>: èŸæžå
ã®ãã¹ãŠã®ããŒãè¿ããŸãã
#* <code>values(dict)</code>: èŸæžå
ã®ãã¹ãŠã®å€ãè¿ããŸãã
#* <code>pairs(dict)</code>: èŸæžå
ã®ãã¹ãŠã®ããŒãšå€ã®ãã¢ãè¿ããŸãã
ãããã®ã¡ãœããã䜿çšããããšã§ãèŸæžãå¹æçã«æäœããããŒã¿ãååŸããã³æŽæ°ããããšãã§ããŸããJuliaã®èŸæžã¯éåžžã«æè»ã§ãããããŸããŸãªããŒã¿æäœã«åœ¹ç«ã¡ãŸãã
===== ã€ãã£ãªã =====
èŸæžãå¹æçã«äœ¿çšããããã®ããã€ãã®ã€ãã£ãªã ïŒæ
£çšè¡šçŸïŒããããŸãã
ãããã®ã€ãã£ãªã ã¯ãã³ãŒããããèªã¿ããããå¹ççã«ããããã«åœ¹ç«ã¡ãŸãã
以äžã«ããã䜿ãããèŸæžã®ã€ãã£ãªã ã®ããã€ãã瀺ããŸãã
# ããã©ã«ãå€ã®èšå®: èŸæžããå€ãååŸããéã«ãããŒãååšããªãå Žåã®ããã©ã«ãå€ãèšå®ããæ¹æ³ã§ãã
#:<syntaxhighlight lang=julia>
dict = Dict("apple" => 3, "banana" => 5)
value = get(dict, "orange", 0) # ããŒãååšããªãå Žåã¯ããã©ã«ãå€0ã䜿çš
</syntaxhighlight>
#ããŒã®ååšç¢ºèª: èŸæžå
ã«ç¹å®ã®ããŒãååšãããã©ããã確èªããæ¹æ³ã§ãã
#:<syntaxhighlight lang=julia>
dict = Dict("apple" => 3, "banana" => 5)
if haskey(dict, "apple")
println("èŸæžã«'apple'ã®ããŒãååšããŸã")
end
</syntaxhighlight>
#èŠçŽ ã®è¿œå ãšæŽæ°: èŸæžã«æ°ããããŒãšå€ã®ãã¢ãè¿œå ããããæ¢åã®ããŒã®å€ãæŽæ°ããæ¹æ³ã§ãã
#:<syntaxhighlight lang=julia>
dict = Dict("apple" => 3, "banana" => 5)
dict["orange"] = 2 # æ°ããããŒãšå€ã®ãã¢ãè¿œå
dict["banana"] = 6 # æ¢åã®ããŒã®å€ãæŽæ°
</syntaxhighlight>
#ã«ãŒãåŠç: èŸæžå
ã®ãã¹ãŠã®ããŒãšå€ã®ãã¢ã«å¯ŸããŠã«ãŒãåŠçãè¡ãæ¹æ³ã§ãã
#:<syntaxhighlight lang=julia>
dict = Dict("apple" => 3, "banana" => 5)
for (key, value) in pairs(dict)
println("ããŒ: $key, å€: $value")
end
</syntaxhighlight>
ãããã®ã€ãã£ãªã ã䜿çšããããšã§ãèŸæžãå¹æçã«æäœããã³ãŒããããèªã¿ããããå¹ççã«ããããšãã§ããŸããJuliaã®èŸæžã¯ãããŒã¿ã®ãããã³ã°ãé¢é£ä»ãã«åºã䜿çšãããå€ãã®ã¢ããªã±ãŒã·ã§ã³ã§éèŠãªåœ¹å²ãæãããŠããŸãã
==== éå ====
éåã¯ãéè€ããªãèŠçŽ ãè€æ°åä¿æããããšãã§ããã³ã¬ã¯ã·ã§ã³ã§ãã
以äžã¯Juliaã§éåãæ±ãå
žåçãªã³ãŒãäŸã§ãïŒ
:<syntaxhighlight lang=julia>
# éåã®å®£èš
set1 = Set([1, 2, 3, 4])
set2 = Set([3, 4, 5, 6])
# éåã®åéå
set_union = union(set1, set2)
@show set_union # Set([4, 2, 3, 5, 6, 1])
# éåã®ç©éå
set_intersection = intersection(set1, set2)
@show set_intersection # Set([4, 3])
# éåã®å·®éå
set_difference = setdiff(set1, set2)
@show set_difference # Set([2, 1])
# éåã®å䜵差 set_symmetric_difference = SymmetricDiff(set1, set2)
@show set_symmetric_difference # SymmetricDiff(Set([4, 2, 3, 1]), Set([5, 6, 3, 4]))
# éåã«èŠçŽ ãå«ãŸãããã©ããã®ç¢ºèª
@show 2 in set1 # true
@show 5 in set1 # false
# éåã®èŠçŽ æ°
@show length(set1) # 4
</syntaxhighlight>
äžèšã®ã³ãŒãã¯ã次ã®ããšãè¡ããŸãïŒ
* <code>Set</code>åã®å€æ°ã宣èšããèŠçŽ ãã»ããã¢ããããŸãã
* éåã®åéåãç©éåãå·®éåãå䜵差ãèšç®ããŸãã
* æå®ãããèŠçŽ ãéåã«å«ãŸããŠãããã©ããã確èªããŸãã
* éåã®èŠçŽ æ°ã調ã¹ãŸãã
以äžã¯Juliaã®<code>Set</code>åã«å«ãŸããå
žåçãªã¡ãœãããšãã®åŒæ°ãæ»ãå€ãããã³ç°¡åãªèª¬æã衚圢åŒã§ãŸãšãããã®ã§ãã
{| class="wikitable"
|+ éååã®ã¡ãœãã
!ã¡ãœããå
!åŒæ°
!æ»ãå€
!説æ
|-
|<code>union</code>
|<code>set1::Set</code>, <code>set2::Set</code>, ...
|<code>Set</code>
|æž¡ãããå
šãŠã®éåã®åéåãè¿ã
|-
|<code>intersect</code>
|<code>set1::Set</code>, <code>set2::Set</code>, ...
|<code>Set</code>
|æž¡ãããå
šãŠã®éåã®ç©éåãè¿ã
|-
|<code>setdiff</code>
|<code>set1::Set</code>, <code>set2::Set</code>
|<code>Set</code>
|<code>set1</code>ãã<code>set2</code>ã«å«ãŸããèŠçŽ ãåãé€ããéåãè¿ã
|-
|<code>symdiff</code>
|<code>set1::Set</code>, <code>set2::Set</code>
|<code>Set</code>
|<code>set1</code>ãš<code>set2</code>ã®å¯Ÿç§°å·®ãããªãã¡<code>set1</code>ãš<code>set2</code>ã®ã©ã¡ããã«ã ãååšããèŠçŽ ããæãéåãè¿ã
|-
|<code>issubset</code>
|<code>set1::Set</code>, <code>set2::Set</code>
|<code>Bool</code>
|<code>set1</code>ã<code>set2</code>ã®éšåéåãã©ãããè¿ã
|-
|<code>isdisjoint</code>
|<code>set1::Set</code>, <code>set2::Set</code>
|<code>Bool</code>
|<code>set1</code>ãš<code>set2</code>ãå
±éã®èŠçŽ ãæããªããã©ãããè¿ã
|-
|<code>push!</code>
|<code>set::Set</code>, <code>value</code>
|<code>Set</code>
|<code>set</code>ã«<code>value</code>ãè¿œå ããŠãæŽæ°ããã<code>set</code>ãè¿ã
|-
|<code>pop!</code>
|<code>set::Set</code>
|<code>Any</code>
|<code>set</code>ã®äžããäžã€ã®èŠçŽ ãåãåºããŠããããè¿ãã<code>set</code>èªèº«ããåãé€ãããšã«æ³šæã
|-
|<code>findfirst</code>
|<code>set::Set</code>, <code>value</code>
|<code>Union{Int, Nothing}</code>
|<code>set</code>å
ã®å
é ã®<code>value</code>ã®ã€ã³ããã¯ã¹ãè¿ãã<code>value</code>ãååšããªãå Žåã¯<code>nothing</code>ãè¿ãã
|-
|<code>size</code>
|<code>set::Set</code>
|<code>(Int, )</code>
|<code>set</code>ã®èŠçŽ æ°ãã¿ãã«åœ¢åŒã§è¿ã
|-
|<code>isempty</code>
|<code>set::Set</code>
|<code>Bool</code>
|<code>set</code>ã空ãã©ãããè¿ã
|-
|<code>iterate</code>
|<code>set::Set</code>
|<code>Tuple{Any, Any}</code> or <code>nothing</code>
|ç¹°ãè¿ãåŠçã«äœ¿çšã§ããã€ãã¬ãŒã¿ãè¿ãã
|-
|<code>collect</code>
|<code>set::Set</code>
|<code>Array</code>
|<code>set</code>ã®èŠçŽ ã䞊ã¹ãé
åãè¿ãã
|}
泚æïŒäžèšã®è¡šã¯ã<code>Set</code>åãæã€ã¡ãœããã®äžéšã®ã¿ã玹ä»ãããã®ã§ãããŸããå®éã®ã³ãŒãã§ãããã®ã¡ãœãããåŒã³åºãéã«ã¯ãåŒæ°ã®åãæ°ãæ»ãå€ã®åãå
·äœçãªç¶æ³ã«å¿ããŠå€ããå¿
èŠããããŸãã
====æ§é äœïŒStructïŒ====
Juliaã«ããã<code>struct</code>ã¯ãæ°ããããŒã¿åãå®çŸ©ããããã®ããŒã¯ãŒãã§ãã<code>struct</code>ã䜿çšããŠå®çŸ©ãããããŒã¿åã¯ãè€æ°ã®ãã£ãŒã«ãïŒå±æ§ïŒãæã€ããšãã§ããŸãããããã®ãã£ãŒã«ãã¯ãããŒã¿åã®æ§é ãè¡šçŸããããã«äœ¿çšãããŸãã
<code>struct</code>ã®æ§æã¯æ¬¡ã®ããã«ãªããŸã:
:<syntaxhighlight lang=julia>
struct æ§é äœå
ãã£ãŒã«ãå1::å1
ãã£ãŒã«ãå2::å2
# å¿
èŠãªæ°ã ããã£ãŒã«ããè¿œå
end
</syntaxhighlight>
äŸãã°ã2次å
ã®åº§æšãè¡šãããŒã¿åãå®çŸ©ããå Žåã次ã®ããã«<code>struct</code>ã䜿çšããŸã:
:<syntaxhighlight lang=julia>
struct Point
x::Float64
y::Float64
end
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>Point</code>ãšããååã®æ°ããããŒã¿åãå®çŸ©ãããŠããŸãããã®ããŒã¿åã¯ã2ã€ã®æµ®åå°æ°ç¹æ°ãã£ãŒã«ã<code>x</code>ãš<code>y</code>ãæã¡ãŸãã
<code>struct</code>ã§å®çŸ©ãããããŒã¿åã¯ãããããã®ã€ã³ã¹ã¿ã³ã¹ãåºæã®å±æ§ãæã¡ãŸããäŸãã°ã次ã®ããã«ããŠæ°ãã<code>Point</code>ã€ã³ã¹ã¿ã³ã¹ãäœæã§ããŸã:
:<syntaxhighlight lang=julia>
p = Point(3.0, 4.0)
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ã<code>Point</code>åã®æ°ããã€ã³ã¹ã¿ã³ã¹<code>p</code>ãäœæãããã®<code>x</code>å±æ§ã«ã¯<code>3.0</code>ã<code>y</code>å±æ§ã«ã¯<code>4.0</code>ãæ ŒçŽãããŸãã
<code>struct</code>ã䜿çšããããšã§ãé¢é£ããããŒã¿ãã²ãšãŸãšãã«ããç¬èªã®ããŒã¿åãå®çŸ©ããããšãã§ããŸããããã«ãããã³ãŒãã®æ§é ãããæ確ã«ãªããåå©çšæ§ãåäžããŸãã
===== structãšã¡ãœãã =====
Juliaã«ãããŠã<code>struct</code>ãšã¡ãœããã¯å¯æ¥ã«é¢é£ããŠããŸãã<code>struct</code>ã§å®çŸ©ãããããŒã¿åã«ã¯ããã®ããŒã¿åã«é¢ããæäœãå®è¡ããããã®ã¡ãœãããå®çŸ©ããããšãã§ããŸãã
ããšãã°ãå
ã»ã©ã®<code>Point</code>æ§é äœãäŸã«æãããšããã®æ§é äœã«ã¯åº§æšéã®è·é¢ãèšç®ããã¡ãœãããå®çŸ©ã§ããŸãã次ã®ããã«ããŠã¡ãœãããå®çŸ©ããŸã:
:<syntaxhighlight lang=julia>
struct Point
x::Float64
y::Float64
end
# Pointåã®ã€ã³ã¹ã¿ã³ã¹å士ã®è·é¢ãèšç®ããã¡ãœãã
function distance(p1::Point, p2::Point)
dx = p1.x - p2.x
dy = p1.y - p2.y
return sqrt(dx^2 + dy^2)
end
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>distance</code>ãšããååã®é¢æ°ãå®çŸ©ããŠããŸãããã®é¢æ°ã¯ã2ã€ã®<code>Point</code>åã®ã€ã³ã¹ã¿ã³ã¹ãåãåãããããã®éã®è·é¢ãèšç®ããŸãããã®ããã«ãé¢æ°ã®åŒæ°ã«åãæå®ããããšã§ããã®é¢æ°ã¯æå®ãããåã®ã€ã³ã¹ã¿ã³ã¹ã«å¯ŸããŠã®ã¿åäœããŸãã
ãã®ã¡ãœããã䜿çšãããšãäŸãã°æ¬¡ã®ããã«ããŠ2ã€ã®åº§æšéã®è·é¢ãèšç®ã§ããŸã:
:<syntaxhighlight lang=julia>
p1 = Point(1.0, 2.0)
p2 = Point(4.0, 6.0)
println(distance(p1, p2)) # åºå: 5.0
</syntaxhighlight>
ãã®äŸã§ã¯ã2ã€ã®<code>Point</code>åã®ã€ã³ã¹ã¿ã³ã¹<code>p1</code>ãš<code>p2</code>ãäœæãããããã®éã®è·é¢ã<code>distance</code>ã¡ãœããã§èšç®ããŠããŸãã
<code>struct</code>ãšã¡ãœãããçµã¿åãããããšã§ãç¹å®ã®ããŒã¿åã«å¯Ÿããæäœã容æã«å®çŸ©ããã³ãŒãã®åå©çšæ§ãåäžãããããšãã§ããŸãã
===é¢æ°ãšã¡ãœãã===
ãã®ç¯ã§ã¯ãJuliaã«ãããé¢æ°ãšã¡ãœããã®åºæ¬çãªæŠå¿µã«ã€ããŠèª¬æããŸããJuliaã§ã¯ãé¢æ°ã¯ç¹å®ã®åŠçãå®è¡ããããã®äžé£ã®åœä»€ããŸãšãããã®ã§ãããã¡ãœããã¯é¢æ°ã®äžçš®ã§ããªããžã§ã¯ãã®åã«ãã£ãŠæ¯ãèããç°ãªãé¢æ°ã®ããšã§ããJuliaã®é¢æ°ã¯å€éãã£ã¹ãããããµããŒãããŠãããåãé¢æ°åã§ãåŒæ°ã®åãæ°ã«ãã£ãŠç°ãªãã¡ãœãããåŒã³åºãããŸããããã«ãããæè»æ§ã®é«ãããã°ã©ãã³ã°ãå¯èœã«ãªããŸããé¢æ°ãã¡ãœããã®å®çŸ©ã¯ç°¡æœã§çŽæçã§ãããé¢æ°åããã°ã©ãã³ã°ããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®äž¡æ¹ã®æŠå¿µãçµã¿åãããŠããŸãããŸããJuliaã§ã¯é«éé¢æ°ãã¯ããŒãžã£ãªã©ã®æ©èœãè±å¯ã«åãã£ãŠãããããããçµã¿åãããããšã§ãããè€éãªåŠçãã·ã³ãã«ãªåœ¢ã§èšè¿°ããããšãå¯èœã§ãããã®ç¯ã§ã¯ãJuliaã«ãããé¢æ°ãšã¡ãœããã®äœ¿ãæ¹ãå®çŸ©æ¹æ³ããããŠå€éãã£ã¹ããããã©ã®ããã«åäœããããªã©ã«ã€ããŠè©³ãã解説ããŸãã
{{ã³ã©ã |ãªããžã§ã¯ãæåèšèªã®ã¡ãœãããšJuliaã®ã¡ãœãã|2=ãªããžã§ã¯ãæåèšèªã®ã¡ãœãããšJuliaã®ã¡ãœããã«ã¯ããã€ãã®éèŠãªéãããããŸãã
;éçåä»ã vs åçåä»ã: äžè¬çãªãªããžã§ã¯ãæåèšèªïŒäŸãã°ãJavaãC++ïŒã§ã¯ãã¡ãœããã¯ç¹å®ã®ã¯ã©ã¹ã«å±ãããã®ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ã«å¯ŸããŠã®ã¿åŒã³åºãããšãã§ããŸããããã«å¯ŸããŠãJuliaã®ã¡ãœããã¯éçãªã¯ã©ã¹ãåã«çµã³ä»ããŠããããåŒæ°ã®åã«åºã¥ããŠåçã«åŒã³åºãããŸãã
;å€éãã£ã¹ããã: Juliaã®ã¡ãœããã¯å€éãã£ã¹ãããããµããŒãããŠãããåãååã®é¢æ°ãç°ãªãåŒæ°ã®åã«å¯ŸããŠè€æ°ã®å®è£
ãæã€ããšãã§ããŸããããã«ãããç°ãªãåã«å¯ŸããŠé©åãªæ¯ãèããããã¡ãœãããåŒã³åºãããŸããäžæ¹ãå€ãã®ãªããžã§ã¯ãæåèšèªã§ã¯ãã¡ãœããã®ãªãŒããŒããŒãã¯åŒæ°ã®æ°ãåã«ãã£ãŠã®ã¿è¡ãããåçãã£ã¹ããããå¶éãããŠããŸãã
;é¢æ°ãšã®çµ±äžæ§: Juliaã§ã¯ãé¢æ°ãã¡ãœãããåãããã«å®çŸ©ãããŸããã€ãŸããé¢æ°ãšã¡ãœããã®éãã¯ã»ãšãã©ãããŸãããããã«ãããJuliaã§ã¯é¢æ°åããã°ã©ãã³ã°ãšãªããžã§ã¯ãæåããã°ã©ãã³ã°ã®äž¡æ¹ã®æŠå¿µãèªç¶ã«çµã¿åãããããšãã§ããŸãã
;æ¡åŒµæ§ãšæè»æ§: Juliaã®ã¡ãœããã¯ãªãŒãã³ã§ãããæ¢åã®åãã©ã€ãã©ãªã«æ°ããã¡ãœãããè¿œå ããããšãã§ããŸããããã«ãããå€éšã©ã€ãã©ãªãããã°ã©ã ãå€æŽããã«æ°ããæ©èœãè¿œå ããããšã容æã«ãªããŸããäžæ¹ãå€ãã®ãªããžã§ã¯ãæåèšèªã§ã¯ãæ¢åã®ã¯ã©ã¹ã®æ¡åŒµãã¡ãœããã®è¿œå ãå¶éãããå ŽåããããŸãã
Juliaã®ã¡ãœããã¯ããããã®ç¹æ§ã«ãããéçãªãªããžã§ã¯ãæåèšèªãšã¯ç°ãªãæè»æ§ãšæ¡åŒµæ§ãæäŸããŠããŸãã
}}
==== é¢æ°ãšã¯ïŒ ====
é¢æ°ã¯ãå
¥åå€ãåãåããããããåŠçããçµæãåºåããæç¶ããæäœãæããŸããããã°ã©ãã³ã°ã«ãããŠãé¢æ°ã¯åå©çšå¯èœã§ç¬ç«ããã³ãŒããããã¯ãè¡šããç¹å®ã®ã¿ã¹ã¯ãèšç®ãå®è¡ããããã«äœ¿çšãããŸããé¢æ°ã¯ãããã°ã©ã ã®æ§é åãå¹ççãªã³ãŒãã®èšè¿°ãåŠçã®åå²ãšæœè±¡åãå¯èœã«ããŸãã
é¢æ°ã¯ã次ã®ãããªç¹æ§ãæã€ããšããããŸãïŒ
;å
¥å (åŒæ°): é¢æ°ã¯ã1ã€ä»¥äžã®å
¥åãåãåãããšãã§ããŸãããããã®å
¥åã¯ãé¢æ°ãå®è¡ãããéã«åŠçãããããŒã¿ãæ
å ±ã§ãã
;åŠç: é¢æ°ã¯ãåãåã£ãå
¥åãåŠçããç¹å®ã®ã¢ã«ãŽãªãºã ãæé ã«åŸã£ãŠèšç®ãæäœãè¡ããŸãã
;åºå (æ»ãå€): é¢æ°ã¯ãåŠçã®çµæãšããŠ1ã€ä»¥äžã®å€ãè¿ãããšããããŸãããããã®å€ã¯ãé¢æ°ãåŒã³åºãããã³ãŒãã«è¿ããããã®åŸã®åŠçã«äœ¿çšãããããšããããŸãã
;åå©çšæ§: é¢æ°ã¯ãè€æ°ã®ç®æã§åå©çšããããšãã§ããŸããåãåŠçãè€æ°ã®å Žæã§å®è¡ããå¿
èŠãããå Žåããç¹å®ã®æ©èœãå
±éåããå Žåã«äŸ¿å©ã§ãã
;åå²ãšæœè±¡å: é¢æ°ã¯ãããã°ã©ã ãå°ããªéšåã«åå²ããåéšåãç¬ç«ããŠæ±ãããšãã§ããŸããããã«ãããããã°ã©ã å
šäœã®è€éããæžãããç解ãã¡ã³ããã³ã¹ã容æã«ããŸãã
é¢æ°ã¯ãããã°ã©ã èšèªããã¬ãŒã ã¯ãŒã¯ã«ãã£ãŠç°ãªãæ§æãæ©èœãæã€ããšããããŸãããåºæ¬çãªæŠå¿µãšç®çã¯ã»ãŒåãã§ãã
==== é¢æ°ã®å®çŸ©ãšåŒã³åºã ====
é¢æ°ã®å®çŸ©ãšåŒã³åºãã¯ãJuliaã«ãããŠéåžžã«ã·ã³ãã«ã§çŽæçã§ãã以äžã«ãåºæ¬çãªæ¹æ³ã瀺ããŸãã
===== é¢æ°ã®å®çŸ© =====
Juliaã§ã¯ãé¢æ°ã¯ <code>function</code> ããŒã¯ãŒãã䜿ã£ãŠå®çŸ©ãããŸããé¢æ°ã1ã€ã®åŒã§è¡šãããå Žåãçã圢åŒã®å®çŸ©ãå¯èœã§ãã
# éåžžã®å®çŸ©:
:<syntaxhighlight lang=julia>
function greet(name)
println("Hello, $name!")
end
</syntaxhighlight>
# çã圢åŒã®å®çŸ©:
:<syntaxhighlight lang=julia>
greet(name) = println("Hello, $name!")
</syntaxhighlight>
====== é¢æ°å®çŸ©ã®æ§æ ======
Juliaã«ãããåºæ¬çãªé¢æ°å®çŸ©ã®æ§æã¯ä»¥äžã®éãã§ãã
:<syntaxhighlight lang=julia>
function é¢æ°å(ãã©ã¡ãŒã¿1, ãã©ã¡ãŒã¿2, ...)
é¢æ°æ¬äœ
end
</syntaxhighlight>
ãŸãã¯ãç瞮圢ãšããŠä»¥äžã®ããã«æžãããšãã§ããŸãã
:<syntaxhighlight lang=julia>
é¢æ°å(ãã©ã¡ãŒã¿1, ãã©ã¡ãŒã¿2, ...) = é¢æ°æ¬äœ
</syntaxhighlight>
ãããã®æ§æã«ã€ããŠè©³çŽ°ã«èª¬æããŸãã
* <code>function</code>: é¢æ°å®çŸ©ãéå§ããããŒã¯ãŒãã§ãã
* <code>é¢æ°å</code>: å®çŸ©ããé¢æ°ã®ååã§ããé¢æ°åã¯ã¢ã«ãã¡ãããã§å§ãŸããæ°åãã¢ã³ããŒã¹ã³ã¢ <code>_</code> ãå«ãããšãã§ããŸãã
* <code>(ãã©ã¡ãŒã¿1, ãã©ã¡ãŒã¿2, ...)</code>: é¢æ°ãåãåãåŒæ°ã®ãªã¹ãã§ããåãã©ã¡ãŒã¿ã¯é¢æ°å
ã§äœ¿çšãããŸãããã©ã¡ãŒã¿ã®åãæå®ããããšãã§ããŸãããJuliaã¯åçåä»ãèšèªãªã®ã§ãéåžžã¯åã®æå®ã¯äžèŠã§ãã
* <code>é¢æ°æ¬äœ</code>: é¢æ°ãå®è¡ããåŠçãèšè¿°ããã³ãŒããããã¯ã§ãããã®éšåã«ã¯ãé¢æ°ãè¡ãèšç®ãæäœã®è©³çŽ°ãå«ãŸããŸãã
* <code>end</code>: é¢æ°å®çŸ©ã®çµäºã瀺ãããŒã¯ãŒãã§ããé¢æ°æ¬äœã®çµããã瀺ããŸãã
* <code>æ»ãå€</code>: é¢æ°ãè¿ãå€ã§ãã<code>return</code> ããŒã¯ãŒãã®åŸã«æå®ããŸãã
<code>function</code> ããŒã¯ãŒããš <code>end</code> ããŒã¯ãŒãã䜿çšããŠé¢æ°ãå®çŸ©ããå Žåã<code>end</code> ã®çŽåã« <code>return</code> ã䜿çšããŠæ»ãå€ãæå®ããŸããç瞮圢ã®æ§æã§ã¯ã<code>return</code> ããŒã¯ãŒãã¯çç¥ãããé¢æ°æ¬äœã®æåŸã®åŒã®å€ãèªåçã«æ»ãå€ãšãªããŸãã
===== é¢æ°ã®æ»ãå€ =====
é¢æ°ã®æ»ãå€ã¯ãé¢æ°ãåŠçãå®è¡ããåŸã«åŒã³åºãå
ã«è¿ãããå€ã§ããJuliaã§ã¯ãé¢æ°ãå€ãè¿ãéã« <code>return</code> ããŒã¯ãŒãã䜿çšããŸããã<code>return</code> ãæ瀺çã«æžããªããŠããé¢æ°ã®æåŸã«è©äŸ¡ãããåŒãèªåçã«æ»ãå€ãšãªããŸãã
以äžã«ãé¢æ°ã®æ»ãå€ã®å®çŸ©æ¹æ³ãšåŒã³åºãæ¹ã®äŸã瀺ããŸãã
====== æ»ãå€ã®å®çŸ©æ¹æ³ ======
:<syntaxhighlight lang=julia>
function add(x, y)
return x + y # xãšyã®åèšãè¿ã
end
</syntaxhighlight>
ãããã¯
:<syntaxhighlight lang=julia>
add(x, y) = x + y # xãšyã®åèšãè¿ã
</syntaxhighlight>
äžèšã®äŸã§ã¯ã<code>add</code> é¢æ°ã <code>x</code> ãš <code>y</code> ã®åèšãè¿ããŸãã
====== æ»ãå€ã®åŒã³åºãæ¹ ======
:<syntaxhighlight lang=julia>
result = add(3, 5)
println(result) # åºå: 8
</syntaxhighlight>
<code>add(3, 5)</code> ãåŒã³åºããšãé¢æ°å
㧠<code>x</code> ãš <code>y</code> ãåèšããçµæãæ»ãå€ãšãªãã<code>result</code> å€æ°ã«ä»£å
¥ãããŸãããã®åŸã<code>println(result)</code> ã䜿ã£ãŠçµæãåºåãããŸãã
Juliaã§ã¯ãé¢æ°ã®æåŸã«è©äŸ¡ãããåŒãèªåçã«æ»ãå€ãšãªãããã<code>return</code> ããŒã¯ãŒããçç¥ããŠãåé¡ãããŸããã
===== é¢æ°ã®åŒã³åºã =====
é¢æ°ã®åŒã³åºãã¯ãé¢æ°åã«åŒæ°ãæž¡ãããšã§è¡ããŸããåŒæ°ã¯ã«ã³ãã§åºåãããŸãã
:<syntaxhighlight lang=julia>
greet("Alice") # Hello, Alice!
</syntaxhighlight>
===== ããã©ã«ãåŒæ° =====
Juliaã§ã¯ãããã©ã«ãåŒæ°ãæã€é¢æ°ãå®çŸ©ããããšãã§ããŸããããã©ã«ãåŒæ°ãæã€ãã©ã¡ãŒã¿ã¯ãé¢æ°ã®åŒã³åºãæã«çç¥ããããšãã§ããŸãã
:<syntaxhighlight lang=julia>
function greet(name="World")
println("Hello, $name!")
end
greet() # Hello, World!
greet("Alice") # Hello, Alice!
</syntaxhighlight>
===== ããŒã¯ãŒãåŒæ° =====
ãŸããããŒã¯ãŒãåŒæ°ã䜿ã£ãŠé¢æ°ãå®çŸ©ããããšãã§ããŸããããã«ãããåŒæ°ã®æå³ãæ確ã«ããããšãã§ããŸãã
:<syntaxhighlight lang=julia>
function greet(; name="World")
println("Hello, $name!")
end
greet() # Hello, World!
greet(name="Alice") # Hello, Alice!
</syntaxhighlight>
Juliaã®é¢æ°ã¯éåžžã«æè»ã§ãããæ§ã
ãªåŒæ°ã®åœ¢åŒããµããŒãããŠããŸããããã«ãããé¢æ°ãããå¹æçã«äœ¿çšããããšãã§ããŸãã
==== é¢æ°ã®åŒæ°ãšæ»ãå€ã®åæšè« ====
Juliaã¯åçåä»ãèšèªã§ãããé¢æ°ã®åŒæ°ãæ»ãå€ã®åãæ瀺çã«æå®ããå¿
èŠã¯ãããŸããã代ããã«ãJuliaã®åæšè«æ©èœãé¢æ°ã®åŒæ°ãæ»ãå€ã®åãèªåçã«æšè«ããŸãã
以äžã¯ãåæšè«ãè¡ãããäŸã§ãã
:<syntaxhighlight lang=julia>
function add(x, y)
return x + y
end
result = add(3, 5)
println(result) # åºå: 8
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>add</code> é¢æ°ã®åŒæ° <code>x</code> ãš <code>y</code> ã¯æ瀺çãªå泚éãäžããããŠããŸããããJuliaã¯äžããããåŒæ°ãæŽæ°ã§ããããšãæšè«ããŸãããŸãã<code>add</code> é¢æ°ã®æ»ãå€ã®åãæŽæ°ãšããŠæšè«ãããŸãã
ãã®äŸã§ã¯ã<code>add</code> é¢æ°ã¯ãžã§ããªãã¯é¢æ°ãšããŠå®çŸ©ãããŠããŸãããžã§ããªãã¯é¢æ°ã¯ãç¹å®ã®åã«äŸåãããç°ãªãåã®åŒæ°ã«å¯ŸããŠåäœããããã«èšèšãããŠããŸããJuliaã®åæšè«æ©èœãé¢æ°ã®åŒæ°ãæ»ãå€ã®åãèªåçã«æšè«ããããšã§ããžã§ããªãã¯é¢æ°ãç°ãªãåã®åŒæ°ã«å¯ŸããŠé©åã«åäœããããšãå¯èœã«ãªããŸãã
{{See|[[#ãžã§ããªãã¯é¢æ°|ãžã§ããªãã¯é¢æ°]]}}
===== åæšè«ã«å€±æããã±ãŒã¹ =====
以äžã¯ãåæšè«ã倱æããå¯èœæ§ã®ããã³ãŒãäŸã§ãã
:<syntaxhighlight lang=julia>
# åæšè«ã倱æããäŸ
function my_func(x)
if x > 0
return "Positive"
else
return -1
end
end
result = my_func(5) # ãšã©ãŒïŒåã®äžè²«æ§ããªããããåæšè«ã倱æããå¯èœæ§ããããŸã
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>my_func</code>é¢æ°ã¯åŒæ° <code>x</code> ãåãåããŸãããæ¡ä»¶ã«å¿ããŠæååãŸãã¯æŽæ°ãè¿ããŸãããã®ãããªå Žåãåæšè«ã¯å€±æããJuliaã¯é©åãªåãæšè«ã§ããŸããããã®çµæã<code>my_func(5)</code>ãåŒã³åºããšãåã®äžè²«æ§ããªããããšã©ãŒãçºçããå¯èœæ§ããããŸãããã®åé¡ã解決ããã«ã¯ãé¢æ°ã®æ»ãå€ã®åãæ瀺çã«æå®ããããé¢æ°ãåèšèšããŠåã®äžè²«æ§ã確ä¿ããå¿
èŠããããŸãã
==== å€éãã£ã¹ããã ====
å€éãã£ã¹ãããïŒMultiple DispatchïŒã¯ãããã°ã©ãã³ã°èšèªã«ãããŠãé¢æ°ã®æ¯ãèããåŒæ°ã®åãåæ°ã«ãã£ãŠåçã«æ±ºå®ããæ©èœã§ããéåžžã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã§ã¯ãã¡ãœããã®åŒã³åºãã¯äžè¬çã«ã¬ã·ãŒãïŒãªããžã§ã¯ãïŒã®åã«åºã¥ããŠè¡ãããŸãããå€éãã£ã¹ãããã§ã¯ãåŒæ°ã®åãåæ°ã«åºã¥ããŠã¡ãœããã®åŒã³åºãã解決ããŸãã
Juliaã®å€éãã£ã¹ãããã¯ãé¢æ°ãè€æ°ã®ã·ã°ããã£ïŒåŒæ°ã®åãšåæ°ã®çµã¿åããïŒãæã¡ãå®è¡æã«æé©ãªã·ã°ããã£ãéžæããããšããä»çµã¿ã§ããããã«ãããåãé¢æ°åã䜿çšããŠç°ãªãåŒæ°åã«å¯Ÿå¿ããè€æ°ã®å®è£
ãå®çŸ©ããããšãã§ããŸããããã«ãæ°ããåãå®çŸ©ãããšãã«æ¢åã®é¢æ°ã«å¯ŸããŠæ°ããå®è£
ãè¿œå ããããšã容æã§ãã
å€éãã£ã¹ãããã¯ãéçãªåä»ãèšèªãåçãªåä»ãèšèªã®äž¡æ¹ã§å©çšãããŸãããJuliaã®ãããªåçåä»ãèšèªã§ã¯ç¹ã«åŒ·åãªæ©èœãšããŠæŽ»çšãããŠããŸããå€éãã£ã¹ãããã«ãããæè»æ§ãšå¹çæ§ãäž¡ç«ãããªãããè€éãªããã°ã©ã ã®èšè¿°ãæ¡åŒµã容æã«ãªããŸãã
以äžã¯ãJuliaã§ã®å€éãã£ã¹ãããã®ã³ãŒãäŸã§ãã
:<syntaxhighlight lang=julia>
# é¢æ° add ã®å®çŸ©
function add(x::Int, y::Int)
println("Integers are being added.")
return x + y
end
function add(x::Float64, y::Float64)
println("Floats are being added.")
return x + y
end
function add(x::String, y::String)
println("Strings are being concatenated.")
return x * y
end
# é¢æ° add ã®åŒã³åºã
println(add(1, 2)) # Integers are being added. 3
println(add(3.5, 2.5)) # Floats are being added. 6.0
println(add("Hello, ", "world!")) # Strings are being concatenated. Hello, world!
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>add</code> é¢æ°ãæŽæ°åãæµ®åå°æ°ç¹æ°åãæåååã®åŒæ°ãåãåããããããã®åã«å¯Ÿå¿ããæ¯ãèããå®çŸ©ããŠããŸããé¢æ°ãåŒã³åºãéã«ã¯ãåŒæ°ã®åã«å¿ããŠé©åãªå®è£
ãéžæãããŸãã
å€éãã£ã¹ãããã¯ä»ã®ããã°ã©ãã³ã°èšèªã§ã¯ãå€éå®çŸ©ïŒOverloadingïŒãããã¯å€æ
æ§ïŒPolymorphismïŒãšãèšãããŸãã
==== å¯å€åŒæ° ====
å¯å€åŒæ°ã¯ãé¢æ°ã«å¯å€é·ã®åŒæ°ãæž¡ãããã®ä»çµã¿ã§ããJuliaã§ã¯ãé¢æ°ã®åŒæ°ã®æåŸã«äžç¹ãªãŒããŒïŒ<code>...</code>ïŒã䜿ã£ãŠå¯å€åŒæ°ãæå®ããŸããããã«ãããé¢æ°åŒã³åºãæã«ä»»æã®æ°ã®åŒæ°ãæž¡ãããšãã§ããŸãã
以äžã¯ãå¯å€åŒæ°ãæã€é¢æ°ã®äŸã§ãã
:<syntaxhighlight lang=julia>
# å¯å€åŒæ°ãæã€é¢æ°ã®å®çŸ©
function sum_values(x::Number, y::Number...)
total = x
for val in y
total += val
end
return total
end
# é¢æ°ã®åŒã³åºã
println(sum_values(1, 2, 3, 4)) # åºå: 10
println(sum_values(1, 2, 3, 4, 5)) # åºå: 15
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>sum_values</code>é¢æ°ã¯æåã®åŒæ° <code>x</code> ãšå¯å€é·ã®åŒæ° <code>y</code> ãåãåãããããã®å€ãåèšããŠè¿ããŸãã<code>y</code> ã®éšåã«ã¯ä»»æã®æ°ã®åŒæ°ãæž¡ãããããšãã§ããŸãã
==== å€å€è¿ã ====
å€å€è¿ãã¯ãé¢æ°ãè€æ°ã®å€ãè¿ãããšãæå³ããŸããJuliaã§ã¯ãã¿ãã«ã䜿çšããŠè€æ°ã®å€ããŸãšããŠè¿ãããšãã§ããŸãã以äžã¯ãå€å€è¿ãã®äŸã§ãã
:<syntaxhighlight lang=julia>
# å€å€è¿ãã®é¢æ°ã®å®çŸ©
function divide_remainder(x::Int, y::Int)
quotient = div(x, y) # åãèšç®
remainder = rem(x, y) # äœããèšç®
return quotient, remainder # ã¿ãã«ãšããŠè€æ°ã®å€ãè¿ã
end
# é¢æ°ã®åŒã³åºããšå€å€ã®åãåã
result = divide_remainder(10, 3)
println("Quotient:", result[1]) # åã衚瀺
println("Remainder:", result[2]) # äœãã衚瀺
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>divide_remainder</code>é¢æ°ã2ã€ã®æŽæ°ãåãåããåãšäœããèšç®ããŠã¿ãã«ãšããŠè¿ããŸããé¢æ°ãåŒã³åºããåŸãã¿ãã«ã®èŠçŽ ã«ã¯ã€ã³ããã¯ã¹ã䜿çšããŠã¢ã¯ã»ã¹ã§ããŸãã
==== é¢æ°åŒã³åºãæã®é
åå±é ====
Juliaã§ã¯ãé¢æ°åŒã³åºãæã«é
åãå±éããŠãè€æ°ã®åŒæ°ãšããŠæž¡ãããšãã§ããŸããããã«ãããé¢æ°ãå¯å€æ°ã®åŒæ°ãåãå Žåããè€æ°ã®èŠçŽ ããŸãšããŠé¢æ°ã«æž¡ãå Žåã«äŸ¿å©ã§ãã以äžã¯ãé
åå±éã䜿çšããé¢æ°åŒã³åºãã®äŸã§ãã
:<syntaxhighlight lang=julia>
# é
åå±éã䜿çšããé¢æ°åŒã³åºã
function sum_of_three_numbers(a, b, c)
return a + b + c
end
args = [1, 2, 3]
result = sum_of_three_numbers(args...) # é
åãå±éããŠé¢æ°ã«æž¡ã
println("Sum of three numbers:", result) # åºå: 6
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>sum_of_three_numbers</code>é¢æ°ã3ã€ã®åŒæ°ãåãããããã®å€ã®åèšãè¿ããŸãã<code>args</code>ãšããé
åãå®çŸ©ãããã®é
åã<code>...</code>ã䜿ã£ãŠé¢æ°åŒã³åºãæã«å±éããŠããŸããããã«ãããé
åã®åèŠçŽ ãåå¥ã®åŒæ°ãšããŠé¢æ°ã«æž¡ãããŸãã
==== ç¡åé¢æ° ====
ç¡åé¢æ°ïŒAnonymous FunctionïŒã¯ãååãæããªãé¢æ°ã®ããšã§ããéåžžãé¢æ°ãå®çŸ©ããéã«ã¯ååãæå®ãããŸãããç¡åé¢æ°ã¯ååããªãããã®å Žã§å®çŸ©ãããŸããç¡åé¢æ°ã¯ãäžè¬çã«ä»ã®é¢æ°ã®åŒæ°ãšããŠæž¡ãããããé«éé¢æ°å
ã§äœ¿çšããããããŸããJuliaã§ã¯ãç¡åé¢æ°ã¯<code>function</code>ããŒã¯ãŒãã䜿çšããã«ãç°¡æœã«è¡šçŸããããšãã§ããŸããäŸãã°ã<code>x -> x^2</code>ãšããåŒã¯ãåŒæ°xã«å¯ŸããŠxã®äºä¹ãè¿ãç¡åé¢æ°ãè¡šããŸãã
以äžã¯ãJuliaã§ç¡åé¢æ°ã䜿çšããã³ãŒãäŸã§ãã
:<syntaxhighlight lang=julia>
# ç¡åé¢æ°ãå®çŸ©ããŠå€æ°ã«ä»£å
¥ããæ¹æ³
square = x -> x^2
cube = x -> x^3
# ç¡åé¢æ°ãçŽæ¥åŒã³åºããŠäœ¿çšããæ¹æ³
println(square(5)) # åºå: 25
println(cube(3)) # åºå: 27
# ç¡åé¢æ°ã®å
println(typeof(square)) # åºå: var"#1#2"
println(typeof(cube)) # åºå: var"#3#4"
# é«éé¢æ°å
ã§ç¡åé¢æ°ã䜿çšããäŸ
function apply_function(f, value)
return f(value)
end
println(apply_function(x -> x * 2, 4)) # åºå: 8
</syntaxhighlight>
: *ãã®ã³ãŒãã§ã¯ãç¡åé¢æ°ãå®çŸ©ããŠå€æ°ã«ä»£å
¥ãããŸãç¡åé¢æ°ãçŽæ¥åŒã³åºããŠäœ¿çšããæ¹æ³ã瀺ãããŠããŸãã<code>square</code>ãš<code>cube</code>ãšããå€æ°ã«ããããäºä¹ãèšç®ããé¢æ°ãšäžä¹ãèšç®ããé¢æ°ã代å
¥ãããŠããŸãã
: *次ã«ã<code>apply_function</code>ãšããé«éé¢æ°ãå®çŸ©ããããã®äžã§ç¡åé¢æ°ã䜿çšãããŠããŸãã<code>apply_function</code>ã¯ãäžããããé¢æ° <code>f</code> ãåŒæ° <code>value</code> ã«é©çšããŠãã®çµæãè¿ããŸãã
: *ããããã®ç¡åé¢æ°ã¯ <code>var"#n#m"</code> ã®åœ¢åŒã®åãæã£ãŠããŸããããã¯ãJuliaãç¡åé¢æ°ãå
éšçã«ãŠããŒã¯ã«èå¥ããããã«äœ¿çšãããååã§ãã
: ãã®ããã«ãç¡åé¢æ°ã¯é¢æ°ãçŽæ¥åŒæ°ãšããŠæž¡ããããå€æ°ã«ä»£å
¥ãããããå Žåãªã©ã«äŸ¿å©ã«äœ¿çšãããŸãã
Juliaã§ã¯ãç¡åé¢æ°ãå®çŸ©ããŠããã«å®è¡ããããšãã§ããŸãããããå³æé¢æ°ãšåŒã³ãŸãã以äžã¯ãã®äŸã§ãã
:<syntaxhighlight lang=julia>
# ç¡åé¢æ°ãå³æå®è¡ããäŸ
result = (x -> x^2)(5)
println(result) # åºå: 25
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ã<code>(x -> x^2)</code>ãç¡åé¢æ°ã§ããããã®åŸã®<code>(5)</code>ã§ãã®ç¡åé¢æ°ãããã«å®è¡ãããŠããŸãããã®çµæã<code>result</code>ã«ã¯<code>5^2</code>ã§ãã<code>25</code>ã代å
¥ãããŸãã
Juliaã§ã¯ãç¡åé¢æ°ãã©ã ãåŒãŸãã¯å¿åé¢æ°ãšåŒã³ãŸãããã®ãããäžèšã®äŸã¯ã©ã ãåŒã䜿ã£ãŠç¡åé¢æ°ãå®çŸ©ããå³æã«å®è¡ããŠããŸãã
==== do ããã㯠====
Juliaã«ããã<code>do</code>ãããã¯ã¯ãé¢æ°ããã¯ãã®åŒã³åºãæã«ããã®é¢æ°ããã¯ãã«å¯ŸããŠãããã¯ãæž¡ãããã®æ§æã§ããéåžžãé¢æ°ããã¯ãã«å¯ŸããŠ1ã€ä»¥äžã®åŒãæž¡ãå¿
èŠãããå Žåã«äœ¿çšãããŸãã<code>do</code>ãããã¯ã¯ãé¢æ°åããã°ã©ãã³ã°ãã³ãŒã«ããã¯é¢æ°ã®å®çŸ©ãªã©ã®å Žé¢ã§ãã䜿çšãããŸãã
å
·äœçã«ã¯ã以äžã®ãããªåœ¢åŒã§äœ¿çšãããŸãïŒ
:<syntaxhighlight lang=julia>
function_with_do_block(args...) do
# ãããã¯å
ã®ã³ãŒã
end
</syntaxhighlight>
ãŸãã¯ããã¯ãã®å ŽåïŒ
:<syntaxhighlight lang=julia>
@macro_with_do_block(args...) do
# ãããã¯å
ã®ã³ãŒã
end
</syntaxhighlight>
<code>do</code>ãããã¯å
ã«ã¯ãä»»æã®ã³ãŒããå«ãŸããããšãã§ããŸãããã®ãããã¯å
ã®ã³ãŒãã¯ãé¢æ°ããã¯ãã®æ¬äœå
ã§åç
§ãããããšããããŸãã<code>do</code>ãããã¯ã¯ãé¢æ°ã®åŒæ°ãšããŠæž¡ãããšãã§ããç¡åé¢æ°ãã¯ããŒãžã£ãå®çŸ©ããã®ã«äŸ¿å©ã§ãã
<code>do</code>ãããã¯ã¯ãã€ãã¬ãŒã¿ããžã§ãã¬ãŒã¿ãšçµã¿åãããŠäœ¿çšãããããšããããããŸãã
ãã®å Žåã<code>do</code>ãããã¯å
ã®ã³ãŒãã¯ãã€ãã¬ãŒã·ã§ã³äžã«å®è¡ãããåŠçãå®çŸ©ããŸãã
äŸãã°ã次ã®ã³ãŒãã¯é
åã®åèŠçŽ ã2åã«ããäŸã§ãã
:<syntaxhighlight lang=julia>
arr = [1, 2, 3, 4, 5]
result = map(arr) do x
2 * x
end
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>map</code>é¢æ°ã«<code>do</code>ãããã¯ã䜿çšããŠãåèŠçŽ ã2åã«ããç¡åã®é¢æ°ãå®çŸ©ããŠããŸãããã®ç¡åã®é¢æ°ã¯ã<code>x</code>ãšããåŒæ°ãåãããã®åŒæ°ã2åã«ããŠè¿ããŸãã<code>map</code>é¢æ°ã¯ãã®ç¡åã®é¢æ°ãé
åã®åèŠçŽ ã«é©çšããçµæã<code>result</code>å€æ°ã«æ ŒçŽããŸãã
<code>do</code>ãããã¯ã䜿çšããããšã§ãã³ãŒããããç°¡æœã§èªã¿ããããªããé¢æ°ãããæè»ã«äœ¿çšããããšãã§ããŸãã
Juliaã§ã¯<code>do</code>ãããã¯ã䜿çšããŠãæè»ã§æ¡åŒµå¯èœãªã³ãŒããæžãããšãã§ããŸãã
==== ã³ãŒãããã㯠====
ã³ãŒããããã¯ã¯ãããã°ã©ã å
ã§è€æ°ã®æããŸãšããŠå®è¡ããããã®æ§é ã§ããJuliaã§ã¯ã<code>begin</code>ããŒã¯ãŒããš<code>end</code>ããŒã¯ãŒãã§å²ãã éšåãã³ãŒããããã¯ãšãªããŸããããã«ãããè€æ°ã®æã1ã€ã®ãŸãšãŸããšããŠæ±ãããšãã§ããŸããã³ãŒããããã¯ã®æåŸã®åŒã®å€ãããã®ãããã¯å
šäœã®å€ãšãªããŸããã³ãŒããããã¯ã¯ãé¢æ°ã®äžã§ã®ã¿äœ¿çšããã®ã§ã¯ãªããä»»æã®ã¹ã³ãŒãå
ã§äœ¿çšããããšãã§ããŸãã
以äžã¯ãJuliaã§ã®ã³ãŒããããã¯ã®äœ¿çšäŸã§ãã
:<syntaxhighlight lang=julia>
# begin-endã䜿ã£ãã³ãŒããããã¯
result = begin
x = 10
y = 20
x + y
end
println(result) # åºå: 30
# ã«ãã³ã§ããã£ãã³ãŒããããã¯
result = (x = 10; y = 20; x + y)
println(result) # åºå: 30
</syntaxhighlight>
ãããã®äŸã§ã¯ã<code>begin</code>ããŒã¯ãŒããš<code>end</code>ããŒã¯ãŒãããŸãã¯ã«ãã³ã§ããã£ãéšåãã³ãŒããããã¯ãšããŠæ©èœãããã®äžã«è€æ°ã®æãå«ãŸããŠããŸããæåŸã®åŒã§ãã<code>x + y</code>ã®çµæãããããã®ã³ãŒããããã¯å
šäœã®å€ãšãªããŸãã
==== é«éé¢æ° ====
é«éé¢æ°ãšã¯ãä»ã®é¢æ°ãåŒæ°ãšããŠåãåããããŸãã¯é¢æ°ãæ»ãå€ãšããŠè¿ãé¢æ°ã®ããšã§ããå
·äœçã«ã¯ã<code>map</code>ã<code>reduce</code>ã<code>filter</code> ãªã©ã®é¢æ°ããã®ä»£è¡šçãªäŸã§ãã
; map
: <code>map</code> é¢æ°ã¯ãäžããããé¢æ°ããªã¹ãã®åèŠçŽ ã«é©çšãããã®çµæãæ°ãããªã¹ããšããŠè¿ããŸãã
:<syntaxhighlight lang=julia>
# é
åã®åèŠçŽ ã2åã«ãã
array = [1, 2, 3, 4, 5]
doubled_array = map(x -> x * 2, array)
println(doubled_array) # åºå: [2, 4, 6, 8, 10]
</syntaxhighlight>
; filter
: <code>filter</code> é¢æ°ã¯ãäžããããè¿°èªé¢æ°ïŒæ¡ä»¶ãæºãããã©ãããè¿ãé¢æ°ïŒã«ãã£ãŠè©äŸ¡ãããæ¡ä»¶ãæºããèŠçŽ ã®ã¿ãå«ãæ°ãããªã¹ããè¿ããŸãã
:<syntaxhighlight lang=julia>
# å¶æ°ã®ã¿ãæœåºãã
even_array = filter(x -> x % 2 == 0, array)
println(even_array) # åºå: [2, 4]
</syntaxhighlight>
; reduce
: <code>reduce</code> é¢æ°ã¯ãäžããããé¢æ°ã䜿çšããŠãªã¹ãã®åèŠçŽ ãçµåããåäžã®å€ãçæããŸãã
:<syntaxhighlight lang=julia>
# é
åã®èŠçŽ ã®åèšãèšç®ãã
sum_array = reduce(+, array)
println(sum_array) # åºå: 15
</syntaxhighlight>
ãããã®é¢æ°ã¯ãã³ãŒãã®ç°¡æœããšå¯èªæ§ãåäžãããåããããªæäœãç¹°ãè¿ãå®è¡ããå¿
èŠæ§ã軜æžããŸãã
==== é«éé¢æ°ã®å
å
è¡šèšã«ãã眮ãæã ====
å
å
è¡šèšã䜿çšããŠåãããžãã¯ãè¡šçŸããããšãã§ããŸãã以äžã«ã<code>map</code>ã<code>filter</code>ã<code>reduce</code> ãããããå
å
è¡šèšã§å®è£
ããäŸã瀺ããŸãã
; mapçžåœã®å
å
è¡šèš
:<syntaxhighlight lang=julia>
array = [1, 2, 3, 4, 5]
doubled_array = [x * 2 for x in array]
println(doubled_array) # åºå: [2, 4, 6, 8, 10]
</syntaxhighlight>
; filterçžåœã®å
å
è¡šèš
:<syntaxhighlight lang=julia>
even_array = [x for x in array if x % 2 == 0]
println(even_array) # åºå: [2, 4]
</syntaxhighlight>
; reduceçžåœã®å
å
è¡šèš
:<syntaxhighlight lang=julia>
sum_array = sum([x for x in array])
println(sum_array) # åºå: 15
</syntaxhighlight>
å
å
è¡šèšã¯ãé¢æ°ã®åŒã³åºããæžãããã³ãŒããããç°¡æœã«ããã®ã«åœ¹ç«ã¡ãŸãããã®ãããªæ©èœã¯ãJuliaã®æè»æ§ãšè¡šçŸåã®äžéšã§ãããããç°¡æœãªã³ãŒããæžãããã®åŒ·åãªããŒã«ãšãªããŸãã
:å
å
è¡šèšã«ã€ããŠã¯ãé
ãæ¹ããŠå·çäºå®ã§ãã
==== ååž°çåŒã³åºã ====
ååž°çåŒã³åºãã¯ãé¢æ°ãèªåèªèº«ãåŒã³åºãããšãæããŸããããã¯åé¡ã解ãã®ã«éåžžã«åŒ·åãªææ³ã§ãããç¹ã«åé¡ãååž°çãªæ§è³ªãæã€å Žåã«æçšã§ããJuliaã§ã¯ãååž°çåŒã³åºãã¯éåžžã®é¢æ°åŒã³åºããšåãããã«è¡ãããŸãããé©åãªçµäºæ¡ä»¶ãèšå®ããããšãéèŠã§ããå
žåçãªäŸãšããŠã¯ãéä¹ã®èšç®ãååž°çãªããŒã¿æ§é ã®æäœããããŸãã
:<syntaxhighlight lang=julia>
function factorial(n)
if n == 0 || n == 1
return 1
else
return n * factorial(n - 1)
end
end
println(factorial(5)) # 120
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>factorial</code>é¢æ°ãèªåèªèº«ãåŒã³åºããŠããŸããçµäºæ¡ä»¶ãšããŠã<code>n</code>ã0ãŸãã¯1ã®å Žåã«ã¯1ãè¿ãããã以å€ã®å Žåã«ã¯<code>n</code>ãš<code>factorial(n - 1)</code>ã®ç©ãè¿ããŸããããã«ããã5ã®éä¹ãèšç®ãããŸãã
===== æ«å°Ÿååž° =====
æ«å°Ÿååž°ïŒtail recursionïŒã¯ãååž°é¢æ°ãèªå·±åŒã³åºãã®æåŸã®æäœãšããŠååž°ãè¡ã圢åŒãæããŸããæ«å°Ÿååž°ã®ç¹åŸŽã¯ãååž°åŒã³åºããé¢æ°ã®æåŸã«äœçœ®ãããããæ°ããã¹ã¿ãã¯ãã¬ãŒã ãçæãããããšãªããååž°ã®å¹çãåäžããããšã§ããããã«ãããååž°ãæ·±ããªã£ãŠãã¹ã¿ãã¯ãªãŒããŒãããŒã®ãªã¹ã¯ã軜æžãããŸãã
Juliaã§ã¯ãæ«å°Ÿååž°æé©åãå¯èœã§ãããååž°é¢æ°ãæ«å°Ÿååž°ã®åœ¢åŒã§ããã°ãæé©åãèªåçã«é©çšãããŸããã€ãŸããæ«å°Ÿååž°ã䜿ã£ãé¢æ°ã¯ãéåžžã«å€§ããªå
¥åã«å¯ŸããŠãå¹ççã«åäœããŸãã
:<syntaxhighlight lang=julia>
function factorial(n, acc=1)
if n == 0
return acc
else
return factorial(n - 1, n * acc)
end
end
println(factorial(5)) # 120
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>factorial</code>é¢æ°ãæ«å°Ÿååž°ã®åœ¢åŒã§å®è£
ãããŠããŸããååž°åŒã³åºããé¢æ°ã®æåŸã®æäœãšããŠè¡ãããŠãããæé©åãããããŒãžã§ã³ã®æ«å°Ÿååž°ãšããŠå®è¡ãããŸãã
==== ã¯ããŒãžã£ ====
ã¯ããŒãžã£ã¯ãé¢æ°ãšãã®é¢æ°ãåç
§ããç°å¢ïŒå€æ°ãé¢æ°ãªã©ïŒãå
ã¿èŸŒãã ãã®ã§ããããã«ãããå€éšå€æ°ãå€éšé¢æ°ãå
éšã®é¢æ°ãå©çšã§ããããã«ãªããŸããã¯ããŒãžã£ã¯ãç¹å®ã®ç¶æ
ãä¿æãããããå©çšããŠåäœããé¢æ°ãå®çŸ©ããå Žåã«äŸ¿å©ã§ãã
:<syntaxhighlight lang=julia>
function make_multiplier(x)
return y -> x * y
end
mul_by_5 = make_multiplier(5)
println(mul_by_5(3)) # 15
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>make_multiplier</code>é¢æ°ãã¯ããŒãžã£ãçæããŸãã<code>make_multiplier</code>é¢æ°ã¯ã<code>x</code>ãåŒæ°ãšããŠåãåããç¡åé¢æ°<code>y -> x * y</code>ãè¿ããŸãããã®ç¡åé¢æ°ã¯å€éšã®å€æ°<code>x</code>ãåç
§ããŠããããã®å€ãä¿æããŠããŸãã<code>make_multiplier(5)</code>ãè¿ãé¢æ°ã<code>mul_by_5</code>ã«å²ãåœãŠãŠåŒã³åºãããšã§ãå€éšå€æ°<code>x</code>ã®å€ã5ã§ããã¯ããŒãžã£ãäœæãããåŒæ°ã«æž¡ãããå€ãšã®ä¹ç®ãè¡ãããŸãã
==== ã«ãªãŒå ====
ã«ãªãŒåïŒcurryingïŒã¯ãè€æ°ã®åŒæ°ãæã€é¢æ°ãã1ã€ã®åŒæ°ãåãåãé¢æ°ã®é£éã«å€æããããã»ã¹ã§ããå
·äœçã«ã¯ãè€æ°ã®åŒæ°ãæã€é¢æ°ãéšåé©çšããŠæ°ããé¢æ°ãçæããããšã§ã1ã€ã®åŒæ°ãåãåãé¢æ°ã«å€æããŸãã
:<syntaxhighlight lang=julia>
function add(x, y)
return x + y
end
curried_add = x -> y -> add(x, y)
add_five = curried_add(5)
println(add_five(3)) # 8
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>add</code>é¢æ°ã2ã€ã®åŒæ°ãåãåãé¢æ°ã§ãã<code>curried_add</code>é¢æ°ã¯ã<code>add</code>é¢æ°ãã«ãªãŒåããŠ1ã€ã®åŒæ°ãåãåãé¢æ°ãè¿ããŸãããã®ã«ãªãŒåãããé¢æ°ã䜿ã£ãŠãæ°ããé¢æ°<code>add_five</code>ãçæããããã«åŒæ°3ãäžããŠåŒã³åºãããšã§ãæçµçãªçµæãåŸãŸãã
==== ãžã§ããªãã¯é¢æ° ====
ãžã§ããªãã¯é¢æ°ã¯ãè€æ°ã®ããŒã¿åã«å¯ŸããŠåãååã®é¢æ°ãå®çŸ©ããããããã®ããŒã¿åã«å¿ããåäœãè¡ãä»çµã¿ã§ããããã«ãããåã«äŸåããªãæ±çšçãªé¢æ°ãäœæããããšãã§ããŸããJuliaã§ã¯ãé¢æ°ã®å€éãã£ã¹ããããå©çšããŠãžã§ããªãã¯é¢æ°ãå®çŸ©ããŸãã
:<syntaxhighlight lang=julia>
function myfunc(x::Int)
println("This is an integer:", x)
end
function myfunc(x::Float64)
println("This is a float:", x)
end
myfunc(5) # This is an integer: 5
myfunc(3.14) # This is a float: 3.14
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>myfunc</code>ãšããååã®ãžã§ããªãã¯é¢æ°ãå®çŸ©ãããŠããŸãããã®é¢æ°ã¯ãæŽæ°åãšæµ®åå°æ°ç¹æ°åã®åŒæ°ãåã2ã€ã®ããŒãžã§ã³ããããŸããåŒæ°ã®åã«å¿ããŠãé©åãªé¢æ°ãåŒã³åºãããŸãã
Juliaã®å Žåã[[#åã¢ãããŒã·ã§ã³|åã¢ãããŒã·ã§ã³]]ãæ瀺çã«è¡ãããšãå°ãªãã®ã§ãç¡èªèŠã«ãžã§ããªãã¯é¢æ°ãå®çŸ©ããŠããããšãå€ãã§ãã
====ãžã§ãã¬ãŒã¿ãŒ====
ãžã§ãã¬ãŒã¿ïŒGeneratorsïŒã¯ãé
延è©äŸ¡ãå©çšããŠèŠçŽ ãåçã«çæããããã®æ©èœã§ãããžã§ãã¬ãŒã¿ã¯ãéåžžã®é¢æ°ãšåæ§ã«å®çŸ©ãããŸããã<code>yield</code>ããŒã¯ãŒãã䜿çšããŠèŠçŽ ãçæããŸãããžã§ãã¬ãŒã¿ã¯ãäžåºŠã«ãã¹ãŠã®èŠçŽ ãçæãããå¿
èŠã«å¿ããŠèŠçŽ ãçæããŸããããã«ããã倧èŠæš¡ãªããŒã¿ã»ãããå¹ççã«åŠçããããšãã§ããŸãã
以äžã¯ããžã§ãã¬ãŒã¿ã®åºæ¬çãªäŸã§ãïŒ
:<syntaxhighlight lang=julia>
function mygenerator()
for i in 1:5
yield(i)
end
end
# ãžã§ãã¬ãŒã¿ãäœæ
gen = mygenerator()
# ãžã§ãã¬ãŒã¿ããèŠçŽ ãååŸ
for x in gen
println(x)
end
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>mygenerator</code>é¢æ°ããžã§ãã¬ãŒã¿ãå®çŸ©ãã1ãã5ãŸã§ã®æ°å€ãé çªã«è¿ããŸãããžã§ãã¬ãŒã¿ã¯ã<code>for</code>ã«ãŒããªã©ã®ã€ãã¬ãŒã·ã§ã³æ§é ã§äœ¿çšãããããšãäžè¬çã§ãããžã§ãã¬ãŒã¿ã¯é
延è©äŸ¡ãè¡ãããã倧èŠæš¡ãªããŒã¿ã»ãããæ±ãéã«éåžžã«äŸ¿å©ã§ãã
====ã€ãã¬ãŒã¿ãŒ====
Juliaã®ã€ãã¬ãŒã¿ïŒIteratorsïŒã¯ãããŒã¿ã®ã·ãŒã±ã³ã¹ãå埩åŠçããããã®æ©èœã§ããã€ãã¬ãŒã¿ã¯ãç¹å®ã®ããŒã¿æ§é ïŒé
åãç¯å²ãã³ã¬ã¯ã·ã§ã³ãªã©ïŒã®èŠçŽ ã«é çªã«ã¢ã¯ã»ã¹ããæ¹æ³ãæäŸããŸããããã«ããã倧ããªããŒã¿ã»ãããç¡éã®ã·ãŒã±ã³ã¹ãå¹ççã«æ±ãããšãã§ããŸãã
Juliaã®ã€ãã¬ãŒã¿ã¯ãé
延è©äŸ¡ïŒLazy evaluationïŒã®æŠå¿µãå©çšããŠãããã€ãã¬ãŒã·ã§ã³ãå¿
èŠãªæç¹ã§ã®ã¿èŠçŽ ãèšç®ãããŸããããã«ãããã¡ã¢ãªãèšç®ãªãœãŒã¹ãç¯çŽãã€ã€ãå¿
èŠãªèŠçŽ ã«é çªã«ã¢ã¯ã»ã¹ã§ããŸãã
ããŸããŸãªã€ãã¬ãŒã¿é¢æ°ãæäŸãããŠãããããããçµã¿åãããããšã§ãããŒã¿ã®ãã£ã«ã¿ãªã³ã°ãååãéçŽãçµåãªã©ã®æäœãæè»ã«å®è¡ã§ããŸããã€ãã¬ãŒã¿ã¯ãJuliaã®ã³ãŒããããå¹ççãã€ç°¡æœã«ããããã®éèŠãªèŠçŽ ã§ãã
;ãŠãŒã¶ãŒå®çŸ©ã®ã€ãã¬ãŒã¿ã®äŸ
:<syntaxhighlight lang=julia>
# çŽ æ°ãã©ãããå€å®ããé¢æ°
function is_prime(n::Int)
if n <= 1
return false
elseif n <= 3
return true
elseif n % 2 == 0 || n % 3 == 0
return false
else
i = 5
while i * i <= n
if n % i == 0 || n % (i + 2) == 0
return false
end
i += 6
end
return true
end
end
struct PrimeIter
current::Int
end
function Base.iterate(iter::PrimeIter, state=2)
while true
if is_prime(state)
return (state, state + 1)
end
state += 1
end
end
# PrimeIterã§10ãŸã§ã®çŽ æ°ãã€ãã¬ãŒã
for prime in PrimeIter(2)
if prime > 10
break
end
println(prime)
end
</syntaxhighlight>
ãã®ã³ãŒãã¯ãJuliaã§çŽ æ°ãå€å®ããé¢æ° <code>is_prime</code> ãšãçŽ æ°ãè¿ãã€ãã¬ãŒã¿ <code>PrimeIter</code> ãå®çŸ©ããŠããŸãã以äžã«ãããããã®éšåã®è§£èª¬ãè¡ããŸãã
; is_prime
* <code>is_prime(n::Int)</code> é¢æ°ã¯ãäžããããæŽæ° <code>n</code> ãçŽ æ°ãã©ãããå€å®ããŸãã
* æåã®æ¡ä»¶æã§ã¯ã<code>n</code> ã1以äžã®å Žåã¯çŽ æ°ã§ã¯ãªããšã㊠<code>false</code> ãè¿ããŸãã
* 次ã®æ¡ä»¶æã§ã¯ã<code>n</code> ã3以äžã®å Žåã¯çŽ æ°ã§ãããšã㊠<code>true</code> ãè¿ããŸãã
* ãã®åŸã®æ¡ä»¶æã§ã¯ã<code>n</code> ã2ãŸãã¯3ã§å²ãåããå Žåã¯çŽ æ°ã§ã¯ãªããšã㊠<code>false</code> ãè¿ããŸãã
* ãããã®æ¡ä»¶ã«è©²åœããªãå Žåã<code>n</code> ãçŽ æ°ã§ãããã©ããã確èªããããã®ã«ãŒããè¡ãããŸãã
* ã«ãŒãã§ã¯ã6k±1 (ãã ããkã¯èªç¶æ°) ã®åœ¢ãæã€æ°å€ã«å¯ŸããŠçŽ æ°ãã©ãããå€å®ããŸãã
* <code>i</code> ãåæå€5ã§å§ãã<code>i * i</code> ã <code>n</code> ãã倧ãããªããŸã§ã«ãŒãããŸãã
* ã«ãŒãå
ã§ã<code>n</code> ã <code>i</code> ãŸã㯠<code>i + 2</code> ã§å²ãåããå Žåã¯çŽ æ°ã§ã¯ãªããšã㊠<code>false</code> ãè¿ããŸãã
* ã«ãŒããæããå Žåã<code>n</code> ã¯çŽ æ°ã§ãããšå€æããã<code>true</code> ãè¿ããŸãã
; PrimeIter
* <code>PrimeIter</code> ã¯ãçŽ æ°ãè¿ãã€ãã¬ãŒã¿ãå®çŸ©ããããã®åã§ãã<code>current</code> ãã£ãŒã«ãã¯ãçŸåšã®å€ãä¿æããŸãã
* <code>Base.iterate(iter::PrimeIter, state=2)</code> é¢æ°ã¯ã<code>PrimeIter</code> åã®ãªããžã§ã¯ãã«å¯ŸããŠåŒã³åºãããã€ãã¬ãŒã·ã§ã³ãè¡ããŸãã
* ã«ãŒãå
ã§ã¯ã<code>state</code> ãçŽ æ°å€å®é¢æ° <code>is_prime</code> ã«æž¡ããŠãçŽ æ°ãã©ããã確èªããŸãã
* <code>is_prime(state)</code> ã <code>true</code> ãè¿ãå Žåããã® <code>state</code> ã次ã®çŽ æ°ãšããŠè¿ããŸãã
* çŽ æ°ã§ãªãå Žå㯠<code>state</code> ãã€ã³ã¯ãªã¡ã³ãããŠæ¬¡ã®æ°ã«ç§»ããŸãã
; 䜿çšäŸ
* <code>for</code> ã«ãŒãã䜿çšããŠã<code>PrimeIter</code> ã§2ããå§ãŸãçŽ æ°ãååŸããŸãã
* ã«ãŒãå
ã§ãååŸããçŽ æ°ã10ãè¶
ããå Žåã¯ã«ãŒããçµäºããŸãã
* ã«ãŒãå
ã§çŽ æ°ãåºåããŸãã
ãã®ã³ãŒããå®è¡ãããšã2ãã7ãŸã§ã®çŽ æ°ãé çªã«åºåãããŸãã
===ãã¡ã€ã«æäœãšã¢ãžã¥ãŒã«===
ãã¡ã€ã«ã®èªã¿æžããã¢ãžã¥ãŒã«ã®äœæã»äœ¿çšæ¹æ³ãåŠã³ãŸããå€éšãã¡ã€ã«ããããŒã¿ãèªã¿èŸŒãã ããçµæããã¡ã€ã«ã«æžãåºãããããããšã¯ãå®éã®ããã°ã©ãã³ã°ã§éåžžã«éèŠã§ãããŸããã¢ãžã¥ãŒã«ã䜿çšããããšã§ãé¢é£ããé¢æ°ãåããŸãšããŠå¹æçã«ç®¡çããåå©çšå¯èœãªã³ãŒããäœæããããšãã§ããŸãã
==== ãã¡ã€ã«å
¥åºå ====
Juliaã§ãã¡ã€ã«ã®å
¥åºåãè¡ãããã«ã¯ãæšæºã®ãã¡ã€ã«æäœé¢æ°ãããã±ãŒãžã䜿çšããŸãã以äžã«ãåºæ¬çãªãã¡ã€ã«ã®èªã¿æžãæäœã®æ¹æ³ã瀺ããŸãã
===== ãã¡ã€ã«ã®èªã¿èŸŒã¿=====
:<syntaxhighlight lang=julia>
# ãã¡ã€ã«ãèªã¿èŸŒã¿ã¢ãŒãã§éã
file = open("input.txt", "r")
# ãã¡ã€ã«ãã1è¡ãã€èªã¿èŸŒã
for line in eachline(file)
println(line)
end
# ãã¡ã€ã«ãéãã
close(file)
</syntaxhighlight>
=====ãã¡ã€ã«ãžã®æžã蟌ã¿=====
:<syntaxhighlight lang=julia>
# ãã¡ã€ã«ãæžã蟌ã¿ã¢ãŒãã§éã
file = open("output.txt", "w")
# ãã¡ã€ã«ã«ããã¹ããæžã蟌ã
println(file, "Hello, world!")
println(file, "This is a new line.")
# ãã¡ã€ã«ãéãã
close(file)
</syntaxhighlight>
=====CSVãã¡ã€ã«ã®èªã¿æžãïŒCSV.jlããã±ãŒãžã䜿çšïŒ=====
:<syntaxhighlight lang=julia>
using CSV
# CSVãã¡ã€ã«ãèªã¿èŸŒã
data = CSV.read("data.csv")
# CSVãã¡ã€ã«ã«æžã蟌ã
CSV.write("output.csv", data)
</syntaxhighlight>
=====JSONãã¡ã€ã«ã®èªã¿æžãïŒJSON.jlããã±ãŒãžã䜿çšïŒ=====
:<syntaxhighlight lang=julia>
using JSON
# JSONãã¡ã€ã«ãèªã¿èŸŒã
data = JSON.parsefile("data.json")
# JSONãã¡ã€ã«ã«æžã蟌ã
JSON.print(data, "output.json")
</syntaxhighlight>
ãããã¯ãJuliaã§ãã¡ã€ã«ã®å
¥åºåãè¡ãåºæ¬çãªæ¹æ³ã®äžéšã§ãã
ãã¡ã€ã«ã®èªã¿èŸŒã¿ãæžã蟌ã¿æäœãè¡ãéã«ã¯ãé©åãªãšã©ãŒãã³ããªã³ã°ãè¡ãããšãéèŠã§ãã
===== ãŠãŒã¹ã±ãŒã¹ =====
Juliaã®ãã¡ã€ã«I/Oã¯ãããŸããŸãªãŠãŒã¹ã±ãŒã¹ã§æŽ»çšãããŸãã以äžã«ãäžè¬çãªãŠãŒã¹ã±ãŒã¹ã®äŸã瀺ããŸãã
;ããŒã¿ã®èªã¿èŸŒã¿ãšè§£æ:
:ããã¹ããã¡ã€ã«ãCSVãã¡ã€ã«ããããŒã¿ãèªã¿èŸŒã¿ãããã解æããŠããŒã¿åŠçãåæãè¡ããŸããããšãã°ãçµ±èšããŒã¿ããã°ãã¡ã€ã«ããããŒã¿ãèªã¿åããéèšãå¯èŠåãè¡ãããšããããŸãã
;ããŒã¿ã®æžã蟌ã¿:
:ããã°ã©ã ã®åºåãçµæããã¡ã€ã«ã«æžã蟌ãããšããããŸããããšãã°ãã·ãã¥ã¬ãŒã·ã§ã³ã®çµæãåŠçã®ãã°ããã¡ã€ã«ã«ä¿åããŸãã
;èšå®ãã¡ã€ã«ã®èªã¿æžã:
:ã¢ããªã±ãŒã·ã§ã³ã®èšå®ãæ§æããã¡ã€ã«ã«ä¿åããããã°ã©ã ã®å®è¡æã«ãããèªã¿èŸŒãããšããããŸããèšå®ãã¡ã€ã«ã¯ãããã°ã©ã ã®æ¯ãèããåäœãã«ã¹ã¿ãã€ãºããããã«äœ¿çšãããŸãã
;å€éšããŒã¿ã®ã€ã³ããŒããšãšã¯ã¹ããŒã:
:å€éšã®ããŒã¿ãä»ã®ã¢ããªã±ãŒã·ã§ã³ã§çæãããããŒã¿ãèªã¿èŸŒã¿ãJuliaã®ããã°ã©ã ã§äœ¿çšããããšããããŸãããŸããJuliaã§åŠçããããŒã¿ãä»ã®åœ¢åŒã«ãšã¯ã¹ããŒãããããšããããŸãã
;ãã¡ã€ã«ã®æäœãšç®¡ç:
:ãã¡ã€ã«ããã£ã¬ã¯ããªã®äœæãã³ããŒã移åãåé€ãªã©ããã¡ã€ã«ã·ã¹ãã ã®æäœãè¡ãããšããããŸããããã«ãããããã°ã©ã ããã¡ã€ã«ã·ã¹ãã äžã§ã®ããŒã¿ã®ç®¡çãè¡ãããšãã§ããŸãã
;倧èŠæš¡ããŒã¿ã®åŠç:
:倧èŠæš¡ãªããŒã¿ã»ããããã¡ã€ã«ããèªã¿èŸŒã¿ãåå²åŠçã䞊ååŠçãè¡ã£ãŠå¹ççã«åŠçããããšããããŸããJuliaã®äžŠååŠçæ©èœã掻çšããŠã倧èŠæš¡ãªããŒã¿ã»ãããå¹ççã«åŠçããããšãã§ããŸãã
ãããã®ãŠãŒã¹ã±ãŒã¹ã¯ãJuliaã®ãã¡ã€ã«I/Oæ©èœãåºã掻çšãããŠããäŸã§ããJuliaã®æè»ãªãã¡ã€ã«I/Oæ©èœã掻çšããããšã§ãããŸããŸãªããŒã¿åŠçããã¡ã€ã«æäœãå¹ççã«è¡ãããšãã§ããŸãã
===== ãã¹ããã©ã¯ãã£ã¹ =====
Juliaã§ãã¡ã€ã«ã®å
¥åºåïŒI/OïŒãè¡ãéã®ãã¹ããã©ã¯ãã£ã¹ã«ã¯ã以äžã®ãããªãã®ããããŸãã
# ãšã©ãŒãã³ããªã³ã°: ãã¡ã€ã«ã®èªã¿èŸŒã¿ãæžã蟌ã¿æã«ã¯ããšã©ãŒãã³ããªã³ã°ãé©åã«è¡ãããšãéèŠã§ãããã¡ã€ã«ãååšããªããã¢ã¯ã»ã¹æš©éããªãããŸãã¯ãã¡ã€ã«ãå£ããŠããå Žåãªã©ãããŸããŸãªãšã©ãŒãçºçããå¯èœæ§ããããŸãã<code>try-catch</code>ãããã¯ã䜿çšããŠãšã©ãŒããã£ããããé©åã«åŠçããããšãæšå¥šãããŸãã
# ãã¡ã€ã«ã®èªåã¯ããŒãº: ãã¡ã€ã«ã䜿çšãããå¿
ãã¯ããŒãºããããã«ããŸãããããã¡ã€ã«ãéããåŸã¯ãäœæ¥ãå®äºããã<code>close()</code>é¢æ°ã䜿çšããŠãã¡ã€ã«ãæ瀺çã«éããããšãéèŠã§ãããã¡ã€ã«ãéããªããŸãŸã«ããŠãããšããªãœãŒã¹ããªãŒã¯ããå¯èœæ§ããããŸãã
# ãã¡ã€ã«ãã¹ã®ç®¡ç: ãã¡ã€ã«ãã¹ã®ç®¡çã«ã¯æ³šæãå¿
èŠã§ãããã¡ã€ã«ãã¹ã¯ãã©ãããã©ãŒã ã«äŸåããããšããããŸãã®ã§ã<code>joinpath()</code>é¢æ°ã䜿çšããŠãã©ãããã©ãŒã ã«äŸåããªãæ¹æ³ã§ãã¡ã€ã«ãã¹ãæ§ç¯ããããšããå§ãããŸãã
# ããã¹ããã¡ã€ã«ãšãã€ããªãã¡ã€ã«ã®åºå¥: ããã¹ããã¡ã€ã«ãšãã€ããªãã¡ã€ã«ã§ã¯ãããŒã¿ã®æ±ãæ¹ãç°ãªããŸããããã¹ããã¡ã€ã«ã®å Žåã¯ã<code>readline()</code>ã<code>readlines()</code>é¢æ°ã䜿çšããŠè¡ããšã«èªã¿èŸŒã¿ãŸãããã€ããªãã¡ã€ã«ã®å Žåã¯ã<code>read()</code>é¢æ°ã䜿çšããŠãã€ãåäœã§èªã¿èŸŒã¿ãŸãã
# é«ã¬ãã«ãªãã¡ã€ã«æäœé¢æ°ã®äœ¿çš: é«ã¬ãã«ãªãã¡ã€ã«æäœé¢æ°ã䜿çšãããšãç°¡æœã§å¹ççãªã³ãŒããèšè¿°ããããšãã§ããŸããäŸãã°ãCSV.jlãJSON.jlãªã©ã®ããã±ãŒãžã䜿çšãããšãCSVãã¡ã€ã«ãJSONãã¡ã€ã«ã®èªã¿æžããç°¡åã«è¡ãããšãã§ããŸãã
ãããã®ãã¹ããã©ã¯ãã£ã¹ã«åŸãããšã§ãJuliaã§ã®ãã¡ã€ã«ã®å
¥åºåæäœãããå®å
šã§å¹ççã«è¡ãããšãã§ããŸãã
=== ã¢ãžã¥ãŒã« ===
Juliaã®ã¢ãžã¥ãŒã«ã¯ãã³ãŒãããŸãšããŠç®¡çããããã®æ©æ§ã§ãã以äžã¯ãJuliaã®ã¢ãžã¥ãŒã«ã«é¢ããäž»ãªãã€ã³ãã§ãïŒ
# åå空éã®å°å
¥: åã¢ãžã¥ãŒã«ã¯æ°ããã°ããŒãã«ã¹ã³ãŒããå°å
¥ããã¢ãžã¥ãŒã«å
ã®ååãå€éšãšç«¶åããªãããã«ããŸããããã«ãããç°ãªãã¢ãžã¥ãŒã«éã§åãååã䜿çšããããšãã§ããŸãã
# åå空éã®ç®¡ç: ã¢ãžã¥ãŒã«ã¯ã詳现ãªåå空éã®ç®¡çãå¯èœã«ããŸããã¢ãžã¥ãŒã«ã¯ãšã¯ã¹ããŒãããååã®ã»ãããå®çŸ©ããä»ã®ã¢ãžã¥ãŒã«ããååãã€ã³ããŒãã§ããŸãã
# ããªã³ã³ãã€ã«: ã¢ãžã¥ãŒã«ã¯ããªã³ã³ãã€ã«ããŠé«éãªèªã¿èŸŒã¿ãå¯èœã«ããå®è¡æã®åæåã³ãŒããå«ããããšãã§ããŸãã
# ãã¡ã€ã«ã®çµç¹å: ã¢ãžã¥ãŒã«ã¯éåžžããã¡ã€ã«ã«ãŸãšããŠç®¡çãããŸããããã¡ã€ã«åãšã¢ãžã¥ãŒã«åã¯äžè¬çã«ã¯é¢é£ä»ããããŠããŸããã1ã€ã®ã¢ãžã¥ãŒã«ã«è€æ°ã®ãã¡ã€ã«ãå«ãŸããå ŽåããéããããŸãã
# æ
£äŸ: ã¢ãžã¥ãŒã«ã®æ¬äœãã€ã³ãã³ãããªãããšãæšå¥šãããŠããŸããã¢ãžã¥ãŒã«åã«ã¯'''UpperCamelCase'''ã䜿çšãããã¢ãžã¥ãŒã«ãé¡äŒŒã®ååãå«ãå Žåã¯ååã®è¡çªãé¿ããããã«è€æ°åœ¢ã䜿çšãããããšããããŸãã
Juliaã®åå空é管çã«ã¯ã修食åããšã¯ã¹ããŒããªã¹ããç¹å®ã®èå¥åã®ã€ã³ããŒãããšã¯ã¹ããŒããªã©ã®æŠå¿µãå«ãŸããŸãïŒ
* 修食å: ã°ããŒãã«ã¹ã³ãŒãã®é¢æ°ãå€æ°ãåã®ååã¯ãã¹ãŠã¢ãžã¥ãŒã«ã«å±ããŸãã修食åã䜿çšãããšã芪ã¢ãžã¥ãŒã«ã®å€éšã§ãããã®ååãåç
§ã§ããŸãã
* ãšã¯ã¹ããŒããªã¹ã: ååã¯ã<code>export</code>ã䜿çšããŠã¢ãžã¥ãŒã«ã®ãšã¯ã¹ããŒããªã¹ãã«è¿œå ã§ããŸãããããã®ååã¯ãã¢ãžã¥ãŒã«ã䜿çšããéã«ã€ã³ããŒããããŸãããšã¯ã¹ããŒããªã¹ãã¯APIãæŽçããã®ã«åœ¹ç«ã¡ãŸãããJuliaã¯ã¢ãžã¥ãŒã«ã®å
éšãå®å
šã«é ãæ©èœãæäŸããŠããŸããã
* åç¬ã® <code>using</code> ãš <code>import</code>: <code>using ModuleName</code> ã¯ãã¢ãžã¥ãŒã«ã«é¢é£ããã³ãŒããèªã¿èŸŒã¿ãã¢ãžã¥ãŒã«åãšãšã¯ã¹ããŒããããèŠçŽ ãã°ããŒãã«åå空éã«å°å
¥ããŸãã <code>import .ModuleName</code> ã¯ãã¢ãžã¥ãŒã«åã ããã¹ã³ãŒãã«å°å
¥ããŸããè€æ°ã® <code>using</code> ãš <code>import</code> æãã«ã³ãåºåãã®åŒã§çµã¿åãããããšãã§ããŸãã
* <code>as</code> ã䜿ã£ãååã®å€æŽ: <code>import</code> ã <code>using</code> ã§å°å
¥ãããèå¥åã¯ã <code>as</code> ããŒã¯ãŒãã䜿çšããŠååãå€æŽã§ããŸããããã¯ãååã®ç«¶åãåé¿ããããååãççž®ãããããããã«åœ¹ç«ã¡ãŸãã
* ååã®ç«¶åã®åŠç: åãååããšã¯ã¹ããŒãããè€æ°ã®ããã±ãŒãžãååšããå Žåã競åãçºçããå¯èœæ§ããããŸãã解決çã«ã¯ã修食åã䜿çšãããèå¥åã®ååãå€æŽããããããã¯äžã€ã®ã¢ãžã¥ãŒã«ããå¥ã®ã¢ãžã¥ãŒã«ãžã®èå¥åã®ã€ã³ããŒããªã©ããããŸãã
Juliaã®ã¢ãžã¥ãŒã«ã·ã¹ãã ã¯ãæè»æ§ããããå¹æçãªåå空é管çæ©èœãæäŸããŠããŸãã
==== ã¢ãžã¥ãŒã«ã®å®çŸ©ãšäœ¿çš ====
Juliaã§ã®ã¢ãžã¥ãŒã«ã®å®çŸ©ãšäœ¿çšã®äŸã瀺ããŸãã
:<syntaxhighlight lang=julia>
# ã¢ãžã¥ãŒã«ã®å®çŸ©
module MyModule
# ãšã¯ã¹ããŒãããé¢æ°
export my_function
# é¢æ°ã®å®çŸ©
function my_function(x)
return x^2
end
end
# ã¢ãžã¥ãŒã«ã®äœ¿çš
# ã¢ãžã¥ãŒã«ãããŒã
using .MyModule
# ã¢ãžã¥ãŒã«å
ã®é¢æ°ãåŒã³åºã
result = MyModule.my_function(3)
println(result) # åºå: 9
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>MyModule</code> ãšããååã®ã¢ãžã¥ãŒã«ãå®çŸ©ãããã®äžã§ <code>my_function</code> ãšããé¢æ°ãå®çŸ©ããŠããŸãããã®åŸã<code>using .MyModule</code> ã䜿ã£ãŠã¢ãžã¥ãŒã«ãããŒããã<code>MyModule.my_function</code> ãåŒã³åºããŠããŸãã
==== ããã¥ã¡ã³ãæååïŒdocstringsïŒ ====
Juliaã§ã¯ãé¢æ°ãã¢ãžã¥ãŒã«ã®ããã¥ã¡ã³ããèšè¿°ããããã«ãããã¥ã¡ã³ãæååïŒdocstringsïŒã䜿çšããŸãã
ãããã®docstringsã¯ãé¢æ°ãã¢ãžã¥ãŒã«ã®å
é ã«é
眮ãããé¢æ°ã®æ©èœãåŒæ°ãè¿ãå€ã䜿çšäŸãªã©ã説æããŸãã
以äžã¯ãJuliaã®ããã¥ã¡ã³ãã®äŸã§ãã
:<syntaxhighlight lang=julia>
"""
add(x, y)
`x`ãš`y`ã®åãèšç®ããé¢æ°ã
# åŒæ°
- `x`: å ç®ããå€ã®1ã€ã
- `y`: å ç®ããå€ã®ãã1ã€ã
# æ»ãå€
åã®å€ãè¿ãã
"""
function add(x, y)
return x + y
end
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>MyModule</code> ãšããååã®ã¢ãžã¥ãŒã«ãå®çŸ©ãããã®äžã§ <code>my_function</code> ãšããé¢æ°ãå®çŸ©ããŠããŸãããã®åŸã<code>using .MyModule</code> ã䜿ã£ãŠã¢ãžã¥ãŒã«ãããŒããããã®ããã«ããŠãé¢æ°ã®å®çŸ©ã®çŽåã«ã3é£ã®ããã«ã¯ã©ãŒãã§å²ãŸããããã¥ã¡ã³ãæååãèšè¿°ããŸããããã«ãããé¢æ°<code>add</code>ã®äœ¿ãæ¹ãæ©èœãæ確ã«èª¬æãããŸãã
ããã¥ã¡ã³ãæååã¯ãMarkdownãLaTeXã®äžéšã®æžåŒããµããŒãããããèŠããããèªã¿ãããããã¥ã¡ã³ããæäŸããŸããJuliaã®REPLããã«ãã·ã¹ãã ã¯ããããã®ããã¥ã¡ã³ãæååã䜿çšããŠé¢æ°ãã¢ãžã¥ãŒã«ã®ããã¥ã¡ã³ãã衚瀺ããŸãã
===== ããã¥ã¡ã³ãã®æºåãšçæ =====
Documenter.jlã¯ãJuliaã®ããã¥ã¡ã³ãäœæã®ããã®ããŒã«ã§ããMarkdownãã¡ã€ã«ãšJuliaã®ã€ã³ã©ã€ã³docstringsãçµã¿åãããŠã1ã€ã®çžäºã«ãªã³ã¯ãããããã¥ã¡ã³ãã«ãŸãšããŸãã
====== ã€ã³ã¹ããŒã« ======
Juliaã®ããã±ãŒãžãããŒãžã£ãŒã䜿çšããŠDocumenter.jlãã€ã³ã¹ããŒã«ããŸãã
:<syntaxhighlight lang=julia>
using Pkg
Pkg.add("Documenter")
</syntaxhighlight>
====== ãã©ã«ããŒæ§é ã®ã»ããã¢ãã ======
DocumenterãæåŸ
ããåºæ¬æ§é ãçæããããã«ãDocumenterToolsããã±ãŒãžã®<code>DocumenterTools.generate</code>é¢æ°ã䜿çšã§ããŸãã
ãŸããããã¥ã¡ã³ãåããJuliaã¢ãžã¥ãŒã«ãå¿
èŠã§ããããã¯ãPkgDev.generateã§çæãããããã±ãŒãžãŸãã¯Juliaã®LOAD_PATHã§ã¢ã¯ã»ã¹å¯èœãªåäžã®.jlã¹ã¯ãªããã§ããå¿
èŠããããŸãããã®ã¬ã€ãã§ã¯ã次ã®ãã£ã¬ã¯ããªã¬ã€ã¢ãŠããæã€Example.jlãšããããã±ãŒãžã䜿çšããŸãã
:<syntaxhighlight lang=text>
Example/
â src/
â Example.jl
</syntaxhighlight>
ããã¥ã¡ã³ããæ ŒçŽããå Žæã決å®ããå¿
èŠããããŸãããã®ããã±ãŒãžã®ãããã¬ãã«ã«docs/ãšããååã®ãã©ã«ããŒã䜿çšããããšãæšå¥šãããŸãã
:<syntaxhighlight lang=text>
Example/
â src/
ââ Example.jl
â docs/
â ...
</syntaxhighlight>
docs/ãã©ã«ããŒå
ã«ã¯ã2ã€ã®èŠçŽ ãè¿œå ããå¿
èŠããããŸããMarkdownãã¡ã€ã«ãå«ãŸããå®æããããã¥ã¡ã³ãã®æ§ç¯ã«äœ¿çšãããJuliaã¹ã¯ãªããã§ãã
:<syntaxhighlight lang=text>
Example/
â src/
ââ Example.jl
â docs/
ââ ...
â make.jl
</syntaxhighlight>
====== 空ã®ããã¥ã¡ã³ãã®ãã«ã ======
docs/ãã£ã¬ã¯ããªãã»ããã¢ãããããã®ã§ãæåã®ããã¥ã¡ã³ãããã«ãããŸãããã®æç¹ã§ã¯åäžã®ç©ºã®ãã¡ã€ã«ã§ãããåŸã§è¿œå ããŠãããŸãã
make.jlãã¡ã€ã«ã«ä»¥äžãè¿œå ããŸãã
:<syntaxhighlight lang=julia>
using Documenter, Example
makedocs(sitename="My Documentation")
</syntaxhighlight>
ããã«ãããDocumenterãã€ã³ã¹ããŒã«ãããŠããããšãšãExample.jlããã±ãŒãžãJuliaã«ãã£ãŠèŠã€ããããšãåæãšãªããŸãã
次ã«ãsrc/ãã£ã¬ã¯ããªã«index.mdãã¡ã€ã«ãè¿œå ããŸãã
ãã®åŸãdocs/ãã£ã¬ã¯ããªãã次ã®ã³ãã³ããå®è¡ããŸãã
:<syntaxhighlight lang=shell>
$ julia --project make.jl
</syntaxhighlight>
ããã«ãããbuild/ãã£ã¬ã¯ããªãçæãããŸãã
====== ããã¥ã¡ã³ãæååã®è¿œå ======
次ã«ãExampleã¢ãžã¥ãŒã«ã§å®çŸ©ãããããã¥ã¡ã³ãæååãindex.mdãã¡ã€ã«ã«çµã¿èŸŒã¿ãŸãã
:<syntaxhighlight lang=julia>
module Example
export func
"""
func(x)
æ°å€ `x` ã®2åã«1ãå ãããã®ãè¿ããŸãã
"""
func(x) = 2x + 1
</syntaxhighlight>
src/index.mdãã¡ã€ã«ã«æ¬¡ãè¿œå ããŸãã
:<syntaxhighlight lang=md>
# Example.jl Documentation
```@docs
func(x)
</syntaxhighlight>
====== ããã¥ã¡ã³ãã®çæ ======
make.jlãã¡ã€ã«ãåå®è¡ãããšãbuild/index.mdã«Example.func(x)ã®ããã¥ã¡ã³ãæååã衚瀺ãããã¯ãã§ãã
===ããŒã¿è§£æãšå¯èŠå===
DataFrames.jlãPlots.jlãªã©ã®ããã±ãŒãžã䜿ã£ãŠããŒã¿è§£æãå¯èŠåãè¡ãæ¹æ³ãåŠã³ãŸããããŒã¿è§£æãšå¯èŠåã¯Juliaã®åŒ·åãªæ©èœã®äžã€ã§ããããããã®ããã±ãŒãžã䜿çšããããšã§ããŒã¿ãå¹æçã«åæããå¯èŠåããããšãã§ããŸããããŒã¿ã®ãã¿ãŒã³ããã¬ã³ããçºèŠããæŽå¯ãåŸãããã«å¿
èŠãªã¹ãã«ã身ã«ã€ããŸãããã
== äžçŽç·š ==
=== ããã±ãŒãžã®ç®¡ç ===
Juliaã®ããã±ãŒãžã¯ãJuliaããã°ã©ãã³ã°èšèªã®æ©èœãæ©èœæ¡åŒµãæäŸããããã®ã³ãŒãããªãœãŒã¹ã®éåäœã§ãããããã®ããã±ãŒãžã¯ãJuliaã®æ©èœãæ¡åŒµããç¹å®ã®ã¿ã¹ã¯ãã¢ããªã±ãŒã·ã§ã³ã®éçºãæ¯æŽããŸããJuliaã®ããã±ãŒãžã¯ãé¢æ°ãåãã¢ãžã¥ãŒã«ãããŒã¿ã»ãããããã°ã©ã ãããã³ãã®ä»ã®ãªãœãŒã¹ãæäŸããããšããããŸãã
äžè¬çãªçšéã«ã¯ãããŒã¿è§£æãæ©æ¢°åŠç¿ãç§åŠèšç®ãã°ã©ãã£ã«ã«ãŠãŒã¶ãŒã€ã³ã¿ãŒãã§ã€ã¹ïŒGUIïŒããŠã§ãã¢ããªã±ãŒã·ã§ã³éçºãªã©ãå«ãŸããŸãããããã®ããã±ãŒãžã¯ãJuliaã®è±å¯ãªãšã³ã·ã¹ãã ã®äžéšã§ãããã³ãã¥ããã£ã«ãã£ãŠéçºã管çãããŠããŸãã
Juliaã®ããã±ãŒãžç®¡çã·ã¹ãã ã§ãã'''Pkg'''ã䜿çšããããšã§ãJuliaã®æ©èœãæ¡åŒµããããã®ããã±ãŒãžã®ã€ã³ã¹ããŒã«ã管çãè¡ãããšãã§ããŸããããã±ãŒãžã¯ãããŸããŸãªã¿ã¹ã¯ãã¢ããªã±ãŒã·ã§ã³ã®éçºã«åœ¹ç«ã¡ãŸãããã®ã»ã¯ã·ã§ã³ã§ã¯ãPkgã䜿çšããŠããã±ãŒãžãå¹æçã«ç®¡çããæ¹æ³ã«ã€ããŠèª¬æããŸãã
==== ããã±ãŒãžã®ã€ã³ã¹ããŒã« ====
æ°ããããã±ãŒãžãã€ã³ã¹ããŒã«ããã«ã¯ã以äžã®æé ã«åŸããŸãã
# Juliaã®REPLïŒRead-Eval-Print LoopïŒãéããŸãã
# <code>]</code> ãå
¥åããŠã'''Pkgã¢ãŒã'''ã«åãæ¿ããŸãã
#:<syntaxhighlight lang=julia-repl>
(@v1.10) pkg> _
</syntaxhighlight>
#:<code>add PackageName</code> ãå
¥åããŠãå¿
èŠãªããã±ãŒãžãã€ã³ã¹ããŒã«ããŸãã
#:ããšãã°ãDataFramesããã±ãŒãžãã€ã³ã¹ããŒã«ããã«ã¯ã以äžã®ããã«å
¥åããŸãã
#*<syntaxhighlight lang=julia-repl>
(@v1.10) pkg> add DataFrames
</syntaxhighlight>
==== ããã±ãŒãžã®ã¢ããããŒã ====
ã€ã³ã¹ããŒã«ãããŠããããã±ãŒãžãææ°ã®ããŒãžã§ã³ã«ã¢ããããŒãããã«ã¯ã以äžã®æé ã«åŸããŸãã
<code>update</code> ã³ãã³ããå
¥åããŠããã¹ãŠã®ããã±ãŒãžãã¢ããããŒãããŸãã
:*<syntaxhighlight lang=julia-repl>
(@v1.10) pkg> update
</syntaxhighlight>
====ããã±ãŒãžã®åé€====
äžèŠãªããã±ãŒãžãåé€ããã«ã¯ã以äžã®æé ã«åŸããŸãã
<code>rm PackageName</code> ãå
¥åããŠãåé€ãããããã±ãŒãžãæå®ããŸãã
:*<syntaxhighlight lang=julia-repl>
(@v1.10) pkg> rm PackageName
</syntaxhighlight>
==== ããã±ãŒãžã®æ€çŽ¢ ====
å©çšå¯èœãªããã±ãŒãžãæ€çŽ¢ããã«ã¯ã以äžã®æé ã«åŸããŸãã
<code>search Keyword</code> ãå
¥åããŠãããŒã¯ãŒãã«äžèŽããããã±ãŒãžãæ€çŽ¢ããŸãã
:*<syntaxhighlight lang=julia-repl>
(@v1.10) pkg> search Keyword
</syntaxhighlight>
====ããã±ãŒãžã®æ
å ±ã®è¡šç€º====
ã€ã³ã¹ããŒã«ãããŠããããã±ãŒãžã®æ
å ±ã衚瀺ããã«ã¯ã以äžã®æé ã«åŸããŸãã
<code>status</code> ã³ãã³ããå
¥åããŠãã€ã³ã¹ããŒã«ãããŠããããã±ãŒãžã®äžèŠ§ãšããããã®ããŒãžã§ã³ã衚瀺ããŸãã
:*<syntaxhighlight lang=julia-repl>
(@v1.10) pkg> status
</syntaxhighlight>
ãããã®æäœãéããŠãJuliaã®ããã±ãŒãžãå¹æçã«ç®¡çãããããžã§ã¯ãã®éçºãåæ»ã«é²ããããšãã§ããŸãã
Juliaã®ããã±ãŒãžãšã³ã·ã¹ãã ã¯éåžžã«è±å¯ã§ãããããŸããŸãªããŒãºã«å¯Ÿå¿ã§ããããã±ãŒãžãæäŸãããŠããŸãã
====Pkgã®ãµãã³ãã³ãäžèŠ§====
Juliaã®ããã±ãŒãžç®¡çã·ã¹ãã ã§ããPkgã¯ãREPLïŒRead-Eval-Print LoopïŒã¢ãŒããæäŸããŠããŸãããã®ã¢ãŒãã§ã¯ãããã±ãŒãžã®ã€ã³ã¹ããŒã«ãæŽæ°ãåé€ãªã©ã®æäœãè¡ããŸãã以äžã«ãPkgã®äž»ãªã³ãã³ããšãã®æ©èœã瀺ããŸãã
* <code>activate</code>: ããã±ãŒãžãããŒãžã£ãæäœãããã©ã€ããªç°å¢ãèšå®ããŸãã
* <code>add</code>: ãããžã§ã¯ãã«ããã±ãŒãžãè¿œå ããŸãã
* <code>build</code>: ããã±ãŒãžã®ãã«ãã¹ã¯ãªãããå®è¡ããŸãã
* <code>compat</code>: çŸåšã®ãããžã§ã¯ãã®compatãšã³ããªãç·šéããå床解決ããŸãã
* <code>develop</code>ãŸãã¯<code>dev</code>: éçºçšã«ããã±ãŒãžã®å®å
šãªãªããžããªãããŒã«ã«ã«ã¯ããŒã³ããŸãã
* <code>free</code>: ãã³ãdevelopããŸãã¯ãªããžããªã®è¿œè·¡ãåæ¢ããŸãã
* <code>gc</code>: äžå®æé䜿çšãããŠããªãããã±ãŒãžãã¬ããŒãžã³ã¬ã¯ãããŸãã
* <code>generate</code>: æ°ãããããžã§ã¯ãã®ãã¡ã€ã«ãçæããŸãã
* <code>help</code>ãŸãã¯<code>?</code>: ãã«ãã¡ãã»ãŒãžã衚瀺ããŸãã
* <code>instantiate</code>: ãããžã§ã¯ãã®äŸåé¢ä¿ããã¹ãŠããŠã³ããŒãããŸãã
* <code>pin</code>: ããã±ãŒãžã®ããŒãžã§ã³ããã³çãããŸãã
* <code>precompile</code>: ãããžã§ã¯ãã®ãã¹ãŠã®äŸåé¢ä¿ãäºåã³ã³ãã€ã«ããŸãã
* <code>redo</code>: ã¢ã¯ãã£ããªãããžã§ã¯ãã®ææ°ã®å€æŽãããçŽããŸãã
* <code>remove</code>ãŸãã¯<code>rm</code>: ãããžã§ã¯ããŸãã¯ãããã§ã¹ãããããã±ãŒãžãåé€ããŸãã
* <code>resolve</code>: éçºäžã®ããã±ãŒãžã®äŸåé¢ä¿ã®å€æŽãããããã§ã¹ããæŽæ°ããŸãã
* <code>status</code>ãŸãã¯<code>st</code>: ç°å¢ã®å
容ãšå€æŽã®èŠçŽã衚瀺ããŸãã
* <code>test</code>: ããã±ãŒãžã®ãã¹ããå®è¡ããŸãã
* <code>undo</code>: ã¢ã¯ãã£ããªãããžã§ã¯ãã®ææ°ã®å€æŽãå
ã«æ»ããŸãã
* <code>update</code>ãŸãã¯<code>up</code>: ãããã§ã¹ãå
ã®ããã±ãŒãžãæŽæ°ããŸãã
* <code>why</code>: ããã±ãŒãžããããã§ã¹ãã«å«ãŸããçç±ã衚瀺ããŸãã
ããã«ãããã±ãŒãžã¬ãžã¹ããªã«é¢é£ããã³ãã³ãããããŸãã
* <code>registry add</code>: ããã±ãŒãžã¬ãžã¹ããªãè¿œå ããŸãã
* <code>registry remove</code>ãŸãã¯<code>rm</code>: ããã±ãŒãžã¬ãžã¹ããªãåé€ããŸãã
* <code>registry status</code>ãŸãã¯<code>st</code>: ã€ã³ã¹ããŒã«ãããŠããããã±ãŒãžã¬ãžã¹ããªã«é¢ããæ
å ±ã衚瀺ããŸãã
* <code>registry update</code>ãŸãã¯<code>up</code>: ããã±ãŒãžã¬ãžã¹ããªãæŽæ°ããŸãã
ãããã®ã³ãã³ãã䜿çšããŠãJuliaã®ããã±ãŒãžãå¹æçã«ç®¡çã§ããŸãã
====ãã«ã====
<code>?</code>ãŸãã¯<code>help</code>ã³ãã³ãã¯ãå©çšå¯èœãªã³ãã³ããšããããã®ç°¡åãªèª¬æã衚瀺ããŸããããã¯ãPkgã®ã³ãã³ããç解ããããã®äŸ¿å©ãªæ¹æ³ã§ãã
以äžã«ã<code>?</code>ãŸãã¯<code>help</code>ã³ãã³ãã®äœ¿çšæ¹æ³ã瀺ããŸãã
# <code>?</code>ãŸãã¯<code>help</code>ãå
¥åãããšãå©çšå¯èœãªãã¹ãŠã®ã³ãã³ããšããããã®ç°¡åãªèª¬æã衚瀺ãããŸãã
#; äŸ:
#:<syntaxhighlight lang=julia-repl>
(@v1.10) pkg> ?
</syntaxhighlight>
#:: ãŸãã¯
#:<syntaxhighlight lang=julia-repl>
(@v1.10) pkg> help
</syntaxhighlight>
# ç¹å®ã®ã³ãã³ãã«é¢ãã詳现ãªãã«ãã衚瀺ããã«ã¯ã<code>?</code>ãŸãã¯<code>help</code>ã®åŸã«ã³ãã³ãåãå
¥åããŸãã
#; äŸ:
#:<syntaxhighlight lang=julia-repl>
(@v1.10) pkg> ? add
</syntaxhighlight>
#:: ãŸãã¯
#:<syntaxhighlight lang=julia-repl>
(@v1.10) pkg> help add
</syntaxhighlight>
ãã®ããã«ããŠã<code>?</code>ãŸãã¯<code>help</code>ã³ãã³ãã䜿çšããããšã§ãPkgã®ã³ãã³ããå¹æçã«ç解ããå©çšã§ããŸãã
===é«åºŠãªããŒã¿æ§é ãšã¢ã«ãŽãªãºã ===
é«åºŠãªããŒã¿æ§é ãšã¢ã«ãŽãªãºã ã¯ãè€éãªåé¡ã解決ããããã®äžå¯æ¬ ãªããŒã«ã§ããã°ã©ããæšæ§é ãããŒããªã©ã®ããŒã¿æ§é ã¯ãããŒã¿ã®çµç¹åãšå¹ççãªæäœãå¯èœã«ããæ§ã
ãªã¢ããªã±ãŒã·ã§ã³ãåéã§åºã掻çšãããŠããŸããJuliaã®æè»ãªèšèªæ©èœã掻çšããŠããããã®ããŒã¿æ§é ãšã¢ã«ãŽãªãºã ãå®è£
ããåé¡ãå¹ççã«è§£æ±ºããæ¹æ³ãåŠã³ãŸãããã
====ã°ã©ã====
ã°ã©ãã¯ãé ç¹ïŒããŒãïŒãšããããæ¥ç¶ãã蟺ïŒãšããžïŒããæ§æãããããŒã¿æ§é ã§ããã°ã©ãã¯ãçŸå®äžçã®ããŸããŸãªãããã¯ãŒã¯ãé¢ä¿æ§ãã¢ãã«åããããã«åºã䜿çšãããŠããŸãããœãŒã·ã£ã«ãããã¯ãŒã¯ãçµè·¯èšç»ã亀éãããã¯ãŒã¯ãéä¿¡ãããã¯ãŒã¯ãªã©ãå€ãã®åé¡ãã°ã©ããšããŠè¡šçŸãããŸãã
;ã°ã©ãã®çš®é¡
:æåã°ã©ãïŒDirected GraphïŒ
: ãšããžã«åããããã°ã©ãã§ãé ç¹éã®æ¥ç¶ãäžæ¹åã§ãã
:äŸãã°ãTwitterã®ãã©ããŒã°ã©ãã¯æåã°ã©ããšããŠã¢ãã«åã§ããŸãã
;ç¡åã°ã©ãïŒUndirected GraphïŒ
: ãšããžã«åãããªãã°ã©ãã§ãé ç¹éã®æ¥ç¶ãåæ¹åã§ãã
:äŸãã°ãFacebookã®å人é¢ä¿ã¯ç¡åã°ã©ããšããŠè¡šçŸã§ããŸãã
;éã¿ä»ãã°ã©ãïŒWeighted GraphïŒ
: ãšããžã«éã¿ãä»ããŠããã°ã©ãã§ãé ç¹éã®æ¥ç¶ã«ã³ã¹ããè·é¢ãé¢é£ä»ããããŸãã
:亀éãããã¯ãŒã¯ãç©æµãããã¯ãŒã¯ãã¢ãã«åããã®ã«äœ¿çšãããŸãã
;ã°ã©ãã¢ã«ãŽãªãºã
:ã°ã©ãã®æ§é ãç解ããå¹ççãªåé¡è§£æ±ºã®ããã«ä»¥äžã®åºæ¬çãªã¢ã«ãŽãªãºã ãå®è£
ããããšãéèŠã§ãã
:;å¹
åªå
æ¢çŽ¢ïŒBreadth-First Search, BFSïŒ: ã°ã©ãå
ã®ããŒããã¬ãã«ããšã«æ¢çŽ¢ããŠãæççµè·¯ãèŠã€ããã¢ã«ãŽãªãºã ã§ãããã¥ãŒã䜿çšããŠå®è£
ãããŸãã
:;æ·±ãåªå
æ¢çŽ¢ïŒDepth-First Search, DFSïŒ: ã°ã©ãã®ææ·±éšãŸã§æãäžããŠããæ»ãããšã§æ¢çŽ¢ããã¢ã«ãŽãªãºã ã§ããååž°ãŸãã¯ã¹ã¿ãã¯ã䜿çšããŠå®è£
ãããŸãã
:;æççµè·¯ã¢ã«ãŽãªãºã ïŒShortest Path AlgorithmsïŒ: äžããããã°ã©ãå
ã®æççµè·¯ãèŠã€ããã¢ã«ãŽãªãºã ã§ãã代衚çãªãã®ãšããŠãã€ã¯ã¹ãã©æ³ããã«ãã³ãã©ãŒãæ³ããããŸãã
:;æå°å
šåæšïŒMinimum Spanning Tree, MSTïŒ: ã°ã©ãå
ã®å
šãŠã®é ç¹ãå«ã¿ãå
šãŠã®èŸºã®éã¿ã®åèšãæå°ã«ãªãæšãèŠã€ããã¢ã«ãŽãªãºã ã§ããããªã æ³ãã¯ã©ã¹ã«ã«æ³ããããŸãã
ãããã®ã¢ã«ãŽãªãºã ãç解ããé©åãªåé¡ã«é©çšããããšã§ãå¹ççãªã°ã©ãã®æäœã解æãå¯èœã«ãªããŸãã
====æšæ§é ====
æšæ§é ã¯ãéå±€çãªããŒã¿ãè¡šçŸããããã®ããŒã¿æ§é ã§ãããã«ãŒãããŒãããå§ãŸããåããŒããæåããããŠãã圢ãããŠããŸããæšæ§é ã¯ãå€ãã®åéã§äœ¿çšãããéå±€çãªé¢ä¿æ§ãååž°çãªããŒã¿ã®è¡šçŸã«é©ããŠããŸãã代衚çãªçšéãšããŠã¯ããã¡ã€ã«ã·ã¹ãã ãããŒã¿ããŒã¹ã®çŽ¢åŒãååž°çãªã¢ã«ãŽãªãºã ã®å®è£
ãªã©ãæããããŸãã
;æšæ§é ã®ç¹åŸŽ
:;ã«ãŒãããŒãïŒRoot NodeïŒ: æšæ§é ã®æäžäœã«äœçœ®ããããŒãã§ãä»ã®ãã¹ãŠã®ããŒããžã®çµè·¯ãååšããŸãã
芪ããŒããšåããŒãïŒParent and Child NodesïŒ: 芪ããŒãã¯ãçŽäžã«1ã€ä»¥äžã®åããŒããæã€ããŒãã§ããåããŒãã¯ã芪ããŒãã®äžã«é
眮ããããã®èŠªããŒãã«é¢é£ä»ããããŸãã
:;æåããïŒBranchingïŒ: åããŒããè€æ°ããå Žåãããããã®åããŒããžã®çµè·¯ãæåããããŸããããã«ãããè€æ°ã®ãã¹ãå¯èœãšãªããŸãã
:;èããŒãïŒLeaf NodeïŒ: åãæããªãæ«ç«¯ã®ããŒãã§ãããæåããããªãããŒãã§ãã
;代衚çãªæšæ§é
:;äºåæšïŒBinary TreeïŒ: åããŒããæ倧2ã€ã®åããŒããæã€æšæ§é ã§ããäºåæ¢çŽ¢æšïŒBinary Search TreeïŒã¯ãäºåæšã®äžçš®ã§ãå·Šã®åããŒãã®å€ã芪ããŒãããå°ãããå³ã®åããŒãã®å€ã芪ããŒããã倧ãããšããæ¡ä»¶ãæºãããŸãã
:;èµ€é»æšïŒRed-Black TreeïŒ: äºåæ¢çŽ¢æšã®äžçš®ã§ãç¹å®ã®æ¡ä»¶ïŒèµ€é»ã®è²ä»ããšãã©ã³ã¹æ¡ä»¶ïŒãæºããããšã§ãæäœã®å¹çæ§ãä¿ã€ããšãã§ããããŒã¿æ§é ã§ããæ¿å
¥ãåé€ã®æäœãæ¯èŒçé«éã§ããããšãç¹åŸŽã§ãã
:;AVLæš: äºåæ¢çŽ¢æšã®äžçš®ã§ãé«ãã®ãã©ã³ã¹ãä¿ã€ããã®æ¡ä»¶ãå³å¯ã«å®çŸ©ãããŠããŸããæ¿å
¥ãåé€ã®éã«å転æäœãè¡ãããšã§ãåžžã«ãã©ã³ã¹ãä¿ãããŸãã
;æšæ§é ã®æäœ
:æšæ§é ãæäœããéã«ã¯ã以äžã®ãããªåºæ¬çãªæäœãå¿
èŠã§ãã
:*ããŒãã®æ¿å
¥
:*ããŒãã®åé€
:*ããŒãã®æ€çŽ¢
:*æšã®èµ°æ»ïŒæ·±ãåªå
æ¢çŽ¢ãå¹
åªå
æ¢çŽ¢ãªã©ïŒ
ãããã®æäœãç解ããé©åã«å®è£
ããããšã§ãæšæ§é ãå¹æçã«æŽ»çšããããšãã§ããŸãã
====ããŒã====
ããŒãã¯ãåªå
床ä»ããã¥ãŒãå®è£
ããããã®ããŒã¿æ§é ã§ãããæå°å€ãæ倧å€ãé«éã«ååŸããããšãã§ããŸããããŒãã¯ãåªå
床ä»ããã¥ãŒã®æäœãå¹ççã«è¡ãããã«èšèšãããŠããããã€ã¯ã¹ãã©æ³ãããŒããœãŒããªã©ã®ã¢ã«ãŽãªãºã ã§åºã䜿çšãããŠããŸãã
===== ããŒãã®ç¹åŸŽ =====
# å®å
šäºåæšã®æ§è³ª: ããŒãã¯ãå®å
šäºåæšãšããŠè¡šçŸãããŸããå®å
šäºåæšãšã¯ããã¹ãŠã®ããŒããå·Šããå³ãžãšåãŸã£ãŠãããæåŸã®ã¬ãã«ãé€ããŠãã¹ãŠã®ã¬ãã«ãå®å
šã«åãŸã£ãŠããæšæ§é ã§ãã
# æå°ããŒããšæ倧ããŒã: ããŒãã¯ãæå°å€ãæã€ããŒããã«ãŒãã«é
眮ãããå Žåãæå°ããŒããæ倧å€ãæã€ããŒããã«ãŒãã«é
眮ãããå Žåãæ倧ããŒããšåŒã³ãŸãã
# 芪ããŒããšåããŒãã®é¢ä¿: ããŒãã®åããŒãã¯ããã®èŠªããŒããããåªå
床ãé«ããäœããã«å¿ããŠé
眮ãããŸããæå°ããŒãã§ã¯ã芪ããŒãã®å€ãåããŒãã®å€ãããå°ããããšãä¿èšŒãããŸããæ倧ããŒãã§ã¯ãã®éã§ãã
===== ããŒãã®æäœ =====
ããŒãã¯ã以äžã®æäœããµããŒãããŸãã
# æ¿å
¥ïŒInsertionïŒ: ããŒãã«æ°ããèŠçŽ ãè¿œå ããæäœã§ããæ°ããèŠçŽ ã¯ãããŒãã®æ«å°Ÿã«è¿œå ãããé©åãªäœçœ®ã«åé
眮ãããŸãã
# åé€ïŒDeletionïŒ: ããŒãããæå°å€ïŒãŸãã¯æ倧å€ïŒãåãåºãæäœã§ããåãåºãããèŠçŽ ã¯ãããŒãã®æåŸã®èŠçŽ ãšäº€æãããé©åãªäœçœ®ã«åé
眮ãããŸãã
# æå°å€ïŒæ倧å€ïŒã®ååŸ: ããŒãããæå°å€ïŒãŸãã¯æ倧å€ïŒãååŸããæäœã§ããæå°å€ïŒãŸãã¯æ倧å€ïŒã¯åžžã«ããŒãã®ã«ãŒãã«é
眮ãããŠãããããããŒãã®ã«ãŒãèŠçŽ ãååŸããããšã§è¡ãããŸãã
# ããŒãã®æ§ç¯: äžããããèŠçŽ ã®éåããããŒããæ§ç¯ããæäœã§ããããã«ãããã©ã³ãã ãªèŠçŽ ã®éåãããŒããšããŠæ±ãããšãã§ããŸãã
===== ããŒãã®å®è£
=====
ããŒãã¯ãéåžžãé
åã䜿çšããŠå®è£
ãããŸããé
åã®ã€ã³ããã¯ã¹ã䜿çšããŠããŒãéã®èŠªåé¢ä¿ãè¡šçŸããèŠçŽ ã®æ¿å
¥ãåé€ãå¹ççã«è¡ãããŸããæå°ããŒãã®å Žåã芪ããŒãã®ã€ã³ããã¯ã¹ã <code>i</code> ãšãããšãå·Šã®åããŒãã®ã€ã³ããã¯ã¹ã¯ <code>2i + 1</code>ãå³ã®åããŒãã®ã€ã³ããã¯ã¹ã¯ <code>2i + 2</code> ãšãªããŸãã
ããŒãã¯ãå¹ççãªåªå
床ä»ããã¥ãŒã®å®è£
ãšããŠåºã䜿çšãããå€ãã®ã¢ã«ãŽãªãºã ãããŒã¿æ§é ã«ãããŠéèŠãªåœ¹å²ãæãããŠããŸãã
====ã¢ã«ãŽãªãºã ã®å®è£
====
ãããã®ããŒã¿æ§é ãç解ãããããããã䜿çšããããŸããŸãªã¢ã«ãŽãªãºã ãå®è£
ããããšãã§ããŸããäŸãã°ãã°ã©ãæ¢çŽ¢ã¢ã«ãŽãªãºã ãæççµè·¯æ¢çŽ¢ã¢ã«ãŽãªãºã ããœãŒãã¢ã«ãŽãªãºã ãªã©ããããŸãããããã®ã¢ã«ãŽãªãºã ã¯ãåé¡ã®æ§è³ªã«å¿ããŠé©åã«éžæãããå®è£
ãããå¿
èŠããããŸãã
;ããã°ã©ã äŸ
:以äžã¯ãJuliaã§äºåæšãå®è£
ããäŸã§ãã
:<syntaxhighlight lang=julia>
struct TreeNode{T}
value::T
left::Union{TreeNode{T}, Nothing}
right::Union{TreeNode{T}, Nothing}
end
function insert!(node::Union{TreeNode{T}, Nothing}, value::T) where T
if node === nothing
return TreeNode(value, nothing, nothing)
elseif value < node.value
node.left = insert!(node.left, value)
else
node.right = insert!(node.right, value)
end
return node
end
function search(node::Union{TreeNode{T}, Nothing}, value::T) where T
if node === nothing
return false
elseif value == node.value
return true
elseif value < node.value
return search(node.left, value)
else
return search(node.right, value)
end
end
# äºåæšã®äœæãšæäœã®äŸ
root = nothing
root = insert!(root, 5)
root = insert!(root, 3)
root = insert!(root, 8)
println(search(root, 3)) # true
println(search(root, 7)) # false
</syntaxhighlight>
ããã¯ãåºæ¬çãªäºåæšã®å®è£
ãšãããŒãã®æ¿å
¥ãšæ€çŽ¢ã®æ¹æ³ã瀺ããŠããŸãããããã®åºæ¬çãªããŒã¿æ§é ãšã¢ã«ãŽãªãºã ãç解ããããšã§ãããŸããŸãªåé¡ã解決ããããã®åºç€ãç¯ãããšãã§ããŸãã
=== 䞊ååŠçãšåæ£åŠç ===
Juliaã®äžŠååŠçæ©èœã掻çšããŠãåŠçã䞊ååããæ¹æ³ãåŠã³ãŸãã䞊ååŠçã¯ãèšç®ãé«éåãã倧èŠæš¡ãªåé¡ãå¹ççã«è§£æ±ºããããã®éèŠãªææ³ã§ãããŸããåæ£åŠçãéããŠè€æ°ã®èšç®è³æºãå¹æçã«æŽ»çšããæ¹æ³ãåŠã³ãŸãã
=== æ°å€èšç®ãšæé©å ===
æ°å€èšç®ãæé©ååé¡ã解ãããã®ããã±ãŒãžã䜿çšããŠãæ°å€èšç®ãšæé©åã®æè¡ãåŠã³ãŸããæ°å€èšç®ã¯ç§åŠæè¡èšç®ããšã³ãžãã¢ãªã³ã°ãªã©ã®ããŸããŸãªåéã§éèŠãªåœ¹å²ãæãããŸãããŸããæé©åã¯åé¡ã®æé©ãªè§£ãèŠã€ããããã®éèŠãªææ³ã§ãã
=== æ©æ¢°åŠç¿ ===
Flux.jlãMLJ.jlãªã©ã®æ©æ¢°åŠç¿ã©ã€ãã©ãªã䜿çšããŠãæ©æ¢°åŠç¿ã¢ãã«ãå®è£
ããããŒã¿ã«å¯ŸããŠåŠç¿ãããæ¹æ³ãåŠã³ãŸããæ©æ¢°åŠç¿ã¯ããŒã¿è§£æãäºæž¬ã¢ããªã³ã°ãªã©ã®æ§ã
ãªã¿ã¹ã¯ã§å©çšãããçŸä»£ã®æè¡ãããžãã¹ã«ãããŠéèŠãªåœ¹å²ãæãããŠããŸããJuliaã®è±å¯ãªããã±ãŒãžã掻çšããŠãæ©æ¢°åŠç¿ã®ã¹ãã«ã磚ããŸãããã
ââââ
=== ç·åœ¢ä»£æ°æŒç® ===
Juliaã®<code>LinearAlgebra</code>ã¢ãžã¥ãŒã«ã¯ãç·åœ¢ä»£æ°ã®åºæ¬çãªæ©èœãæäŸããŠããŸããå
·äœçã«ã¯ããã¯ãã«ãè¡åã®æŒç®ãåºæå€ãåºæãã¯ãã«ã®èšç®ãçè¡åã®æäœãLUå解ãQRå解ãªã©ãå©çšå¯èœã§ãã
Juliaã®<code>LinearAlgebra</code>ã¢ãžã¥ãŒã«ã§å®çŸ©ãããŠããäž»ãªé¢æ°ãšæŒç®åã¯ä»¥äžã®éãã§ãã
==== é¢æ° ====
* <code>dot</code>: ãã¯ãã«ã®ãããç©ãèšç®ããŸãã
* <code>norm</code>: ãã¯ãã«ã®ãã«ã ãèšç®ããŸãã
* <code>cross</code>: 3次å
ãã¯ãã«ã®å€ç©ãèšç®ããŸãã
* <code>det</code>: è¡åã®è¡ååŒãèšç®ããŸãã
* <code>inv</code>: è¡åã®éè¡åãèšç®ããŸãã
* <code>transpose</code>: è¡åã®è»¢çœ®è¡åãèšç®ããŸãã
* <code>adjoint</code>: è¡åã®é䌎è¡åãèšç®ããŸãã
* <code>eigvals</code>: è¡åã®åºæå€ãèšç®ããŸãã
* <code>eigvecs</code>: è¡åã®åºæãã¯ãã«ãèšç®ããŸãã
* <code>lu</code>: è¡åã®LUå解ãååŸããŸãã
* <code>qr</code>: è¡åã®QRå解ãååŸããŸãã
* <code>svd</code>: è¡åã®ç¹ç°å€å解ãååŸããŸãã
==== æŒç®å ====
* <code>*</code>: è¡åã®ç©ãèšç®ããŸãã
* <code>'</code>: è¡åã®è»¢çœ®è¡åãèšç®ããŸãã
以äžã¯ãJuliaã®<code>LinearAlgebra</code>ã¢ãžã¥ãŒã«ã䜿ã£ãåºæ¬çãªæäœäŸã§ãã
:<syntaxhighlight lang=julia-repl>
$ julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.10.0 (2023-12-25)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> using LinearAlgebra
julia> v1 = [1, 2, 3]
3-element Vector{Int64}:
1
2
3
julia> v2 = [4, 5, 6]
3-element Vector{Int64}:
4
5
6
julia> 2v1
3-element Vector{Int64}:
2
4
6
julia> v1 + v2
3-element Vector{Int64}:
5
7
9
julia> v1 - v2
3-element Vector{Int64}:
-3
-3
-3
julia> dot(v1, v2)
32
julia> norm(v1)
3.7416573867739413
julia> A = [1 2 3;0 1 4;5 6 0]
3Ã3 Matrix{Int64}:
1 2 3
0 1 4
5 6 0
julia> transpose(A)
3Ã3 transpose(::Matrix{Int64}) with eltype Int64:
1 0 5
2 1 6
3 4 0
julia> inv(A)
3Ã3 Matrix{Float64}:
-24.0 18.0 5.0
20.0 -15.0 -4.0
-5.0 4.0 1.0
julia> det(A)
0.9999999999999964
julia> A * v1
3-element Vector{Int64}:
14
14
17
julia> A * A
3Ã3 Matrix{Int64}:
16 22 11
20 25 4
5 16 39
julia> D = Diagonal([1, 2, 3])
3Ã3 Diagonal{Int64, Vector{Int64}}:
1 â
â
â
2 â
â
â
3
julia> S = Symmetric(A)
3Ã3 Symmetric{Int64, Matrix{Int64}}:
1 2 3
2 1 4
3 4 0
julia> eigen(S)
Eigen{Float64, Float64, Matrix{Float64}, Vector{Float64}}
values:
3-element Vector{Float64}:
-3.78840762859157
-0.9067918580419407
6.695199486633532
vectors:
3Ã3 Matrix{Float64}:
-0.266182 0.807132 -0.526959
-0.55006 -0.576121 -0.604582
0.791569 -0.12893 -0.597324
julia> b = [1, 2, 3]
3-element Vector{Int64}:
1
2
3
julia> x = A \ b
3-element Vector{Float64}:
27.000000000000096
-22.00000000000008
6.00000000000002
julia>
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ããŸããã¯ãã« <code>v1</code> ãš <code>v2</code> ãå®çŸ©ããŠããŸãããã®åŸããã¯ãã«ã®ã¹ã«ã©ãŒåãå æ³ãæžæ³ãå
ç©ããã«ã ãèšç®ããçµæã衚瀺ããŠããŸãã
次ã«ãè¡å <code>A</code> ãå®çŸ©ããŠããŸãããã®è¡å㯠3x3 ã®æŽæ°è¡åã§ããã転眮ãéè¡åãè¡ååŒããã¯ãã«ãšã®ç©ãè¡åãšã®ç©ãèšç®ããŠããŸãããŸãã察è§è¡å <code>D</code> ãå®çŸ©ããŠããŸãã
ããã«ã察称è¡å <code>S</code> ãå®çŸ©ãããã®åºæå€ãšåºæãã¯ãã«ãèšç®ããŠããŸãã
æåŸã«ãæå°äºä¹æ³ã®æŒç®ãè¡ã£ãŠããŸããããã¯é£ç«æ¹çšåŒ <code>Ax = b</code> ã®è§£ <code>x</code> ãæ±ããæäœã§ãã
ãã®ããã«ã<code>LinearAlgebra</code>ã¢ãžã¥ãŒã«ã¯ãæ°å€èšç®ã«ãããŠåºæ¬çãã€éèŠãªèŠçŽ ã§ãããã¯ãã«ãè¡åã®æ§ã
ãªæäœãæäŸããŠããŸãã
=== å
ç©ãšå€ç© ===
ãŸããå
ç©(ãããç©)ãèšç®ããæ¹æ³ã¯ä»¥äžã®éãã§ãã
LinearAlgebraã¢ãžã¥ãŒã«ïŒç·åœ¢ä»£æ°æŒç®ã¢ãžã¥ãŒã«ïŒã®èªã¿èŸŒã¿
:<syntaxhighlight lang=julia>
using LinearAlgebra
</syntaxhighlight>
å
ç©ã¯ãã¯ãã«ã®èŠçŽ å士ãæãåããããã®ã足ãåãããå€ãšãªããŸãã Juliaã§ã®å
ç©ã®èšç®ã¯ä»¥äžã®ããã«è¡ããŸãã
:<syntaxhighlight lang=julia>
# ãã¯ãã«ã®å®çŸ©
v1 = [1, 2, 3]
v2 = [4, 5, 6]
# å
ç©ã®èšç®
dot(v1, v2) # 32
</syntaxhighlight>
次ã«ãå€ç©ãèšç®ããæ¹æ³ã¯ä»¥äžã®éãã§ãã
å€ç©ã¯2ã€ã®ãã¯ãã«ããããã®ãã¯ãã«ã匵ãå¹³è¡å蟺圢ã®é¢ç©ãæ±ããããšã§èšç®ã§ããŸãã Juliaã§ã®å€ç©ã®èšç®ã¯ä»¥äžã®ããã«è¡ããŸãã
:<syntaxhighlight lang=julia>
# ãã¯ãã«ã®å®çŸ©
v1 = [1, 0, 0]
v2 = [0, 1, 0]
# å€ç©ã®èšç®
cross(v1, v2) # [0, 0, 1]
</syntaxhighlight>
ãã ããå€ç©ã®çµæã¯ãã¯ãã«ã§ããããã®ãã¯ãã«ã匵ãå¹³è¡å蟺圢ã®é¢ç©ã«ãªã£ãŠããããã§ã¯ãããŸãããå€ç©ã®çµæã«çµ¶å¯Ÿå€ãåãããšã§å¹³è¡å蟺圢ã®é¢ç©ãæ±ããããšãã§ããŸãã
:<syntaxhighlight lang=julia>
# ãã¯ãã«ã®å®çŸ©
v1 = [1, 0, 0]
v2 = [0, 1, 0]
# å€ç©ã®èšç®ãšé¢ç©ã®èšç®
norm(cross(v1, v2)) # 1.0
</syntaxhighlight>
以äžããJuliaã䜿ã£ãŠå
ç©ãšå€ç©ãæ±ããæ¹æ³ã®ç°¡åãªè§£èª¬ã§ãã
=== ããã°ã©ã ã®æ§é å ===
==== ããã°ã©ã ã®åå² ====
==== ã¢ãžã¥ãŒã«åãããããã°ã©ã ã®ãã¹ã ====
ââââ
== äžçŽç·š ==
=== ããã©ãŒãã³ã¹ãã¥ãŒãã³ã° ===
ã³ãŒãã®ããã©ãŒãã³ã¹ãåäžãããããã®ãã¯ããã¯ãæé©åææ³ãåŠã³ãŸããJuliaã¯é«éãªèšèªã§ããããããªãããã©ãŒãã³ã¹ã®åäžãæ±ããããå ŽåããããŸããå¹ççãªã¢ã«ãŽãªãºã ã®éžæãã¡ã¢ãªç®¡çã®æé©åã䞊ååŠçã®æŽ»çšãªã©ãæ§ã
ãªæ¹æ³ãåŠã³ãŸãã
=== ã¡ã¿ããã°ã©ãã³ã° ===
Juliaã®ã¡ã¿ããã°ã©ãã³ã°æ©èœã䜿çšããŠãã³ãŒãçæãDSLïŒDomain Specific LanguageïŒã®æ§ç¯ãªã©ãè¡ãæ¹æ³ãåŠã³ãŸããã¡ã¿ããã°ã©ãã³ã°ã¯ãã³ãŒãã®èªåçæãæè»ãªèšèªæ¡åŒµãå¯èœã«ããå¹ççãªããã°ã©ã ã®äœæã«åœ¹ç«ã¡ãŸãã
=== 深局åŠç¿ ===
Flux.jlãKnet.jlãªã©ã®æ·±å±€åŠç¿ãã¬ãŒã ã¯ãŒã¯ã䜿çšããŠããã¥ãŒã©ã«ãããã¯ãŒã¯ã¢ãã«ãæ§ç¯ãããã¬ãŒãã³ã°ããæ¹æ³ãåŠã³ãŸãã深局åŠç¿ã¯ãç»åèªèãèªç¶èšèªåŠçãé³å£°èªèãªã©ã®åéã§åºãå©çšãããŠãããJuliaã䜿ã£ãå¹æçãªå®è£
æ¹æ³ãç¿åŸããŸãã
=== ãã€ããã©ãŒãã³ã¹ã³ã³ãã¥ãŒãã£ã³ã° ===
Juliaã䜿çšããŠãé«æ§èœãªèšç®ãå®è¡ããããã®ãã¯ããã¯ãããŒã«ãåŠã³ãŸãã䞊ååŠçãGPUããã°ã©ãã³ã°ãåæ£ã³ã³ãã¥ãŒãã£ã³ã°ãªã©ãããŸããŸãªã¢ãããŒããéããŠã倧èŠæš¡ãªèšç®åé¡ã«å¯ŸåŠããã¹ãã«ã磚ããŸãã
ââââ
ââââ
=== é«åºŠãªãããã¯ã¹ ===
ãé«åºŠãªãããã¯ã¹ãã®ç« ã§ã¯ãJuliaèšèªã§ããé«åºŠãªãããã¯ã¹ãæ±ããŸãããã®ç« ã§ã¯ãã¡ã¿ããã°ã©ãã³ã°ã䞊ååŠçãšåæ£åŠçãããã°ã©ãã³ã°ã®æé©åãGPUããã°ã©ãã³ã°ã®4ã€ã®ã»ã¯ã·ã§ã³ã«åãããŸãã
#ã¡ã¿ããã°ã©ãã³ã° {{---}} ã¡ã¿ããã°ã©ãã³ã°ãšã¯ãããã°ã©ã ãããã°ã©ã ãçæããããšãæããŸããJuliaèšèªã¯ãã¡ã¿ããã°ã©ãã³ã°ã«éåžžã«é©ããŠãããããã³ãŒãçæãã³ã³ãã€ã«æã®ã³ãŒãè©äŸ¡ããã¯ããªã©ã®æ©èœãæäŸããŠããŸãããã®ã»ã¯ã·ã§ã³ã§ã¯ããããã®æ©èœã«ã€ããŠè©³ãã説æããå
·äœçãªäœ¿çšäŸã瀺ããŸãã
#䞊ååŠçãšåæ£åŠç {{---}} Juliaèšèªã¯ããã«ãã¹ã¬ããããã«ãããã»ã¹ããããŠåæ£ã³ã³ãã¥ãŒãã£ã³ã°ãå«ã䞊ååŠçãšåæ£åŠçã«å¯ŸããŠåŒ·åãªãµããŒããæäŸããŠããŸãããã®ã»ã¯ã·ã§ã³ã§ã¯ããããã®æ©èœã«ã€ããŠè©³ãã説æããå
·äœçãªäœ¿çšäŸã瀺ããŸãã
#ããã°ã©ãã³ã°ã®æé©å {{---}} Juliaèšèªã¯ãæ°å€èšç®ãç§åŠæè¡èšç®ãªã©ãé«æ§èœãå¿
èŠãªã¢ããªã±ãŒã·ã§ã³ã§äœ¿çšãããããšãå€ããããããã°ã©ãã³ã°ã®æé©åãéèŠãªèª²é¡ã§ãããã®ã»ã¯ã·ã§ã³ã§ã¯ãJuliaã³ãŒãã®æé©åã«ã€ããŠã®åºæ¬çãªèãæ¹ã説æãããããã¡ã€ãªã³ã°ãã³ãŒãçæãLLVMã®æé©åãªã©ã®æè¡ã«ã€ããŠè©³ãã説æããŸãã
#GPUããã°ã©ãã³ã° {{---}} GPUããã°ã©ãã³ã°ã¯ãã°ã©ãã£ãã¯ã¹åŠç以å€ã«ããããŒã¿åŠçãç§åŠæè¡èšç®ãªã©ã®åéã§ãåºã䜿çšãããããã«ãªã£ãŠããŸããJuliaèšèªã¯ãGPUããã°ã©ãã³ã°ã«å¯ŸããŠã匷åãªãµããŒããæäŸããŠããŸãããã®ã»ã¯ã·ã§ã³ã§ã¯ãGPUããã°ã©ãã³ã°ã«ã€ããŠã®åºæ¬çãªèãæ¹ã説æããJuliaèšèªã®GPUããã°ã©ãã³ã°ã®ãµããŒãã«ã€ããŠèª¬æããŸãã
==== ã¡ã¿ããã°ã©ãã³ã° ====
ãã®ç¯ã§ã¯ãJuliaã®ã¡ã¿ããã°ã©ãã³ã°ã«ã€ããŠèª¬æããŸããã¡ã¿ããã°ã©ãã³ã°ã¯ãããã°ã©ã ãèªåèªèº«ãæäœããããèªåèªèº«ãå€æŽãããããããšãæããŸããJuliaã¯ãéåžžã«åŒ·åãªã¡ã¿ããã°ã©ãã³ã°æ©èœãæäŸããŠãããããã«ãããé«åºŠãªããã°ã©ã ãæžãããšãã§ããŸãã
===== ãã¯ã =====
Juliaã«ããããã¯ãã¯ãããã°ã©ã ã®æçµçãªæ¬äœã«çæãããã³ãŒããå«ããã¡ã«ããºã ãæäŸããŸãããã¯ãã¯ãåŒæ°ã®ã¿ãã«ãè¿ãããåŒã«ããããããã®çµæã®åŒã¯å®è¡æã® eval åŒã³åºããå¿
èŠãšããã«çŽæ¥ã³ã³ãã€ã«ãããŸãããã¯ãã®åŒæ°ã«ã¯ãåŒããªãã©ã«å€ãããã³ã·ã³ãã«ãå«ããããšãã§ããŸãã
====== ç¹åŸŽ ======
Juliaã®ãã¯ãã¯ãããã€ãã®ç¹åŸŽãæã£ãŠããŸãïŒ
;ã³ãŒãã®çæãšæ¿å
¥: ãã¯ãã¯ãããã°ã©ã ã®å®è¡åã«ã³ãŒããçæãããã®ã³ãŒããããã°ã©ã ã®æ¬äœã«æ¿å
¥ããããšãã§ããŸããããã«ãããç¹°ãè¿ãã®ãã¿ãŒã³ãå
±éã®æ§é ãèªåçã«çæããå¹ççã«ã³ãŒããèšè¿°ããããšãã§ããŸãã
;ããŒãµãŒã¬ãã«ã®å®è¡: ãã¯ãã¯ã³ãŒãã解æãããæç¹ã§å®è¡ãããŸããããã«ããããã¯ãã¯åŒã®æ§é ã調æ»ããå¿
èŠã«å¿ããŠå€æŽããããšãã§ããŸããããã¯ãå®è¡æã§ã¯ãªãããŒã¹æã«ã³ãŒããæäœããèœåãæäŸããŸãã
åŒããªãã©ã«ãã·ã³ãã«ã®åŒæ°: ãã¯ãã¯åŒããªãã©ã«å€ãããã³ã·ã³ãã«ãåŒæ°ãšããŠåãåãããšãã§ããŸããããã«ããããã¯ãã¯ããŸããŸãªã¿ã€ãã®åŒæ°ãåãå
¥ããé©åãªåŠçãè¡ãããšãã§ããŸãã
;åå空éã®æäœ: ãã¯ãã¯ãããŒã«ã«ãªã¹ã³ãŒãå
ã§å€æ°ãå°å
¥ããããã«åå空éãæäœããããšãã§ããŸããããã«ããããã¯ããçæããå€æ°ãè¡çªããããšãªããã³ãŒããå®å
šã«å±éããããšãã§ããŸãã
;ãã€ãžãŒã³: Juliaã®ãã¯ãã¯ãå€æ°åãã¹ã³ãŒãã®è¡çªãé²ãããã«ãã€ãžãŒã³æ©æ§ãæã£ãŠããŸããããã«ããããã¯ããçæããã³ãŒããåšå²ã®ã³ã³ããã¹ããšè¡çªããããšããªããªããŸãã
;ãžã§ããªãã¯ãªæ§è³ª: ãã¯ãã¯ãžã§ããªãã¯ãªæ§è³ªãæã¡ãè€æ°ã®ã¡ãœããå®çŸ©ãæã€ããšãã§ããŸããããã«ããããã¯ãã¯ç°ãªãåŒæ°ã«å¯ŸããŠç°ãªãæ¯ãèããããããšãã§ããŸãã
;ASTïŒAbstract Syntax TreeïŒã®æäœ: ãã¯ãã¯æœè±¡æ§ææšïŒASTïŒãæäœããèœåãæã£ãŠããŸããããã«ããããã¯ãã¯ã³ãŒãã®æ§é ã調æ»ããå¿
èŠã«å¿ããŠå€æŽããããšãã§ããŸãã
ãããã®ç¹åŸŽã«ãããJuliaã®ãã¯ãã¯éåžžã«æè»ã§åŒ·åãªããã°ã©ãã³ã°ããŒã«ãšãªã£ãŠããŸãã
====== ã³ãŒãäŸ ======
Juliaã®ãã¯ãã¯ã@ïŒã¢ããããŒã¯ïŒã«ç¶ããŠããŒã¯ãªååã§å®£èšããããããã¯å
ã§å®çŸ©ãããŸãã以äžã¯éåžžã«ã·ã³ãã«ãªãã¯ãã®äŸã§ãïŒ
:<syntaxhighlight lang=julia-repl>
julia> macro sayhello()
return :( println("Hello, world!") )
end
@sayhello (macro with 1 method)
</syntaxhighlight>
ãã®äŸã§ã¯ãã³ã³ãã€ã©ã¯@sayhelloã®ãã¹ãŠã®ã€ã³ã¹ã¿ã³ã¹ã以äžã®ããã«çœ®ãæããŸãïŒ
:<syntaxhighlight lang=julia-repl>
:( println("Hello, world!") )
</syntaxhighlight>
@sayhelloãREPLã«å
¥åããããšãåŒãããã«å®è¡ããããããè©äŸ¡çµæã®ã¿ã衚瀺ãããŸãïŒ
:<syntaxhighlight lang=julia-repl>
julia> @sayhello()
Hello, world!
</syntaxhighlight>
ããã«å°ãè€éãªãã¯ããèããŠã¿ãŸãããïŒ
:<syntaxhighlight lang=julia-repl>
julia> macro sayhello(name)
return :( println("Hello, ", $name) )
end
@sayhello (macro with 1 method)
</syntaxhighlight>
ãã®ãã¯ãã¯1ã€ã®åŒæ°ãã€ãŸãnameãåããŸãã@sayhelloãåºäŒããããšãã¯ã©ãŒããããåŒã¯æçµåŒã«åŒæ°ã®å€ãå±éããŸãïŒ
:<syntaxhighlight lang=julia-repl>
julia> @sayhello("human")
Hello, human
</syntaxhighlight>
ãã¯ããå±éããæ»ãå€ã®åŒçšåŒã衚瀺ããã«ã¯ãé¢æ°macroexpandã䜿çšã§ããŸãïŒéèŠãªæ³šæïŒããã¯ãã¯ãã®ãããã°ã«éåžžã«äŸ¿å©ãªããŒã«ã§ãïŒïŒ
:<syntaxhighlight lang=julia-repl>
julia> ex = macroexpand(Main, :(@sayhello("human")) )
:(Main.println("Hello, ", "human"))
julia> typeof(ex)
Expr
</syntaxhighlight>
ããã§ã"human"ãªãã©ã«ãåŒã«å±éãããŠããããšãããããŸãã
----
;ãããªãã¯ã¹ã䜿ã£ãã¢ã«ãŽãªãºã äŸ
ãã¯ãã䜿çšããŠãJuliaã§ç°¡åãªè¡åæäœãè¡ãã¢ã«ãŽãªãºã ã®äŸã瀺ããŸãããã®äŸã§ã¯ã2ã€ã®è¡åã®ç©ãèšç®ããé¢æ°ããã¯ãã§å®çŸ©ããŸãã
:<syntaxhighlight lang=julia>
macro matrix_multiply(A, B)
quote
if size($A, 2) != size($B, 1)
error("Matrix dimensions do not match: ", size($A), " and ", size($B))
else
C = zeros(eltype($A), size($A, 1), size($B, 2))
for i in 1:size($A, 1)
for j in 1:size($B, 2)
for k in 1:size($A, 2)
C[i, j] += $A[i, k] * $B[k, j]
end
end
end
C
end
end
end
</syntaxhighlight>
ãã®ãã¯ãã§ã¯ã2ã€ã®è¡åAãšBãåŒæ°ãšããŠåãåãããããã®ç©ãèšç®ããŸãããŸããè¡åã®æ¬¡å
ããã§ãã¯ãã次å
ãäžèŽããªãå Žåã¯ãšã©ãŒãè¿ããŸãã次ã«ãçµæã®è¡åCãåæåãã3éã®ã«ãŒãã䜿çšããŠç©ãèšç®ããŸããæåŸã«ãçµæã®è¡åCãè¿ããŸãã
ãã®ãã¯ãã䜿çšãããšã次ã®ããã«2ã€ã®è¡åã®ç©ãèšç®ã§ããŸãã
:<syntaxhighlight lang=julia>
A = [1 2; 3 4]
B = [5 6; 7 8]
@matrix_multiply(A, B)
</syntaxhighlight>
ãã®äŸã§ã¯ãè¡åAãšBãå®çŸ©ãã@matrix_multiplyãã¯ãã䜿çšããŠãããã®ç©ãèšç®ããŠããŸãã
====== ãŠãŒã¹ã±ãŒã¹ ======
Juliaã®ãã¯ãã¯ãããã€ãã®äžè¬çãªãŠãŒã¹ã±ãŒã¹ã§åœ¹ç«ã¡ãŸãïŒ
;ãã¡ã€ã³åºæèšèªïŒDSLïŒã®äœæ: ãã¯ãã䜿çšããŠãç¹å®ã®ãã¡ã€ã³ãåé¡é åã«é©ããç¬èªã®èšèªãäœæããããšãã§ããŸããããã«ãããç¹å®ã®åé¡ã解決ããããã®ç°¡æœã§æ確ãªæ§æãæäŸããã³ãŒãã®å¯èªæ§ãåäžãããããšãã§ããŸãã
;ã³ãŒãã®èªåçæ: ãã¯ãã䜿çšããŠãç¹°ãè¿ãã®ãã¿ãŒã³ãå
±éã®æ§é ãèªåçã«çæããããšãã§ããŸããããã«ãããåé·ãªã³ãŒãã®èšè¿°ãæžãããå¹ççãªããã°ã©ãã³ã°ãå®çŸããããšãã§ããŸãã
;ã¡ã¿ããã°ã©ãã³ã°: ãã¯ãã䜿çšããŠãå®è¡æã§ã¯ãªãããŒã¹æã«ã³ãŒããæäœããããšãã§ããŸããããã«ãããããã°ã©ã ãããåçã«å¶åŸ¡ããæè»æ§ãé«ããããšãã§ããŸãã
;æé©å: ãã¯ãã䜿çšããŠãã³ãŒããæé©åããããšãã§ããŸããç¹å®ã®ã³ã³ããã¹ããæ¡ä»¶ã«åºã¥ããŠãã³ãŒããå€æŽããããã©ãŒãã³ã¹ãåäžãããããšãã§ããŸãã
;ãããã°: ãã¯ãã䜿çšããŠããããã°æ
å ±ãã³ãŒãã«åã蟌ãããšãã§ããŸããããã«ãããå®è¡æã®ãšã©ãŒãåé¡ã®ãã©ãã«ã·ã¥ãŒãã£ã³ã°ã容æã«ãªããŸãã
;ãªãã¬ã¯ã·ã§ã³: ãã¯ãã䜿çšããŠãå®è¡æã®æ
å ±ãã³ãŒãã«åã蟌ãããšãã§ããŸããããã«ãããå®è¡æã«ã³ãŒããåçã«å¶åŸ¡ããããšãã§ããŸãã
;å€éšã©ã€ãã©ãªã®æ¡åŒµ: ãã¯ãã䜿çšããŠãå€éšã©ã€ãã©ãªãæ¡åŒµããããšãã§ããŸããããã«ãããæ¢åã®ã©ã€ãã©ãªã«æ©èœãè¿œå ããããã«ã¹ã¿ãã€ãºãããããããšãã§ããŸãã
ãããã®ãŠãŒã¹ã±ãŒã¹ã掻çšããããšã§ãJuliaã®ãã¯ãã¯ã³ãŒãã®æè»æ§ãå¹çæ§ãããã³ä¿å®æ§ãåäžãããããšãã§ããŸãã
====== ãã¹ããã©ã¯ãã£ã¹ ======
Juliaã®ãã¯ãã䜿çšããéã®ãã¹ããã©ã¯ãã£ã¹ã«ã¯ã以äžã®ãããªãã®ããããŸãïŒ
;ããã¥ã¡ã³ãã®æäŸ: ãã¯ããå®çŸ©ãããšãã«ãé©åãªããã¥ã¡ã³ããæäŸããããšãéèŠã§ãããã¯ãã®ç®çã䜿çšæ¹æ³ãããã³åŒæ°ã®æå³ãæ確ã«èª¬æããä»ã®éçºè
ãç解ããããããŸãã
;ååã®è¡çªãé¿ãã: ãã¯ãã§å°å
¥ãããå€æ°ãé¢æ°ã®ååã¯ãä»ã®éšåãšè¡çªããªãããã«æ³šæããå¿
èŠããããŸããäžè¬çãªåœåèŠåã«åŸããååã®éžæã«æ³šæãæããŸãã
;ãã€ãžãŒã³ãå®ã: ãã¯ããå°å
¥ããå€æ°ãé¢æ°ãåšå²ã®ã³ã³ããã¹ããšè¡çªããªãããã«ããã€ãžãŒã³ã«ãŒã«ãéµå®ããŸããå¿
èŠã«å¿ããŠãgensymé¢æ°ã䜿çšããŠäžæã®ã·ã³ãã«ãçæããŸãã
;å¹çæ§ãèæ
®ãã: ãã¯ãã¯ãã³ãŒãã®çæãšå±éã®æ®µéã§å®è¡ããããããå¹ççãªã³ãŒããçæããããšãéèŠã§ããäžèŠãªèšç®ãç¹°ãè¿ããé¿ããã³ãŒãã®ããã©ãŒãã³ã¹ãæé©åããŸãã
;åçŽããéèŠãã: ãã¯ãã¯åŒ·åãªããŒã«ã§ãããè€éãªåŠçãè¡ãããšãã§ããŸãããã§ããã ãåçŽãªå®è£
ãå¿ãããã¹ãã§ããè€éãªãã¯ãã¯ç解ãé£ãããªããä¿å®æ§ãäœäžããå¯èœæ§ããããŸãã
;ãã¹ããå®æœãã: ãã¯ããæ£ããæ©èœããããšã確èªããããã«ãé©åãªãã¹ããå®æœããŸããç°ãªãã±ãŒã¹ãå¢çæ¡ä»¶ãã«ããŒããäºæããªãæåããªãããšã確èªããŸãã
;ãããã°æ
å ±ã®æäŸ: ãã¯ããçæããã³ãŒãã«ã¯ããããã°æ
å ±ãåã蟌ãããšãéèŠã§ãããšã©ãŒã¡ãã»ãŒãžããããã°çšã®æ
å ±ãé©åã«èšå®ãããã©ãã«ã·ã¥ãŒãã£ã³ã°ã容æã«ããŸãã
;ãªãã¡ã¯ã¿ãªã³ã°ã®æ€èš: ãã¯ãã䜿çšãããšã³ãŒããè€éã«ãªãå¯èœæ§ããããããé©åãªã¿ã€ãã³ã°ã§ã³ãŒãããªãã¡ã¯ã¿ãªã³ã°ããããšãæ€èšããŸããè€éãªãã¯ããããåçŽã§ç解ãããã圢ã«å€æŽããããšã§ãã³ãŒãã®ä¿å®æ§ãåäžãããããšãã§ããŸãã
ãããã®ãã¹ããã©ã¯ãã£ã¹ã«åŸãããšã§ãJuliaã®ãã¯ããå¹æçã«äœ¿çšããã³ãŒãã®å質ãšä¿å®æ§ãåäžãããããšãã§ããŸãã
====== ã€ãã£ãªã ======
Juliaã®ãã¯ãã䜿çšããéã«ããèŠãããã€ãã£ãªã ïŒæ
£çšå¥ïŒã«ã¯æ¬¡ã®ãããªãã®ããããŸãïŒ
# åŒã®ã¯ãªãŒã: ãã¯ãã®äžã§ã³ãŒããçæããéã«ã¯ãåŒãã¯ãªãŒãããããšãäžè¬çã§ããããã«ãããåŒãè©äŸ¡ãããã®ã§ã¯ãªãããã®ãŸãŸã³ãŒãã®äžéšãšããŠæ±ãããŸããäŸãã°ã<code>:(x + y)</code>ã®ãããªåœ¢åŒããã䜿ãããŸãã
# åŒã®ã¹ãã©ã€ã¹: ãã¯ãå
ã§å€æ°ãåŒãå±éããéã«ã¯ã<code>$</code>ã䜿çšããŠåŒãã¹ãã©ã€ã¹ããŸããããã«ãããå€æ°ã®å€ãåŒã®çµæããã¯ãã®äžã«æ¿å
¥ããããšãã§ããŸãã
# gensymé¢æ°ã®äœ¿çš: ãã¯ãã§äžæã®ã·ã³ãã«ãçæããå Žåã«ã¯ã<code>gensym</code>é¢æ°ã䜿çšããŸããããã«ãããååã®è¡çªãåé¿ããå®å
šã«ãã¯ããå®çŸ©ããããšãã§ããŸãã
# ãšã¹ã±ãŒã: ãã¯ãã®åŒæ°ããã®ãŸãŸæ¿å
¥ããå Žåã«ã¯ã<code>esc</code>é¢æ°ã䜿çšããŠãšã¹ã±ãŒãããŸããããã«ããããã¯ããåŒæ°ãå€æŽããã«ãã®ãŸãŸå±éããããšãã§ããŸãã
# ããã¥ã¡ã³ãã®æäŸ: ãã¯ããå®çŸ©ããéã«ã¯ãé©åãªã³ã¡ã³ããããã¥ã¡ã³ããæäŸããããšãéèŠã§ãããã¯ãã®ç®çã䜿çšæ¹æ³ãããã³åŒæ°ã®æå³ãæ確ã«èª¬æããä»ã®éçºè
ãç解ããããããŸãã
# ãã€ãžãŒã³ãå®ã: ãã¯ããå°å
¥ããå€æ°ãé¢æ°ãåšå²ã®ã³ã³ããã¹ããšè¡çªããªãããã«ããã€ãžãŒã³ã«ãŒã«ãéµå®ããŸããå¿
èŠã«å¿ããŠã<code>gensym</code>é¢æ°ã䜿çšããŠäžæã®ã·ã³ãã«ãçæããŸãã
# ãã¯ãã®äœ¿çšäŸãæäŸ: ãã¯ããå®çŸ©ããéã«ã¯ãé©åãªäœ¿çšäŸãæäŸããããšãéèŠã§ããä»ã®éçºè
ããã¯ãã®æå³ãšäœ¿çšæ¹æ³ãç解ãããããªããŸãã
ãããã®ã€ãã£ãªã ã䜿çšããããšã§ãJuliaã®ãã¯ããå¹æçã«å®çŸ©ããä»ã®éçºè
ãç解ããããã³ãŒããæžãããšãã§ããŸãã
----
Juliaã®ã¡ã¿ããã°ã©ãã³ã°ã«ã¯ããã¯ããšåŒã°ããç¹æ®ãªé¢æ°ã䜿çšãããŸãããã¯ãã¯ãå®è¡æã§ã¯ãªããã³ã³ãã€ã«æã«è©äŸ¡ãããŸããã€ãŸããã³ã³ãã€ã«åã«ãã¯ããå®è¡ããããã¯ããçæããã³ãŒããå®è¡ãããŸãããã¯ãã¯ãç¹å¥ãªæ§æã䜿çšããŠå®çŸ©ãããŸããäŸãã°ã以äžã®ããã«å®çŸ©ãããŸãã
:<syntaxhighlight lang=julia>
macro mymacro(x)
# do something with x
return quote
# generated code
end
end
</syntaxhighlight>
ãã¯ãã®åŒæ°ã¯ãéåžžã®é¢æ°ãšåãããã«æ±ãããŸãããã³ã³ãã€ã«æã«è©äŸ¡ãããŸãããã¯ãã®æ»ãå€ã¯ãå®è¡æã§ã¯ãªããã³ã³ãã€ã«æã«è©äŸ¡ãããJuliaã®åŒã§ãªããã°ãªããŸããããã®ããããã¯ãã¯ãåçãªåŒãçæããããã«äœ¿çšãããŸãã
ãã¯ããåŒã³åºãã«ã¯ã<code>@ãã¯ãå</code>ã®ããã«<code>@</code>ãä»ããŸããäŸãã°ãå
ã»ã©å®çŸ©ãããã¯ããåŒã³åºãã«ã¯ã以äžã®ããã«ããŸãã
:<syntaxhighlight lang=julia>
@mymacro(x)
</syntaxhighlight>
===== ã¡ã¿ããã°ã©ãã³ã°ã®å¿çšäŸ =====
Juliaã®ã¡ã¿ããã°ã©ãã³ã°ã«ã¯ãæ§ã
ãªå¿çšäŸããããŸãã以äžã«ããã€ãäŸãæããŸãã
* ã³ãŒãçæïŒã¡ã¿ããã°ã©ãã³ã°ã䜿çšããŠãç¹å®ã®åãããŒã¿æ§é ã«å¯Ÿããé«åºŠãªæé©åãè¡ãããšãã§ããŸããäŸãã°ãç¹å®ã®åã®ããã«æé©åãããå°çšã®é¢æ°ãçæããããšãã§ããŸãã
* ãã¡ã€ã³ç¹åèšèª(DSL)ïŒJuliaã®ã¡ã¿ããã°ã©ãã³ã°ã䜿çšããŠãç¹å®ã®åé¡ã«å¯Ÿããç¬èªã®ãã¡ã€ã³ç¹åèšèªãäœæããããšãã§ããŸããããã«ãããåé¡ã®è¡šçŸåãåäžãããå®è¡æéãççž®ããããšãã§ããŸãã
* ã¯ãšãªãšã³ãžã³ïŒJuliaã®ã¡ã¿ããã°ã©ãã³ã°ã䜿çšããŠãé«éãªã¯ãšãªãšã³ãžã³ãäœæããããšãã§ããŸãã
==== 䞊ååŠçãšåæ£åŠç ====
ã䞊ååŠçããšã¯ãã³ã³ãã¥ãŒã¿ãŒäžã§åæã«è€æ°ã®åŠçãå®è¡ããããšãæããŸããäžæ¹ããåæ£åŠçããšã¯ãè€æ°ã®ã³ã³ãã¥ãŒã¿ãŒã§åŠçãåæ£ããå調ããŠåŠçãè¡ãããšãæããŸããJuliaã¯ã䞊ååŠçãšåæ£åŠçã«å¯Ÿå¿ããŠãããããããã«é©ããæ¹æ³ã§ããã°ã©ãã³ã°ããããšãã§ããŸãã
===== 䞊ååŠç =====
Juliaã¯ããã«ãã¹ã¬ããåŠçããµããŒãããŠããŸãããã«ãã¹ã¬ããåŠçã䜿çšããããšã§ãè€æ°ã®ã¿ã¹ã¯ãåæã«å®è¡ããããšãã§ããŸããJuliaã®ãã«ãã¹ã¬ããåŠçã¯ãã¹ã¬ããééä¿¡ã®ããã®ãã£ã³ãã«ãæäŸããŠããŸãã
以äžã¯ããã«ãã¹ã¬ããåŠçã䜿çšããŠã1ãã10ãŸã§ã®æ°åã®åèšãèšç®ããäŸã§ãã
:<syntaxhighlight lang=julia>
function sum_range(start::Int, stop::Int, ch::Channel)
s = 0
for i = start:stop
s += i
end
put!(ch, s)
end
function parallel_sum(n::Int, num_threads::Int)
ch = Channel{Int}(num_threads)
chunk_size = ceil(Int, n / num_threads)
for i = 1:num_threads
start = (i - 1) * chunk_size + 1
stop = min(i * chunk_size, n)
@async sum_range(start, stop, ch)
end
s = 0
for i = 1:num_threads
s += take!(ch)
end
return s
end
@time parallel_sum(10, 2) # 55
</syntaxhighlight>
ãã®äŸã§ã¯ãsum_rangeé¢æ°ããæå®ãããç¯å²ã®æ°åã®åèšãèšç®ããŠãChannelã«çµæãéä¿¡ããŸããparallel_sumé¢æ°ã§ã¯ãæå®ãããç¯å²ãè€æ°ã®ãã£ã³ã¯ã«åå²ããããããã®ãã£ã³ã¯ãå¥ã
ã®ã¹ã¬ããã§åŠçããŸããåã¹ã¬ããã®çµæã¯ãChannelã«éä¿¡ãããparallel_sumé¢æ°ã¯åã¹ã¬ããããã®çµæãåéããŠãæçµçãªçµæãè¿ããŸãã
==== ããã°ã©ãã³ã°ã®æé©å ====
ããã°ã©ã ã®å®è¡é床ã¯ãå€ãã®å Žåãæé©åã®å¯Ÿè±¡ãšãªããŸããããã°ã©ã ã®é«éåã«ã¯ãæ§ã
ãªæ¹æ³ããããŸãããæ¬æžã§ã¯ã次ã®ãããªã¢ãããŒãã«çŠç¹ãããŠãŸãã
* ã¢ã«ãŽãªãºã ã®æé©å
* ããŒã¿æ§é ã®æé©å
* ã³ãŒãã®æé©å
===== ã¢ã«ãŽãªãºã ã®æé©å =====
ã¢ã«ãŽãªãºã ã®æé©åã¯ããã®ã¢ã«ãŽãªãºã ãåŠçããåé¡ã«é©ããã¢ã«ãŽãªãºã ãéžæããããšã«ãã£ãŠå®çŸã§ããŸããé©åãªã¢ã«ãŽãªãºã ãéžæããããšã§ãããã°ã©ã ã®å®è¡é床ã倧å¹
ã«åäžãããããšãã§ããŸãã
äŸãã°ããªã¹ãå
ã®èŠçŽ ãæ€çŽ¢ããå Žåãç·åœ¢æ¢çŽ¢ã¢ã«ãŽãªãºã ãããäºåæ¢çŽ¢ã¢ã«ãŽãªãºã ã®æ¹ãå¹ççã§ãããŸãããœãŒãã¢ã«ãŽãªãºã ãéžæããéã«ããåé¡ã«ãã£ãŠæé©ãªã¢ã«ãŽãªãºã ãç°ãªããŸãã
===== ããŒã¿æ§é ã®æé©å =====
ããŒã¿æ§é ã®æé©åã¯ãããã°ã©ã ã®å®è¡é床ã«å€§ããªåœ±é¿ãäžããŸããããŒã¿æ§é ãé©åã«èšèšããããšã«ãã£ãŠãã¡ã¢ãªäœ¿çšéãåæžããããŒã¿ã¢ã¯ã»ã¹ã®åŠçæéãççž®ããããšãã§ããŸãã
äŸãã°ãå€ãã®å Žåãé
åã®äœ¿çšããããé£çµãªã¹ãã®äœ¿çšã®æ¹ãå¹ççã§ãããŸããããã·ã¥ããŒãã«ã¯ã倧éã®ããŒã¿ãå¹ççã«æ€çŽ¢ããå Žåã«æå¹ã§ãã
===== ã³ãŒãã®æé©å =====
æé©ãªã¢ã«ãŽãªãºã ãšæé©ãªããŒã¿æ§é ãéžæããŠããããã°ã©ã ã®å®è¡æéã倧å¹
ã«äžããããšãã§ããŸããã³ãŒãã®æé©åã¯ãã¢ã«ãŽãªãºã ãããŒã¿æ§é ãå®çŸããããã®ã³ãŒããæé©åããããšã«ãã£ãŠå®çŸã§ããŸãã
äŸãã°ãç¹°ãè¿ãåŠçå
ã§åãèšç®ãäœåºŠãå®è¡ããå Žåãèšç®ãå€çšããªãããã«ã³ãŒããæžãããšã§ãããã°ã©ã ã®å®è¡é床ãäžããããšãã§ããŸãããŸããé«éãªã«ãŒãèšæ³ã䜿çšããããšããããã°ã©ã ã®é床ãåäžãããããšãã§ããŸãã
===== ãŸãšã =====
ããã°ã©ã ã®æé©åã«ã¯ãã¢ã«ãŽãªãºã ã®æé©åãããŒã¿æ§é ã®æé©åãã³ãŒãã®æé©åã®3ã€ã®ã¢ãããŒãããããŸãããããã®ã¢ãããŒããé§äœ¿ããŠãããã°ã©ã ã®å®è¡é床ãé«éåããããšãã§ããŸãã
==== GPUããã°ã©ãã³ã° ====
GPUïŒGraphics Processing UnitïŒã¯ãã°ã©ãã£ãã¯ã¹åŠçã®ããã«éçºãããããã»ããµã§ãããæ°å€èšç®ãç§åŠæè¡èšç®ã®åéã§ãå©çšãããããã«ãªã£ãŠããŸããGPUã¯SIMDïŒSingle Instruction Multiple DataïŒã¢ãŒããã¯ãã£ãæ¡çšããŠãããåæã«å€æ°ã®æŒç®ãè¡ãããšãã§ããŸãããã®ç¹æ§ã掻ããããšã§ãCPUã«æ¯ã¹ãŠé«éãªæ°å€èšç®ãå¯èœã«ãªããŸãã
juliaã¯GPUããã°ã©ãã³ã°ããµããŒãããŠãããCuArraysãšåŒã°ããã©ã€ãã©ãªãä»ããŠCUDA APIãå©çšããããšãã§ããŸããCUDAã¯NVIDIAãéçºããŠããGPUåãã®äžŠåã³ã³ãã¥ãŒãã£ã³ã°ãã©ãããã©ãŒã ã§ãããGPUã®ããã©ãŒãã³ã¹ãæ倧éåŒãåºãããšãã§ããŸãã
===== CuArraysã®ã€ã³ã¹ããŒã« =====
CuArraysã䜿çšããã«ã¯ã以äžã®ããã«ããŠã€ã³ã¹ããŒã«ããå¿
èŠããããŸãã
:<syntaxhighlight lang=julia>
import Pkg
Pkg.add("CuArrays")
</syntaxhighlight>
ãªããCuArraysãå©çšããããã«ã¯CUDAãã€ã³ã¹ããŒã«ãããŠããå¿
èŠããããŸãã
===== CuArraysã®åºæ¬çãªäœ¿ãæ¹ =====
CuArraysã¯ãjuliaã®æšæºçãªé
åãšåãããã«æ±ãããšãã§ããŸãã以äžã¯CuArraysã§ãã¯ãã«ãäœæããäŸã§ãã
:<syntaxhighlight lang=julia>
using CuArrays
a = CuArray([1, 2, 3])
</syntaxhighlight>
ãã®ããã«ããããšã§ããã¹ãåŽã®ã¡ã¢ãªå
ã«ããé
åãããGPUåŽã®ã¡ã¢ãªå
ã«é
åãã³ããŒããããšãã§ããŸãã
CuArraysã䜿ã£ãèšç®ã¯ãéåžžã®juliaã®é
åãšåãããã«è¡ããŸãããã ããèšç®ãè¡ãé¢æ°ã«ã¯ãGPUåŽã®ã¡ã¢ãªäžã«ããé
åãåŒæ°ãšããå¿
èŠããããŸãã以äžã¯CuArraysã§ãã¯ãã«ã®åãèšç®ããäŸã§ãã
:<syntaxhighlight lang=julia>
using CuArrays
a = CuArray([1, 2, 3])
b = CuArray([4, 5, 6])
c = a + b
</syntaxhighlight>
ãã®ããã«ããããšã§ããã¯ãã«aãšãã¯ãã«bã®èŠçŽ ããšã®åãããã¹ãåŽã®ã¡ã¢ãªããGPUåŽã®ã¡ã¢ãªã«è»¢éããèšç®ãè¡ããçµæãGPUåŽã®ã¡ã¢ãªãããã¹ãåŽã®ã¡ã¢ãªã«è»¢éããŸãã
===== ã«ã¹ã¿ã ã«ãŒãã«ã®å®çŸ© =====
ã«ã¹ã¿ã ã«ãŒãã«ã¯ãGPUäžã§äžŠåã«å®è¡ã§ããé¢æ°ã®ããšã§ããCuArraysã¯ãCuKernelãã¯ããçšããŠã«ã¹ã¿ã ã«ãŒãã«ãå®çŸ©ããããšãã§ããŸãã以äžã¯ãCuKernelãã¯ããçšããŠããã¯ãã«ã®åãèšç®ããã«ã¹ã¿ã ã«ãŒãã«ãå®çŸ©ããäŸã§ãã
:<syntaxhighlight lang=julia>
using CuArrays
@cuda function vector_add!(c::CuDeviceArray{T,1}, a::CuDeviceArray{T,1}, b::CuDeviceArray{T,1}) where {T}
i = threadIdx().x
if i <= length(a)
c[i] = a[i] + b[i]
end
return
end
</syntaxhighlight>
ãã®ã«ã¹ã¿ã ã«ãŒãã«ã§ã¯ãåã¹ã¬ãããé
åã®èŠçŽ ã®åèšå€ãèšç®ããçµæãããããã®ã¹ã¬ããã«è¿ããŸããCuKernelãè¿ãå€ã¯ã䞊ååŠçãããã¹ã¬ããæ°ãšåãã§ãã
===== ã«ã¹ã¿ã ã«ãŒãã«ã®å®è¡ =====
CuArraysã«ã¯ãCuKernelãå®è¡ããããã®é¢æ°ãçšæãããŠããŸãã以äžã¯ãCuArraysã§ãã¯ãã«ã®åãèšç®ããäŸã§ãã
:<syntaxhighlight lang=julia>
using CuArrays
a = CuArray([1, 2, 3])
b = CuArray([4, 5, 6])
c = similar(a)
CuArrays.@cuda threads=128 vector_add!(c, a, b)
</syntaxhighlight>
ãã®äŸã§ã¯ãã«ã¹ã¿ã ã«ãŒãã«ã128åã®ã¹ã¬ããã§äžŠåã«å®è¡ããŠããŸãã䞊ååŠçã®ãããã¹ã¬ããæ°ã¯GPUã®ã³ã¢æ°ã«æ¯äŸããããã«æ±ºå®ãããŸãããŸããçµæãæ ŒçŽããããã«ãCuArrays.@cudaãã¯ãã§simialar()é¢æ°ã䜿çšããŠããã¹ãã¡ã¢ãªäžã«ããå€æ°cãšåãåã®å€æ°ãGPUã¡ã¢ãªå
ã§äœæããŠããŸãã
===== ãŸãšã =====
CuArraysãçšããããšã§ãjuliaã§GPUããã°ã©ãã³ã°ãç°¡åã«è¡ãããšãã§ããŸããã«ã¹ã¿ã ã«ãŒãã«ãå©çšããããšã§ãGPUã®æ§èœãæ倧éã«åŒãåºãããšãã§ããæ°å€èšç®ãç§åŠæè¡èšç®ã«ãããŠé«éãªåŠçãå®çŸããããšãã§ããŸãã
==éé²ããã==
=== éé² ===
{{å
é ã«æ»ã}}
==== ã³ãŒãã®ã£ã©ãªãŒ ====
{{å
é ã«æ»ã|title=éé²ã«æ»ã|label=éé²|style=border-top:1px solid gray;}}
:<syntaxhighlight lang=julia highlight=18>
</syntaxhighlight>
:<syntaxhighlight lang=text>
</syntaxhighlight>
===== ãšã©ãã¹ããã¹ã®ç¯© =====
{{å
é ã«æ»ã|title=ã³ãŒãã»ã®ã£ã©ãªãŒã«æ»ã|label=ã³ãŒãã®ã£ã©ãªãŒ|style=border-top:1px solid gray;}}
ãšã©ãã¹ããã¹ã®ç¯©ããè¥å¹² Julia ãããæžããŠã¿ãŸããã
;ãšã©ãã¹ããã¹ã®ç¯©:<syntaxhighlight lang=julia line>
function eratosthenes(n)
is_prime = trues(n) # å
šãŠã®æ°ãçŽ æ°ãšä»®å®ãã
is_prime[1] = false # 1ã¯çŽ æ°ã§ã¯ãªã
# 篩ãèœãšã
for i in 2:isqrt(n)
if is_prime[i]
is_prime[i*i:i:n] .= false
end
end
# çŽ æ°ãæœåº
return [i for i in 2:n if is_prime[i]]
end
println(eratosthenes(100))
</syntaxhighlight>
;å®è¡çµæ:<syntaxhighlight lang=text>
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]
</syntaxhighlight>
===== ã¯ã€ãã¯ãœãŒã =====
{{å
é ã«æ»ã|title=ã³ãŒãã»ã®ã£ã©ãªãŒã«æ»ã|label=ã³ãŒãã®ã£ã©ãªãŒ|style=border-top:1px solid gray;}}
ã¯ã€ãã¯ãœãŒãããè¥å¹² Julia ãããæžããŠã¿ãŸããã
;ã¯ã€ãã¯ãœãŒã:<syntaxhighlight lang=Julia line>
function quicksort(ary, low, high)
if low >= high
return
end
pivot = ary[(low + high) ÷ 2]
i = low
j = high
while i <= j
while ary[i] < pivot
i += 1
end
while ary[j] > pivot
j -= 1
end
if i <= j
ary[i], ary[j] = ary[j], ary[i]
i += 1
j -= 1
end
end
quicksort(ary, low, j)
quicksort(ary, i, high)
end
ary = [9, 5, 7, 2, 4, 1, 8, 3, 10, 6]
println("Original Array:\t", ary)
quicksort(ary, 1, length(ary))
println("Sorted Array:\t", ary)</syntaxhighlight>
;å®è¡çµæ:<syntaxhighlight lang=text>
Original Array:[9, 5, 7, 2, 4, 1, 8, 3, 10, 6]
Sorted Array: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
</syntaxhighlight>
===== æ倧å
¬çŽæ°ãšæå°å
¬åæ° =====
{{å
é ã«æ»ã|title=ã³ãŒãã»ã®ã£ã©ãªãŒã«æ»ã|label=ã³ãŒãã®ã£ã©ãªãŒ|style=border-top:1px solid gray;}}
æ倧å
¬çŽæ°ãšæå°å
¬åæ°ããè¥å¹² Julia ãããæžããŠã¿ãŸããã
;æ倧å
¬çŽæ°ãšæå°å
¬åæ°:<syntaxhighlight lang=julia line>
# gcd2ã¯2ã€ã®æŽæ°mãšnã®æ倧å
¬çŽæ°ãèšç®ããŸãã
# n == 0ã®å Žåã¯mãè¿ãããã以å€ã®å Žåã¯ãŠãŒã¯ãªããã®äºé€æ³ã«åºã¥ããŠæ倧å
¬çŽæ°ãèšç®ããŸãã
gcd2(m, n) = n == 0 ? m : gcd2(n, m % n)
# gcdã¯ä»»æã®é·ãã®æŽæ°ã®åŒæ°ã®æ倧å
¬çŽæ°ãèšç®ããŸãã
gcd(ints...) = reduce(gcd2, ints)
# lcm2ã¯2ã€ã®æŽæ°mãšnã®æå°å
¬åæ°ãèšç®ããŸãã
# m * n ÷ gcd2(m, n) ã¯æå°å
¬åæ°ãèšç®ããŠããŸãã
lcm2(m, n) = m * n ÷ gcd2(m, n)
# lcmã¯ä»»æã®é·ãã®æŽæ°ã®åŒæ°ã®æå°å
¬åæ°ãèšç®ããŸãã
lcm(ints...) = reduce(lcm2, ints)
# gcd2ãgcdãlcm2ãlcmã®åé¢æ°ãåŒã³åºããŸãã
println("gcd2(30, 45) => ", gcd2(30, 45))
println("gcd(30, 72, 12) => ", gcd(30, 72, 12))
println("lcm2(30, 72) => ", lcm2(30, 72))
println("lcm(30, 42, 72) => ", lcm(30, 42, 72))
</syntaxhighlight>
;å®è¡çµæ:<syntaxhighlight lang=text>
gcd2(30, 45) => 15
gcd(30, 72, 12) => 6
lcm2(30, 72) => 360
lcm(30, 42, 72) => 2520
</syntaxhighlight>
===== äºåæ³ =====
{{å
é ã«æ»ã|title=ã³ãŒãã»ã®ã£ã©ãªãŒã«æ»ã|label=ã³ãŒãã®ã£ã©ãªãŒ|style=border-top:1px solid gray;}}
[[W:äºåæ³|äºåæ³]]ããè¥å¹² Julia ãããæžããŠã¿ãŸããã
;äºåæ³:<syntaxhighlight lang=julia line>
# bisectionã¯é¢æ°fã0ã«çãããªãå®æ°xãäºåæ³ã§æ€çŽ¢ããŸãã
# lowãšhighã¯é¢æ°fã®å€ã0ããå°ããç¯å²ã®äžéãšäžéã§ãã
# xã¯çŸåšã®äžç¹ã§ãã
# fxã¯é¢æ°fã®xã®å€ã§ãã
function bisection(low, high, f)
x = (low + high) / 2
fx = f(x)
if abs(fx) < 1.0e-10
return x
end
if fx < 0.0
low = x
else
high = x
end
return bisection(low, high, f)
end
println(bisection(0, 3, (x) -> x - 1))
println(bisection(0, 3, (x) -> x * x - 1))
</syntaxhighlight>
;å®è¡çµæ:<syntaxhighlight lang=text>
0.9999999999417923
1.0000000000291038
</syntaxhighlight>
: [[æ§èª²çš(-2012幎床)é«çåŠæ ¡æ°åŠB/æ°å€èšç®ãšã³ã³ãã¥ãŒã¿ãŒ#2åæ³]]ã®äŸã Julia ã«ç§»æ€ããŸããã
==== çšèªé ====
===== Juliaèšèªã§äœ¿çšãããçšèªã®èª¬æ =====
以äžã¯ãJuliaèšèªã§äœ¿çšãããçšèªã®èª¬æã§ãã
* é¢æ°ïŒFunctionïŒ: ç¹å®ã®åŠçãè¡ãããã®äžé£ã®ããã°ã©ã ã®ããšãæããŸããJuliaã§ã¯ãé¢æ°ã¯functionããŒã¯ãŒãã§å®çŸ©ãããŸãã
* åŒæ°ïŒArgumentïŒ: é¢æ°ã«æž¡ãããå€ã®ããšãæããŸããåŒæ°ã¯ãé¢æ°ã®å®è¡ã«å¿
èŠãªæ
å ±ãæäŸããŸãã
* ãã©ã¡ãŒã¿ïŒParameterïŒ: é¢æ°ã®å®çŸ©ã«ãããŠãé¢æ°ã«æž¡ãããåŒæ°ã®åãæå®ããããã«äœ¿çšãããå€æ°ã®ããšãæããŸãã
* æ»ãå€ïŒReturn valueïŒ: é¢æ°ã®å®è¡çµæãšããŠãé¢æ°ããè¿ãããå€ã®ããšãæããŸãã
* ããŒã¿åïŒData typeïŒ: ããŒã¿ã®çš®é¡ãè¡šãããã«äœ¿çšãããåã®ããšãæããŸããJuliaã§ã¯ãIntãFloat64ãStringãªã©ã®ããŒã¿åããããŸãã
* å€æ°ïŒVariableïŒ: ããŒã¿ãæ ŒçŽããããã®å Žæã®ããšãæããŸããJuliaã§ã¯ãå€æ°ã¯ã=æŒç®åã䜿çšããŠå€ã代å
¥ããããšãã§ããŸãã
* 代å
¥ïŒAssignmentïŒ: å€æ°ã«å€ãæ ŒçŽããããã®æŒç®åã®ããšãæããŸããJuliaã§ã¯ã=æŒç®åã代å
¥æŒç®åãšããŠäœ¿çšãããŸãã
* é
åïŒArrayïŒ: è€æ°ã®èŠçŽ ãæ ŒçŽããããã®ããŒã¿åã®ããšãæããŸããJuliaã§ã¯ãArray{T, N}åããããŸãã
* èŠçŽ ïŒElementïŒ: é
åå
ã«æ ŒçŽãããŠããå€ã®ããšãæããŸãã
* ã€ã³ããã¯ã¹ïŒIndexïŒ: é
åå
ã®èŠçŽ ã«ã¢ã¯ã»ã¹ããããã«äœ¿çšãããçªå·ã®ããšãæããŸãã
* ã¹ã©ã€ã¹ïŒSliceïŒ: é
åããäžéšã®èŠçŽ ãåãåºãããã®æäœã®ããšãæããŸãã
* ã«ãŒãïŒLoopïŒ: ç¹°ãè¿ãåŠçãå®è¡ããããã®æ§æã®ããšãæããŸããJuliaã§ã¯ãforæãwhileæããããŸãã
* æ¡ä»¶åå²ïŒConditional branchingïŒ: æ¡ä»¶ã«ãã£ãŠåŠçãåå²ããããã®æ§æã®ããšãæããŸããJuliaã§ã¯ãifæããããŸãã
* äŸå€åŠçïŒException handlingïŒ: ããã°ã©ã ã®å®è¡äžã«çºçããäŸå€ãåŠçããããã®ä»çµã¿ã®ããšãæããŸã
==== ããŒãã·ãŒã ====
===== Juliaèšèªã§ãã䜿ãããæ§æã®äžèŠ§ =====
以äžã¯ãJuliaèšèªã§ãã䜿ãããæ§æã®äžèŠ§ã§ãã
:<syntaxhighlight lang=julia>
# é¢æ°ã®å®çŸ©
function square(x)
return x^2
end
# æ¡ä»¶åå²
x = 3
if x > 0
println("x is positive")
elseif x < 0
println("x is negative")
else
println("x is zero")
end
# ã«ãŒã
for i in 1:5
println(i)
end
# whileã«ãŒã
i = 1
while i <= 5
println(i)
i += 1
end
# é
åã®èŠçŽ ã®ååŸ
array = [1, 2, 3, 4, 5]
println(array[3])
# é
åã®ã¹ã©ã€ã¹
println(array[2:4])
# 代å
¥
x = 5
y = x + 2
println(y)
# æ¯èŒæŒç®å
x = 5
y = 3
println(x > y)
</syntaxhighlight >
[[ã«ããŽãª:æ°å€è§£æ]]
[[ã«ããŽãª:ããã°ã©ãã³ã°èšèª]] | 2023-03-28T08:33:03Z | 2024-01-31T10:07:45Z | [
"ãã³ãã¬ãŒã:Wikipedia",
"ãã³ãã¬ãŒã:ã³ã©ã ",
"ãã³ãã¬ãŒã:See",
"ãã³ãã¬ãŒã:---",
"ãã³ãã¬ãŒã:å
é ã«æ»ã"
] | https://ja.wikibooks.org/wiki/Julia |
37,408 | é«çåŠæ ¡äžçå²B/1970ã2000幎ããã®äžç | 1960ã80幎代ãããéåœã»å°æ¹Ÿã»ã·ã³ã¬ããŒã«ã»ãã¬ãŒã·ã¢ãå·¥æ¥çã«çºå±ããŠããŠãããã4ãåœã¯NIES(æ°èå·¥æ¥çµæžå°åãããŒãº)ãšåŒã°ããã
æ¥æ¬ã§ã¯50ã60幎代ã«é«åºŠçµæžæé·ãšåŒã°ããæ¥æ¿ãªçµæžçºå±ããšããããNIESã§ã¯10ã20幎ã»ã©é
ããŠå·¥æ¥åããã
ããããŠãã¢ãžã¢ãçºå±ããŠããã¶ãã欧米ããã¯éçšãæµåºãã¯ããããã€ã®ãªã¹ãæ
¢æ§çãªäžæ³ã«ãã¡ãã£ãŠãã€ã®ãªã¹ç
ããšèšãããããã«ãªã£ãææãããã®é (1960幎以é?)ã®æ代ã§ããã
ãªãéåœã§ã¯1963幎ã«è»äººã®æŽæ£ç
(ã㯠ãã§ã³ã)ãã¯ãŒãã¿ãèµ·ãããŠç¬è£çæ¿æš©ãã«ãã£ãŠããã79幎ãŸã§æ¿æš©ã¯ç¶ããã®ã§(79幎ã«ãã¯ãã§ã³ãã¯æ殺ããã)ããã®æ
å¢äžã§çµæžçºå±ããããšã«ãªãã
æ¥æ¬ãšéåœã®åœäº€å埩(1965幎)ã¯ããã¯ãã§ã³ãæ¿æš©äžã§ã®åºæ¥äºã§ãããåœäº€å埩ã®éãéåœã察æ¥è³ åè«æ±æš©ãæŸæ£ãããããã«ãæ¥æ¬ã¯éåœã«çµæžæè³ãååããããšã«ãªã£ãããã®ããã«ããŠãéåœã«æ¥æ¬ãªã©ã®å€è³ãæè³ãããŠãã£ãã
79幎ã«ãã¯ãã§ã³ãã¯æ殺ããã80幎ã«å
å·(ãããã
ã)ã§æ°äž»åéåãèµ·ããã匟å§ãã(å
å·äºä»¶)ããã®åŸãæ°å¹Žã»ã©ç¬è£æ¿æš©ãç¶ãããã88幎ã«éåœæ¿åºã¯æ°äž»å宣èšãè¡ã£ãããŸãã88幎ã«ã¯ãœãŠã«ãªãªã³ããã¯ãéå¬ãããåœéçãªç¥å床ãé«ããã
ãããŠã91幎ã«éåœã¯åæé®®ãšãšãã«åœé£ã«å çããã
å°æ¹Ÿã¯ã1949幎以æ¥ãåœæ°å
ã®ç¬è£æ¿æš©ã80幎代ãããŸã§ç¶ããããã¢ã¡ãªã«ã®å§åãããã87幎ã«æå³ä»€ã解é€ããã88幎ã«åœæ°å
ã®æç»èŒãç·çµ±ã«å°±ä»»ããŠæ°äž»åãæšé²ãã2000幎ãŸã§ã®é·ææ¿æš©ãç¯ããã2000幎ã®éžæã§ã¯ãæ°é²å
ã®é³æ°Žæã«å¹³åã«æ¿æš©äº€ä»£ããã
äžåœã§ã¯89幎ã«å京ã®å€©å®éåºå Žã§åŠçãªã©ã«ããæ°äž»åéåãèµ·ããããæ¿åºã¯ããã匟å§ãã(倩å®éäºä»¶)ã
60ã80幎代ã®éåœãå°æ¹Ÿããç¬è£æ¿æš©äžã§ãã£ãã«ããããããçµæžçºå±ãæ¥éã ã£ãããšãããåœæã¯ãéçºç¬è£ããªã©ãšèšããããããã2000幎代ã«å
¥ã£ãããããã¯ãç¬è£çãªäžåœãçºå±ããããç¬è£çãªãã·ã¢ã¯ããŸãã¡çµæžçºå±ããªãããæ°äž»äž»çŸ©ã®ã€ã³ããçµæžçºå±ããŠããã
ãªããã€ã³ããã·ã¢ã§ã¯1965幎ã«è»éšã®ã¹ãã«ããã¯ãŒãã¿ãèµ·ãããŠæ¿æš©ãã«ããã以éãç¬è£æ¿æš©ã1996幎ãŸã§ç¶ããã
ãã£ãªãã³ã§ã¯ãã«ã³ã¹ã1965幎ããç¬è£ããããã20幎ã»ã©ã®é·æã®ç¬è£ããããã1986幎ã«ãã£ãªãã³ã¯æ°äž»åã
äžåœçµæžã¯81幎ããããåžå ŽéæŸçãªçµæžæ¹é©(人æ°å
¬ç€Ÿã®è§£äœãçç£è«è² æ§ããªã©)ãããŠãããã倩å®éäºä»¶ã«ãšããªãã西åŽè«žåœã¯äžæçã«çµæžå¶è£ããããã以éãäžåœã¯åžå ŽéæŸæ¿çãããããã(äžåœæ¿åºã¯1992幎ããããã«ãæ¹é©ã»éæŸããšãã瀟äŒäž»çŸ©åžå Žçµæžããªã©ãšèšã£ãŠãããã¹ã€ã«90幎代ããäžåœãåžå ŽéæŸãå§ãŸã£ãããã§ã¯ãªãããã§ã«80幎代ããäžåœã¯åžå ŽéæŸãé²ããŠããã)
ãã®90幎代ãããããäžåœãžã®å€è³ã®æè³ã掻çºã«ãªãã¯ãããå®ãè³éãå©çšããŠäžåœçµæžã¯äœäŸ¡æ Œåãã®èŒžåºè£œåãå¢ããã2000幎ããã«ã¯ææãåºå§ããŠãäžåœã¯ãäžçã®å·¥å Žããšèšãããã»ã©ã«ãªã£ãã
äžåœãšãããã ã§ã¯ããœé£ã厩å£ããåãããåžå Žçµæžçãªæ¿çãéšåçã«å°å
¥ããŠããããããã ã86幎ã«è¡ã£ãããã€ã¢ã€ã(å·æ°)æ¿çãããã®ãããªåžå Žçµæžçãªæ¿çã§ããããã€ã¢ã€æ¿çã§ã¯ãå€è³ããã®æè³ã奚å±ãããã
ãã£ãšããœé£èªèº«ã85幎ããããã¬ã¹ããã€ã«ã(建ãŠçŽã)ããã°ã©ã¹ãã¹ãã(æ
å ±å
¬é)ãªã©ã®æ¹é©ãé²ããŠããã
éèæ¥çã§1997幎ã«èµ·ããã¢ãžã¢é貚å±æ©ããã€ã³ã¿ãŒãããã®æ®åãé¢é£ããŠãããšèããããã(ã€ãŸãããããã®æ®åã«ãããéäžåœçžæã®éèååã®å£²è²·ããããããªã£ããã»ã»ã»ãšèããããã) ã¢ãžã¢é貚å±æ©ã§ã¯ãéåœã»ã¿ã€ã»ã€ã³ããã·ã¢ã®é貚ãæŽèœããã
ãªããã¢ãžã¢é貚å±æ©ãããåã®1994幎ã«ã¡ãã·ã³é貚å±æ©ãèµ·ããŠããã
ãããã®é貚å±æ©ã§ã¯ãIMFãäžçéè¡ãèè³ãããã®ã§ãæ··ä¹±ã¯åæããŠãã£ãã
ãªããã€ã³ããã·ã¢ã§ã¹ãã«ãã®ç¬è£æ¿æš©ã厩å£ããã®ã¯1998幎ã§ãããããã¯ã¢ãžã¢é貚å±æ©ã®ç¿å¹Žã§ããã
å¿çåŠè
ã®ããã€ãã掻èºããã®ã1900幎ååŸã
瀟äŒåŠè
ã®ãã¯ã¹=ãŠã§ãŒããŒã掻èºããã®ã1900幎ååŸã
(â» ç§ç®ãçŸä»£ç€ŸäŒãããå«çãã§ãããã€ããããŠã§ãŒããŒã®ååã玹ä»ãããã®ã§ãã)
20äžçŽåŸåã«ã¯ããã§ãããºã ãšããææ³ãæµè¡ã£ãããã§ãããºã ãšã¯ã女æ§å·®å¥ãæ¹å€ããææ³ã
ãªãã€ã¹ã©ã æã®æ矩ã¯ã女æ§ãšç·æ§ã®æ±ããæ確ã«éããã€ã¹ã©ã æã®æ矩ã§ã¯ã女æ§ã¯é 髪ãããã£ã©ã€ã³ãé ãã¹ããšãããŠããããªã®ã§ãã€ã¹ã©ã æãšãã§ãããºã ææ³ãšã¯ã女æ§ã®æ±ãã«ãããŠãææ³çã«å¯Ÿç«ããã
ç空管ãã€ãã£ãã³ã³ãã¥ãŒã¿ãŒã第äºæ¬¡å€§æŠäžã®1940幎代ã«çºæãããããäžè¬åžå Žã«ã¯ããŸã æ®åããŠããªãã
ããã€ã¹ãç空管ã§ãªãåå°äœã«ãªãã®ã1970幎代ããããã§ããã ãããŠã倧äŒæ¥ãŠãŒã¶ãŒãªã©ã§ãªãäžè¬äººçšã®ã³ã³ãã¥ãŒã¿ã§ããããœã³ã³ãæ®åãå§ããã®ã¯ã1980幎代ã®åŸåããããã§ããã
ã€ã³ã¿ãŒããããæ®åããã®ã¯90幎代ããã§ããã
æºåž¯é»è©±ã¯ã1980幎代ããååšããŠããããæ®åããã®ã¯1990幎代ããã§ããã
çç©åŠã§ããã²ãã èšç»(人éã®éºäŒåé
åã®ãã¿ãŒã³ã解æããèšç»)ãå§ãŸã£ãã®ã¯1991幎ããã§ããããã¡ãããã³ã³ãã¥ãŒã¿ãæ®åãããããããããã²ãã ç 究ãåºæ¥ãããã§ããã(ãªãDNAãçºèŠãããã®ã¯1953幎ã§ããã)
ã€ã®ãªã¹ã1960幎代ããããäžæ³ã«é¥ã£ããããããã³ã³ãã¥ãŒã¿æè¡ã¯ææçã«é¢ä¿ããªãããã§ããã
é£è¡æ©ã¯(1910幎代ã®)第äžæ¬¡äžç倧æŠãããåã«ã©ã€ãå
åŒãªã©ã«ãã£ãŠçºæãããŠããã第äžæ¬¡äžç倧æŠã§ã¯å
µåšãšããŠå©çšãããã
ããããžã§ããæ©ãçºæãããã®ã¯(1940幎代ã®)第äºæ¬¡äžç倧æŠããã§ããã
(ãã±ããçãªãã®ã¯ç¬¬äºæ¬¡äžç倧æŠäžã«ãã£ããã)ãã±ããã®éçºãé²ãã ã®ã¯ãæŠåŸã®å·æŠäžã§ãã£ãã ãŸãããã±ããæè¡ãšé¢é£ããŠã人工è¡æã®æã¡äžãã®å®éšãªã©ãè¡ããã1957幎ã«ãœé£ã人工è¡æã¹ããŒããã¯1å·ã®æã¡äžãã«æåããã®ããããããäžçåã®äººå·¥è¡æã
ã¢ã¡ãªã«ã¯æé¢çéžãç®æããã¢ããèšç»ã1969幎ã«æåãã1969幎ã«äººé¡ãåããŠæé¢ã«çéžãããã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "1960ã80幎代ãããéåœã»å°æ¹Ÿã»ã·ã³ã¬ããŒã«ã»ãã¬ãŒã·ã¢ãå·¥æ¥çã«çºå±ããŠããŠãããã4ãåœã¯NIES(æ°èå·¥æ¥çµæžå°åãããŒãº)ãšåŒã°ããã",
"title": "æ±ã¢ãžã¢åšèŸºã®çµæžçºå±ãšæ°äž»å"
},
{
"paragraph_id": 1,
"tag": "p",
"text": "æ¥æ¬ã§ã¯50ã60幎代ã«é«åºŠçµæžæé·ãšåŒã°ããæ¥æ¿ãªçµæžçºå±ããšããããNIESã§ã¯10ã20幎ã»ã©é
ããŠå·¥æ¥åããã",
"title": "æ±ã¢ãžã¢åšèŸºã®çµæžçºå±ãšæ°äž»å"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "ããããŠãã¢ãžã¢ãçºå±ããŠããã¶ãã欧米ããã¯éçšãæµåºãã¯ããããã€ã®ãªã¹ãæ
¢æ§çãªäžæ³ã«ãã¡ãã£ãŠãã€ã®ãªã¹ç
ããšèšãããããã«ãªã£ãææãããã®é (1960幎以é?)ã®æ代ã§ããã",
"title": "æ±ã¢ãžã¢åšèŸºã®çµæžçºå±ãšæ°äž»å"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "ãªãéåœã§ã¯1963幎ã«è»äººã®æŽæ£ç
(ã㯠ãã§ã³ã)ãã¯ãŒãã¿ãèµ·ãããŠç¬è£çæ¿æš©ãã«ãã£ãŠããã79幎ãŸã§æ¿æš©ã¯ç¶ããã®ã§(79幎ã«ãã¯ãã§ã³ãã¯æ殺ããã)ããã®æ
å¢äžã§çµæžçºå±ããããšã«ãªãã",
"title": "æ±ã¢ãžã¢åšèŸºã®çµæžçºå±ãšæ°äž»å"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "æ¥æ¬ãšéåœã®åœäº€å埩(1965幎)ã¯ããã¯ãã§ã³ãæ¿æš©äžã§ã®åºæ¥äºã§ãããåœäº€å埩ã®éãéåœã察æ¥è³ åè«æ±æš©ãæŸæ£ãããããã«ãæ¥æ¬ã¯éåœã«çµæžæè³ãååããããšã«ãªã£ãããã®ããã«ããŠãéåœã«æ¥æ¬ãªã©ã®å€è³ãæè³ãããŠãã£ãã",
"title": "æ±ã¢ãžã¢åšèŸºã®çµæžçºå±ãšæ°äž»å"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "79幎ã«ãã¯ãã§ã³ãã¯æ殺ããã80幎ã«å
å·(ãããã
ã)ã§æ°äž»åéåãèµ·ããã匟å§ãã(å
å·äºä»¶)ããã®åŸãæ°å¹Žã»ã©ç¬è£æ¿æš©ãç¶ãããã88幎ã«éåœæ¿åºã¯æ°äž»å宣èšãè¡ã£ãããŸãã88幎ã«ã¯ãœãŠã«ãªãªã³ããã¯ãéå¬ãããåœéçãªç¥å床ãé«ããã",
"title": "æ±ã¢ãžã¢åšèŸºã®çµæžçºå±ãšæ°äž»å"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "ãããŠã91幎ã«éåœã¯åæé®®ãšãšãã«åœé£ã«å çããã",
"title": "æ±ã¢ãžã¢åšèŸºã®çµæžçºå±ãšæ°äž»å"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "å°æ¹Ÿã¯ã1949幎以æ¥ãåœæ°å
ã®ç¬è£æ¿æš©ã80幎代ãããŸã§ç¶ããããã¢ã¡ãªã«ã®å§åãããã87幎ã«æå³ä»€ã解é€ããã88幎ã«åœæ°å
ã®æç»èŒãç·çµ±ã«å°±ä»»ããŠæ°äž»åãæšé²ãã2000幎ãŸã§ã®é·ææ¿æš©ãç¯ããã2000幎ã®éžæã§ã¯ãæ°é²å
ã®é³æ°Žæã«å¹³åã«æ¿æš©äº€ä»£ããã",
"title": "æ±ã¢ãžã¢åšèŸºã®çµæžçºå±ãšæ°äž»å"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "äžåœã§ã¯89幎ã«å京ã®å€©å®éåºå Žã§åŠçãªã©ã«ããæ°äž»åéåãèµ·ããããæ¿åºã¯ããã匟å§ãã(倩å®éäºä»¶)ã",
"title": "æ±ã¢ãžã¢åšèŸºã®çµæžçºå±ãšæ°äž»å"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "60ã80幎代ã®éåœãå°æ¹Ÿããç¬è£æ¿æš©äžã§ãã£ãã«ããããããçµæžçºå±ãæ¥éã ã£ãããšãããåœæã¯ãéçºç¬è£ããªã©ãšèšããããããã2000幎代ã«å
¥ã£ãããããã¯ãç¬è£çãªäžåœãçºå±ããããç¬è£çãªãã·ã¢ã¯ããŸãã¡çµæžçºå±ããªãããæ°äž»äž»çŸ©ã®ã€ã³ããçµæžçºå±ããŠããã",
"title": "ãéçºç¬è£ã"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "ãªããã€ã³ããã·ã¢ã§ã¯1965幎ã«è»éšã®ã¹ãã«ããã¯ãŒãã¿ãèµ·ãããŠæ¿æš©ãã«ããã以éãç¬è£æ¿æš©ã1996幎ãŸã§ç¶ããã",
"title": "ãéçºç¬è£ã"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "ãã£ãªãã³ã§ã¯ãã«ã³ã¹ã1965幎ããç¬è£ããããã20幎ã»ã©ã®é·æã®ç¬è£ããããã1986幎ã«ãã£ãªãã³ã¯æ°äž»åã",
"title": "ãéçºç¬è£ã"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "",
"title": "ãéçºç¬è£ã"
},
{
"paragraph_id": 13,
"tag": "p",
"text": "äžåœçµæžã¯81幎ããããåžå ŽéæŸçãªçµæžæ¹é©(人æ°å
¬ç€Ÿã®è§£äœãçç£è«è² æ§ããªã©)ãããŠãããã倩å®éäºä»¶ã«ãšããªãã西åŽè«žåœã¯äžæçã«çµæžå¶è£ããããã以éãäžåœã¯åžå ŽéæŸæ¿çãããããã(äžåœæ¿åºã¯1992幎ããããã«ãæ¹é©ã»éæŸããšãã瀟äŒäž»çŸ©åžå Žçµæžããªã©ãšèšã£ãŠãããã¹ã€ã«90幎代ããäžåœãåžå ŽéæŸãå§ãŸã£ãããã§ã¯ãªãããã§ã«80幎代ããäžåœã¯åžå ŽéæŸãé²ããŠããã)",
"title": "äžåœã®åžå ŽéæŸã¯80幎代å§ããã"
},
{
"paragraph_id": 14,
"tag": "p",
"text": "ãã®90幎代ãããããäžåœãžã®å€è³ã®æè³ã掻çºã«ãªãã¯ãããå®ãè³éãå©çšããŠäžåœçµæžã¯äœäŸ¡æ Œåãã®èŒžåºè£œåãå¢ããã2000幎ããã«ã¯ææãåºå§ããŠãäžåœã¯ãäžçã®å·¥å Žããšèšãããã»ã©ã«ãªã£ãã",
"title": "äžåœã®åžå ŽéæŸã¯80幎代å§ããã"
},
{
"paragraph_id": 15,
"tag": "p",
"text": "äžåœãšãããã ã§ã¯ããœé£ã厩å£ããåãããåžå Žçµæžçãªæ¿çãéšåçã«å°å
¥ããŠããããããã ã86幎ã«è¡ã£ãããã€ã¢ã€ã(å·æ°)æ¿çãããã®ãããªåžå Žçµæžçãªæ¿çã§ããããã€ã¢ã€æ¿çã§ã¯ãå€è³ããã®æè³ã奚å±ãããã",
"title": "å
±ç£åã®ç¬èªã®åžå Žçµæžæ¿ç"
},
{
"paragraph_id": 16,
"tag": "p",
"text": "ãã£ãšããœé£èªèº«ã85幎ããããã¬ã¹ããã€ã«ã(建ãŠçŽã)ããã°ã©ã¹ãã¹ãã(æ
å ±å
¬é)ãªã©ã®æ¹é©ãé²ããŠããã",
"title": "å
±ç£åã®ç¬èªã®åžå Žçµæžæ¿ç"
},
{
"paragraph_id": 17,
"tag": "p",
"text": "éèæ¥çã§1997幎ã«èµ·ããã¢ãžã¢é貚å±æ©ããã€ã³ã¿ãŒãããã®æ®åãé¢é£ããŠãããšèããããã(ã€ãŸãããããã®æ®åã«ãããéäžåœçžæã®éèååã®å£²è²·ããããããªã£ããã»ã»ã»ãšèããããã) ã¢ãžã¢é貚å±æ©ã§ã¯ãéåœã»ã¿ã€ã»ã€ã³ããã·ã¢ã®é貚ãæŽèœããã",
"title": "é貚å±æ©"
},
{
"paragraph_id": 18,
"tag": "p",
"text": "ãªããã¢ãžã¢é貚å±æ©ãããåã®1994幎ã«ã¡ãã·ã³é貚å±æ©ãèµ·ããŠããã",
"title": "é貚å±æ©"
},
{
"paragraph_id": 19,
"tag": "p",
"text": "ãããã®é貚å±æ©ã§ã¯ãIMFãäžçéè¡ãèè³ãããã®ã§ãæ··ä¹±ã¯åæããŠãã£ãã",
"title": "é貚å±æ©"
},
{
"paragraph_id": 20,
"tag": "p",
"text": "ãªããã€ã³ããã·ã¢ã§ã¹ãã«ãã®ç¬è£æ¿æš©ã厩å£ããã®ã¯1998幎ã§ãããããã¯ã¢ãžã¢é貚å±æ©ã®ç¿å¹Žã§ããã",
"title": "é貚å±æ©"
},
{
"paragraph_id": 21,
"tag": "p",
"text": "",
"title": "é貚å±æ©"
},
{
"paragraph_id": 22,
"tag": "p",
"text": "å¿çåŠè
ã®ããã€ãã掻èºããã®ã1900幎ååŸã",
"title": "ææ³ã»æåãªã©"
},
{
"paragraph_id": 23,
"tag": "p",
"text": "瀟äŒåŠè
ã®ãã¯ã¹=ãŠã§ãŒããŒã掻èºããã®ã1900幎ååŸã",
"title": "ææ³ã»æåãªã©"
},
{
"paragraph_id": 24,
"tag": "p",
"text": "(â» ç§ç®ãçŸä»£ç€ŸäŒãããå«çãã§ãããã€ããããŠã§ãŒããŒã®ååã玹ä»ãããã®ã§ãã)",
"title": "ææ³ã»æåãªã©"
},
{
"paragraph_id": 25,
"tag": "p",
"text": "20äžçŽåŸåã«ã¯ããã§ãããºã ãšããææ³ãæµè¡ã£ãããã§ãããºã ãšã¯ã女æ§å·®å¥ãæ¹å€ããææ³ã",
"title": "ææ³ã»æåãªã©"
},
{
"paragraph_id": 26,
"tag": "p",
"text": "ãªãã€ã¹ã©ã æã®æ矩ã¯ã女æ§ãšç·æ§ã®æ±ããæ確ã«éããã€ã¹ã©ã æã®æ矩ã§ã¯ã女æ§ã¯é 髪ãããã£ã©ã€ã³ãé ãã¹ããšãããŠããããªã®ã§ãã€ã¹ã©ã æãšãã§ãããºã ææ³ãšã¯ã女æ§ã®æ±ãã«ãããŠãææ³çã«å¯Ÿç«ããã",
"title": "ææ³ã»æåãªã©"
},
{
"paragraph_id": 27,
"tag": "p",
"text": "ç空管ãã€ãã£ãã³ã³ãã¥ãŒã¿ãŒã第äºæ¬¡å€§æŠäžã®1940幎代ã«çºæãããããäžè¬åžå Žã«ã¯ããŸã æ®åããŠããªãã",
"title": "å
¥è©Šã«åºã¥ããããïŒ"
},
{
"paragraph_id": 28,
"tag": "p",
"text": "ããã€ã¹ãç空管ã§ãªãåå°äœã«ãªãã®ã1970幎代ããããã§ããã ãããŠã倧äŒæ¥ãŠãŒã¶ãŒãªã©ã§ãªãäžè¬äººçšã®ã³ã³ãã¥ãŒã¿ã§ããããœã³ã³ãæ®åãå§ããã®ã¯ã1980幎代ã®åŸåããããã§ããã",
"title": "å
¥è©Šã«åºã¥ããããïŒ"
},
{
"paragraph_id": 29,
"tag": "p",
"text": "ã€ã³ã¿ãŒããããæ®åããã®ã¯90幎代ããã§ããã",
"title": "å
¥è©Šã«åºã¥ããããïŒ"
},
{
"paragraph_id": 30,
"tag": "p",
"text": "æºåž¯é»è©±ã¯ã1980幎代ããååšããŠããããæ®åããã®ã¯1990幎代ããã§ããã",
"title": "å
¥è©Šã«åºã¥ããããïŒ"
},
{
"paragraph_id": 31,
"tag": "p",
"text": "çç©åŠã§ããã²ãã èšç»(人éã®éºäŒåé
åã®ãã¿ãŒã³ã解æããèšç»)ãå§ãŸã£ãã®ã¯1991幎ããã§ããããã¡ãããã³ã³ãã¥ãŒã¿ãæ®åãããããããããã²ãã ç 究ãåºæ¥ãããã§ããã(ãªãDNAãçºèŠãããã®ã¯1953幎ã§ããã)",
"title": "å
¥è©Šã«åºã¥ããããïŒ"
},
{
"paragraph_id": 32,
"tag": "p",
"text": "ã€ã®ãªã¹ã1960幎代ããããäžæ³ã«é¥ã£ããããããã³ã³ãã¥ãŒã¿æè¡ã¯ææçã«é¢ä¿ããªãããã§ããã",
"title": "å
¥è©Šã«åºã¥ããããïŒ"
},
{
"paragraph_id": 33,
"tag": "p",
"text": "é£è¡æ©ã¯(1910幎代ã®)第äžæ¬¡äžç倧æŠãããåã«ã©ã€ãå
åŒãªã©ã«ãã£ãŠçºæãããŠããã第äžæ¬¡äžç倧æŠã§ã¯å
µåšãšããŠå©çšãããã",
"title": "å
¥è©Šã«åºã¥ããããïŒ"
},
{
"paragraph_id": 34,
"tag": "p",
"text": "ããããžã§ããæ©ãçºæãããã®ã¯(1940幎代ã®)第äºæ¬¡äžç倧æŠããã§ããã",
"title": "å
¥è©Šã«åºã¥ããããïŒ"
},
{
"paragraph_id": 35,
"tag": "p",
"text": "",
"title": "å
¥è©Šã«åºã¥ããããïŒ"
},
{
"paragraph_id": 36,
"tag": "p",
"text": "(ãã±ããçãªãã®ã¯ç¬¬äºæ¬¡äžç倧æŠäžã«ãã£ããã)ãã±ããã®éçºãé²ãã ã®ã¯ãæŠåŸã®å·æŠäžã§ãã£ãã ãŸãããã±ããæè¡ãšé¢é£ããŠã人工è¡æã®æã¡äžãã®å®éšãªã©ãè¡ããã1957幎ã«ãœé£ã人工è¡æã¹ããŒããã¯1å·ã®æã¡äžãã«æåããã®ããããããäžçåã®äººå·¥è¡æã",
"title": "å
¥è©Šã«åºã¥ããããïŒ"
},
{
"paragraph_id": 37,
"tag": "p",
"text": "ã¢ã¡ãªã«ã¯æé¢çéžãç®æããã¢ããèšç»ã1969幎ã«æåãã1969幎ã«äººé¡ãåããŠæé¢ã«çéžãããã",
"title": "å
¥è©Šã«åºã¥ããããïŒ"
}
] | null | == æ±ã¢ãžã¢åšèŸºã®çµæžçºå±ãšæ°äž»å ==
1960ã80幎代ãããéåœã»å°æ¹Ÿã»ã·ã³ã¬ããŒã«ã»ãã¬ãŒã·ã¢ãå·¥æ¥çã«çºå±ããŠããŠãããã4ãåœã¯'''NIES'''ïŒæ°èå·¥æ¥çµæžå°åãããŒãºïŒãšåŒã°ããã
æ¥æ¬ã§ã¯50ã60幎代ã«é«åºŠçµæžæé·ãšåŒã°ããæ¥æ¿ãªçµæžçºå±ããšããããNIESã§ã¯10ã20幎ã»ã©é
ããŠå·¥æ¥åããã
ããããŠãã¢ãžã¢ãçºå±ããŠããã¶ãã欧米ããã¯éçšãæµåºãã¯ããããã€ã®ãªã¹ãæ
¢æ§çãªäžæ³ã«ãã¡ãã£ãŠãã€ã®ãªã¹ç
ããšèšãããããã«ãªã£ãææãããã®é ïŒ1960幎以éïŒïŒã®æ代ã§ããã
ãªãéåœã§ã¯1963幎ã«è»äººã®æŽæ£ç
ïŒã㯠ãã§ã³ãïŒãã¯ãŒãã¿ãèµ·ãããŠç¬è£çæ¿æš©ãã«ãã£ãŠããã79幎ãŸã§æ¿æš©ã¯ç¶ããã®ã§ïŒ79幎ã«ãã¯ãã§ã³ãã¯æ殺ãããïŒããã®æ
å¢äžã§çµæžçºå±ããããšã«ãªãã
æ¥æ¬ãšéåœã®åœäº€å埩ïŒ1965幎ïŒã¯ããã¯ãã§ã³ãæ¿æš©äžã§ã®åºæ¥äºã§ãããåœäº€å埩ã®éãéåœã察æ¥è³ åè«æ±æš©ãæŸæ£ãããããã«ãæ¥æ¬ã¯éåœã«çµæžæè³ãååããããšã«ãªã£ãããã®ããã«ããŠãéåœã«æ¥æ¬ãªã©ã®å€è³ãæè³ãããŠãã£ãã
79幎ã«ãã¯ãã§ã³ãã¯æ殺ããã80幎ã«å
å·ïŒãããã
ãïŒã§æ°äž»åéåãèµ·ããã匟å§ããïŒå
å·äºä»¶ïŒããã®åŸãæ°å¹Žã»ã©ç¬è£æ¿æš©ãç¶ãããã88幎ã«éåœæ¿åºã¯æ°äž»å宣èšãè¡ã£ãããŸãã88幎ã«ã¯ãœãŠã«ãªãªã³ããã¯ãéå¬ãããåœéçãªç¥å床ãé«ããã
ãããŠã91幎ã«éåœã¯åæé®®ãšãšãã«åœé£ã«å çããã
å°æ¹Ÿã¯ã1949幎以æ¥ãåœæ°å
ã®ç¬è£æ¿æš©ã80幎代ãããŸã§ç¶ããããã¢ã¡ãªã«ã®å§åãããã87幎ã«æå³ä»€ã解é€ããã88幎ã«åœæ°å
ã®æç»èŒãç·çµ±ã«å°±ä»»ããŠæ°äž»åãæšé²ãã2000幎ãŸã§ã®é·ææ¿æš©ãç¯ããã2000幎ã®éžæã§ã¯ãæ°é²å
ã®é³æ°Žæã«å¹³åã«æ¿æš©äº€ä»£ããã
äžåœã§ã¯89幎ã«å京ã®å€©å®éåºå Žã§åŠçãªã©ã«ããæ°äž»åéåãèµ·ããããæ¿åºã¯ããã匟å§ããïŒå€©å®éäºä»¶ïŒã
== ãéçºç¬è£ã ==
60ã80幎代ã®éåœãå°æ¹Ÿããç¬è£æ¿æš©äžã§ãã£ãã«ããããããçµæžçºå±ãæ¥éã ã£ãããšãããåœæã¯ãéçºç¬è£ããªã©ãšèšããããããã2000幎代ã«å
¥ã£ãããããã¯ãç¬è£çãªäžåœãçºå±ããããç¬è£çãªãã·ã¢ã¯ããŸãã¡çµæžçºå±ããªãããæ°äž»äž»çŸ©ã®ã€ã³ããçµæžçºå±ããŠããã
:â» ããããæŽå²çã«ã¯ããã€ãåžåœã®ãŽã£ã«ãã«ã 1äžã«ããç¬è£äžã§ã®çµæžçºå±ãªã©ããããããéçºç¬è£ããšããèšèã«ãããŸãçµæžåŠçã«æ·±ã䟡å€ã¯ç¡ãã ããã
ãªããã€ã³ããã·ã¢ã§ã¯1965幎ã«è»éšã®ã¹ãã«ããã¯ãŒãã¿ãèµ·ãããŠæ¿æš©ãã«ããã以éãç¬è£æ¿æš©ã1996幎ãŸã§ç¶ããã
ãã£ãªãã³ã§ã¯ãã«ã³ã¹ã1965幎ããç¬è£ããããã20幎ã»ã©ã®é·æã®ç¬è£ããããã1986幎ã«ãã£ãªãã³ã¯æ°äž»åã
== äžåœã®åžå ŽéæŸã¯80幎代å§ããã ==
äžåœçµæžã¯81幎ããããåžå ŽéæŸçãªçµæžæ¹é©ïŒäººæ°å
¬ç€Ÿã®è§£äœãçç£è«è² æ§ããªã©ïŒãããŠãããã倩å®éäºä»¶ã«ãšããªãã西åŽè«žåœã¯äžæçã«çµæžå¶è£ããããã以éãäžåœã¯åžå ŽéæŸæ¿çããããããïŒäžåœæ¿åºã¯1992幎ããããã«ãæ¹é©ã»éæŸããšãã瀟äŒäž»çŸ©åžå Žçµæžããªã©ãšèšã£ãŠãããã¹ã€ã«90幎代ããäžåœãåžå ŽéæŸãå§ãŸã£ãããã§ã¯ãªãããã§ã«80幎代ããäžåœã¯åžå ŽéæŸãé²ããŠãããïŒ
ãã®90幎代ãããããäžåœãžã®å€è³ã®æè³ã掻çºã«ãªãã¯ãããå®ãè³éãå©çšããŠäžåœçµæžã¯äœäŸ¡æ Œåãã®èŒžåºè£œåãå¢ããã2000幎ããã«ã¯ææãåºå§ããŠãäžåœã¯ãäžçã®å·¥å Žããšèšãããã»ã©ã«ãªã£ãã
== å
±ç£åã®ç¬èªã®åžå Žçµæžæ¿ç ==
äžåœãšãããã ã§ã¯ããœé£ã厩å£ããåãããåžå Žçµæžçãªæ¿çãéšåçã«å°å
¥ããŠããããããã ã86幎ã«è¡ã£ã'''ããã€ã¢ã€'''ãïŒå·æ°ïŒæ¿çãããã®ãããªåžå Žçµæžçãªæ¿çã§ããããã€ã¢ã€æ¿çã§ã¯ãå€è³ããã®æè³ã奚å±ãããã
ãã£ãšããœé£èªèº«ã85幎ããããã¬ã¹ããã€ã«ãïŒå»ºãŠçŽãïŒããã°ã©ã¹ãã¹ããïŒæ
å ±å
¬éïŒãªã©ã®æ¹é©ãé²ããŠããã
== é貚å±æ© ==
éèæ¥çã§1997幎ã«èµ·ããã¢ãžã¢é貚å±æ©ããã€ã³ã¿ãŒãããã®æ®åãé¢é£ããŠãããšèãããããïŒã€ãŸãããããã®æ®åã«ãããéäžåœçžæã®éèååã®å£²è²·ããããããªã£ããã»ã»ã»ãšèãããããïŒ ã¢ãžã¢é貚å±æ©ã§ã¯ãéåœã»ã¿ã€ã»ã€ã³ããã·ã¢ã®é貚ãæŽèœããã
ãªããã¢ãžã¢é貚å±æ©ãããåã®1994幎ã«ã¡ãã·ã³é貚å±æ©ãèµ·ããŠããã
ãããã®é貚å±æ©ã§ã¯ãIMFãäžçéè¡ãèè³ãããã®ã§ãæ··ä¹±ã¯åæããŠãã£ãã
ãªããã€ã³ããã·ã¢ã§ã¹ãã«ãã®ç¬è£æ¿æš©ã厩å£ããã®ã¯1998幎ã§ãããããã¯ã¢ãžã¢é貚å±æ©ã®ç¿å¹Žã§ããã
== ææ³ã»æåãªã© ==
å¿çåŠè
ã®ããã€ãã掻èºããã®ã1900幎ååŸã
瀟äŒåŠè
ã®ãã¯ã¹ïŒãŠã§ãŒããŒã掻èºããã®ã1900幎ååŸã
ïŒâ» ç§ç®ãçŸä»£ç€ŸäŒãããå«çãã§ãããã€ããããŠã§ãŒããŒã®ååã玹ä»ãããã®ã§ããïŒ
20äžçŽåŸåã«ã¯ã'''ãã§ãããºã '''ãšããææ³ãæµè¡ã£ãããã§ãããºã ãšã¯ã女æ§å·®å¥ãæ¹å€ããææ³ã
ãªãã€ã¹ã©ã æã®æ矩ã¯ã女æ§ãšç·æ§ã®æ±ããæ確ã«éããã€ã¹ã©ã æã®æ矩ã§ã¯ã女æ§ã¯é 髪ãããã£ã©ã€ã³ãé ãã¹ããšãããŠããããªã®ã§ãã€ã¹ã©ã æãšãã§ãããºã ææ³ãšã¯ã女æ§ã®æ±ãã«ãããŠãææ³çã«å¯Ÿç«ããã
ãã§ãããºã ææ³ã«ã€ããŠã¯æè²åŠãªã©ããåŠåçã«ãæ¹å€ãåºãããŠããã西æŽã®å¥³æ§ã§äžç£éçŽä»¥äžã§å¥³æ§ã§ç°æ§æè
ã®äººã®ç«å Žãåæã«ããŠããŠå·®å¥çã§ããããšããæ¹å€ããã<ref>é
äºæ ã»ãç·šèããããããæè²ç€ŸäŒåŠããããã«ãŽã¡æžæ¿ã2012幎4æ20æ¥ åç 第1å· çºè¡ãP.19</ref>ã
ããã§ãããºã ã¯ãæè²äººçš®ãåŽåè
éçŽãåæ§æè
ã第äžäžçïŒã¢ããªã«ãåç±³ãäžæ±ãªã©ïŒã®ç«å Žãç¡èŠããŠãã西æŽäžå¿çãªçºæ³ãã§ãããšããæ¹å€ããã<ref>é
äºæ ã»ãç·šèããããããæè²ç€ŸäŒåŠããããã«ãŽã¡æžæ¿ã2012幎4æ20æ¥ åç 第1å· çºè¡ãP.19</ref>ã
== å
¥è©Šã«åºã¥ããããïŒ ==
=== æè¡ ===
==== é»åæè¡ ====
ç空管ãã€ãã£ãã³ã³ãã¥ãŒã¿ãŒã第äºæ¬¡å€§æŠäžã®1940幎代ã«çºæãããããäžè¬åžå Žã«ã¯ããŸã æ®åããŠããªãã
ããã€ã¹ãç空管ã§ãªãåå°äœã«ãªãã®ã1970幎代ããããã§ããã
ãããŠã倧äŒæ¥ãŠãŒã¶ãŒãªã©ã§ãªãäžè¬äººçšã®ã³ã³ãã¥ãŒã¿ã§ããããœã³ã³ãæ®åãå§ããã®ã¯ã1980幎代ã®åŸåããããã§ããã
ã€ã³ã¿ãŒããããæ®åããã®ã¯90幎代ããã§ããã
æºåž¯é»è©±ã¯ã1980幎代ããååšããŠããããæ®åããã®ã¯1990幎代ããã§ããã
çç©åŠã§ããã²ãã èšç»ïŒäººéã®éºäŒåé
åã®ãã¿ãŒã³ã解æããèšç»ïŒãå§ãŸã£ãã®ã¯1991幎ããã§ããããã¡ãããã³ã³ãã¥ãŒã¿ãæ®åãããããããããã²ãã ç 究ãåºæ¥ãããã§ãããïŒãªãDNAãçºèŠãããã®ã¯1953幎ã§ãããïŒ
ã€ã®ãªã¹ã1960幎代ããããäžæ³ã«é¥ã£ããããããã³ã³ãã¥ãŒã¿æè¡ã¯ææçã«é¢ä¿ããªãããã§ããã
==== èªç©ºæè¡ããã³å®å®é²åº ====
é£è¡æ©ã¯ïŒ1910幎代ã®ïŒç¬¬äžæ¬¡äžç倧æŠãããåã«ã©ã€ãå
åŒãªã©ã«ãã£ãŠçºæãããŠããã第äžæ¬¡äžç倧æŠã§ã¯å
µåšãšããŠå©çšãããã
ããããžã§ããæ©ãçºæãããã®ã¯ïŒ1940幎代ã®ïŒç¬¬äºæ¬¡äžç倧æŠããã§ããã
:ïŒâ» ãªãããžã§ããæ©ããšããã®ã¯ãçæãåŽåºããŠé£ã¶é£è¡æ©ã®ããšããããŸã§ã®é£è¡æ©ã¯ããããã©ãåããŠé£ã¶ä»çµã¿ãïŒ
:ïŒâ» ãžã§ããæ©ã®å©ç¹ãšããŠãé«éã§ããããšãšãé«åºŠãé«ãããšããããé«åºŠãé«ããªããšã空æ°ãããããªãããããããã©æ©ã§ã¯äžãããªãã®ã§ãããïŒïŒâ» é³éã«å°éããé£è¡æ©ã®æè¡ãããžã§ããæ©ã®æè¡ãïŒ
:ïŒâ» ãŠã£ãããã£ã¢ã第1äžä»£ãžã§ããæŠéæ©ãã®èšäºã«ãããšãB29ïŒWW2äžã®æ±äº¬å€§ç©ºè¥²ãªã©ã«å©çšãããé£è¡æ©ïŒã¯ããžã§ããæ©ã§ã¯ãªãããããïŒ
ïŒãã±ããçãªãã®ã¯ç¬¬äºæ¬¡äžç倧æŠäžã«ãã£ãããïŒãã±ããã®éçºãé²ãã ã®ã¯ãæŠåŸã®å·æŠäžã§ãã£ãã
ãŸãããã±ããæè¡ãšé¢é£ããŠã人工è¡æã®æã¡äžãã®å®éšãªã©ãè¡ããã1957幎ã«ãœé£ã人工è¡æã¹ããŒããã¯1å·ã®æã¡äžãã«æåããã®ããããããäžçåã®äººå·¥è¡æã
ã¢ã¡ãªã«ã¯æé¢çéžãç®æããã¢ããèšç»ã1969幎ã«æåãã1969幎ã«äººé¡ãåããŠæé¢ã«çéžãããã
:ïŒâ» ãã±ããããžã§ããæ©ããçæãåŽåºããŠé£è¡ãããšããä»çµã¿ã¯åããçŸåšã§ã¯ãæã¡äžãçšã«äœ¿ããããã®ãããã±ããããšåŒã¶ã®ãäžè¬çããªãå
µåšçšã®ãã±ããã¯ãæäžãçšãã±ããã«åŒŸè¬ãªã©ãæèŒãããã®ãïŒ
[[ã«ããŽãª:20äžçŽ]] | 2023-04-02T10:08:55Z | 2023-12-12T07:55:54Z | [] | https://ja.wikibooks.org/wiki/%E9%AB%98%E7%AD%89%E5%AD%A6%E6%A0%A1%E4%B8%96%E7%95%8C%E5%8F%B2B/1970%E3%80%9C2000%E5%B9%B4%E3%81%94%E3%82%8D%E3%81%AE%E4%B8%96%E7%95%8C |
37,409 | é«çåŠæ ¡äžçå²B/ã¢ã¡ãªã«ã®èŠæš©ãšå·æŠã®å±é | äžçææ
ã®åŸã欧米䞻èŠåœã¯ãããã¯çµæžãæšãé²ããããã®ãããªãããã¯çµæžãåœå®¶éã®å¯Ÿç«ãçãã§æŠäºã®äžå ã«ãªã£ããšããåçã«ããšã¥ãã第äºæ¬¡å€§æŠæã®çµç€ãããããæŠåŸã®åœéçµæžã®ãããããåœéäŒè°ã§è©±ãåãããã
1944幎ã«ã¢ã¡ãªã«ã®ãã¬ãã³ãŠããºã§ã®åœéäŒè°ã話ãåãã(ãã¬ãã³ãŠããºäŒè°ããã¬ãã³ãŠããºåæãBretton Woods Agreement)ããããã®äŒè°ãªã©ã«ãããèªç±è²¿æãæšé²ããããŸãåœéçãªçµæžã®å®å®åã®ããåœéé貚åºé(IMFã1947幎ããInternational Monetary Fund)ãåœé埩èéçºéè¡(IBRDã1946幎ããInternational Bank for Raconstructuion)ãèšç«ãããã
ãŸããé¢çšåã³è²¿æã«é¢ããäžè¬åå®(GATTããã¬ãããã1948幎çºå¹ãGeneral Agreement on Tariffs and Trade)ã§ã¯é¢çšã®åŒãäžããªã©ã®èªç±è²¿æãç®æãããããã®ãããªç¬¬äºæ¬¡å€§æŠã®çµæžç§©åºããã¬ãã³ã»ãŠããºäœå¶ãŸãã¯IMF=GATTäœå¶ãšããã
ææŠåœã®ãã€ããšæ¥æ¬ã§ã¯ãæŠååœã®è¡ãè£å€ã«ãã£ãŠããã€ããšæ¥æ¬ã®æŠäºæå°è
ãã¡ãè£ãããã
ãã€ãã§ã¯ãã¥ã«ã³ãã«ã¯åœéè»äºè£å€ãæ¥æ¬ã§ã¯æ¥µæ±åœéè»äºè£å€(æ±äº¬è£å€)ãè¡ãããã
ãããŠãåŸæ¥ã®æŠäºç¯çœª(æèèåŸ
ãªã©)ã«ãã眪ãåãã®ã«å ããæ°ãã«å ãã£ããå¹³åã«å¯Ÿãã眪ãã«ãã£ãŠãè£ãããã
ãã¥ã«ã³ãã«ã¯è£å€ã§ã¯ãããã¹ã®æå°è
ãã¡ãè£ãããã(â» æ€å®æç§æžãããããèšãæ¹ãããŠãã®ã¯ãããšãåœéæ³éåããããã€ãè»å¹¹éšã§ããããã¹åºèº«ã§ãªããã€ãã®åéãšãªãŒãè»åŠæ ¡åºèº«ã®è»äººã ã£ãé£äž(ãšãŒãªããã»ãã©ã³ã»ãã³ã·ã¥ã¿ã€ã³ãã°ããŒãªã¢ã³ãªã©)ã¯è»œã眰ã ã£ãããã)
ããããæŠååœã«ããæŠäºç¯çœªã«ã€ããŠã¯ããããã®è£å€ã§ã¯åãããªãã£ãã®ã§ãåœæããæèè
ã«ã¯ãäžå
¬å¹³ããªè£å€ã ãšåé¡èŠãããŠããã
第äºæ¬¡äžç倧æŠåŸãæ±ãšãŒãããè«žåœã®å€ãã«ã¯ãœé£ãé²é§ãããŸããªãæ±ãšãŒãããã«ç€ŸäŒäž»çŸ©åœãå€ãèªçããã
ã¢ã¡ãªã«ã»ã€ã®ãªã¹ã¯ããã®ãããªæ±ãšãŒãããã®ç¶æ³ãããœé£ã®äŸµç¥ãšããŠãšãããŠèŠæããããã®ç±³ãœã®å¯Ÿç«ãå·æŠ(Cold War )ãšããããŸããã€ã®ãªã¹ã®åéŠçžãã£ãŒãã«ã¯å·æŠã«ã€ããŠã1946幎ããœé£ããéã®ã«ãŒãã³ããéãããŠãšãŒããããåæããŠãããšããŠããœé£ãæ¹å€ããã
ã¢ã¡ãªã«ã¯1947幎ã«å
±ç£äž»çŸ©åœãå°ã蟌ããç®çã§ãã«ãŒãã³-ãã¯ããªã³(Truman Doctrine )ãçºè¡šããã ãŸãã西åŽè«žåœãçµæžæŽå©ããèšç»ã®ããŒã·ã£ã«-ãã©ã³(Marshall Plan )ãçºè¡šãå®æœããã
1948幎6æã西åŽããœé£æãã§ãã€ãã®é貚æ¹é©ãããããšã«åçºãããœé£ã¯è¥¿ãã«ãªã³ãžã®äº€éè·¯ãé®æãã(ãã«ãªã³å°é)ãããã西åŽã¯ç©ºèŒžã§ç©è³ã茞éããŠå¯Ÿæããã
1949幎ãæ±åŽ(ãœé£åŽ)ã¯ãæ±åŽåå
ã®çµæžååæ©æ§ãšããŠã³ã¡ã³ã³(COMECONãçµæžçžäºæŽå©äŒè°)ãèšç«ãã
ãã£ãœãã1949幎5æãè±ç±³ä»ãäžå¿ãšãã西åŽè«žåœã¯ãè»äºåççãªåœéæ©æ§ãšããŠãå倧西æŽæ¡çŽæ©æ§(NATOãããããŒããšèªã)ãèšç«ããã
ãªã1945幎ããœé£ã¯ãã«ãªã³å°éã®å€±æãã¿ãšãã1945幎5æã«ãœé£ã¯ãã«ãªã³å°éã解é€ããããããŠå1945幎ã®ç§ã«ããã€ãé£éŠå
±ååœ(西ãã€ã)ããã³ãã€ãæ°äž»å
±ååœ(æ±ãã€ã)ãæç«ããã
ã€ã®ãªã¹ã¯å€§æŠã§ç²åŒããæ€æ°å°ãç¶æããåã倱ã£ãŠããããŸãã€ã®ãªã¹æ¬åœã§æ€æ°å°ã®ç¶æã®ããã®è»äºè²»ãªã©ã®è² æ
ãåé¡èŠãããããšçã®çç±ãããã€ã®ãªã¹ã¯æ€æ°å°ã®ç¬ç«ã«ã¯ååçã«ãªã£ãã
ããããã€ã³ãã§ã¯çŸå°ã®ã¢ãžã¢äººãã¡ããç¬ç«åŸã®åœã®æ¹éãå®æäžã®æ¹éãããã£ãŠã(çŸå°ã¢ãžã¢äººã©ããã§)察ç«ãããå
šã€ã³ãã®çµ±äžãéèŠããåœæ°äŒè°æŽŸã®ã¬ã³ãã£ãŒããã³ãã«ãŒããšãäžæ¹ããžã³ããŒã²ãããã ã¹ãªã åœå®¶ã®åé¢ç¬ç«ãããšããå
šã€ã³ã=ã ã¹ãªã é£çã察ç«ããã
ãããŠãã²ãšãŸãã1947幎ã«ããã³ãã¥ãŒæåŸã®å€ãã€ã³ãé£éŠãšãã ã¹ãªã ã®å€ãããã¹ã¿ã³å
±ååœã«åãããŠãã»ãŒåæã«ã€ã®ãªã¹ããç¬ç«ããã
ãã®åŸããã³ãã¥ãŒãšã ã¹ãªã ã®å¯Ÿç«ãæ¿åããæŠåè¡çªãããèåã説ãã¬ã³ãã£ãŒã¯ãæ¥é²æŽŸãã³ãã¥ãŒæåŸã«ãã£ãŠæ殺ãããŠããŸã£ã(1948幎)ã
ããã¹ã¿ã³ã¯åœæãã€ã³ããæãã§æ±è¥¿ã«é åããã£ãŠãããæ±ããã¹ã¿ã³ãããã¹ã¿ã³ããã®ç¬ç«ãããšãããšã€ã³ãã¯ãããæ¯æŽãã1971幎ã«ã€ã³ãã¯è¥¿ããã¹ã¿ã³ã«äŸµæ»ãã1971幎ã«æ±ããã¹ã¿ã³ã¯ãã³ã°ã©ãã·ã¥ãšããŠç¬ç«ããã
ã€ã³ããšããã¹ã¿ã³ã¯ãã«ã·ããŒã«å°æ¹ã®åž°å±ãããã£ãŠããã³ãã³æŠåè¡çªãã
1945幎ãããŒããã³ã¯ãããã 人æ°å
±ååœã®ç¬ç«ã宣èšããããå®äž»åœãã©ã³ã¹ã¯ãããèªããããããã ã«ãã©ã³ã¹è»ã掟å
µããã€ã³ãã·ãæŠäºã«ãªã£ãã
ãã©ã³ã¹ã¯49幎ãããæã®æ§çåžããª=ãã€ãããŠããããã åœãæš¹ç«ãããã54幎ã«ãã£ãšã³ããšã³ããŒã®æŠãã§ãã©ã³ã¹ã¯æåãããžã¥ããŒãäŒæŠåå®ãçµãã§ãã©ã³ã¹ã¯ã€ã³ãã·ãããæ€éããã
çµæããããã ã¯åç·¯17床ç·ãåºæºã«ããŠãååŽããããã æ°äž»å
±ååœãååŽããããã åœãšãªã£ããããããŠãããã ã¯ãåå2ã€ã®åœå®¶ã«åè£ããã
(ã¢ã¡ãªã«æ€æ°å°ã®)ãã£ãªãã³ã«ã€ããŠã¯ãæŠåããã®ç¬ç«ã®çŽæã©ãã(倪平æŽæŠäºã«ãã£ãŠå°ãé
ããã)ãã¢ã¡ãªã«ã¯1946幎ã«ãã£ãªãã³ã®ç¬ç«ãèªããã
(ãªã©ã³ãæ€æ°å°ã®)ã€ã³ããã·ã¢ã§ã¯ãæ¥æ¬ã®ææŠçŽåŸã®1945幎8æ17æ¥ã«ã¹ã«ã«ããç¬ç«ã宣èšããããå®äž»åœãªã©ã³ãã¯ç¬ç«ãèªãããæŠäºã«ãªã£ãã4幎ããŸãã®ç¬ç«æŠäºã®ããã1949幎ã«ã€ã³ããã·ã¢ã¯ç¬ç«ãèªããããã
(ã€ã®ãªã¹æ€æ°å°ã®)ãã¬ãŒå島ã§ã¯ãã²ãšãŸã1948幎ã«ã€ã®ãªã¹é ãã©ã€é£éŠãæç«ãã1957幎ã«ç¬ç«åœã®ããã©ã€é£éŠããšãªãã63幎ã«ç¬ç«åœã®ãã¬ãŒã·ã¢ã«ãªã£ãããã®åŸãäžåœäººã®å€ãã·ã³ã¬ããŒã«ã1965幎ã«ãã¬ãŒã·ã¢ããåé¢ç¬ç«ããã
1960幎ãã¢ã¡ãªã«ã®æ¯æŽããåãããã ã§ã¯ãåæ¿åºçµç¹ã®åãããã 解æŸæ°ææŠç·ãçµæãããåãããã ã®æ¯æŽãåããŠã²ãªã©æŠãå±éããã
(â» ãªãã²ãªã©æŠã¯ãåœéæ³éåã§ãããçç±ã¯ãéæŠéå¡ã®äžè¬äººããæŠéå¡ã«ééãããŠå·»ã蟌ãŸããå¯èœæ§ãããããããã£ãŠã圌ãã¯åœéæ³éåã®ããéå£ã§ãããªãã)
65幎ãã¢ã¡ãªã«ã¯åãããã ãæ¯æŽããç®çã§ãåãããã ãžã®çæã«ãµã¿ãã(åç)ãåãããã ã«ãå
µæ°50äžäººãè¶
ãã倧è»ãããã£ãŠæ¯æŽããã(ãªãéåœè»ããã¢ã¡ãªã«åŽãšããŠããããã æŠäºã«æŽŸå
µããåæŠããŠããã)
ãããããœé£ãäžåœãåãããã ãæ¯æŽããã®ã§ãéžå±ã¯è çãã泥沌åãããããããŠããããã æŠäºã¯ãæ¬æ ŒåããŠãã£ãã
æŠäºäžãã¢ã¡ãªã«ã¯ãã²ãªã©åŽãšã¿ãªããæãçŒãæããªã©ãããããããã¹ã³ãå ±éãªã©ã«ãã£ãŠãäžè«ããéé£ãããã西åŽã®ãã¹ã³ãã¯åœåè
ãªã®ã§ãã²ãªã©åŽã®ããè¡çºã¯æ¹å€ãããã¢ã¡ãªã«è»ã®è¡åãäžæ¹çã«é¿é£ããåœéäžè«ã¯ã¢ã¡ãªã«ã«æ¹å€çã«ãªã£ãã(ãªããæ±åŽã®ãã¹ã³ãã¯ãåãªããæ¿åºã«éœåã®ãã宣äŒæ©é¢ã§ããã)
ã¢ã¡ãªã«ã¯åœå
å€ã®åæŠçãªæ¹å€ã«ãããããã1973幎ãã¢ã¡ãªã«è»ã¯ãŽã§ããã ããæ€éããã
ãããŠãæŠæ³ã¯åãããã åŽã«æå©ã«ãªããåãããã ã75幎ã«ã¯åãããã ã®éŠéœãµã€ãŽã³ãæ»ç¥ããæŠäºã¯çµçµããã
ããããŠããããã æŠäºã¯ãåãããã ã®åå©ã§çµãã£ãã
ããŠ1976幎ãã«ã³ããžã¢ã§ã¯ãã«=ãããæ¿æš©ãã«ããå
±ç£äž»çŸ©æ¿çãè¡ã£ãããç¬è£è
ã®ãã«ããã¯ã空æ³çãªå
±ç£äž»çŸ©ç念ã®ããšã«ãèªåœæ°(ã«ã³ããžã¢åœæ°)ã®å€§è殺ãè¡ã£ããç¥è人éçŽãäžå¿ã«ãããããã«ããæ¿æš©ã¯è殺ãè¡ã£ãã
ãããŠã«ã³ããžã¢ã¯ããã³ãã³é£åœã®ãããã ã«äŸµæ»ããã
ãããã ã¯åæãã1979幎ã«ãããã ã¯ã«ã³ããžã¢ã«æ»ã蟌ã¿ããã«ããæ¿æš©ãåããã
äžåœã¯ã«ã³ããžã¢ã®ãã«ããæ¿æš©ãæ¯æããŠããã®ã§ã1979幎ãäžåœã¯ãããã ã«äŸµæ»ãã(äžè¶æŠäº)ã(ããŠå°å¹³ ã®æ代)
ãŸããäžè¶æŠäºã§æŠéããã£ãŠãäžåœãšãããã ã¯ãäž¡åœãšã瀟äŒäž»çŸ©åœã§ããã®ã§ãã瀟äŒäž»çŸ©åœã©ããã¯æŠäºãããªãããšããã£ãå¹»æ³ã¯åŽ©å£ããŠãã£ãã
1953幎ã«ã¹ã¿ãŒãªã³ãæ»äº¡ãããšããœé£ã¯å€äº€æ¿çãèŠçŽããŠãã¢ã¡ãªã«ã«æ©ã¿å¯ã£ãããªãèŠããããã«ãªãã 1955幎ã«ã¯ç±³ãœè±ä»ã®4ãåœéŠè³ã«ãããžã¥ããŒãå·šé äŒè«ãéãããã
ãããŠ56幎ã«ãœé£ã¯ã³ãã³ãã©ã«ã ã解æ£ããã
ããããå®éã«ã¯ããœé£ã¯èŠæš©ã厩ãã€ããã¯ãªãã£ãã
1956幎ã«ããŒã©ã³ããšãã³ã¬ãªãŒã§ãåæ¿åºéåãèµ·ããæ°æ¿æš©ãæš¹ç«ããéã«ã¯ããã³ã¬ãªãŒã®æ°æ¿æš©ã¯ããœé£ããã®è±åŽãè¡šæãããããœé£è»ã«äŸµæ»ããããã³ã¬ãªãŒã®ç¬ç«ã¯å€±æããããŸããæ°æ¿æš©ã®æå°è
ããžã¯åŠåãããã
ãŸãæ±ãã€ãã§ã¯ã1950幎代ãã西ãã€ãã«è±åºãã人ãå¢ããã®ã§ã1961幎ã«æ±ãã€ãæ¿åºã¯ãã«ãªã³ã®å£ãç¯ããã
ãŸããœé£ã¯ããã¥ãŒãé©åœåŸã®ãã¥ãŒãã«ããµã€ã«åºå°ã建èšããŠãã¢ã¡ãªã«ãæçºãã(ãã¥ãŒãå±æ©(Cuban Missile Crisis ))ã
ãããã¢ã¡ãªã«ãè²æ©ãããããµã€ã«æ€å»ãããšããŠæµ·äžå°éãè¡ã£ãããããœé£ã¯è²æ©ããŠã¢ã¡ãªã«ã®èŠæ±ãåãå
¥ããã
ãã®åŸãç±³è±ãœã®3åœãã1963幎ã«éšåçæ žå®éšçŠæ¢æ¡çŽ(Partial Nuclear Test Ban Treaty )ã«èª¿å°ããã(ããã¯åã«ãå°äžæ žå®éšä»¥å€ã®æ žå®éšãçŠæ¢ããã ãã§ãããæ žä¿æã¯çŠæ¢ããªãããå°äžæ žå®éšãçŠæ¢ããªãã)ãŸããç±³ãœã®éŠè³ã©ãããé»è©±ã§çŽæ¥çã«æèŠäº€æããããããã©ã€ã³ããããã®63幎ã«èšçœ®ãããã
1970幎代åŸåãã¢ãã¬ãã¹ã¿ã³ã¯å
æŠç¶æ
ã«ããã芪ãœé£å¢åãã€ã¹ã©ã å¢åãäºã£ãŠããã 1979幎ã«ãœé£ã¯ã¢ãã¬ãã¹ã¿ã³ã«ãã芪ãœé£å¢åãè»äºæŽå©ããããã«ããœé£ã¯ã¢ãã¬ãã¹ã¿ã³ã«äŸµæ»ããã
ããã«ãããç±³ãœã®ç·åŒµã¯é«ãŸããã¢ã¡ãªã«ã¯è»äºè²»ãå¢å€§ãããªã©ããŠå¯Ÿå¿ããã
ãªããç¿1980幎ã«ã¯ã¢ã¹ã¯ã¯ã»ãªãªã³ããã¯ãéå¬ããããã西åŽè«žåœã®å€ãã¯ããã€ã³ãããããã(ããã§ããããã€ã³ããããšã¯ããœé£éå¬ã®è¡äºã«åå ãããªãããšã§ããœé£ã®è¡åã«å察ã§ãããšããæå¿ãè¡šæããããšã)
1950幎代ããæ±è¥¿å·æŠãæ·±å»åããŠãããšãã¢ã¡ãªã«åœå
æ¿æ²»ã§ã¯ããã¢ã¡ãªã«åœå
ã«ãæ¢ã«ãœé£ã®ã¹ãã€ãå
¥ã蟌ãã§ããã®ã¯?ããšããäžå®ãé«ãŸããããã«ãŒã·ãŒäžé¢è°å¡ãäžå¿ã«ããŠãåå
±ç£äž»çŸ©ã®æŽ»åã掻çºåã(ãèµ€ç©ãããããã«ãŒã·ãºã )ãå
±ç£äž»çŸ©è
ãšã¿ãªãããæ¿æ²»å®¶ãç¥è人ãæ¹å€ãããã倱èããŠãã£ããããã 1980幎代ã«ã¢ã¡ãªã«ã®è²¡æ¿ã¯æªåãã財æ¿èµ€åãšè²¿æèµ€åã®ãããååã®èµ€åããšèšããããåå ã¯ããããèããããããäžå ãšããŠãã¢ãã¬ãã¹ã¿ã³äŸµæ»ã«å¯Ÿå¿ããçºã«è»äºè²»ãæ¥å¢ããŠããã
貿æèµ€åã®åå ã«ã€ããŠã¯ããã«é«ã«ãã貿æã®äžæ¯ãªã©ãããã ããããŸããæ¥æ¬ãªã©ã«ãããæ°èå·¥æ¥åœã®æé·ã«ãããã¢ã¡ãªã«çµæžãäžæ¯ã«ãªã£ãã®ãããããªãã
1987幎ã®ãã©ã¶åæã¯ããã«é«ãæ¯æ£ããã®ãç®çã§ããã
1956幎ã«ããŒã©ã³ããšãã³ã¬ãªãŒã§ãåæ¿åºéåãèµ·ããæ°æ¿æš©ãæš¹ç«ããéã«ã¯ããã³ã¬ãªãŒã®æ°æ¿æš©ã¯ããœé£ããã®è±åŽãè¡šæãããããœé£è»ã«äŸµæ»ããããã³ã¬ãªãŒã®ç¬ç«ã¯å€±æããããŸããæ°æ¿æš©ã®æå°è
ããžã¯åŠåãããã
1960幎代ã«å
¥ã£ãé ã«ãªããšããœé£ã®çµæžã¯äœè¿·ãããã ãã«ãå
±ç£äž»çŸ©ã®å€±æãæããã«ãªã£ãŠããã
ãããŠ1968幎ããã§ã³ã¹ãããã¢ã§ãèªç±åãšè³æ¬äž»çŸ©çãªçµæžæ¹é©ã䞻匵ããæ°æ¿æš©ãç»å Žããããã©ãã®æ¥ããšèšããããããœé£ã¯èªåœããã³åšèŸºåœãžã®æ³¢åãããããæ±ãã€ããªã©ã¯ã«ã·ã£ã¯æ¡çŽæ©æ§ã®è»ãšãšãã«è»äºä»å
¥ãããã§ã³ã¹ãããã¢ã®æ°äž»åéåã匟å§ãã(ãã§ã³äºä»¶)ã
ãœé£ã§ã¯1953幎ã«ã¹ã¿ãŒãªã³ãæ»ãã§ãåŸç¶ã®æš©åè
ã®ãã«ã·ãã§ãããœé£ã®æš©åãã«ããããã«ã·ãã§ãããã¹ã¿ãŒãªã³æ¹å€ãéå§ããã¹ã¿ãŒãªã³æ¿æš©æ代ã®å€§éç²æž
ãªã©ã®æªè¡ãæ¹å€ããã
ãªããããã§ãããç²æž
ããšã¯ãã¹ã¿ãŒãªã³ã®ãããªç¬è£è
ããå察掟ãåŠåããã匟å§ããããšã§ããã
ãããŠãã«ã·ãã§ãã²ããããœé£ããåã¢ã¡ãªã«çãªæ
床ããããããšãäžåœã¯ãœé£ããä¿®æ£äž»çŸ©ãã ãšæ¹å€ãã(äžãœè«äº)ã(瀟äŒäž»çŸ©è
ã®ãªãã§ã¯ããä¿®æ£äž»çŸ©ããšããçšèªã¯æ¹å€çãªæå³ã§çšããããã)
æ€å®æç§æžã«ã¯ãäžèšã®ãããªæãã§æžããŠããã
å®æ
ã¯ã蟲æ¥ãå·¥æ¥ã®ç¥èã®ãªãæ¯æ²¢æ±ãã¡ãããããå®æ¥ã®å®åã«å£åºããããããã§ãããããããçµæã«çµãã£ãã®ã§ããã
äžäŸãšããŠãæ¯æ²¢æ±ãã蟲æ¥ã§ã¯ãã¹ãºã¡ãçš²ãé£ã¹ãããã®ã§ããªãã°ã¹ãºã¡ãé§é€ããŠæžããã°ã蟲æ¥çç£ãå¢ããã ããããšèããããã¹ãºã¡ãªã©éé³¥ã®éæ²»ãäžåœå
šåã«åœä»€ããããããçµæã¯ãã€ããŽãªã©ããããŸã§ã¯ã¹ãºã¡ãªã©ã®éé³¥ã«é£ã¹ãããŠããè«ãå¢ããããã§ãã€ããŽãªã©ã«çš²ã¯é£ã¹èãããããŸããŸã蟲æ¥çç£ã¯æžã£ããšããã
æ€å®æç§æžã§ã¯ãå¶äœãã倱æã®åå ã ãšèšã£ãŠããæç§æžããããããã®ãå¶äœããšããã®å®æ
ã¯ãäžè¿°ã®ãããªå®æ
ã§ããããå®æ
ã¯ãæ¯æ²¢æ±ã®é ã®ãªãã®ãçç³»åŠåã®ç¥èœããå¶äœãããã
ãªãåæé®®ã§ããé¡äŒŒã®å€±æããã£ããåæé®®ã®æå°è
ã¯ãç°çã§ãè(ãªã)ãæ€ããå¯åºŠãäžåã«ããã°ãçç£ã3åã«ãªãããšèãããããããåç©«ç©ã®æ é€äžè¶³ã«ãã£ãŠãããã蟲æ¥çç£ã¯æžã£ããšããã
ãã®ä»ã圌ãã¯ãå±±æãåãéããŠãç°çãšããŠé墟ããã°ã蟲æ¥çç£ãå¢ããã ããããšèããå®è¡ãããããããå±±æã®æžå°ã«ãã£ãŠã措氎ãåç ããããæãçµæã«çµãã£ããšããã
äžåœã§ã¯ã倧èºé²æ¿çã®å€±æã«ãããæ¯æ²¢æ±ã¯å€±èãããããããåæé®®ã§ã¯éæ¥æã¯å€±èããããã°ããåæé®®ã®èŸ²æ¥ã®æ··ä¹±ã¯æ·±ãŸã£ãã
ãªããäžåœãªã©ã§ã¯äººå£æ¿çãšããŠãåœæã¯ã人å£ãå¢ããã°ã蟲èæ¥ã®çç£éãå¢ããããè»éã®å
µå£«ã人æ°ãå¢ããã®ã§ãåœã匷ããªããã®ãããªå¹»æ³ãèããŠããã®ã§ã人å£å¢å æ¿çã®æäžãªã®ã«å¶äœãèµ·ããŠããŸããããããããçµæã«ãªãã
ãªããäžåœããäžäººã£åæ¿çããèšãåºããã®ã¯ã倧èºé²æ¿çãããåŸã®æ代ã§ããã1970幎代åŸåãããããäžäººã£åæ¿çããèšãåºããã§ããã(ãŠã£ãããã£ã¢ãäžäººã£åæ¿çãã®èšäºã«ãããšããã€ã¯60幎代ã®å€§èºé²æ¿çã®é ãããæ¢ã«çµ±èšèª¿æ»ã«ããã蟲æ¥çç£ã«å¯ŸããŠäººå£ãå€ããããšããå±æ§ãçºèŠãããŠããããããé»æ®ºãããããããåæ¿åºçãšã¿ãªããã匟å§ããããã人å£åé¡ã®æèµ·ãããããšããŠããç 究è
ã¯å€±èããŠãã£ããããã)
1959幎ãåå°å¥(ãã
ããããã)ãæ¿æš©ã«ã€ãã倧èºé²æ¿çãèŠçŽããããããã66幎ã«åŸ©åž°ãã¯ããæ¯æ²¢æ±ãæå倧é©åœãèµ·ãããã
ãã®æå倧é©åœã§ã¯ãæ¯æ²¢æ±ã«äžäžãèªãåŠçãªã©ãåå¡ããŠãçŽ
è¡å
µã(ãããããžã)ãçµæããæ¯æ²¢æ±ã«æ¹å€çãªå
å¹¹éšãç¥è人ãæ¹å€ãããã:(â» åŠçã¯ãçç£çŸå Žã®å®åãªã³ãã§äžéç¥ããã ãããåãã(çç£çŸå Žã«ã€ããŠ)å®åãªã³ãã®æ¯æ²¢æ±ã«ãšã£ãŠã¯æ±ããããã)
ãããŠåå°å¥ãå
å¹¹éšã倱èããããŸããç¥è人ã匟å§ããã
ã¢ããªã«ã§ç¬¬äºæ¬¡äžç倧æŠã®åããç¬ç«ããŠããã®ã¯ããããã«ãªããªã¢ããšããªãã¢ãåã¢ããªã«ã ãã ã£ãã
1955幎ãã€ã³ããã·ã¢ã®ãã³ãã³ã§ã¢ãžã¢ã»ã¢ããªã«äŒè°ãéå¬ãããåå åœãšããŠã€ã³ãã»äžåœã»ãšãžããã»ã€ã³ããã·ã¢ã»æ¥æ¬ãªã©ãæ¥æ¬ããµãã29ã¶åœããã€ãŸããåžåœäž»çŸ©ã®æ€æ°å°æ¯é
ã«å察ããããšã決ãããããŸãå¹³åå
±åããã£ããããååžåœäž»çŸ©ã»å¹³åå
±åã®ãå¹³å10ååã(ãžãã ãã
ããããã)ã宣èšãããã
ãããŠ1960幎ã«ã¢ããªã«ã§äžæã«17ãåœãç¬ç«ãã1960幎ã¯ãã¢ããªã«ã®å¹Žããšèšãããã
ãã®åŸã1961幎ã«ãŠãŒãŽã¹ã©ãã¢ã§éããã(第1å)éåçè«žåœéŠè³äŒè°ã«ã¯ãåºåžåœã«ã©ãã³ã¢ã¡ãªã«è«žåœãå ããããšãžãããã€ã³ããªã©25ãåœãåºåžããæ±è¥¿å·æŠã®ã©ã¡ãã®ç«å Žã«ããªããªãéåçã®ç«å Žã宣èšããããããŠãã¢ããªã«è«žåœããšãžããã€ã³ããªã©ã¯ã第äžäžçããšåŒã°ããã
ãããŠã1963幎ã«ã¢ããªã«è«žåœã¯ãã¢ããªã«ã®é£åž¯ããããã¢ããªã«çµ±äžæ©æ§(OAUãåŸã®ã¢ããªã«é£åãAUã«çºå±ããã)ãçµæããã
1945幎ãã¢ã©ãè«žåœã¯ã¢ã©ãã©ããã®é£åž¯ã匷ããããã1945幎ã«ã¢ã©ãè«žåœã¯ã¢ã©ãé£çãçµæããã
ãã®é ãåœé£ã¯ãã¬ã¹ãã£ãã«ã€ããŠãã¢ã©ã人ãšãŠãã€äººãšã§åå²ããæ¡ãåºããã
ããã1948幎ããŠãã€äººããã¬ã¹ãã£ãã®å°ãäžæ¹çã«ã€ã¹ã©ãšã«ã®å»ºåœã宣èšããããã®ãããã€ã¹ã©ãšã«ãšã(ã€ã¹ã©ãšã«ã«å察ãã)ã¢ã©ãè«žåœãšã®ããã ã§ã第1次äžæ±æŠäºãèµ·ããã
第1次äžæ±æŠäºã«ã¢ã©ãè«žåœã¯ãã¶ããå€ãã®ã¢ã©ã人ãåå°ã倱ã£ãããé£æ°ãšãªã£ãã
ãã®åŸããšãžããã§ã¯ã1952ã53幎ã«ãã»ã«(人ç©å)ã²ãããèªç±å°æ ¡å£ãé©åœãèµ·ãããçæ¿ãåãã(ãšãžããé©åœ)ã
ç¿1954幎ã«ãã»ã«ã²ããããšãžããã¯ãã¹ãšãºéæ²³ã®åœæåã宣èšããã
ãããšãã¹ãšãº(éæ²³ã®ãšãžãã)åœæåã«å察ããã€ã®ãªã¹ãããã©ã³ã¹ã»ã€ã¹ã©ãšã«ãšãã«ãšãžããã«äŸµæ»ããæŠäºã«ãªã£ãã(第2次äžæ±æŠäºãã¹ãšãºæŠäº) ãããåœéäžè«ã¯ãè±ä»ã€ã¹ã©ãšã«ã®ãšãžãã䟵æ»ãéé£ããè±ä»ã€ã¹ã©ãšã«ã¯æ€éã«è¿œã蟌ãŸããã
21äžçŽã®ä»ã§ã¯ä¿¡ããããªããããããªããã1979幎ããåã®ã€ã©ã³ã¯ã西æŽåã®é²ãã§ããåœã§ãã£ãã
ããã1979幎ãã€ã¹ã©ãŒã æã·ãŒã¢æŽŸãé©åœãèµ·ãããå®æ家ãã¡ã€ããæé«æå°è
ãšããã€ã©ã³=ã€ã¹ã©ãŒã å
±ååœãèªçãã(ã€ã©ã³é©åœ)ãã€ã©ã³é©åœã¯ããããŸã§ã®é©åœãšã¯éããæ°äž»åã®é©åœã§ããªããå
±ç£äž»çŸ©ã«ããšã¥ãé©åœã§ããªããå®æã«ããšã¥ã埩å€çãªé©åœã§ãã£ãã®ã§ãåœé瀟äŒãé©ãããã
ã€ã©ã¯ã¯ãèªåœãžã®é©åœã®æ³¢åãæãã1980幎ã«ã€ã©ã³ã«äŸµæ»ããã€ã©ã³=ã€ã©ã¯æŠäºãå§ãŸã£ãã
ãããŠãã€ã©ã³=ã€ã©ã¯æŠäºã§ã¯ãã¢ã¡ãªã«ããœé£ãé©åœã®æ³¢åããããããããç±³ãœã¯ã€ã©ã¯ã«è»äºæŽå©ããã
ã€ã©ã³=ã€ã©ã¯æŠäºã¯88幎ãŸã§ç¶ããã
ãã®åŸã®1990幎ãã€ã©ã¯ãé£åœã¯ãŠã§ãŒãã«æ»ã蟌ã¿ãåœé£ã§ã¯ã€ã©ã¯ãžã®æŠåè¡äœ¿ã容èªãã決è°ãå¯æ±ºãããç¿1991幎ã«ã¯åœé£é決è°ã«åºã¥ããŠã¢ã¡ãªã«åè¡åœã²ãããå€åœç±è»ãã€ã©ã¯ãæ»æããã€ã©ã¯ãéäŒãããã¯ãŠã§ãŒãããã€ã©ã¯è»ãè¿œãåºãã(湟岞æŠäº)ã
ãªãã第äºæ¬¡ç³æ²¹å±æ©ã®åå ããåææã®ã€ã©ã³é©åœã§ããã(第äžæ¬¡ç³æ²¹å±æ©ã®åå ã¯ãäžæ±æŠäºã )
äžè¿°ã®ããã«ãã¢ãžã¢ãã¢ããªã«ã§ããã·ã§ããªãºã ã®èãã«ããšã¥ããŠãç¬ç«ãè¡ãããã(â» æž
æ°Žæžé¢ã®é«æ ¡ãå
Œ
±ãã®èŠè§£)(⻠第äžåŠç¿ç€ŸãçŸä»£ç€ŸäŒãã®æç§æžã§ãåæ§ã®èŠè§£ã)
äžæ¹ãæ¥äžã欧米å匷ãªã©ã®ãã·ã§ããªãºã ããäºåºŠã®äžç倧æŠãåŒããããããšèãã説ãããããã
ããã·ã§ããªãºã ããæ°æ䞻矩ãšèšãèšèã¯æªãããšã®ããã«äœ¿ãããããšãå€ãããå®éã®æŽå²ã¯ããç°¡åã§ã¯ãªãã
劥åç¹ãšããŠã¯ã(ç¬ç«ã®ããã«)å€åœããã®æ¯é
ã«ã¯å¯Ÿæã»æµæãããããããåœå
ã®å°æ°æ°æãå°éããªããã°ãªããªãããšãã£ããšãããã
æŽå²çã«ã¯ããã©ã³ã¹é©åœããã®åŸã®åä¹±ããŠã§ã¹ããã§ãªã¢æ¡çŽãªã©ãéããŠããã·ã§ããªãºã ã«ãã£ãŠåœå®¶ã®äžäœæ§ã確ç«ããŠããããããçŠç¥ã®åäžã«ã€ãªãã£ãŠãã£ããšããåŽé¢ãããã(æž
æ°Žæžé¢ã®é«æ ¡ãå
Œ
±ãã®èŠè§£)
ãŸãããã·ã§ããªãºã ã«ãã£ãŠã(絶察çæ¿ã®ãããªæå³ã§ã®)å°å»ºå¶ã解äœããŠãã£ãã®ããå°ãªããšããšãŒãããå²ã§ã®æµãã§ããã(æž
æ°Žæžé¢ã®é«æ ¡ãå
Œ
±ãã®èŠè§£) | [
{
"paragraph_id": 0,
"tag": "p",
"text": "äžçææ
ã®åŸã欧米䞻èŠåœã¯ãããã¯çµæžãæšãé²ããããã®ãããªãããã¯çµæžãåœå®¶éã®å¯Ÿç«ãçãã§æŠäºã®äžå ã«ãªã£ããšããåçã«ããšã¥ãã第äºæ¬¡å€§æŠæã®çµç€ãããããæŠåŸã®åœéçµæžã®ãããããåœéäŒè°ã§è©±ãåãããã",
"title": "åœéé£å"
},
{
"paragraph_id": 1,
"tag": "p",
"text": "1944幎ã«ã¢ã¡ãªã«ã®ãã¬ãã³ãŠããºã§ã®åœéäŒè°ã話ãåãã(ãã¬ãã³ãŠããºäŒè°ããã¬ãã³ãŠããºåæãBretton Woods Agreement)ããããã®äŒè°ãªã©ã«ãããèªç±è²¿æãæšé²ããããŸãåœéçãªçµæžã®å®å®åã®ããåœéé貚åºé(IMFã1947幎ããInternational Monetary Fund)ãåœé埩èéçºéè¡(IBRDã1946幎ããInternational Bank for Raconstructuion)ãèšç«ãããã",
"title": "åœéé£å"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "ãŸããé¢çšåã³è²¿æã«é¢ããäžè¬åå®(GATTããã¬ãããã1948幎çºå¹ãGeneral Agreement on Tariffs and Trade)ã§ã¯é¢çšã®åŒãäžããªã©ã®èªç±è²¿æãç®æãããããã®ãããªç¬¬äºæ¬¡å€§æŠã®çµæžç§©åºããã¬ãã³ã»ãŠããºäœå¶ãŸãã¯IMF=GATTäœå¶ãšããã",
"title": "åœéé£å"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "ææŠåœã®ãã€ããšæ¥æ¬ã§ã¯ãæŠååœã®è¡ãè£å€ã«ãã£ãŠããã€ããšæ¥æ¬ã®æŠäºæå°è
ãã¡ãè£ãããã",
"title": "ææŠåœã®æ°äž»å"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "ãã€ãã§ã¯ãã¥ã«ã³ãã«ã¯åœéè»äºè£å€ãæ¥æ¬ã§ã¯æ¥µæ±åœéè»äºè£å€(æ±äº¬è£å€)ãè¡ãããã",
"title": "ææŠåœã®æ°äž»å"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "ãããŠãåŸæ¥ã®æŠäºç¯çœª(æèèåŸ
ãªã©)ã«ãã眪ãåãã®ã«å ããæ°ãã«å ãã£ããå¹³åã«å¯Ÿãã眪ãã«ãã£ãŠãè£ãããã",
"title": "ææŠåœã®æ°äž»å"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "ãã¥ã«ã³ãã«ã¯è£å€ã§ã¯ãããã¹ã®æå°è
ãã¡ãè£ãããã(â» æ€å®æç§æžãããããèšãæ¹ãããŠãã®ã¯ãããšãåœéæ³éåããããã€ãè»å¹¹éšã§ããããã¹åºèº«ã§ãªããã€ãã®åéãšãªãŒãè»åŠæ ¡åºèº«ã®è»äººã ã£ãé£äž(ãšãŒãªããã»ãã©ã³ã»ãã³ã·ã¥ã¿ã€ã³ãã°ããŒãªã¢ã³ãªã©)ã¯è»œã眰ã ã£ãããã)",
"title": "ææŠåœã®æ°äž»å"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "ããããæŠååœã«ããæŠäºç¯çœªã«ã€ããŠã¯ããããã®è£å€ã§ã¯åãããªãã£ãã®ã§ãåœæããæèè
ã«ã¯ãäžå
¬å¹³ããªè£å€ã ãšåé¡èŠãããŠããã",
"title": "ææŠåœã®æ°äž»å"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "第äºæ¬¡äžç倧æŠåŸãæ±ãšãŒãããè«žåœã®å€ãã«ã¯ãœé£ãé²é§ãããŸããªãæ±ãšãŒãããã«ç€ŸäŒäž»çŸ©åœãå€ãèªçããã",
"title": "å·æŠ"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "ã¢ã¡ãªã«ã»ã€ã®ãªã¹ã¯ããã®ãããªæ±ãšãŒãããã®ç¶æ³ãããœé£ã®äŸµç¥ãšããŠãšãããŠèŠæããããã®ç±³ãœã®å¯Ÿç«ãå·æŠ(Cold War )ãšããããŸããã€ã®ãªã¹ã®åéŠçžãã£ãŒãã«ã¯å·æŠã«ã€ããŠã1946幎ããœé£ããéã®ã«ãŒãã³ããéãããŠãšãŒããããåæããŠãããšããŠããœé£ãæ¹å€ããã",
"title": "å·æŠ"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "ã¢ã¡ãªã«ã¯1947幎ã«å
±ç£äž»çŸ©åœãå°ã蟌ããç®çã§ãã«ãŒãã³-ãã¯ããªã³(Truman Doctrine )ãçºè¡šããã ãŸãã西åŽè«žåœãçµæžæŽå©ããèšç»ã®ããŒã·ã£ã«-ãã©ã³(Marshall Plan )ãçºè¡šãå®æœããã",
"title": "å·æŠ"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "1948幎6æã西åŽããœé£æãã§ãã€ãã®é貚æ¹é©ãããããšã«åçºãããœé£ã¯è¥¿ãã«ãªã³ãžã®äº€éè·¯ãé®æãã(ãã«ãªã³å°é)ãããã西åŽã¯ç©ºèŒžã§ç©è³ã茞éããŠå¯Ÿæããã",
"title": "å·æŠ"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "1949幎ãæ±åŽ(ãœé£åŽ)ã¯ãæ±åŽåå
ã®çµæžååæ©æ§ãšããŠã³ã¡ã³ã³(COMECONãçµæžçžäºæŽå©äŒè°)ãèšç«ãã",
"title": "å·æŠ"
},
{
"paragraph_id": 13,
"tag": "p",
"text": "ãã£ãœãã1949幎5æãè±ç±³ä»ãäžå¿ãšãã西åŽè«žåœã¯ãè»äºåççãªåœéæ©æ§ãšããŠãå倧西æŽæ¡çŽæ©æ§(NATOãããããŒããšèªã)ãèšç«ããã",
"title": "å·æŠ"
},
{
"paragraph_id": 14,
"tag": "p",
"text": "ãªã1945幎ããœé£ã¯ãã«ãªã³å°éã®å€±æãã¿ãšãã1945幎5æã«ãœé£ã¯ãã«ãªã³å°éã解é€ããããããŠå1945幎ã®ç§ã«ããã€ãé£éŠå
±ååœ(西ãã€ã)ããã³ãã€ãæ°äž»å
±ååœ(æ±ãã€ã)ãæç«ããã",
"title": "å·æŠ"
},
{
"paragraph_id": 15,
"tag": "p",
"text": "",
"title": "å·æŠ"
},
{
"paragraph_id": 16,
"tag": "p",
"text": "ã€ã®ãªã¹ã¯å€§æŠã§ç²åŒããæ€æ°å°ãç¶æããåã倱ã£ãŠããããŸãã€ã®ãªã¹æ¬åœã§æ€æ°å°ã®ç¶æã®ããã®è»äºè²»ãªã©ã®è² æ
ãåé¡èŠãããããšçã®çç±ãããã€ã®ãªã¹ã¯æ€æ°å°ã®ç¬ç«ã«ã¯ååçã«ãªã£ãã",
"title": "åã¢ãžã¢è«žåœã®ç¬ç«"
},
{
"paragraph_id": 17,
"tag": "p",
"text": "ããããã€ã³ãã§ã¯çŸå°ã®ã¢ãžã¢äººãã¡ããç¬ç«åŸã®åœã®æ¹éãå®æäžã®æ¹éãããã£ãŠã(çŸå°ã¢ãžã¢äººã©ããã§)察ç«ãããå
šã€ã³ãã®çµ±äžãéèŠããåœæ°äŒè°æŽŸã®ã¬ã³ãã£ãŒããã³ãã«ãŒããšãäžæ¹ããžã³ããŒã²ãããã ã¹ãªã åœå®¶ã®åé¢ç¬ç«ãããšããå
šã€ã³ã=ã ã¹ãªã é£çã察ç«ããã",
"title": "åã¢ãžã¢è«žåœã®ç¬ç«"
},
{
"paragraph_id": 18,
"tag": "p",
"text": "ãããŠãã²ãšãŸãã1947幎ã«ããã³ãã¥ãŒæåŸã®å€ãã€ã³ãé£éŠãšãã ã¹ãªã ã®å€ãããã¹ã¿ã³å
±ååœã«åãããŠãã»ãŒåæã«ã€ã®ãªã¹ããç¬ç«ããã",
"title": "åã¢ãžã¢è«žåœã®ç¬ç«"
},
{
"paragraph_id": 19,
"tag": "p",
"text": "ãã®åŸããã³ãã¥ãŒãšã ã¹ãªã ã®å¯Ÿç«ãæ¿åããæŠåè¡çªãããèåã説ãã¬ã³ãã£ãŒã¯ãæ¥é²æŽŸãã³ãã¥ãŒæåŸã«ãã£ãŠæ殺ãããŠããŸã£ã(1948幎)ã",
"title": "åã¢ãžã¢è«žåœã®ç¬ç«"
},
{
"paragraph_id": 20,
"tag": "p",
"text": "ããã¹ã¿ã³ã¯åœæãã€ã³ããæãã§æ±è¥¿ã«é åããã£ãŠãããæ±ããã¹ã¿ã³ãããã¹ã¿ã³ããã®ç¬ç«ãããšãããšã€ã³ãã¯ãããæ¯æŽãã1971幎ã«ã€ã³ãã¯è¥¿ããã¹ã¿ã³ã«äŸµæ»ãã1971幎ã«æ±ããã¹ã¿ã³ã¯ãã³ã°ã©ãã·ã¥ãšããŠç¬ç«ããã",
"title": "åã¢ãžã¢è«žåœã®ç¬ç«"
},
{
"paragraph_id": 21,
"tag": "p",
"text": "ã€ã³ããšããã¹ã¿ã³ã¯ãã«ã·ããŒã«å°æ¹ã®åž°å±ãããã£ãŠããã³ãã³æŠåè¡çªãã",
"title": "åã¢ãžã¢è«žåœã®ç¬ç«"
},
{
"paragraph_id": 22,
"tag": "p",
"text": "",
"title": "åã¢ãžã¢è«žåœã®ç¬ç«"
},
{
"paragraph_id": 23,
"tag": "p",
"text": "1945幎ãããŒããã³ã¯ãããã 人æ°å
±ååœã®ç¬ç«ã宣èšããããå®äž»åœãã©ã³ã¹ã¯ãããèªããããããã ã«ãã©ã³ã¹è»ã掟å
µããã€ã³ãã·ãæŠäºã«ãªã£ãã",
"title": "æ±åã¢ãžã¢è«žåœã®ç¬ç«"
},
{
"paragraph_id": 24,
"tag": "p",
"text": "ãã©ã³ã¹ã¯49幎ãããæã®æ§çåžããª=ãã€ãããŠããããã åœãæš¹ç«ãããã54幎ã«ãã£ãšã³ããšã³ããŒã®æŠãã§ãã©ã³ã¹ã¯æåãããžã¥ããŒãäŒæŠåå®ãçµãã§ãã©ã³ã¹ã¯ã€ã³ãã·ãããæ€éããã",
"title": "æ±åã¢ãžã¢è«žåœã®ç¬ç«"
},
{
"paragraph_id": 25,
"tag": "p",
"text": "çµæããããã ã¯åç·¯17床ç·ãåºæºã«ããŠãååŽããããã æ°äž»å
±ååœãååŽããããã åœãšãªã£ããããããŠãããã ã¯ãåå2ã€ã®åœå®¶ã«åè£ããã",
"title": "æ±åã¢ãžã¢è«žåœã®ç¬ç«"
},
{
"paragraph_id": 26,
"tag": "p",
"text": "(ã¢ã¡ãªã«æ€æ°å°ã®)ãã£ãªãã³ã«ã€ããŠã¯ãæŠåããã®ç¬ç«ã®çŽæã©ãã(倪平æŽæŠäºã«ãã£ãŠå°ãé
ããã)ãã¢ã¡ãªã«ã¯1946幎ã«ãã£ãªãã³ã®ç¬ç«ãèªããã",
"title": "æ±åã¢ãžã¢è«žåœã®ç¬ç«"
},
{
"paragraph_id": 27,
"tag": "p",
"text": "(ãªã©ã³ãæ€æ°å°ã®)ã€ã³ããã·ã¢ã§ã¯ãæ¥æ¬ã®ææŠçŽåŸã®1945幎8æ17æ¥ã«ã¹ã«ã«ããç¬ç«ã宣èšããããå®äž»åœãªã©ã³ãã¯ç¬ç«ãèªãããæŠäºã«ãªã£ãã4幎ããŸãã®ç¬ç«æŠäºã®ããã1949幎ã«ã€ã³ããã·ã¢ã¯ç¬ç«ãèªããããã",
"title": "æ±åã¢ãžã¢è«žåœã®ç¬ç«"
},
{
"paragraph_id": 28,
"tag": "p",
"text": "(ã€ã®ãªã¹æ€æ°å°ã®)ãã¬ãŒå島ã§ã¯ãã²ãšãŸã1948幎ã«ã€ã®ãªã¹é ãã©ã€é£éŠãæç«ãã1957幎ã«ç¬ç«åœã®ããã©ã€é£éŠããšãªãã63幎ã«ç¬ç«åœã®ãã¬ãŒã·ã¢ã«ãªã£ãããã®åŸãäžåœäººã®å€ãã·ã³ã¬ããŒã«ã1965幎ã«ãã¬ãŒã·ã¢ããåé¢ç¬ç«ããã",
"title": "æ±åã¢ãžã¢è«žåœã®ç¬ç«"
},
{
"paragraph_id": 29,
"tag": "p",
"text": "",
"title": "æ±åã¢ãžã¢è«žåœã®ç¬ç«"
},
{
"paragraph_id": 30,
"tag": "p",
"text": "1960幎ãã¢ã¡ãªã«ã®æ¯æŽããåãããã ã§ã¯ãåæ¿åºçµç¹ã®åãããã 解æŸæ°ææŠç·ãçµæãããåãããã ã®æ¯æŽãåããŠã²ãªã©æŠãå±éããã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 31,
"tag": "p",
"text": "(â» ãªãã²ãªã©æŠã¯ãåœéæ³éåã§ãããçç±ã¯ãéæŠéå¡ã®äžè¬äººããæŠéå¡ã«ééãããŠå·»ã蟌ãŸããå¯èœæ§ãããããããã£ãŠã圌ãã¯åœéæ³éåã®ããéå£ã§ãããªãã)",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 32,
"tag": "p",
"text": "65幎ãã¢ã¡ãªã«ã¯åãããã ãæ¯æŽããç®çã§ãåãããã ãžã®çæã«ãµã¿ãã(åç)ãåãããã ã«ãå
µæ°50äžäººãè¶
ãã倧è»ãããã£ãŠæ¯æŽããã(ãªãéåœè»ããã¢ã¡ãªã«åŽãšããŠããããã æŠäºã«æŽŸå
µããåæŠããŠããã)",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 33,
"tag": "p",
"text": "ãããããœé£ãäžåœãåãããã ãæ¯æŽããã®ã§ãéžå±ã¯è çãã泥沌åãããããããŠããããã æŠäºã¯ãæ¬æ ŒåããŠãã£ãã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 34,
"tag": "p",
"text": "æŠäºäžãã¢ã¡ãªã«ã¯ãã²ãªã©åŽãšã¿ãªããæãçŒãæããªã©ãããããããã¹ã³ãå ±éãªã©ã«ãã£ãŠãäžè«ããéé£ãããã西åŽã®ãã¹ã³ãã¯åœåè
ãªã®ã§ãã²ãªã©åŽã®ããè¡çºã¯æ¹å€ãããã¢ã¡ãªã«è»ã®è¡åãäžæ¹çã«é¿é£ããåœéäžè«ã¯ã¢ã¡ãªã«ã«æ¹å€çã«ãªã£ãã(ãªããæ±åŽã®ãã¹ã³ãã¯ãåãªããæ¿åºã«éœåã®ãã宣äŒæ©é¢ã§ããã)",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 35,
"tag": "p",
"text": "ã¢ã¡ãªã«ã¯åœå
å€ã®åæŠçãªæ¹å€ã«ãããããã1973幎ãã¢ã¡ãªã«è»ã¯ãŽã§ããã ããæ€éããã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 36,
"tag": "p",
"text": "ãããŠãæŠæ³ã¯åãããã åŽã«æå©ã«ãªããåãããã ã75幎ã«ã¯åãããã ã®éŠéœãµã€ãŽã³ãæ»ç¥ããæŠäºã¯çµçµããã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 37,
"tag": "p",
"text": "ããããŠããããã æŠäºã¯ãåãããã ã®åå©ã§çµãã£ãã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 38,
"tag": "p",
"text": "ããŠ1976幎ãã«ã³ããžã¢ã§ã¯ãã«=ãããæ¿æš©ãã«ããå
±ç£äž»çŸ©æ¿çãè¡ã£ãããç¬è£è
ã®ãã«ããã¯ã空æ³çãªå
±ç£äž»çŸ©ç念ã®ããšã«ãèªåœæ°(ã«ã³ããžã¢åœæ°)ã®å€§è殺ãè¡ã£ããç¥è人éçŽãäžå¿ã«ãããããã«ããæ¿æš©ã¯è殺ãè¡ã£ãã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 39,
"tag": "p",
"text": "ãããŠã«ã³ããžã¢ã¯ããã³ãã³é£åœã®ãããã ã«äŸµæ»ããã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 40,
"tag": "p",
"text": "ãããã ã¯åæãã1979幎ã«ãããã ã¯ã«ã³ããžã¢ã«æ»ã蟌ã¿ããã«ããæ¿æš©ãåããã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 41,
"tag": "p",
"text": "äžåœã¯ã«ã³ããžã¢ã®ãã«ããæ¿æš©ãæ¯æããŠããã®ã§ã1979幎ãäžåœã¯ãããã ã«äŸµæ»ãã(äžè¶æŠäº)ã(ããŠå°å¹³ ã®æ代)",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 42,
"tag": "p",
"text": "ãŸããäžè¶æŠäºã§æŠéããã£ãŠãäžåœãšãããã ã¯ãäž¡åœãšã瀟äŒäž»çŸ©åœã§ããã®ã§ãã瀟äŒäž»çŸ©åœã©ããã¯æŠäºãããªãããšããã£ãå¹»æ³ã¯åŽ©å£ããŠãã£ãã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 43,
"tag": "p",
"text": "1953幎ã«ã¹ã¿ãŒãªã³ãæ»äº¡ãããšããœé£ã¯å€äº€æ¿çãèŠçŽããŠãã¢ã¡ãªã«ã«æ©ã¿å¯ã£ãããªãèŠããããã«ãªãã 1955幎ã«ã¯ç±³ãœè±ä»ã®4ãåœéŠè³ã«ãããžã¥ããŒãå·šé äŒè«ãéãããã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 44,
"tag": "p",
"text": "ãããŠ56幎ã«ãœé£ã¯ã³ãã³ãã©ã«ã ã解æ£ããã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 45,
"tag": "p",
"text": "ããããå®éã«ã¯ããœé£ã¯èŠæš©ã厩ãã€ããã¯ãªãã£ãã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 46,
"tag": "p",
"text": "1956幎ã«ããŒã©ã³ããšãã³ã¬ãªãŒã§ãåæ¿åºéåãèµ·ããæ°æ¿æš©ãæš¹ç«ããéã«ã¯ããã³ã¬ãªãŒã®æ°æ¿æš©ã¯ããœé£ããã®è±åŽãè¡šæãããããœé£è»ã«äŸµæ»ããããã³ã¬ãªãŒã®ç¬ç«ã¯å€±æããããŸããæ°æ¿æš©ã®æå°è
ããžã¯åŠåãããã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 47,
"tag": "p",
"text": "ãŸãæ±ãã€ãã§ã¯ã1950幎代ãã西ãã€ãã«è±åºãã人ãå¢ããã®ã§ã1961幎ã«æ±ãã€ãæ¿åºã¯ãã«ãªã³ã®å£ãç¯ããã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 48,
"tag": "p",
"text": "ãŸããœé£ã¯ããã¥ãŒãé©åœåŸã®ãã¥ãŒãã«ããµã€ã«åºå°ã建èšããŠãã¢ã¡ãªã«ãæçºãã(ãã¥ãŒãå±æ©(Cuban Missile Crisis ))ã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 49,
"tag": "p",
"text": "ãããã¢ã¡ãªã«ãè²æ©ãããããµã€ã«æ€å»ãããšããŠæµ·äžå°éãè¡ã£ãããããœé£ã¯è²æ©ããŠã¢ã¡ãªã«ã®èŠæ±ãåãå
¥ããã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 50,
"tag": "p",
"text": "ãã®åŸãç±³è±ãœã®3åœãã1963幎ã«éšåçæ žå®éšçŠæ¢æ¡çŽ(Partial Nuclear Test Ban Treaty )ã«èª¿å°ããã(ããã¯åã«ãå°äžæ žå®éšä»¥å€ã®æ žå®éšãçŠæ¢ããã ãã§ãããæ žä¿æã¯çŠæ¢ããªãããå°äžæ žå®éšãçŠæ¢ããªãã)ãŸããç±³ãœã®éŠè³ã©ãããé»è©±ã§çŽæ¥çã«æèŠäº€æããããããã©ã€ã³ããããã®63幎ã«èšçœ®ãããã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 51,
"tag": "p",
"text": "1970幎代åŸåãã¢ãã¬ãã¹ã¿ã³ã¯å
æŠç¶æ
ã«ããã芪ãœé£å¢åãã€ã¹ã©ã å¢åãäºã£ãŠããã 1979幎ã«ãœé£ã¯ã¢ãã¬ãã¹ã¿ã³ã«ãã芪ãœé£å¢åãè»äºæŽå©ããããã«ããœé£ã¯ã¢ãã¬ãã¹ã¿ã³ã«äŸµæ»ããã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 52,
"tag": "p",
"text": "ããã«ãããç±³ãœã®ç·åŒµã¯é«ãŸããã¢ã¡ãªã«ã¯è»äºè²»ãå¢å€§ãããªã©ããŠå¯Ÿå¿ããã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 53,
"tag": "p",
"text": "ãªããç¿1980幎ã«ã¯ã¢ã¹ã¯ã¯ã»ãªãªã³ããã¯ãéå¬ããããã西åŽè«žåœã®å€ãã¯ããã€ã³ãããããã(ããã§ããããã€ã³ããããšã¯ããœé£éå¬ã®è¡äºã«åå ãããªãããšã§ããœé£ã®è¡åã«å察ã§ãããšããæå¿ãè¡šæããããšã)",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 54,
"tag": "p",
"text": "1950幎代ããæ±è¥¿å·æŠãæ·±å»åããŠãããšãã¢ã¡ãªã«åœå
æ¿æ²»ã§ã¯ããã¢ã¡ãªã«åœå
ã«ãæ¢ã«ãœé£ã®ã¹ãã€ãå
¥ã蟌ãã§ããã®ã¯?ããšããäžå®ãé«ãŸããããã«ãŒã·ãŒäžé¢è°å¡ãäžå¿ã«ããŠãåå
±ç£äž»çŸ©ã®æŽ»åã掻çºåã(ãèµ€ç©ãããããã«ãŒã·ãºã )ãå
±ç£äž»çŸ©è
ãšã¿ãªãããæ¿æ²»å®¶ãç¥è人ãæ¹å€ãããã倱èããŠãã£ããããã 1980幎代ã«ã¢ã¡ãªã«ã®è²¡æ¿ã¯æªåãã財æ¿èµ€åãšè²¿æèµ€åã®ãããååã®èµ€åããšèšããããåå ã¯ããããèããããããäžå ãšããŠãã¢ãã¬ãã¹ã¿ã³äŸµæ»ã«å¯Ÿå¿ããçºã«è»äºè²»ãæ¥å¢ããŠããã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 55,
"tag": "p",
"text": "貿æèµ€åã®åå ã«ã€ããŠã¯ããã«é«ã«ãã貿æã®äžæ¯ãªã©ãããã ããããŸããæ¥æ¬ãªã©ã«ãããæ°èå·¥æ¥åœã®æé·ã«ãããã¢ã¡ãªã«çµæžãäžæ¯ã«ãªã£ãã®ãããããªãã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 56,
"tag": "p",
"text": "1987幎ã®ãã©ã¶åæã¯ããã«é«ãæ¯æ£ããã®ãç®çã§ããã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 57,
"tag": "p",
"text": "1956幎ã«ããŒã©ã³ããšãã³ã¬ãªãŒã§ãåæ¿åºéåãèµ·ããæ°æ¿æš©ãæš¹ç«ããéã«ã¯ããã³ã¬ãªãŒã®æ°æ¿æš©ã¯ããœé£ããã®è±åŽãè¡šæãããããœé£è»ã«äŸµæ»ããããã³ã¬ãªãŒã®ç¬ç«ã¯å€±æããããŸããæ°æ¿æš©ã®æå°è
ããžã¯åŠåãããã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 58,
"tag": "p",
"text": "1960幎代ã«å
¥ã£ãé ã«ãªããšããœé£ã®çµæžã¯äœè¿·ãããã ãã«ãå
±ç£äž»çŸ©ã®å€±æãæããã«ãªã£ãŠããã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 59,
"tag": "p",
"text": "ãããŠ1968幎ããã§ã³ã¹ãããã¢ã§ãèªç±åãšè³æ¬äž»çŸ©çãªçµæžæ¹é©ã䞻匵ããæ°æ¿æš©ãç»å Žããããã©ãã®æ¥ããšèšããããããœé£ã¯èªåœããã³åšèŸºåœãžã®æ³¢åãããããæ±ãã€ããªã©ã¯ã«ã·ã£ã¯æ¡çŽæ©æ§ã®è»ãšãšãã«è»äºä»å
¥ãããã§ã³ã¹ãããã¢ã®æ°äž»åéåã匟å§ãã(ãã§ã³äºä»¶)ã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 60,
"tag": "p",
"text": "",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 61,
"tag": "p",
"text": "ãœé£ã§ã¯1953幎ã«ã¹ã¿ãŒãªã³ãæ»ãã§ãåŸç¶ã®æš©åè
ã®ãã«ã·ãã§ãããœé£ã®æš©åãã«ããããã«ã·ãã§ãããã¹ã¿ãŒãªã³æ¹å€ãéå§ããã¹ã¿ãŒãªã³æ¿æš©æ代ã®å€§éç²æž
ãªã©ã®æªè¡ãæ¹å€ããã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 62,
"tag": "p",
"text": "ãªããããã§ãããç²æž
ããšã¯ãã¹ã¿ãŒãªã³ã®ãããªç¬è£è
ããå察掟ãåŠåããã匟å§ããããšã§ããã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 63,
"tag": "p",
"text": "ãããŠãã«ã·ãã§ãã²ããããœé£ããåã¢ã¡ãªã«çãªæ
床ããããããšãäžåœã¯ãœé£ããä¿®æ£äž»çŸ©ãã ãšæ¹å€ãã(äžãœè«äº)ã(瀟äŒäž»çŸ©è
ã®ãªãã§ã¯ããä¿®æ£äž»çŸ©ããšããçšèªã¯æ¹å€çãªæå³ã§çšããããã)",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 64,
"tag": "p",
"text": "æ€å®æç§æžã«ã¯ãäžèšã®ãããªæãã§æžããŠããã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 65,
"tag": "p",
"text": "å®æ
ã¯ã蟲æ¥ãå·¥æ¥ã®ç¥èã®ãªãæ¯æ²¢æ±ãã¡ãããããå®æ¥ã®å®åã«å£åºããããããã§ãããããããçµæã«çµãã£ãã®ã§ããã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 66,
"tag": "p",
"text": "äžäŸãšããŠãæ¯æ²¢æ±ãã蟲æ¥ã§ã¯ãã¹ãºã¡ãçš²ãé£ã¹ãããã®ã§ããªãã°ã¹ãºã¡ãé§é€ããŠæžããã°ã蟲æ¥çç£ãå¢ããã ããããšèããããã¹ãºã¡ãªã©éé³¥ã®éæ²»ãäžåœå
šåã«åœä»€ããããããçµæã¯ãã€ããŽãªã©ããããŸã§ã¯ã¹ãºã¡ãªã©ã®éé³¥ã«é£ã¹ãããŠããè«ãå¢ããããã§ãã€ããŽãªã©ã«çš²ã¯é£ã¹èãããããŸããŸã蟲æ¥çç£ã¯æžã£ããšããã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 67,
"tag": "p",
"text": "æ€å®æç§æžã§ã¯ãå¶äœãã倱æã®åå ã ãšèšã£ãŠããæç§æžããããããã®ãå¶äœããšããã®å®æ
ã¯ãäžè¿°ã®ãããªå®æ
ã§ããããå®æ
ã¯ãæ¯æ²¢æ±ã®é ã®ãªãã®ãçç³»åŠåã®ç¥èœããå¶äœãããã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 68,
"tag": "p",
"text": "ãªãåæé®®ã§ããé¡äŒŒã®å€±æããã£ããåæé®®ã®æå°è
ã¯ãç°çã§ãè(ãªã)ãæ€ããå¯åºŠãäžåã«ããã°ãçç£ã3åã«ãªãããšèãããããããåç©«ç©ã®æ é€äžè¶³ã«ãã£ãŠãããã蟲æ¥çç£ã¯æžã£ããšããã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 69,
"tag": "p",
"text": "ãã®ä»ã圌ãã¯ãå±±æãåãéããŠãç°çãšããŠé墟ããã°ã蟲æ¥çç£ãå¢ããã ããããšèããå®è¡ãããããããå±±æã®æžå°ã«ãã£ãŠã措氎ãåç ããããæãçµæã«çµãã£ããšããã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 70,
"tag": "p",
"text": "äžåœã§ã¯ã倧èºé²æ¿çã®å€±æã«ãããæ¯æ²¢æ±ã¯å€±èãããããããåæé®®ã§ã¯éæ¥æã¯å€±èããããã°ããåæé®®ã®èŸ²æ¥ã®æ··ä¹±ã¯æ·±ãŸã£ãã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 71,
"tag": "p",
"text": "ãªããäžåœãªã©ã§ã¯äººå£æ¿çãšããŠãåœæã¯ã人å£ãå¢ããã°ã蟲èæ¥ã®çç£éãå¢ããããè»éã®å
µå£«ã人æ°ãå¢ããã®ã§ãåœã匷ããªããã®ãããªå¹»æ³ãèããŠããã®ã§ã人å£å¢å æ¿çã®æäžãªã®ã«å¶äœãèµ·ããŠããŸããããããããçµæã«ãªãã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 72,
"tag": "p",
"text": "ãªããäžåœããäžäººã£åæ¿çããèšãåºããã®ã¯ã倧èºé²æ¿çãããåŸã®æ代ã§ããã1970幎代åŸåãããããäžäººã£åæ¿çããèšãåºããã§ããã(ãŠã£ãããã£ã¢ãäžäººã£åæ¿çãã®èšäºã«ãããšããã€ã¯60幎代ã®å€§èºé²æ¿çã®é ãããæ¢ã«çµ±èšèª¿æ»ã«ããã蟲æ¥çç£ã«å¯ŸããŠäººå£ãå€ããããšããå±æ§ãçºèŠãããŠããããããé»æ®ºãããããããåæ¿åºçãšã¿ãªããã匟å§ããããã人å£åé¡ã®æèµ·ãããããšããŠããç 究è
ã¯å€±èããŠãã£ããããã)",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 73,
"tag": "p",
"text": "1959幎ãåå°å¥(ãã
ããããã)ãæ¿æš©ã«ã€ãã倧èºé²æ¿çãèŠçŽããããããã66幎ã«åŸ©åž°ãã¯ããæ¯æ²¢æ±ãæå倧é©åœãèµ·ãããã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 74,
"tag": "p",
"text": "ãã®æå倧é©åœã§ã¯ãæ¯æ²¢æ±ã«äžäžãèªãåŠçãªã©ãåå¡ããŠãçŽ
è¡å
µã(ãããããžã)ãçµæããæ¯æ²¢æ±ã«æ¹å€çãªå
å¹¹éšãç¥è人ãæ¹å€ãããã:(â» åŠçã¯ãçç£çŸå Žã®å®åãªã³ãã§äžéç¥ããã ãããåãã(çç£çŸå Žã«ã€ããŠ)å®åãªã³ãã®æ¯æ²¢æ±ã«ãšã£ãŠã¯æ±ããããã)",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 75,
"tag": "p",
"text": "ãããŠåå°å¥ãå
å¹¹éšã倱èããããŸããç¥è人ã匟å§ããã",
"title": "å·æŠäžã®åœéæ
å¢"
},
{
"paragraph_id": 76,
"tag": "p",
"text": "ã¢ããªã«ã§ç¬¬äºæ¬¡äžç倧æŠã®åããç¬ç«ããŠããã®ã¯ããããã«ãªããªã¢ããšããªãã¢ãåã¢ããªã«ã ãã ã£ãã",
"title": "ã¢ããªã«ã®é£åž¯"
},
{
"paragraph_id": 77,
"tag": "p",
"text": "1955幎ãã€ã³ããã·ã¢ã®ãã³ãã³ã§ã¢ãžã¢ã»ã¢ããªã«äŒè°ãéå¬ãããåå åœãšããŠã€ã³ãã»äžåœã»ãšãžããã»ã€ã³ããã·ã¢ã»æ¥æ¬ãªã©ãæ¥æ¬ããµãã29ã¶åœããã€ãŸããåžåœäž»çŸ©ã®æ€æ°å°æ¯é
ã«å察ããããšã決ãããããŸãå¹³åå
±åããã£ããããååžåœäž»çŸ©ã»å¹³åå
±åã®ãå¹³å10ååã(ãžãã ãã
ããããã)ã宣èšãããã",
"title": "ã¢ããªã«ã®é£åž¯"
},
{
"paragraph_id": 78,
"tag": "p",
"text": "ãããŠ1960幎ã«ã¢ããªã«ã§äžæã«17ãåœãç¬ç«ãã1960幎ã¯ãã¢ããªã«ã®å¹Žããšèšãããã",
"title": "ã¢ããªã«ã®é£åž¯"
},
{
"paragraph_id": 79,
"tag": "p",
"text": "ãã®åŸã1961幎ã«ãŠãŒãŽã¹ã©ãã¢ã§éããã(第1å)éåçè«žåœéŠè³äŒè°ã«ã¯ãåºåžåœã«ã©ãã³ã¢ã¡ãªã«è«žåœãå ããããšãžãããã€ã³ããªã©25ãåœãåºåžããæ±è¥¿å·æŠã®ã©ã¡ãã®ç«å Žã«ããªããªãéåçã®ç«å Žã宣èšããããããŠãã¢ããªã«è«žåœããšãžããã€ã³ããªã©ã¯ã第äžäžçããšåŒã°ããã",
"title": "ã¢ããªã«ã®é£åž¯"
},
{
"paragraph_id": 80,
"tag": "p",
"text": "ãããŠã1963幎ã«ã¢ããªã«è«žåœã¯ãã¢ããªã«ã®é£åž¯ããããã¢ããªã«çµ±äžæ©æ§(OAUãåŸã®ã¢ããªã«é£åãAUã«çºå±ããã)ãçµæããã",
"title": "ã¢ããªã«ã®é£åž¯"
},
{
"paragraph_id": 81,
"tag": "p",
"text": "1945幎ãã¢ã©ãè«žåœã¯ã¢ã©ãã©ããã®é£åž¯ã匷ããããã1945幎ã«ã¢ã©ãè«žåœã¯ã¢ã©ãé£çãçµæããã",
"title": "äžæ±æŠäº"
},
{
"paragraph_id": 82,
"tag": "p",
"text": "ãã®é ãåœé£ã¯ãã¬ã¹ãã£ãã«ã€ããŠãã¢ã©ã人ãšãŠãã€äººãšã§åå²ããæ¡ãåºããã",
"title": "äžæ±æŠäº"
},
{
"paragraph_id": 83,
"tag": "p",
"text": "ããã1948幎ããŠãã€äººããã¬ã¹ãã£ãã®å°ãäžæ¹çã«ã€ã¹ã©ãšã«ã®å»ºåœã宣èšããããã®ãããã€ã¹ã©ãšã«ãšã(ã€ã¹ã©ãšã«ã«å察ãã)ã¢ã©ãè«žåœãšã®ããã ã§ã第1次äžæ±æŠäºãèµ·ããã",
"title": "äžæ±æŠäº"
},
{
"paragraph_id": 84,
"tag": "p",
"text": "第1次äžæ±æŠäºã«ã¢ã©ãè«žåœã¯ãã¶ããå€ãã®ã¢ã©ã人ãåå°ã倱ã£ãããé£æ°ãšãªã£ãã",
"title": "äžæ±æŠäº"
},
{
"paragraph_id": 85,
"tag": "p",
"text": "ãã®åŸããšãžããã§ã¯ã1952ã53幎ã«ãã»ã«(人ç©å)ã²ãããèªç±å°æ ¡å£ãé©åœãèµ·ãããçæ¿ãåãã(ãšãžããé©åœ)ã",
"title": "äžæ±æŠäº"
},
{
"paragraph_id": 86,
"tag": "p",
"text": "ç¿1954幎ã«ãã»ã«ã²ããããšãžããã¯ãã¹ãšãºéæ²³ã®åœæåã宣èšããã",
"title": "äžæ±æŠäº"
},
{
"paragraph_id": 87,
"tag": "p",
"text": "ãããšãã¹ãšãº(éæ²³ã®ãšãžãã)åœæåã«å察ããã€ã®ãªã¹ãããã©ã³ã¹ã»ã€ã¹ã©ãšã«ãšãã«ãšãžããã«äŸµæ»ããæŠäºã«ãªã£ãã(第2次äžæ±æŠäºãã¹ãšãºæŠäº) ãããåœéäžè«ã¯ãè±ä»ã€ã¹ã©ãšã«ã®ãšãžãã䟵æ»ãéé£ããè±ä»ã€ã¹ã©ãšã«ã¯æ€éã«è¿œã蟌ãŸããã",
"title": "äžæ±æŠäº"
},
{
"paragraph_id": 88,
"tag": "p",
"text": "21äžçŽã®ä»ã§ã¯ä¿¡ããããªããããããªããã1979幎ããåã®ã€ã©ã³ã¯ã西æŽåã®é²ãã§ããåœã§ãã£ãã",
"title": "ã€ã©ã³é©åœãã湟岞æŠäºãŸã§"
},
{
"paragraph_id": 89,
"tag": "p",
"text": "ããã1979幎ãã€ã¹ã©ãŒã æã·ãŒã¢æŽŸãé©åœãèµ·ãããå®æ家ãã¡ã€ããæé«æå°è
ãšããã€ã©ã³=ã€ã¹ã©ãŒã å
±ååœãèªçãã(ã€ã©ã³é©åœ)ãã€ã©ã³é©åœã¯ããããŸã§ã®é©åœãšã¯éããæ°äž»åã®é©åœã§ããªããå
±ç£äž»çŸ©ã«ããšã¥ãé©åœã§ããªããå®æã«ããšã¥ã埩å€çãªé©åœã§ãã£ãã®ã§ãåœé瀟äŒãé©ãããã",
"title": "ã€ã©ã³é©åœãã湟岞æŠäºãŸã§"
},
{
"paragraph_id": 90,
"tag": "p",
"text": "ã€ã©ã¯ã¯ãèªåœãžã®é©åœã®æ³¢åãæãã1980幎ã«ã€ã©ã³ã«äŸµæ»ããã€ã©ã³=ã€ã©ã¯æŠäºãå§ãŸã£ãã",
"title": "ã€ã©ã³é©åœãã湟岞æŠäºãŸã§"
},
{
"paragraph_id": 91,
"tag": "p",
"text": "ãããŠãã€ã©ã³=ã€ã©ã¯æŠäºã§ã¯ãã¢ã¡ãªã«ããœé£ãé©åœã®æ³¢åããããããããç±³ãœã¯ã€ã©ã¯ã«è»äºæŽå©ããã",
"title": "ã€ã©ã³é©åœãã湟岞æŠäºãŸã§"
},
{
"paragraph_id": 92,
"tag": "p",
"text": "ã€ã©ã³=ã€ã©ã¯æŠäºã¯88幎ãŸã§ç¶ããã",
"title": "ã€ã©ã³é©åœãã湟岞æŠäºãŸã§"
},
{
"paragraph_id": 93,
"tag": "p",
"text": "ãã®åŸã®1990幎ãã€ã©ã¯ãé£åœã¯ãŠã§ãŒãã«æ»ã蟌ã¿ãåœé£ã§ã¯ã€ã©ã¯ãžã®æŠåè¡äœ¿ã容èªãã決è°ãå¯æ±ºãããç¿1991幎ã«ã¯åœé£é決è°ã«åºã¥ããŠã¢ã¡ãªã«åè¡åœã²ãããå€åœç±è»ãã€ã©ã¯ãæ»æããã€ã©ã¯ãéäŒãããã¯ãŠã§ãŒãããã€ã©ã¯è»ãè¿œãåºãã(湟岞æŠäº)ã",
"title": "ã€ã©ã³é©åœãã湟岞æŠäºãŸã§"
},
{
"paragraph_id": 94,
"tag": "p",
"text": "ãªãã第äºæ¬¡ç³æ²¹å±æ©ã®åå ããåææã®ã€ã©ã³é©åœã§ããã(第äžæ¬¡ç³æ²¹å±æ©ã®åå ã¯ãäžæ±æŠäºã )",
"title": "ã€ã©ã³é©åœãã湟岞æŠäºãŸã§"
},
{
"paragraph_id": 95,
"tag": "p",
"text": "äžè¿°ã®ããã«ãã¢ãžã¢ãã¢ããªã«ã§ããã·ã§ããªãºã ã®èãã«ããšã¥ããŠãç¬ç«ãè¡ãããã(â» æž
æ°Žæžé¢ã®é«æ ¡ãå
Œ
±ãã®èŠè§£)(⻠第äžåŠç¿ç€ŸãçŸä»£ç€ŸäŒãã®æç§æžã§ãåæ§ã®èŠè§£ã)",
"title": "â» æ¿æ²»ææ³çãªããš"
},
{
"paragraph_id": 96,
"tag": "p",
"text": "äžæ¹ãæ¥äžã欧米å匷ãªã©ã®ãã·ã§ããªãºã ããäºåºŠã®äžç倧æŠãåŒããããããšèãã説ãããããã",
"title": "â» æ¿æ²»ææ³çãªããš"
},
{
"paragraph_id": 97,
"tag": "p",
"text": "ããã·ã§ããªãºã ããæ°æ䞻矩ãšèšãèšèã¯æªãããšã®ããã«äœ¿ãããããšãå€ãããå®éã®æŽå²ã¯ããç°¡åã§ã¯ãªãã",
"title": "â» æ¿æ²»ææ³çãªããš"
},
{
"paragraph_id": 98,
"tag": "p",
"text": "劥åç¹ãšããŠã¯ã(ç¬ç«ã®ããã«)å€åœããã®æ¯é
ã«ã¯å¯Ÿæã»æµæãããããããåœå
ã®å°æ°æ°æãå°éããªããã°ãªããªãããšãã£ããšãããã",
"title": "â» æ¿æ²»ææ³çãªããš"
},
{
"paragraph_id": 99,
"tag": "p",
"text": "æŽå²çã«ã¯ããã©ã³ã¹é©åœããã®åŸã®åä¹±ããŠã§ã¹ããã§ãªã¢æ¡çŽãªã©ãéããŠããã·ã§ããªãºã ã«ãã£ãŠåœå®¶ã®äžäœæ§ã確ç«ããŠããããããçŠç¥ã®åäžã«ã€ãªãã£ãŠãã£ããšããåŽé¢ãããã(æž
æ°Žæžé¢ã®é«æ ¡ãå
Œ
±ãã®èŠè§£)",
"title": "â» æ¿æ²»ææ³çãªããš"
},
{
"paragraph_id": 100,
"tag": "p",
"text": "ãŸãããã·ã§ããªãºã ã«ãã£ãŠã(絶察çæ¿ã®ãããªæå³ã§ã®)å°å»ºå¶ã解äœããŠãã£ãã®ããå°ãªããšããšãŒãããå²ã§ã®æµãã§ããã(æž
æ°Žæžé¢ã®é«æ ¡ãå
Œ
±ãã®èŠè§£)",
"title": "â» æ¿æ²»ææ³çãªããš"
}
] | null | == åœéé£å ==
äžçææ
ã®åŸã欧米䞻èŠåœã¯ãããã¯çµæžãæšãé²ããããã®ãããªãããã¯çµæžãåœå®¶éã®å¯Ÿç«ãçãã§æŠäºã®äžå ã«ãªã£ããšããåçã«ããšã¥ãã第äºæ¬¡å€§æŠæã®çµç€ãããããæŠåŸã®åœéçµæžã®ãããããåœéäŒè°ã§è©±ãåãããã
1944幎ã«ã¢ã¡ãªã«ã®ãã¬ãã³ãŠããºã§ã®åœéäŒè°ã話ãåããïŒãã¬ãã³ãŠããºäŒè°ããã¬ãã³ãŠããºåæãBretton Woods AgreementïŒããããã®äŒè°ãªã©ã«ãããèªç±è²¿æãæšé²ããããŸãåœéçãªçµæžã®å®å®åã®ããåœéé貚åºéïŒIMFã1947幎ããInternational Monetary FundïŒãåœé埩èéçºéè¡ïŒIBRDã1946幎ããInternational Bank for RaconstructuionïŒãèšç«ãããã
ãŸããé¢çšåã³è²¿æã«é¢ããäžè¬åå®ïŒGATTããã¬ãããã1948幎çºå¹ãGeneral Agreement on Tariffs and TradeïŒã§ã¯é¢çšã®åŒãäžããªã©ã®èªç±è²¿æãç®æãããããã®ãããªç¬¬äºæ¬¡å€§æŠã®çµæžç§©åºããã¬ãã³ã»ãŠããºäœå¶ãŸãã¯IMFïŒGATTäœå¶ãšããã
== ææŠåœã®æ°äž»å ==
[[ãã¡ã€ã«:Nuremberg-1-.jpg|thumb|right|240px|ãã¥ã«ã³ãã«ã¯è£å€ã®è¢«ååž<br>被ååžã«ããã®ã¯ããã¹ïŒãã€ãã®æå°è
ãã¡ã æŠååœãææŠåœãã€ãã®æå°è
ãã¡ãè£ããã被å人22人ã®ãã¡12åã«æ»åå€æ±ºãäžãããã]]
ææŠåœã®ãã€ããšæ¥æ¬ã§ã¯ãæŠååœã®è¡ãè£å€ã«ãã£ãŠããã€ããšæ¥æ¬ã®æŠäºæå°è
ãã¡ãè£ãããã
ãã€ãã§ã¯'''ãã¥ã«ã³ãã«ã¯'''åœéè»äºè£å€ãæ¥æ¬ã§ã¯æ¥µæ±åœéè»äºè£å€ïŒæ±äº¬è£å€ïŒãè¡ãããã
ãããŠãåŸæ¥ã®æŠäºç¯çœªïŒæèèåŸ
ãªã©ïŒã«ãã眪ãåãã®ã«å ããæ°ãã«å ãã£ããå¹³åã«å¯Ÿãã眪ãã«ãã£ãŠãè£ãããã
ãã¥ã«ã³ãã«ã¯è£å€ã§ã¯ãããã¹ã®æå°è
ãã¡ãè£ããããïŒâ» æ€å®æç§æžãããããèšãæ¹ãããŠãã®ã¯ãããšãåœéæ³éåããããã€ãè»å¹¹éšã§ããããã¹åºèº«ã§ãªããã€ãã®åéãšãªãŒãè»åŠæ ¡åºèº«ã®è»äººã ã£ãé£äžïŒãšãŒãªããã»ãã©ã³ã»ãã³ã·ã¥ã¿ã€ã³ãã°ããŒãªã¢ã³ãªã©ïŒã¯è»œã眰ã ã£ããããïŒ
ããããæŠååœã«ããæŠäºç¯çœªã«ã€ããŠã¯ããããã®è£å€ã§ã¯åãããªãã£ãã®ã§ãåœæããæèè
ã«ã¯ãäžå
¬å¹³ããªè£å€ã ãšåé¡èŠãããŠããã
== å·æŠ ==
第äºæ¬¡äžç倧æŠåŸãæ±ãšãŒãããè«žåœã®å€ãã«ã¯ãœé£ãé²é§ãããŸããªãæ±ãšãŒãããã«ç€ŸäŒäž»çŸ©åœãå€ãèªçããã
ã¢ã¡ãªã«ã»ã€ã®ãªã¹ã¯ããã®ãããªæ±ãšãŒãããã®ç¶æ³ãããœé£ã®äŸµç¥ãšããŠãšãããŠèŠæããããã®ç±³ãœã®å¯Ÿç«ã'''å·æŠ'''(Cold War <ref>æ©å ŽåŒŠ ã»ãç£ä¿®ãWORLD HISTORY for HighScool è±æ詳説äžçå²ãã2019幎10æ15æ¥ ç¬¬1ç 第3å·çºè¡ãP.375</ref>)ãšããããŸããã€ã®ãªã¹ã®åéŠçž'''ãã£ãŒãã«'''ã¯å·æŠã«ã€ããŠã1946幎ããœé£ãã'''éã®ã«ãŒãã³'''ããéãããŠãšãŒããããåæããŠãããšããŠããœé£ãæ¹å€ããã
ã¢ã¡ãªã«ã¯1947幎ã«å
±ç£äž»çŸ©åœãå°ã蟌ããç®çã§'''ãã«ãŒãã³-ãã¯ããªã³'''ïŒTruman Doctrine <ref>æ©å ŽåŒŠ ã»ãç£ä¿®ãWORLD HISTORY for HighScool è±æ詳説äžçå²ãã2019幎10æ15æ¥ ç¬¬1ç 第3å·çºè¡ãP.374</ref>ïŒãçºè¡šããã
ãŸãã西åŽè«žåœãçµæžæŽå©ããèšç»ã®'''ããŒã·ã£ã«-ãã©ã³'''(Marshall Plan <ref>æ©å ŽåŒŠ ã»ãç£ä¿®ãWORLD HISTORY for HighScool è±æ詳説äžçå²ãã2019幎10æ15æ¥ ç¬¬1ç 第3å·çºè¡ãP.374</ref>)ãçºè¡šãå®æœããã
1948幎6æã西åŽããœé£æãã§ãã€ãã®é貚æ¹é©ãããããšã«åçºãããœé£ã¯è¥¿ãã«ãªã³ãžã®äº€éè·¯ãé®æããïŒãã«ãªã³å°éïŒãããã西åŽã¯ç©ºèŒžã§ç©è³ã茞éããŠå¯Ÿæããã
1949幎ãæ±åŽïŒãœé£åŽïŒã¯ãæ±åŽåå
ã®çµæžååæ©æ§ãšããŠ'''ã³ã¡ã³ã³'''ïŒCOMECONãçµæžçžäºæŽå©äŒè°ïŒãèšç«ãã
ãã£ãœãã1949幎5æãè±ç±³ä»ãäžå¿ãšãã西åŽè«žåœã¯ãè»äºåççãªåœéæ©æ§ãšããŠã'''å倧西æŽæ¡çŽæ©æ§'''ïŒ'''NATO'''ãããããŒããšèªãïŒãèšç«ããã
ãªã1945幎ããœé£ã¯ãã«ãªã³å°éã®å€±æãã¿ãšãã1945幎5æã«ãœé£ã¯ãã«ãªã³å°éã解é€ããããããŠå1945幎ã®ç§ã«ããã€ãé£éŠå
±ååœïŒè¥¿ãã€ãïŒããã³ãã€ãæ°äž»å
±ååœïŒæ±ãã€ãïŒãæç«ããã
== åã¢ãžã¢è«žåœã®ç¬ç« ==
ã€ã®ãªã¹ã¯å€§æŠã§ç²åŒããæ€æ°å°ãç¶æããåã倱ã£ãŠããããŸãã€ã®ãªã¹æ¬åœã§æ€æ°å°ã®ç¶æã®ããã®è»äºè²»ãªã©ã®è² æ
ãåé¡èŠãããããšçã®çç±ãããã€ã®ãªã¹ã¯æ€æ°å°ã®ç¬ç«ã«ã¯ååçã«ãªã£ãã
ããããã€ã³ãã§ã¯çŸå°ã®ã¢ãžã¢äººãã¡ããç¬ç«åŸã®åœã®æ¹éãå®æäžã®æ¹éãããã£ãŠãïŒçŸå°ã¢ãžã¢äººã©ããã§ïŒå¯Ÿç«ãããå
šã€ã³ãã®çµ±äžãéèŠããåœæ°äŒè°æŽŸã®ã¬ã³ãã£ãŒããã³ãã«ãŒããšãäžæ¹ã'''ãžã³ããŒ'''ã²ãããã ã¹ãªã åœå®¶ã®åé¢ç¬ç«ãããšããå
šã€ã³ãïŒã ã¹ãªã é£çã察ç«ããã
ãããŠãã²ãšãŸãã1947幎ã«ããã³ãã¥ãŒæåŸã®å€ãã€ã³ãé£éŠãšãã ã¹ãªã ã®å€ãããã¹ã¿ã³å
±ååœã«åãããŠãã»ãŒåæã«ã€ã®ãªã¹ããç¬ç«ããã
ãã®åŸããã³ãã¥ãŒãšã ã¹ãªã ã®å¯Ÿç«ãæ¿åããæŠåè¡çªãããèåã説ãã¬ã³ãã£ãŒã¯ãæ¥é²æŽŸãã³ãã¥ãŒæåŸã«ãã£ãŠæ殺ãããŠããŸã£ãïŒ1948幎ïŒã
ããã¹ã¿ã³ã¯åœæãã€ã³ããæãã§æ±è¥¿ã«é åããã£ãŠãããæ±ããã¹ã¿ã³ãããã¹ã¿ã³ããã®ç¬ç«ãããšãããšã€ã³ãã¯ãããæ¯æŽãã1971幎ã«ã€ã³ãã¯è¥¿ããã¹ã¿ã³ã«äŸµæ»ãã1971幎ã«æ±ããã¹ã¿ã³ã¯ãã³ã°ã©ãã·ã¥ãšããŠç¬ç«ããã
ã€ã³ããšããã¹ã¿ã³ã¯ãã«ã·ããŒã«å°æ¹ã®åž°å±ãããã£ãŠããã³ãã³æŠåè¡çªãã
== æ±åã¢ãžã¢è«žåœã®ç¬ç« ==
1945幎ãããŒããã³ã¯ãããã 人æ°å
±ååœã®ç¬ç«ã宣èšããããå®äž»åœãã©ã³ã¹ã¯ãããèªããããããã ã«ãã©ã³ã¹è»ã掟å
µãã'''ã€ã³ãã·ãæŠäº'''ã«ãªã£ãã
ãã©ã³ã¹ã¯49幎ãããæã®æ§çåžããªïŒãã€ãããŠããããã åœãæš¹ç«ãããã54幎ã«'''ãã£ãšã³ããšã³ããŒã®æŠã'''ã§ãã©ã³ã¹ã¯æåãã'''ãžã¥ããŒãäŒæŠåå®'''ãçµãã§ãã©ã³ã¹ã¯ã€ã³ãã·ãããæ€éããã
çµæããããã ã¯åç·¯17床ç·ãåºæºã«ããŠãååŽããããã æ°äž»å
±ååœãååŽããããã åœãšãªã£ããããããŠãããã ã¯ãåå2ã€ã®åœå®¶ã«åè£ããã
ïŒã¢ã¡ãªã«æ€æ°å°ã®ïŒãã£ãªãã³ã«ã€ããŠã¯ãæŠåããã®ç¬ç«ã®çŽæã©ããïŒå€ªå¹³æŽæŠäºã«ãã£ãŠå°ãé
ãããïŒãã¢ã¡ãªã«ã¯1946幎ã«ãã£ãªãã³ã®ç¬ç«ãèªããã
ïŒãªã©ã³ãæ€æ°å°ã®ïŒã€ã³ããã·ã¢ã§ã¯ãæ¥æ¬ã®ææŠçŽåŸã®1945幎8æ17æ¥ã«ã¹ã«ã«ããç¬ç«ã宣èšããããå®äž»åœãªã©ã³ãã¯ç¬ç«ãèªãããæŠäºã«ãªã£ãã4幎ããŸãã®ç¬ç«æŠäºã®ããã1949幎ã«ã€ã³ããã·ã¢ã¯ç¬ç«ãèªããããã
ïŒã€ã®ãªã¹æ€æ°å°ã®ïŒãã¬ãŒå島ã§ã¯ãã²ãšãŸã1948幎ã«ã€ã®ãªã¹é ãã©ã€é£éŠãæç«ãã1957幎ã«ç¬ç«åœã®ããã©ã€é£éŠããšãªãã63幎ã«ç¬ç«åœã®'''ãã¬ãŒã·ã¢'''ã«ãªã£ãããã®åŸãäžåœäººã®å€ã'''ã·ã³ã¬ããŒã«'''ã1965幎ã«ãã¬ãŒã·ã¢ããåé¢ç¬ç«ããã
== å·æŠäžã®åœéæ
å¢ ==
=== æ±åã¢ãžã¢æ¹é¢ ===
==== ãããã åšèŸº ====
1960幎ãã¢ã¡ãªã«ã®æ¯æŽããåãããã ã§ã¯ãåæ¿åºçµç¹ã®åãããã 解æŸæ°ææŠç·ãçµæãããåãããã ã®æ¯æŽãåããŠã²ãªã©æŠãå±éããã
ïŒâ» ãªãã²ãªã©æŠã¯ãåœéæ³éåã§ãããçç±ã¯ãéæŠéå¡ã®äžè¬äººããæŠéå¡ã«ééãããŠå·»ã蟌ãŸããå¯èœæ§ãããããããã£ãŠã圌ãã¯åœéæ³éåã®ããéå£ã§ãããªããïŒ
65幎ãã¢ã¡ãªã«ã¯åãããã ãæ¯æŽããç®çã§ãåãããã ãžã®çæã«ãµã¿ããïŒåçïŒãåãããã ã«ãå
µæ°50äžäººãè¶
ãã倧è»ãããã£ãŠæ¯æŽãããïŒãªãéåœè»ããã¢ã¡ãªã«åŽãšããŠããããã æŠäºã«æŽŸå
µããåæŠããŠãããïŒ
ãããããœé£ãäžåœãåãããã ãæ¯æŽããã®ã§ãéžå±ã¯è çãã泥沌åãããããããŠã'''ãããã æŠäº'''ã¯ãæ¬æ ŒåããŠãã£ãã
æŠäºäžãã¢ã¡ãªã«ã¯ãã²ãªã©åŽãšã¿ãªããæãçŒãæããªã©ãããããããã¹ã³ãå ±éãªã©ã«ãã£ãŠãäžè«ããéé£ãããã西åŽã®ãã¹ã³ãã¯åœåè
ãªã®ã§ãã²ãªã©åŽã®ããè¡çºã¯æ¹å€ãããã¢ã¡ãªã«è»ã®è¡åãäžæ¹çã«é¿é£ããåœéäžè«ã¯ã¢ã¡ãªã«ã«æ¹å€çã«ãªã£ããïŒãªããæ±åŽã®ãã¹ã³ãã¯ãåãªããæ¿åºã«éœåã®ãã宣äŒæ©é¢ã§ãããïŒ
ã¢ã¡ãªã«ã¯åœå
å€ã®åæŠçãªæ¹å€ã«ãããããã1973幎ãã¢ã¡ãªã«è»ã¯ãŽã§ããã ããæ€éããã
ãããŠãæŠæ³ã¯åãããã åŽã«æå©ã«ãªããåãããã ã75幎ã«ã¯åãããã ã®éŠéœãµã€ãŽã³ãæ»ç¥ããæŠäºã¯çµçµããã
ããããŠããããã æŠäºã¯ãåãããã ã®åå©ã§çµãã£ãã
ããŠ1976幎ãã«ã³ããžã¢ã§ã¯ãã«ïŒãããæ¿æš©ãã«ããå
±ç£äž»çŸ©æ¿çãè¡ã£ãããç¬è£è
ã®ãã«ããã¯ã空æ³çãªå
±ç£äž»çŸ©ç念ã®ããšã«ãèªåœæ°ïŒã«ã³ããžã¢åœæ°ïŒã®å€§è殺ãè¡ã£ããç¥è人éçŽãäžå¿ã«ãããããã«ããæ¿æš©ã¯è殺ãè¡ã£ãã
ãããŠã«ã³ããžã¢ã¯ããã³ãã³é£åœã®ãããã ã«äŸµæ»ããã
ãããã ã¯åæãã1979幎ã«ãããã ã¯ã«ã³ããžã¢ã«æ»ã蟌ã¿ããã«ããæ¿æš©ãåããã
äžåœã¯ã«ã³ããžã¢ã®ãã«ããæ¿æš©ãæ¯æããŠããã®ã§ã1979幎ãäžåœã¯ãããã ã«äŸµæ»ããïŒ'''äžè¶æŠäº'''ïŒãïŒããŠå°å¹³ ã®æ代ïŒ
ãŸããäžè¶æŠäºã§æŠéããã£ãŠãäžåœãšãããã ã¯ãäž¡åœãšã瀟äŒäž»çŸ©åœã§ããã®ã§ãã瀟äŒäž»çŸ©åœã©ããã¯æŠäºãããªãããšããã£ãå¹»æ³ã¯åŽ©å£ããŠãã£ãã
:â» ãªãããã«ããã®è殺ã«ãããæ¥æ¬äººãç ç²ã«ãªã£ãŠãããåœæãã¢ã³ã³ãŒã«ã¯ããã®ä¿®åŸ©ãªã©ã®ç®çã§ã«ã³ããžã¢ã«æ»åšããŠããå°é家ãªã©ã®æ¥æ¬äººãæ°ååãç¥è人ã ãšããŠè殺ããããïŒæž
æ°Žæžé¢ã®ãæŽå²ç·åãããïŒ
=== ãœé£ã®å€äº€ ===
1953幎ã«ã¹ã¿ãŒãªã³ãæ»äº¡ãããšããœé£ã¯å€äº€æ¿çãèŠçŽããŠãã¢ã¡ãªã«ã«æ©ã¿å¯ã£ãããªãèŠããããã«ãªãã
1955幎ã«ã¯ç±³ãœè±ä»ã®4ãåœéŠè³ã«ãã'''ãžã¥ããŒãå·šé äŒè«'''ãéãããã
ãããŠ56幎ã«ãœé£ã¯ã³ãã³ãã©ã«ã ã解æ£ããã
ããããå®éã«ã¯ããœé£ã¯èŠæš©ã厩ãã€ããã¯ãªãã£ãã
1956幎ã«ããŒã©ã³ããšãã³ã¬ãªãŒã§ãåæ¿åºéåãèµ·ããæ°æ¿æš©ãæš¹ç«ããéã«ã¯ããã³ã¬ãªãŒã®æ°æ¿æš©ã¯ããœé£ããã®è±åŽãè¡šæãããããœé£è»ã«äŸµæ»ããããã³ã¬ãªãŒã®ç¬ç«ã¯å€±æããããŸããæ°æ¿æš©ã®æå°è
ããžã¯åŠåãããã
ãŸãæ±ãã€ãã§ã¯ã1950幎代ãã西ãã€ãã«è±åºãã人ãå¢ããã®ã§ã1961幎ã«æ±ãã€ãæ¿åºã¯ãã«ãªã³ã®å£ãç¯ããã
ãŸããœé£ã¯ããã¥ãŒãé©åœåŸã®ãã¥ãŒãã«ããµã€ã«åºå°ã建èšããŠãã¢ã¡ãªã«ãæçºããïŒ'''ãã¥ãŒãå±æ©'''ïŒCuban Missile Crisis <ref>æ©å ŽåŒŠ ã»ãç£ä¿®ãWORLD HISTORY for HighScool è±æ詳説äžçå²ãã2019幎10æ15æ¥ ç¬¬1ç 第3å·çºè¡ãP.389</ref>ïŒïŒã
ãããã¢ã¡ãªã«ãè²æ©ãããããµã€ã«æ€å»ãããšããŠæµ·äžå°éãè¡ã£ãããããœé£ã¯è²æ©ããŠã¢ã¡ãªã«ã®èŠæ±ãåãå
¥ããã
ãã®åŸãç±³è±ãœã®3åœãã1963幎ã«'''éšåçæ žå®éšçŠæ¢æ¡çŽ'''(Partial Nuclear Test Ban Treaty <ref>æ©å ŽåŒŠ ã»ãç£ä¿®ãWORLD HISTORY for HighScool è±æ詳説äžçå²ãã2019幎10æ15æ¥ ç¬¬1ç 第3å·çºè¡ãP.389</ref>)ã«èª¿å°ãããïŒããã¯åã«ãå°äžæ žå®éšä»¥å€ã®æ žå®éšãçŠæ¢ããã ãã§ãããæ žä¿æã¯çŠæ¢ããªãããå°äžæ žå®éšãçŠæ¢ããªããïŒãŸããç±³ãœã®éŠè³ã©ãããé»è©±ã§çŽæ¥çã«æèŠäº€æããããããã©ã€ã³ããããã®63幎ã«èšçœ®ãããã
1970幎代åŸåãã¢ãã¬ãã¹ã¿ã³ã¯å
æŠç¶æ
ã«ããã芪ãœé£å¢åãã€ã¹ã©ã å¢åãäºã£ãŠããã
1979幎ã«ãœé£ã¯ã¢ãã¬ãã¹ã¿ã³ã«ãã芪ãœé£å¢åãè»äºæŽå©ããããã«ããœé£ã¯ã¢ãã¬ãã¹ã¿ã³ã«äŸµæ»ããã
ããã«ãããç±³ãœã®ç·åŒµã¯é«ãŸããã¢ã¡ãªã«ã¯è»äºè²»ãå¢å€§ãããªã©ããŠå¯Ÿå¿ããã
ãªããç¿1980幎ã«ã¯ã¢ã¹ã¯ã¯ã»ãªãªã³ããã¯ãéå¬ããããã西åŽè«žåœã®å€ãã¯ããã€ã³ããããããïŒããã§ããããã€ã³ããããšã¯ããœé£éå¬ã®è¡äºã«åå ãããªãããšã§ããœé£ã®è¡åã«å察ã§ãããšããæå¿ãè¡šæããããšãïŒ
=== ã¢ã¡ãªã«ã®æ
å¢ ===
1950幎代ããæ±è¥¿å·æŠãæ·±å»åããŠãããšãã¢ã¡ãªã«åœå
æ¿æ²»ã§ã¯ããã¢ã¡ãªã«åœå
ã«ãæ¢ã«ãœé£ã®ã¹ãã€ãå
¥ã蟌ãã§ããã®ã¯ïŒããšããäžå®ãé«ãŸããããã«ãŒã·ãŒäžé¢è°å¡ãäžå¿ã«ããŠãåå
±ç£äž»çŸ©ã®æŽ»åã掻çºåãïŒãèµ€ç©ãããããã«ãŒã·ãºã ïŒãå
±ç£äž»çŸ©è
ãšã¿ãªãããæ¿æ²»å®¶ãç¥è人ãæ¹å€ãããã倱èããŠãã£ããããã
1980幎代ã«ã¢ã¡ãªã«ã®è²¡æ¿ã¯æªåãã財æ¿èµ€åãšè²¿æèµ€åã®ãããååã®èµ€åããšèšããããåå ã¯ããããèããããããäžå ãšããŠãã¢ãã¬ãã¹ã¿ã³äŸµæ»ã«å¯Ÿå¿ããçºã«è»äºè²»ãæ¥å¢ããŠããã
貿æèµ€åã®åå ã«ã€ããŠã¯ããã«é«ã«ãã貿æã®äžæ¯ãªã©ãããã ããããŸããæ¥æ¬ãªã©ã«ãããæ°èå·¥æ¥åœã®æé·ã«ãããã¢ã¡ãªã«çµæžãäžæ¯ã«ãªã£ãã®ãããããªãã
1987幎ã®ãã©ã¶åæã¯ããã«é«ãæ¯æ£ããã®ãç®çã§ããã
=== ãœé£ã»æ±æ¬§ã®æ
å¢ ===
1956幎ã«ããŒã©ã³ããšãã³ã¬ãªãŒã§ãåæ¿åºéåãèµ·ããæ°æ¿æš©ãæš¹ç«ããéã«ã¯ããã³ã¬ãªãŒã®æ°æ¿æš©ã¯ããœé£ããã®è±åŽãè¡šæãããããœé£è»ã«äŸµæ»ããããã³ã¬ãªãŒã®ç¬ç«ã¯å€±æããããŸããæ°æ¿æš©ã®æå°è
ããžã¯åŠåãããã
1960幎代ã«å
¥ã£ãé ã«ãªããšããœé£ã®çµæžã¯äœè¿·ãããã ãã«ãå
±ç£äž»çŸ©ã®å€±æãæããã«ãªã£ãŠããã
ãããŠ1968幎ããã§ã³ã¹ãããã¢ã§ãèªç±åãšè³æ¬äž»çŸ©çãªçµæžæ¹é©ã䞻匵ããæ°æ¿æš©ãç»å Žããã'''ãã©ãã®æ¥'''ããšèšããããããœé£ã¯èªåœããã³åšèŸºåœãžã®æ³¢åãããããæ±ãã€ããªã©ã¯ã«ã·ã£ã¯æ¡çŽæ©æ§ã®è»ãšãšãã«è»äºä»å
¥ãããã§ã³ã¹ãããã¢ã®æ°äž»åéåã匟å§ããïŒãã§ã³äºä»¶ïŒã
=== äžåœãšãœé£ ===
ãœé£ã§ã¯1953幎ã«ã¹ã¿ãŒãªã³ãæ»ãã§ãåŸç¶ã®æš©åè
ã®ãã«ã·ãã§ãããœé£ã®æš©åãã«ããããã«ã·ãã§ããã'''ã¹ã¿ãŒãªã³æ¹å€'''ãéå§ããã¹ã¿ãŒãªã³æ¿æš©æ代ã®å€§éç²æž
ãªã©ã®æªè¡ãæ¹å€ããã
ãªããããã§ãããç²æž
ããšã¯ãã¹ã¿ãŒãªã³ã®ãããªç¬è£è
ããå察掟ãåŠåããã匟å§ããããšã§ããã
ãããŠãã«ã·ãã§ãã²ããããœé£ããåã¢ã¡ãªã«çãªæ
床ããããããšãäžåœã¯ãœé£ããä¿®æ£äž»çŸ©ãã ãšæ¹å€ããïŒäžãœè«äºïŒãïŒç€ŸäŒäž»çŸ©è
ã®ãªãã§ã¯ããä¿®æ£äž»çŸ©ããšããçšèªã¯æ¹å€çãªæå³ã§çšãããããïŒ
==== ã倧èºé²æ¿çãã®å€±æ ====
æ€å®æç§æžã«ã¯ãäžèšã®ãããªæãã§æžããŠããã
1958幎ãæ¯æ²¢æ±ã¯å€§èºé²æ¿çãæ瀺ããŠãäžåœåå°ã«äººæ°å
¬ç€Ÿãã€ãããããã倱æããã
å®æ
ã¯ã蟲æ¥ãå·¥æ¥ã®ç¥èã®ãªãæ¯æ²¢æ±ãã¡ãããããå®æ¥ã®å®åã«å£åºããããããã§ãããããããçµæã«çµãã£ãã®ã§ããã
äžäŸãšããŠãæ¯æ²¢æ±ãã蟲æ¥ã§ã¯ãã¹ãºã¡ãçš²ãé£ã¹ãããã®ã§ããªãã°ã¹ãºã¡ãé§é€ããŠæžããã°ã蟲æ¥çç£ãå¢ããã ããããšèããããã¹ãºã¡ãªã©éé³¥ã®éæ²»ãäžåœå
šåã«åœä»€ããããããçµæã¯ãã€ããŽãªã©ããããŸã§ã¯ã¹ãºã¡ãªã©ã®éé³¥ã«é£ã¹ãããŠããè«ãå¢ããããã§ãã€ããŽãªã©ã«çš²ã¯é£ã¹èãããããŸããŸã蟲æ¥çç£ã¯æžã£ããšããã
æ€å®æç§æžã§ã¯ãå¶äœãã倱æã®åå ã ãšèšã£ãŠããæç§æžããããããã®ãå¶äœããšããã®å®æ
ã¯ãäžè¿°ã®ãããªå®æ
ã§ããããå®æ
ã¯ãæ¯æ²¢æ±ã®é ã®ãªãã®ãçç³»åŠåã®ç¥èœããå¶äœãããã
ãªãåæé®®ã§ããé¡äŒŒã®å€±æããã£ããåæé®®ã®æå°è
ã¯ãç°çã§ãèïŒãªãïŒãæ€ããå¯åºŠãäžåã«ããã°ãçç£ã3åã«ãªãããšèãããããããåç©«ç©ã®æ é€äžè¶³ã«ãã£ãŠãããã蟲æ¥çç£ã¯æžã£ããšããã
ãã®ä»ã圌ãã¯ãå±±æãåãéããŠãç°çãšããŠé墟ããã°ã蟲æ¥çç£ãå¢ããã ããããšèããå®è¡ãããããããå±±æã®æžå°ã«ãã£ãŠã措氎ãåç ããããæãçµæã«çµãã£ããšããã
äžåœã§ã¯ã倧èºé²æ¿çã®å€±æã«ãããæ¯æ²¢æ±ã¯å€±èãããããããåæé®®ã§ã¯éæ¥æã¯å€±èããããã°ããåæé®®ã®èŸ²æ¥ã®æ··ä¹±ã¯æ·±ãŸã£ãã
ãªããäžåœãªã©ã§ã¯äººå£æ¿çãšããŠãåœæã¯ã人å£ãå¢ããã°ã蟲èæ¥ã®çç£éãå¢ããããè»éã®å
µå£«ã人æ°ãå¢ããã®ã§ãåœã匷ããªããã®ãããªå¹»æ³ãèããŠããã®ã§ã人å£å¢å æ¿çã®æäžãªã®ã«å¶äœãèµ·ããŠããŸããããããããçµæã«ãªãã
ãªããäžåœããäžäººã£åæ¿çããèšãåºããã®ã¯ã倧èºé²æ¿çãããåŸã®æ代ã§ããã1970幎代åŸåãããããäžäººã£åæ¿çããèšãåºããã§ãããïŒãŠã£ãããã£ã¢ãäžäººã£åæ¿çãã®èšäºã«ãããšããã€ã¯60幎代ã®å€§èºé²æ¿çã®é ãããæ¢ã«çµ±èšèª¿æ»ã«ããã蟲æ¥çç£ã«å¯ŸããŠäººå£ãå€ããããšããå±æ§ãçºèŠãããŠããããããé»æ®ºãããããããåæ¿åºçãšã¿ãªããã匟å§ããããã人å£åé¡ã®æèµ·ãããããšããŠããç 究è
ã¯å€±èããŠãã£ãããããïŒ
==== æå倧é©åœ ====
1959幎ãåå°å¥ïŒãã
ãããããïŒãæ¿æš©ã«ã€ãã倧èºé²æ¿çãèŠçŽããããããã66幎ã«åŸ©åž°ãã¯ããæ¯æ²¢æ±ã'''æå倧é©åœ'''ãèµ·ãããã
ãã®æå倧é©åœã§ã¯ãæ¯æ²¢æ±ã«äžäžãèªãåŠçãªã©ãåå¡ããŠãçŽ
è¡å
µãïŒãããããžãïŒãçµæããæ¯æ²¢æ±ã«æ¹å€çãªå
å¹¹éšãç¥è人ãæ¹å€ãããã:ïŒâ» åŠçã¯ãçç£çŸå Žã®å®åãªã³ãã§äžéç¥ããã ãããåããïŒçç£çŸå Žã«ã€ããŠïŒå®åãªã³ãã®æ¯æ²¢æ±ã«ãšã£ãŠã¯æ±ãããããïŒ
ãããŠåå°å¥ãå
å¹¹éšã倱èããããŸããç¥è人ã匟å§ããã
== ã¢ããªã«ã®é£åž¯ ==
ã¢ããªã«ã§ç¬¬äºæ¬¡äžç倧æŠã®åããç¬ç«ããŠããã®ã¯ããããã«ãªããªã¢ããšããªãã¢ãåã¢ããªã«ã ãã ã£ãã
1955幎ãã€ã³ããã·ã¢ã®ãã³ãã³ã§'''ã¢ãžã¢ã»ã¢ããªã«äŒè°'''ãéå¬ãããåå åœãšããŠã€ã³ãã»äžåœã»ãšãžããã»ã€ã³ããã·ã¢ã»æ¥æ¬ãªã©ãæ¥æ¬ããµãã29ã¶åœããã€ãŸããåžåœäž»çŸ©ã®æ€æ°å°æ¯é
ã«å察ããããšã決ãããããŸãå¹³åå
±åããã£ããããååžåœäž»çŸ©ã»å¹³åå
±åã®ãå¹³å10ååãïŒãžãã ãã
ãããããïŒã宣èšãããã
ãããŠ1960幎ã«ã¢ããªã«ã§äžæã«17ãåœãç¬ç«ãã1960幎ã¯ã'''ã¢ããªã«ã®å¹Ž'''ããšèšãããã
ãã®åŸã1961幎ã«ãŠãŒãŽã¹ã©ãã¢ã§éãããïŒç¬¬1åïŒ'''éåçè«žåœéŠè³äŒè°'''ã«ã¯ãåºåžåœã«ã©ãã³ã¢ã¡ãªã«è«žåœãå ããããšãžãããã€ã³ããªã©25ãåœãåºåžããæ±è¥¿å·æŠã®ã©ã¡ãã®ç«å Žã«ããªããªãéåçã®ç«å Žã宣èšããããããŠãã¢ããªã«è«žåœããšãžããã€ã³ããªã©ã¯ã'''第äžäžç'''ããšåŒã°ããã
ãããŠã1963幎ã«ã¢ããªã«è«žåœã¯ãã¢ããªã«ã®é£åž¯ãããã'''ã¢ããªã«çµ±äžæ©æ§'''ïŒOAUãåŸã®ã¢ããªã«é£åãAUã«çºå±ãããïŒãçµæããã
== äžæ±æŠäº ==
1945幎ãã¢ã©ãè«žåœã¯ã¢ã©ãã©ããã®é£åž¯ã匷ããããã1945幎ã«ã¢ã©ãè«žåœã¯'''ã¢ã©ãé£ç'''ãçµæããã
ãã®é ãåœé£ã¯ãã¬ã¹ãã£ãã«ã€ããŠãã¢ã©ã人ãšãŠãã€äººãšã§åå²ããæ¡ãåºããã
ããã1948幎ããŠãã€äººããã¬ã¹ãã£ãã®å°ãäžæ¹çã«'''ã€ã¹ã©ãšã«'''ã®å»ºåœã宣èšããããã®ãããã€ã¹ã©ãšã«ãšãïŒã€ã¹ã©ãšã«ã«å察ããïŒã¢ã©ãè«žåœãšã®ããã ã§ã第1次'''äžæ±æŠäº'''ãèµ·ããã
第1次äžæ±æŠäºã«ã¢ã©ãè«žåœã¯ãã¶ããå€ãã®ã¢ã©ã人ãåå°ã倱ã£ãããé£æ°ãšãªã£ãã
ãã®åŸããšãžããã§ã¯ã1952ã53幎ã«ãã»ã«ïŒäººç©åïŒã²ãããèªç±å°æ ¡å£ãé©åœãèµ·ãããçæ¿ãåããïŒãšãžããé©åœïŒã
ç¿1954幎ã«ãã»ã«ã²ããããšãžããã¯ãã¹ãšãºéæ²³ã®åœæåã宣èšããã
ãããšãã¹ãšãºïŒéæ²³ã®ãšãžããïŒåœæåã«å察ããã€ã®ãªã¹ãããã©ã³ã¹ã»ã€ã¹ã©ãšã«ãšãã«ãšãžããã«äŸµæ»ããæŠäºã«ãªã£ããïŒç¬¬2次äžæ±æŠäºã'''ã¹ãšãºæŠäº'''ïŒ
ãããåœéäžè«ã¯ãè±ä»ã€ã¹ã©ãšã«ã®ãšãžãã䟵æ»ãéé£ããè±ä»ã€ã¹ã©ãšã«ã¯æ€éã«è¿œã蟌ãŸããã
== ã€ã©ã³é©åœãã湟岞æŠäºãŸã§ ==
21äžçŽã®ä»ã§ã¯ä¿¡ããããªããããããªããã1979幎ããåã®ã€ã©ã³ã¯ã西æŽåã®é²ãã§ããåœã§ãã£ãã
ããã1979幎ãã€ã¹ã©ãŒã æã·ãŒã¢æŽŸãé©åœãèµ·ãããå®æ家ãã¡ã€ããæé«æå°è
ãšããã€ã©ã³ïŒã€ã¹ã©ãŒã å
±ååœãèªçããïŒ'''ã€ã©ã³é©åœ'''ïŒãã€ã©ã³é©åœã¯ããããŸã§ã®é©åœãšã¯éããæ°äž»åã®é©åœã§ããªããå
±ç£äž»çŸ©ã«ããšã¥ãé©åœã§ããªããå®æã«ããšã¥ã埩å€çãªé©åœã§ãã£ãã®ã§ãåœé瀟äŒãé©ãããã
ã€ã©ã¯ã¯ãèªåœãžã®é©åœã®æ³¢åãæãã1980幎ã«ã€ã©ã³ã«äŸµæ»ãã'''ã€ã©ã³ïŒã€ã©ã¯æŠäº'''ãå§ãŸã£ãã
ãããŠãã€ã©ã³ïŒã€ã©ã¯æŠäºã§ã¯ãã¢ã¡ãªã«ããœé£ãé©åœã®æ³¢åããããããããç±³ãœã¯ã€ã©ã¯ã«è»äºæŽå©ããã
ã€ã©ã³ïŒã€ã©ã¯æŠäºã¯88幎ãŸã§ç¶ããã
ãã®åŸã®1990幎ãã€ã©ã¯ãé£åœã¯ãŠã§ãŒãã«æ»ã蟌ã¿ãåœé£ã§ã¯ã€ã©ã¯ãžã®æŠåè¡äœ¿ã容èªãã決è°ãå¯æ±ºãããç¿1991幎ã«ã¯åœé£é決è°ã«åºã¥ããŠã¢ã¡ãªã«åè¡åœã²ãããå€åœç±è»ãã€ã©ã¯ãæ»æããã€ã©ã¯ãéäŒãããã¯ãŠã§ãŒãããã€ã©ã¯è»ãè¿œãåºããïŒ'''湟岞æŠäº'''ïŒã
ãªãã第äºæ¬¡ç³æ²¹å±æ©ã®åå ããåææã®ã€ã©ã³é©åœã§ãããïŒç¬¬äžæ¬¡ç³æ²¹å±æ©ã®åå ã¯ãäžæ±æŠäºã ïŒ
== â» æ¿æ²»ææ³çãªããš ==
=== ããã·ã§ããªãºã ãã«ã€ã㊠===
:â» äžçå²Bã§ã¯ãªããå
Œ
±ãç§ç®ã®ç¯å²ã
äžè¿°ã®ããã«ãã¢ãžã¢ãã¢ããªã«ã§ããã·ã§ããªãºã ã®èãã«ããšã¥ããŠãç¬ç«ãè¡ããããïŒâ» æž
æ°Žæžé¢ã®é«æ ¡ãå
Œ
±ãã®èŠè§£ïŒïŒâ» 第äžåŠç¿ç€ŸãçŸä»£ç€ŸäŒãã®æç§æžã§ãåæ§ã®èŠè§£ãïŒ
äžæ¹ãæ¥äžã欧米å匷ãªã©ã®ãã·ã§ããªãºã ããäºåºŠã®äžç倧æŠãåŒããããããšèãã説ãããããã
ããã·ã§ããªãºã ããæ°æ䞻矩ãšèšãèšèã¯æªãããšã®ããã«äœ¿ãããããšãå€ãããå®éã®æŽå²ã¯ããç°¡åã§ã¯ãªãã
劥åç¹ãšããŠã¯ãïŒç¬ç«ã®ããã«ïŒå€åœããã®æ¯é
ã«ã¯å¯Ÿæã»æµæãããããããåœå
ã®å°æ°æ°æãå°éããªããã°ãªããªãããšãã£ããšãããã
æŽå²çã«ã¯ããã©ã³ã¹é©åœããã®åŸã®åä¹±ããŠã§ã¹ããã§ãªã¢æ¡çŽãªã©ãéããŠããã·ã§ããªãºã ã«ãã£ãŠåœå®¶ã®äžäœæ§ã確ç«ããŠããããããçŠç¥ã®åäžã«ã€ãªãã£ãŠãã£ããšããåŽé¢ããããïŒæž
æ°Žæžé¢ã®é«æ ¡ãå
Œ
±ãã®èŠè§£ïŒ
:â» æž
æ°Žã®æç§æžã¯èšã£ãŠãªãããããšãã°å€åœã®ç€Ÿäº€çžæã®åæ Œã®è²ŽæããããéçŽã¯éã£ãŠããŠçžããªããŠãåœå
ã®è²§æ°ããæŽå©ãã¹ãã ãšããèãã
ãŸãããã·ã§ããªãºã ã«ãã£ãŠãïŒçµ¶å¯Ÿçæ¿ã®ãããªæå³ã§ã®ïŒå°å»ºå¶ã解äœããŠãã£ãã®ããå°ãªããšããšãŒãããå²ã§ã®æµãã§ãããïŒæž
æ°Žæžé¢ã®é«æ ¡ãå
Œ
±ãã®èŠè§£ïŒ
:â» çŸä»£èªã§ã¯ãåœæ°æèãã¯è¯ãããšã«äœ¿ãããåŸåã§ãããããã·ã§ããªãºã ããæ°æ䞻矩ã¯æ¹å€çãªããšã«äœ¿ãããåŸåããããããããå®æ
ã¯ããåçŽã§ã¯ãªãããã®äºã€ã®çšèªã«ã¯äŒŒãç¹ããããã¢ããªã«ã®WW2æŠåŸã®ç¬ç«ããã®äŸã§ããããã§ããã°é«æ ¡ã¬ãã«ã§ã¯ãèšèã®ã€ã¡ãŒãžã ãã§ãªãå®æ
ãèãããšãããããããæ°ŽæºãŸã§èããŠã»ãããïŒãã ãæ¥æ¬ã®å€§åŠå
¥è©Šã¯ã¢ã¬ãªã®ã§åéšå匷ã«ã¯äžèŠã ããïŒ
[[ã«ããŽãª:å·æŠ]] | 2023-04-02T10:09:56Z | 2023-09-28T08:09:40Z | [] | https://ja.wikibooks.org/wiki/%E9%AB%98%E7%AD%89%E5%AD%A6%E6%A0%A1%E4%B8%96%E7%95%8C%E5%8F%B2B/%E3%82%A2%E3%83%A1%E3%83%AA%E3%82%AB%E3%81%AE%E8%A6%87%E6%A8%A9%E3%81%A8%E5%86%B7%E6%88%A6%E3%81%AE%E5%B1%95%E9%96%8B |
37,421 | å¥çæ | å¥çæã¯ã倪éœãã5çªç®ã«äœçœ®ããå°ææ垯ã®å€çžã«ããå°ææã§ãå
¬è»¢åšæã¯çŽ248幎ã§ãã 倪éœç³»ã®äžã§ãæãé ãã«äœçœ®ãã倩äœã®1ã€ã§ã倩çæãæµ·çæãªã©ã®å·šå€§ææããã¯éåžžã«é ãäœçœ®ã«ãããŸãã å¥çæã¯ã1930幎ã«ã¯ã©ã€ãã»ãã³ããŒã«ãã£ãŠçºèŠãããæåã¯ææãšããŠæ±ãããŠããŸãããããã®åŸã®ç 究ã«ããææã§ã¯ãªããæºææããšãããŸããã ãããããã®åŸã®ãããªãç 究ã«ãããå¥çæã¯ææãšèŠãªãã¹ãã§ãããšã®æèŠãåºãããçŸåšã§ãè°è«ãç¶ããŠããŸãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "å¥çæã¯ã倪éœãã5çªç®ã«äœçœ®ããå°ææ垯ã®å€çžã«ããå°ææã§ãå
¬è»¢åšæã¯çŽ248幎ã§ãã 倪éœç³»ã®äžã§ãæãé ãã«äœçœ®ãã倩äœã®1ã€ã§ã倩çæãæµ·çæãªã©ã®å·šå€§ææããã¯éåžžã«é ãäœçœ®ã«ãããŸãã å¥çæã¯ã1930幎ã«ã¯ã©ã€ãã»ãã³ããŒã«ãã£ãŠçºèŠãããæåã¯ææãšããŠæ±ãããŠããŸãããããã®åŸã®ç 究ã«ããææã§ã¯ãªããæºææããšãããŸããã ãããããã®åŸã®ãããªãç 究ã«ãããå¥çæã¯ææãšèŠãªãã¹ãã§ãããšã®æèŠãåºãããçŸåšã§ãè°è«ãç¶ããŠããŸãã",
"title": ""
}
] | å¥çæã¯ã倪éœãã5çªç®ã«äœçœ®ããå°ææ垯ã®å€çžã«ããå°ææã§ãå
¬è»¢åšæã¯çŽ248幎ã§ãã
倪éœç³»ã®äžã§ãæãé ãã«äœçœ®ãã倩äœã®1ã€ã§ã倩çæãæµ·çæãªã©ã®å·šå€§ææããã¯éåžžã«é ãäœçœ®ã«ãããŸãã
å¥çæã¯ã1930幎ã«ã¯ã©ã€ãã»ãã³ããŒã«ãã£ãŠçºèŠãããæåã¯ææãšããŠæ±ãããŠããŸãããããã®åŸã®ç 究ã«ããææã§ã¯ãªããæºææããšãããŸããã
ãããããã®åŸã®ãããªãç 究ã«ãããå¥çæã¯ææãšèŠãªãã¹ãã§ãããšã®æèŠãåºãããçŸåšã§ãè°è«ãç¶ããŠããŸãã | [[File:Pluto in True Color - High-Res.jpg|thumb]]
å¥çæã¯ã倪éœãã5çªç®ã«äœçœ®ããå°ææ垯ã®å€çžã«ããå°ææã§ãå
¬è»¢åšæã¯çŽ248幎ã§ãã
倪éœç³»ã®äžã§ãæãé ãã«äœçœ®ãã倩äœã®1ã€ã§ã倩çæãæµ·çæãªã©ã®å·šå€§ææããã¯éåžžã«é ãäœçœ®ã«ãããŸãã
å¥çæã¯ã1930幎ã«ã¯ã©ã€ãã»ãã³ããŒã«ãã£ãŠçºèŠãããæåã¯ææãšããŠæ±ãããŠããŸãããããã®åŸã®ç 究ã«ããææã§ã¯ãªããæºææããšãããŸããã
ãããããã®åŸã®ãããªãç 究ã«ãããå¥çæã¯ææãšèŠãªãã¹ãã§ãããšã®æèŠãåºãããçŸåšã§ãè°è«ãç¶ããŠããŸãã
[[ã«ããŽãª:倩æåŠ]] | 2023-04-04T04:49:39Z | 2024-01-08T20:32:23Z | [] | https://ja.wikibooks.org/wiki/%E5%86%A5%E7%8E%8B%E6%98%9F |
37,450 | F Sharp | F#ã¯ã.NETãã¬ãŒã ã¯ãŒã¯äžã§åäœãããã«ããã©ãã€ã èšèªã§ãããã®èšèªã¯ãéçåä»ããé¢æ°åããªããžã§ã¯ãæåãããã³äžŠåããã°ã©ãã³ã°ããµããŒãããŠããŸãã
F#ã¯ãMicrosoft Researchãéçºããèšèªã§ãæ©æ¢°åŠç¿ãæ°å€èšç®ãã¯ã©ãŠãã³ã³ãã¥ãŒãã£ã³ã°ãªã©ã®åéã§åºãå©çšãããŠããŸãããã®èšèªã¯ãé«ãæœè±¡åºŠãšã·ã³ãã«ãã«ãããããã°ã©ããŒã®çç£æ§ãåäžãããŸãã
æ¬æžã¯ãF#ã®åºç€ããå¿çšãŸã§ã網çŸ
ããæç§æžã§ããèªè
ã¯ãF#ã§ã®ããã°ã©ãã³ã°ã®åºç€ã身ã«ã€ããå¹ççãªã¢ã«ãŽãªãºã ãé«åºŠãªäžŠååŠçã®å®è£
ãŸã§ãåŠã¶ããšãã§ããŸãã
æ¬æžããF#ãåŠã³å§ãã人ããŸãã¯F#ãå¿çšããã人ã«ãšã£ãŠã®è²ŽéãªãªãœãŒã¹ãšãªãããšãé¡ã£ãŠããŸãã
F#ã¯ã.NET Frameworkäžã§åäœããé¢æ°åããã°ã©ãã³ã°èšèªã§ãã F#ã¯ã.NETçšã®æ©èœãæäŸããå
±éèšèªã©ã³ã¿ã€ã (CLR)ã®äžéšã§ãã F#ã¯2005幎ã«ãã€ã¯ããœãããéçºãã2007幎ã«æåã®å
¬éããŒãžã§ã³ãç»å ŽããŸããã F#ã¯ãéçåä»ããåæšè«ãé«éé¢æ°ãé«åºŠãªãã¿ãŒã³ãããã³ã°ãããã³äžŠåããã°ã©ãã³ã°ãç°¡æœãã€å¹æçã«è¡ãããšãã§ããŸãã
F#ã¯ãé¢æ°åããã°ã©ãã³ã°èšèªãšããŠèšèšãããŠããŸãããã®ãããF#ã¢ããªã±ãŒã·ã§ã³ã¯ã倧éšåãé¢æ°ã§æ§æãããŠããŸããF#ã¯ã.NET Frameworkã®äžéšã§ãããåãã©ã€ãã©ãªãããŒã«ãããã³ãªãœãŒã¹ã«ã¢ã¯ã»ã¹ããããšãã§ããŸãã F#ã¯ãC#ãVB.NETãšåæ§ã«ãæ¢åã®.NETã³ã³ããŒãã³ããã©ã€ãã©ãªãã¯ã©ã¹ãããã³ã¢ãžã¥ãŒã«ã䜿çšã§ããŸãã
F#ã¯ãŸãã䞊åããã³éåæããã°ã©ãã³ã°ã«æé©åãããŠããŸãããããã®æ©èœã«ããã倧èŠæš¡ãªäžŠåèšç®ãå¹ççãã€ç°¡æœã«èšè¿°ã§ããŸããF#ã¯ã.NETã®Asynchronous Programming Model(APM)ãTask-Parallel Library(TPL)ãªã©ã.NETã®æšæºäžŠååã©ã€ãã©ãªã«ãã¢ã¯ã»ã¹ã§ããŸãã
F#ã®ç¹åŸŽã¯ä»¥äžã®éãã§ãã
ãã«ããã©ãããã©ãŒã 察å¿:F#ã¯ã.NET Frameworkã.NET Coreã®ãããªMicrosoftã®ãã©ãããã©ãŒã ã ãã§ãªããMonoãUnityãªã©ãããŸããŸãªãã©ãããã©ãŒã ã§åäœããŸãããŸããF#ã¯WindowsãLinuxãMac OS Xãªã©ã®ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§ãå©çšã§ããŸãã
ããªãã®ç°å¢ã«å¿ããŠãè€æ°ã®æ¹æ³ã§F#ãã€ã³ã¹ããŒã«ããããšãã§ããŸãã
Visual Studioã䜿çšããŠF#ãã€ã³ã¹ããŒã«ããå ŽåãVisual Studio InstallerããŸãã€ã³ã¹ããŒã«ãããŸããåããŠVisual StudioãããŠã³ããŒãããå Žåã¯ãã€ã³ã¹ããŒã©ããé©åãªãšãã£ã·ã§ã³ã®Visual Studioãã€ã³ã¹ããŒã«ããŠãã ããã
æ¢ã«Visual Studioãã€ã³ã¹ããŒã«ãããŠããå Žåã¯ãF#ãè¿œå ããããšãã£ã·ã§ã³ã®æšªã«ãããå€æŽããéžæããŠãã ãããã¯ãŒã¯ããŒãããŒãžã§ãASP.NETããã³Webéçºã¯ãŒã¯ããŒããéžæããŸããããã«ã¯ãASP.NET Coreãããžã§ã¯ãã®F#ããã³.NET CoreãµããŒããå«ãŸããŠããŸãããéžæãããã¹ãŠãã€ã³ã¹ããŒã«ããããéžæããŠãå³äžé
ã®ãå€æŽããéžæããŸãã
Visual Studio Installerã§F#ãå«ãŸããVisual Studioãéå§ããã«ã¯ããVisual Studioã§èµ·åããéžæããŠãã ããã
Visual Studio Codeã§F#ãã€ã³ã¹ããŒã«ããå ŽåãgitãPATHã§å©çšå¯èœã§ããããšã確èªããŠãã ãããã³ãã³ãããã³ããã§git --versionãå
¥åããEnterãæŒãããšã§ç¢ºèªã§ããŸãã.NET SDKããã³Visual Studio Codeãã€ã³ã¹ããŒã«ããŠãã ããããæ¡åŒµæ©èœãã¢ã€ã³ã³ãéžæãããIonideãã§æ€çŽ¢ããŠãã ããããIonide-fsharpãã¯ãVisual Studio Codeã§F#ããµããŒãããããã«å¿
èŠãªå¯äžã®ãã©ã°ã€ã³ã§ãããã ããFAKEãµããŒããååŸããããã«ãIonide-FAKEããã€ã³ã¹ããŒã«ããããããã±ãŒãžã®ãµããŒããååŸããããã«ãIonide-Paketããã€ã³ã¹ããŒã«ããããšãã§ããŸããFAKEããã³Paketã¯ããããžã§ã¯ãã®ãã«ãããã³äŸåé¢ä¿ã®ç®¡çã«äœ¿çšããããè¿œå ã®F#ã³ãã¥ããã£ããŒã«ã§ããVisual Studio for Macã§F#ãã€ã³ã¹ããŒã«ããå Žåãã©ã®æ§æãéžæããŠããF#ã¯ããã©ã«ãã§ã€ã³ã¹ããŒã«ãããŸããã€ã³ã¹ããŒã«ãå®äºãããããVisual Studioãèµ·åããéžæããŠãã ããã
MacOSäžã®Finderãä»ããŠVisual Studioãéãããšãã§ããŸãã
ãã«ããµãŒããŒã«F#ãã€ã³ã¹ããŒã«ããå Žåã.NET SDKãä»ããŠ.NET CoreãŸãã¯.NET Frameworkã䜿çšããŠããå Žåã¯ããã«ããµãŒããŒã«.NET SDKãã€ã³ã¹ããŒã«ããã ãã§ããå¿
èŠãªãã¹ãŠãå«ãŸããŠããŸãã.NET Frameworkã䜿çšãã.NET SDKã䜿çšããŠããªãå Žåã¯ãWindows Serverã«Visual Studio Build Tools SKUãã€ã³ã¹ããŒã«ããå¿
èŠããããŸããã€ã³ã¹ããŒã©ã§ã.NETãã¹ã¯ããããã«ãããŒã«ãéžæããå³åŽã®ã€ã³ã¹ããŒã©ã¡ãã¥ãŒã§F#ã³ã³ãã€ã©ã³ã³ããŒãã³ããéžæããŸãã
F#ã¯ãã«ããã©ãã€ã ããã°ã©ãã³ã°èšèªã§ãããé¢æ°åèšèªã®ç¹åŸŽãæã£ãŠããŸããF#ã§ã¯ãæ°å€åŒãè«çåŒãæåååŒããªã¹ãåŒãé
ååŒãã¿ãã«åŒãªã©ãããŸããŸãªåŒããµããŒããããŠããŸãã
æ°å€åŒã§ã¯ãç®è¡æŒç®å(+ã-ã*ã/ãªã©)ãæ¯èŒæŒç®å(=ã<ã>ãªã©)ã䜿çšããŠãæ°å€èšç®ãè¡ãããšãã§ããŸããäŸãã°ã以äžã®ãããªã³ãŒããæžãããšãã§ããŸãã
è«çåŒã§ã¯ãè«çæŒç®å(&&ã||ãnotãªã©)ã䜿çšããŠãè«çæŒç®ãè¡ãããšãã§ããŸããäŸãã°ã以äžã®ãããªã³ãŒããæžãããšãã§ããŸãã
æåååŒã§ã¯ãæååçµåæŒç®å(+)ã䜿çšããŠãæååãçµåããããšãã§ããŸããäŸãã°ã以äžã®ãããªã³ãŒããæžãããšãã§ããŸãã
ãªã¹ãåŒã§ã¯ããªã¹ãæŒç®å(::)ã䜿çšããŠããªã¹ããäœæããããšãã§ããŸããäŸãã°ã以äžã®ãããªã³ãŒããæžãããšãã§ããŸãã
é
ååŒã§ããªã¹ãæŒç®åã䜿çšããããšãã§ããŸããããã以å€ã«ãæ§ã
ãªé¢æ°ã䜿çšããããšãã§ããŸããäŸãã°ã以äžã®ãããªã³ãŒããæžãããšãã§ããŸãã
ã¿ãã«åŒã§ã¯ãã«ã³ã(,)ã䜿çšããŠãè€æ°ã®å€ã1ã€ã®ãªããžã§ã¯ãã«ãŸãšããããšãã§ããŸããäŸãã°ã以äžã®ãããªã³ãŒããæžãããšãã§ããŸãã
以äžã¯ F# ã®å¶åŸ¡æ§é ã®æŠèŠã§ãã
F# ã§ã¯ãif/then/else æ§æã䜿ã£ãŠæ¡ä»¶åå²ãè¡ãããšãã§ããŸããæ§æã¯ä»¥äžã®éãã§ãã
äŸãã°ãx ã 0 ãã倧ããå Žåã«ã¯ "Positive"ã0 ã®å Žåã«ã¯ "Zero"ã0 ããå°ããå Žåã«ã¯ "Negative" ãšããæååãè¿ãé¢æ°ãå®çŸ©ãããšä»¥äžã®ããã«ãªããŸãã
F# ã§ã¯ãfor ã«ãŒãã while ã«ãŒãã䜿ã£ãŠå埩åŠçãè¡ãããšãã§ããŸãã
äŸãã°ã1 ãã 10 ãŸã§ã®åèšãèšç®ãããšä»¥äžã®ããã«ãªããŸãã
äžèšã® for ã®äŸãšç䟡ãªã«ãŒããwhileã§æžããäŸ
F# ã§ã¯ãtry/with æ§æã䜿ã£ãŠäŸå€åŠçãè¡ãããšãã§ããŸãã
äŸãã°ãå²ãç®ãè¡ãé¢æ°ãå®çŸ©ãããšä»¥äžã®ããã«ãªããŸãã
第 1 åŒæ°ã第 2 åŒæ°ã§å²ããæŽæ°ã®çµæãè¿ããŸãããã ãã第 2 åŒæ°ã 0 ã®å Žåã¯äŸå€ãçºçãã0 ãè¿ããŸãã
F#ã«ãããé¢æ°å®çŸ©ã®äžè¬çãªæžåŒã¯ä»¥äžã®éãã§ãã
ãããã®äŸã䜿ã£ãŠã次ã«ç€ºãããã«é¢æ°ãåŒã³åºãããšãã§ããŸãã
F#ã§ååž°é¢æ°ãå®çŸ©ããå Žåã¯ã以äžã®æžåŒã®ããã« rec ããŒã¯ãŒãã䌎ã£ãŠå®çŸ©ããŸãã
ããšãã°ã0ããnãŸã§ã®èªç¶æ°ã®åãèšç®ãã以äžã®ååž°é¢æ°ãå®çŸ©ããå Žåã¯ã以äžã®ããã«æžããŸãã
ãã®é¢æ°ã䜿ã£ãŠãäŸãã°sum 5ãè©äŸ¡ãããšã1 + 2 + 3 + 4 + 5 = 15ãè¿ãããŸãã
F#ã®ã¢ãžã¥ãŒã«ã¯ãF#ã³ãŒãã®åå©çšå¯èœãªåäœã§ãããé¢æ°ãåãå€æ°ãããã³ãã®ä»ã®èŠçŽ ãå«ãããšãã§ããŸããã¢ãžã¥ãŒã«ã¯ãF#ã³ãŒãã®æ§é åãããçµç¹åãå¯èœã«ããã³ãŒãã®èªã¿ããããä¿å®æ§ãããã³åå©çšæ§ãåäžãããŸããã¢ãžã¥ãŒã«ã¯ãã³ãŒãã®äžéšãé ãããšãã§ããã«ãã»ã«åãå®çŸããããšãã§ããŸããF#ã®ã¢ãžã¥ãŒã«ã¯ãå¥ã®F#ããã°ã©ã ã.NETã¢ããªã±ãŒã·ã§ã³ã§äœ¿çšããããšãã§ããŸãã
äžèšã®äŸã§ã¯ãMyModuleãšããååã®ã¢ãžã¥ãŒã«ã宣èšããŠããŸãããã®ã¢ãžã¥ãŒã«å
ã«ã¯ãaddãšsubtractãšããé¢æ°ãå®çŸ©ãããŠããŸããaddé¢æ°ã¯2ã€ã®åŒæ°ãåãåããããããå ç®ããçµæãè¿ããŸããsubtracté¢æ°ã¯åæ§ã«2ã€ã®åŒæ°ãåãåããããããæžç®ããçµæãè¿ããŸãã
ãã®ããã«ã¢ãžã¥ãŒã«ãå©çšããå Žåã¯ã以äžã®ããã«ä»ã®ãã¡ã€ã«ã§ã€ã³ããŒãããŠäœ¿çšããããšãã§ããŸãã
ããã§ã¯ãMyModuleã¢ãžã¥ãŒã«ãopenããŠä»ã®ãã¡ã€ã«ããã¢ã¯ã»ã¹ããããšãã§ããããã«ãªã£ãŠããŸãããããŠãaddãšsubtractãšããé¢æ°ãåŒã³åºããŠããŸãããããã®é¢æ°ã¯ãããããåŒæ°ãäžããããšã§ãå ç®ããã³æžç®ã®çµæãååŸããããšãã§ããŸãã
F#ã«ã¯ã以äžã®ãããªããŒã¿åããããŸãã
以äžã F# ã§æäŸãããããŒã¿åã®çš®é¡ã«ãªããŸãã
F#ã®ã¿ãã«ã«ã¯ä»¥äžã®ãããªç¹åŸŽããããŸãã
ãŸããF#ã®ã¿ãã«ã¯ä»¥äžã®ãããªäœ¿ãæ¹ãã§ããŸãã
ã¿ãã«ã®å€ãå€æ°ã«ä»£å
¥ããããšãã§ããŸãã
ã¿ãã«ãé¢æ°ã®æ»ãå€ãšããŠäœ¿çšããããšãã§ããŸãã
ã¿ãã«ããªã¹ãã®èŠçŽ ãšããŠäœ¿çšããããšãã§ããŸãã
以äžãF#ã®ã¿ãã«ã«é¢ããæ©èœã®äžéšã§ãã
F#ã®Optionåã¯ãå€ãååšããå Žåãšååšããªãå Žåã®2ã€ã®ç¶æ
ãè¡šãããã«äœ¿çšãããŸããOptionåã¯F#æšæºã©ã€ãã©ãªã®äžéšã§ããã以äžã®ããã«å®çŸ©ãããŸãã
'Tã«ã¯ä»»æã®åãæå®ããããšãã§ããŸããäŸãã°ãOption<int>ã¯æŽæ°åã®å€ãååšããå Žåãšååšããªãå Žåã®2ã€ã®ç¶æ
ãè¡šçŸããããã«äœ¿çšããããšãã§ããŸãã
Optionåã«ã¯ãå€ãååšãããã©ããã確èªããããã«äœ¿çšã§ããé¢æ°ãçšæãããŠããŸãã以äžã«ãã®äŸã瀺ããŸãã
ç¯å²ãæã€å€ãè¿ãå ŽåãOptionåã䜿çšããããšãäžè¬çã§ãã以äžã®äŸã¯ãæååãæ°å€ã§ããå Žåã«ãã®æ°å€ãè¿ãããã以å€ã®å Žåã¯Noneãè¿ããŸãã
ããã䜿ã£ãŠã"10"ã®å€ã解æãããšãçµæã¯Some 10ã«ãªããŸãã"abc"ã®ããã«è§£æã§ããªãå€ã®å Žåã¯ãNoneãè¿ãããŸãã
Optionåã䜿çšãããšãNullãã€ã³ã¿äŸå€ãªã©ã®ãã°ãé²ãããšãã§ããŸããããããããã°ã©ããŒãæåã§Optionåãæ±ãããã®ã³ãŒããæžãå¿
èŠããããããå€å°é¢åãªé¢ããããŸãã
以äžã¯ãOptionåã®äž»ãªæäœã§ãã
F#ã«ãããã¬ã³ãŒãã¯ããã£ãŒã«ãã®éåã«ååãä»ããŠæ§é ãå®çŸ©ããããã®æ©èœã§ããF#ã®ã¬ã³ãŒãã¯ã.NETã®ã¯ã©ã¹ãšã¯ç°ãªããå€å(value type)ãšããŠå®çŸ©ãããŸãã
以äžã¯ãF#ã§ã¬ã³ãŒããå®çŸ©ããæ¹æ³ãšãã¬ã³ãŒãã䜿çšããæ¹æ³ã«ã€ããŠã®äŸã§ãã
ãã®äŸã§ã¯ãPersonãšããããŒã¿å(ã¬ã³ãŒã)ãå®çŸ©ããNameãšAgeãšãã2ã€ã®ãã£ãŒã«ããæãããŠããŸãããããŠã3人ã®äººç©æ
å ±ãå«ãpersonsãšããé
åãäœæããforã«ãŒãã䜿çšããŠpersonså
ã®å
šãŠã®äººã«é¢ããæ
å ±ã衚瀺ããŠããŸãã
F#ã«ã¯ãå
±çšäœ(Union Types)ãšåŒã°ããç¹å¥ãªããŒã¿åããããŸããå
±çšäœã¯ãç°ãªãåã®å€ãå«ãããšãã§ããããŒã¿åã§ãC#ã®enumåãJavaã®åæåã«çžåœããŸããF#ã®å
±çšäœã¯ã極ããŠæè»ã§ã䜿ãããããã®ã§ãã
å
±çšäœãå®çŸ©ããã«ã¯ãtypeããŒã¯ãŒãã«ããæ°ããåã®å®çŸ©ãè¡ãã|ã䜿ã£ãŠå
±çšäœã®èŠçŽ ãåæããŠãããŸããå
±çšäœã®èŠçŽ ã¯ããã¹ãŠåãåå空éã«å±ãããã®ã§ãªããã°ãªããŸããã
以äžã¯ãå
±çšäœã䜿çšããç°¡åãªäŸã§ãã
ãã®äŸã§ã¯ãShapeãšããå
±çšäœåãå®çŸ©ããŠãCircleãšRectangleãšãã2çš®é¡ã®èŠçŽ ãæãããŠããŸããCircleèŠçŽ ã¯ã1ã€ã®æµ®åå°æ°ç¹æ°ãä¿æããRectangleèŠçŽ ã¯ã2ã€ã®æµ®åå°æ°ç¹æ°ãä¿æããŸãã次ã«ãareaOfShapeé¢æ°ãå®çŸ©ããŠãåŒæ°shapeãCircleèŠçŽ ã§ããã°åã®é¢ç©ãRectangleèŠçŽ ã§ããã°é·æ¹åœ¢ã®é¢ç©ãèšç®ããŠããŸãã
å
±çšäœã䜿çšãããšãè€æ°ã®é¢é£ããå€ã1ã€ã®åã«ãŸãšããããšãã§ããããã°ã©ã ã®èŠéãããããªããŸãããŸããç°ãªãåã®å€ãæ¯èŒããå Žåã«ãéåžžã«äŸ¿å©ã§ããããããå
±çšäœã極ããŠæè»ã§ããããã䜿ãããããšã³ãŒããããããããªãå ŽåããããŸãã
以äžã¯F#ã®ã³ã¬ã¯ã·ã§ã³ãšäž»ãªã¡ãœããã衚圢åŒã§ãŸãšãããã®ã§ãã
äžèšã®è¡šã§ã¯ãåè¡ãã¡ãœãããååãã³ã¬ã¯ã·ã§ã³ãè¡šããŠããŸããããšãã°ãListãšããåã«ããlength/countãšããã»ã«ã¯ããªã¹ãã®èŠçŽ æ°ãååŸããããã®ã¡ãœããã§ããList.lengthã«å¯Ÿå¿ããŠããŸããåæ§ã«ãSeqãšããåã«ããmapãšããã»ã«ã¯ãã·ãŒã±ã³ã¹ã®èŠçŽ ã«é¢æ°ãé©çšããæ°ããã·ãŒã±ã³ã¹ãäœæããããã®Seq.mapã¡ãœããã«å¯Ÿå¿ããŠããŸãã
F#ã«ãããŠããªã¹ãã¯éåžžã«éèŠãªããŒã¿æ§é ã§ããF#ã®ãªã¹ãã¯äžå€ãªäžé£ã®å€ã®ã·ãŒã±ã³ã¹ã§ãããã¢ã€ãã ãè¿œå ãåé€ãå€æŽã§ããŸããã ãã ããæ°ãããªã¹ããäœæããããšã§ãæ¢åã®ãªã¹ãããèŠçŽ ãåé€ããããèŠçŽ ãè¿œå ãããããããšãã§ããŸãã
F#ã®ãªã¹ãã¯ããã¿ãŒã³ãããã³ã°ã«ãã£ãŠåŠçãããããšããããããŸããããšãã°ã次ã®ããã«ããŠããªã¹ãã®å
é èŠçŽ ãšæ®ãã®ãªã¹ããååŸããããšãã§ããŸãã
ãŸããF#ã®ãªã¹ãã¯é
延è©äŸ¡ããããããå¿
èŠã«å¿ããŠèŠçŽ ãçæããããã«äœ¿çšããããšãã§ããŸããããšãã°ã次ã®é¢æ°ã¯ãäžããããæŽæ°ã«å¯ŸããçŽ æ°ãæã€ç¡éãªã¹ããçæããŸãã
F#ã®ãªã¹ãã¯ãé«éé¢æ°ãšäžç·ã«äœ¿çšããããšãã§ããå ŽåããããŸããç¹ã«ãList.mapãList.filterãList.foldãªã©ã®é¢æ°ã¯ããªã¹ãã®èŠçŽ ã«å¯ŸããŠå€æããã£ã«ã¿ãªã³ã°ãç³ã¿èŸŒã¿æäœãå®è¡ããããã«äœ¿çšããããšãã§ããŸãã
ãããã®äŸã¯ãF#ã®ãªã¹ãã«é¢ããæ©èœã®äžéšã§ãããF#ã®ãªã¹ãã¯éåžžã«åŒ·åã§ãå€ãã®å€åœ©ãªæäœãå®è¡ããããšãã§ããŸãã=== é
å ===
F#ã§ã®ã·ãŒã±ã³ã¹ã«ã¯ãéåžžã«å€ãã®æ©èœããããŸãã以äžã«ããã€ãã®äŸãæããŠã¿ãŸãã
ããã«ãããmySeqã¯1ãã3ãŸã§ã®æŽæ°ãå«ãã·ãŒã±ã³ã¹ãšããŠå®çŸ©ãããŸãã
ãã®å ŽåãevenãåºåãããŸã§ãnumsã®èŠçŽ ã¯å®éã«ã¯èšç®ãããŸãããå¿
èŠãªå Žåã«ã®ã¿èšç®ãããŸãã
以äžããF#ã®ã·ãŒã±ã³ã¹ã«é¢ããç°¡åãªèª¬æã§ãããã詳现ãªæ
å ±ã«ã€ããŠã¯ãF#ã®å
¬åŒããã¥ã¡ã³ããåç
§ããŠãã ããã
F#ã«ã¯ãæ§ã
ãªé
åãåŠçããããã®äŸ¿å©ãªçµã¿èŸŒã¿é¢æ°ãçšæãããŠããŸãã以äžã«ãé
åã«é¢ããããã€ãã®æ©èœã玹ä»ããŸãã
以äžãF#ã®é
åã«é¢ããããã€ãã®æ©èœã玹ä»ããŸãããF#ã®é
åã«ã€ããŠè©³ããåŠã¶ã«ã¯ãF#ã®å
¬åŒããã¥ã¡ã³ããåç
§ããŠãã ããã
F# ã® Set ã¯ãéè€ã®ãªãèŠçŽ ã®ã³ã¬ã¯ã·ã§ã³ãæ±ãããã®ããŒã¿æ§é ã§ãã以äžã«ããã€ãã®æ©èœã玹ä»ããŸãã
以äžã¯ãF# ã® Set ã䜿çšããäŸã§ãã
F#ã®Mapã¯ãé£æ³é
åãè¡šçŸããããã®ããŒã¿æ§é ã§ãã以äžã«ããã®æ©èœãããã€ã玹ä»ããŸãã
Mapã®äœæãMap.addã¡ãœããã®äœ¿çšãMap.tryFindã¡ãœããã®äœ¿çšãããã³Map.foldã¡ãœããã®äœ¿çšãè¡ã£ãŠããŸãã
F#ã¯ãMLç³»ã®åŒ·åãªé¢æ°åããã°ã©ãã³ã°èšèªã§ããF#ã¯ãé«ãªãŒããŒé¢æ°ãã«ãªãŒåããã¥ã¢é¢æ°ã代æ°çããŒã¿åãªã©ã®åŒ·åãªæ©èœãåããŠããŸãã
ãŸããé«ãªãŒããŒé¢æ°ã¯ãé¢æ°ãåŒæ°ãšããŠåãåãé¢æ°ãŸãã¯é¢æ°ãæ»ãå€ãšããŠè¿ãé¢æ°ã§ããããã«ãããéåžžã«æè»ãªé¢æ°ãäœæã§ããŸããäŸãã°ã以äžã®é«ãªãŒããŒé¢æ° map ã¯ããªã¹ããåãåãããªã¹ãã®åèŠçŽ ã«é¢æ°ãé©çšããŠæ°ãããªã¹ããçæããŸãã
次ã«ãã«ãªãŒåã¯ãè€æ°ã®åŒæ°ããšãé¢æ°ãã1ã€ã®åŒæ°ããšãé¢æ°ã®ãã§ãŒã³ã«å€æããæ¹æ³ã§ããã«ãªãŒåã䜿çšãããšãåå©çšæ§ãé«ããããæè»ãªé¢æ°ãäœæã§ããŸãã
ããã«ãF#ã¯ãã¥ã¢é¢æ°ã®äœæãç°¡åã«ããŸãããã¥ã¢é¢æ°ã¯ãå¯äœçšããªãé¢æ°ã§ãããåãå
¥åã«å¯ŸããŠåžžã«åãåºåãçæããŸããF#ã¯ãã€ãã¥ãŒã¿ãã«(å€æŽäžèœ)ãªããŒã¿æ§é ã䜿çšããããšãæšå¥šããŠãããããã¯ãæ°ããããŒã¿æ§é ã®çæã®ã¿ããµããŒãããŠããŸããããã«ãããäºæããªãå¯äœçšãçºçããå¯èœæ§ãããå Žåã«ããå®å
šæ§ã確ä¿ããããšãã§ããŸãã
æåŸã«ãF#ã§ã¯ã代æ°çããŒã¿åã䜿çšããŠãç°ãªãçš®é¡ã®ããŒã¿ãè¡šçŸããããšãã§ããŸãã代æ°çããŒã¿åã«ã¯ããŠããªã³åãšã¬ã³ãŒãåããããŸãããŠããªã³åã¯ãè€æ°ã®åã®äžã€ã§ã§ããåã§ãããã¬ã³ãŒãåã¯ãè€æ°ã®åã®ãã£ãŒã«ããæã€åã§ãã
以äžãF#ã®é¢æ°åããã°ã©ãã³ã°ã®é«åºŠãªæ©èœã§ãããããã®æ©èœãé§äœ¿ããããšã§ãããæè»ã§åå©çšæ§ã®é«ãããã°ã©ã ãäœæã§ããŸãã
F#ã¯ã.NETãã¬ãŒã ã¯ãŒã¯ã®äžéšã§ãããéçåä»ãã®ãã«ããã©ãã€ã ããã°ã©ãã³ã°èšèªã§ããF#ã®éçåä»ãã·ã¹ãã ã¯ãã³ã³ãã€ã©ã«ããéç解æã«ãããå®è¡æã®ãšã©ãŒãæžãããä¿å®æ§ãåäžãããããšãã§ããŸãã
F#ã«ã¯éçåä»ãã®å€æ°ããããåã«åºã¥ããŠå¶éãããŸããããã«ãããã³ãŒãã®å質ãé«ãããããã°ã容æã«ãªããŸãããŸããF#ã§ã¯æ§èœæé©åã®ããã«ãäžå€æ§ãéèŠãããŠããŸãããã®ãããªäžå€æ§ã¯ããªããžã§ã¯ãã®ç¶æ
ãåžžã«ç¢ºå®ã«ææ¡ããããšãã§ãããããã³ãŒãã®å¯èªæ§ãåäžããŸãã
F#ã®éçåä»ãã·ã¹ãã ã¯ã.NETã®åã·ã¹ãã ãšé«åºŠã«çµ±åãããŠããŸããããã¯ãæ¢åã®.NETã¢ããªã±ãŒã·ã§ã³ããã®ç§»è¡ã容æã§ããããšãæå³ããŠããŸãããŸããF#ã¯.NETã®æ©èœããµããŒãããŠãããC#ãVB.NETãšåãããå®å
šãªçžäºéçšæ§ãæã£ãŠããŸãã
F#ã¯ãéçåä»ãã·ã¹ãã ã掻çšããããšã§ãå€ãã®åé¡ãäºåã«æ€åºããããšãã§ããŸããããã«ããããã°ãæªç¶ã«é²ãããšãã§ããããããœãããŠã§ã¢éçºã®éçšã§ã®å質ãšä¿¡é Œæ§ãåäžããä¿å®æ§ãé«ãŸããŸãã
以äžã¯ãF#ã®ã¢ã¯ãã£ããã¿ãŒã³ãããã³ã°ã«é¢ããç°¡åãªäŸã§ãã
ãã®äŸã§ã¯ãF#ã§ã¢ã¯ãã£ããã¿ãŒã³ãããã³ã°ãã©ã®ããã«æ©èœãããã瀺ããŠããŸããæåã«ã|Even|Odd|ãšããã¢ã¯ãã£ããã¿ãŒã³ãå®çŸ©ããŸãããã®ãã¿ãŒã³ã¯ãæŽæ°ãå¶æ°ãå¥æ°ãã«å¿ããŠã2ã€ã®ãã¿ãŒã³ãããã³ã°ãæäŸããŸãã次ã«ãisEvené¢æ°ãå®çŸ©ããæŽæ°ãEvenãŸãã¯Oddã«ãã¿ãŒã³ãããã³ã°ããŠãå¶æ°ã§ãããã©ããã確èªããŸãã
次ã«ãé貚ã·ã³ãã«ããã¿ãŒã³ãããã³ã°ããã¢ã¯ãã£ããã¿ãŒã³ãå®çŸ©ããŸãããã®ã¢ã¯ãã£ããã¿ãŒã³ã¯ãDollarãšEuroãšãã2ã€ã®ãã¿ãŒã³ãæäŸããæååããã«ãŸãã¯ãŠãŒãã®é貚èšå·ã§ãããã確èªããŸããconvertPriceé¢æ°ã¯ãé貚ã·ã³ãã«ãšäŸ¡æ ŒãåãåããDollarã®å Žåã¯äŸ¡æ ŒããŠãŒãã«å€æããEuroã®å Žåã¯å€æãè¡ããã«äŸ¡æ Œãè¿ããŸããæåŸã«ãprintfnã䜿çšããŠãã¢ã¯ãã£ããã¿ãŒã³ã䜿çšããå€æã®äŸã瀺ããŸãã
ç§ãã¡ã䜿çšããprintfné¢æ°ã¯ãæåãåºåããããã®ç°¡åãªé¢æ°ã§ã%dã%sãšãã£ããã©ãŒãããæ瀺åã䜿çšããŠãå€æ°ã®å€ã衚瀺ããããšãã§ããŸãã
F#ã¯ã.NET Frameworkã®äžéšã§ããããããã«ãã¹ã¬ããã䞊ååŠçããµããŒãããŠããŸããF#ã®äžŠååŠçã¯ã以äžã®2çš®é¡ã®æ¹æ³ã§å®çŸã§ããŸãã
Asyncãã¿ãŒã³ã¯ã.NET Framework 4.0以éã§å°å
¥ãããéåæåŠçã®ããã®ãã¿ãŒã³ã§ããAsyncãã¿ãŒã³ã䜿çšããããšã§ããã«ãã¹ã¬ããã䜿çšãã䞊ååŠçãããã³ãŒããã·ã³ãã«ã«ãªããŸãã以äžã¯ãAsyncãã¿ãŒã³ã䜿çšããF#ã®ã³ãŒããµã³ãã«ã§ãã
ãã®ã³ãŒãã§ã¯ãAsyncãã¿ãŒã³ã䜿çšããŠã2ã€ã®WebããŒãžã䞊åã§ããŠã³ããŒãããããããã®ãµã€ãºã衚瀺ããŠããŸãã
Parallelãã¿ãŒã³ã¯ãTPL(Task Parallel Library)ã®äžéšã§ããããã.NET Framework 4.0以éã§å©çšã§ããŸããParallelãã¿ãŒã³ã䜿çšããããšã§ãC#ã®TaskãThreadPoolãPLINQãªã©ãšåæ§ã«ãç°¡åã«äžŠååŠçãå®çŸããããšãã§ããŸãã以äžã¯ãParallelãã¿ãŒã³ã䜿çšããF#ã®ã³ãŒããµã³ãã«ã§ãã
ãã®ã³ãŒãã§ã¯ãParallelãã¿ãŒã³ã䜿çšããŠã1~1,000,000ã®ç¯å²å
ã®çŽ æ°ãæ¢çŽ¢ããŠããŸããæ¢åã®findPrimesInRangeé¢æ°ã䜿çšãããããåã
ã®ãã£ã³ã¯(ããã»ããµæ°ã«åãããŠåå²ãããå
¥åãªã¹ãã®ãµããªã¹ã)ã«å¯ŸããŠãããããŠããŸããããããããçµæãäžã€ã®ãªã¹ãã«é£çµããããšã§ãæçµçãªçŽ æ°ãªã¹ããäœæããŸãããŸããsw.TimeItã䜿çšããããšã§ãå®è¡æéãèšæž¬ããŠããŸãã
ããã2ã€ã®ãã¿ãŒã³ã¯ãããŸããŸãªã·ããªãªã«å¿ããŠé©çšããããšãã§ããŸããAsyncãã¿ãŒã³ã¯ãI/OããŠã³ãã®ã¢ããªã±ãŒã·ã§ã³ãWebãµãŒãã¹ãªã©ã®éåæåŠçã«é©ããŠããŸãããŸããParallelãã¿ãŒã³ã¯ãCPUããŠã³ãã®éãæŒç®ãªã©ã«é©ããŠããŸããF#ã®äžŠååŠçã¯ã.NET Frameworkã®è±å¯ãªäžŠååŠçã©ã€ãã©ãªã掻çšãã€ã€ãF#ã®é¢æ°åããã°ã©ãã³ã°ã®å©ç¹ãçãããæè»ãªäžŠååŠçãå®çŸããããšãã§ããŸãã
F#ã®éåæåŠçã«é¢ãããµã³ãã«ã³ãŒãã§ãã
ãã®ã³ãŒãã§ã¯ãdownloadAsyncé¢æ°ã¯ã asyncããŒã¯ãŒãã§ä¿®é£Ÿãããéåæé¢æ°ãšããŠå®çŸ©ãããŠããŸãããã®é¢æ°ã¯ãSystem.Netåå空éå
ã«ããWebClientã¯ã©ã¹ã䜿çšããŠãæå®ãããUriããHTMLãããŠã³ããŒãããŸãã
let! html = webClient.AsyncDownloadString(url)ã®ããã«ãlet!ã䜿çšããŠéåææäœã®çµæãåŸ
ã€ããšãã§ããŸããlet!ã¯éåžžã®letããŒã¯ãŒããšäŒŒãŠããŸãããéåææäœãå®äºãããŸã§ãä»ã®åŠçããããã¯ããã«åŸ
æ©ããŸãã
Async.RunSynchronouslyé¢æ°ã䜿çšããããšã§ãéåææäœãåæçã«å®è¡ã§ããŸãããã®å ŽåãdownloadTaskå€æ°ã«æ ŒçŽãããéåæã¿ã¹ã¯ãå®è¡ããŠãããŠã³ããŒãåŠçãå®äºãããŸã§ãããã¯ããŸãã
æåŸã«ãprintfné¢æ°ã䜿çšããŠãããŠã³ããŒããå®äºããããšããŠãŒã¶ãŒã«éç¥ããŸãã
Ruby#ã³ãŒãã®ã£ã©ãªãŒããã®ç§»æ€ã§ãã
ãšã©ãã¹ããã¹ã®ç¯©ããè¥å¹² F# ãããæžããŠã¿ãŸããã
æ倧å
¬çŽæ°ãšæå°å
¬åæ°ããè¥å¹² F# ãããæžããŠã¿ãŸããã
äºåæ³ããè¥å¹² F# ãããæžããŠã¿ãŸããã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "F#ã¯ã.NETãã¬ãŒã ã¯ãŒã¯äžã§åäœãããã«ããã©ãã€ã èšèªã§ãããã®èšèªã¯ãéçåä»ããé¢æ°åããªããžã§ã¯ãæåãããã³äžŠåããã°ã©ãã³ã°ããµããŒãããŠããŸãã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "F#ã¯ãMicrosoft Researchãéçºããèšèªã§ãæ©æ¢°åŠç¿ãæ°å€èšç®ãã¯ã©ãŠãã³ã³ãã¥ãŒãã£ã³ã°ãªã©ã®åéã§åºãå©çšãããŠããŸãããã®èšèªã¯ãé«ãæœè±¡åºŠãšã·ã³ãã«ãã«ãããããã°ã©ããŒã®çç£æ§ãåäžãããŸãã",
"title": ""
},
{
"paragraph_id": 2,
"tag": "p",
"text": "æ¬æžã¯ãF#ã®åºç€ããå¿çšãŸã§ã網çŸ
ããæç§æžã§ããèªè
ã¯ãF#ã§ã®ããã°ã©ãã³ã°ã®åºç€ã身ã«ã€ããå¹ççãªã¢ã«ãŽãªãºã ãé«åºŠãªäžŠååŠçã®å®è£
ãŸã§ãåŠã¶ããšãã§ããŸãã",
"title": ""
},
{
"paragraph_id": 3,
"tag": "p",
"text": "æ¬æžããF#ãåŠã³å§ãã人ããŸãã¯F#ãå¿çšããã人ã«ãšã£ãŠã®è²ŽéãªãªãœãŒã¹ãšãªãããšãé¡ã£ãŠããŸãã",
"title": ""
},
{
"paragraph_id": 4,
"tag": "p",
"text": "F#ã¯ã.NET Frameworkäžã§åäœããé¢æ°åããã°ã©ãã³ã°èšèªã§ãã F#ã¯ã.NETçšã®æ©èœãæäŸããå
±éèšèªã©ã³ã¿ã€ã (CLR)ã®äžéšã§ãã F#ã¯2005幎ã«ãã€ã¯ããœãããéçºãã2007幎ã«æåã®å
¬éããŒãžã§ã³ãç»å ŽããŸããã F#ã¯ãéçåä»ããåæšè«ãé«éé¢æ°ãé«åºŠãªãã¿ãŒã³ãããã³ã°ãããã³äžŠåããã°ã©ãã³ã°ãç°¡æœãã€å¹æçã«è¡ãããšãã§ããŸãã",
"title": "F#ã®æŠèŠ"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "F#ã¯ãé¢æ°åããã°ã©ãã³ã°èšèªãšããŠèšèšãããŠããŸãããã®ãããF#ã¢ããªã±ãŒã·ã§ã³ã¯ã倧éšåãé¢æ°ã§æ§æãããŠããŸããF#ã¯ã.NET Frameworkã®äžéšã§ãããåãã©ã€ãã©ãªãããŒã«ãããã³ãªãœãŒã¹ã«ã¢ã¯ã»ã¹ããããšãã§ããŸãã F#ã¯ãC#ãVB.NETãšåæ§ã«ãæ¢åã®.NETã³ã³ããŒãã³ããã©ã€ãã©ãªãã¯ã©ã¹ãããã³ã¢ãžã¥ãŒã«ã䜿çšã§ããŸãã",
"title": "F#ã®æŠèŠ"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "F#ã¯ãŸãã䞊åããã³éåæããã°ã©ãã³ã°ã«æé©åãããŠããŸãããããã®æ©èœã«ããã倧èŠæš¡ãªäžŠåèšç®ãå¹ççãã€ç°¡æœã«èšè¿°ã§ããŸããF#ã¯ã.NETã®Asynchronous Programming Model(APM)ãTask-Parallel Library(TPL)ãªã©ã.NETã®æšæºäžŠååã©ã€ãã©ãªã«ãã¢ã¯ã»ã¹ã§ããŸãã",
"title": "F#ã®æŠèŠ"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "F#ã®ç¹åŸŽã¯ä»¥äžã®éãã§ãã",
"title": "F#ã®æŠèŠ"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "ãã«ããã©ãããã©ãŒã 察å¿:F#ã¯ã.NET Frameworkã.NET Coreã®ãããªMicrosoftã®ãã©ãããã©ãŒã ã ãã§ãªããMonoãUnityãªã©ãããŸããŸãªãã©ãããã©ãŒã ã§åäœããŸãããŸããF#ã¯WindowsãLinuxãMac OS Xãªã©ã®ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§ãå©çšã§ããŸãã",
"title": "F#ã®æŠèŠ"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "ããªãã®ç°å¢ã«å¿ããŠãè€æ°ã®æ¹æ³ã§F#ãã€ã³ã¹ããŒã«ããããšãã§ããŸãã",
"title": "F#ã®ã€ã³ã¹ããŒã«ãšã»ããã¢ãã"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "Visual Studioã䜿çšããŠF#ãã€ã³ã¹ããŒã«ããå ŽåãVisual Studio InstallerããŸãã€ã³ã¹ããŒã«ãããŸããåããŠVisual StudioãããŠã³ããŒãããå Žåã¯ãã€ã³ã¹ããŒã©ããé©åãªãšãã£ã·ã§ã³ã®Visual Studioãã€ã³ã¹ããŒã«ããŠãã ããã",
"title": "F#ã®ã€ã³ã¹ããŒã«ãšã»ããã¢ãã"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "æ¢ã«Visual Studioãã€ã³ã¹ããŒã«ãããŠããå Žåã¯ãF#ãè¿œå ããããšãã£ã·ã§ã³ã®æšªã«ãããå€æŽããéžæããŠãã ãããã¯ãŒã¯ããŒãããŒãžã§ãASP.NETããã³Webéçºã¯ãŒã¯ããŒããéžæããŸããããã«ã¯ãASP.NET Coreãããžã§ã¯ãã®F#ããã³.NET CoreãµããŒããå«ãŸããŠããŸãããéžæãããã¹ãŠãã€ã³ã¹ããŒã«ããããéžæããŠãå³äžé
ã®ãå€æŽããéžæããŸãã",
"title": "F#ã®ã€ã³ã¹ããŒã«ãšã»ããã¢ãã"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "Visual Studio Installerã§F#ãå«ãŸããVisual Studioãéå§ããã«ã¯ããVisual Studioã§èµ·åããéžæããŠãã ããã",
"title": "F#ã®ã€ã³ã¹ããŒã«ãšã»ããã¢ãã"
},
{
"paragraph_id": 13,
"tag": "p",
"text": "Visual Studio Codeã§F#ãã€ã³ã¹ããŒã«ããå ŽåãgitãPATHã§å©çšå¯èœã§ããããšã確èªããŠãã ãããã³ãã³ãããã³ããã§git --versionãå
¥åããEnterãæŒãããšã§ç¢ºèªã§ããŸãã.NET SDKããã³Visual Studio Codeãã€ã³ã¹ããŒã«ããŠãã ããããæ¡åŒµæ©èœãã¢ã€ã³ã³ãéžæãããIonideãã§æ€çŽ¢ããŠãã ããããIonide-fsharpãã¯ãVisual Studio Codeã§F#ããµããŒãããããã«å¿
èŠãªå¯äžã®ãã©ã°ã€ã³ã§ãããã ããFAKEãµããŒããååŸããããã«ãIonide-FAKEããã€ã³ã¹ããŒã«ããããããã±ãŒãžã®ãµããŒããååŸããããã«ãIonide-Paketããã€ã³ã¹ããŒã«ããããšãã§ããŸããFAKEããã³Paketã¯ããããžã§ã¯ãã®ãã«ãããã³äŸåé¢ä¿ã®ç®¡çã«äœ¿çšããããè¿œå ã®F#ã³ãã¥ããã£ããŒã«ã§ããVisual Studio for Macã§F#ãã€ã³ã¹ããŒã«ããå Žåãã©ã®æ§æãéžæããŠããF#ã¯ããã©ã«ãã§ã€ã³ã¹ããŒã«ãããŸããã€ã³ã¹ããŒã«ãå®äºãããããVisual Studioãèµ·åããéžæããŠãã ããã",
"title": "F#ã®ã€ã³ã¹ããŒã«ãšã»ããã¢ãã"
},
{
"paragraph_id": 14,
"tag": "p",
"text": "MacOSäžã®Finderãä»ããŠVisual Studioãéãããšãã§ããŸãã",
"title": "F#ã®ã€ã³ã¹ããŒã«ãšã»ããã¢ãã"
},
{
"paragraph_id": 15,
"tag": "p",
"text": "ãã«ããµãŒããŒã«F#ãã€ã³ã¹ããŒã«ããå Žåã.NET SDKãä»ããŠ.NET CoreãŸãã¯.NET Frameworkã䜿çšããŠããå Žåã¯ããã«ããµãŒããŒã«.NET SDKãã€ã³ã¹ããŒã«ããã ãã§ããå¿
èŠãªãã¹ãŠãå«ãŸããŠããŸãã.NET Frameworkã䜿çšãã.NET SDKã䜿çšããŠããªãå Žåã¯ãWindows Serverã«Visual Studio Build Tools SKUãã€ã³ã¹ããŒã«ããå¿
èŠããããŸããã€ã³ã¹ããŒã©ã§ã.NETãã¹ã¯ããããã«ãããŒã«ãéžæããå³åŽã®ã€ã³ã¹ããŒã©ã¡ãã¥ãŒã§F#ã³ã³ãã€ã©ã³ã³ããŒãã³ããéžæããŸãã",
"title": "F#ã®ã€ã³ã¹ããŒã«ãšã»ããã¢ãã"
},
{
"paragraph_id": 16,
"tag": "p",
"text": "F#ã¯ãã«ããã©ãã€ã ããã°ã©ãã³ã°èšèªã§ãããé¢æ°åèšèªã®ç¹åŸŽãæã£ãŠããŸããF#ã§ã¯ãæ°å€åŒãè«çåŒãæåååŒããªã¹ãåŒãé
ååŒãã¿ãã«åŒãªã©ãããŸããŸãªåŒããµããŒããããŠããŸãã",
"title": "F#ã®åºç€"
},
{
"paragraph_id": 17,
"tag": "p",
"text": "æ°å€åŒã§ã¯ãç®è¡æŒç®å(+ã-ã*ã/ãªã©)ãæ¯èŒæŒç®å(=ã<ã>ãªã©)ã䜿çšããŠãæ°å€èšç®ãè¡ãããšãã§ããŸããäŸãã°ã以äžã®ãããªã³ãŒããæžãããšãã§ããŸãã",
"title": "F#ã®åºç€"
},
{
"paragraph_id": 18,
"tag": "p",
"text": "è«çåŒã§ã¯ãè«çæŒç®å(&&ã||ãnotãªã©)ã䜿çšããŠãè«çæŒç®ãè¡ãããšãã§ããŸããäŸãã°ã以äžã®ãããªã³ãŒããæžãããšãã§ããŸãã",
"title": "F#ã®åºç€"
},
{
"paragraph_id": 19,
"tag": "p",
"text": "æåååŒã§ã¯ãæååçµåæŒç®å(+)ã䜿çšããŠãæååãçµåããããšãã§ããŸããäŸãã°ã以äžã®ãããªã³ãŒããæžãããšãã§ããŸãã",
"title": "F#ã®åºç€"
},
{
"paragraph_id": 20,
"tag": "p",
"text": "ãªã¹ãåŒã§ã¯ããªã¹ãæŒç®å(::)ã䜿çšããŠããªã¹ããäœæããããšãã§ããŸããäŸãã°ã以äžã®ãããªã³ãŒããæžãããšãã§ããŸãã",
"title": "F#ã®åºç€"
},
{
"paragraph_id": 21,
"tag": "p",
"text": "é
ååŒã§ããªã¹ãæŒç®åã䜿çšããããšãã§ããŸããããã以å€ã«ãæ§ã
ãªé¢æ°ã䜿çšããããšãã§ããŸããäŸãã°ã以äžã®ãããªã³ãŒããæžãããšãã§ããŸãã",
"title": "F#ã®åºç€"
},
{
"paragraph_id": 22,
"tag": "p",
"text": "ã¿ãã«åŒã§ã¯ãã«ã³ã(,)ã䜿çšããŠãè€æ°ã®å€ã1ã€ã®ãªããžã§ã¯ãã«ãŸãšããããšãã§ããŸããäŸãã°ã以äžã®ãããªã³ãŒããæžãããšãã§ããŸãã",
"title": "F#ã®åºç€"
},
{
"paragraph_id": 23,
"tag": "p",
"text": "以äžã¯ F# ã®å¶åŸ¡æ§é ã®æŠèŠã§ãã",
"title": "F#ã®åºç€"
},
{
"paragraph_id": 24,
"tag": "p",
"text": "F# ã§ã¯ãif/then/else æ§æã䜿ã£ãŠæ¡ä»¶åå²ãè¡ãããšãã§ããŸããæ§æã¯ä»¥äžã®éãã§ãã",
"title": "F#ã®åºç€"
},
{
"paragraph_id": 25,
"tag": "p",
"text": "äŸãã°ãx ã 0 ãã倧ããå Žåã«ã¯ \"Positive\"ã0 ã®å Žåã«ã¯ \"Zero\"ã0 ããå°ããå Žåã«ã¯ \"Negative\" ãšããæååãè¿ãé¢æ°ãå®çŸ©ãããšä»¥äžã®ããã«ãªããŸãã",
"title": "F#ã®åºç€"
},
{
"paragraph_id": 26,
"tag": "p",
"text": "F# ã§ã¯ãfor ã«ãŒãã while ã«ãŒãã䜿ã£ãŠå埩åŠçãè¡ãããšãã§ããŸãã",
"title": "F#ã®åºç€"
},
{
"paragraph_id": 27,
"tag": "p",
"text": "äŸãã°ã1 ãã 10 ãŸã§ã®åèšãèšç®ãããšä»¥äžã®ããã«ãªããŸãã",
"title": "F#ã®åºç€"
},
{
"paragraph_id": 28,
"tag": "p",
"text": "äžèšã® for ã®äŸãšç䟡ãªã«ãŒããwhileã§æžããäŸ",
"title": "F#ã®åºç€"
},
{
"paragraph_id": 29,
"tag": "p",
"text": "F# ã§ã¯ãtry/with æ§æã䜿ã£ãŠäŸå€åŠçãè¡ãããšãã§ããŸãã",
"title": "F#ã®åºç€"
},
{
"paragraph_id": 30,
"tag": "p",
"text": "äŸãã°ãå²ãç®ãè¡ãé¢æ°ãå®çŸ©ãããšä»¥äžã®ããã«ãªããŸãã",
"title": "F#ã®åºç€"
},
{
"paragraph_id": 31,
"tag": "p",
"text": "第 1 åŒæ°ã第 2 åŒæ°ã§å²ããæŽæ°ã®çµæãè¿ããŸãããã ãã第 2 åŒæ°ã 0 ã®å Žåã¯äŸå€ãçºçãã0 ãè¿ããŸãã",
"title": "F#ã®åºç€"
},
{
"paragraph_id": 32,
"tag": "p",
"text": "F#ã«ãããé¢æ°å®çŸ©ã®äžè¬çãªæžåŒã¯ä»¥äžã®éãã§ãã",
"title": "F#ã®åºç€"
},
{
"paragraph_id": 33,
"tag": "p",
"text": "ãããã®äŸã䜿ã£ãŠã次ã«ç€ºãããã«é¢æ°ãåŒã³åºãããšãã§ããŸãã",
"title": "F#ã®åºç€"
},
{
"paragraph_id": 34,
"tag": "p",
"text": "F#ã§ååž°é¢æ°ãå®çŸ©ããå Žåã¯ã以äžã®æžåŒã®ããã« rec ããŒã¯ãŒãã䌎ã£ãŠå®çŸ©ããŸãã",
"title": "F#ã®åºç€"
},
{
"paragraph_id": 35,
"tag": "p",
"text": "ããšãã°ã0ããnãŸã§ã®èªç¶æ°ã®åãèšç®ãã以äžã®ååž°é¢æ°ãå®çŸ©ããå Žåã¯ã以äžã®ããã«æžããŸãã",
"title": "F#ã®åºç€"
},
{
"paragraph_id": 36,
"tag": "p",
"text": "ãã®é¢æ°ã䜿ã£ãŠãäŸãã°sum 5ãè©äŸ¡ãããšã1 + 2 + 3 + 4 + 5 = 15ãè¿ãããŸãã",
"title": "F#ã®åºç€"
},
{
"paragraph_id": 37,
"tag": "p",
"text": "F#ã®ã¢ãžã¥ãŒã«ã¯ãF#ã³ãŒãã®åå©çšå¯èœãªåäœã§ãããé¢æ°ãåãå€æ°ãããã³ãã®ä»ã®èŠçŽ ãå«ãããšãã§ããŸããã¢ãžã¥ãŒã«ã¯ãF#ã³ãŒãã®æ§é åãããçµç¹åãå¯èœã«ããã³ãŒãã®èªã¿ããããä¿å®æ§ãããã³åå©çšæ§ãåäžãããŸããã¢ãžã¥ãŒã«ã¯ãã³ãŒãã®äžéšãé ãããšãã§ããã«ãã»ã«åãå®çŸããããšãã§ããŸããF#ã®ã¢ãžã¥ãŒã«ã¯ãå¥ã®F#ããã°ã©ã ã.NETã¢ããªã±ãŒã·ã§ã³ã§äœ¿çšããããšãã§ããŸãã",
"title": "F#ã®åºç€"
},
{
"paragraph_id": 38,
"tag": "p",
"text": "äžèšã®äŸã§ã¯ãMyModuleãšããååã®ã¢ãžã¥ãŒã«ã宣èšããŠããŸãããã®ã¢ãžã¥ãŒã«å
ã«ã¯ãaddãšsubtractãšããé¢æ°ãå®çŸ©ãããŠããŸããaddé¢æ°ã¯2ã€ã®åŒæ°ãåãåããããããå ç®ããçµæãè¿ããŸããsubtracté¢æ°ã¯åæ§ã«2ã€ã®åŒæ°ãåãåããããããæžç®ããçµæãè¿ããŸãã",
"title": "F#ã®åºç€"
},
{
"paragraph_id": 39,
"tag": "p",
"text": "ãã®ããã«ã¢ãžã¥ãŒã«ãå©çšããå Žåã¯ã以äžã®ããã«ä»ã®ãã¡ã€ã«ã§ã€ã³ããŒãããŠäœ¿çšããããšãã§ããŸãã",
"title": "F#ã®åºç€"
},
{
"paragraph_id": 40,
"tag": "p",
"text": "ããã§ã¯ãMyModuleã¢ãžã¥ãŒã«ãopenããŠä»ã®ãã¡ã€ã«ããã¢ã¯ã»ã¹ããããšãã§ããããã«ãªã£ãŠããŸãããããŠãaddãšsubtractãšããé¢æ°ãåŒã³åºããŠããŸãããããã®é¢æ°ã¯ãããããåŒæ°ãäžããããšã§ãå ç®ããã³æžç®ã®çµæãååŸããããšãã§ããŸãã",
"title": "F#ã®åºç€"
},
{
"paragraph_id": 41,
"tag": "p",
"text": "F#ã«ã¯ã以äžã®ãããªããŒã¿åããããŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 42,
"tag": "p",
"text": "以äžã F# ã§æäŸãããããŒã¿åã®çš®é¡ã«ãªããŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 43,
"tag": "p",
"text": "",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 44,
"tag": "p",
"text": "F#ã®ã¿ãã«ã«ã¯ä»¥äžã®ãããªç¹åŸŽããããŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 45,
"tag": "p",
"text": "ãŸããF#ã®ã¿ãã«ã¯ä»¥äžã®ãããªäœ¿ãæ¹ãã§ããŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 46,
"tag": "p",
"text": "ã¿ãã«ã®å€ãå€æ°ã«ä»£å
¥ããããšãã§ããŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 47,
"tag": "p",
"text": "ã¿ãã«ãé¢æ°ã®æ»ãå€ãšããŠäœ¿çšããããšãã§ããŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 48,
"tag": "p",
"text": "ã¿ãã«ããªã¹ãã®èŠçŽ ãšããŠäœ¿çšããããšãã§ããŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 49,
"tag": "p",
"text": "以äžãF#ã®ã¿ãã«ã«é¢ããæ©èœã®äžéšã§ãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 50,
"tag": "p",
"text": "F#ã®Optionåã¯ãå€ãååšããå Žåãšååšããªãå Žåã®2ã€ã®ç¶æ
ãè¡šãããã«äœ¿çšãããŸããOptionåã¯F#æšæºã©ã€ãã©ãªã®äžéšã§ããã以äžã®ããã«å®çŸ©ãããŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 51,
"tag": "p",
"text": "'Tã«ã¯ä»»æã®åãæå®ããããšãã§ããŸããäŸãã°ãOption<int>ã¯æŽæ°åã®å€ãååšããå Žåãšååšããªãå Žåã®2ã€ã®ç¶æ
ãè¡šçŸããããã«äœ¿çšããããšãã§ããŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 52,
"tag": "p",
"text": "Optionåã«ã¯ãå€ãååšãããã©ããã確èªããããã«äœ¿çšã§ããé¢æ°ãçšæãããŠããŸãã以äžã«ãã®äŸã瀺ããŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 53,
"tag": "p",
"text": "ç¯å²ãæã€å€ãè¿ãå ŽåãOptionåã䜿çšããããšãäžè¬çã§ãã以äžã®äŸã¯ãæååãæ°å€ã§ããå Žåã«ãã®æ°å€ãè¿ãããã以å€ã®å Žåã¯Noneãè¿ããŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 54,
"tag": "p",
"text": "ããã䜿ã£ãŠã\"10\"ã®å€ã解æãããšãçµæã¯Some 10ã«ãªããŸãã\"abc\"ã®ããã«è§£æã§ããªãå€ã®å Žåã¯ãNoneãè¿ãããŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 55,
"tag": "p",
"text": "Optionåã䜿çšãããšãNullãã€ã³ã¿äŸå€ãªã©ã®ãã°ãé²ãããšãã§ããŸããããããããã°ã©ããŒãæåã§Optionåãæ±ãããã®ã³ãŒããæžãå¿
èŠããããããå€å°é¢åãªé¢ããããŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 56,
"tag": "p",
"text": "以äžã¯ãOptionåã®äž»ãªæäœã§ãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 57,
"tag": "p",
"text": "F#ã«ãããã¬ã³ãŒãã¯ããã£ãŒã«ãã®éåã«ååãä»ããŠæ§é ãå®çŸ©ããããã®æ©èœã§ããF#ã®ã¬ã³ãŒãã¯ã.NETã®ã¯ã©ã¹ãšã¯ç°ãªããå€å(value type)ãšããŠå®çŸ©ãããŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 58,
"tag": "p",
"text": "以äžã¯ãF#ã§ã¬ã³ãŒããå®çŸ©ããæ¹æ³ãšãã¬ã³ãŒãã䜿çšããæ¹æ³ã«ã€ããŠã®äŸã§ãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 59,
"tag": "p",
"text": "ãã®äŸã§ã¯ãPersonãšããããŒã¿å(ã¬ã³ãŒã)ãå®çŸ©ããNameãšAgeãšãã2ã€ã®ãã£ãŒã«ããæãããŠããŸãããããŠã3人ã®äººç©æ
å ±ãå«ãpersonsãšããé
åãäœæããforã«ãŒãã䜿çšããŠpersonså
ã®å
šãŠã®äººã«é¢ããæ
å ±ã衚瀺ããŠããŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 60,
"tag": "p",
"text": "F#ã«ã¯ãå
±çšäœ(Union Types)ãšåŒã°ããç¹å¥ãªããŒã¿åããããŸããå
±çšäœã¯ãç°ãªãåã®å€ãå«ãããšãã§ããããŒã¿åã§ãC#ã®enumåãJavaã®åæåã«çžåœããŸããF#ã®å
±çšäœã¯ã極ããŠæè»ã§ã䜿ãããããã®ã§ãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 61,
"tag": "p",
"text": "å
±çšäœãå®çŸ©ããã«ã¯ãtypeããŒã¯ãŒãã«ããæ°ããåã®å®çŸ©ãè¡ãã|ã䜿ã£ãŠå
±çšäœã®èŠçŽ ãåæããŠãããŸããå
±çšäœã®èŠçŽ ã¯ããã¹ãŠåãåå空éã«å±ãããã®ã§ãªããã°ãªããŸããã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 62,
"tag": "p",
"text": "以äžã¯ãå
±çšäœã䜿çšããç°¡åãªäŸã§ãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 63,
"tag": "p",
"text": "ãã®äŸã§ã¯ãShapeãšããå
±çšäœåãå®çŸ©ããŠãCircleãšRectangleãšãã2çš®é¡ã®èŠçŽ ãæãããŠããŸããCircleèŠçŽ ã¯ã1ã€ã®æµ®åå°æ°ç¹æ°ãä¿æããRectangleèŠçŽ ã¯ã2ã€ã®æµ®åå°æ°ç¹æ°ãä¿æããŸãã次ã«ãareaOfShapeé¢æ°ãå®çŸ©ããŠãåŒæ°shapeãCircleèŠçŽ ã§ããã°åã®é¢ç©ãRectangleèŠçŽ ã§ããã°é·æ¹åœ¢ã®é¢ç©ãèšç®ããŠããŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 64,
"tag": "p",
"text": "å
±çšäœã䜿çšãããšãè€æ°ã®é¢é£ããå€ã1ã€ã®åã«ãŸãšããããšãã§ããããã°ã©ã ã®èŠéãããããªããŸãããŸããç°ãªãåã®å€ãæ¯èŒããå Žåã«ãéåžžã«äŸ¿å©ã§ããããããå
±çšäœã極ããŠæè»ã§ããããã䜿ãããããšã³ãŒããããããããªãå ŽåããããŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 65,
"tag": "p",
"text": "",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 66,
"tag": "p",
"text": "以äžã¯F#ã®ã³ã¬ã¯ã·ã§ã³ãšäž»ãªã¡ãœããã衚圢åŒã§ãŸãšãããã®ã§ãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 67,
"tag": "p",
"text": "äžèšã®è¡šã§ã¯ãåè¡ãã¡ãœãããååãã³ã¬ã¯ã·ã§ã³ãè¡šããŠããŸããããšãã°ãListãšããåã«ããlength/countãšããã»ã«ã¯ããªã¹ãã®èŠçŽ æ°ãååŸããããã®ã¡ãœããã§ããList.lengthã«å¯Ÿå¿ããŠããŸããåæ§ã«ãSeqãšããåã«ããmapãšããã»ã«ã¯ãã·ãŒã±ã³ã¹ã®èŠçŽ ã«é¢æ°ãé©çšããæ°ããã·ãŒã±ã³ã¹ãäœæããããã®Seq.mapã¡ãœããã«å¯Ÿå¿ããŠããŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 68,
"tag": "p",
"text": "F#ã«ãããŠããªã¹ãã¯éåžžã«éèŠãªããŒã¿æ§é ã§ããF#ã®ãªã¹ãã¯äžå€ãªäžé£ã®å€ã®ã·ãŒã±ã³ã¹ã§ãããã¢ã€ãã ãè¿œå ãåé€ãå€æŽã§ããŸããã ãã ããæ°ãããªã¹ããäœæããããšã§ãæ¢åã®ãªã¹ãããèŠçŽ ãåé€ããããèŠçŽ ãè¿œå ãããããããšãã§ããŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 69,
"tag": "p",
"text": "F#ã®ãªã¹ãã¯ããã¿ãŒã³ãããã³ã°ã«ãã£ãŠåŠçãããããšããããããŸããããšãã°ã次ã®ããã«ããŠããªã¹ãã®å
é èŠçŽ ãšæ®ãã®ãªã¹ããååŸããããšãã§ããŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 70,
"tag": "p",
"text": "ãŸããF#ã®ãªã¹ãã¯é
延è©äŸ¡ããããããå¿
èŠã«å¿ããŠèŠçŽ ãçæããããã«äœ¿çšããããšãã§ããŸããããšãã°ã次ã®é¢æ°ã¯ãäžããããæŽæ°ã«å¯ŸããçŽ æ°ãæã€ç¡éãªã¹ããçæããŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 71,
"tag": "p",
"text": "F#ã®ãªã¹ãã¯ãé«éé¢æ°ãšäžç·ã«äœ¿çšããããšãã§ããå ŽåããããŸããç¹ã«ãList.mapãList.filterãList.foldãªã©ã®é¢æ°ã¯ããªã¹ãã®èŠçŽ ã«å¯ŸããŠå€æããã£ã«ã¿ãªã³ã°ãç³ã¿èŸŒã¿æäœãå®è¡ããããã«äœ¿çšããããšãã§ããŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 72,
"tag": "p",
"text": "ãããã®äŸã¯ãF#ã®ãªã¹ãã«é¢ããæ©èœã®äžéšã§ãããF#ã®ãªã¹ãã¯éåžžã«åŒ·åã§ãå€ãã®å€åœ©ãªæäœãå®è¡ããããšãã§ããŸãã=== é
å ===",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 73,
"tag": "p",
"text": "F#ã§ã®ã·ãŒã±ã³ã¹ã«ã¯ãéåžžã«å€ãã®æ©èœããããŸãã以äžã«ããã€ãã®äŸãæããŠã¿ãŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 74,
"tag": "p",
"text": "ããã«ãããmySeqã¯1ãã3ãŸã§ã®æŽæ°ãå«ãã·ãŒã±ã³ã¹ãšããŠå®çŸ©ãããŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 75,
"tag": "p",
"text": "ãã®å ŽåãevenãåºåãããŸã§ãnumsã®èŠçŽ ã¯å®éã«ã¯èšç®ãããŸãããå¿
èŠãªå Žåã«ã®ã¿èšç®ãããŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 76,
"tag": "p",
"text": "以äžããF#ã®ã·ãŒã±ã³ã¹ã«é¢ããç°¡åãªèª¬æã§ãããã詳现ãªæ
å ±ã«ã€ããŠã¯ãF#ã®å
¬åŒããã¥ã¡ã³ããåç
§ããŠãã ããã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 77,
"tag": "p",
"text": "F#ã«ã¯ãæ§ã
ãªé
åãåŠçããããã®äŸ¿å©ãªçµã¿èŸŒã¿é¢æ°ãçšæãããŠããŸãã以äžã«ãé
åã«é¢ããããã€ãã®æ©èœã玹ä»ããŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 78,
"tag": "p",
"text": "以äžãF#ã®é
åã«é¢ããããã€ãã®æ©èœã玹ä»ããŸãããF#ã®é
åã«ã€ããŠè©³ããåŠã¶ã«ã¯ãF#ã®å
¬åŒããã¥ã¡ã³ããåç
§ããŠãã ããã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 79,
"tag": "p",
"text": "F# ã® Set ã¯ãéè€ã®ãªãèŠçŽ ã®ã³ã¬ã¯ã·ã§ã³ãæ±ãããã®ããŒã¿æ§é ã§ãã以äžã«ããã€ãã®æ©èœã玹ä»ããŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 80,
"tag": "p",
"text": "以äžã¯ãF# ã® Set ã䜿çšããäŸã§ãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 81,
"tag": "p",
"text": "F#ã®Mapã¯ãé£æ³é
åãè¡šçŸããããã®ããŒã¿æ§é ã§ãã以äžã«ããã®æ©èœãããã€ã玹ä»ããŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 82,
"tag": "p",
"text": "Mapã®äœæãMap.addã¡ãœããã®äœ¿çšãMap.tryFindã¡ãœããã®äœ¿çšãããã³Map.foldã¡ãœããã®äœ¿çšãè¡ã£ãŠããŸãã",
"title": "F#ã®ããŒã¿å"
},
{
"paragraph_id": 83,
"tag": "p",
"text": "F#ã¯ãMLç³»ã®åŒ·åãªé¢æ°åããã°ã©ãã³ã°èšèªã§ããF#ã¯ãé«ãªãŒããŒé¢æ°ãã«ãªãŒåããã¥ã¢é¢æ°ã代æ°çããŒã¿åãªã©ã®åŒ·åãªæ©èœãåããŠããŸãã",
"title": "F#ã®é«åºŠãªæ©èœ"
},
{
"paragraph_id": 84,
"tag": "p",
"text": "ãŸããé«ãªãŒããŒé¢æ°ã¯ãé¢æ°ãåŒæ°ãšããŠåãåãé¢æ°ãŸãã¯é¢æ°ãæ»ãå€ãšããŠè¿ãé¢æ°ã§ããããã«ãããéåžžã«æè»ãªé¢æ°ãäœæã§ããŸããäŸãã°ã以äžã®é«ãªãŒããŒé¢æ° map ã¯ããªã¹ããåãåãããªã¹ãã®åèŠçŽ ã«é¢æ°ãé©çšããŠæ°ãããªã¹ããçæããŸãã",
"title": "F#ã®é«åºŠãªæ©èœ"
},
{
"paragraph_id": 85,
"tag": "p",
"text": "次ã«ãã«ãªãŒåã¯ãè€æ°ã®åŒæ°ããšãé¢æ°ãã1ã€ã®åŒæ°ããšãé¢æ°ã®ãã§ãŒã³ã«å€æããæ¹æ³ã§ããã«ãªãŒåã䜿çšãããšãåå©çšæ§ãé«ããããæè»ãªé¢æ°ãäœæã§ããŸãã",
"title": "F#ã®é«åºŠãªæ©èœ"
},
{
"paragraph_id": 86,
"tag": "p",
"text": "ããã«ãF#ã¯ãã¥ã¢é¢æ°ã®äœæãç°¡åã«ããŸãããã¥ã¢é¢æ°ã¯ãå¯äœçšããªãé¢æ°ã§ãããåãå
¥åã«å¯ŸããŠåžžã«åãåºåãçæããŸããF#ã¯ãã€ãã¥ãŒã¿ãã«(å€æŽäžèœ)ãªããŒã¿æ§é ã䜿çšããããšãæšå¥šããŠãããããã¯ãæ°ããããŒã¿æ§é ã®çæã®ã¿ããµããŒãããŠããŸããããã«ãããäºæããªãå¯äœçšãçºçããå¯èœæ§ãããå Žåã«ããå®å
šæ§ã確ä¿ããããšãã§ããŸãã",
"title": "F#ã®é«åºŠãªæ©èœ"
},
{
"paragraph_id": 87,
"tag": "p",
"text": "æåŸã«ãF#ã§ã¯ã代æ°çããŒã¿åã䜿çšããŠãç°ãªãçš®é¡ã®ããŒã¿ãè¡šçŸããããšãã§ããŸãã代æ°çããŒã¿åã«ã¯ããŠããªã³åãšã¬ã³ãŒãåããããŸãããŠããªã³åã¯ãè€æ°ã®åã®äžã€ã§ã§ããåã§ãããã¬ã³ãŒãåã¯ãè€æ°ã®åã®ãã£ãŒã«ããæã€åã§ãã",
"title": "F#ã®é«åºŠãªæ©èœ"
},
{
"paragraph_id": 88,
"tag": "p",
"text": "以äžãF#ã®é¢æ°åããã°ã©ãã³ã°ã®é«åºŠãªæ©èœã§ãããããã®æ©èœãé§äœ¿ããããšã§ãããæè»ã§åå©çšæ§ã®é«ãããã°ã©ã ãäœæã§ããŸãã",
"title": "F#ã®é«åºŠãªæ©èœ"
},
{
"paragraph_id": 89,
"tag": "p",
"text": "F#ã¯ã.NETãã¬ãŒã ã¯ãŒã¯ã®äžéšã§ãããéçåä»ãã®ãã«ããã©ãã€ã ããã°ã©ãã³ã°èšèªã§ããF#ã®éçåä»ãã·ã¹ãã ã¯ãã³ã³ãã€ã©ã«ããéç解æã«ãããå®è¡æã®ãšã©ãŒãæžãããä¿å®æ§ãåäžãããããšãã§ããŸãã",
"title": "F#ã®é«åºŠãªæ©èœ"
},
{
"paragraph_id": 90,
"tag": "p",
"text": "F#ã«ã¯éçåä»ãã®å€æ°ããããåã«åºã¥ããŠå¶éãããŸããããã«ãããã³ãŒãã®å質ãé«ãããããã°ã容æã«ãªããŸãããŸããF#ã§ã¯æ§èœæé©åã®ããã«ãäžå€æ§ãéèŠãããŠããŸãããã®ãããªäžå€æ§ã¯ããªããžã§ã¯ãã®ç¶æ
ãåžžã«ç¢ºå®ã«ææ¡ããããšãã§ãããããã³ãŒãã®å¯èªæ§ãåäžããŸãã",
"title": "F#ã®é«åºŠãªæ©èœ"
},
{
"paragraph_id": 91,
"tag": "p",
"text": "F#ã®éçåä»ãã·ã¹ãã ã¯ã.NETã®åã·ã¹ãã ãšé«åºŠã«çµ±åãããŠããŸããããã¯ãæ¢åã®.NETã¢ããªã±ãŒã·ã§ã³ããã®ç§»è¡ã容æã§ããããšãæå³ããŠããŸãããŸããF#ã¯.NETã®æ©èœããµããŒãããŠãããC#ãVB.NETãšåãããå®å
šãªçžäºéçšæ§ãæã£ãŠããŸãã",
"title": "F#ã®é«åºŠãªæ©èœ"
},
{
"paragraph_id": 92,
"tag": "p",
"text": "F#ã¯ãéçåä»ãã·ã¹ãã ã掻çšããããšã§ãå€ãã®åé¡ãäºåã«æ€åºããããšãã§ããŸããããã«ããããã°ãæªç¶ã«é²ãããšãã§ããããããœãããŠã§ã¢éçºã®éçšã§ã®å質ãšä¿¡é Œæ§ãåäžããä¿å®æ§ãé«ãŸããŸãã",
"title": "F#ã®é«åºŠãªæ©èœ"
},
{
"paragraph_id": 93,
"tag": "p",
"text": "以äžã¯ãF#ã®ã¢ã¯ãã£ããã¿ãŒã³ãããã³ã°ã«é¢ããç°¡åãªäŸã§ãã",
"title": "F#ã®é«åºŠãªæ©èœ"
},
{
"paragraph_id": 94,
"tag": "p",
"text": "ãã®äŸã§ã¯ãF#ã§ã¢ã¯ãã£ããã¿ãŒã³ãããã³ã°ãã©ã®ããã«æ©èœãããã瀺ããŠããŸããæåã«ã|Even|Odd|ãšããã¢ã¯ãã£ããã¿ãŒã³ãå®çŸ©ããŸãããã®ãã¿ãŒã³ã¯ãæŽæ°ãå¶æ°ãå¥æ°ãã«å¿ããŠã2ã€ã®ãã¿ãŒã³ãããã³ã°ãæäŸããŸãã次ã«ãisEvené¢æ°ãå®çŸ©ããæŽæ°ãEvenãŸãã¯Oddã«ãã¿ãŒã³ãããã³ã°ããŠãå¶æ°ã§ãããã©ããã確èªããŸãã",
"title": "F#ã®é«åºŠãªæ©èœ"
},
{
"paragraph_id": 95,
"tag": "p",
"text": "次ã«ãé貚ã·ã³ãã«ããã¿ãŒã³ãããã³ã°ããã¢ã¯ãã£ããã¿ãŒã³ãå®çŸ©ããŸãããã®ã¢ã¯ãã£ããã¿ãŒã³ã¯ãDollarãšEuroãšãã2ã€ã®ãã¿ãŒã³ãæäŸããæååããã«ãŸãã¯ãŠãŒãã®é貚èšå·ã§ãããã確èªããŸããconvertPriceé¢æ°ã¯ãé貚ã·ã³ãã«ãšäŸ¡æ ŒãåãåããDollarã®å Žåã¯äŸ¡æ ŒããŠãŒãã«å€æããEuroã®å Žåã¯å€æãè¡ããã«äŸ¡æ Œãè¿ããŸããæåŸã«ãprintfnã䜿çšããŠãã¢ã¯ãã£ããã¿ãŒã³ã䜿çšããå€æã®äŸã瀺ããŸãã",
"title": "F#ã®é«åºŠãªæ©èœ"
},
{
"paragraph_id": 96,
"tag": "p",
"text": "ç§ãã¡ã䜿çšããprintfné¢æ°ã¯ãæåãåºåããããã®ç°¡åãªé¢æ°ã§ã%dã%sãšãã£ããã©ãŒãããæ瀺åã䜿çšããŠãå€æ°ã®å€ã衚瀺ããããšãã§ããŸãã",
"title": "F#ã®é«åºŠãªæ©èœ"
},
{
"paragraph_id": 97,
"tag": "p",
"text": "F#ã¯ã.NET Frameworkã®äžéšã§ããããããã«ãã¹ã¬ããã䞊ååŠçããµããŒãããŠããŸããF#ã®äžŠååŠçã¯ã以äžã®2çš®é¡ã®æ¹æ³ã§å®çŸã§ããŸãã",
"title": "F#ã®é«åºŠãªæ©èœ"
},
{
"paragraph_id": 98,
"tag": "p",
"text": "Asyncãã¿ãŒã³ã¯ã.NET Framework 4.0以éã§å°å
¥ãããéåæåŠçã®ããã®ãã¿ãŒã³ã§ããAsyncãã¿ãŒã³ã䜿çšããããšã§ããã«ãã¹ã¬ããã䜿çšãã䞊ååŠçãããã³ãŒããã·ã³ãã«ã«ãªããŸãã以äžã¯ãAsyncãã¿ãŒã³ã䜿çšããF#ã®ã³ãŒããµã³ãã«ã§ãã",
"title": "F#ã®é«åºŠãªæ©èœ"
},
{
"paragraph_id": 99,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãAsyncãã¿ãŒã³ã䜿çšããŠã2ã€ã®WebããŒãžã䞊åã§ããŠã³ããŒãããããããã®ãµã€ãºã衚瀺ããŠããŸãã",
"title": "F#ã®é«åºŠãªæ©èœ"
},
{
"paragraph_id": 100,
"tag": "p",
"text": "Parallelãã¿ãŒã³ã¯ãTPL(Task Parallel Library)ã®äžéšã§ããããã.NET Framework 4.0以éã§å©çšã§ããŸããParallelãã¿ãŒã³ã䜿çšããããšã§ãC#ã®TaskãThreadPoolãPLINQãªã©ãšåæ§ã«ãç°¡åã«äžŠååŠçãå®çŸããããšãã§ããŸãã以äžã¯ãParallelãã¿ãŒã³ã䜿çšããF#ã®ã³ãŒããµã³ãã«ã§ãã",
"title": "F#ã®é«åºŠãªæ©èœ"
},
{
"paragraph_id": 101,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãParallelãã¿ãŒã³ã䜿çšããŠã1~1,000,000ã®ç¯å²å
ã®çŽ æ°ãæ¢çŽ¢ããŠããŸããæ¢åã®findPrimesInRangeé¢æ°ã䜿çšãããããåã
ã®ãã£ã³ã¯(ããã»ããµæ°ã«åãããŠåå²ãããå
¥åãªã¹ãã®ãµããªã¹ã)ã«å¯ŸããŠãããããŠããŸããããããããçµæãäžã€ã®ãªã¹ãã«é£çµããããšã§ãæçµçãªçŽ æ°ãªã¹ããäœæããŸãããŸããsw.TimeItã䜿çšããããšã§ãå®è¡æéãèšæž¬ããŠããŸãã",
"title": "F#ã®é«åºŠãªæ©èœ"
},
{
"paragraph_id": 102,
"tag": "p",
"text": "ããã2ã€ã®ãã¿ãŒã³ã¯ãããŸããŸãªã·ããªãªã«å¿ããŠé©çšããããšãã§ããŸããAsyncãã¿ãŒã³ã¯ãI/OããŠã³ãã®ã¢ããªã±ãŒã·ã§ã³ãWebãµãŒãã¹ãªã©ã®éåæåŠçã«é©ããŠããŸãããŸããParallelãã¿ãŒã³ã¯ãCPUããŠã³ãã®éãæŒç®ãªã©ã«é©ããŠããŸããF#ã®äžŠååŠçã¯ã.NET Frameworkã®è±å¯ãªäžŠååŠçã©ã€ãã©ãªã掻çšãã€ã€ãF#ã®é¢æ°åããã°ã©ãã³ã°ã®å©ç¹ãçãããæè»ãªäžŠååŠçãå®çŸããããšãã§ããŸãã",
"title": "F#ã®é«åºŠãªæ©èœ"
},
{
"paragraph_id": 103,
"tag": "p",
"text": "F#ã®éåæåŠçã«é¢ãããµã³ãã«ã³ãŒãã§ãã",
"title": "F#ã®é«åºŠãªæ©èœ"
},
{
"paragraph_id": 104,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãdownloadAsyncé¢æ°ã¯ã asyncããŒã¯ãŒãã§ä¿®é£Ÿãããéåæé¢æ°ãšããŠå®çŸ©ãããŠããŸãããã®é¢æ°ã¯ãSystem.Netåå空éå
ã«ããWebClientã¯ã©ã¹ã䜿çšããŠãæå®ãããUriããHTMLãããŠã³ããŒãããŸãã",
"title": "F#ã®é«åºŠãªæ©èœ"
},
{
"paragraph_id": 105,
"tag": "p",
"text": "let! html = webClient.AsyncDownloadString(url)ã®ããã«ãlet!ã䜿çšããŠéåææäœã®çµæãåŸ
ã€ããšãã§ããŸããlet!ã¯éåžžã®letããŒã¯ãŒããšäŒŒãŠããŸãããéåææäœãå®äºãããŸã§ãä»ã®åŠçããããã¯ããã«åŸ
æ©ããŸãã",
"title": "F#ã®é«åºŠãªæ©èœ"
},
{
"paragraph_id": 106,
"tag": "p",
"text": "Async.RunSynchronouslyé¢æ°ã䜿çšããããšã§ãéåææäœãåæçã«å®è¡ã§ããŸãããã®å ŽåãdownloadTaskå€æ°ã«æ ŒçŽãããéåæã¿ã¹ã¯ãå®è¡ããŠãããŠã³ããŒãåŠçãå®äºãããŸã§ãããã¯ããŸãã",
"title": "F#ã®é«åºŠãªæ©èœ"
},
{
"paragraph_id": 107,
"tag": "p",
"text": "æåŸã«ãprintfné¢æ°ã䜿çšããŠãããŠã³ããŒããå®äºããããšããŠãŒã¶ãŒã«éç¥ããŸãã",
"title": "F#ã®é«åºŠãªæ©èœ"
},
{
"paragraph_id": 108,
"tag": "p",
"text": "Ruby#ã³ãŒãã®ã£ã©ãªãŒããã®ç§»æ€ã§ãã",
"title": "éé²"
},
{
"paragraph_id": 109,
"tag": "p",
"text": "ãšã©ãã¹ããã¹ã®ç¯©ããè¥å¹² F# ãããæžããŠã¿ãŸããã",
"title": "éé²"
},
{
"paragraph_id": 110,
"tag": "p",
"text": "æ倧å
¬çŽæ°ãšæå°å
¬åæ°ããè¥å¹² F# ãããæžããŠã¿ãŸããã",
"title": "éé²"
},
{
"paragraph_id": 111,
"tag": "p",
"text": "äºåæ³ããè¥å¹² F# ãããæžããŠã¿ãŸããã",
"title": "éé²"
}
] | F#ã¯ã.NETãã¬ãŒã ã¯ãŒã¯äžã§åäœãããã«ããã©ãã€ã èšèªã§ãããã®èšèªã¯ãéçåä»ããé¢æ°åããªããžã§ã¯ãæåãããã³äžŠåããã°ã©ãã³ã°ããµããŒãããŠããŸãã F#ã¯ãMicrosoft Researchãéçºããèšèªã§ãæ©æ¢°åŠç¿ãæ°å€èšç®ãã¯ã©ãŠãã³ã³ãã¥ãŒãã£ã³ã°ãªã©ã®åéã§åºãå©çšãããŠããŸãããã®èšèªã¯ãé«ãæœè±¡åºŠãšã·ã³ãã«ãã«ãããããã°ã©ããŒã®çç£æ§ãåäžãããŸãã æ¬æžã¯ãF#ã®åºç€ããå¿çšãŸã§ã網çŸ
ããæç§æžã§ããèªè
ã¯ãF#ã§ã®ããã°ã©ãã³ã°ã®åºç€ã身ã«ã€ããå¹ççãªã¢ã«ãŽãªãºã ãé«åºŠãªäžŠååŠçã®å®è£
ãŸã§ãåŠã¶ããšãã§ããŸãã æ¬æžããF#ãåŠã³å§ãã人ããŸãã¯F#ãå¿çšããã人ã«ãšã£ãŠã®è²ŽéãªãªãœãŒã¹ãšãªãããšãé¡ã£ãŠããŸãã | {{Wikipedia}}
F#ã¯ã.NETãã¬ãŒã ã¯ãŒã¯äžã§åäœãããã«ããã©ãã€ã èšèªã§ãããã®èšèªã¯ãéçåä»ããé¢æ°åããªããžã§ã¯ãæåãããã³äžŠåããã°ã©ãã³ã°ããµããŒãããŠããŸãã
F#ã¯ãMicrosoft Researchãéçºããèšèªã§ãæ©æ¢°åŠç¿ãæ°å€èšç®ãã¯ã©ãŠãã³ã³ãã¥ãŒãã£ã³ã°ãªã©ã®åéã§åºãå©çšãããŠããŸãããã®èšèªã¯ãé«ãæœè±¡åºŠãšã·ã³ãã«ãã«ãããããã°ã©ããŒã®çç£æ§ãåäžãããŸãã
æ¬æžã¯ãF#ã®åºç€ããå¿çšãŸã§ã網çŸ
ããæç§æžã§ããèªè
ã¯ãF#ã§ã®ããã°ã©ãã³ã°ã®åºç€ã身ã«ã€ããå¹ççãªã¢ã«ãŽãªãºã ãé«åºŠãªäžŠååŠçã®å®è£
ãŸã§ãåŠã¶ããšãã§ããŸãã
æ¬æžããF#ãåŠã³å§ãã人ããŸãã¯F#ãå¿çšããã人ã«ãšã£ãŠã®è²ŽéãªãªãœãŒã¹ãšãªãããšãé¡ã£ãŠããŸãã
__TOC__
== F#ã®æŠèŠ ==
=== F#ãšã¯äœã ===
F#ã¯ã.NET Frameworkäžã§åäœããé¢æ°åããã°ã©ãã³ã°èšèªã§ãã F#ã¯ã.NETçšã®æ©èœãæäŸããå
±éèšèªã©ã³ã¿ã€ã ïŒCLRïŒã®äžéšã§ãã
F#ã¯2005幎ã«ãã€ã¯ããœãããéçºãã2007幎ã«æåã®å
¬éããŒãžã§ã³ãç»å ŽããŸããã
F#ã¯ãéçåä»ããåæšè«ãé«éé¢æ°ãé«åºŠãªãã¿ãŒã³ãããã³ã°ãããã³äžŠåããã°ã©ãã³ã°ãç°¡æœãã€å¹æçã«è¡ãããšãã§ããŸãã
=== F#ã®ã¢ãŒããã¯ã㣠===
F#ã¯ãé¢æ°åããã°ã©ãã³ã°èšèªãšããŠèšèšãããŠããŸãããã®ãããF#ã¢ããªã±ãŒã·ã§ã³ã¯ã倧éšåãé¢æ°ã§æ§æãããŠããŸããF#ã¯ã.NET Frameworkã®äžéšã§ãããåãã©ã€ãã©ãªãããŒã«ãããã³ãªãœãŒã¹ã«ã¢ã¯ã»ã¹ããããšãã§ããŸãã F#ã¯ãC#ãVB.NETãšåæ§ã«ãæ¢åã®.NETã³ã³ããŒãã³ããã©ã€ãã©ãªãã¯ã©ã¹ãããã³ã¢ãžã¥ãŒã«ã䜿çšã§ããŸãã
F#ã¯ãŸãã䞊åããã³éåæããã°ã©ãã³ã°ã«æé©åãããŠããŸãããããã®æ©èœã«ããã倧èŠæš¡ãªäžŠåèšç®ãå¹ççãã€ç°¡æœã«èšè¿°ã§ããŸããF#ã¯ã.NETã®Asynchronous Programming ModelïŒAPMïŒãTask-Parallel LibraryïŒTPLïŒãªã©ã.NETã®æšæºäžŠååã©ã€ãã©ãªã«ãã¢ã¯ã»ã¹ã§ããŸãã
=== F#ã®ç¹åŸŽ ===
F#ã®ç¹åŸŽã¯ä»¥äžã®éãã§ãã
# é¢æ°åããã°ã©ãã³ã°ïŒF#ã¯é¢æ°åããã°ã©ãã³ã°èšèªã§ãããé¢æ°ãäžçå
¬æ°ãšããŠæ±ããŸãããŸããäžå€æ§ãé
延è©äŸ¡ãªã©ã®æŠå¿µãçµã¿èŸŒãŸããŠãããé¢æ°åããã°ã©ãã³ã°ã«ããã·ã³ãã«ãã€å®å
šãªã³ãŒããæžããŸãã
# ãªããžã§ã¯ãæåããã°ã©ãã³ã°ïŒF#ã¯C#ãVB.NETãšåã.NETèšèªãã¡ããªãŒã«å±ããŠãããããããšåæ§ã«ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã«ã察å¿ããŠããŸããF#ã§ã¯ããåããšããªããžã§ã¯ãããšããæŠå¿µãåããŠèãããªããžã§ã¯ãæåããã°ã©ãã³ã°ã§å¿
èŠãªã«ãã»ã«åãç¶æ¿ãªã©ã®æ©èœãæäŸããŠããŸãã
# éçåä»ãïŒF#ã¯éçåä»ãèšèªã§ãããã³ã³ãã€ã«æã«åã®æŽåæ§ãã§ãã¯ãè¡ãããŸããããã«ãããå®è¡æãšã©ãŒãé²ããæ£ç¢ºã§ä¿¡é Œæ§ã®é«ãã³ãŒããæžãããšãã§ããŸãã
ãã«ããã©ãããã©ãŒã 察å¿ïŒF#ã¯ã.NET Frameworkã.NET Coreã®ãããªMicrosoftã®ãã©ãããã©ãŒã ã ãã§ãªããMonoãUnityãªã©ãããŸããŸãªãã©ãããã©ãŒã ã§åäœããŸãããŸããF#ã¯WindowsãLinuxãMac OS Xãªã©ã®ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§ãå©çšã§ããŸãã
# çžäºéçšæ§ïŒF#ã¯ãä»ã®.NETèšèªïŒC#ãVB.NETãªã©ïŒãNative CodeïŒC++ãFortranãªã©ïŒãšã®çžäºéçšãå¯èœã§ããããã«ãããæ¢åã®ã³ãŒããF#ã«ç§»è¡ããããšãã§ããã»ããF#ã§æžãããã³ãŒããä»ã®èšèªã§å©çšããããšãã§ããŸãã
# ãã¿ãŒã³ãããã³ã°ïŒF#ã«ã¯ããã¿ãŒã³ãããã³ã°ãšãã䟿å©ãªæ©èœããããŸããããã¯ãç°ãªãåãæ§é ãæã€ããŒã¿ãå®å
šãã€ç°¡æœã«å解ããããšãã§ãããããããã°ã©ã ã®æè»æ§ãšèªã¿ããããåäžãããŸãã
# ã¢ã¯ãã£ããã¿ãŒã³ãããã³ã°ïŒF#ã«ã¯ãã¢ã¯ãã£ããã¿ãŒã³ãããã³ã°ãšããæ©èœããããŸããããã¯ã.NET FrameworkãCOMãªããžã§ã¯ããªã©ã®å€éšãªãœãŒã¹ã«å¯ŸããŠããã¿ãŒã³ãããã³ã°ãé©çšããããšãã§ããæ©èœã§ããããã«ãããF#ã§é«åºŠãªæžãæ¹ãããããšãã§ããŸãã
== F#ã®ã€ã³ã¹ããŒã«ãšã»ããã¢ãã ==
{{Main|[https://learn.microsoft.com/en-us/dotnet/fsharp/get-started/ Get Started with F#]}}
ããªãã®ç°å¢ã«å¿ããŠãè€æ°ã®æ¹æ³ã§F#ãã€ã³ã¹ããŒã«ããããšãã§ããŸãã
Visual Studioã䜿çšããŠF#ãã€ã³ã¹ããŒã«ããå ŽåãVisual Studio InstallerããŸãã€ã³ã¹ããŒã«ãããŸããåããŠVisual StudioãããŠã³ããŒãããå Žåã¯ãã€ã³ã¹ããŒã©ããé©åãªãšãã£ã·ã§ã³ã®Visual Studioãã€ã³ã¹ããŒã«ããŠãã ããã
æ¢ã«Visual Studioãã€ã³ã¹ããŒã«ãããŠããå Žåã¯ãF#ãè¿œå ããããšãã£ã·ã§ã³ã®æšªã«ãããå€æŽããéžæããŠãã ãããã¯ãŒã¯ããŒãããŒãžã§ãASP.NETããã³Webéçºã¯ãŒã¯ããŒããéžæããŸããããã«ã¯ãASP.NET Coreãããžã§ã¯ãã®F#ããã³.NET CoreãµããŒããå«ãŸããŠããŸãããéžæãããã¹ãŠãã€ã³ã¹ããŒã«ããããéžæããŠãå³äžé
ã®ãå€æŽããéžæããŸãã
Visual Studio Installerã§F#ãå«ãŸããVisual Studioãéå§ããã«ã¯ããVisual Studioã§èµ·åããéžæããŠãã ããã
Visual Studio Codeã§F#ãã€ã³ã¹ããŒã«ããå ŽåãgitãPATHã§å©çšå¯èœã§ããããšã確èªããŠãã ãããã³ãã³ãããã³ããã§git --versionãå
¥åããEnterãæŒãããšã§ç¢ºèªã§ããŸãã.NET SDKããã³Visual Studio Codeãã€ã³ã¹ããŒã«ããŠãã ããããæ¡åŒµæ©èœãã¢ã€ã³ã³ãéžæãããIonideãã§æ€çŽ¢ããŠãã ããããIonide-fsharpãã¯ãVisual Studio Codeã§F#ããµããŒãããããã«å¿
èŠãªå¯äžã®ãã©ã°ã€ã³ã§ãããã ããFAKEãµããŒããååŸããããã«ãIonide-FAKEããã€ã³ã¹ããŒã«ããããããã±ãŒãžã®ãµããŒããååŸããããã«ãIonide-Paketããã€ã³ã¹ããŒã«ããããšãã§ããŸããFAKEããã³Paketã¯ããããžã§ã¯ãã®ãã«ãããã³äŸåé¢ä¿ã®ç®¡çã«äœ¿çšããããè¿œå ã®F#ã³ãã¥ããã£ããŒã«ã§ããVisual Studio for Macã§F#ãã€ã³ã¹ããŒã«ããå Žåãã©ã®æ§æãéžæããŠããF#ã¯ããã©ã«ãã§ã€ã³ã¹ããŒã«ãããŸããã€ã³ã¹ããŒã«ãå®äºãããããVisual Studioãèµ·åããéžæããŠãã ããã
MacOSäžã®Finderãä»ããŠVisual Studioãéãããšãã§ããŸãã
ãã«ããµãŒããŒã«F#ãã€ã³ã¹ããŒã«ããå Žåã.NET SDKãä»ããŠ.NET CoreãŸãã¯.NET Frameworkã䜿çšããŠããå Žåã¯ããã«ããµãŒããŒã«.NET SDKãã€ã³ã¹ããŒã«ããã ãã§ããå¿
èŠãªãã¹ãŠãå«ãŸããŠããŸãã.NET Frameworkã䜿çšãã.NET SDKã䜿çšããŠããªãå Žåã¯ãWindows Serverã«Visual Studio Build Tools SKUãã€ã³ã¹ããŒã«ããå¿
èŠããããŸããã€ã³ã¹ããŒã©ã§ã.NETãã¹ã¯ããããã«ãããŒã«ãéžæããå³åŽã®ã€ã³ã¹ããŒã©ã¡ãã¥ãŒã§F#ã³ã³ãã€ã©ã³ã³ããŒãã³ããéžæããŸãã
== F#ã®åºç€ ==
=== å€æ°ãšå ===
:<syntaxhighlight lang=f#>
// F#ã®å€æ°ãšå
// F#ã§ã¯ãå€æ°ã®å®£èšã«ã¯ let ããŒã¯ãŒãã䜿çšããŸãã
// let ã¯ãæçž (binding) ãšåŒã°ããæäœãå®è¡ããŠããããšã瀺ããŸãã
// å€æ°ã¯äžå€ (immutable) ã§ãããäžåºŠæçžãããããã®å€ãå€æŽã§ããŸããã
let age = 42
let name = "James"
// F#ã§ã¯ãåæšè«ã«ãããå€æ°ã®åãæ瀺çã«æå®ããå¿
èŠããªãå ŽåããããŸãã
// ageã®åã¯ãæŽæ°åintã§ãã
// nameã®åã¯ãæåååstringã§ã
// F#ã§ã¯ãåã¢ãããŒã·ã§ã³ã䜿çšããŠãå€æ°ã®åãæ瀺çã«æå®ã§ããŸãã
let x : float = 3.14
let y : int = 42
// éçåä»ãèšèªã§ããF#ã§ã¯ãåãšã©ãŒãã³ã³ãã€ã«æã«æ€åºãããŸãã
// ãããã£ãŠãã³ã³ãã€ã«æã«çºçãããå€ãã®ãšã©ãŒãå®è¡æãšã©ãŒã«ãªãããšããããŸããã
// F#ã«ã¯ãåçš®ã®åºæ¬ããŒã¿åããããŸãã
// äŸãã°ã次ã®ãããªåºæ¬ããŒã¿åããããŸãã
// æŽæ°å
let a : int = 42
let b : int32 = 42l
let c : int64 = 42L
let d : byte = 255uy
let e : sbyte = 127y
// æµ®åå°æ°ç¹å
let f : float = 3.14
let g : double = 3.14159265359
// çåœå
let h : bool = true
let i : bool = false
// æååå
let j : string = "hello world"
// æåå
let k : char = 'a'
// ãŠãããå
let l : unit = ()
// F#ã«ã¯ãé
åãã¿ãã«ãªã©ã®è€ååããããŸãã
// ããã«ãããè€æ°ã®å€ããŸãšããŠæ±ãããšãã§ããŸãã
// é
å
let arr : int[] = [|1; 2; 3|]
let arr2D : int[,] = array2D [[1; 2]; [3; 4]]
// ã¿ãã«
let tpl : int * string = (42, "answer")
// F#ã§ã¯åºæ¬çã«å€æ°ã«å代å
¥ããããšã¯ã§ããŸããããå€æŽå¯èœãªå€ãæ±ãå Žåã¯ãmutableãšããããŒã¯ãŒããçšããŠãæ瀺çã«å€æŽå¯èœãªå€æ°ã宣èšããããšãã§ããŸãã
// å€æŽå¯èœãªæ°å€ã宣èš
let mutable count = 0
// å€æŽ
count <- count + 1
// äžèšã®ããã«ã<-æŒç®åãçšããŠãå€æŽå¯èœãªå€æ°ã®å€ãæŽæ°ããããšãã§ããŸãã
</syntaxhighlight>
=== åŒãšæŒç®å ===
F#ã¯ãã«ããã©ãã€ã ããã°ã©ãã³ã°èšèªã§ãããé¢æ°åèšèªã®ç¹åŸŽãæã£ãŠããŸããF#ã§ã¯ãæ°å€åŒãè«çåŒãæåååŒããªã¹ãåŒãé
ååŒãã¿ãã«åŒãªã©ãããŸããŸãªåŒããµããŒããããŠããŸãã
æ°å€åŒã§ã¯ãç®è¡æŒç®åïŒ+ã-ã*ã/ãªã©ïŒãæ¯èŒæŒç®åïŒ=ã<ã>ãªã©ïŒã䜿çšããŠãæ°å€èšç®ãè¡ãããšãã§ããŸããäŸãã°ã以äžã®ãããªã³ãŒããæžãããšãã§ããŸãã
:<syntaxhighlight lang=f#>
let x = 5 let y = 10 let z = x + y // zã«ã¯15ã代å
¥ããã
let isGreaterThan = y > x // isGreaterThanã«ã¯trueã代å
¥ããã
</syntaxhighlight>
è«çåŒã§ã¯ãè«çæŒç®åïŒ&&ã||ãnotãªã©ïŒã䜿çšããŠãè«çæŒç®ãè¡ãããšãã§ããŸããäŸãã°ã以äžã®ãããªã³ãŒããæžãããšãã§ããŸãã
:<syntaxhighlight lang=f#>
let a = true
let b = false
let c = a && b // cã«ã¯falseã代å
¥ããã
let d = not a // dã«ã¯falseã代å
¥ããã
</syntaxhighlight>
æåååŒã§ã¯ãæååçµåæŒç®åïŒ+ïŒã䜿çšããŠãæååãçµåããããšãã§ããŸããäŸãã°ã以äžã®ãããªã³ãŒããæžãããšãã§ããŸãã
:<syntaxhighlight lang=f#>
let str1 = "Hello, " let str2 = "world!"
let greeting = str1 + str2 // greetingã«ã¯"Hello, world!"ã代å
¥ããã
</syntaxhighlight>
ãªã¹ãåŒã§ã¯ããªã¹ãæŒç®åïŒ::ïŒã䜿çšããŠããªã¹ããäœæããããšãã§ããŸããäŸãã°ã以äžã®ãããªã³ãŒããæžãããšãã§ããŸãã
:<syntaxhighlight lang=f#>
let myList = 1 :: 2 :: 3 :: [] // myListã«ã¯[1; 2; 3]ã代å
¥ããã
</syntaxhighlight>
é
ååŒã§ããªã¹ãæŒç®åã䜿çšããããšãã§ããŸããããã以å€ã«ãæ§ã
ãªé¢æ°ã䜿çšããããšãã§ããŸããäŸãã°ã以äžã®ãããªã³ãŒããæžãããšãã§ããŸãã
:<syntaxhighlight lang=f#>
let myArray = [|1; 2; 3|]
let firstElement = myArray.[0] // firstElementã«ã¯1ã代å
¥ããã
let newArray = Array.map (fun x -> x * 2) myArray // newArrayã«ã¯[2; 4; 6]ã代å
¥ããã
</syntaxhighlight>
ã¿ãã«åŒã§ã¯ãã«ã³ãïŒ,ïŒã䜿çšããŠãè€æ°ã®å€ã1ã€ã®ãªããžã§ã¯ãã«ãŸãšããããšãã§ããŸããäŸãã°ã以äžã®ãããªã³ãŒããæžãããšãã§ããŸãã
:<syntaxhighlight lang=f#>
let myTuple = ("apple", 3)
let (fruit, quantity) = myTuple // fruitã«ã¯"apple"ã代å
¥ããquantityã«ã¯3ã代å
¥ããã
</syntaxhighlight>
=== å¶åŸ¡æ§é ===
以äžã¯ F# ã®å¶åŸ¡æ§é ã®æŠèŠã§ãã
==== æ¡ä»¶åå² ====
F# ã§ã¯ãif/then/else æ§æã䜿ã£ãŠæ¡ä»¶åå²ãè¡ãããšãã§ããŸããæ§æã¯ä»¥äžã®éãã§ãã
:<syntaxhighlight lang=f#>
if æ¡ä»¶1 then åŒ1 elif æ¡ä»¶2 then åŒ2 else åŒ3
</syntaxhighlight>
äŸãã°ãx ã 0 ãã倧ããå Žåã«ã¯ "Positive"ã0 ã®å Žåã«ã¯ "Zero"ã0 ããå°ããå Žåã«ã¯ "Negative" ãšããæååãè¿ãé¢æ°ãå®çŸ©ãããšä»¥äžã®ããã«ãªããŸãã
:<syntaxhighlight lang=f#>
let sign x =
if x > 0 then "Positive"
elif x = 0 then "Zero"
else "Negative"
</syntaxhighlight>
==== ã«ãŒã ====
F# ã§ã¯ãfor ã«ãŒãã while ã«ãŒãã䜿ã£ãŠå埩åŠçãè¡ãããšãã§ããŸãã
===== for =====
:<syntaxhighlight lang=f#>
for ã«ãŒãå¶åŸ¡å€æ° = åæå€ to æçµå€ do
// åŠçãèšè¿°ãã
done
</syntaxhighlight>
äŸãã°ã1 ãã 10 ãŸã§ã®åèšãèšç®ãããšä»¥äžã®ããã«ãªããŸãã
:<syntaxhighlight lang=f#>
let mutable total = 0
for i = 1 to 10 do
total <- total + i
printfn "%i" total
</syntaxhighlight>
===== while =====
:<syntaxhighlight lang=f#>
while æ¡ä»¶ do
// åŠçãèšè¿°ãã
done
</syntaxhighlight>
äžèšã® for ã®äŸãšç䟡ãªã«ãŒããwhileã§æžããäŸ
:<syntaxhighlight lang=f#>
let mutable total = 0
let mutable i = 1
while i <= 10 do
total <- total + i
i <- i + 1
printfn "%i" total
</syntaxhighlight>
==== ãã¿ãŒã³ãããã³ã° ====
===== match =====
<code>match</code> ã¯ãF#ã§ãã¿ãŒã³ãããã³ã°ãè¡ãããã®æ©èœã§ããç°ãªãã±ãŒã¹ã«å¿ããŠãå€ããã¿ãŒã³ã«åºã¥ããŠåŠçãéžæããã®ã«äœ¿ãããŸããããã«ãããç¹å®ã®ãã¿ãŒã³ã«äžèŽããåŠçãè¡ãããšãã§ããŸãã
äŸãã°ã以äžã¯<code>match</code>ã®åºæ¬çãªäœ¿ãæ¹ã§ãã
:<syntaxhighlight lang=f#>
let describeNumber number =
match number with
| 0 -> printfn "ãŒãã§ã"
| 1 -> printfn "äžã§ã"
| 2 -> printfn "äºã§ã"
| _ -> printfn "ãã®ä»ã®æ°åã§ã"
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>describeNumber</code> é¢æ°ãäžããããæ°åã«å¯ŸããŠãããã³ã°ãè¡ããŸãã<code>match</code>ã¯äžãããã <code>number</code> ã®å€ãåãã¿ãŒã³ãšæ¯èŒããããããã®ãã¿ãŒã³ã«äžèŽããåŠçãå®è¡ããŸãã
* <code>0</code> ã®å Žå㯠"ãŒãã§ã" ãšè¡šç€ºããŸãã
* <code>1</code> ã®å Žå㯠"äžã§ã" ãšè¡šç€ºããŸãã
* <code>2</code> ã®å Žå㯠"äºã§ã" ãšè¡šç€ºããŸãã
* äžèšã®ãããã«ãåœãŠã¯ãŸããªãå Žåã¯ã<code>_</code>ïŒã¯ã€ã«ãã«ãŒãïŒã§è¡šãããããã©ã«ãã®ãã¿ãŒã³ã«ããããã"ãã®ä»ã®æ°åã§ã" ãšè¡šç€ºããŸãã
<code>match</code> åŒã¯ããã¿ãŒã³ã網çŸ
çã§ãããã確èªããå
šãŠã®å¯èœæ§ã網çŸ
ããŠãããããã§ãã¯ããããšãéèŠã§ãããã¿ãŒã³ã網çŸ
çã§ãªãå Žåãã³ã³ãã€ã«æã«èŠåãåºãããšããããŸãã
ããã«ã<code>match</code>ã¯å€åœ©ãªãã¿ãŒã³ãããã³ã°ããµããŒãããŠãããã¿ãã«ããªã¹ããã«ã¹ã¿ã ããŒã¿åãªã©ã®ãã¿ãŒã³ãæ±ããŸããããã«ãããæè»ãªæ¡ä»¶åå²ãããŒã¿æ§é ã®è§£æãå¯èœã«ãªããŸãã
;ããè€éãªãã¿ãŒã³ãããã³ã°ã®äŸ
è€éãªãã¿ãŒã³ãããã³ã°ã®äŸãšããŠãã¿ãã«ããªã¹ããªã©ã®è€åçãªãã¿ãŒã³ãå«ããã®ãèŠãŠã¿ãŸãããã
:<syntaxhighlight lang=f#>
type Person =
| Adult of string * int
| Child of string * int
let describePerson person =
match person with
| Adult (name, age) when age >= 18 ->
printfn "%sããã¯å€§äººã§ã幎霢ã¯%dæ³ã§ã" name age
| Child (name, age) when age < 18 ->
printfn "%sããã¯åäŸã§ã幎霢ã¯%dæ³ã§ã" name age
| _ -> printfn "æ
å ±ããããŸãã"
let adultPerson = Adult ("Alice", 25)
let childPerson = Child ("Bob", 12)
describePerson adultPerson
describePerson childPerson
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>Person</code> ãšããã«ã¹ã¿ã ããŒã¿åãå®çŸ©ãã<code>Adult</code> ãš <code>Child</code> ãšãã2ã€ã®ã±ãŒã¹ãæã€åãäœæããŠããŸãã<code>Adult</code> ãš <code>Child</code> ã¯ããããååãšå¹Žéœ¢ã®æ
å ±ãä¿æããŸãã
ãããŠã<code>describePerson</code> é¢æ°ã§ã¯ã<code>match</code> ã䜿ã£ãŠ <code>Person</code> ã€ã³ã¹ã¿ã³ã¹ãåæããŠããŸãã
* <code>Adult</code> ã±ãŒã¹ã§ã¯ã<code>age</code> ã 18æ³ä»¥äžã®å Žåã"倧人" ãšããŠãã®äººç©ã®æ
å ±ã衚瀺ããŸãã
* <code>Child</code> ã±ãŒã¹ã§ã¯ã<code>age</code> ã 18æ³æªæºã®å Žåã"åäŸ" ãšããŠãã®äººç©ã®æ
å ±ã衚瀺ããŸãã
* äžèšã®ã©ã¡ãã«ãäžèŽããªãå Žåã"æ
å ±ããããŸãã" ãšè¡šç€ºããŸãã
ãã®äŸã§ã¯ãã«ã¹ã¿ã ããŒã¿åãã¬ãŒãæ¡ä»¶ïŒ<code>when</code> æ¡ä»¶ïŒã䜿çšããŠãããè€éãªãã¿ãŒã³ãããã³ã°ãè¡ã£ãŠããŸããããã«ãããç¹å®ã®æ¡ä»¶ã«åºã¥ããŠããŒã¿ã詳现ã«åæã»åŠçããããšãã§ããŸãã
===== ãã¬ãŒã¹ãã«ã㌠=====
F#ã«ããããã¬ãŒã¹ãã«ããŒã¯ããã¿ãŒã³ãããã³ã°ãé¢æ°ã®äžéšã眮ãæããããã®ç¹å¥ãªæ§æã§ããäž»ã«2ã€ã®å Žæã§äœ¿çšãããŸãã
====== é¢æ°å
ã®ãã¬ãŒã¹ãã«ã㌠======
é¢æ°å
㧠<code>_</code> ã䜿ãããšã§ãç¡èŠãããåŒæ°ã瀺ãããšãã§ããŸãã
äŸãã°ã次ã®é¢æ°ã¯åŒæ°ãç¡èŠããŠ"Hello"ãšããæååãè¿ããŸãã
:<syntaxhighlight lang=f#>
let sayHello _ = "Hello"
</syntaxhighlight>
ããã§ã® <code>_</code> ã¯é¢æ°ã«æž¡ãããåŒæ°ãç¡èŠãããã¬ãŒã¹ãã«ããŒãšããŠæ©èœããŸããé¢æ°ã®äžã§ãã®åŒæ°ã䜿ããªãå Žåã«äŸ¿å©ã§ãã
====== ãã¿ãŒã³ãããã³ã°ã§ã®ãã¬ãŒã¹ãã«ã㌠======
<code>match</code> åŒã®äžã§ <code>_</code> ã䜿ãããšã§ãç¹å®ã®ãã¿ãŒã³ã«ããããããã®ãç¡èŠããããšãã§ããŸãã
äŸãã°ã以äžã®äŸã§ã¯ã0ãã9ãŸã§ã®æ°å€ãããããããç¹å®ã®æ°å€ã«å¯ŸããŠç¹å®ã®åŠçãè¡ããŸããããã以å€ã®æ°å€ã¯ç¡èŠããŸãã
:<syntaxhighlight lang=f#>
let describeNumber number =
match number with
| 0 -> printfn "ãŒãã§ã"
| n when n > 0 && n < 10 -> printfn "%dã¯1æ¡ã®æ£ã®æ°ã§ã" n
| _ -> () // ãã以å€ã®æ°å€ã¯ç¡èŠãã
</syntaxhighlight>
ããã§ã¯ã<code>_</code> ã¯ãã以å€ã®ãã¹ãŠã®ãã¿ãŒã³ã«ãããããŸãããã®å ŽåãäœãåŠçãããã«åã« <code>()</code>ïŒãŠãããåã®å€ïŒãè¿ããŸãããã®ãããªäœ¿ãæ¹ã§ãç¹å®ã®ã±ãŒã¹ä»¥å€ã®ãã¿ãŒã³ãç¡èŠããããšãã§ããŸãã
===== LINQ =====
F#ã§ãLINQïŒLanguage Integrated QueryïŒã䜿çšããããšãã§ããŸããLINQã¯C#ãVB.NETã§ç¹ã«åºã䜿ãããŠããŸãããF#ã§ãåæ§ã®ã¯ãšãªèšèªã䜿ã£ãŠããŒã¿ãæäœããããšãå¯èœã§ãã
F#ã§ã¯ãã·ãŒã±ã³ã¹ãã³ã¬ã¯ã·ã§ã³ã«å¯ŸããŠã¯ãšãªãæžãããã®ã¯ãšãªåŒã䜿çšããŸãã以äžã¯LINQã®ãããªã¯ãšãªã䜿ã£ãäŸã§ãã
:<syntaxhighlight lang=f#>
// ã·ãŒã±ã³ã¹ã®ãã£ã«ã¿ãªã³ã°ãšãããã³ã°
let numbers = [| 1; 2; 3; 4; 5 |]
let result =
query {
for number in numbers do
where (number % 2 = 0)
select (number * number)
}
result |> Seq.iter (printfn "%d")
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>query</code> ãã¿ãŒã³ã䜿ã£ãŠ<code>numbers</code> é
åã®å¶æ°ã®èŠçŽ ããã£ã«ã¿ãªã³ã°ãããããã®æ°å€ãèªä¹ããŠããŸããF#ã§ã¯ãã¯ãšãªåŒã䜿ã£ãŠããŒã¿ããã£ã«ã¿ãªã³ã°ããããã³ã°ããœãŒããã°ã«ãŒãåãªã©ã®æäœãè¡ãããšãã§ããŸãã
==== äŸå€åŠç ====
F# ã§ã¯ãtry/with æ§æã䜿ã£ãŠäŸå€åŠçãè¡ãããšãã§ããŸãã
:<syntaxhighlight lang=f#>
try
// äŸå€ãçºçãããåŠçãèšè¿°ãã
with
// äŸå€ãçºçããå Žåã®åŠçãèšè¿°ãã
</syntaxhighlight>
äŸãã°ãå²ãç®ãè¡ãé¢æ°ãå®çŸ©ãããšä»¥äžã®ããã«ãªããŸãã
:<syntaxhighlight lang=f#>
let divide a b =
try
a / b
with
| :? System.DivideByZeroException -> 0
</syntaxhighlight>
第 1 åŒæ°ã第 2 åŒæ°ã§å²ããæŽæ°ã®çµæãè¿ããŸãããã ãã第 2 åŒæ°ã 0 ã®å Žåã¯äŸå€ãçºçãã0 ãè¿ããŸãã
=== ãªããžã§ã¯ãæåããã°ã©ãã³ã° ===
==== ã¯ã©ã¹ã®ç¶æ¿ ====
F#ã§ãã¯ã©ã¹ã®ç¶æ¿ã¯å¯èœã§ããF#ã¯.NETã®èšèªã©ã³ã¿ã€ã ã®äžéšã§ããããã®ã©ã³ã¿ã€ã ã«ããããªããžã§ã¯ãæåã®æ©èœãå©çšããããšãã§ããŸãã
以äžã¯ãF#ã§ã¯ã©ã¹ã®ç¶æ¿ãè¡ãäŸã§ãã
:<syntaxhighlight lang=f#>
type Person(name: string, age: int) =
member this.Name = name
member this.Age = age
// Person ã¯ã©ã¹ãç¶æ¿ãã Customer ã¯ã©ã¹ã®å®çŸ©
type Customer(name: string, age: int, customerId: int) =
inherit Person(name, age)
member this.CustomerId = customerId
// Customer ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãäœæ
let customer1 = Customer("Alice", 30, 12345)
// ç¶æ¿å
ã®ã¡ã³ããŒãžã®ã¢ã¯ã»ã¹
printfn "Name: %s, Age: %d" customer1.Name customer1.Age
// Customer ã¯ã©ã¹ã®ç¬èªã®ã¡ã³ããŒãžã®ã¢ã¯ã»ã¹
printfn "Customer ID: %d" customer1.CustomerId
</syntaxhighlight>
äžèšã®äŸã§ã¯ã<code>Person</code> ã¯ã©ã¹ãç¶æ¿ãã <code>Customer</code> ã¯ã©ã¹ãå®çŸ©ããŠããŸãã<code>inherit</code> ããŒã¯ãŒãã䜿çšã㊠<code>Person</code> ã¯ã©ã¹ãç¶æ¿ãã<code>Customer</code> ã¯ã©ã¹ã®ç¬èªã®ã¡ã³ããŒã§ãã <code>CustomerId</code> ãè¿œå ããŠããŸãã
F#ã§ã¯ãªããžã§ã¯ãæåããã°ã©ãã³ã°ããµããŒããããŠãããã¯ã©ã¹ã®ç¶æ¿ãããªã¢ãŒãã£ãºã ãªã©ã®æ©èœãå©çšããããšãã§ããŸãã
==== ãããã¿ã€ãããŒã¹çãªææ³ ====
F#ã¯ããããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåèšèªãšããŠã¯äžè¬çã§ã¯ãããŸããããäžéšã®ãããã¿ã€ãããŒã¹ã®ç¹æ§ãæš¡å£ããæ¹æ³ããããŸãããããã¿ã€ãããŒã¹ã®èšèªã§ã¯ããªããžã§ã¯ãã¯å¥ã®ãªããžã§ã¯ãããããã¿ã€ããšããŠäœ¿çšãããã®ãããã¿ã€ãã®ç¹æ§ãç¶æ¿ããããåçã«å€æŽãããã§ããŸãã
F#ã§ã¯ã<code>ResizeArray</code>ïŒå¯å€ãµã€ãºã®é
åãè¡šãã¯ã©ã¹ïŒããF#ã®ã¬ã³ãŒãåã®ãããªæ§é ãå©çšããŠããããã¿ã€ãã®ç¹æ§ã«è¿ããã®ãæš¡å£ããããšãã§ããŸãããã ããJavaScriptã®ãããªå®å
šãªãããã¿ã€ãããŒã¹ã®æåãåçŸããããšã¯é£ãããããããŸããã
以äžã¯ãF#ã®ã¬ã³ãŒãåã䜿ã£ãŠãããã¿ã€ãã®ç¹æ§ãè¿äŒŒããäŸã§ãã
:<syntaxhighlight lang=f#>
type Prototype = {
Name: string
Age: int
}
// ãããã¿ã€ããšããŠã®ãªããžã§ã¯ããäœæ
let prototype = { Name = "Prototype"; Age = 30 }
// æ°ãããªããžã§ã¯ãããããã¿ã€ããåºã«ããŠäœæ
let obj1 = { prototype with Name = "Object 1" }
// å¥ã®ãªããžã§ã¯ãããããã¿ã€ããåºã«ããŠäœæ
let obj2 = { prototype with Name = "Object 2"; Age = 25 }
// ãªããžã§ã¯ãã®æ
å ±ã衚瀺
printfn "Prototype: %s, %d" prototype.Name prototype.Age
printfn "Object 1: %s, %d" obj1.Name obj1.Age
printfn "Object 2: %s, %d" obj2.Name obj2.Age
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>Prototype</code> ãšããã¬ã³ãŒãåãäœæããããããããã¿ã€ããšããŠæ±ããŸãã<code>with</code> ããŒã¯ãŒãã䜿ã£ãŠãããã¿ã€ããåºã«æ°ãããªããžã§ã¯ããäœæããŠããŸãããã ããããã¯å®å
šãªãããã¿ã€ãããŒã¹ã®æåã§ã¯ãªããåãªãã¬ã³ãŒãåã®ç¹æ§ãå©çšããŠè¿äŒŒãããã®ã§ãã
=== é¢æ°ã®å®çŸ© ===
F#ã«ãããé¢æ°å®çŸ©ã®äžè¬çãªæžåŒã¯ä»¥äžã®éãã§ãã
:<syntaxhighlight lang=f#>
let é¢æ°å åŒæ°1 åŒæ°2 ... åŒæ°n =
é¢æ°ã®åŠç
</syntaxhighlight>
:<syntaxhighlight lang=f#>
// åŒæ°ã2ã€ã®å Žåã®å ç®é¢æ°ãå®çŸ©ããäŸ
let add x y = x + y
// åŒæ°ã2ã€ã®å Žåã®æžç®é¢æ°ãå®çŸ©ããäŸ
let subtract x y = x - y
// åŒæ°ã3ã€ã®å Žåã®æ倧å€ãæ±ããé¢æ°ãå®çŸ©ããäŸ
let max3 x y z = max x (max y z)
</syntaxhighlight>
ãããã®äŸã䜿ã£ãŠã次ã«ç€ºãããã«é¢æ°ãåŒã³åºãããšãã§ããŸãã
:<syntaxhighlight lang=f#>
let result1 = add 2 3 // 5ãè¿ããã
let result2 = subtract 5 3 // 2ãè¿ããã
let result3 = max3 7 3 9 // 9ãè¿ããã
</syntaxhighlight>
==== ååž°çåŒåºããè¡ã é¢æ°ã®å®çŸ© ====
F#ã§ååž°é¢æ°ãå®çŸ©ããå Žåã¯ã以äžã®æžåŒã®ããã« rec ããŒã¯ãŒãã䌎ã£ãŠå®çŸ©ããŸãã
:<syntaxhighlight lang=f#>
let rec é¢æ°å åŒæ°ãªã¹ã =
// ããŒã¹ã±ãŒã¹ïŒååž°ãçµäºããæ¡ä»¶ïŒã®åŠç
if ããŒã¹ã±ãŒã¹ then
// åŠç
// ååž°ã¹ãããã®åŠç
else
// åŠç
é¢æ°å å€æŽãããåŒæ°ãªã¹ã
</syntaxhighlight>
ããšãã°ã0ããnãŸã§ã®èªç¶æ°ã®åãèšç®ãã以äžã®ååž°é¢æ°ãå®çŸ©ããå Žåã¯ã以äžã®ããã«æžããŸãã
:<syntaxhighlight lang=f#>
let rec sum n =
if n <= 0 then
0
else
n + sum (n - 1)
</syntaxhighlight>
ãã®é¢æ°ã䜿ã£ãŠãäŸãã°sum 5ãè©äŸ¡ãããšã1 + 2 + 3 + 4 + 5 = 15ãè¿ãããŸãã
=== ã¢ãžã¥ãŒã« ===
F#ã®ã¢ãžã¥ãŒã«ã¯ãF#ã³ãŒãã®åå©çšå¯èœãªåäœã§ãããé¢æ°ãåãå€æ°ãããã³ãã®ä»ã®èŠçŽ ãå«ãããšãã§ããŸããã¢ãžã¥ãŒã«ã¯ãF#ã³ãŒãã®æ§é åãããçµç¹åãå¯èœã«ããã³ãŒãã®èªã¿ããããä¿å®æ§ãããã³åå©çšæ§ãåäžãããŸããã¢ãžã¥ãŒã«ã¯ãã³ãŒãã®äžéšãé ãããšãã§ããã«ãã»ã«åãå®çŸããããšãã§ããŸããF#ã®ã¢ãžã¥ãŒã«ã¯ãå¥ã®F#ããã°ã©ã ã.NETã¢ããªã±ãŒã·ã§ã³ã§äœ¿çšããããšãã§ããŸãã
:<syntaxhighlight lang=f#>
// ã¢ãžã¥ãŒã«å®£èš
module MyModule =
// é¢æ°å®£èš
let add x y = x + y
let subtract x y = x - y
</syntaxhighlight>
äžèšã®äŸã§ã¯ãMyModuleãšããååã®ã¢ãžã¥ãŒã«ã宣èšããŠããŸãããã®ã¢ãžã¥ãŒã«å
ã«ã¯ãaddãšsubtractãšããé¢æ°ãå®çŸ©ãããŠããŸããaddé¢æ°ã¯2ã€ã®åŒæ°ãåãåããããããå ç®ããçµæãè¿ããŸããsubtracté¢æ°ã¯åæ§ã«2ã€ã®åŒæ°ãåãåããããããæžç®ããçµæãè¿ããŸãã
ãã®ããã«ã¢ãžã¥ãŒã«ãå©çšããå Žåã¯ã以äžã®ããã«ä»ã®ãã¡ã€ã«ã§ã€ã³ããŒãããŠäœ¿çšããããšãã§ããŸãã
:<syntaxhighlight lang=f#>
// å¥ãã¡ã€ã«ã§ã®ã¢ãžã¥ãŒã«ã®ã€ã³ããŒã
open MyModule
// ã¢ãžã¥ãŒã«å
ã®é¢æ°ã®äœ¿çšäŸ
let result1 = add 3 4 // 7
let result2 = subtract 5 2 // 3
</syntaxhighlight>
ããã§ã¯ãMyModuleã¢ãžã¥ãŒã«ãopenããŠä»ã®ãã¡ã€ã«ããã¢ã¯ã»ã¹ããããšãã§ããããã«ãªã£ãŠããŸãããããŠãaddãšsubtractãšããé¢æ°ãåŒã³åºããŠããŸãããããã®é¢æ°ã¯ãããããåŒæ°ãäžããããšã§ãå ç®ããã³æžç®ã®çµæãååŸããããšãã§ããŸãã
=== çšèªé ===
# ã³ã³ãã€ã© (compiler)ïŒé«æ°Žæºã®ããã°ã©ã ãæ©æ¢°èªã«å€æãããœãããŠã§ã¢
# ã©ã³ã¿ã€ã ç°å¢ (runtime environment)ïŒããã°ã©ã ãå®è¡ãããå Žæã§ãå¿
èŠãªã©ã€ãã©ãªãé¢æ°ãæäŸããã¡ã¢ãªãCPUã管çããä»çµã¿
# ãã«ããã©ãã€ã èšèª (multi-paradigm language)ïŒè€æ°ã®ããã°ã©ãã³ã°ãã©ãã€ã ãçµã¿åãããèšèªã§ãæç¶ãåãé¢æ°åããªããžã§ã¯ãæåãªã©ããã
# é¢æ°åããã°ã©ãã³ã° (functional programming)ïŒé¢æ°ãåŒæ°ãæ»ãå€ãªã©ãçšããŠããã°ã©ãã³ã°ãè¡ããã©ãã€ã
# ã·ãŒã±ã³ã¹ (sequence)ïŒèŠçŽ ãé ã«äžŠã¶ããŒã¿æ§é ã®ããšãF#ã§ã¯ããªã¹ããé
åãã·ãŒã±ã³ã¹åŒãªã©ããã
# ãã¿ãŒã³ãããã³ã° (pattern matching)ïŒæå®ãããã¿ãŒã³ã«äžèŽããããŒã¿ãåŠçããããã®æ¹æ³ã§ãF#ã§ã¯matchåŒãçšãããã
# å€æ°æçž (variable binding)ïŒå€æ°ã«å€ãå²ãåœãŠãããé¢æ°ã®åŒæ°ãæ»ãå€ãæå®ãããããæäœãF#ã§ã¯letåŒãçšãããã
# ãªãã·ã§ã³å (option type)ïŒå€ãæã€ãã©ããããããªãå Žåã«äœ¿çšããåã§ãSomeå€ãŸãã¯Noneå€ãåããF#ã§ã¯ãªãã·ã§ã³åãçšãããã
# åæšè« (type inference)ïŒã³ã³ãã€ã©ããå€æ°ãé¢æ°ãªã©ã®åãèªåçã«å°åºããæ©èœãF#ã§ã¯åæšè«ã匷åã«ãµããŒããããŠãã
# åã¢ãããŒã·ã§ã³ (type annotation)ïŒå€æ°ãé¢æ°ãªã©ã«ãæ瀺çã«åãæå®ããèšè¿°æ¹æ³ãF#ã§ãåã¢ãããŒã·ã§ã³ãå¯èœã§ãã
== F#ã®ããŒã¿å ==
F#ã«ã¯ã以äžã®ãããªããŒã¿åããããŸãã
# ããªããã£ã( Primitive Types )
#* int: æŽæ°å€
#* float: æµ®åå°æ°ç¹æ°
#* bool: çåœå€
#* char: æå
#* string: æåå
# ã¿ãã«( Tuple Types )
## 2ã€ä»¥äžã®å€ããŸãšããŠæ±ã
## åã®ç°ãªãå€ããŸãšãããã
# ã³ã¬ã¯ã·ã§ã³
## ãªã¹ã( List Types )ïŒèŠçŽ ãäœããã®é åºã§æ ŒçŽãããå¯å€é·ã®ãªã¹ã
### èŠçŽ ãåãåã§æ§æãããã·ãŒã±ã³ã¹å
### ååž°çãªå®çŸ©ãå¯èœ
## ã·ãŒã±ã³ã¹( Sequence Types )ïŒåäžã®åãæã€èŠçŽ ã®é£ãªã
### å¶çŽã®ãªããæ§ã
ãªå€ãèŠçŽ ãšããã·ãŒã±ã³ã¹å
### ç¡éãªã¹ãããžã§ãã¬ãŒã¿ãŒã«äœ¿çšããã
## é
å( Array Types )ïŒèŠçŽ ãäœããã®é åºã§æ ŒçŽãããåºå®é·ã®é
å
### èŠçŽ ãåãåã®ã³ã¬ã¯ã·ã§ã³å
### ã€ã³ããã¯ã¹ã«ããã©ã³ãã ã¢ã¯ã»ã¹ãå¯èœ
## éå( Set Types )ïŒé åºã®ãªãäžæã®èŠçŽ ã®éå
## é£æ³é
å( Map Types )ïŒé åºã®ãªãããŒãšå€ã®ãã¢ã®éå
# ãŠãŒã¶ãŒå®çŸ©å
## ã¬ã³ãŒã( Record Types )
### ãã£ãŒã«ãåãšå€ãããªãæ§é äœã®ãããªå
### ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã«ãããã¯ã©ã¹ãšäŒŒãæ¯ãèãããã
## ã¯ã©ã¹
## å
±çšäœ( Discriminated Union Types)
### åãããŒã¿ã®éåãè¡šãå
### ã©ãã«ä»ãã®å€ã䜿ã£ãŠãããããåå®å
šãªãã£ã¹ããããå¯èœ
### æ§æèŠçŽ ã®çš®é¡ããšã«ç°ãªãæ¯ãèããããããšãã§ãã
## ã€ã³ã¿ãŒãã§ã€ã¹
## åæå
以äžã F# ã§æäŸãããããŒã¿åã®çš®é¡ã«ãªããŸãã
=== ã¿ãã« ===
F#ã®ã¿ãã«ã«ã¯ä»¥äžã®ãããªç¹åŸŽããããŸãã
# è€æ°ã®å€ãäžã€ã®ãªããžã§ã¯ãã«ãŸãšããããšãã§ããŸãã
# ã¿ãã«å
ã®å€ã®åãæ°ã¯åºå®ãããŠããŸãã
# ã¿ãã«ã¯ä»ã®ãªããžã§ã¯ããšåæ§ã«å€æ°ã«å²ãåœãŠãããšãã§ããŸãã
ãŸããF#ã®ã¿ãã«ã¯ä»¥äžã®ãããªäœ¿ãæ¹ãã§ããŸãã
ã¿ãã«ã®å€ãå€æ°ã«ä»£å
¥ããããšãã§ããŸãã
:<syntaxhighlight lang=f#>
let person = ("John Doe", 30)
let name, age = person
printfn "Name: %s, Age: %d" name age
</syntaxhighlight>
;å®è¡çµæ:<syntaxhighlight lang=text>
Name: John Doe, Age: 30
</syntaxhighlight>
ã¿ãã«ãé¢æ°ã®æ»ãå€ãšããŠäœ¿çšããããšãã§ããŸãã
:<syntaxhighlight lang=f#>
let addNumbers a b = (a + b, a * b)
let result = addNumbers 4 5
printfn "Sum: %d, Product: %d" (fst result) (snd result)
</syntaxhighlight>
;å®è¡çµæ:<syntaxhighlight lang=text>
Sum: 9, Product: 20
</syntaxhighlight>
ã¿ãã«ããªã¹ãã®èŠçŽ ãšããŠäœ¿çšããããšãã§ããŸãã
:<syntaxhighlight lang=f#>
let people = [("John Doe", 30); ("Jane Smith", 25)]
for person in people do
printfn "Name: %s, Age: %d" (fst person) (snd person)
</syntaxhighlight>
;å®è¡çµæ:<syntaxhighlight lang=text>
Name: John Doe, Age: 30
Name: Jane Smith, Age: 25
</syntaxhighlight>
以äžãF#ã®ã¿ãã«ã«é¢ããæ©èœã®äžéšã§ãã
=== ãªãã·ã§ã³ ===
F#ã®Optionåã¯ãå€ãååšããå Žåãšååšããªãå Žåã®2ã€ã®ç¶æ
ãè¡šãããã«äœ¿çšãããŸããOptionåã¯F#æšæºã©ã€ãã©ãªã®äžéšã§ããã以äžã®ããã«å®çŸ©ãããŸãã
:<syntaxhighlight lang=f#>
type Option<'T> =
| None
| Some of 'T
</syntaxhighlight>
<code>'T</code>ã«ã¯ä»»æã®åãæå®ããããšãã§ããŸããäŸãã°ã<code>Option<int></code>ã¯æŽæ°åã®å€ãååšããå Žåãšååšããªãå Žåã®2ã€ã®ç¶æ
ãè¡šçŸããããã«äœ¿çšããããšãã§ããŸãã
Optionåã«ã¯ãå€ãååšãããã©ããã確èªããããã«äœ¿çšã§ããé¢æ°ãçšæãããŠããŸãã以äžã«ãã®äŸã瀺ããŸãã
ç¯å²ãæã€å€ãè¿ãå ŽåãOptionåã䜿çšããããšãäžè¬çã§ãã以äžã®äŸã¯ãæååãæ°å€ã§ããå Žåã«ãã®æ°å€ãè¿ãããã以å€ã®å Žåã¯<code>None</code>ãè¿ããŸãã
:<syntaxhighlight lang=f#>
let parseInt s =
match System.Int32.TryParse s with
| true, n -> Some n
| _ -> None
</syntaxhighlight>
ããã䜿ã£ãŠã<code>"10"</code>ã®å€ã解æãããšãçµæã¯<code>Some 10</code>ã«ãªããŸãã<code>"abc"</code>ã®ããã«è§£æã§ããªãå€ã®å Žåã¯ã<code>None</code>ãè¿ãããŸãã
Optionåã䜿çšãããšãNullãã€ã³ã¿äŸå€ãªã©ã®ãã°ãé²ãããšãã§ããŸããããããããã°ã©ããŒãæåã§Optionåãæ±ãããã®ã³ãŒããæžãå¿
èŠããããããå€å°é¢åãªé¢ããããŸãã
以äžã¯ãOptionåã®äž»ãªæäœã§ãã
* <code>None</code> : Optionåã®å€ãååšããªãããè¡šçŸããã
* <code>Some</code> : Option[removed]åã®å€ãTåã®å€ãååšããããè¡šçŸããã
* <code>Option.isNone</code> : Optionåã®å€ã<code>None</code>ã§ããããšãå€å®ããã
* <code>Option.isSome</code> : Optionåã®å€ã<code>Some</code>ã§ããããšãå€å®ããã
* <code>Option.defaultValue</code> : Optionåã®å€ã<code>None</code>ã§ããå Žåã«ãããã©ã«ãå€ãäžããã
* <code>Option.get</code> : Option[removed]åã®å€ã<code>Some</code>ã§ããå Žåã«ããã®äžã®å€ãååŸããïŒ<code>None</code>ã®å Žåã¯ãšã©ãŒïŒã
* <code>Option.tryGetValue</code> : Option[removed]åã®å€ã<code>Some</code>ã§ããå Žåã«ããã®äžã®å€ãštrueãååŸããããã ãã<code>None</code>ã®å Žåã«ã¯ãããã©ã«ãå€ãšfalseãè¿ãã
* <code>Option.map</code> : Option[removed]åã®å€ã<code>Some</code>ã§ããå Žåã«ããã®äžã®å€ã«å¯ŸããŠé¢æ°ãé©çšããæ°ããOptionåãçæããã
* <code>Option.bind</code> : Option[removed]åã®å€ã<code>Some</code>ã§ããå Žåã«ããã®äžã®å€ã«å¯ŸããŠé¢æ°ãé©çšããæ°ããOptionåãçæããã
* <code>Option.tryWith</code> : Option[removed]åã®å€ã<code>Some</code>ã§ããå Žåã«ããã®äžã®å€ãåŒæ°ãšããé¢æ°ãé©çšããããã ãã<code>None</code>ã®å Žåã¯ãããã©ã«ãå€ãè¿ãã
=== ã³ã¬ã¯ã·ã§ã³ ===
以äžã¯F#ã®ã³ã¬ã¯ã·ã§ã³ãšäž»ãªã¡ãœããã衚圢åŒã§ãŸãšãããã®ã§ãã
:{| class="wikitable"
|+ F# ã®ã³ã¬ã¯ã·ã§ã³ãšã¡ãœãã
!
!List
!Seq
!Array
!Set
!Map
|-
|length/count
|<code>List.length</code>
|<code>Seq.length</code>
|<code>Array.length</code>
|<code>Set.Count</code>
|<code>Map.Count</code>
|-
|append
|<code>@</code>
|<code>Seq.append</code>
|<code>Array.append</code>
| -
| -
|-
|head
|<code>List.head</code>
|<code>Seq.head</code>
|<code>Array.head</code>
|<code>Set.minElement</code>
|<code>Map.minValue</code>
|-
|tail
|<code>List.tail</code>
|<code>Seq.tail</code>
|<code>Array.tail</code>
|<code>Set.remove</code>
|<code>Map.remove</code>
|-
|init
|<code>List.init</code>
|<code>Seq.init</code>
|<code>Array.init</code>
| -
| -
|-
|take
|<code>List.take</code>
|<code>Seq.take</code>
|<code>Array.sub</code>
|<code>Set.takeWhile</code>
|<code>Map.filter</code>
|-
|drop
|<code>List.drop</code>
|<code>Seq.drop</code>
|<code>Array.sub</code>
|<code>Set.skipWhile</code>
|<code>Map.filter</code>
|-
|filter
|<code>List.filter</code>
|<code>Seq.filter</code>
|<code>Array.filter</code>
|<code>Set.filter</code>
|<code>Map.filter</code>
|-
|map
|<code>List.map</code>
|<code>Seq.map</code>
|<code>Array.map</code>
|<code>Set.map</code>
|<code>Map.map</code>
|-
|fold
|<code>List.fold</code>
|<code>Seq.fold</code>
|<code>Array.fold</code>
|<code>Set.fold</code>
|<code>Map.fold</code>
|}
äžèšã®è¡šã§ã¯ãåè¡ãã¡ãœãããååãã³ã¬ã¯ã·ã§ã³ãè¡šããŠããŸããããšãã°ã<code>List</code>ãšããåã«ãã<code>length/count</code>ãšããã»ã«ã¯ããªã¹ãã®èŠçŽ æ°ãååŸããããã®ã¡ãœããã§ãã<code>List.length</code>ã«å¯Ÿå¿ããŠããŸããåæ§ã«ã<code>Seq</code>ãšããåã«ãã<code>map</code>ãšããã»ã«ã¯ãã·ãŒã±ã³ã¹ã®èŠçŽ ã«é¢æ°ãé©çšããæ°ããã·ãŒã±ã³ã¹ãäœæããããã®<code>Seq.map</code>ã¡ãœããã«å¯Ÿå¿ããŠããŸãã
==== ãªã¹ã ====
F#ã«ãããŠããªã¹ãã¯éåžžã«éèŠãªããŒã¿æ§é ã§ããF#ã®ãªã¹ãã¯äžå€ãªäžé£ã®å€ã®ã·ãŒã±ã³ã¹ã§ãããã¢ã€ãã ãè¿œå ãåé€ãå€æŽã§ããŸããã
ãã ããæ°ãããªã¹ããäœæããããšã§ãæ¢åã®ãªã¹ãããèŠçŽ ãåé€ããããèŠçŽ ãè¿œå ãããããããšãã§ããŸãã
F#ã®ãªã¹ãã¯ããã¿ãŒã³ãããã³ã°ã«ãã£ãŠåŠçãããããšããããããŸããããšãã°ã次ã®ããã«ããŠããªã¹ãã®å
é èŠçŽ ãšæ®ãã®ãªã¹ããååŸããããšãã§ããŸãã
:<syntaxhighlight lang=f#>
let lst = [1; 2; 3; 4]
match lst with
| head :: tail -> printfn "Head: %i, Tail: %A" head tail
| [] -> printfn "Empty list"
</syntaxhighlight>
ãŸããF#ã®ãªã¹ãã¯é
延è©äŸ¡ããããããå¿
èŠã«å¿ããŠèŠçŽ ãçæããããã«äœ¿çšããããšãã§ããŸããããšãã°ã次ã®é¢æ°ã¯ãäžããããæŽæ°ã«å¯ŸããçŽ æ°ãæã€ç¡éãªã¹ããçæããŸãã
:<syntaxhighlight lang=f#>
let rec isPrime n =
match n with
| 1 -> false
| 2 -> true
| _ ->
let limit = int(sqrt(double(n))) + 1
[2..limit] |> List.forall (fun x -> n % x <> 0)
let rec primes =
Seq.unfold(fun state -> Some (state, state + 1)) 2
|> Seq.filter isPrime
|> Seq.cache
|> Seq.toList
</syntaxhighlight>
F#ã®ãªã¹ãã¯ãé«éé¢æ°ãšäžç·ã«äœ¿çšããããšãã§ããå ŽåããããŸããç¹ã«ãList.mapãList.filterãList.foldãªã©ã®é¢æ°ã¯ããªã¹ãã®èŠçŽ ã«å¯ŸããŠå€æããã£ã«ã¿ãªã³ã°ãç³ã¿èŸŒã¿æäœãå®è¡ããããã«äœ¿çšããããšãã§ããŸãã
:<syntaxhighlight lang=f#>
let lst = [1; 2; 3; 4]
let square a = a * a
let squares = lst |> List.map square
let even a = a % 2 = 0
let evens = lst |> List.filter even
let sum a b = a + b
let total = lst |> List.fold sum 0
</syntaxhighlight>
ãããã®äŸã¯ãF#ã®ãªã¹ãã«é¢ããæ©èœã®äžéšã§ãããF#ã®ãªã¹ãã¯éåžžã«åŒ·åã§ãå€ãã®å€åœ©ãªæäœãå®è¡ããããšãã§ããŸãã
==== ã·ãŒã±ã³ã¹ ====
F#ã®ã·ãŒã±ã³ã¹ã«ã¯ãéåžžã«å€ãã®æ©èœããããŸãã以äžã«ããã€ãã®äŸãæããŠã¿ãŸãã
; ã·ãŒã±ã³ã¹ã®å®çŸ©
:ã·ãŒã±ã³ã¹ã¯ã<code>seq<'a></code>åã§å®çŸ©ãããŸããå
·äœçã«ã¯ã以äžã®ããã«æžãããšãã§ããŸãã
:<syntaxhighlight lang=f#>
let mySeq = seq { 1; 2; 3 }
</syntaxhighlight>
ããã«ãããmySeqã¯1ãã3ãŸã§ã®æŽæ°ãå«ãã·ãŒã±ã³ã¹ãšããŠå®çŸ©ãããŸãã
; ã·ãŒã±ã³ã¹ã®æäœ
: F#ã®ã·ãŒã±ã³ã¹ã«ã¯ããã£ã«ã¿ãªã³ã°ãå€æãçµã¿åãããªã©ã®æäœãè¡ãããã®å€ãã®é¢æ°ããããŸããäŸãã°ã以äžã®ãããªé¢æ°ããããŸãã
* <code>Seq.filter</code>: æ¡ä»¶ã«åããªãèŠçŽ ãåãé€ããŸãã
* <code>Seq.map</code>: åèŠçŽ ãå€æããŸãã
* <code>Seq.reduce</code>: ã·ãŒã±ã³ã¹ã®äžéšãŸãã¯ãã¹ãŠãåäžã®å€ã«éçŽããŸãã
* <code>Seq.append</code>: 2ã€ã®ã·ãŒã±ã³ã¹ãé£çµããŸãã
* <code>Seq.zip</code>: 2ã€ã®ã·ãŒã±ã³ã¹ããã¢ã«ããŸãã
; ã·ãŒã±ã³ã¹ã®é
延è©äŸ¡
: F#ã®ã·ãŒã±ã³ã¹ã¯ãé
延è©äŸ¡ã®ä»çµã¿ãæã£ãŠããŸããã€ãŸããå¿
èŠãªãšãã«èŠçŽ ãå®éã«ååŸãããŸããããšãã°ã以äžã®ããã«æžãããšãã§ããŸãã
:<syntaxhighlight lang=f#>
let nums = seq { for i in 1 .. 10 do yield i }
let even = nums |> Seq.filter (fun x -> x % 2 = 0)
printfn "%A" even
</syntaxhighlight>
ãã®å ŽåãevenãåºåãããŸã§ãnumsã®èŠçŽ ã¯å®éã«ã¯èšç®ãããŸãããå¿
èŠãªå Žåã«ã®ã¿èšç®ãããŸãã
以äžããF#ã®ã·ãŒã±ã³ã¹ã«é¢ããç°¡åãªèª¬æã§ãããã詳现ãªæ
å ±ã«ã€ããŠã¯ãF#ã®å
¬åŒããã¥ã¡ã³ããåç
§ããŠãã ããã
==== é
å ====
F#ã«ã¯ãæ§ã
ãªé
åãåŠçããããã®äŸ¿å©ãªçµã¿èŸŒã¿é¢æ°ãçšæãããŠããŸãã以äžã«ãé
åã«é¢ããããã€ãã®æ©èœã玹ä»ããŸãã
;é
åã®åæå
:æ°ããé
åãäœæããç¹å®ã®å€ã§åæåããããã«ãArray.inité¢æ°ã䜿çšããŸããäŸãã°ã次ã®ã³ãŒãã¯ãèŠçŽ æ°ã10ã§ããã¹ãŠã®èŠçŽ ã0ã§ããé
åãäœæããŸãã
:<syntaxhighlight lang=f#>
let array = Array.init 10 (fun _ -> 0)
</syntaxhighlight>
;é
åã®å€æ
:é
åã®åèŠçŽ ãå€æããããã«ãArray.mapé¢æ°ã䜿çšããŸããäŸãã°ã次ã®ã³ãŒãã¯ãarrayé
åã®ãã¹ãŠã®èŠçŽ ã«1ãå ããæ°ããé
åãäœæããŸãã
:<syntaxhighlight lang=f#>
let newArray = Array.map (fun x -> x + 1) array
</syntaxhighlight>
;é
åã®ãã£ã«ã¿ãªã³ã°
:é
åããããã€ãã®èŠçŽ ãåãåºãããå ŽåãArray.filteré¢æ°ã䜿çšããŸããäŸãã°ã次ã®ã³ãŒãã¯ãarrayé
åããå€ãå¶æ°ã®èŠçŽ ã®ã¿ãåãåºãæ°ããé
åãäœæããŸãã
:<syntaxhighlight lang=f#>
let evenArray = Array.filter (fun x -> x % 2 = 0) array
</syntaxhighlight>
;é
åã®ç³ã¿èŸŒã¿
:é
åãç³ã¿èŸŒãããã«ãArray.foldé¢æ°ã䜿çšããŸããäŸãã°ã次ã®ã³ãŒãã¯ãarrayé
åã®ãã¹ãŠã®èŠçŽ ã足ãåãããçµæãè¿ããŸãã
:<syntaxhighlight lang=f#>
let sum = Array.fold (fun acc x -> acc + x) 0 array
</syntaxhighlight>
以äžãF#ã®é
åã«é¢ããããã€ãã®æ©èœã玹ä»ããŸãããF#ã®é
åã«ã€ããŠè©³ããåŠã¶ã«ã¯ãF#ã®å
¬åŒããã¥ã¡ã³ããåç
§ããŠãã ããã
==== éå ====
F# ã® Set ã¯ãéè€ã®ãªãèŠçŽ ã®ã³ã¬ã¯ã·ã§ã³ãæ±ãããã®ããŒã¿æ§é ã§ãã以äžã«ããã€ãã®æ©èœã玹ä»ããŸãã
* Set ã®èŠçŽ ã¯èªåçã«ãœãŒããããŸãã
* åèŠçŽ ã¯äžæãªå€ã§ãããããSet ã¯éåæŒç®ãè¡ãã®ã«é©ããŠããŸãã2 ã€ã® Set ãžã®åéåãå·®éåãç©éåãåãããšãã§ããŸãã
* Set å
ã®èŠçŽ ã«ã¢ã¯ã»ã¹ããã«ã¯ãã€ãã¬ãŒã·ã§ã³ã«ããæ¹æ³ã䜿ããŸããSet ãã©ã ãåŒã§ãã£ã«ã¿ãªã³ã°ããããšãã§ããŸãã
* ç¹å®ã®èŠçŽ ã Set ããåé€ããã«ã¯ãSet ããã£ã«ã¿ãªã³ã°ããŠæ°ãã Set ãäœæããããšã§å®çŸã§ããŸãã
* Set ã®èŠçŽ ãè¿œå ããã«ã¯ãSet.add ã¡ãœããã䜿çšããŸãã
以äžã¯ãF# ã® Set ã䜿çšããäŸã§ãã
:<syntaxhighlight lang=f#>
// Set ã®äœæ
let set1 = Set.ofList [1;2;3;4;5]
let set2 = Set.ofList [4;5;6;7;8]
// éåæŒç®
let union = Set.union set1 set2
let diff = Set.difference set1 set2
let intersect = Set.intersect set1 set2
// Set ã®ãã£ã«ã¿ãªã³ã°
let filteredSet = set1 |> Set.filter (fun x -> x % 2 = 0)
// Set ããèŠçŽ ãåé€ãã
let removedSet = set1 |> Set.filter (fun x -> x <> 3)
// Set ã«èŠçŽ ãè¿œå ãã
let addedSet = Set.add 6 set1
</syntaxhighlight>
==== é£æ³é
å ====
F#ã®<code>Map</code>ã¯ãé£æ³é
åãè¡šçŸããããã®ããŒã¿æ§é ã§ãã以äžã«ããã®æ©èœãããã€ã玹ä»ããŸãã
* <code>Map</code>ã¯ãããŒãšå€ã®ãã¢ãæ ŒçŽããããšãã§ããŸããããŒã®åãšå€ã®åã¯ä»»æã®ãã®ã䜿çšã§ããŸãã
* <code>Map</code>ã¯ã€ãã¥ãŒã¿ãã«ãªããŒã¿æ§é ã§ãããæ°ãã<code>Map</code>ãäœæããå Žåãå
ã®<code>Map</code>ã¯å€æŽããããå€æŽç¹ã®ã¿ãæ°ãã<code>Map</code>ã«åæ ãããŸãã
* <code>Map.add</code>ã¡ãœããã¯ãæ¢åã®<code>Map</code>ã«æ°ããããŒãšå€ã®ãã¢ãè¿œå ããããšãã§ããŸããæ¢ã«ååšããããŒãæå®ãããå Žåã¯ãå€ãäžæžããããŸãã
* <code>Map.tryFind</code>ã¡ãœããã¯ãæå®ãããããŒã«å¯Ÿå¿ããå€ãè¿ããŸããããŒãååšããªãå Žåã¯<code>None</code>ãè¿ããŸãã
* <code>Map.fold</code>ã¡ãœããã¯ãæå®ãããé¢æ°ã<code>Map</code>ã®ãã¹ãŠã®ããŒãšå€ã®ãã¢ã«é©çšããçµæãè¿ããŸãã
:<syntaxhighlight lang=f#>
let map = Map.empty |> Map.add "one" 1 |> Map.add "two" 2
let map2 = map |> Map.add "two" 3
let value = map2 |> Map.tryFind "one"
let sum = map2 |> Map.fold (fun acc key value -> acc + value) 0
printfn "map: %A" map
printfn "map2: %A" map2
printfn "value: %A" value
printfn "sum: %d" sum
</syntaxhighlight>
<code>Map</code>ã®äœæã<code>Map.add</code>ã¡ãœããã®äœ¿çšã<code>Map.tryFind</code>ã¡ãœããã®äœ¿çšãããã³<code>Map.fold</code>ã¡ãœããã®äœ¿çšãè¡ã£ãŠããŸãã
=== ãŠãŒã¶ãŒå®çŸ©å ===
<!-- å€åå€ã§ãããããŠããŸããããã²ãšãŸãšãã«ããŸãã -->
F#ã®<code>type</code>æ§æã¯ãæè»ã§å€æ§ãªããŒã¿æ§é ãå®çŸ©ããããã®åŒ·åãªæ©èœã§ãã以äžã«ãã®æè»æ§ã瀺ãããã€ãã®äŸãæããŸãã
==== ã¬ã³ãŒã ====
F#ã«ãããã¬ã³ãŒãã¯ããã£ãŒã«ãã®éåã«ååãä»ããŠæ§é ãå®çŸ©ããããã®æ©èœã§ããF#ã®ã¬ã³ãŒãã¯ã.NETã®ã¯ã©ã¹ãšã¯ç°ãªããå€åïŒvalue typeïŒãšããŠå®çŸ©ãããŸãã
# F#ã®ã¬ã³ãŒãã¯ãC#ã®structã«çžåœããå€åã§ãã
# ã¬ã³ãŒãã¯ãforæãmatchåŒãªã©ã®ãã¿ãŒã³ãããã³ã°æ©èœã«ãã£ãŠãç°¡åã«æ±ãããšãã§ããŸãã
# ã¬ã³ãŒãã¯ããã£ãŒã«ãã®ããŒã·ã£ãªãã£ïŒpartialityïŒããµããŒãããŸããã€ãŸããã¬ã³ãŒãã®äžéšã ããæŽæ°ããããšãã§ããŸãã
# ã¬ã³ãŒãã¯ãF#ã®REPLïŒRead-Eval-Print LoopïŒã§ç°¡åã«æ€æ»ã§ããŸããäŸãã°ãããŒã·ã£ã«ãªã¬ã³ãŒããå®çŸ©ããå ŽåãREPLäžã§ã©ã®ãã£ãŒã«ããå®çŸ©ãããŠãããã確èªã§ããŸãã
# ã¬ã³ãŒãã¯ãåæšè«ã«ãã£ãŠãæ瀺çãªåæå®ãçç¥ã§ããŸãã
以äžã¯ãF#ã§ã¬ã³ãŒããå®çŸ©ããæ¹æ³ãšãã¬ã³ãŒãã䜿çšããæ¹æ³ã«ã€ããŠã®äŸã§ãã
:<syntaxhighlight lang=f#>
// ã¬ã³ãŒãã®å®çŸ©
type Person = {
Name : string
Age : int
}
// Personsé
å
let persons = [
{ Name = "Alice"; Age = 25 }
{ Name = "Bob"; Age = 30 }
{ Name = "Charlie"; Age = 35 }
]
// ã«ãŒãã§ã¬ã³ãŒãã䜿çšãã
for person in persons do
printfn "Name: %s, Age: %d" person.Name person.Age
</syntaxhighlight>
;å®è¡çµæ:<syntaxhighlight lang=text>
Name: Alice, Age: 25
Name: Bob, Age: 30
Name: Charlie, Age: 35
</syntaxhighlight>
ãã®äŸã§ã¯ãPersonãšããããŒã¿å(ã¬ã³ãŒã)ãå®çŸ©ããNameãšAgeãšãã2ã€ã®ãã£ãŒã«ããæãããŠããŸãããããŠã3人ã®äººç©æ
å ±ãå«ãpersonsãšããé
åãäœæããforã«ãŒãã䜿çšããŠpersonså
ã®å
šãŠã®äººã«é¢ããæ
å ±ã衚瀺ããŠããŸãã
----
<!--åæ£ããŠããã®ã§èŠåæ-->
:<syntaxhighlight lang=f#>
type Person = {
Name: string
Age: int
Email: string option
}
let alice = {
Name = "Alice"
Age = 30
Email = Some "[email protected]"
}
let bob = {
Name = "Bob"
Age = 25
Email = None
}
let printPersonInfo person =
printfn "Name: %s, Age: %d" person.Name person.Age
match person.Email with
| Some email -> printfn "Email: %s" email
| None -> printfn "Email: Not provided"
printPersonInfo alice
printPersonInfo bob
</syntaxhighlight>
;å®è¡çµæ:<syntaxhighlight lang=text>
Name: Alice, Age: 30
Email: [email protected]
Name: Bob, Age: 25
Email: Not provided
</syntaxhighlight>
ã¬ã³ãŒãåã¯ãã£ãŒã«ãåãšãã®åãæå®ããè€æ°ã®å€ãã°ã«ãŒãåããããã«äœ¿çšãããŸãããã®äŸã§ã¯ã<code>Person</code> ãšããã¬ã³ãŒãåãå®çŸ©ããŠããŸãã<code>Name</code>ã<code>Age</code>ã<code>Email</code> ã®ãã£ãŒã«ããæã¡ãŸãã<code>Email</code> ãã£ãŒã«ã㯠<code>string option</code> åãšããŠããªãã·ã§ã³ã®æååãè¡šãããšã瀺ããŠããŸãã
<code>Person</code> ã¬ã³ãŒãåã䜿çšã㊠<code>alice</code> ãš <code>bob</code> ãšãã2ã€ã®å人æ
å ±ãå®çŸ©ããŠããŸãã<code>printPersonInfo</code> é¢æ°ã§ã¯ãäžãããã <code>person</code> ã®æ
å ±ã衚瀺ããŸãã<code>match</code> ã䜿ã£ãŠã<code>person</code> ã® <code>Email</code> ãã£ãŒã«ãã®æç¡ã«å¿ããŠé©åãªã¡ãã»ãŒãžãåºåããŠããŸãã
<code>Person</code> ã¬ã³ãŒãåã¯ãååã幎霢ããªãã·ã§ã³ã®ã¡ãŒã«ã¢ãã¬ã¹ã®æ
å ±ãæã€ããå®çŸ©ãããŠããŸãããããŠããããã®å€ãæ〠<code>alice</code> ãš <code>bob</code> ã®ã€ã³ã¹ã¿ã³ã¹ãäœæããŠããŸãã<code>printPersonInfo</code> é¢æ°ã§ã¯ãããããã®äººç©ã®æ
å ±ãã³ã³ãœãŒã«ã«è¡šç€ºããŠããŸãã
==== ã¯ã©ã¹å (Class Type) ====
:<syntaxhighlight lang=f#>
type Customer(name: string, age: int) =
member this.Name = name
member this.Age = age
let customer1 = Customer("Alice", 30)
// Customer ã€ã³ã¹ã¿ã³ã¹ã®ããããã£ã«ã¢ã¯ã»ã¹ããŠæ
å ±ã衚瀺ããäŸ
printfn "Customer Name: %s, Age: %d" customer1.Name customer1.Age
</syntaxhighlight>
;å®è¡çµæ:<syntaxhighlight lang=text>
Customer Name: Alice, Age: 30
</syntaxhighlight>
ã¯ã©ã¹åã¯ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã«ãããã¯ã©ã¹ãšäŒŒãæ©èœãæäŸããŸãããã®äŸã§ã¯ã<code>Customer</code> ãšããã¯ã©ã¹åãå®çŸ©ãã<code>name</code> ãš <code>age</code> ãåãåãã³ã³ã¹ãã©ã¯ã¿ãšãããã«çŽã¥ã <code>Name</code> ãš <code>Age</code> ã®ããããã£ãæã€ã¯ã©ã¹ãäœæããŠããŸãã
<code>Customer</code> ãšããã¯ã©ã¹åãå®çŸ©ãã<code>name</code> ãš <code>age</code> ã®2ã€ã®ãã©ã¡ãŒã¿ãåãã³ã³ã¹ãã©ã¯ã¿ãäœæããŠããŸãããŸããããããã®ãã©ã¡ãŒã¿ã«å¯Ÿå¿ãããããã㣠<code>Name</code> ãš <code>Age</code> ãå®çŸ©ããŠããŸãã
<code>let customer1 = Customer("Alice", 30)</code> 㧠<code>Customer</code> ã¯ã©ã¹åã®æ°ããã€ã³ã¹ã¿ã³ã¹ãçæããŠããŸãããã®åŸã<code>customer1</code> ã® <code>Name</code> ãš <code>Age</code> ããããã£ã«ã¢ã¯ã»ã¹ããŠããã®æ
å ±ãã³ã³ãœãŒã«ã«åºåããŠããŸãã
ãã®äŸã§ã¯ãF#ã®ã¯ã©ã¹åã䜿çšããŠããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®æŠå¿µãå®æŒããŠããŸãã<code>Customer</code> ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãäœæãããã®ããããã£ã«ã¢ã¯ã»ã¹ããŠããŒã¿ã衚瀺ããŠããŸãã
==== ãŠããªã³å (Union Type) ====
:<syntaxhighlight lang=f#>
type Shape =
| Circle of float
| Rectangle of float * float
| Square of float
let circle = Circle(5.0)
let rectangle = Rectangle(4.0, 6.0)
let square = Square(3.0)
let calculateArea shape =
match shape with
| Circle(radius) -> System.Math.PI * radius * radius
| Rectangle(width, height) -> width * height
| Square(side) -> side * side
printfn "Circle Area: %f" (calculateArea circle)
printfn "Rectangle Area: %f" (calculateArea rectangle)
printfn "Square Area: %f" (calculateArea square)
</syntaxhighlight>
;å®è¡çµæ:<syntaxhighlight lang=text>
Circle Area: 78.539816
Rectangle Area: 24.000000
Square Area: 9.000000
</syntaxhighlight>
ãŠããªã³åã¯è€æ°ã®åã®äžããäžã€ãéžæããåãè¡šããŸãããã®äŸã§ã¯ã<code>Shape</code> ãšãããŠããªã³åãå®çŸ©ããŠããŸããããããã®ã±ãŒã¹ã¯ç°ãªã圢ç¶ãè¡šãã<code>Circle</code>ã<code>Rectangle</code>ã<code>Square</code> ã®ãããããšãã®åºæã®ãã©ã¡ãŒã¿ãæã¡ãŸãã
ãŸãã<code>calculateArea</code> é¢æ°ã¯äžããããå³åœ¢ã®é¢ç©ãèšç®ããŸãã<code>match</code> åŒã䜿ã£ãŠäžãããã <code>shape</code> ã®çš®é¡ã«å¿ããŠé©åãªèšç®ãè¡ããŸããåã®å Žåã¯åã®é¢ç©ããé·æ¹åœ¢ã®å Žåã¯é·æ¹åœ¢ã®é¢ç©ããæ£æ¹åœ¢ã®å Žåã¯æ£æ¹åœ¢ã®é¢ç©ãèšç®ããŸãã
æåŸã«ãåå³åœ¢ã®é¢ç©ãèšç®ããŠã³ã³ãœãŒã«ã«è¡šç€ºããŠããŸãã
----
<!--åæ£ããŠããã®ã§èŠåæ-->
F#ã«ã¯ãå
±çšäœ(Union Types)ãšåŒã°ããç¹å¥ãªããŒã¿åããããŸããå
±çšäœã¯ãç°ãªãåã®å€ãå«ãããšãã§ããããŒã¿åã§ãC#ã®enumåãJavaã®åæåã«çžåœããŸããF#ã®å
±çšäœã¯ã極ããŠæè»ã§ã䜿ãããããã®ã§ãã
å
±çšäœãå®çŸ©ããã«ã¯ãtypeããŒã¯ãŒãã«ããæ°ããåã®å®çŸ©ãè¡ãã|ã䜿ã£ãŠå
±çšäœã®èŠçŽ ãåæããŠãããŸããå
±çšäœã®èŠçŽ ã¯ããã¹ãŠåãåå空éã«å±ãããã®ã§ãªããã°ãªããŸããã
以äžã¯ãå
±çšäœã䜿çšããç°¡åãªäŸã§ãã
:<syntaxhighlight lang=f#>
// å
±çšäœã®å®çŸ©
type Shape =
| Circle of float
| Rectangle of float * float
let areaOfShape shape =
match shape with
| Circle(r) -> Math.PI * r ** 2.0
| Rectangle(w, h) -> w * h
</syntaxhighlight>
ãã®äŸã§ã¯ãShapeãšããå
±çšäœåãå®çŸ©ããŠãCircleãšRectangleãšãã2çš®é¡ã®èŠçŽ ãæãããŠããŸããCircleèŠçŽ ã¯ã1ã€ã®æµ®åå°æ°ç¹æ°ãä¿æããRectangleèŠçŽ ã¯ã2ã€ã®æµ®åå°æ°ç¹æ°ãä¿æããŸãã次ã«ãareaOfShapeé¢æ°ãå®çŸ©ããŠãåŒæ°shapeãCircleèŠçŽ ã§ããã°åã®é¢ç©ãRectangleèŠçŽ ã§ããã°é·æ¹åœ¢ã®é¢ç©ãèšç®ããŠããŸãã
å
±çšäœã䜿çšãããšãè€æ°ã®é¢é£ããå€ã1ã€ã®åã«ãŸãšããããšãã§ããããã°ã©ã ã®èŠéãããããªããŸãããŸããç°ãªãåã®å€ãæ¯èŒããå Žåã«ãéåžžã«äŸ¿å©ã§ããããããå
±çšäœã極ããŠæè»ã§ããããã䜿ãããããšã³ãŒããããããããªãå ŽåããããŸãã
==== ã€ã³ã¿ãŒãã§ãŒã¹ (Interface) ====
:<syntaxhighlight lang=f#>
type IShape =
abstract member Area: float
abstract member Perimeter: float
type Rectangle(width: float, height: float) =
interface IShape with
member this.Area = width * height
member this.Perimeter = 2.0 * (width + height)
let rectangle = Rectangle(4.0, 6.0)
let shapeArea = (rectangle :> IShape).Area
let shapePerimeter = (rectangle :> IShape).Perimeter
printfn "Rectangle Area: %f" shapeArea
printfn "Rectangle Perimeter: %f" shapePerimeter
</syntaxhighlight>
;å®è¡çµæ:<syntaxhighlight lang=text>
Rectangle Area: 24.000000
Rectangle Perimeter: 20.000000
</syntaxhighlight>
F#ã§ã¯ã€ã³ã¿ãŒãã§ãŒã¹ããµããŒãããŠãããããã«ããæœè±¡ã¡ã³ããŒãå®çŸ©ããããšãã§ããŸããäžèšã®äŸã§ã¯ã<code>IShape</code> ãšããã€ã³ã¿ãŒãã§ãŒã¹ãå®çŸ©ããŠããŸãããã®ã€ã³ã¿ãŒãã§ãŒã¹ã«ã¯ <code>Area</code> ãš <code>Perimeter</code> ã®æœè±¡ã¡ãœãããå«ãŸããŠããŸãã
ãããŠã<code>Rectangle</code> ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãäœæãããã® <code>Area</code> ãš <code>Perimeter</code> ã衚瀺ããŠããŸãããã®ããã«ã<code>IShape</code> ã€ã³ã¿ãŒãã§ãŒã¹ã䜿ãããšã§ãç°ãªãå³åœ¢ã®é¢ç©ãåšå²ã®èšç®ãªã©ãçµ±äžçãªæ¹æ³ã§æ±ãããšãã§ããŸãã
==== åæå ====
F<nowiki>#</nowiki>ã«ãããåæåïŒenumeration typeïŒã¯ãç¹å®ã®å€ã®æéãªã»ãããè¡šçŸããããã®ããŒã¿åã§ããåæåã¯äºåã«å®çŸ©ãããããã€ãã®éžæè¢ã®äžããäžã€ãéžæããããã«äœ¿çšãããŸãã
以äžã¯åæåã®åºæ¬çãªæ§æãšäœ¿çšäŸã§ãã
; åæåã®å®çŸ© :<syntaxhighlight lang=f#>
type DayOfWeek =
| Monday
| Tuesday
| Wednesday
| Thursday
| Friday
| Saturday
| Sunday
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>DayOfWeek</code> ãšããåæåãå®çŸ©ããŠããŸãããã®åã¯ãäžé±éã®ææ¥ãè¡šãããã«äœ¿ãããŸããããããã®ææ¥ã¯ <code>Monday</code>ã<code>Tuesday</code>ã<code>Wednesday</code> ãªã©ã®å€ãšããŠå®çŸ©ãããŠããŸãã
; åæåã®äœ¿çšäŸ :<syntaxhighlight lang=f#>
let today = DayOfWeek.Tuesday
match today with
| DayOfWeek.Monday -> printfn "æææ¥ã§ã"
| DayOfWeek.Tuesday -> printfn "ç«ææ¥ã§ã"
| _ -> printfn "ãã®ä»ã®ææ¥ã§ã"
</syntaxhighlight>
ããã§ã¯ã<code>today</code> ãšããå€æ°ã« <code>DayOfWeek.Tuesday</code> ã代å
¥ããŠããŸãããã㊠<code>match</code> ã䜿ã£ãŠã<code>today</code> ã®å€ã«å¿ããŠææ¥ã衚瀺ããåŠçãè¡ã£ãŠããŸãã
åæåã¯ç¹å®ã®éžæè¢ã®éåãè¡šãã®ã«äŸ¿å©ã§ããã¿ãŒã³ãããã³ã°ãªã©ãšçµã¿åãããããšã§ãç¹å®ã®éžæè¢ã«å¿ããåŠçãè¡ãããšãã§ããŸãã
F#ã®<code>type</code>æ§æã¯ãã¬ã³ãŒãåãããŠããªã³åãã¯ã©ã¹åãã€ã³ã¿ãŒãã§ãŒã¹ãªã©ãããŸããŸãªããŒã¿æ§é ãæè»ã«å®çŸ©ããããšãã§ããŸããããã«ãããé¢æ°åããã°ã©ãã³ã°ãããªããžã§ã¯ãæåããã°ã©ãã³ã°ãŸã§ãå€å²ã«ãããããã°ã©ãã³ã°ã¹ã¿ã€ã«ããµããŒãããŠããŸãã
== F#ã®é«åºŠãªæ©èœ ==
=== é¢æ°åããã°ã©ãã³ã° ===
F#ã¯ãMLç³»ã®åŒ·åãªé¢æ°åããã°ã©ãã³ã°èšèªã§ããF#ã¯ãé«ãªãŒããŒé¢æ°ãã«ãªãŒåããã¥ã¢é¢æ°ã代æ°çããŒã¿åãªã©ã®åŒ·åãªæ©èœãåããŠããŸãã
ãŸããé«ãªãŒããŒé¢æ°ã¯ãé¢æ°ãåŒæ°ãšããŠåãåãé¢æ°ãŸãã¯é¢æ°ãæ»ãå€ãšããŠè¿ãé¢æ°ã§ããããã«ãããéåžžã«æè»ãªé¢æ°ãäœæã§ããŸããäŸãã°ã以äžã®é«ãªãŒããŒé¢æ° <code>map</code> ã¯ããªã¹ããåãåãããªã¹ãã®åèŠçŽ ã«é¢æ°ãé©çšããŠæ°ãããªã¹ããçæããŸãã
:''map'':(â²''a''ââ²''b'')ââ²''a'' ''list''ââ²''b'' ''list''
:<syntaxhighlight lang=f#>
let rec map f xs =
match xs with
| [] -> []
| x::xs' -> (f x)::(map f xs')
map (fun x -> x * 2) [1; 2; 3] // [2; 4; 6]
</syntaxhighlight>
次ã«ãã«ãªãŒåã¯ãè€æ°ã®åŒæ°ããšãé¢æ°ãã1ã€ã®åŒæ°ããšãé¢æ°ã®ãã§ãŒã³ã«å€æããæ¹æ³ã§ããã«ãªãŒåã䜿çšãããšãåå©çšæ§ãé«ããããæè»ãªé¢æ°ãäœæã§ããŸãã
:<syntaxhighlight lang=f#>
let add a b = a + b
let addCurried a = fun b -> add a b
addCurried 1 2 // 3
</syntaxhighlight>
ããã«ãF#ã¯ãã¥ã¢é¢æ°ã®äœæãç°¡åã«ããŸãããã¥ã¢é¢æ°ã¯ãå¯äœçšããªãé¢æ°ã§ãããåãå
¥åã«å¯ŸããŠåžžã«åãåºåãçæããŸããF#ã¯ãã€ãã¥ãŒã¿ãã«ïŒå€æŽäžèœïŒãªããŒã¿æ§é ã䜿çšããããšãæšå¥šããŠãããããã¯ãæ°ããããŒã¿æ§é ã®çæã®ã¿ããµããŒãããŠããŸããããã«ãããäºæããªãå¯äœçšãçºçããå¯èœæ§ãããå Žåã«ããå®å
šæ§ã確ä¿ããããšãã§ããŸãã
:<syntaxhighlight lang=f#>
let add a b = a + b
let doubleAdd a b = add (add a b) (add a b)
doubleAdd 1 2 // 6
</syntaxhighlight>
æåŸã«ãF#ã§ã¯ã代æ°çããŒã¿åã䜿çšããŠãç°ãªãçš®é¡ã®ããŒã¿ãè¡šçŸããããšãã§ããŸãã代æ°çããŒã¿åã«ã¯ããŠããªã³åãšã¬ã³ãŒãåããããŸãããŠããªã³åã¯ãè€æ°ã®åã®äžã€ã§ã§ããåã§ãããã¬ã³ãŒãåã¯ãè€æ°ã®åã®ãã£ãŒã«ããæã€åã§ãã
:<syntaxhighlight lang=f#>
type Color =
| Red
| Green
| Blue
let favoriteColor color =
match color with
| Red -> "I love red!"
| Green -> "I love green!"
| Blue -> "I love blue!"
favoriteColor Red // "I love red!"
type Person = {
Name: string;
Age: int;
}
let greetPerson person =
sprintf "Hello %s, you are %d years old!" person.Name person.Age
let person = {
Name = "Alice";
Age = 25;
}
greetPerson person // "Hello Alice, you are 25 years old!"
</syntaxhighlight>
以äžãF#ã®é¢æ°åããã°ã©ãã³ã°ã®é«åºŠãªæ©èœã§ãããããã®æ©èœãé§äœ¿ããããšã§ãããæè»ã§åå©çšæ§ã®é«ãããã°ã©ã ãäœæã§ããŸãã
=== éçåä»ãèšèªãšããŠã®F# ===
F#ã¯ã.NETãã¬ãŒã ã¯ãŒã¯ã®äžéšã§ãããéçåä»ãã®ãã«ããã©ãã€ã ããã°ã©ãã³ã°èšèªã§ããF#ã®éçåä»ãã·ã¹ãã ã¯ãã³ã³ãã€ã©ã«ããéç解æã«ãããå®è¡æã®ãšã©ãŒãæžãããä¿å®æ§ãåäžãããããšãã§ããŸãã
F#ã«ã¯éçåä»ãã®å€æ°ããããåã«åºã¥ããŠå¶éãããŸããããã«ãããã³ãŒãã®å質ãé«ãããããã°ã容æã«ãªããŸãããŸããF#ã§ã¯æ§èœæé©åã®ããã«ãäžå€æ§ãéèŠãããŠããŸãããã®ãããªäžå€æ§ã¯ããªããžã§ã¯ãã®ç¶æ
ãåžžã«ç¢ºå®ã«ææ¡ããããšãã§ãããããã³ãŒãã®å¯èªæ§ãåäžããŸãã
F#ã®éçåä»ãã·ã¹ãã ã¯ã.NETã®åã·ã¹ãã ãšé«åºŠã«çµ±åãããŠããŸããããã¯ãæ¢åã®.NETã¢ããªã±ãŒã·ã§ã³ããã®ç§»è¡ã容æã§ããããšãæå³ããŠããŸãããŸããF#ã¯.NETã®æ©èœããµããŒãããŠãããC#ãVB.NETãšåãããå®å
šãªçžäºéçšæ§ãæã£ãŠããŸãã
F#ã¯ãéçåä»ãã·ã¹ãã ã掻çšããããšã§ãå€ãã®åé¡ãäºåã«æ€åºããããšãã§ããŸããããã«ããããã°ãæªç¶ã«é²ãããšãã§ããããããœãããŠã§ã¢éçºã®éçšã§ã®å質ãšä¿¡é Œæ§ãåäžããä¿å®æ§ãé«ãŸããŸãã
=== ã¢ã¯ãã£ããã¿ãŒã³ãããã³ã° ===
以äžã¯ãF#ã®ã¢ã¯ãã£ããã¿ãŒã³ãããã³ã°ã«é¢ããç°¡åãªäŸã§ãã
:<syntaxhighlight lang=f#>
// Active pattern to match even integers
let (|Even|Odd|) x = if x % 2 = 0 then Even else Odd
// Using the active pattern to match an even integer
let isEven x =
match x with
| Even -> true
| Odd -> false
// Active pattern to match currency symbols
let (|Dollar|Euro|) (s:string) =
match s with
| "$" -> Dollar
| "â¬" -> Euro
| _ -> failwith "Invalid currency symbol"
// Using the active pattern to convert prices
let convertPrice (symbol:string) (price:float) : float =
match symbol with
| Dollar -> price * 0.85 // Convert to euros
| Euro -> price // No need to convert
| _ -> failwith "Invalid currency symbol"
// Example usage of the active patterns
let evenNumber = 4
let oddNumber = 3
let dollarPrice = "$10.00"
let euroPrice = "â¬5.00"
printfn "Is %d even? %b" evenNumber (isEven evenNumber)
printfn "Is %d even? %b" oddNumber (isEven oddNumber)
let convertedDollarPrice = convertPrice dollarPrice 10.0
printfn "The price %s 10.00 is %.2f" dollarPrice convertedDollarPrice
let convertedEuroPrice = convertPrice euroPrice 5.0
printfn "The price %s 5.00 is %.2f" euroPrice convertedEuroPrice
</syntaxhighlight>
ãã®äŸã§ã¯ãF#ã§ã¢ã¯ãã£ããã¿ãŒã³ãããã³ã°ãã©ã®ããã«æ©èœãããã瀺ããŠããŸããæåã«ã<code>|Even|Odd|</code>ãšããã¢ã¯ãã£ããã¿ãŒã³ãå®çŸ©ããŸãããã®ãã¿ãŒã³ã¯ãæŽæ°ãå¶æ°ãå¥æ°ãã«å¿ããŠã2ã€ã®ãã¿ãŒã³ãããã³ã°ãæäŸããŸãã次ã«ã<code>isEven</code>é¢æ°ãå®çŸ©ããæŽæ°ã<code>Even</code>ãŸãã¯<code>Odd</code>ã«ãã¿ãŒã³ãããã³ã°ããŠãå¶æ°ã§ãããã©ããã確èªããŸãã
次ã«ãé貚ã·ã³ãã«ããã¿ãŒã³ãããã³ã°ããã¢ã¯ãã£ããã¿ãŒã³ãå®çŸ©ããŸãããã®ã¢ã¯ãã£ããã¿ãŒã³ã¯ã<code>Dollar</code>ãš<code>Euro</code>ãšãã2ã€ã®ãã¿ãŒã³ãæäŸããæååããã«ãŸãã¯ãŠãŒãã®é貚èšå·ã§ãããã確èªããŸãã<code>convertPrice</code>é¢æ°ã¯ãé貚ã·ã³ãã«ãšäŸ¡æ Œãåãåãã<code>Dollar</code>ã®å Žåã¯äŸ¡æ ŒããŠãŒãã«å€æãã<code>Euro</code>ã®å Žåã¯å€æãè¡ããã«äŸ¡æ Œãè¿ããŸããæåŸã«ã<code>printfn</code>ã䜿çšããŠãã¢ã¯ãã£ããã¿ãŒã³ã䜿çšããå€æã®äŸã瀺ããŸãã
ç§ãã¡ã䜿çšãã<code>printfn</code>é¢æ°ã¯ãæåãåºåããããã®ç°¡åãªé¢æ°ã§ã<code>%d</code>ã<code>%s</code>ãšãã£ããã©ãŒãããæ瀺åã䜿çšããŠãå€æ°ã®å€ã衚瀺ããããšãã§ããŸãã
=== F#ã®äžŠååŠç ===
F#ã¯ã.NET Frameworkã®äžéšã§ããããããã«ãã¹ã¬ããã䞊ååŠçããµããŒãããŠããŸããF#ã®äžŠååŠçã¯ã以äžã®2çš®é¡ã®æ¹æ³ã§å®çŸã§ããŸãã
# Asyncãã¿ãŒã³ã䜿çšããéåæåŠç
# Parallelãã¿ãŒã³ã䜿çšãã䞊ååŠç
==== Asyncãã¿ãŒã³ã䜿çšããéåæåŠç ====
Asyncãã¿ãŒã³ã¯ã.NET Framework 4.0以éã§å°å
¥ãããéåæåŠçã®ããã®ãã¿ãŒã³ã§ããAsyncãã¿ãŒã³ã䜿çšããããšã§ããã«ãã¹ã¬ããã䜿çšãã䞊ååŠçãããã³ãŒããã·ã³ãã«ã«ãªããŸãã以äžã¯ãAsyncãã¿ãŒã³ã䜿çšããF#ã®ã³ãŒããµã³ãã«ã§ãã
:<syntaxhighlight lang=f#>
open System
open System.Net
open System.IO
let downloadAsync (url: string) : Async<string> =
async {
let request = WebRequest.Create(url)
use! response = request.AsyncGetResponse()
use stream = response.GetResponseStream()
use reader = new StreamReader(stream)
return! reader.AsyncReadToEnd()
}
let downloadAndPrintAsync url =
async {
let! html = downloadAsync url
printfn "Downloaded %d bytes from %s" html.Length url
}
async {
do! downloadAndPrintAsync "http://google.com"
do! downloadAndPrintAsync "http://baidu.com"
} |> Async.RunSynchronously
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ãAsyncãã¿ãŒã³ã䜿çšããŠã2ã€ã®WebããŒãžã䞊åã§ããŠã³ããŒãããããããã®ãµã€ãºã衚瀺ããŠããŸãã
==== Parallelãã¿ãŒã³ã䜿çšãã䞊ååŠç ====
Parallelãã¿ãŒã³ã¯ãTPLïŒTask Parallel LibraryïŒã®äžéšã§ããããã.NET Framework 4.0以éã§å©çšã§ããŸããParallelãã¿ãŒã³ã䜿çšããããšã§ãC#ã®TaskãThreadPoolãPLINQãªã©ãšåæ§ã«ãç°¡åã«äžŠååŠçãå®çŸããããšãã§ããŸãã以äžã¯ãParallelãã¿ãŒã³ã䜿çšããF#ã®ã³ãŒããµã³ãã«ã§ãã
:<syntaxhighlight lang=f#>
let findPrimesInRange (low:int) (high:int) : int list =
let isPrime n =
if n < 2 then false
else if n = 2 then true
else if n % 2 = 0 then false
else
let limit = int(sqrt(double(n)))
let rec loop i =
if i > limit then true
elif n % i = 0 then false
else loop (i + 2)
loop 3
[low..high]
|> List.filter isPrime
let findPrimesParallel (low:int) (high:int) : int list =
[low..high]
|> List.chunkBySize (List.length [low..high] / Environment.ProcessorCount)
|> List.Parallel.map findPrimesInRange
|> List.concat
let sw = new System.Diagnostics.Stopwatch()
let primes = sw.TimeIt (fun () -> findPrimesParallel 1 1000000)
printfn "Found %d primes in %Oms" primes.Count sw.ElapsedMilliseconds
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ãParallelãã¿ãŒã³ã䜿çšããŠã1~1,000,000ã®ç¯å²å
ã®çŽ æ°ãæ¢çŽ¢ããŠããŸããæ¢åã®findPrimesInRangeé¢æ°ã䜿çšãããããåã
ã®ãã£ã³ã¯ïŒããã»ããµæ°ã«åãããŠåå²ãããå
¥åãªã¹ãã®ãµããªã¹ãïŒã«å¯ŸããŠãããããŠããŸããããããããçµæãäžã€ã®ãªã¹ãã«é£çµããããšã§ãæçµçãªçŽ æ°ãªã¹ããäœæããŸãããŸããsw.TimeItã䜿çšããããšã§ãå®è¡æéãèšæž¬ããŠããŸãã
ããã2ã€ã®ãã¿ãŒã³ã¯ãããŸããŸãªã·ããªãªã«å¿ããŠé©çšããããšãã§ããŸããAsyncãã¿ãŒã³ã¯ãI/OããŠã³ãã®ã¢ããªã±ãŒã·ã§ã³ãWebãµãŒãã¹ãªã©ã®éåæåŠçã«é©ããŠããŸãããŸããParallelãã¿ãŒã³ã¯ãCPUããŠã³ãã®éãæŒç®ãªã©ã«é©ããŠããŸããF#ã®äžŠååŠçã¯ã.NET Frameworkã®è±å¯ãªäžŠååŠçã©ã€ãã©ãªã掻çšãã€ã€ãF#ã®é¢æ°åããã°ã©ãã³ã°ã®å©ç¹ãçãããæè»ãªäžŠååŠçãå®çŸããããšãã§ããŸãã
=== F#ã®éåæåŠç ===
F#ã®éåæåŠçã«é¢ãããµã³ãã«ã³ãŒãã§ãã
:<syntaxhighlight lang=f#>
open System
open System.Net
// ããŠã³ããŒãåŠçãè¡ãéåæé¢æ°
let downloadAsync (url: Uri) =
async {
let webClient = new WebClient()
let! html = webClient.AsyncDownloadString(url)
return html
}
// ã¡ã€ã³é¢æ°
[<EntryPoint>]
let main argv =
let url = "https://www.google.com"
let uri = Uri(url)
// éåæããŠã³ããŒããå®è¡
let downloadTask = downloadAsync uri
Async.RunSynchronously downloadTask
printfn "Download completed."
0 // ããã°ã©ã ã®çµäºã³ãŒã
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ã<code>downloadAsync</code>é¢æ°ã¯ã <code>async</code>ããŒã¯ãŒãã§ä¿®é£Ÿãããéåæé¢æ°ãšããŠå®çŸ©ãããŠããŸãããã®é¢æ°ã¯ã<code>System.Net</code>åå空éå
ã«ãã<code>WebClient</code>ã¯ã©ã¹ã䜿çšããŠãæå®ããã<code>Uri</code>ããHTMLãããŠã³ããŒãããŸãã
<code>let! html = webClient.AsyncDownloadString(url)</code>ã®ããã«ã<code>let!</code>ã䜿çšããŠéåææäœã®çµæãåŸ
ã€ããšãã§ããŸãã<code>let!</code>ã¯éåžžã®<code>let</code>ããŒã¯ãŒããšäŒŒãŠããŸãããéåææäœãå®äºãããŸã§ãä»ã®åŠçããããã¯ããã«åŸ
æ©ããŸãã
<code>Async.RunSynchronously</code>é¢æ°ã䜿çšããããšã§ãéåææäœãåæçã«å®è¡ã§ããŸãããã®å Žåã<code>downloadTask</code>å€æ°ã«æ ŒçŽãããéåæã¿ã¹ã¯ãå®è¡ããŠãããŠã³ããŒãåŠçãå®äºãããŸã§ãããã¯ããŸãã
æåŸã«ã<code>printfn</code>é¢æ°ã䜿çšããŠãããŠã³ããŒããå®äºããããšããŠãŒã¶ãŒã«éç¥ããŸãã
=== F#ãã.NETã®æ©èœãçŽæ¥äœ¿ã ===
F#ã¯.NETèšèªã©ã³ã¿ã€ã ã®äžéšã§ããããã®ããã.NETã®æ©èœãã©ã€ãã©ãªãçŽæ¥å©çšããããšãã§ããŸãã以äžã«ããã€ãã®æ¹æ³ã瀺ããŸãã
==== .NETã¯ã©ã¹ã®äœ¿çš ====
:<syntaxhighlight lang=f#>
open System
let currentDate = DateTime.Now
printfn "Current Date and Time: %O" currentDate
</syntaxhighlight>
<code>open System</code> ã䜿çšããããšã§ã<code>System</code> åå空éå
ã®ã¯ã©ã¹ãæ©èœã«ã¢ã¯ã»ã¹ã§ããŸããäžèšã®äŸã§ã¯ã<code>DateTime.Now</code> ã䜿ã£ãŠçŸåšã®æ¥æãååŸãããããã³ã³ãœãŒã«ã«åºåããŠããŸãã
==== å€éšã®.NETã¢ã»ã³ããªã®åç
§ ====
å€éšã®.NETã¢ã»ã³ããªïŒDLLïŒãå©çšããå Žåã¯ã<code>#r</code> ãã£ã¬ã¯ãã£ãã䜿çšããŠåç
§ãè¿œå ããŸãã
<code>#r</code> ãã£ã¬ã¯ãã£ãã䜿ã£ãŠå€éšã®DLLãåç
§ãããã®DLLå
ã®åå空éãã¯ã©ã¹ã䜿ãããšãã§ããŸãã
:<syntaxhighlight lang=f#>
#r "MyExternalLibrary.dll"
open MyNamespace
let result = MyExternalLibrary.MyClass.MyMethod()
</syntaxhighlight>
==== .NETã©ã€ãã©ãªã®äœ¿çš ====
F#ããã¯ãæšæºã®.NETã©ã€ãã©ãªãçŽæ¥å©çšããããšãã§ããŸãã
:<syntaxhighlight lang=f#>
let list = System.Collections.Generic.List<int>()
list.Add(1)
list.Add(2)
printfn "List: %A" list
</syntaxhighlight>
<code>System.Collections.Generic</code> ãªã©ã®.NETã®æšæºã©ã€ãã©ãªã䜿ã£ãŠãäŸãã°ãªã¹ããäœæããŠæäœããããšãå¯èœã§ãã
F#ã¯.NETãšå¯æ¥ã«çµ±åãããŠããããã®æ©æµãåããŠãæ§ã
ãª.NETã®æ©èœãã©ã€ãã©ãªãçŽæ¥å©çšã§ããããšãç¹åŸŽã§ãã
== F#ã®å®è·µ ==
=== F#ã«ããWebã¢ããªã±ãŒã·ã§ã³ã®æ§ç¯ ===
=== F#ã«ããããŒã¿åŠçã®å®è·µ ===
=== F#ã«ããæ°åŠçåŠçã®å®è·µ ===
=== F#ã®ãšã³ã·ã¹ãã ã®çŽ¹ä» ===
== F#ã®ãã¹ããã©ã¯ãã£ã¹ ==
=== F#ã®ã¢ãžã¥ãŒã«ã·ã¹ãã ===
=== ãã¹ãé§åéçº ===
=== F#ã®ã³ãŒãã£ã³ã°ã¬ã€ãã©ã€ã³ ===
=== F#ã®ã³ãã¥ããã£ãšåŠç¿ãªãœãŒã¹ ===
== éé² ==
=== ã³ãŒãã®ã£ã©ãªãŒ ===
{{å
é ã«æ»ã|title=éé²ã«æ»ã|label=éé²|style=border-top:1px solid gray;}}
[[Ruby#ã³ãŒãã®ã£ã©ãªãŒ]]ããã®ç§»æ€ã§ãã
:<syntaxhighlight lang=f# highlight=18>
</syntaxhighlight>
:<syntaxhighlight lang=text>
</syntaxhighlight>
==== ãšã©ãã¹ããã¹ã®ç¯© ====
{{å
é ã«æ»ã|title=ã³ãŒãã»ã®ã£ã©ãªãŒã«æ»ã|label=ã³ãŒãã®ã£ã©ãªãŒ|style=border-top:1px solid gray;}}
ãšã©ãã¹ããã¹ã®ç¯©ããè¥å¹² F# ãããæžããŠã¿ãŸããã
;ãšã©ãã¹ããã¹ã®ç¯©:<syntaxhighlight lang=f# line>
let eratosthenes n =
let is_prime = Array.create (n + 1) true
is_prime.[0] <- false
is_prime.[1] <- false
for i = 2 to int(sqrt(float n)) do
if is_prime.[i] then
let mutable j = i * i
while j <= n do
is_prime.[j] <- false
j <- j + i
let primes = is_prime |> Array.mapi (fun i prime -> if prime then i else -1) |> Array.filter (fun x -> x >= 0)
primes
printfn "%A" (eratosthenes 100)
</syntaxhighlight>
;å®è¡çµæ:<syntaxhighlight lang=text>
[|2; 3; 5; 7; 11; 13; 17; 19; 23; 29; 31; 37; 41; 43; 47; 53; 59; 61; 67; 71; 73;
79; 83; 89; 97|]
</syntaxhighlight>
==== æ倧å
¬çŽæ°ãšæå°å
¬åæ° ====
{{å
é ã«æ»ã|title=ã³ãŒãã»ã®ã£ã©ãªãŒã«æ»ã|label=ã³ãŒãã®ã£ã©ãªãŒ|style=border-top:1px solid gray;}}
æ倧å
¬çŽæ°ãšæå°å
¬åæ°ããè¥å¹² F# ãããæžããŠã¿ãŸããã
;æ倧å
¬çŽæ°ãšæå°å
¬åæ°:<syntaxhighlight lang=f# line>
let rec gcd2 m n = if n = 0 then m else gcd2 n (m % n)
let gcd (ints : int[]) = Array.reduce gcd2 ints
let lcm2 m n = m * n / (gcd2 m n)
let lcm (ints : int[]) = Array.reduce lcm2 ints
printfn "(gcd2 30 45) => %d" (gcd2 30 45)
printfn "(gcd [|30; 72; 12|]) => %d" (gcd [|30; 72; 12|])
printfn "(lcm2 30 72) => %d" (lcm2 30 72)
printfn "(lcm [|30; 42; 72|]) => %d" (lcm [|30; 42; 72|])
</syntaxhighlight>
;å®è¡çµæ:<syntaxhighlight lang=text>
(gcd2 30 45) => 15
(gcd [|30; 72; 12|]) => 6
(lcm2 30 72) => 360
(lcm [|30; 42; 72|]) => 2520
</syntaxhighlight>
==== äºåæ³ ====
{{å
é ã«æ»ã|title=ã³ãŒãã»ã®ã£ã©ãªãŒã«æ»ã|label=ã³ãŒãã®ã£ã©ãªãŒ|style=border-top:1px solid gray;}}
[[W:äºåæ³|äºåæ³]]ããè¥å¹² F# ãããæžããŠã¿ãŸããã
;äºåæ³:<syntaxhighlight lang=f# line>
let rec bisection low high f =
let x = (low + high) / 2.0
let fx = f x
if abs fx < 1.0e-10 then x
else
let (newLow, newHigh) =
if fx < 0.0 then (x, high)
else (low, x)
bisection newLow newHigh f
let result1 = bisection 0.0 3.0 (fun x -> x - 1.0)
printfn "%.16f" result1
let result2 = bisection 0.0 3.0 (fun x -> x * x - 1.0)
printfn "%.16f" result2
</syntaxhighlight>
;å®è¡çµæ:<syntaxhighlight lang=text>
0.9999999999417920
1.0000000000291000
</syntaxhighlight>
: [[æ§èª²çš(-2012幎床)é«çåŠæ ¡æ°åŠB/æ°å€èšç®ãšã³ã³ãã¥ãŒã¿ãŒ#2åæ³]]ã®äŸã F# ã«ç§»æ€ããŸããã
==== éããŒã©ã³ãèšæ³ã®è§£æãšè©äŸ¡ ====
{{å
é ã«æ»ã|title=ã³ãŒãã»ã®ã£ã©ãªãŒã«æ»ã|label=ã³ãŒãã®ã£ã©ãªãŒ|style=border-top:1px solid gray;}}
éããŒã©ã³ãèšæ³ã¯ãæ°åŒã®æŒç®åãåŸçœ®èšæ³ã§è¡šçŸããæ¹æ³ã§ããéåžžã®äžçœ®èšæ³ã§ã¯æŒç®åããªãã©ã³ãã®éã«çœ®ãããŸãããéããŒã©ã³ãèšæ³ã§ã¯æŒç®åããªãã©ã³ãã®åŸãã«çœ®ãããŸããããã«ãããæ¬åŒ§ãæŒç®åã®åªå
é äœãèããå¿
èŠããªããªããèšç®æ©ã§å®¹æã«è©äŸ¡ã§ãã圢åŒã«ãªããŸãã
äŸãã°ãäžçœ®èšæ³ã§ã®åŒ <code>3 + 4 * 5</code> ã¯ãéããŒã©ã³ãèšæ³ã§ã¯ <code>3 4 5 * +</code> ãšè¡šçŸãããŸãããã®èšæ³ã§ã¯ãæŒç®åã察象ã®ãªãã©ã³ãã«å¯ŸããŠé çªã«é©çšãããŸãã
:<syntaxhighlight lang=f#>
let evaluateExpression (expression: string) =
let tokens = expression.Split(' ')
let rec evalStack (stack: int list) = function
| [] -> stack
| "+" :: tl ->
match stack with
| operand2 :: operand1 :: rest -> evalStack ((operand1 + operand2) :: rest) tl
| _ -> failwith "Invalid expression: not enough operands for + operator"
| "-" :: tl ->
match stack with
| operand2 :: operand1 :: rest -> evalStack ((operand1 - operand2) :: rest) tl
| _ -> failwith "Invalid expression: not enough operands for - operator"
| "*" :: tl ->
match stack with
| operand2 :: operand1 :: rest -> evalStack ((operand1 * operand2) :: rest) tl
| _ -> failwith "Invalid expression: not enough operands for * operator"
| "/" :: tl ->
match stack with
| operand2 :: operand1 :: rest when operand2 <> 0 -> evalStack ((operand1 / operand2) :: rest) tl
| _ -> failwith "Invalid expression: division by zero or not enough operands for / operator"
| num :: tl ->
match System.Int32.TryParse(num) with
| true, parsedNum -> evalStack (parsedNum :: stack) tl
| _ -> failwith "Invalid expression: unexpected token"
| _ -> failwith "Invalid expression: unexpected token"
match evalStack [] (List.ofArray tokens) with
| [result] -> result
| _ -> failwith "Invalid expression: too many operands or operators"
let expression = "5 3 2 * + 8 2 / -"
let result = evaluateExpression expression
printfn "Result: %d" result
</syntaxhighlight>
ãã®F#ã®ã³ãŒãã¯ãäžããããæ°åŒãè©äŸ¡ããããã®é¢æ°ãäœæããŠããŸãã
; evaluateExpression é¢æ°
ãã®é¢æ°ã¯ãäžããããæ°åŒãåãåãããã®æ°åŒãè©äŸ¡ããŸãã
# <code>expression</code> ã空çœæåã§åå²ãã<code>tokens</code> ã«æ ŒçŽããŸãã
# <code>evalStack</code> å
ã®ååž°é¢æ°ãåŒã³åºã㊠<code>tokens</code> ãè©äŸ¡ããŸãã
# <code>evalStack</code> é¢æ°ã¯ãã¹ã¿ãã¯ãæäœããŠæ°åŒãè©äŸ¡ããŸããããŒã¯ã³ããã§ãã¯ããã¹ã¿ãã¯ã«å¯ŸããŠé©åãªæäœãè¡ããŸãã
#* æŒç®åïŒ<code>+</code>, <code>-</code>, <code>*</code>, <code>/</code>ïŒã®å Žåã¯ãã¹ã¿ãã¯ããå¿
èŠãªæ°ã®ãªãã©ã³ããåãåºãã察å¿ããæŒç®ãå®è¡ããŸãã
#* æ°å€ã®å Žåã¯ãæååãæŽæ°ã«å€æããã¹ã¿ãã¯ã«ããã·ã¥ããŸãã
#* äžæ£ãªããŒã¯ã³ãããå Žåã¯ããšã©ãŒã¡ãã»ãŒãžãã¹ããŒããŸãã
# <code>evalStack</code> ã®å®è¡çµæã <code>evaluateExpression</code> ã«è¿ããŸãã
; 䜿çšäŸ
<code>expression = "5 3 2 * + 8 2 / -"</code> ã®ãããªæ°åŒãäžãããšããã®ã³ãŒãã¯ã¹ã¿ãã¯ããŒã¹ã®èšç®ãè¡ããæçµçãªçµæãè¿ããŸãããã®äŸã§ã¯ã<code>(5 + (3 * 2)) - (8 / 2)</code> ãèšç®ããæçµçãªçµæ <code>7</code> ãè¿ããŠããŸãã
ãã®ã³ãŒãã¯ããŒã¯ã³ããŒã¹ã§æ°åŒãè©äŸ¡ããã¹ã¿ãã¯ã䜿çšããŠæŒç®ãå®è¡ããŠããŸãã
[[ã«ããŽãª:ããã°ã©ãã³ã°èšèª]] | 2023-04-07T03:00:35Z | 2023-12-06T05:50:04Z | [
"ãã³ãã¬ãŒã:Wikipedia",
"ãã³ãã¬ãŒã:Main",
"ãã³ãã¬ãŒã:å
é ã«æ»ã"
] | https://ja.wikibooks.org/wiki/F_Sharp |
37,456 | é«çåŠæ ¡æ¥æ¬å²æ¢ç©¶/æ°ããªäžçŽã®æ¥æ¬ãžâ
| æ¬ç¯ããã3åã«åããŠãæ°ããªäžçŽã®æ¥æ¬ãžãã®å
容ã解説ããŸãã第1åç®ã§ã¯ãäžçæ
å¢ãèŠãŠãããŸãã
â»å·æŠåŸã®åœé瀟äŒã¯ã©ã®ããã«ãªããŸããã?
第äºæ¬¡äžç倧æŠåŸãã¢ã¡ãªã«ãšãœããšãé£éŠéã®å·æŠã¯1950幎ã«å
šçæãè¿ããŸããããã®åŸã1960幎代ãã1970幎代ã«ãããŠãã¢ã¡ãªã«ãšãœããšãé£éŠã®ç·åŒµã¯ç·©åããŸããããããã1979幎çµããã«ã¢ãã¬ãã¹ã¿ã³ã§ã¯ãŒãã¿ãçºçãããšããœããšãé£éŠã¯åœå
ã®èŠªãœæŽŸã厩å£ããªãããã«ãè»äºä»å
¥ããŸãããããã§ããã¢ãã¬ãã¹ã¿ã³åŽã®åæ¿åºå¢åã¯éåããã1989幎2æã®ãœé£è»å®å
šæ€éãŸã§ç¶ããŸãããã¢ã¡ãªã«å€§çµ±é ãžããŒã»ã«ãŒã¿ãŒã¯ããœããšãé£éŠã®ã¢ãã¬ãã¹ã¿ã³æ»æã«å察ã蚎ããŸããã以éãã¢ã¡ãªã«ã¯ãœããšãé£éŠã«çµæžå¶è£ãè¡ããã¢ã¹ã¯ã¯ãªãªã³ããã¯ã«éžæã掟é£ããªããªããŸããã
1981幎ãããã«ãã»ã¬ãŒã¬ã³ãã¢ã¡ãªã«å€§çµ±é ã«ãªããŸãããããã«ãã»ã¬ãŒã¬ã³ã¯ãã匷ãã¢ã¡ãªã«ããåãæ»ãããã«ãæŠç¥é²è¡æ§æ³ããšããŸããããŸãã察ãœããšãé£éŠæ¿çã§ãè»äºæ¡å€§è·¯ç·ããšãããã°ãã°æŒèª¬ã§ãœé£ããæªã®åžåœããšæ¹å€ããŸãããããã«ãã»ã¬ãŒã¬ã³ã®ãœããšãé£éŠã®æ¹å€ãããæ°å·æŠãå§ãŸããŸãããã®äžæ¹ã§ãäŒæ¥ã®ç«¶äºåãé«ããããã«ã倧å¹
ãªæžçšãèŠå¶ç·©åãåãããŸãããåãããã«ãã€ã®ãªã¹ã®ããŒã¬ã¬ããã»ãµããã£ãŒãæ¥æ¬ã®äžæœæ ¹åº·åŒããå
Œ
±æ¯åºã®åæžãåœæäŒæ¥ã®æ°å¶åãåŽåéåã®æå¶ãè¡ããŸããããã®ããã«ãå
é²è«žåœã®çµæžæ¿çã®æµãã¯å€§ããå€ãããŸãããå
é²è«žåœã®çµæžæ¿çã®æµãã«ã€ããŠã¯ãåŸæ¥ã®æå¹éèŠåµåºæ¿ç(ã±ã€ã³ãºæ¿ç)ãçŠç¥åœå®¶æ¿çã®åŠå®(æ°èªç±äž»çŸ©ã»æ°ä¿å®äž»çŸ©)ããšãããã«ãªããŸããããã®ãããªèæ¯ãããåŸæ¥ã®èªç±æŸä»»çµæžã«æ»ãããå°ããªæ¿åºãã®å®çŸã«åãçµã¿ãŸãããããããã¢ã¡ãªã«ã¯æ°å·æŠã®åœ±é¿ã§è»äºè²»è² æ
ã®å¢å ãããåœå
ç£æ¥ãè¡°éããããã«ãªããŸããã以éãã¢ã¡ãªã«ã§åœå®¶è²¡æ¿ãšåœéåæ¯ã®èµ€å(ååã®èµ€å)ããããããäžçæ倧ã®åµååœã«å€ãããŸããã
åœæãã¢ã¡ãªã«ãšãœããšãé£éŠã¯å€§éžé匟éããµã€ã«ã®é
åéã競äºããŠããã®ã§ãè»äºè²»ãå¢å ããŸããããœããšãé£éŠããã®è»äºè²»ã®å¢å ããæ·±å»ãªçµæžå±æ©ã«èŠèãããŸããã1982幎ããœããšãé£éŠå
񇜆
æžèšé·ã®ã¬ãªããŒãã»ãã¬ãžããã亡ããªããŸããããã®åŸããŠãŒãªã»ã¢ã³ããããæ¿æš©ãã³ã³ã¹ã¿ã³ãã£ã³ã»ãã§ã«ãã³ã³æ¿æš©ãçµãŠã1985幎ã«ããã€ã«ã»ãŽã«ããã§ããæžèšé·ã«å°±ããŸãããããã€ã«ã»ãŽã«ããã§ãã¯ããã¬ã¹ããã€ã«(åœå
äœå¶ã®ç«ãŠçŽã)ãè©Šã¿ãŸããããã¬ã¹ããã€ã«ã«ã¯ã15幎éã§æåŸãåå¢ãããèšç»ãå«ãŸããŠããŸããããŸããåžå Žåçã®å°å
¥ãã°ã©ã¹ãã¹ã(æ
å ±å
¬é)ãªã©ãæ¿æ²»ã®èªç±åã瀟äŒã®èªç±åã«ãåãçµã¿ãŸãããããã«ã¢ã¡ãªã«ãšä»²çŽãããããšã1988幎ã«ã¯ã¢ãã¬ãã¹ã¿ã³ããè»éãæ€éãããŸãããããããŠãã¢ã¡ãªã«ã®ãžã§ãŒãžã»ããŒããŒãã»ãŠã©ãŒã«ãŒã»ããã·ã¥å€§çµ±é ãšãã«ã¿å³¶ã§1989幎12æã«ç±³ãœéŠè³äŒè«ãè¡ãããŸãããç±³ãœéŠè³äŒè«ã§ãæ±è¥¿å·æŠã®çµçµãšæ°æ代ã®å¹éãã宣èšããŸããããã«ã¿äŒè«ã®å·æŠçµçµã¯ãåœæã®äººã
ã«è¡æãåããŸããã
ãœããšãé£éŠã¯æ±åŽé£å¶ã®äžäœåã«åãå
¥ããªããªããŸããã1989幎ããã«ãªã³ã®å£(æ±è¥¿åæã®çè·¡)ã厩å£ãããšãã«ãŒããã¢ã»ããŒã©ã³ãã»ãã«ã¬ãªã¢ãªã©ã§ç€ŸäŒäž»çŸ©æ¿æš©ã®åŽ©å£ãšæ¹é©ãé²ã¿ãŸãã(æ±æ¬§é©åœ)ã1990幎ã西ãã€ããæ±ãã€ããåžåãããšããã€ãçµ±äžãæãããŸããã1990幎ãããã€ã«ã»ãŽã«ããã§ãã¯ãœããšãé£éŠå¯äžã®å€§çµ±é ãšãªããŸããããããããã€ãçµ±äžä»¥éãå
±ç£äž»çŸ©äœå¶å
šäœãäžå®å®ã«ãªããŸããããã®ãããªèæ¯ãããè»éšã®ã¯ãŒãã¿ã1991幎8æã«èµ·ãããŸãããããªã¹ã»ãšãªãã£ã³ã¯ã¯ãŒãã¿ã®é®å§ã«ååããŸããã以éãããªã¹ã»ãšãªãã£ã³ã倧統é ã«ãªããå
񇜆
ã®äžå
æ¯é
äœå¶ã¯åŽ©å£ããŸãããæ§ãœããšãé£éŠã®è«žåœã§ããã·ã¢å
±ååœ(ãã·ã¢é£éŠ)ãäžå¿ã«ç·©ãããªé£åäœ(ç¬ç«åœå®¶å
±åäœ)ãžçãŸãå€ãããåžå Žçµæžåãé²ããããŸããããã®æ代ãå
šé¢çãªæ žæŠäºã®å±æ©ã¯å°ãªããæ žå
µåšåæžãžã®åãçµã¿ãè¡ãããŸããã1982幎ãã¢ã¡ãªã«ãšãœããšãé£éŠã®æ žå
µåšã¯ãåºå³¶ã§æäžããããããªååç匟ãåèš100äžååæã£ãŠããŸããã1982幎ã«æŠç¥å
µåšåæžäº€æžãå§ãŸããŸããããã®åŸã1987幎ã®äžè·é¢æ žæŠåå»æ¢æ¡çŽãçµãŠã1996幎ã«ãªããšãå
æ¬ççŠæ¢æ¡çŽãç· çµãããŸããã
äžæ¹ããšãŒãããå
±åäœã¯è¥¿åŽè«žåœã§æãç«ã£ãŠããŸãããããŒã¹ããªããæ¡çŽã1993幎ã«çµã°ãããšããšãŒãããå
±åäœã¯ãšãŒãããé£åã«å€ãããŸããããã®åŸãæ±ãšãŒãããè«žåœããšãŒãããé£åã«å çããŸãããããããŠãäžçåå°ã§æ°ããå°å秩åºã«åããåããèŠãããŸãããå·æŠãçµãã£ãŠãããæ±ã¢ãžã¢è«žåœéã§ã倧ããªåãããããŸããã1991幎ã倧éæ°åœ(éåœ)ãšæé®®æ°äž»äž»çŸ©äººæ°å
±ååœ(åæé®®)ã¯åæã«åœéé£åã«å çããŸããã2000幎ãéåœã®é倧äžå€§çµ±é ãšåæé®®ã®éæ£æ¥ç·æžèšã第1åååéŠè³äŒè«ãè¡ããŸããã第1åååéŠè³äŒè«ã§ã¯ããäºãã®çµ±äžãæãåãããããŸãã(ååå
±å宣èš)ã1992幎ããããã ã»äžåœã»éåœã®åœäº€ãå埩ããŸããã1995幎ããããã ãæ±åã¢ãžã¢è«žåœé£å(ASEAN)ã«å çããŸãããæ±åã¢ãžã¢è«žåœé£åã¯ãæ±åã¢ãžã¢ã®å°åååæ©é¢ãšããŠå®çããŸãããæé®®å島ã®æ žå±æ©ã®ãããªå®å
šä¿éã®äžå®ãç¶ããŠãã1997幎ã®ã¢ãžã¢é貚å±æ©ããã£ãŠããæ±ã¢ãžã¢çµæžã¯é 調ã«æé·ãç¶ããŸããããã®çµæãæ±ã¢ãžã¢ã¯äžçæ倧ã®çµæžåãšãªããŸããã
1970幎代ã«å
¥ããšãç£æ²¹åœã¯ç³æ²¹éçºã§è±ãã«ãªããçµæžæé·ã®çããªåœã»å°å(æ°èå·¥æ¥çµæžå°å:NIEs)ãçŸããŸãããã¢ãžã¢æ°èå·¥æ¥çµæžå°åã¯ãã¢ãžã¢ã®éåœã»ã·ã³ã¬ããŒã«ã»å°æ¹Ÿã»éŠæž¯ã§æãç«ã£ãŠããŸãããã®ãããªåœã¯ãå€åœã®è³æ¬ãæè¡ãåãå
¥ãã€ã€ã茞åºå¿ååã®å·¥æ¥åãé²ããŠãçµæžæé·ãç¶ããŸãããæ¥æ¬ãšã¢ãžã¢æ°èå·¥æ¥çµæžå°åã¯ãæ±ã¢ãžã¢ã®çµæžæé·ã1990幎代ãŸã§æ¯ããŠããŸãããäžæ¹ã飢é€ãšè²§å°ãæ°èè«žåœã®å€§åã§åé¡ã«ãªããŸããã
äžè¯äººæ°å
±ååœã¯ãåžå Žçµæžåãé²ããããã1970幎代åŸåããæ¹é©éæŸæ¿çãå°å
¥ããŸããããã®åŸã1992幎ãã瀟äŒäž»çŸ©åžå Žçµæžãå°å
¥ããŸããããã®çµæãäžè¯äººæ°å
±ååœã¯2000幎代ã«é«åºŠçµæžæé·æãè¿ããŸããäžåœã®åœå
ç·çç£ã¯2010幎ãè¿ãããšãæ¥æ¬ãæããŠäžç第2äœã«ãªããŸãããå·æŠåŸã人ã»ååã»è³æ¬ã»æ
å ±ã¯äžçã®åœå¢ãè¶ããŠèªç±ã«åãããã«ãªããŸãã(ã°ããŒãã«å)ã
â»å·æŠçµçµåŸãã©ãããŠæ°äž»åãåå°ã§èµ·ãããŸããã?
å·æŠãçµãããšã瀟äŒäž»çŸ©çµæžäœå¶ããåžå Žäž»çŸ©çµæžäœå¶ã«å€ãããæ¿æ²»äœå¶ãæ°äž»åãããŸãããå°æ¹Ÿã®æå³ä»€ã¯1949幎ã«å°å
¥ãããŠããã1987幎ã«è§£é€ãããŸãããéåœã§ã1987幎ãéåœã®è»äºæ¿æš©ãæ°äž»å宣èšãè¡ããŸãããããããåžæ°ããæ¿æ²»çæ¹é©ãæ±ãã声ã¯é«ãŸããŸããããã®åŸã1993幎ã«åžæ°éå家ã®éæ³³äžã倧統é ã«ãªããŸãããããããŠæ°äž»åãé²ã¿ãåå°ã§ç¬è£çäœå¶ãäžæããŸãããäžåœã§ãæ°äž»åéåãèµ·ãããŸãããããããäžåœæ¿åºã¯1989幎ã«æ°äž»åéåãæŠåã§åŒŸå§ããŸãã(倩å®éäºä»¶)ã
人暩ã¯ããããŸã§ã®æ¿æ²»äœå¶ã»åœéé¢ä¿ã®äžã§ç¡èŠãããŠããŸãããå·æŠãçµãããšã人暩ãæ±ãã声ã¯ããã«åŒ·ãŸããŸããã1991幎ãå
æ
°å®å©Šã®éåœäººå¥³æ§ããæ¥æ¬è»ã¯æ
°å®æã®èšçœ®ã»éå¶ã»æ
°å®å©Šã®ç§»åã«é¢ãã£ãŠãããããšè£å€ãèµ·ãããŸããããã®äºå®ã«ã€ããŠæ¥æ¬æ¿åºã¯èª¿æ»ãè¡ããŸããã1993幎ã«ãªã£ãŠããã®äºå®ãèªããŸãããæ¥æ¬æ¿åºã¯åçã®æå³ã蟌ããŠãååœã®å
æ
°å®å©Šã«ããè©«ã³ãšåçã®æ°æã¡ããéããŸããããŸããæŽå²ç 究ãšæè²ããæªæ¥ã®èšæ¶ã«ãšã©ããããšæ¹ããŠäŒããŸãã(æ²³éå®æ¿é·å®è«è©±)ããã®åŸãæ°éã®åºé(ã¢ãžã¢å¥³æ§åºé)ãã€ãããã被害è
ã®ææžã«åªããŸãããã¢ãžã¢å¥³æ§åºéã¯è£åéã®åãåãã決å®ããŸãããããããã¢ãžã¢å¥³æ§åºéãè³ åéãã©ã®ããã«æäŸããªããã°ãªããªããã«é¢ããŠãååœã»åœå
ã§æèŠãåãããŸããã2015幎ãæ¥æ¬æ¿åºãšéåœæ¿åºã¯æ
°å®å©Šåé¡ã®æçµçãªè§£æ±ºã«åããŠå解ããŸããã
â»åœéé£åå¹³åç¶æ掻åååæ³ã¯ããªã第äºæ¬¡äžç倧æŠåŸã®æ¥æ¬ã«å€§ããªå€åããããããŸããã?
å·æŠãçµãããšããœããšãé£éŠãšã¢ã¡ãªã«ã¯æåŠæš©ã䜿ããªããªããŸãããããããŠåœé£ã®å¹³åç¶æ掻åã¯äžæçã«åŒ·ãŸããŸããã1990幎ã®æµ·éšä¿æš¹å
é£ã®æã«ãã€ã©ã¯ãçªç¶ã¯ãŠã§ãŒãã䟵æ»ããŸããã1991幎ãå€åœç±è»(ã¢ã¡ãªã«ã»ã€ã®ãªã¹ã»ãã©ã³ã¹)ã¯åœéé£åã®å®å
šä¿éçäºäŒæ±ºè°ãåããŠãã€ã©ã¯ã«è»äºæ»æãè¡ããŸãã(湟岞æŠäº)ãäžæ¹ãã¢ã¡ãªã«ããèªè¡éãéãããã«åŒ·ãæ±ããããŠããæ¥æ¬ã¯èªè¡éã掟é£ããŠããŸããããã®ä»£ãããç·é¡130åãã«ã®æŠäºè²»çšãå€åœéè»ã«æ¯æŽããŸãããããããé¢ä¿è«žåœããæè¬ãããªãã£ãã®ã§ã湟岞æŠäºåŸãæ¥æ¬ã¯æµ·äžèªè¡éã®ææµ·èããã«ã·ã¢æ¹Ÿã«éããŸããã
1992幎ã宮沢åäžå
é£ã¯ãæ¥æ¬ãåœéé£åã®å¹³åç¶æ掻å(PKO)ã«åå åºæ¥ãããã«ãåœéé£åå¹³åç¶æ掻åååæ³ãæç«ãããŸãããåœéé£åå¹³åç¶æ掻åååæ³ãæç«ããŠãããèªè¡éãæµ·å€ã«éããããã«ãªããã«ã³ããžã¢ãªã©ã§åæŠç£èŠãè¡ãããã«ãªããŸãããã¢ã¡ãªã«ã¯ãåœéè²¢ç®ãçç±ã«èªè¡éãæµ·å€ã«éãããã«æ±ããŸããããããããã®ãããªã¢ã¡ãªã«ã®è¡åãæ¥æ¬åœæ²æ³ã®å¹³å䞻矩ã«éåããŠããªãããšæ¹å€ãããŸãããããããŠãã¢ã¡ãªã«äž»å°ã®åœé瀟äŒã1990幎代ã«åŒ·åããããšãæ¥æ¬åœæ²æ³ã«å€§ããªå€åããããããŸããããã®åŸã次ã®ãããªåœãå°åã«èªè¡éãéã£ãŠããŸãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ¬ç¯ããã3åã«åããŠãæ°ããªäžçŽã®æ¥æ¬ãžãã®å
容ã解説ããŸãã第1åç®ã§ã¯ãäžçæ
å¢ãèŠãŠãããŸãã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "â»å·æŠåŸã®åœé瀟äŒã¯ã©ã®ããã«ãªããŸããã?",
"title": "å·æŠã®çµçµãšã°ããŒãã«å"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "第äºæ¬¡äžç倧æŠåŸãã¢ã¡ãªã«ãšãœããšãé£éŠéã®å·æŠã¯1950幎ã«å
šçæãè¿ããŸããããã®åŸã1960幎代ãã1970幎代ã«ãããŠãã¢ã¡ãªã«ãšãœããšãé£éŠã®ç·åŒµã¯ç·©åããŸããããããã1979幎çµããã«ã¢ãã¬ãã¹ã¿ã³ã§ã¯ãŒãã¿ãçºçãããšããœããšãé£éŠã¯åœå
ã®èŠªãœæŽŸã厩å£ããªãããã«ãè»äºä»å
¥ããŸãããããã§ããã¢ãã¬ãã¹ã¿ã³åŽã®åæ¿åºå¢åã¯éåããã1989幎2æã®ãœé£è»å®å
šæ€éãŸã§ç¶ããŸãããã¢ã¡ãªã«å€§çµ±é ãžããŒã»ã«ãŒã¿ãŒã¯ããœããšãé£éŠã®ã¢ãã¬ãã¹ã¿ã³æ»æã«å察ã蚎ããŸããã以éãã¢ã¡ãªã«ã¯ãœããšãé£éŠã«çµæžå¶è£ãè¡ããã¢ã¹ã¯ã¯ãªãªã³ããã¯ã«éžæã掟é£ããªããªããŸããã",
"title": "å·æŠã®çµçµãšã°ããŒãã«å"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "1981幎ãããã«ãã»ã¬ãŒã¬ã³ãã¢ã¡ãªã«å€§çµ±é ã«ãªããŸãããããã«ãã»ã¬ãŒã¬ã³ã¯ãã匷ãã¢ã¡ãªã«ããåãæ»ãããã«ãæŠç¥é²è¡æ§æ³ããšããŸããããŸãã察ãœããšãé£éŠæ¿çã§ãè»äºæ¡å€§è·¯ç·ããšãããã°ãã°æŒèª¬ã§ãœé£ããæªã®åžåœããšæ¹å€ããŸãããããã«ãã»ã¬ãŒã¬ã³ã®ãœããšãé£éŠã®æ¹å€ãããæ°å·æŠãå§ãŸããŸãããã®äžæ¹ã§ãäŒæ¥ã®ç«¶äºåãé«ããããã«ã倧å¹
ãªæžçšãèŠå¶ç·©åãåãããŸãããåãããã«ãã€ã®ãªã¹ã®ããŒã¬ã¬ããã»ãµããã£ãŒãæ¥æ¬ã®äžæœæ ¹åº·åŒããå
Œ
±æ¯åºã®åæžãåœæäŒæ¥ã®æ°å¶åãåŽåéåã®æå¶ãè¡ããŸããããã®ããã«ãå
é²è«žåœã®çµæžæ¿çã®æµãã¯å€§ããå€ãããŸãããå
é²è«žåœã®çµæžæ¿çã®æµãã«ã€ããŠã¯ãåŸæ¥ã®æå¹éèŠåµåºæ¿ç(ã±ã€ã³ãºæ¿ç)ãçŠç¥åœå®¶æ¿çã®åŠå®(æ°èªç±äž»çŸ©ã»æ°ä¿å®äž»çŸ©)ããšãããã«ãªããŸããããã®ãããªèæ¯ãããåŸæ¥ã®èªç±æŸä»»çµæžã«æ»ãããå°ããªæ¿åºãã®å®çŸã«åãçµã¿ãŸãããããããã¢ã¡ãªã«ã¯æ°å·æŠã®åœ±é¿ã§è»äºè²»è² æ
ã®å¢å ãããåœå
ç£æ¥ãè¡°éããããã«ãªããŸããã以éãã¢ã¡ãªã«ã§åœå®¶è²¡æ¿ãšåœéåæ¯ã®èµ€å(ååã®èµ€å)ããããããäžçæ倧ã®åµååœã«å€ãããŸããã",
"title": "å·æŠã®çµçµãšã°ããŒãã«å"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "åœæãã¢ã¡ãªã«ãšãœããšãé£éŠã¯å€§éžé匟éããµã€ã«ã®é
åéã競äºããŠããã®ã§ãè»äºè²»ãå¢å ããŸããããœããšãé£éŠããã®è»äºè²»ã®å¢å ããæ·±å»ãªçµæžå±æ©ã«èŠèãããŸããã1982幎ããœããšãé£éŠå
񇜆
æžèšé·ã®ã¬ãªããŒãã»ãã¬ãžããã亡ããªããŸããããã®åŸããŠãŒãªã»ã¢ã³ããããæ¿æš©ãã³ã³ã¹ã¿ã³ãã£ã³ã»ãã§ã«ãã³ã³æ¿æš©ãçµãŠã1985幎ã«ããã€ã«ã»ãŽã«ããã§ããæžèšé·ã«å°±ããŸãããããã€ã«ã»ãŽã«ããã§ãã¯ããã¬ã¹ããã€ã«(åœå
äœå¶ã®ç«ãŠçŽã)ãè©Šã¿ãŸããããã¬ã¹ããã€ã«ã«ã¯ã15幎éã§æåŸãåå¢ãããèšç»ãå«ãŸããŠããŸããããŸããåžå Žåçã®å°å
¥ãã°ã©ã¹ãã¹ã(æ
å ±å
¬é)ãªã©ãæ¿æ²»ã®èªç±åã瀟äŒã®èªç±åã«ãåãçµã¿ãŸãããããã«ã¢ã¡ãªã«ãšä»²çŽãããããšã1988幎ã«ã¯ã¢ãã¬ãã¹ã¿ã³ããè»éãæ€éãããŸãããããããŠãã¢ã¡ãªã«ã®ãžã§ãŒãžã»ããŒããŒãã»ãŠã©ãŒã«ãŒã»ããã·ã¥å€§çµ±é ãšãã«ã¿å³¶ã§1989幎12æã«ç±³ãœéŠè³äŒè«ãè¡ãããŸãããç±³ãœéŠè³äŒè«ã§ãæ±è¥¿å·æŠã®çµçµãšæ°æ代ã®å¹éãã宣èšããŸããããã«ã¿äŒè«ã®å·æŠçµçµã¯ãåœæã®äººã
ã«è¡æãåããŸããã",
"title": "å·æŠã®çµçµãšã°ããŒãã«å"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "ãœããšãé£éŠã¯æ±åŽé£å¶ã®äžäœåã«åãå
¥ããªããªããŸããã1989幎ããã«ãªã³ã®å£(æ±è¥¿åæã®çè·¡)ã厩å£ãããšãã«ãŒããã¢ã»ããŒã©ã³ãã»ãã«ã¬ãªã¢ãªã©ã§ç€ŸäŒäž»çŸ©æ¿æš©ã®åŽ©å£ãšæ¹é©ãé²ã¿ãŸãã(æ±æ¬§é©åœ)ã1990幎ã西ãã€ããæ±ãã€ããåžåãããšããã€ãçµ±äžãæãããŸããã1990幎ãããã€ã«ã»ãŽã«ããã§ãã¯ãœããšãé£éŠå¯äžã®å€§çµ±é ãšãªããŸããããããããã€ãçµ±äžä»¥éãå
±ç£äž»çŸ©äœå¶å
šäœãäžå®å®ã«ãªããŸããããã®ãããªèæ¯ãããè»éšã®ã¯ãŒãã¿ã1991幎8æã«èµ·ãããŸãããããªã¹ã»ãšãªãã£ã³ã¯ã¯ãŒãã¿ã®é®å§ã«ååããŸããã以éãããªã¹ã»ãšãªãã£ã³ã倧統é ã«ãªããå
񇜆
ã®äžå
æ¯é
äœå¶ã¯åŽ©å£ããŸãããæ§ãœããšãé£éŠã®è«žåœã§ããã·ã¢å
±ååœ(ãã·ã¢é£éŠ)ãäžå¿ã«ç·©ãããªé£åäœ(ç¬ç«åœå®¶å
±åäœ)ãžçãŸãå€ãããåžå Žçµæžåãé²ããããŸããããã®æ代ãå
šé¢çãªæ žæŠäºã®å±æ©ã¯å°ãªããæ žå
µåšåæžãžã®åãçµã¿ãè¡ãããŸããã1982幎ãã¢ã¡ãªã«ãšãœããšãé£éŠã®æ žå
µåšã¯ãåºå³¶ã§æäžããããããªååç匟ãåèš100äžååæã£ãŠããŸããã1982幎ã«æŠç¥å
µåšåæžäº€æžãå§ãŸããŸããããã®åŸã1987幎ã®äžè·é¢æ žæŠåå»æ¢æ¡çŽãçµãŠã1996幎ã«ãªããšãå
æ¬ççŠæ¢æ¡çŽãç· çµãããŸããã",
"title": "å·æŠã®çµçµãšã°ããŒãã«å"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "äžæ¹ããšãŒãããå
±åäœã¯è¥¿åŽè«žåœã§æãç«ã£ãŠããŸãããããŒã¹ããªããæ¡çŽã1993幎ã«çµã°ãããšããšãŒãããå
±åäœã¯ãšãŒãããé£åã«å€ãããŸããããã®åŸãæ±ãšãŒãããè«žåœããšãŒãããé£åã«å çããŸãããããããŠãäžçåå°ã§æ°ããå°å秩åºã«åããåããèŠãããŸãããå·æŠãçµãã£ãŠãããæ±ã¢ãžã¢è«žåœéã§ã倧ããªåãããããŸããã1991幎ã倧éæ°åœ(éåœ)ãšæé®®æ°äž»äž»çŸ©äººæ°å
±ååœ(åæé®®)ã¯åæã«åœéé£åã«å çããŸããã2000幎ãéåœã®é倧äžå€§çµ±é ãšåæé®®ã®éæ£æ¥ç·æžèšã第1åååéŠè³äŒè«ãè¡ããŸããã第1åååéŠè³äŒè«ã§ã¯ããäºãã®çµ±äžãæãåãããããŸãã(ååå
±å宣èš)ã1992幎ããããã ã»äžåœã»éåœã®åœäº€ãå埩ããŸããã1995幎ããããã ãæ±åã¢ãžã¢è«žåœé£å(ASEAN)ã«å çããŸãããæ±åã¢ãžã¢è«žåœé£åã¯ãæ±åã¢ãžã¢ã®å°åååæ©é¢ãšããŠå®çããŸãããæé®®å島ã®æ žå±æ©ã®ãããªå®å
šä¿éã®äžå®ãç¶ããŠãã1997幎ã®ã¢ãžã¢é貚å±æ©ããã£ãŠããæ±ã¢ãžã¢çµæžã¯é 調ã«æé·ãç¶ããŸããããã®çµæãæ±ã¢ãžã¢ã¯äžçæ倧ã®çµæžåãšãªããŸããã",
"title": "å·æŠã®çµçµãšã°ããŒãã«å"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "1970幎代ã«å
¥ããšãç£æ²¹åœã¯ç³æ²¹éçºã§è±ãã«ãªããçµæžæé·ã®çããªåœã»å°å(æ°èå·¥æ¥çµæžå°å:NIEs)ãçŸããŸãããã¢ãžã¢æ°èå·¥æ¥çµæžå°åã¯ãã¢ãžã¢ã®éåœã»ã·ã³ã¬ããŒã«ã»å°æ¹Ÿã»éŠæž¯ã§æãç«ã£ãŠããŸãããã®ãããªåœã¯ãå€åœã®è³æ¬ãæè¡ãåãå
¥ãã€ã€ã茞åºå¿ååã®å·¥æ¥åãé²ããŠãçµæžæé·ãç¶ããŸãããæ¥æ¬ãšã¢ãžã¢æ°èå·¥æ¥çµæžå°åã¯ãæ±ã¢ãžã¢ã®çµæžæé·ã1990幎代ãŸã§æ¯ããŠããŸãããäžæ¹ã飢é€ãšè²§å°ãæ°èè«žåœã®å€§åã§åé¡ã«ãªããŸããã",
"title": "å·æŠã®çµçµãšã°ããŒãã«å"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "äžè¯äººæ°å
±ååœã¯ãåžå Žçµæžåãé²ããããã1970幎代åŸåããæ¹é©éæŸæ¿çãå°å
¥ããŸããããã®åŸã1992幎ãã瀟äŒäž»çŸ©åžå Žçµæžãå°å
¥ããŸããããã®çµæãäžè¯äººæ°å
±ååœã¯2000幎代ã«é«åºŠçµæžæé·æãè¿ããŸããäžåœã®åœå
ç·çç£ã¯2010幎ãè¿ãããšãæ¥æ¬ãæããŠäžç第2äœã«ãªããŸãããå·æŠåŸã人ã»ååã»è³æ¬ã»æ
å ±ã¯äžçã®åœå¢ãè¶ããŠèªç±ã«åãããã«ãªããŸãã(ã°ããŒãã«å)ã",
"title": "å·æŠã®çµçµãšã°ããŒãã«å"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "â»å·æŠçµçµåŸãã©ãããŠæ°äž»åãåå°ã§èµ·ãããŸããã?",
"title": "å·æŠã®çµçµãšæ°äž»åã®é²å±"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "å·æŠãçµãããšã瀟äŒäž»çŸ©çµæžäœå¶ããåžå Žäž»çŸ©çµæžäœå¶ã«å€ãããæ¿æ²»äœå¶ãæ°äž»åãããŸãããå°æ¹Ÿã®æå³ä»€ã¯1949幎ã«å°å
¥ãããŠããã1987幎ã«è§£é€ãããŸãããéåœã§ã1987幎ãéåœã®è»äºæ¿æš©ãæ°äž»å宣èšãè¡ããŸãããããããåžæ°ããæ¿æ²»çæ¹é©ãæ±ãã声ã¯é«ãŸããŸããããã®åŸã1993幎ã«åžæ°éå家ã®éæ³³äžã倧統é ã«ãªããŸãããããããŠæ°äž»åãé²ã¿ãåå°ã§ç¬è£çäœå¶ãäžæããŸãããäžåœã§ãæ°äž»åéåãèµ·ãããŸãããããããäžåœæ¿åºã¯1989幎ã«æ°äž»åéåãæŠåã§åŒŸå§ããŸãã(倩å®éäºä»¶)ã",
"title": "å·æŠã®çµçµãšæ°äž»åã®é²å±"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "人暩ã¯ããããŸã§ã®æ¿æ²»äœå¶ã»åœéé¢ä¿ã®äžã§ç¡èŠãããŠããŸãããå·æŠãçµãããšã人暩ãæ±ãã声ã¯ããã«åŒ·ãŸããŸããã1991幎ãå
æ
°å®å©Šã®éåœäººå¥³æ§ããæ¥æ¬è»ã¯æ
°å®æã®èšçœ®ã»éå¶ã»æ
°å®å©Šã®ç§»åã«é¢ãã£ãŠãããããšè£å€ãèµ·ãããŸããããã®äºå®ã«ã€ããŠæ¥æ¬æ¿åºã¯èª¿æ»ãè¡ããŸããã1993幎ã«ãªã£ãŠããã®äºå®ãèªããŸãããæ¥æ¬æ¿åºã¯åçã®æå³ã蟌ããŠãååœã®å
æ
°å®å©Šã«ããè©«ã³ãšåçã®æ°æã¡ããéããŸããããŸããæŽå²ç 究ãšæè²ããæªæ¥ã®èšæ¶ã«ãšã©ããããšæ¹ããŠäŒããŸãã(æ²³éå®æ¿é·å®è«è©±)ããã®åŸãæ°éã®åºé(ã¢ãžã¢å¥³æ§åºé)ãã€ãããã被害è
ã®ææžã«åªããŸãããã¢ãžã¢å¥³æ§åºéã¯è£åéã®åãåãã決å®ããŸãããããããã¢ãžã¢å¥³æ§åºéãè³ åéãã©ã®ããã«æäŸããªããã°ãªããªããã«é¢ããŠãååœã»åœå
ã§æèŠãåãããŸããã2015幎ãæ¥æ¬æ¿åºãšéåœæ¿åºã¯æ
°å®å©Šåé¡ã®æçµçãªè§£æ±ºã«åããŠå解ããŸããã",
"title": "å·æŠã®çµçµãšæ°äž»åã®é²å±"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "â»åœéé£åå¹³åç¶æ掻åååæ³ã¯ããªã第äºæ¬¡äžç倧æŠåŸã®æ¥æ¬ã«å€§ããªå€åããããããŸããã?",
"title": "湟岞æŠäºãšå¹³åç¶æ掻å"
},
{
"paragraph_id": 13,
"tag": "p",
"text": "å·æŠãçµãããšããœããšãé£éŠãšã¢ã¡ãªã«ã¯æåŠæš©ã䜿ããªããªããŸãããããããŠåœé£ã®å¹³åç¶æ掻åã¯äžæçã«åŒ·ãŸããŸããã1990幎ã®æµ·éšä¿æš¹å
é£ã®æã«ãã€ã©ã¯ãçªç¶ã¯ãŠã§ãŒãã䟵æ»ããŸããã1991幎ãå€åœç±è»(ã¢ã¡ãªã«ã»ã€ã®ãªã¹ã»ãã©ã³ã¹)ã¯åœéé£åã®å®å
šä¿éçäºäŒæ±ºè°ãåããŠãã€ã©ã¯ã«è»äºæ»æãè¡ããŸãã(湟岞æŠäº)ãäžæ¹ãã¢ã¡ãªã«ããèªè¡éãéãããã«åŒ·ãæ±ããããŠããæ¥æ¬ã¯èªè¡éã掟é£ããŠããŸããããã®ä»£ãããç·é¡130åãã«ã®æŠäºè²»çšãå€åœéè»ã«æ¯æŽããŸãããããããé¢ä¿è«žåœããæè¬ãããªãã£ãã®ã§ã湟岞æŠäºåŸãæ¥æ¬ã¯æµ·äžèªè¡éã®ææµ·èããã«ã·ã¢æ¹Ÿã«éããŸããã",
"title": "湟岞æŠäºãšå¹³åç¶æ掻å"
},
{
"paragraph_id": 14,
"tag": "p",
"text": "1992幎ã宮沢åäžå
é£ã¯ãæ¥æ¬ãåœéé£åã®å¹³åç¶æ掻å(PKO)ã«åå åºæ¥ãããã«ãåœéé£åå¹³åç¶æ掻åååæ³ãæç«ãããŸãããåœéé£åå¹³åç¶æ掻åååæ³ãæç«ããŠãããèªè¡éãæµ·å€ã«éããããã«ãªããã«ã³ããžã¢ãªã©ã§åæŠç£èŠãè¡ãããã«ãªããŸãããã¢ã¡ãªã«ã¯ãåœéè²¢ç®ãçç±ã«èªè¡éãæµ·å€ã«éãããã«æ±ããŸããããããããã®ãããªã¢ã¡ãªã«ã®è¡åãæ¥æ¬åœæ²æ³ã®å¹³å䞻矩ã«éåããŠããªãããšæ¹å€ãããŸãããããããŠãã¢ã¡ãªã«äž»å°ã®åœé瀟äŒã1990幎代ã«åŒ·åããããšãæ¥æ¬åœæ²æ³ã«å€§ããªå€åããããããŸããããã®åŸã次ã®ãããªåœãå°åã«èªè¡éãéã£ãŠããŸãã",
"title": "湟岞æŠäºãšå¹³åç¶æ掻å"
}
] | æ¬ç¯ãããïŒåã«åããŠãæ°ããªäžçŽã®æ¥æ¬ãžãã®å
容ã解説ããŸãã第ïŒåç®ã§ã¯ãäžçæ
å¢ãèŠãŠãããŸãã | [[å°åŠæ ¡ã»äžåŠæ ¡ã»é«çåŠæ ¡ã®åŠç¿]]>[[é«çåŠæ ¡ã®åŠç¿]]>[[é«çåŠæ ¡å°çæŽå²]]>[[é«çåŠæ ¡æ¥æ¬å²æ¢ç©¶]]>æ°ããªäžçŽã®æ¥æ¬ãžâ
æ¬ç¯ãããïŒåã«åããŠãæ°ããªäžçŽã®æ¥æ¬ãžãã®å
容ã解説ããŸãã第ïŒåç®ã§ã¯ãäžçæ
å¢ãèŠãŠãããŸãã
== å·æŠã®çµçµãšã°ããŒãã«å ==
â»å·æŠåŸã®åœé瀟äŒã¯ã©ã®ããã«ãªããŸãããïŒ
ã第äºæ¬¡äžç倧æŠåŸãã¢ã¡ãªã«ãšãœããšãé£éŠéã®å·æŠã¯ïŒïŒïŒïŒå¹Žã«å
šçæãè¿ããŸããããã®åŸãïŒïŒïŒïŒå¹Žä»£ããïŒïŒïŒïŒå¹Žä»£ã«ãããŠãã¢ã¡ãªã«ãšãœããšãé£éŠã®ç·åŒµã¯ç·©åããŸãããããããïŒïŒïŒïŒå¹Žçµããã«ã¢ãã¬ãã¹ã¿ã³ã§ã¯ãŒãã¿ãçºçãããšããœããšãé£éŠã¯åœå
ã®èŠªãœæŽŸã厩å£ããªãããã«ãè»äºä»å
¥ããŸãããããã§ããã¢ãã¬ãã¹ã¿ã³åŽã®åæ¿åºå¢åã¯éåãããïŒïŒïŒïŒå¹ŽïŒæã®ãœé£è»å®å
šæ€éãŸã§ç¶ããŸãããã¢ã¡ãªã«å€§çµ±é [[w:ãžããŒã»ã«ãŒã¿ãŒ|'''ãžããŒã»ã«ãŒã¿ãŒ''']]ã¯ããœããšãé£éŠã®ã¢ãã¬ãã¹ã¿ã³æ»æã«å察ã蚎ããŸããã以éãã¢ã¡ãªã«ã¯ãœããšãé£éŠã«çµæžå¶è£ãè¡ããã¢ã¹ã¯ã¯ãªãªã³ããã¯ã«éžæã掟é£ããªããªããŸããã
ãïŒïŒïŒïŒå¹Žã'''[[w:ããã«ãã»ã¬ãŒã¬ã³|ããã«ãã»ã¬ãŒã¬ã³]]'''ãã¢ã¡ãªã«å€§çµ±é ã«ãªããŸãããããã«ãã»ã¬ãŒã¬ã³ã¯ãã匷ãã¢ã¡ãªã«ããåãæ»ãããã«ãæŠç¥é²è¡æ§æ³ããšããŸããããŸãã察ãœããšãé£éŠæ¿çã§ãè»äºæ¡å€§è·¯ç·ããšãããã°ãã°æŒèª¬ã§ãœé£ããæªã®åžåœããšæ¹å€ããŸãããããã«ãã»ã¬ãŒã¬ã³ã®ãœããšãé£éŠã®æ¹å€ããã'''æ°å·æŠ'''ãå§ãŸããŸãããã®äžæ¹ã§ãäŒæ¥ã®ç«¶äºåãé«ããããã«ã倧å¹
ãªæžçšãèŠå¶ç·©åãåãããŸãããåãããã«ãã€ã®ãªã¹ã®[[w:ããŒã¬ã¬ããã»ãµããã£ãŒ|ããŒã¬ã¬ããã»ãµããã£ãŒ]]ãæ¥æ¬ã®[[w:äžæœæ ¹åº·åŒ|äžæœæ ¹åº·åŒ]]ããå
Œ
±æ¯åºã®åæžãåœæäŒæ¥ã®æ°å¶åãåŽåéåã®æå¶ãè¡ããŸããããã®ããã«ãå
é²è«žåœã®çµæžæ¿çã®æµãã¯å€§ããå€ãããŸãããå
é²è«žåœã®çµæžæ¿çã®æµãã«ã€ããŠã¯ãåŸæ¥ã®æå¹éèŠåµåºæ¿çïŒã±ã€ã³ãºæ¿çïŒãçŠç¥åœå®¶æ¿çã®åŠå®ïŒæ°èªç±äž»çŸ©ã»æ°ä¿å®äž»çŸ©ïŒããšãããã«ãªããŸããããã®ãããªèæ¯ãããåŸæ¥ã®èªç±æŸä»»çµæžã«æ»ãããå°ããªæ¿åºãã®å®çŸã«åãçµã¿ãŸãããããããã¢ã¡ãªã«ã¯æ°å·æŠã®åœ±é¿ã§è»äºè²»è² æ
ã®å¢å ãããåœå
ç£æ¥ãè¡°éããããã«ãªããŸããã以éãã¢ã¡ãªã«ã§åœå®¶è²¡æ¿ãšåœéåæ¯ã®èµ€åïŒ'''ååã®èµ€å'''ïŒããããããäžçæ倧ã®åµååœã«å€ãããŸããã
ãåœæãã¢ã¡ãªã«ãšãœããšãé£éŠã¯å€§éžé匟éããµã€ã«ã®é
åéã競äºããŠããã®ã§ãè»äºè²»ãå¢å ããŸããããœããšãé£éŠããã®è»äºè²»ã®å¢å ããæ·±å»ãªçµæžå±æ©ã«èŠèãããŸãããïŒïŒïŒïŒå¹Žããœããšãé£éŠå
񇜆
æžèšé·ã®ã¬ãªããŒãã»ãã¬ãžããã亡ããªããŸããããã®åŸããŠãŒãªã»ã¢ã³ããããæ¿æš©ãã³ã³ã¹ã¿ã³ãã£ã³ã»ãã§ã«ãã³ã³æ¿æš©ãçµãŠãïŒïŒïŒïŒå¹Žã«[[w:ããã€ã«ã»ãŽã«ããã§ã|'''ããã€ã«ã»ãŽã«ããã§ã''']]ãæžèšé·ã«å°±ããŸãããããã€ã«ã»ãŽã«ããã§ãã¯ã[[w:ãã¬ã¹ããã€ã«|'''ãã¬ã¹ããã€ã«''']]ïŒåœå
äœå¶ã®ç«ãŠçŽãïŒãè©Šã¿ãŸããããã¬ã¹ããã€ã«ã«ã¯ãïŒïŒå¹Žéã§æåŸãåå¢ãããèšç»ãå«ãŸããŠããŸããããŸããåžå Žåçã®å°å
¥ã[[w:ã°ã©ã¹ãã¹ã|ã°ã©ã¹ãã¹ã]]ïŒæ
å ±å
¬éïŒãªã©ãæ¿æ²»ã®èªç±åã瀟äŒã®èªç±åã«ãåãçµã¿ãŸãããããã«ã¢ã¡ãªã«ãšä»²çŽãããããšãïŒïŒïŒïŒå¹Žã«ã¯ã¢ãã¬ãã¹ã¿ã³ããè»éãæ€éãããŸãããããããŠãã¢ã¡ãªã«ã®[[w:ãžã§ãŒãžã»Hã»Wã»ããã·ã¥|'''ãžã§ãŒãžã»ããŒããŒãã»ãŠã©ãŒã«ãŒã»ããã·ã¥''']]倧統é ãšãã«ã¿å³¶ã§ïŒïŒïŒïŒå¹ŽïŒïŒæã«ç±³ãœéŠè³äŒè«ãè¡ãããŸãããç±³ãœéŠè³äŒè«ã§ãæ±è¥¿å·æŠã®çµçµãšæ°æ代ã®å¹éãã宣èšããŸããã[[w:ãã«ã¿äŒè«|ãã«ã¿äŒè«]]ã®'''å·æŠçµçµ'''ã¯ãåœæã®äººã
ã«è¡æãåããŸããã
ããœããšãé£éŠã¯æ±åŽé£å¶ã®äžäœåã«åãå
¥ããªããªããŸãããïŒïŒïŒïŒå¹Žããã«ãªã³ã®å£ïŒæ±è¥¿åæã®çè·¡ïŒã厩å£ãããšãã«ãŒããã¢ã»ããŒã©ã³ãã»ãã«ã¬ãªã¢ãªã©ã§ç€ŸäŒäž»çŸ©æ¿æš©ã®åŽ©å£ãšæ¹é©ãé²ã¿ãŸããïŒ'''æ±æ¬§é©åœ'''ïŒãïŒïŒïŒïŒå¹Žã西ãã€ããæ±ãã€ããåžåãããšã'''ãã€ãçµ±äž'''ãæãããŸãããïŒïŒïŒïŒå¹Žãããã€ã«ã»ãŽã«ããã§ãã¯ãœããšãé£éŠå¯äžã®å€§çµ±é ãšãªããŸããããããããã€ãçµ±äžä»¥éãå
±ç£äž»çŸ©äœå¶å
šäœãäžå®å®ã«ãªããŸããããã®ãããªèæ¯ãããè»éšã®ã¯ãŒãã¿ãïŒïŒïŒïŒå¹ŽïŒæã«èµ·ãããŸãããããªã¹ã»ãšãªãã£ã³ã¯ã¯ãŒãã¿ã®é®å§ã«ååããŸããã以éã'''[[w:ããªã¹ã»ãšãªãã£ã³|ããªã¹ã»ãšãªãã£ã³]]'''ã倧統é ã«ãªããå
񇜆
ã®äžå
æ¯é
äœå¶ã¯åŽ©å£ããŸãããæ§ãœããšãé£éŠã®è«žåœã§ããã·ã¢å
±ååœïŒãã·ã¢é£éŠïŒãäžå¿ã«ç·©ãããªé£åäœïŒç¬ç«åœå®¶å
±åäœïŒãžçãŸãå€ãããåžå Žçµæžåãé²ããããŸããããã®æ代ãå
šé¢çãªæ žæŠäºã®å±æ©ã¯å°ãªããæ žå
µåšåæžãžã®åãçµã¿ãè¡ãããŸãããïŒïŒïŒïŒå¹Žãã¢ã¡ãªã«ãšãœããšãé£éŠã®æ žå
µåšã¯ãåºå³¶ã§æäžããããããªååç匟ãåèšïŒïŒïŒäžååæã£ãŠããŸãããïŒïŒïŒïŒå¹Žã«æŠç¥å
µåšåæžäº€æžãå§ãŸããŸããããã®åŸãïŒïŒïŒïŒå¹Žã®äžè·é¢æ žæŠåå»æ¢æ¡çŽãçµãŠãïŒïŒïŒïŒå¹Žã«ãªããšãå
æ¬ççŠæ¢æ¡çŽãç· çµãããŸããã<gallery widths="200" heights="200">
ãã¡ã€ã«:ÐПÑÐžÑ ÐÐžÐºÐŸÐ»Ð°ÐµÐ²ÐžÑ ÐлÑÑОМ-1 (cropped) (cropped).jpg|ããªã¹ã»ãšãªãã£ã³
ãã¡ã€ã«:BerlinWall-BrandenburgGate.jpg|ãã«ãªã³ã®å£ãã©ã³ãã³ãã«ã¯éã厩å£
</gallery>ãäžæ¹ããšãŒãããå
±åäœã¯è¥¿åŽè«žåœã§æãç«ã£ãŠããŸãããããŒã¹ããªããæ¡çŽãïŒïŒïŒïŒå¹Žã«çµã°ãããšããšãŒãããå
±åäœã¯ãšãŒãããé£åã«å€ãããŸããããã®åŸãæ±ãšãŒãããè«žåœããšãŒãããé£åã«å çããŸãããããããŠãäžçåå°ã§æ°ããå°å秩åºã«åããåããèŠãããŸãããå·æŠãçµãã£ãŠãããæ±ã¢ãžã¢è«žåœéã§ã倧ããªåãããããŸãããïŒïŒïŒïŒå¹Žã倧éæ°åœïŒéåœïŒãšæé®®æ°äž»äž»çŸ©äººæ°å
±ååœïŒåæé®®ïŒã¯åæã«åœéé£åã«å çããŸãããïŒïŒïŒïŒå¹Žãéåœã®é倧äžå€§çµ±é ãšåæé®®ã®éæ£æ¥ç·æžèšã第ïŒåååéŠè³äŒè«ãè¡ããŸããã第ïŒåååéŠè³äŒè«ã§ã¯ããäºãã®çµ±äžãæãåãããããŸããïŒååå
±å宣èšïŒãïŒïŒïŒïŒå¹Žããããã ã»äžåœã»éåœã®åœäº€ãå埩ããŸãããïŒïŒïŒïŒå¹Žããããã ã'''[[w:æ±åã¢ãžã¢è«žåœé£å|æ±åã¢ãžã¢è«žåœé£å]]'''ïŒïŒ¡ïŒ³ïŒ¥ïŒ¡ïŒ®ïŒã«å çããŸãããæ±åã¢ãžã¢è«žåœé£åã¯ãæ±åã¢ãžã¢ã®å°åååæ©é¢ãšããŠå®çããŸãããæé®®å島ã®æ žå±æ©ã®ãããªå®å
šä¿éã®äžå®ãç¶ããŠããïŒïŒïŒïŒå¹Žã®'''ã¢ãžã¢é貚å±æ©'''ããã£ãŠããæ±ã¢ãžã¢çµæžã¯é 調ã«æé·ãç¶ããŸããããã®çµæãæ±ã¢ãžã¢ã¯äžçæ倧ã®çµæžåãšãªããŸããã
ãïŒïŒïŒïŒå¹Žä»£ã«å
¥ããšãç£æ²¹åœã¯ç³æ²¹éçºã§è±ãã«ãªããçµæžæé·ã®çããªåœã»å°åïŒæ°èå·¥æ¥çµæžå°åïŒïŒ®ïŒ©ïŒ¥ïœïŒãçŸããŸãããã¢ãžã¢æ°èå·¥æ¥çµæžå°åã¯ãã¢ãžã¢ã®éåœã»ã·ã³ã¬ããŒã«ã»å°æ¹Ÿã»éŠæž¯ã§æãç«ã£ãŠããŸãããã®ãããªåœã¯ãå€åœã®è³æ¬ãæè¡ãåãå
¥ãã€ã€ã茞åºå¿ååã®å·¥æ¥åãé²ããŠãçµæžæé·ãç¶ããŸãããæ¥æ¬ãšã¢ãžã¢æ°èå·¥æ¥çµæžå°åã¯ãæ±ã¢ãžã¢ã®çµæžæé·ãïŒïŒïŒïŒå¹Žä»£ãŸã§æ¯ããŠããŸãããäžæ¹ã飢é€ãšè²§å°ãæ°èè«žåœã®å€§åã§åé¡ã«ãªããŸããã
ãäžè¯äººæ°å
±ååœã¯ãåžå Žçµæžåãé²ãããããïŒïŒïŒïŒå¹Žä»£åŸåããæ¹é©éæŸæ¿çãå°å
¥ããŸããããã®åŸãïŒïŒïŒïŒå¹Žãã瀟äŒäž»çŸ©åžå Žçµæžãå°å
¥ããŸããããã®çµæãäžè¯äººæ°å
±ååœã¯ïŒïŒïŒïŒå¹Žä»£ã«é«åºŠçµæžæé·æãè¿ããŸããäžåœã®åœå
ç·çç£ã¯ïŒïŒïŒïŒå¹Žãè¿ãããšãæ¥æ¬ãæããŠäžç第ïŒäœã«ãªããŸãããå·æŠåŸã人ã»ååã»è³æ¬ã»æ
å ±ã¯äžçã®åœå¢ãè¶ããŠèªç±ã«åãããã«ãªããŸããïŒ'''ã°ããŒãã«å'''ïŒã
== å·æŠã®çµçµãšæ°äž»åã®é²å± ==
â»å·æŠçµçµåŸãã©ãããŠæ°äž»åãåå°ã§èµ·ãããŸãããïŒ
ãå·æŠãçµãããšã瀟äŒäž»çŸ©çµæžäœå¶ããåžå Žäž»çŸ©çµæžäœå¶ã«å€ãããæ¿æ²»äœå¶ãæ°äž»åãããŸãããå°æ¹Ÿã®æå³ä»€ã¯ïŒïŒïŒïŒå¹Žã«å°å
¥ãããŠãããïŒïŒïŒïŒå¹Žã«è§£é€ãããŸãããéåœã§ãïŒïŒïŒïŒå¹Žãéåœã®è»äºæ¿æš©ãæ°äž»å宣èšãè¡ããŸãããããããåžæ°ããæ¿æ²»çæ¹é©ãæ±ãã声ã¯é«ãŸããŸããããã®åŸãïŒïŒïŒïŒå¹Žã«åžæ°éå家ã®éæ³³äžã倧統é ã«ãªããŸãããããããŠæ°äž»åãé²ã¿ãåå°ã§ç¬è£çäœå¶ãäžæããŸãããäžåœã§ãæ°äž»åéåãèµ·ãããŸãããããããäžåœæ¿åºã¯ïŒïŒïŒïŒå¹Žã«æ°äž»åéåãæŠåã§åŒŸå§ããŸããïŒå€©å®éäºä»¶ïŒã
ã人暩ã¯ããããŸã§ã®æ¿æ²»äœå¶ã»åœéé¢ä¿ã®äžã§ç¡èŠãããŠããŸãããå·æŠãçµãããšã人暩ãæ±ãã声ã¯ããã«åŒ·ãŸããŸãããïŒïŒïŒïŒå¹Žãå
æ
°å®å©Šã®éåœäººå¥³æ§ããæ¥æ¬è»ã¯æ
°å®æã®èšçœ®ã»éå¶ã»æ
°å®å©Šã®ç§»åã«é¢ãã£ãŠãããããšè£å€ãèµ·ãããŸããããã®äºå®ã«ã€ããŠæ¥æ¬æ¿åºã¯èª¿æ»ãè¡ããŸãããïŒïŒïŒïŒå¹Žã«ãªã£ãŠããã®äºå®ãèªããŸãããæ¥æ¬æ¿åºã¯åçã®æå³ã蟌ããŠãååœã®å
æ
°å®å©Šã«ããè©«ã³ãšåçã®æ°æã¡ããéããŸããããŸããæŽå²ç 究ãšæè²ããæªæ¥ã®èšæ¶ã«ãšã©ããããšæ¹ããŠäŒããŸããïŒæ²³éå®æ¿é·å®è«è©±ïŒããã®åŸãæ°éã®åºéïŒã¢ãžã¢å¥³æ§åºéïŒãã€ãããã被害è
ã®ææžã«åªããŸãããã¢ãžã¢å¥³æ§åºéã¯è£åéã®åãåãã決å®ããŸãããããããã¢ãžã¢å¥³æ§åºéãè³ åéãã©ã®ããã«æäŸããªããã°ãªããªããã«é¢ããŠãååœã»åœå
ã§æèŠãåãããŸãããïŒïŒïŒïŒå¹Žãæ¥æ¬æ¿åºãšéåœæ¿åºã¯æ
°å®å©Šåé¡ã®æçµçãªè§£æ±ºã«åããŠå解ããŸããã
{| style="border:2px solid #448f8d;width:100%" cellspacing="0"
! style="background:#448f8d" |'''èšæ¶ã®æ代ãšæŽå²åé¡'''
|-
| style="padding:5px" |ãå·æŠã®çµçµååŸã第äºæ¬¡äžç倧æŠã®æŠäºç ç²ãèŠçŽãããŸããã第äºæ¬¡äžç倧æŠãçµãããŸã§ãæ¥ç³»ã¢ã¡ãªã«äººã¯åŒ·å¶å容æã«å
¥ãããã«ããããŸãããïŒïŒïŒïŒå¹Žä»£åŸåãã¢ã¡ãªã«æ¿åºã¯ãããè¬çœªããŠãè³ åéãæ¯æããŸããããã·ã¢ã¯ãïŒïŒïŒïŒå¹Žä»£ã«å
¥ããšã·ããªã¢æçã®é¢ä¿è³æãæ¥æ¬ã«éããŸãããïŒïŒïŒïŒå¹Žã«ãªããšãããªã¹ã»ãšãªãã£ã³å€§çµ±é ãã·ããªã¢æçãæ¥æ¬ã«æ£åŒã«è¬çœªããŸãããäžæ¹ãïŒïŒïŒïŒå¹Žã«å
¥ã£ãŠãæåã®åçé¢é£ã®å€§åå±ç€ºãã¢ã¡ãªã«åœç«ã¹ããœãã¢ã³èªç©ºå®å®åç©é€šã§èšç»ãããŸãããããããé圹è»äººãå察éåãè¡ã£ãã®ã§ããã®å±ç€ºã¯äžæ¢ã«ãªããŸãããïŒïŒïŒïŒå¹Žãåºå³¶ã®åçããŒã ã¯éèŠãªå Žæãªã®ã§ãåœéé£åæè²ç§åŠæåæ©é¢ã®äžçéºç£ã«ç»é²ãããŸããããã®ãããªæŽå²èªèã¯äžçäžãã泚ç®ãããŠããŸãããã€ãã»ãã©ã³ã¹ã»æ¥æ¬ã»äžåœã»éåœãååããŠãå
±åæŽå²æç§æžãäœãããšããŠããŸãã
ãïŒïŒäžçŽã«ãªããšãæ€æ°å°æ¯é
ãšå¥Žé·å¶ã®åœ±é¿ãåœéåé¡ã«ãªã£ãŠããŸãããããŸã§ã®åºæ¥äºãç¥ã£ãŠãç ç²è
ã«è£åããŠãåçºããªãããã«æ°ãã€ãã€ã€ãã©ã®ããã«èšæ¶ããããååœã§éèŠãªèª²é¡ãšãªã£ãŠããŸãã
|}
== 湟岞æŠäºãšå¹³åç¶æ掻å ==
â»åœéé£åå¹³åç¶æ掻åååæ³ã¯ããªã第äºæ¬¡äžç倧æŠåŸã®æ¥æ¬ã«å€§ããªå€åããããããŸãããïŒ
ãå·æŠãçµãããšããœããšãé£éŠãšã¢ã¡ãªã«ã¯æåŠæš©ã䜿ããªããªããŸãããããããŠåœé£ã®å¹³åç¶æ掻åã¯äžæçã«åŒ·ãŸããŸãããïŒïŒïŒïŒå¹Žã®[[w:æµ·éšä¿æš¹|'''æµ·éšä¿æš¹''']]å
é£ã®æã«ãã€ã©ã¯ãçªç¶ã¯ãŠã§ãŒãã䟵æ»ããŸãããïŒïŒïŒïŒå¹Žãå€åœç±è»ïŒã¢ã¡ãªã«ã»ã€ã®ãªã¹ã»ãã©ã³ã¹ïŒã¯åœéé£åã®å®å
šä¿éçäºäŒæ±ºè°ãåããŠãã€ã©ã¯ã«è»äºæ»æãè¡ããŸããïŒ'''[[w:湟岞æŠäº|湟岞æŠäº]]'''ïŒãäžæ¹ãã¢ã¡ãªã«ããèªè¡éãéãããã«åŒ·ãæ±ããããŠããæ¥æ¬ã¯èªè¡éã掟é£ããŠããŸããããã®ä»£ãããç·é¡ïŒïŒïŒåãã«ã®æŠäºè²»çšãå€åœéè»ã«æ¯æŽããŸãããããããé¢ä¿è«žåœããæè¬ãããªãã£ãã®ã§ã湟岞æŠäºåŸãæ¥æ¬ã¯æµ·äžèªè¡éã®ææµ·èããã«ã·ã¢æ¹Ÿã«éããŸããã
ãïŒïŒïŒïŒå¹Žã'''宮沢åäž'''å
é£ã¯ãæ¥æ¬ã'''åœéé£åã®å¹³åç¶æ掻å'''ïŒïŒ°ïŒ«ïŒ¯ïŒã«åå åºæ¥ãããã«ã'''[[w:åœéé£åå¹³åç¶æ掻åçã«å¯Ÿããååã«é¢ããæ³åŸ|åœéé£åå¹³åç¶æ掻åååæ³]]'''ãæç«ãããŸãããåœéé£åå¹³åç¶æ掻åååæ³ãæç«ããŠãããèªè¡éãæµ·å€ã«éããããã«ãªããã«ã³ããžã¢ãªã©ã§åæŠç£èŠãè¡ãããã«ãªããŸãããã¢ã¡ãªã«ã¯ãåœéè²¢ç®ãçç±ã«èªè¡éãæµ·å€ã«éãããã«æ±ããŸããããããããã®ãããªã¢ã¡ãªã«ã®è¡åãæ¥æ¬åœæ²æ³ã®å¹³å䞻矩ã«éåããŠããªãããšæ¹å€ãããŸãããããããŠãã¢ã¡ãªã«äž»å°ã®åœé瀟äŒãïŒïŒïŒïŒå¹Žä»£ã«åŒ·åããããšãæ¥æ¬åœæ²æ³ã«å€§ããªå€åããããããŸããããã®åŸã次ã®ãããªåœãå°åã«èªè¡éãéã£ãŠããŸãã
{| class="wikitable"
|ïŒïŒïŒïŒå¹Ž
|ã¢ã¶ã³ããŒã¯
|-
|ïŒïŒïŒïŒå¹Ž
|ã¶ã€ãŒã«ïŒã³ã³ãŽæ°äž»å
±ååœïŒ
|-
|ïŒïŒïŒïŒå¹Ž
|ãŽã©ã³é«å
|-
|ïŒïŒïŒïŒå¹Ž
|æ±ãã£ã¢ãŒã«
|}
== è³æåºæ ==
* å¹³é
è¡ã暪ç°å¬åœŠã»ãç·šèã[https://www.jikkyo.co.jp/material/dbook/R5_chireki_20220510/?pNo=6 æ¥æ¬å²æ¢ç©¶]ãå®æåºçæ ªåŒäŒç€Ÿã2023幎
* äœè€ä¿¡ãäºå³æ圊ã»ãç·šèã[https://new-textbook.yamakawa.co.jp/j-history/ 詳説æ¥æ¬å²æ¢ç©¶]ãæ ªåŒäŒç€Ÿå±±å·åºç瀟ã2023幎
* å±±äžè£å
žèã[https://www.amazon.co.jp/%E5%A4%A7%E5%AD%A6%E5%85%A5%E5%AD%A6%E5%85%B1%E9%80%9A%E3%83%86%E3%82%B9%E3%83%88-%E6%97%A5%E6%9C%AC%E5%8F%B2B%E3%81%AE%E7%82%B9%E6%95%B0%E3%81%8C%E9%9D%A2%E7%99%BD%E3%81%84%E3%81%BB%E3%81%A9%E3%81%A8%E3%82%8C%E3%82%8B%E6%9C%AC-%E5%B1%B1%E4%B8%AD-%E8%A3%95%E5%85%B8/dp/4046041994/ref=sr_1_7?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&crid=36OGLMABMI16H&keywords=%E5%85%B1%E9%80%9A%E3%83%86%E3%82%B9%E3%83%88+%E6%97%A5%E6%9C%AC%E5%8F%B2&qid=1673018030&sprefix=%E4%BB%8A%E6%97%A5%E6%89%93%E3%81%A4%E3%83%86%E3%82%B9%E3%83%88+%E6%97%A5%E6%9C%AC%E5%8F%B2%2Caps%2C248&sr=8-7 倧åŠå
¥åŠå
±éãã¹ã æ¥æ¬å²Bã®ç¹æ°ãé¢çœãã»ã©ãšããæ¬]ãæ ªåŒäŒç€ŸKADOKAWAã2020幎
* äœè€ä¿¡ãäºå³æ圊ã»ãç·šèã[https://www.amazon.co.jp/%E8%A9%B3%E8%AA%AC%E6%97%A5%E6%9C%AC%E5%8F%B2%E7%A0%94%E7%A9%B6-%E4%BD%90%E8%97%A4-%E4%BF%A1/dp/4634010739/ref=sr_1_1?__mk_ja_JP=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A&crid=2JVCFQ6ZSAM4W&keywords=%E6%97%A5%E6%9C%AC%E5%8F%B2%E7%A0%94%E7%A9%B6&qid=1673018227&sprefix=%E6%97%A5%E6%9C%AC%E5%8F%B2%E7%A0%94%E7%A9%B6%2Caps%2C229&sr=8-1 詳説æ¥æ¬å²ç 究]ãæ ªåŒäŒç€Ÿå±±å·åºç瀟ã2017幎
[[ã«ããŽãª:é«çåŠæ ¡æ¥æ¬å²æ¢ç©¶|ããããªãããã®ã«ã»ããž]]
[[ã«ããŽãª:20äžçŽ]] | 2023-04-08T02:14:38Z | 2023-09-28T08:21:48Z | [] | https://ja.wikibooks.org/wiki/%E9%AB%98%E7%AD%89%E5%AD%A6%E6%A0%A1%E6%97%A5%E6%9C%AC%E5%8F%B2%E6%8E%A2%E7%A9%B6/%E6%96%B0%E3%81%9F%E3%81%AA%E4%B8%96%E7%B4%80%E3%81%AE%E6%97%A5%E6%9C%AC%E3%81%B8%E2%85%A0 |
37,457 | æ¥æ¬åœæ²æ³ç¬¬29æ¡ | æ³åŠ>æ²æ³>æ¥æ¬åœæ²æ³>ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³
ã財ç£æš©ã
財ç£æš©ã®ä¿éãåç
§ã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ²æ³>æ¥æ¬åœæ²æ³>ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ã財ç£æš©ã",
"title": "æ¡æ"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "財ç£æš©ã®ä¿éãåç
§ã",
"title": "解説"
}
] | æ³åŠïŒæ²æ³ïŒæ¥æ¬åœæ²æ³ïŒã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³ | [[æ³åŠ]]ïŒ[[æ²æ³]]ïŒ[[æ¥æ¬åœæ²æ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³]]
==æ¡æ==
ã財ç£æš©ã
;第29æ¡
#財ç£æš©ã¯ãããã䟵ããŠã¯ãªããªãã
#財ç£æš©ã®å
容ã¯ãå
Œ
±ã®çŠç¥ã«é©åããããã«ãæ³åŸã§ãããå®ããã
#ç§æ財ç£ã¯ãæ£åœãªè£åã®äžã«ããããå
Œ
±ã®ããã«çšã²ãããšãã§ããã
==解説==
{{wikipedia|æ¥æ¬åœæ²æ³ç¬¬29æ¡}}
'''[[財ç£æš©ã®ä¿é]]'''ãåç
§ã
===財ç£æš©ã®ä¿é===
===財ç£æš©ã®èŠå¶===
====èŠå¶ã®åæ²æ§å€æ====
:[[#森ææ³å
±ææäºä»¶|森ææ³å
±ææäºä»¶]] (æé«è£å€§æ³å»·å€æ±º æå62幎04æ22æ¥ïŒ
:;èŠå¶ç®çãæ£åœã§ããããš
::ç«æ³ã®èŠå¶ç®çã瀟äŒççç±ãªããç®çã«åºããšã¯ãããªããã®ãšããŠå
Œ
±ã®çŠç¥ã«åèŽããªãããšãæããã§ããå Žåã¯éæ²ãšå€å®ãããã
:;èŠå¶æ段ãåççã§ããããš
::èŠå¶ç®çãå
Œ
±ã®çŠç¥ã«åèŽãããã®ã§ãã€ãŠãèŠå¶æ段ãç®çãéæããããã®æ段ãšããŠå¿
èŠæ§è¥ããã¯åçæ§ã«æ¬ ããŠããããšãæããã§ãã€ãŠããã®ããç«æ³åºã®å€æãåççè£éã®ç¯å²ãè¶
ãããã®ãšãªãå Žåã¯éæ²ãšå€å®ãããã
===財ç£æš©ã®äŸµå®³ãšæ倱è£å===
==åç
§æ¡æ==
*[[åå°åçšæ³]]
==å€äŸ==
# [https://www.courts.go.jp/app/hanrei_jp/detail2?id=56042 蟲å°æ¹é©äºä»¶]ïŒæé«è£å€§æ³å»·å€æ±º æå28幎12æ23æ¥ïŒã
#;èªäœèŸ²åµèšç¹å¥æªçœ®æ³ç¬¬6æ¡ç¬¬3é
æ¬æã®èŸ²å°è²·å察䟡ãšæ²æ³ç¬¬29æ¡ç¬¬3é
ã«ãããããæ£åœãªè£åã
#:èªäœèŸ²åµèšç¹å¥æªçœ®æ³ç¬¬6æ¡ç¬¬3é
é
æ¬æã®èŸ²å°è²·å察䟡ã¯ãæ²æ³ç¬¬29æ¡ç¬¬3é
ã«ãããããæ£åœãªè£åãã«ãããã
# [https://www.courts.go.jp/app/hanrei_jp/detail2?id=57338 å®
å°è²·åèšç»åæ¶è«æ±]ïŒæé«è£ç¬¬äºå°æ³å»·å€æ±º æå29幎1æ22æ¥ïŒ
#;èªäœèŸ²åµèšç¹å¥æªçœ®æ³ç¬¬15æ¡ç¬¬1é
第2å·ã«ããå®
å°ã®è²·åãšæ²æ³ç¬¬29æ¡ç¬¬3é
#:èªäœèŸ²åµèšç¹å¥æªçœ®æ³ç¬¬15æ¡ç¬¬1é
第2å·ã«ããå®
å°ã®è²·åã¯ãå
Œ
±ã®ããã§ãã€ãŠãæ²æ³ç¬¬29æ¡ç¬¬3é
ã«éåããªãã
#[[w:第äžè
ææç©æ²¡åäºä»¶|第äžè
ææç©æ²¡åäºä»¶]]ïŒæé«è£å€§æ³å»·å€æ±º æå37幎11æ28æ¥ 2件ïŒ[[æ¥æ¬åœæ²æ³ç¬¬31æ¡|æ²æ³31æ¡]]ã
#*[https://www.courts.go.jp/app/hanrei_jp/detail2?id=56954 é¢çšæ³éå](åéã第16å·»11å·1593é ) æ§é¢çšæ³ïŒæå29幎æ³åŸç¬¬61å·ã«ããæ¹æ£åã®é¢çšæ³ããããïŒç¬¬83æ¡ç¬¬1é
#*[https://www.courts.go.jp/app/hanrei_jp/detail2?id=56959 é¢çšæ³éå](åéã第16å·»11å·1577é ) é¢çšæ³ç¬¬118æ¡ç¬¬1é
##'''æ§é¢çšæ³ç¬¬83æ¡ç¬¬1é
/é¢çšæ³ç¬¬118æ¡ç¬¬1é
ã«ãã第äžè
ã®ææç©ã没åããããšã¯ããæ²æ³ç¬¬31æ¡ã第29æ¡ã«éåããã'''
##:æ§é¢çšæ³ç¬¬83æ¡ç¬¬1é
/é¢çšæ³ç¬¬118æ¡ç¬¬1é
ã®èŠå®ã«ãã第äžè
ã®ææç©ã没åããããšã¯ãæ²æ³ç¬¬31æ¡ã第29æ¡ã«éåããã
##:*第äžè
ã®ææç©ã没åããå Žåã«ãããŠããã®æ²¡åã«é¢ããŠåœè©²ææè
ã«å¯Ÿããäœãåç¥ãåŒè§£ãé²çŠŠã®æ©äŒãäžããããšãªãããã®æææš©ã奪ãããšã¯ãèããäžåçã§ãã€ãŠãæ²æ³ã®å®¹èªããªããšããã§ããã
##'''第äžè
ææç©ã®æ²¡åã®éæ²ãçç±ãšããŠäžåããããšãã§ããã'''
##:åé
ã®å Žåã没åã«èšæž¡ãåãã被å人ã¯ãããšã第äžè
ã®ææç©ã«é¢ããå Žåã§ãã€ãŠãããããéæ²ã§ãããšããŠäžåãããããšãã§ããã
##:*ããã没åã®èšæž¡ãåãã被å人ã¯ãããšã第äžè
ã®ææç©ã«é¢ããå Žåã§ãã€ãŠãã被å人ã«å¯Ÿããéå åã§ãã以äžã没åã®è£å€ã®éæ²ãçç±ãšããŠäžåããªãããããšã¯ãåœç¶ã§ãããã®ã¿ãªããã被å人ãšããŠã没åã«ä¿ãç©ã®å ææš©ãå¥å¥ªããããŸãã¯ããã䜿çšãåçããªãããªãç¶æ
ã«ããããæŽã«ã¯æææš©ãå¥å¥ªããã第äžè
ããè³ åè«æ±æš©çãè¡äœ¿ãããå±éºã«æãããçãå©å®³é¢ä¿ãæããããšãæããã§ãããããäžåã«ãããããææžãæ±ããããšãã§ãããã®ãšè§£ãã¹ãã
# [https://www.courts.go.jp/app/hanrei_jp/detail2?id=57338 ããæ± ã®ä¿å
šã«é¢ããæ¡äŸéå]ïŒ[[w:å¥è¯çããæ± æ¡äŸäºä»¶|å¥è¯çããæ± æ¡äŸäºä»¶]] æé«è£å€§æ³å»·å€æ±º æå38幎6æ26æ¥ïŒ[[æ¥æ¬åœæ²æ³ç¬¬31æ¡|æ²æ³31æ¡]], [[æ¥æ¬åœæ²æ³ç¬¬94æ¡|æ²æ³94æ¡]]
#;å¥è¯çããæ± ã®ä¿å
šã«é¢ããæ¡äŸïŒæå29幎å¥è¯çæ¡äŸç¬¬38å·ïŒç¬¬4æ¡ç¬¬2å·ã第9æ¡ïŒæå®ã®ããæ± ã®å €ãšãã«ç«¹æšè¥ããã¯èŸ²äœç©ãæ€ããçã®è¡çºãããè
ã3äžå以äžã®çœ°éã«åŠãããšãããã®ïŒã®åæ²æ§ã
#:å¥è¯çããæ± ã®ä¿å
šã«é¢ããæ¡äŸïŒæå29幎å¥è¯çæ¡äŸç¬¬38å·ïŒç¬¬4æ¡ç¬¬2å·ã第9æ¡ã¯ãæ²æ³ç¬¬29æ¡ç¬¬2é
ã第3é
ã«éåããªãã
#:*ããæ± ã®å €ãšãã䜿çšãã財ç£äžã®æš©å©ãæããè
ã¯ãæ¬æ¡äŸ1æ¡ã®ç€ºãç®çã®ããããã®è²¡ç£æš©ã®è¡äœ¿ãæ®ãã©å
šé¢çã«çŠæ¢ãããããšã«ãªãããããã¯çœå®³ãæªç¶ã«é²æ¢ãããšãã瀟äŒç掻äžã®å·²ããåŸãªãå¿
èŠããæ¥ãããšã§ãã€ãŠãããæ± ã®å €ãšãã䜿çšãã財ç£äžã®æš©å©ãæããè
ã¯äœäººããå
Œ
±ã®çŠç¥ã®ãããåœç¶ãããåå¿ããªããã°ãªããªã責åãè² ããšããã¹ãã§ãããããªãã¡ãããæ± ã®ç Žæã決ããã®åå ãšãªãããæ± ã®å €ãšãã®äœ¿çšè¡çºã¯ãæ²æ³ã§ããæ°æ³ã§ãé©æ³ãªè²¡ç£æš©ã®è¡äœ¿ãšããŠä¿éãããŠããªããã®ã§ãã€ãŠãæ²æ³ãæ°æ³ã®ä¿éãã財ç£æš©ã®è¡äœ¿ã®åå€ã«ãããã®ãšããã¹ããåŸã€ãŠããããã®è¡çºãæ¡äŸããã€ãŠçŠæ¢ãåŠçœ°ããŠãæ²æ³ããã³æ³åŸã«çŽè§ŠãŸãã¯ãããéžè±ãããã®ãšã¯ãããªããããŸãå³æ¡é
ã«èŠå®ãããããªäºé
ããæ¢ã«èŠå®ããŠãããšèªãã¹ãæ³ä»€ã¯ååšããŠããªãã®ã§ããããããããæ¡äŸã§å®ãããããšãã€ãŠãéæ²ãŸãã¯éæ³ã®ç¹ã¯èªããããªãã
# [https://www.courts.go.jp/app/hanrei_jp/detail2?id=50697 æ²³å·éè¿å°å¶é什éåäºä»¶]ïŒæé«è£å€§æ³å»·å€æ±º æå43幎11æ27æ¥ïŒ
##æ²³å·éè¿å°å¶é什第4æ¡ç¬¬2å·ç¬¬10æ¡ãšæ²æ³ç¬¬29æ¡
##:'''æ²³å·éè¿å°å¶é什第4æ¡ç¬¬2å·ã第10æ¡ã¯ãæ²æ³ç¬¬29æ¡ç¬¬3é
ã«éåããªãã'''
##:*æ²³å·éè¿å°å¶é什4æ¡2å·ã®å®ããå¶éã¯ãæ²³å·ç®¡çäžæ¯éã®ããäºæ
ã®çºçãäºåã«é²æ¢ãããããåã«æå®ã®è¡çºãããããšããå Žåã«ã¯ç¥äºã®èš±å¯ãåããããšãå¿
èŠã§ããæšãå®ããŠããã«ãããããã®çš®ã®å¶éã¯ãå
Œ
±ã®çŠç¥ã®ããã«ããäžè¬çãªå¶éã§ãããååçã«ã¯ãäœäººããããåå¿ãã¹ããã®ã§ããã
##:*å®ãèªäœãšããŠã¯ãç¹å®ã®äººã«å¯Ÿããç¹å¥ã«è²¡ç£äžã®ç ç²ã匷ãããã®ãšã¯ãããªããããå³ã®çšåºŠã®å¶éã課ããã«ã¯æ倱è£åãèŠä»¶ãšãããã®ã§ã¯ãªãããããã€ãŠãè£åã«é¢ããèŠå®ã®ãªãå什4æ¡2å·ã®èŠå®ãæè«ã®ããã«æ²æ³29æ¡3é
ã«éåãç¡å¹ã§ãããšã¯ãããªãã
##'''æ²æ³ç¬¬29æ¡ç¬¬3é
ã®æ矩'''
##:<u>財ç£äžã®ç ç²ãåã«äžè¬çã«åœç¶ã«åèªãã¹ããã®ãšãããå¶éã®ç¯å²ããããç¹å¥ã®ç ç²ã課ãããã®ã§ããå Žåã«ã¯ãããã«ã€ããŠ'''æ倱è£åã«é¢ããèŠå®ããªããŠããçŽæ¥æ²æ³ç¬¬29æ¡ç¬¬3é
ãæ ¹æ ã«ããŠãè£åè«æ±ããã'''äœå°ããªãã§ã¯ãªãã</u>
##:*åŸæ¥ãçžåœã®è³æ¬ãæå
¥ããŠå¶ãã§ããäºæ¥ãå¶ã¿åŸãªããªãããã«çžåœã®æ倱ã被ãçåã§ãããšããã°ããã®è²¡ç£äžã®ç ç²ã¯ãå
Œ
±ã®ããã«å¿
èŠãªå¶éã«ãããã®ãšã¯ãããåã«äžè¬çã«åœç¶ã«åå¿ãã¹ããã®ãšãããå¶éã®ç¯å²ããããç¹å¥ã®ç ç²ã課ãããã®ãšã¿ãäœå°ãå
šããªãããã§ã¯ãªããæ²æ³29æ¡3é
ã®è¶£æšã«ç
§ãããããã«å趣æšã®æ³ä»€ã«ããèŠå¶ã«ã€ããŠæ倱è£åããã¹ããã®ãšããŠããããšãšã®åè¡¡ãããã€ãŠã被ã€ãçŸå®ã®æ倱ã«ã€ããŠã¯ããã®è£åãè«æ±ããããšãã§ãããã®ãšè§£ããäœå°ãããã
#<span id="森ææ³å
±ææäºä»¶"></span>[http://www.courts.go.jp/search/jhsp0030?hanreiid=55203&hanreiKbn=02 å
±æç©åå²ç]ïŒ[[w:森ææ³å
±ææäºä»¶|森ææ³å
±ææäºä»¶]] æé«è£å€§æ³å»·å€æ±º æå62幎04æ22æ¥ïŒ[[æ°æ³ç¬¬256æ¡]]ã[[æ°æ³ç¬¬258æ¡]]ã森ææ³ç¬¬186æ¡(åé€)
#*森ææ³ç¬¬186æ¡(åœæãçŸåšã¯æ¬å€æ±ºãåãåé€)
#*:森æã®å
±æè
ã¯ãæ°æ³ïŒææ²»29幎æ³åŸç¬¬89å·ïŒç¬¬256æ¡ç¬¬1é
ïŒå
±æç©ã®åå²è«æ±ïŒã®èŠå®ã«ãããããããã®å
±æã«ä¿ã森æã®åå²ãè«æ±ããããšãã§ããªãããã ããåå
±æè
ã®æåã®äŸ¡é¡ã«åŸããã®éåæ°ããã£ãŠåå²ã®è«æ±ãããããšã劚ããªãã
#;'''森ææ³186æ¡æ¬æãšæ²æ³29æ¡2é
'''
#:森ææ³186æ¡æ¬æã¯ãæ²æ³29æ¡2é
ã«éåããã
#:*æ²æ³29æ¡ã¯ã1é
ã«ãããŠã財ç£æš©ã¯ãããã䟵ããŠã¯ãªããªããããšèŠå®ãã2é
ã«ãããŠã財ç£æš©ã®å
容ã¯ãå
Œ
±ã®çŠç¥ã«é©åããããã«ãæ³åŸã§ãããå®ãããããšèŠå®ããç§æ財ç£å¶åºŠãä¿éããŠããã®ã¿ã§ãªãã瀟äŒççµæžç掻åã®åºç€ããªãåœæ°ã®åã
ã®è²¡ç£æš©ã«ã€ããããåºæ¬ç人暩ãšããŠä¿éãããšãšãã«ã瀟äŒå
šäœã®å©çãèæ
®ããŠè²¡ç£æš©ã«å¯Ÿãå¶çŽãå ããå¿
èŠæ§ãå¢å€§ããã«è³ã€ããããç«æ³åºã¯å
Œ
±ã®çŠç¥ã«é©åããéã財ç£æš©ã«ã€ããŠèŠå¶ãå ããããšãã§ããã
#:*<u>財ç£æš©ã¯ãããèªäœã«å
åšããå¶çŽãããã»ããå³ã®ãšããç«æ³åºã瀟äŒå
šäœã®å©çãå³ãããã«å ããèŠå¶ã«ããå¶çŽãåãããã®ã§ãããããã®èŠå¶ã¯ã財ç£æš©ã®çš®é¡ãæ§è³ªçãå€çš®å€æ§ã§ããããŸãã財ç£æš©ã«å¯ŸãèŠå¶ãèŠæ±ãã瀟äŒççç±ãªããç®çãã瀟äŒå
Œ
±ã®äŸ¿å®ã®ä¿é²ãçµæžç匱è
ã®ä¿è·çã®ç€ŸäŒæ¿çåã³çµæžæ¿çäžã®ç©æ¥µçãªãã®ããã瀟äŒç掻ã«ãããå®å
šã®ä¿éã秩åºã®ç¶æçã®æ¶æ¥µçãªãã®ã«è³ããŸã§å€å²ã«ããããããçš®ã
æ§ã
ã§ããããã®ã§ããããããã€ãŠã財ç£æš©ã«å¯ŸããŠå ããããèŠå¶ãæ²æ³29æ¡2é
ã«ããå
Œ
±ã®çŠç¥ã«é©åãããã®ãšããŠæ¯èªãããã¹ããã®ã§ãããã©ããã¯ãèŠå¶ã®ç®çãå¿
èŠæ§ãå
容ããã®èŠå¶ã«ãã€ãŠå¶éããã財ç£æš©ã®çš®é¡ãæ§è³ªåã³å¶éã®çšåºŠçãæ¯èŒèéããŠæ±ºãã¹ããã®ã§ãã</u>ããè£å€æãšããŠã¯ãç«æ³åºãããå³æ¯èŒèéã«åºã¥ãå€æãå°éãã¹ããã®ã§ããããã'''ç«æ³ã®èŠå¶ç®çãå瀺ã®ãããªç€ŸäŒççç±ãªããç®çã«åºããšã¯ãããªããã®ãšããŠå
Œ
±ã®çŠç¥ã«åèŽããªãããšãæããã§ããããåã¯èŠå¶ç®çãå
Œ
±ã®çŠç¥ã«åèŽãããã®ã§ãã€ãŠãèŠå¶æ段ãå³ç®çãéæããããã®æ段ãšããŠå¿
èŠæ§è¥ããã¯åçæ§ã«æ¬ ããŠããããšãæããã§ãã€ãŠããã®ããç«æ³åºã®å€æãåççè£éã®ç¯å²ãè¶
ãããã®ãšãªãå Žåã«éããåœè©²èŠå¶ç«æ³ãæ²æ³29æ¡2é
ã«éèãããã®ãšããŠããã®å¹åãåŠå®ããããšãã§ããã'''
#:*[[æ°æ³ç¬¬256æ¡#ç«æ³ã®è¶£æšã»ç®ç|æ°æ³ç¬¬256æ¡ã®ç«æ³ã®è¶£æšã»ç®ç]]ãæ¡ããã«ãåœè©²å
±æç©ããã®æ§è³ªäžåå²ããããšã®ã§ããªããã®ã§ãªãéããåå²è«æ±æš©ãå
±æè
ã«åŠå®ããããšã¯ãæ²æ³äžã財ç£æš©ã®å¶éã«è©²åœãããããå¶éãèšããç«æ³ã¯ãæ²æ³29æ¡2é
ã«ããå
Œ
±ã®çŠç¥ã«é©åããããšãèŠãããã®ãšè§£ãã¹ããšãããå
±æ森æã¯ãã®æ§è³ªäžåå²ããããšã®ã§ããªããã®ã«è©²åœããªããããå
±æ森æã«ã€ãæå䟡é¡äºåã®äžä»¥äžã®å
±æè
ã«åå²è«æ±æš©ãåŠå®ããŠãã森ææ³186æ¡ã¯ãå
Œ
±ã®çŠç¥ã«é©åãããã®ãšãããªããšãã¯ãéæ²ã®èŠå®ãšããŠããã®å¹åãæããªãã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=52285 çæ売買å©çè¿éè«æ±äºä»¶](æé«è£å€æ±º å¹³æ14幎2æ13æ¥)[[蚌åžååŒæ³ç¬¬164æ¡]]第1é
ïŒäžå ŽäŒç€Ÿçã®åœ¹å¡çã®çæ売買å©çã®è¿éãçŸã»[[éèååååŒæ³ç¬¬164æ¡]]ïŒ
##蚌åžååŒæ³164æ¡1é
(çæ売買ååŒå©çè¿é)ã®è¶£æš
##:蚌åžååŒæ³164æ¡1é
ã¯ïŒäžå ŽäŒç€Ÿçã®åœ¹å¡åã¯äž»èŠæ ªäž»ãåé
æå®ã®æ䟡蚌åžçã®çæ売買ååŒãããŠå©çãåŸãå Žåã«ã¯ïŒåæ¡8é
ã«èŠå®ããå
é£åºä»€ã§å®ããå Žåã«åœãããšãåã¯é¡åçã«ã¿ãŠååŒã®æ
æ§èªäœãã圹å¡è¥ããã¯äž»èŠæ ªäž»ããã®è·åè¥ããã¯å°äœã«ããååŸããç§å¯ãäžåœã«å©çšããããšãèªããããªããšããé€ãïŒåœè©²ååŒã«ãããŠãã®è
ãç§å¯ãäžåœã«å©çšãããåŠãïŒãã®ååŒã«ãã£ãŠäžè¬æè³å®¶ã®å©çãçŸå®ã«æãªããããåŠããåãããšãªãïŒåœè©²äžå ŽäŒç€Ÿçã¯ãã®å©çãæäŸãã¹ãããšãåœè©²åœ¹å¡åã¯äž»èŠæ ªäž»ã«å¯ŸããŠè«æ±ããããšãã§ãããã®ãšããèŠå®ã§ããã
##'''蚌åžååŒæ³164æ¡1é
ãšæ²æ³29æ¡'''
##:蚌åžååŒæ³164æ¡1é
ã¯æ²æ³29æ¡ã«éåããªãã
##:*<span id="財ç£æš©ã®æ¿ççèŠå¶"></span>財ç£æš©ã¯ïŒããèªäœã«å
åšããå¶çŽãããå€ïŒãã®æ§è³ªäžç€ŸäŒå
šäœã®å©çãå³ãããã«ç«æ³åºã«ãã£ãŠå ããããèŠå¶ã«ããå¶çŽãåãããã®ã§ããã財ç£æš©ã®çš®é¡ïŒæ§è³ªçã¯å€çš®å€æ§ã§ããïŒãŸãïŒè²¡ç£æš©ã«å¯ŸããèŠå¶ãå¿
èŠãšãã瀟äŒççç±ãªããç®çãïŒç€ŸäŒå
Œ
±ã®äŸ¿å®ã®ä¿é²ïŒçµæžç匱è
ã®ä¿è·çã®ç€ŸäŒæ¿çåã³çµæžæ¿çã«åºã¥ããã®ããïŒç€ŸäŒç掻ã«ãããå®å
šã®ä¿éã秩åºã®ç¶æçãå³ããã®ãŸã§å€å²ã«ãããããïŒè²¡ç£æš©ã«å¯ŸããèŠå¶ã¯ïŒçš®ã
ã®æ
æ§ã®ãã®ãããåŸãããã®ããšããããã°ïŒ<u>財ç£æš©ã«å¯ŸããèŠå¶ãæ²æ³29æ¡2é
ã«ããå
Œ
±ã®çŠç¥ã«é©åãããã®ãšããŠæ¯èªãããã¹ããã®ã§ãããã©ããã¯ïŒèŠå¶ã®ç®çïŒå¿
èŠæ§ïŒå
容ïŒãã®èŠå¶ã«ãã£ãŠå¶éããã財ç£æš©ã®çš®é¡ïŒæ§è³ªåã³å¶éã®çšåºŠçãæ¯èŒèéããŠå€æãã¹ããã®ã§ããã</u>
#<span id="æ倱ä¿èšŒ2"></span>[http://www.courts.go.jp/app/hanrei_jp/detail2?id=52264 çŽå®é,å¯èšéè¿éè«æ±äºä»¶](æé«è£å€æ±º å¹³æ15幎4æ18æ¥)[[蚌åžååŒæ³ç¬¬42æ¡ã®2]]第1é
3å·
#;蚌åžååŒæ³42æ¡ã®2第1é
3å·ãå¹³æ3幎æ³åŸç¬¬96å·ã«ããåæ³ã®æ¹æ£åã«ç· çµãããæ倱ä¿èšŒãç¹å¥ã®å©çã®æäŸãå
容ãšããå¥çŽã«åºã¥ãå±¥è¡ã®è«æ±ããçŠæ¢ããŠããããšãšæ²æ³29æ¡
#:蚌åžååŒæ³42æ¡ã®2第1é
3å·ãïŒå¹³æ3幎æ³åŸç¬¬96å·ã«ããåæ³ã®æ¹æ£åã«ç· çµãããæ倱ä¿èšŒãç¹å¥ã®å©çã®æäŸãå
容ãšããå¥çŽã«åºã¥ããŠãã®å±¥è¡ãè«æ±ããå Žåãå«ãïŒé¡§å®¢çã«å¯Ÿããæ倱è£ãŠããå©çè¿œå ã®ããã®è²¡ç£äžã®å©çã®æäŸãçŠæ¢ããŠããããšã¯ïŒæ²æ³29æ¡ã«éåããªãã
#:*蚌åžååŒæ³42æ¡ã®2第1é
3å·ã¯ïŒå¹³æ3幎æ³åŸç¬¬96å·ã«ãã蚌åžååŒæ³ã®æ¹æ£åã«ç· çµãããæ倱ä¿èšŒçãå
容ãšããå¥çŽã«åºã¥ããŠãã®å±¥è¡ã®è«æ±ãããå Žåãå«ãïŒå©çæäŸè¡çºãçŠæ¢ãããã®ã§ãããïŒæ³å¶å®ä»¥åã«ç· çµãããå¥çŽãç¡å¹ã«ããïŒïŒâ åæ¹æ£åã«ç· çµãããå¥çŽã«åºã¥ãå©çæäŸè¡çºãèªããããšã¯æè³å®¶ã®èšŒåžåžå Žã«å¯Ÿããä¿¡é Œã®åªå€±ãé²ããšããäžèšç®çãæãªãçµæãšãªããããªãããšïŒâ¡ åèšå
é£åºä»€ã«å®ããäºæ
ã«ããæ倱ãè£ãŠãããå Žåã§ããã°èšŒåžååŒæ³42æ¡ã®2第1é
3å·ã®èŠå®ã¯é©çšãããªãããšïŒåæ¡3é
ïŒïŒâ¢ æ倱ä¿èšŒçãå
容ãšããå¥çŽã«åºã¥ãå±¥è¡è«æ±ãçŠæ¢ãããå Žåã§ãã£ãŠãïŒäžå®ã®å Žåã«ã¯é¡§å®¢ã«äžæ³è¡çºæ³äžã®ææžãèªããããäœå°ãããããšïŒâ£ ç§æ³äžæå¹ã§ãããšã¯ããïŒæ倱ä¿èšŒçã¯ïŒå
æ¥ïŒèšŒåžåžå Žã«ãããäŸ¡æ Œåœ¢ææ©èœããããããšãšãã«ïŒèšŒåžååŒã®å
¬æ£åã³èšŒåžåžå Žã«å¯Ÿããä¿¡é Œãæãªããã®ã§ãã£ãŠïŒå瀟äŒæ§ã®åŒ·ãè¡çºã§ãããšãããªããã°ãªããïŒããšããšèšŒåžååŒæ³äžéæ³ãšãããŠããæ倱ä¿èšŒçãå
容ãšããå¥çŽã«ãã£ãŠçºçããåµæš©ãïŒè²¡ç£æš©ãšããŠäžå®ã®å¶çŽã«æããããšã¯ãããåŸãªããã®ã§ãããšãããã
#<span id="æ¶è²»è
å¥çŽæ³9æ¡"></span>[https://www.courts.go.jp/app/hanrei_jp/detail2?id=33838 äžåœå©åŸè¿éè«æ±äºä»¶](æé«è£å€äŸ âå¹³æ18幎11æ27æ¥)â[[æ¶è²»è
å¥çŽæ³ç¬¬9æ¡]]
#;æ¶è²»è
å¥çŽæ³9æ¡1å·ãšæ²æ³29æ¡
#:æ¶è²»è
å¥çŽæ³9æ¡1å·ã¯æ²æ³29æ¡ã«éåããªãã
#:*æ¶è²»è
å¥çŽæ³ã¯ïŒæ¶è²»è
ã®å©çãäžåœã«å®³ããããšãšãªãæ¡é
ã®å
šéšåã¯äžéšãç¡å¹ãšããããšçã«ãã£ãŠïŒæ¶è²»è
ã®å©çã®æè·ãå³ãïŒãã£ãŠåœæ°ç掻ã®å®å®åäžãšåœæ°çµæžã®å¥å
šãªçºå±ã«å¯äžããããšãç®çãšããŠå¶å®ããããã®ã§ããïŒäžèšã®ãããªæ¶è²»è
ãšäºæ¥è
ãšã®éã«åããæ Œå·®ã«çç®ããŠïŒ[[æ¶è²»è
å¥çŽæ³ç¬¬2æ¡|åæ³2æ¡]]ã«ãããŠïŒäž¡è
ã®éã§ç· çµãããå¥çŽãåºãåæ³ã®é©çšå¯Ÿè±¡ãšå®ãïŒåæ³9æ¡1å·ã¯ïŒæ¶è²»è
å¥çŽã®è§£é€ã«äŒŽã£ãŠäºæ¥è
ãæ¶è²»è
ã«å¯Ÿãé«é¡ãªæå®³è³ åçãè«æ±ããããšã«ãã£ãŠïŒæ¶è²»è
ãäžåœãªåºããã匷ããããããšãé²æ¢ããããšãç®çãšãããã®ã§ãã£ãŠïŒãã®ãããªç«æ³ç®çãæ£åœæ§ãæããããšã¯æããã§ããã
#:*åå·ã¯ïŒæå®³è³ åã®äºå®çãå®ããæ¡é
ããã¹ãŠç¡å¹ãšããã®ã§ã¯ãªãïŒãã®ãã¡ïŒè§£é€ãããæ¶è²»è
å¥çŽãšåçš®ã®æ¶è²»è
å¥çŽã®è§£é€ã«äŒŽãäºæ¥è
ã«çãã¹ãå¹³åçãªæ害ã®é¡ãè¶
ããéšåãç¡å¹ãšããã«ãšã©ãŸãã®ã§ããïŒãã®ããšããããã°ïŒåå·ã®èŠå®ãïŒäžèšã®ãããªç«æ³ç®çéæã®ããã®æ段ãšããŠïŒå¿
èŠæ§ãåçæ§ãæ¬ ããã®ã§ãããšããããšã¯ã§ããªãã
# [https://www.courts.go.jp/app/hanrei_jp/detail2?id=37541 ææ暩移転ç»èšæç¶çè«æ±äºä»¶]ïŒæé«è£ç¬¬äžå°æ³å»·å€æ±º å¹³æ21幎4æ23æ¥ïŒ[[建ç©ã®åºåææçã«é¢ããæ³åŸç¬¬70æ¡]]
#;建ç©ã®åºåææçã«é¢ããæ³åŸ70æ¡ãšæ²æ³29æ¡
#:建ç©ã®åºåææçã«é¢ããæ³åŸ70æ¡ã¯ïŒæ²æ³29æ¡ã«éåããªãã
#:*(ãåºåæææ³70æ¡ã«ããã°ïŒå£å°å
å
šå»ºç©äžæ¬å»ºæ¿ãã«ãããŠã¯ïŒå建ç©ã«ã€ããŠïŒåœè©²å»ºç©ã®åºåææè
ã§ã¯ãªãä»ã®å»ºç©ã®åºåææè
ã®ææãåæ ãããŠåœè©²å»ºç©ã®å»ºæ¿ã決è°ããããããšã«ãªãïŒå»ºæ¿ãã«åå ããªãå°æ°è
ã®æš©å©ã䟵害ããïŒæŽã«ãã®ä¿è·ã®ããã®æªçœ®ãæ¡ãããŠããªããªã©ãšããŠïŒåæ¡ãæ²æ³29æ¡ã«éåãããæšã®äž»åŒµã«å¯ŸããŠ)
#:*#åºåææ建ç©ã«ã€ããŠïŒèæœåçã«ãã£ãŠå»ºæ¿ãã®å¿
èŠãçãããããªå Žåã«ïŒå€§å€æ°ã®åºåææè
ã建æ¿ãã®ææãæããŠããŠãäžéšã®åºåææè
ãå察ããã°å»ºæ¿ããã§ããªããšããããšã«ãªããšïŒè¯å¥œãã€å®å
šãªäœç°å¢ã®ç¢ºä¿ãæ·å°ã®æå¹æŽ»çšã®æ¯éãšãªãã°ãããïŒäžéšã®åºåææè
ã®åºåæææš©ã®è¡äœ¿ã«ãã£ãŠïŒå€§å€æ°ã®åºåææè
ã®åºåæææš©ã®åççãªè¡äœ¿ã劚ããããããšã«ãªãããïŒ1æ£å»ºæ¿ãã®å Žåã«åºåææè
åã³è°æ±ºæš©ã®å5åã®4以äžã®å€æ°ã§å»ºæ¿ã決è°ãã§ããæšå®ããåºåæææ³62æ¡1é
ã¯ïŒåºåæææš©ã®äžèšæ§è³ªã«ãããã¿ãŠïŒååãªåçæ§ãæããïŒèŠå®ã®åçæ§ïŒã
#:*#建æ¿ãã«åå ããªãåºåææè
ã¯ïŒå£²æž¡è«æ±æš©ã®è¡äœ¿ãåããããšã«ããïŒåºåæææš©åã³æ·å°å©çšæš©ãæ䟡ã§å£²ãæž¡ãããšãšãããŠããã®ã§ããïŒãã®çµæžçæ倱ã«ã€ããŠã¯çžå¿ã®æåœããããŠããïŒå°æ°è
ã«å¯Ÿããè£åã®ååšïŒã
#[http://www.courts.go.jp/search/jhsp0030?hanreiid=81506&hanreiKbn=02 æŽæ°æè¿éçè«æ±æ¬èšŽïŒæŽæ°æè«æ±å蚎ïŒä¿èšŒåµåå±¥è¡è«æ±äºä»¶]ïŒæé«è£å€æ±º å¹³æ23幎07æ15æ¥ïŒ[[æ¶è²»è
å¥çŽæ³ç¬¬10æ¡]]
#;æ¶è²»è
å¥çŽæ³10æ¡ãšæ²æ³29æ¡1é
#:æ¶è²»è
å¥çŽæ³10æ¡ã¯ïŒæ²æ³29æ¡1é
ã«éåããªãã
#:*æ¶è²»è
å¥çŽæ³10æ¡ãæ²æ³29æ¡1é
ã«éåãããã®ã§ãªãããšã¯ïŒ[[#財ç£æš©ã®æ¿ççèŠå¶|æé«è£å¹³æ14幎2æ13æ¥å€§æ³å»·å€æ±º]]ã®è¶£æšã«åŸŽããŠæããã§ããïŒ[[#æ¶è²»è
å¥çŽæ³9æ¡|æé«è£å¹³æ18幎11æ27æ¥ç¬¬äºå°æ³å»·å€æ±º]]åç
§ïŒ
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³|æ¥æ¬åœæ²æ³]]
|[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³#3|第3ç« åœæ°ã®æš©å©åã³çŸ©å]]
|[[æ¥æ¬åœæ²æ³ç¬¬28æ¡]]<br>ãå€åŽè
ã®å£çµæš©ã
|[[æ¥æ¬åœæ²æ³ç¬¬30æ¡]]<br>ãçŽçšã®çŸ©åã
}}
{{stub|law}}
[[category:æ¥æ¬åœæ²æ³|29]] | 2023-04-08T02:59:15Z | 2024-01-22T15:42:44Z | [
"ãã³ãã¬ãŒã:Wikipedia",
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E6%97%A5%E6%9C%AC%E5%9B%BD%E6%86%B2%E6%B3%95%E7%AC%AC29%E6%9D%A1 |
37,467 | æ€ç©ã®åœ¢ | æ€ç©ã«ã¯ãæ ¹ãèãèãè±ãçš®åãæå®ãªã©ã®éšäœããããŸããæ ¹ã¯ãåå£ããæ°Žåãæ é€çŽ ãåžåããæ€ç©ãæ¯ããæ©èœããããŸããèã¯ãå°äžéšåã®æ€ç©ã®äž»èŠãªæ§æèŠçŽ ã§ãããæ€ç©ãæ¯ããèãè±ãã€ããããã®å ŽæãæäŸããŸããèã¯ãå
åæãèžæ£äœçšãè¡ããè±ã¯ãçš®åã圢æããããã®çæ®åšå®ã§ããçš®åã¯ãæ°ããæ€ç©ãäœãããã®éèŠãªéšäœã§ãããæå®ã¯ãçš®åãä¿è·ããçš®åãéã¶ããã®åœ¹å²ãæãããŸãããŸããèœã¯æ°ããèãèãäœãããã®éšäœã§ãã
以äžãããæ€ç©ã®åœ¢ãã«å«ãŸããäž»ãªéšäœã«ã€ããŠã®è§£èª¬ã§ããæ€ç©ã¯ããããã®éšäœãçµã¿åãããããšã§å€æ§ãªåœ¢æ
ãæ©èœãæã¡ãæ§ã
ãªç°å¢ã«é©å¿ããŠçåããŠããŸãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ€ç©ã«ã¯ãæ ¹ãèãèãè±ãçš®åãæå®ãªã©ã®éšäœããããŸããæ ¹ã¯ãåå£ããæ°Žåãæ é€çŽ ãåžåããæ€ç©ãæ¯ããæ©èœããããŸããèã¯ãå°äžéšåã®æ€ç©ã®äž»èŠãªæ§æèŠçŽ ã§ãããæ€ç©ãæ¯ããèãè±ãã€ããããã®å ŽæãæäŸããŸããèã¯ãå
åæãèžæ£äœçšãè¡ããè±ã¯ãçš®åã圢æããããã®çæ®åšå®ã§ããçš®åã¯ãæ°ããæ€ç©ãäœãããã®éèŠãªéšäœã§ãããæå®ã¯ãçš®åãä¿è·ããçš®åãéã¶ããã®åœ¹å²ãæãããŸãããŸããèœã¯æ°ããèãèãäœãããã®éšäœã§ãã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "以äžãããæ€ç©ã®åœ¢ãã«å«ãŸããäž»ãªéšäœã«ã€ããŠã®è§£èª¬ã§ããæ€ç©ã¯ããããã®éšäœãçµã¿åãããããšã§å€æ§ãªåœ¢æ
ãæ©èœãæã¡ãæ§ã
ãªç°å¢ã«é©å¿ããŠçåããŠããŸãã",
"title": ""
}
] | æ€ç©ã«ã¯ãæ ¹ãèãèãè±ãçš®åãæå®ãªã©ã®éšäœããããŸããæ ¹ã¯ãåå£ããæ°Žåãæ é€çŽ ãåžåããæ€ç©ãæ¯ããæ©èœããããŸããèã¯ãå°äžéšåã®æ€ç©ã®äž»èŠãªæ§æèŠçŽ ã§ãããæ€ç©ãæ¯ããèãè±ãã€ããããã®å ŽæãæäŸããŸããèã¯ãå
åæãèžæ£äœçšãè¡ããè±ã¯ãçš®åã圢æããããã®çæ®åšå®ã§ããçš®åã¯ãæ°ããæ€ç©ãäœãããã®éèŠãªéšäœã§ãããæå®ã¯ãçš®åãä¿è·ããçš®åãéã¶ããã®åœ¹å²ãæãããŸãããŸããèœã¯æ°ããèãèãäœãããã®éšäœã§ãã æ ¹ïŒRootsïŒ æ ¹ã¯ãæ€ç©ã®å°äžéšåã§ãããåå£ããæ°Žåãæ é€çŽ ãåžåããæ€ç©ãæ¯ããæ©èœããããŸããæ ¹ã¯ãäž»æ ¹ïŒtaprootïŒãšåŽæ ¹ã«åé¡ãããŸããäž»æ ¹ã¯ãçŽç·çã§æ·±ã䌞ã³ãäžæ¬ã®æ ¹ã§ãåŽæ ¹ã¯äž»æ ¹ããåæããæ ¹ã§ããæ ¹ã¯ãããã«çŽ°ããæåãããããæ ¹æ¯ãšåŒã°ãã现èã§èŠãããæ ¹ã®å
端éšåãããæ°Žãæ é€çŽ ãåžåããŸãã
èïŒStemsïŒ èã¯ãå°äžéšåã®æ€ç©ã®äž»èŠãªæ§æèŠçŽ ã§ãããæ€ç©ãæ¯ããèãè±ãã€ããããã®å ŽæãæäŸããŸããèã¯ãçŽç«èãéãèãã€ãèïŒtendrilïŒãçèïŒbulbïŒãå¡èïŒtuberïŒãæ ¹èïŒrhizomeïŒãªã©ã®å€æ§ãªåœ¢ç¶ããããŸããèã¯ãå
éšã«æšè³ªéšãç¯ãšåŒã°ããéšäœãããããããã¯èãã€ããå ŽæãšãªããŸãã
èïŒLeavesïŒ èã¯ãèã®äžã«äŒžã³ãå¹³é¢çãªæ§é ç©ã§ãããå
åæãèžæ£äœçšãè¡ããŸããèã¯ãè身ãèæïŒpetioleïŒãèéãªã©ã®éšäœããæ§æãããŸããè身ã¯ã倧ããã圢ç¶ãè¡šé¢ã®è³ªæãªã©ãå€æ§ã§ãèçžã«ã¯ã®ã¶ã®ã¶ãããæ¯çžïŒserratedïŒããæ»ãããªçžãæã€å
šçžïŒentireïŒããããŸãããŸããèã«ã¯èèããããèèã¯ãèã«å«ãŸããç¶ç®¡æã«ãã£ãŠåœ¢æãããŸãã
è±ïŒFlowersïŒ è±ã¯ãçš®åã圢æããããã®çæ®åšå®ã§ãããå€ãã®æ€ç©çš®ã«ãããŠéèŠãªåœ¹å²ãæãããŸããè±ã¯ãè±åŒïŒpetalsïŒãèŒçïŒsepalsïŒãéãã¹ïŒstamenïŒãéãã¹ïŒpistilïŒã®4ã€ã®åºæ¬çãªéšäœããæ§æãããŸããè±åŒãšèŒçã¯ãè²ãšãã©ãã®è±ã®é
åçãªå€èŠ³ã圢æããéãã¹ãšéãã¹ã¯ãåç²ãçš®åã®åœ¢æã«å¿
èŠãªæ©èœãæã¡ãŸããè±ã¯ãè±å ïŒcorollaïŒãè±è¢«ïŒcalyxïŒãè±æïŒreceptacleïŒãªã©ã®éšäœããæ§æãããçš®åã圢æããããã«å¿
èŠãªéãã¹ãéãã¹ãåãŸãè±è»žïŒpeduncleïŒãæã¡ãŸãã
çš®åïŒSeedsïŒ çš®åã¯ãè±ã®åç²åŸã«åœ¢æããããæ°ããæ€ç©ãäœãããã®éèŠãªéšäœã§ããçš®åã¯ãèä¹³ïŒendospermïŒãšèïŒembryoïŒããæ§æãããå€ç®ã§èŠãããŠããŸããçš®åã¯ãèãèãè±ãäœãããã®æ
å ±ãæã£ãŠãããçºèœåŸã«æ ¹ãèãèã圢æããŠæé·ããŠãããŸãã
æå®ïŒFruitsïŒ æå®ã¯ãè±ã®åç²åŸã«åœ¢æãããçš®åãä¿è·ããçš®åãéã¶ããã®åœ¹å²ãæãããŸããæå®ã¯ãæç®ïŒpericarpïŒãšçš®åããæ§æãããæç®ã¯æå®ã®çš®é¡ã«ãã£ãŠããŸããŸãªåœ¢ç¶ãããŠããŸããæå®ã¯ãåæãåæãéåæãªã©ã®çš®é¡ããããŸãã
èœïŒBudsïŒ èœã¯ãæ°ããèãèãäœãããã®æé·ç¹ã§ãããæ€ç©ã®æé·ã«ãšã£ãŠéèŠãªéšäœã§ããèœã¯ãå¬èœãšå€èœã«åé¡ãããå¬èœã¯å¬æã«ä¿è·ãããæ¥ã«ãªããšæé·ãå§ãŸããŸããå€èœã¯ãæé·æã«åœ¢æãããæé·ãç¶ç¶ãããŸãã
æ é€åšå® æ é€åšå®ã¯ãæ€ç©ãæ é€çŽ ã貯èµããããã®éšäœã§ãããå¡èãçèãæ ¹èãªã©ããããŸãããããã®éšäœã¯ãæ€ç©ãå³ããç°å¢äžã§çã延ã³ãããã®çåæŠç¥ã®äžéšãšããŠé²åããŠããŸããã
èç èçã¯ãèã«èãã€ããŠããå Žæã«æ®ãçè·¡ã§ãããæ€ç©ã®æé·éçšã瀺ãæ
å ±ãå«ãŸããŠããŸãã
軞ïŒAxisïŒ è»žã¯ãè±ãæå®ãèãæãªã©ãæ¯ããéšäœã§ãããæ€ç©ã®å
šäœçãªåœ¢ç¶ã決å®ããéèŠãªèŠçŽ ã§ãã軞ã¯ãè±è»žãææ¢ãèæãªã©ã®çš®é¡ããããŸãã
è±åºïŒInflorescenceïŒè±åºã¯ãè€æ°ã®è±ãéãŸã£ãŠåœ¢æãããæ§é ã§ãããè±ã®é
眮ã圢ç¶ã«ãã£ãŠããŸããŸãªçš®é¡ããããŸããè±åºã«ã¯ãç©ç¶è±åºãç·ç¶è±åºãæ£ç¶è±åºãéæ£è±åºãªã©ããããŸããè±åºã¯ãæ€ç©ãç°å¢ã«é©å¿ããããã®æŠç¥ã®äžã€ãšããŠé²åããŠããŸããã
èçµç¯ïŒNodesïŒ èçµç¯ã¯ãèã®ç¯ç®ã«ããéšäœã§ãããèãè±ãçºçããå ŽæãšããŠéèŠãªåœ¹å²ãæãããŠããŸããèçµç¯ã¯ãç¯éïŒInternodeïŒãšå¯Ÿæ¯ãããæ€ç©ã®åœ¢æ
ãæ©èœã«åœ±é¿ãäžããŸãã
åºïŒThornsïŒ åºã¯ãèãèã«èŠãããéãçªèµ·ã§ãããæ€ç©ã®é²åŸ¡æ©èœãšããŠé²åããŠããŸãããåºã¯ãæé£è
ã競åçš®ãšã®ç«¶äºã«åã€ããã«æ€ç©ã身ã«ã€ããçåæŠç¥ã®äžã€ã§ãã
æ ¹æ¯ æ ¹æ¯ã¯ãæ ¹ã®è¡šé¢ã«ãã现èç¶çªèµ·ã§ãããæ ¹ãæ°Žåãæ é€çŽ ãåžåããããã®åœ¹å²ãæãããŸããæ ¹æ¯ã¯ã倧ããã圢ç¶ãäžèŠåã§ãæ°ãéåžžã«å€ããããæ ¹ã®è¡šé¢ç©ãå¢å ãããããšã§å¹ççã«åžåãè¡ããããã«ãªã£ãŠããŸãã 以äžãããæ€ç©ã®åœ¢ãã«å«ãŸããäž»ãªéšäœã«ã€ããŠã®è§£èª¬ã§ããæ€ç©ã¯ããããã®éšäœãçµã¿åãããããšã§å€æ§ãªåœ¢æ
ãæ©èœãæã¡ãæ§ã
ãªç°å¢ã«é©å¿ããŠçåããŠããŸãã | æ€ç©ã«ã¯ãæ ¹ãèãèãè±ãçš®åãæå®ãªã©ã®éšäœããããŸããæ ¹ã¯ãåå£ããæ°Žåãæ é€çŽ ãåžåããæ€ç©ãæ¯ããæ©èœããããŸããèã¯ãå°äžéšåã®æ€ç©ã®äž»èŠãªæ§æèŠçŽ ã§ãããæ€ç©ãæ¯ããèãè±ãã€ããããã®å ŽæãæäŸããŸããèã¯ãå
åæãèžæ£äœçšãè¡ããè±ã¯ãçš®åã圢æããããã®çæ®åšå®ã§ããçš®åã¯ãæ°ããæ€ç©ãäœãããã®éèŠãªéšäœã§ãããæå®ã¯ãçš®åãä¿è·ããçš®åãéã¶ããã®åœ¹å²ãæãããŸãããŸããèœã¯æ°ããèãèãäœãããã®éšäœã§ãã
*æ ¹ïŒRootsïŒ æ ¹ã¯ãæ€ç©ã®å°äžéšåã§ãããåå£ããæ°Žåãæ é€çŽ ãåžåããæ€ç©ãæ¯ããæ©èœããããŸããæ ¹ã¯ãäž»æ ¹ïŒtaprootïŒãšåŽæ ¹ïŒlateral rootïŒã«åé¡ãããŸããäž»æ ¹ã¯ãçŽç·çã§æ·±ã䌞ã³ãäžæ¬ã®æ ¹ã§ãåŽæ ¹ã¯äž»æ ¹ããåæããæ ¹ã§ããæ ¹ã¯ãããã«çŽ°ããæåãããããæ ¹æ¯ãšåŒã°ãã现èã§èŠãããæ ¹ã®å
端éšåãããæ°Žãæ é€çŽ ãåžåããŸãã
*èïŒStemsïŒ èã¯ãå°äžéšåã®æ€ç©ã®äž»èŠãªæ§æèŠçŽ ã§ãããæ€ç©ãæ¯ããèãè±ãã€ããããã®å ŽæãæäŸããŸããèã¯ãçŽç«èïŒerect stemïŒãéãèïŒcreeping stemïŒãã€ãèïŒtendrilïŒãçèïŒbulbïŒãå¡èïŒtuberïŒãæ ¹èïŒrhizomeïŒãªã©ã®å€æ§ãªåœ¢ç¶ããããŸããèã¯ãå
éšã«æšè³ªéšãç¯ãšåŒã°ããéšäœãããããããã¯èãã€ããå ŽæãšãªããŸãã
*èïŒLeavesïŒ èã¯ãèã®äžã«äŒžã³ãå¹³é¢çãªæ§é ç©ã§ãããå
åæãèžæ£äœçšãè¡ããŸããèã¯ãè身ïŒleaf bladeïŒãèæïŒpetioleïŒãèéïŒleaf sheathïŒãªã©ã®éšäœããæ§æãããŸããè身ã¯ã倧ããã圢ç¶ãè¡šé¢ã®è³ªæãªã©ãå€æ§ã§ãèçžã«ã¯ã®ã¶ã®ã¶ãããæ¯çžïŒserratedïŒããæ»ãããªçžãæã€å
šçžïŒentireïŒããããŸãããŸããèã«ã¯èèããããèèã¯ãèã«å«ãŸããç¶ç®¡æã«ãã£ãŠåœ¢æãããŸãã
*è±ïŒFlowersïŒ è±ã¯ãçš®åã圢æããããã®çæ®åšå®ã§ãããå€ãã®æ€ç©çš®ã«ãããŠéèŠãªåœ¹å²ãæãããŸããè±ã¯ãè±åŒïŒpetalsïŒãèŒçïŒsepalsïŒãéãã¹ïŒstamenïŒãéãã¹ïŒpistilïŒã®4ã€ã®åºæ¬çãªéšäœããæ§æãããŸããè±åŒãšèŒçã¯ãè²ãšãã©ãã®è±ã®é
åçãªå€èŠ³ã圢æããéãã¹ãšéãã¹ã¯ãåç²ãçš®åã®åœ¢æã«å¿
èŠãªæ©èœãæã¡ãŸããè±ã¯ãè±å ïŒcorollaïŒãè±è¢«ïŒcalyxïŒãè±æïŒreceptacleïŒãªã©ã®éšäœããæ§æãããçš®åã圢æããããã«å¿
èŠãªéãã¹ãéãã¹ãåãŸãè±è»žïŒpeduncleïŒãæã¡ãŸãã
*çš®åïŒSeedsïŒ çš®åã¯ãè±ã®åç²åŸã«åœ¢æããããæ°ããæ€ç©ãäœãããã®éèŠãªéšäœã§ããçš®åã¯ãèä¹³ïŒendospermïŒãšèïŒembryoïŒããæ§æãããå€ç®ïŒseed coatïŒã§èŠãããŠããŸããçš®åã¯ãèãèãè±ãäœãããã®æ
å ±ãæã£ãŠãããçºèœåŸã«æ ¹ãèãèã圢æããŠæé·ããŠãããŸãã
*æå®ïŒFruitsïŒ æå®ã¯ãè±ã®åç²åŸã«åœ¢æãããçš®åãä¿è·ããçš®åãéã¶ããã®åœ¹å²ãæãããŸããæå®ã¯ãæç®ïŒpericarpïŒãšçš®åããæ§æãããæç®ã¯æå®ã®çš®é¡ã«ãã£ãŠããŸããŸãªåœ¢ç¶ãããŠããŸããæå®ã¯ãåæïŒsimple fruitïŒãåæïŒaggregate fruitïŒãéåæïŒmultiple fruitïŒãªã©ã®çš®é¡ããããŸãã
*èœïŒBudsïŒ èœã¯ãæ°ããèãèãäœãããã®æé·ç¹ã§ãããæ€ç©ã®æé·ã«ãšã£ãŠéèŠãªéšäœã§ããèœã¯ãå¬èœïŒwinter budïŒãšå€èœïŒsummer budïŒã«åé¡ãããå¬èœã¯å¬æã«ä¿è·ãããæ¥ã«ãªããšæé·ãå§ãŸããŸããå€èœã¯ãæé·æã«åœ¢æãããæé·ãç¶ç¶ãããŸãã
*æ é€åšå®ïŒNutrient-storing OrgansïŒ æ é€åšå®ã¯ãæ€ç©ãæ é€çŽ ã貯èµããããã®éšäœã§ãããå¡èãçèãæ ¹èãªã©ããããŸãããããã®éšäœã¯ãæ€ç©ãå³ããç°å¢äžã§çã延ã³ãããã®çåæŠç¥ã®äžéšãšããŠé²åããŠããŸããã
*èçïŒLeaf ScarsïŒ èçã¯ãèã«èãã€ããŠããå Žæã«æ®ãçè·¡ã§ãããæ€ç©ã®æé·éçšã瀺ãæ
å ±ãå«ãŸããŠããŸãã
*軞ïŒAxisïŒ è»žã¯ãè±ãæå®ãèãæãªã©ãæ¯ããéšäœã§ãããæ€ç©ã®å
šäœçãªåœ¢ç¶ã決å®ããéèŠãªèŠçŽ ã§ãã軞ã¯ãè±è»žãææ¢ãèæãªã©ã®çš®é¡ããããŸãã
*è±åºïŒInflorescenceïŒè±åºã¯ãè€æ°ã®è±ãéãŸã£ãŠåœ¢æãããæ§é ã§ãããè±ã®é
眮ã圢ç¶ã«ãã£ãŠããŸããŸãªçš®é¡ããããŸããè±åºã«ã¯ãç©ç¶è±åºãç·ç¶è±åºãæ£ç¶è±åºãéæ£è±åºãªã©ããããŸããè±åºã¯ãæ€ç©ãç°å¢ã«é©å¿ããããã®æŠç¥ã®äžã€ãšããŠé²åããŠããŸããã
*èçµç¯ïŒNodesïŒ èçµç¯ã¯ãèã®ç¯ç®ã«ããéšäœã§ãããèãè±ãçºçããå ŽæãšããŠéèŠãªåœ¹å²ãæãããŠããŸããèçµç¯ã¯ãç¯éïŒInternodeïŒãšå¯Ÿæ¯ãããæ€ç©ã®åœ¢æ
ãæ©èœã«åœ±é¿ãäžããŸãã
*åºïŒThornsïŒ åºã¯ãèãèã«èŠãããéãçªèµ·ã§ãããæ€ç©ã®é²åŸ¡æ©èœãšããŠé²åããŠããŸãããåºã¯ãæé£è
ã競åçš®ãšã®ç«¶äºã«åã€ããã«æ€ç©ã身ã«ã€ããçåæŠç¥ã®äžã€ã§ãã
*æ ¹æ¯ïŒRoot HairsïŒ æ ¹æ¯ã¯ãæ ¹ã®è¡šé¢ã«ãã现èç¶çªèµ·ã§ãããæ ¹ãæ°Žåãæ é€çŽ ãåžåããããã®åœ¹å²ãæãããŸããæ ¹æ¯ã¯ã倧ããã圢ç¶ãäžèŠåã§ãæ°ãéåžžã«å€ããããæ ¹ã®è¡šé¢ç©ãå¢å ãããããšã§å¹ççã«åžåãè¡ããããã«ãªã£ãŠããŸãã
以äžãããæ€ç©ã®åœ¢ãã«å«ãŸããäž»ãªéšäœã«ã€ããŠã®è§£èª¬ã§ããæ€ç©ã¯ããããã®éšäœãçµã¿åãããããšã§å€æ§ãªåœ¢æ
ãæ©èœãæã¡ãæ§ã
ãªç°å¢ã«é©å¿ããŠçåããŠããŸãã | 2023-04-09T06:12:27Z | 2023-04-09T06:12:27Z | [] | https://ja.wikibooks.org/wiki/%E6%A4%8D%E7%89%A9%E3%81%AE%E5%BD%A2 |
37,494 | 蟲æ¥åç£ä¿¡çšæ³ç¬¬1æ¡ | æ³åŠ>æ°äºæ³>ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³
ã蟲æ¥ã®å®çŸ©ã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ°äºæ³>ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ã蟲æ¥ã®å®çŸ©ã",
"title": "æ¡æ"
}
] | æ³åŠïŒæ°äºæ³ïŒã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³ | [[æ³åŠ]]ïŒ[[æ°äºæ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³]]
==æ¡æ==
ã蟲æ¥ã®å®çŸ©ã
;第1æ¡
#æ¬æ³ãæŒã蟲æ¥ããèäœãé€çåãé€èãæ¥ååä¹ãééã¹ã«æ¥åã²è¬ã
#æ°Žç£åæ€ç©ãæ¡æè¥ãé€æ®åãèªççç£ãæ¥ååä¹ãééã¹ã«æ¥åãæ¬æ³ãé©çšãé¢ã·ããä¹ã²èŸ²æ¥ãçåã¹
==åç
§æ¡æ==
==å€äŸ==
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³|蟲æ¥åç£ä¿¡çšæ³]]
|[[ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³#1|第1ç« ç·å]]
|-
|[[蟲æ¥åç£ä¿¡çšæ³ç¬¬2æ¡]]<br>ã蟲æ¥çšåç£ã®å®çŸ©ã
}}
{{stub|law}}
[[category:蟲æ¥åç£ä¿¡çšæ³|01]] | 2023-04-10T04:40:25Z | 2023-04-10T04:40:25Z | [
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E8%BE%B2%E6%A5%AD%E5%8B%95%E7%94%A3%E4%BF%A1%E7%94%A8%E6%B3%95%E7%AC%AC1%E6%9D%A1 |
37,497 | 蟲æ¥åç£ä¿¡çšæ³ç¬¬14æ¡ | æ³åŠ>æ°äºæ³>ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³
ãè²æž¡åã¯ä»ã®æ
ä¿èšå®æã®çžææ¹ãžã®åç¥çŸ©åã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ°äºæ³>ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ãè²æž¡åã¯ä»ã®æ
ä¿èšå®æã®çžææ¹ãžã®åç¥çŸ©åã",
"title": "æ¡æ"
}
] | æ³åŠïŒæ°äºæ³ïŒã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³ | [[æ³åŠ]]ïŒ[[æ°äºæ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³]]
==æ¡æ==
ãè²æž¡åã¯ä»ã®æ
ä¿èšå®æã®çžææ¹ãžã®åç¥çŸ©åã
;第14æ¡
#æµåœæš©ãç®çã¿ã«èŸ²æ¥çšåç£ãææè
ã¬ä¹ã²è²æž¡ã»ã³ãã¹ã«ãããåœä»€ãå®ã ã«æãäŸãªå
¶ãè²å人ã察ã·æµåœæš©ãååšã¹ã«æšã²åç¥ã¹ã«ã³ãã²èŠã¹
#åé
ãèŠå®ãæµåœæš©ãç®çã¿ã«èŸ²æ¥çšåç£ã²ä»ãåµåãæ
ä¿ãäŸã»ã³ãã¹ã«ãããä¹ã²æºçšã¹
==解説==
:蟲æ¥çšåç£ãæµåœæš©ã®ç®çç©ãšãªã£ãŠããå Žåã«ããããè²æž¡åã¯è³ªæš©ãªã©ä»ã®æ
ä¿æš©ãèšå®ããããšããæãææè
ã¯çžææ¹ã«èŸ²æ¥çšåç£æµåœæš©ã®ç®çç©ã§ããããšãåç¥ããªããã°ãªããªãããã®æ¡é
ã«ããã[[蟲æ¥åç£ä¿¡çšæ³ç¬¬14æ¡|åæ¡]]ã®å³æååŸãçºçããå Žåã«ãææè
ã®æ
æé倱責任ãåãããšãã§ããã
==åç
§æ¡æ==
==å€äŸ==
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³|蟲æ¥åç£ä¿¡çšæ³]]
|[[ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³#3|第3ç« æµåœæš©]]
|[[蟲æ¥åç£ä¿¡çšæ³ç¬¬13æ¡]]<br>ãæµåœæš©ã®ç»èšã
|[[蟲æ¥åç£ä¿¡çšæ³ç¬¬15æ¡]]<br>ãè²æž¡åã¯ä»ã®æ
ä¿èšå®æã®æµåœæš©è
ãžã®åç¥çŸ©åã
}}
{{stub|law}}
[[category:蟲æ¥åç£ä¿¡çšæ³|14]] | 2023-04-10T07:20:56Z | 2023-04-10T07:20:56Z | [
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E8%BE%B2%E6%A5%AD%E5%8B%95%E7%94%A3%E4%BF%A1%E7%94%A8%E6%B3%95%E7%AC%AC14%E6%9D%A1 |
37,498 | 蟲æ¥åç£ä¿¡çšæ³ç¬¬15æ¡ | æ³åŠ>æ°äºæ³>ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³
ãè²æž¡åã¯ä»ã®æ
ä¿èšå®æã®æµåœæš©è
ãžã®åç¥çŸ©åã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ°äºæ³>ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ãè²æž¡åã¯ä»ã®æ
ä¿èšå®æã®æµåœæš©è
ãžã®åç¥çŸ©åã",
"title": "æ¡æ"
}
] | æ³åŠïŒæ°äºæ³ïŒã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³ | [[æ³åŠ]]ïŒ[[æ°äºæ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³]]
==æ¡æ==
ãè²æž¡åã¯ä»ã®æ
ä¿èšå®æã®æµåœæš©è
ãžã®åç¥çŸ©åã
;第15æ¡
#æµåœæš©ãç®çã¿ã«èŸ²æ¥çšåç£ãææè
ã¬ä¹ã²è²æž¡ã·åãä»ãåµåãæ
ä¿ãäŸã·ã¿ã«å ŽåãæŒããé
æ»ãã¯åæ¡ãåç¥ã²çºã·ã¿ã«æšã²æµåœæš©è
ãåç¥ã¹ã«ã³ãã²èŠã¹
#æµåœæš©ãç®çã¿ã«èŸ²æ¥çšåç£ãä»ç¬¬äžè
ã¬å·®æŒã²çºã·ã¿ã«å ŽåãæŒããå
¶ãææè
ãé
æ»ãã¯å
¶ãæšã²æµåœæš©è
ãåç¥ã¹ã«ã³ãã²èŠã¹
==解説==
:蟲æ¥çšåç£ãæµåœæš©ã®ç®çç©ãšãªã£ãŠããå Žåã«ããããè²æž¡åã¯è³ªæš©ãªã©ä»ã®æ
ä¿æš©ãèšå®ããããšããæãææè
ã¯èŸ²æ¥çšåç£æµåœæš©ã®ç®çç©ã§ããããšãçžææ¹ã«åç¥ããããšãæµåœæš©è
ã«åç¥ããªããã°ãªããªãã[[蟲æ¥åç£ä¿¡çšæ³ç¬¬15æ¡|åæ¡é
]]ã®å¹æã確å®ãªãã®ãšããã
:蟲æ¥çšåç£æµåœæš©ã®ç®çç©ã第äžè
ã[[å·®æŒã]]ãããå Žåãææè
ã¯é
æ»ãªãæµåœæš©è
ã«åç¥ããªããã°ãªããªãã
==åç
§æ¡æ==
==å€äŸ==
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³|蟲æ¥åç£ä¿¡çšæ³]]
|[[ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³#3|第3ç« æµåœæš©]]
|[[蟲æ¥åç£ä¿¡çšæ³ç¬¬14æ¡]]<br>ãè²æž¡åã¯ä»ã®æ
ä¿èšå®æã®çžææ¹ãžã®åç¥çŸ©åã
|[[蟲æ¥åç£ä¿¡çšæ³ç¬¬16æ¡]]<br>ãæµåœæš©ã®é äœã
}}
{{stub|law}}
[[category:蟲æ¥åç£ä¿¡çšæ³|15]] | 2023-04-10T07:46:48Z | 2023-04-10T07:46:48Z | [
"ãã³ãã¬ãŒã:Stub",
"ãã³ãã¬ãŒã:ååŸ"
] | https://ja.wikibooks.org/wiki/%E8%BE%B2%E6%A5%AD%E5%8B%95%E7%94%A3%E4%BF%A1%E7%94%A8%E6%B3%95%E7%AC%AC15%E6%9D%A1 |
37,499 | 蟲æ¥åç£ä¿¡çšæ³ç¬¬16æ¡ | æ³åŠ>æ°äºæ³>ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³
ãæµåœæš©ã®é äœã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ°äºæ³>ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ãæµåœæš©ã®é äœã",
"title": "æ¡æ"
}
] | æ³åŠïŒæ°äºæ³ïŒã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³ | [[æ³åŠ]]ïŒ[[æ°äºæ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³]]
==æ¡æ==
ãæµåœæš©ã®é äœã
;第16æ¡
#å
åç¹æš©ã蟲æ¥çšåç£ãæµåœæš©ã競åã¹ã«å ŽåãæŒããæµåœæš©è
ãæ°æ³ç¬¬äžçŸäžåæ¡ãæ²ã°ã«ç¬¬äžé äœãå
åç¹æš©è
ãåäžãæš©å©ã²æã¹
==解説==
:蟲æ¥çšåç£ã®æµåœæš©ã¯ã[[æ°æ³ç¬¬330æ¡]]ïŒåç£ã®å
åç¹æš©ã®é äœïŒç¬¬äžé äœã®ãã®ãšåçãšãªãïŒ[[蟲æ¥åç£ä¿¡çšæ³ç¬¬11æ¡#解説]]åç
§ïŒã
==åç
§æ¡æ==
*[[æ°æ³ç¬¬330æ¡]]
==å€äŸ==
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³|蟲æ¥åç£ä¿¡çšæ³]]
|[[ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³#3|第3ç« æµåœæš©]]
|[[蟲æ¥åç£ä¿¡çšæ³ç¬¬15æ¡]]<br>ãè²æž¡åã¯ä»ã®æ
ä¿èšå®æã®æµåœæš©è
ãžã®åç¥çŸ©åã
|[[蟲æ¥åç£ä¿¡çšæ³ç¬¬17æ¡]]<br>ãæµåœæš©å®è¡ã®å
什ã
}}
{{stub|law}}
[[category:蟲æ¥åç£ä¿¡çšæ³|16]] | 2023-04-10T11:05:04Z | 2023-04-10T11:05:04Z | [
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E8%BE%B2%E6%A5%AD%E5%8B%95%E7%94%A3%E4%BF%A1%E7%94%A8%E6%B3%95%E7%AC%AC16%E6%9D%A1 |
37,501 | 蟲æ¥åç£ä¿¡çšæ³ç¬¬18æ¡ | æ³åŠ>æ°äºæ³>ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³
ã眰å1ã
2022幎ã以äžã®ãšããæ¹æ£(æœè¡æ¥2025幎6æ1æ¥)ã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ°äºæ³>ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ã眰å1ã",
"title": "æ¡æ"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "2022幎ã以äžã®ãšããæ¹æ£(æœè¡æ¥2025幎6æ1æ¥)ã",
"title": "æ¡æ"
}
] | æ³åŠïŒæ°äºæ³ïŒã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³ | [[æ³åŠ]]ïŒ[[æ°äºæ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³]]
==æ¡æ==
ã眰å1ã
;第18æ¡
:æµåœæš©è
ãæ害ã²å ãã«ç®çã²ä»¥ãæµåœæš©ãç®çã¿ã«èŸ²æ¥çšåç£ã²æå·ã·åãé å¿ã·ã¿ã«è
ãäžå¹Žä»¥äžãæçŠååãåå以äžã眰éãåŠã¹äœã·ææè
ãææãåã·ãæå·ã·ã¿ã«è
ãä»ããåæ³ãäŸã«
===æ¹æ£çµç·¯===
2022幎ã以äžã®ãšããæ¹æ£ïŒæœè¡æ¥2025幎6æ1æ¥ïŒã
:ïŒæ¹æ£åïŒæ²åœ¹
:ïŒæ¹æ£åŸïŒæçŠå
==解説==
==åç
§æ¡æ==
==å€äŸ==
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³|蟲æ¥åç£ä¿¡çšæ³]]
|[[ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³#4|第4ç« çœ°å]]
|[[蟲æ¥åç£ä¿¡çšæ³ç¬¬17æ¡]]<br>ãæµåœæš©å®è¡ã®å
什ã
|[[蟲æ¥åç£ä¿¡çšæ³ç¬¬19æ¡]]<br>ã眰å2ã
}}
{{stub|law}}
[[category:蟲æ¥åç£ä¿¡çšæ³|18]]
[[category:åäºçœ°|ã®èŸ²å18]] | 2023-04-10T11:14:24Z | 2023-12-22T05:55:15Z | [
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E8%BE%B2%E6%A5%AD%E5%8B%95%E7%94%A3%E4%BF%A1%E7%94%A8%E6%B3%95%E7%AC%AC18%E6%9D%A1 |
37,502 | 蟲æ¥åç£ä¿¡çšæ³ç¬¬19æ¡ | æ³åŠ>æ°äºæ³>ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³
ã眰å2ã
2022幎æ¹æ£ã«ããã以äžã®ãšããæ¹æ£ãæœè¡æ¥ã«ã€ããŠã¯æªå®(2023幎4æ10æ¥æç¹)ã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ°äºæ³>ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ã眰å2ã",
"title": "æ¡æ"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "2022幎æ¹æ£ã«ããã以äžã®ãšããæ¹æ£ãæœè¡æ¥ã«ã€ããŠã¯æªå®(2023幎4æ10æ¥æç¹)ã",
"title": "æ¡æ"
}
] | æ³åŠïŒæ°äºæ³ïŒã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³ | [[æ³åŠ]]ïŒ[[æ°äºæ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³]]
==æ¡æ==
ã眰å2ã
;第19æ¡
#æµåœæš©ãç®çã¿ã«èŸ²æ¥çšåç£ãææè
æµåœæš©è
ãæ害ã²å ãã«ç®çã²ä»¥ã該åç£ãé¢ã·è²æž¡ã質å
¥å
¶ãä»æµåœæš©ã²äŸµå®³ã¹ããè¡çºã²çºã·ã¿ã«ãããäžå¹Žä»¥äžãæçŠååãåå以äžã眰éãåŠã¹
#åé
ãåç£ææè
ã代衚è
åã代ç人æ¬äººãçºãåé
ãè¡çºã²çºã·ã¿ã«ãã亊åãž
===æ¹æ£çµç·¯===
2022幎ã以äžã®ãšããæ¹æ£ïŒæœè¡æ¥2025幎6æ1æ¥ïŒã
:ïŒæ¹æ£åïŒæ²åœ¹
:ïŒæ¹æ£åŸïŒæçŠå
==解説==
==åç
§æ¡æ==
==å€äŸ==
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³|蟲æ¥åç£ä¿¡çšæ³]]
|[[ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³#4|第4ç« çœ°å]]
|[[蟲æ¥åç£ä¿¡çšæ³ç¬¬18æ¡]]<br>ã眰å1ã
|[[蟲æ¥åç£ä¿¡çšæ³ç¬¬20æ¡]]<br>ã芪å眪ã
}}
{{stub|law}}
[[category:蟲æ¥åç£ä¿¡çšæ³|19]]
[[category:åäºçœ°|ã®èŸ²å19]] | 2023-04-10T11:16:27Z | 2023-12-22T05:55:42Z | [
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E8%BE%B2%E6%A5%AD%E5%8B%95%E7%94%A3%E4%BF%A1%E7%94%A8%E6%B3%95%E7%AC%AC19%E6%9D%A1 |
37,503 | 蟲æ¥åç£ä¿¡çšæ³ç¬¬20æ¡ | æ³åŠ>æ°äºæ³>ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³
ã芪å眪ã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ°äºæ³>ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ã芪å眪ã",
"title": "æ¡æ"
}
] | æ³åŠïŒæ°äºæ³ïŒã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³ | [[æ³åŠ]]ïŒ[[æ°äºæ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³]]
==æ¡æ==
ã芪å眪ã
;第20æ¡
:åäºæ¡ã眪ãå蚎ã¢ã«ãéã¶ã¬ãå
¬èšŽã²æèµ·ã¹ã«ã³ãã²åŸãº
==解説==
==åç
§æ¡æ==
==å€äŸ==
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³|蟲æ¥åç£ä¿¡çšæ³]]
|[[ã³ã³ã¡ã³ã¿ãŒã«èŸ²æ¥åç£ä¿¡çšæ³#4|第4ç« çœ°å]]
|[[蟲æ¥åç£ä¿¡çšæ³ç¬¬19æ¡]]<br>ã眰å2ã
|-
}}
{{stub|law}}
[[category:蟲æ¥åç£ä¿¡çšæ³|20]]
[[category:åäºçœ°|ã®èŸ²å20]] | 2023-04-10T11:18:26Z | 2023-12-22T05:56:03Z | [
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E8%BE%B2%E6%A5%AD%E5%8B%95%E7%94%A3%E4%BF%A1%E7%94%A8%E6%B3%95%E7%AC%AC20%E6%9D%A1 |
37,527 | åæ³ç¬¬756æ¡ | æ³åŠ>æ°äºæ³>åæ³>ã³ã³ã¡ã³ã¿ãŒã«åæ³>第3ç·š æµ·å (ã³ã³ã¡ã³ã¿ãŒã«åæ³)>åæ³ç¬¬756æ¡
(ååééå¥çŽã«é¢ããèŠå®ã®æºçšç)
2018幎æ¹æ£ã
æºçšæ¡æ
2018幎æ¹æ£åã«ã¯ãæ¬æ¡ã«ã¯ä»¥äžã®æ¡é
ããã£ããã趣æšã¯æèšçŸä»£åã®äžãåæ³ç¬¬752æ¡(ééåã®éžæã)ã«ç§»åã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ°äºæ³>åæ³>ã³ã³ã¡ã³ã¿ãŒã«åæ³>第3ç·š æµ·å (ã³ã³ã¡ã³ã¿ãŒã«åæ³)>åæ³ç¬¬756æ¡",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "(ååééå¥çŽã«é¢ããèŠå®ã®æºçšç)",
"title": "æ¡æ"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "2018幎æ¹æ£ã",
"title": "æ¡æ"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "æºçšæ¡æ",
"title": "åç
§æ¡æ"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "2018幎æ¹æ£åã«ã¯ãæ¬æ¡ã«ã¯ä»¥äžã®æ¡é
ããã£ããã趣æšã¯æèšçŸä»£åã®äžãåæ³ç¬¬752æ¡(ééåã®éžæã)ã«ç§»åã",
"title": "åè"
}
] | æ³åŠïŒæ°äºæ³ïŒåæ³ïŒã³ã³ã¡ã³ã¿ãŒã«åæ³ïŒç¬¬3ç·š æµ·å (ã³ã³ã¡ã³ã¿ãŒã«åæ³)ïŒåæ³ç¬¬756æ¡ | [[æ³åŠ]]ïŒ[[æ°äºæ³]]ïŒ[[åæ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«åæ³]]ïŒ[[第3ç·š æµ·å (ã³ã³ã¡ã³ã¿ãŒã«åæ³)]]ïŒ[[åæ³ç¬¬756æ¡]]
==æ¡æ==
(ååééå¥çŽã«é¢ããèŠå®ã®æºçšç)
;第756æ¡
#第738æ¡ãã第742æ¡ãŸã§(第739æ¡ç¬¬2é
ãé€ãã)ã第744æ¡ã第746æ¡åã³ç¬¬747æ¡ã®èŠå®ã¯ãèªæµ·åè¹å¥çŽã«ã€ããŠæºçšããããã®å Žåã«ãããŠã第741æ¡ç¬¬1é
äžãéé¡ããšããã®ã¯ãéé¡åã³æ»è¹æããšã第744æ¡äžãåæ¡ããšããã®ã¯ã第753æ¡ç¬¬1é
åã¯ç¬¬755æ¡ã«ãããŠæºçšããåæ¡ããšã第747æ¡äžããã®ç¯ããšããã®ã¯ã次ç¯ããšèªã¿æ¿ãããã®ãšããã
#éé人ã¯ãåé
ã«ãããŠæºçšãã第739æ¡ç¬¬1é
ã®èŠå®ã«ããéé人ã®æå®³è³ åã®è²¬ä»»ãå
é€ããåã¯è»œæžããç¹çŽããã£ãŠè¹è·èšŒåžã®ææ人ã«å¯Ÿæããããšãã§ããªãã
===æ¹æ£çµç·¯===
2018幎æ¹æ£ã
==解説==
==åç
§æ¡æ==
æºçšæ¡æ
:[[åæ³ç¬¬738æ¡|第738æ¡]]ïŒè¹é·ã«å¯Ÿããå¿
èŠæžé¡ã®äº€ä»ïŒ
:[[åæ³ç¬¬739æ¡|第739æ¡]]ïŒèªæµ·ã«å ªããèœåã«é¢ãã泚æ矩åïŒ
:[[åæ³ç¬¬740æ¡|第740æ¡]]ïŒéæ³ãªè¹ç©åã®éžæãçïŒ
:[[åæ³ç¬¬741æ¡|第741æ¡]]ïŒè·å人ã®ééè³æ¯æ矩åçïŒ
:[[åæ³ç¬¬742æ¡|第742æ¡]]ïŒééåã®ç«¶å£²ïŒ
:[[åæ³ç¬¬744æ¡|第744æ¡]]ãä»éã®è²»çšåã³ç«æ¿éã®æ¯æ矩åã®ç¶æã
:[[åæ³ç¬¬746æ¡|第746æ¡]]ïŒç©è·ãèªæµ·ã®çšã«äŸããå Žåã®ééè³ïŒ
:[[åæ³ç¬¬747æ¡|第747æ¡]]ïŒéèªæµ·è¹ã«ããç©åééãžã®æºçšïŒ
==å€äŸ==
==åè==
2018幎æ¹æ£åã«ã¯ãæ¬æ¡ã«ã¯ä»¥äžã®æ¡é
ããã£ããã趣æšã¯æèšçŸä»£åã®äžã[[åæ³ç¬¬752æ¡]](ééåã®éžæã)ã«ç§»åã
:æéã²ä»¥ãééè³ã²å®ã¡ã¿ã«ãããå
¶é¡ãééåãè¹ç©èæãæ¥ãšãªå
¶éžæçµäºãæ¥ãããæéãäŸãªãä¹ã²å®ã äœè¹è¶ã«äžå¯æåãå ãªçºèªæž¯è¥ã¯ãèªæµ·ãéäžãæŒãç¢æ³ã²çºã¹ããããåãèªæµ·ãéäžãæŒãè¹è¶ã²ä¿®ç¹ã¹ãããããå
¶æéãä¹ã²ç®å
¥ã»ã¹ç¬¬äžçŸååäžæ¡ç¬¬äºé
åã第äžçŸäºåäºæ¡ç¬¬äºé
ãå ŽåãæŒãè¹ç©æéåãéžææéçµéãåŸééåãè¹ç©åãéžæã²çºã·ã¿ã«æ¥æ°äºŠåã·
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«åæ³|åæ³]]
|[[第3ç·š æµ·å (ã³ã³ã¡ã³ã¿ãŒã«åæ³)|第3ç·š æµ·å]]<br>
[[第3ç·š æµ·å (ã³ã³ã¡ã³ã¿ãŒã«åæ³)#3|第3ç« æµ·äžç©åééã«é¢ããç¹å]]<br>
[[第3ç·š æµ·å (ã³ã³ã¡ã³ã¿ãŒã«åæ³)#3-1|第2ç¯ èªæµ·åè¹]]
|[[åæ³ç¬¬755æ¡]]<br>ïŒäžéšèªæµ·åè¹å¥çŽã®è§£é€ãžã®æºçšïŒ
|[[åæ³ç¬¬757æ¡]]<br>ïŒè¹è·èšŒåžã®äº€ä»çŸ©åïŒ
}}
{{stub|law}}
[[category:åæ³|756]]
[[category:æµ·åæ³|756]]
[[category:åæ³ 2018幎æ¹æ£|756]] | 2023-04-12T10:06:43Z | 2023-04-12T10:06:43Z | [
"ãã³ãã¬ãŒã:Stub",
"ãã³ãã¬ãŒã:ååŸ"
] | https://ja.wikibooks.org/wiki/%E5%95%86%E6%B3%95%E7%AC%AC756%E6%9D%A1 |
37,533 | ç Žç£æ³ç¬¬72æ¡ | æ³åŠ>æ°äºæ³>ã³ã³ã¡ã³ã¿ãŒã«>ã³ã³ã¡ã³ã¿ãŒã«ç Žç£æ³
ãçžæ®ºã®çŠæ¢ 2ã
2004幎(å¹³æ16幎)å
šé¢æ¹æ£æã«ãæ§æ³ç¬¬104æ¡ãåæ¡ãšãšãã«ç¶æ¿ã
2004幎(å¹³æ16幎)å
šé¢æ¹æ£åã«ã¯ãåŠèªæš©ã«é¢ããæ¡é
ããã£ãããæ¹æ£ã®äžã第160æ¡ã«ç§»ãããã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ°äºæ³>ã³ã³ã¡ã³ã¿ãŒã«>ã³ã³ã¡ã³ã¿ãŒã«ç Žç£æ³",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ãçžæ®ºã®çŠæ¢ 2ã",
"title": "æ¡æ"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "2004幎(å¹³æ16幎)å
šé¢æ¹æ£æã«ãæ§æ³ç¬¬104æ¡ãåæ¡ãšãšãã«ç¶æ¿ã",
"title": "æ¡æ"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "2004幎(å¹³æ16幎)å
šé¢æ¹æ£åã«ã¯ãåŠèªæš©ã«é¢ããæ¡é
ããã£ãããæ¹æ£ã®äžã第160æ¡ã«ç§»ãããã",
"title": "åè"
}
] | æ³åŠïŒæ°äºæ³ïŒã³ã³ã¡ã³ã¿ãŒã«ïŒã³ã³ã¡ã³ã¿ãŒã«ç Žç£æ³ | [[æ³åŠ]]ïŒ[[æ°äºæ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«ç Žç£æ³]]
==æ¡æ==
ãçžæ®ºã®çŠæ¢ 2ã
;第71æ¡
#ç Žç£è
ã«å¯ŸããŠåµåãè² æ
ããè
ã¯ã次ã«æ²ããå Žåã«ã¯ãçžæ®ºãããããšãã§ããªãã
##ç Žç£æç¶éå§åŸã«ä»äººã®ç Žç£åµæš©ãååŸãããšãã
##æ¯æäžèœã«ãªã£ãåŸã«ç Žç£åµæš©ãååŸããå Žåã§ãã£ãŠããã®ååŸã®åœæãæ¯æäžèœã§ãã£ãããšãç¥ã£ãŠãããšãã
##æ¯æã®åæ¢ããã£ãåŸã«ç Žç£åµæš©ãååŸããå Žåã§ãã£ãŠããã®ååŸã®åœæãæ¯æã®åæ¢ããã£ãããšãç¥ã£ãŠãããšãããã ããåœè©²æ¯æã®åæ¢ããã£ãæã«ãããŠæ¯æäžèœã§ãªãã£ããšãã¯ããã®éãã§ãªãã
##ç Žç£æç¶éå§ã®ç³ç«ãŠããã£ãåŸã«ç Žç£åµæš©ãååŸããå Žåã§ãã£ãŠããã®ååŸã®åœæãç Žç£æç¶éå§ã®ç³ç«ãŠããã£ãããšãç¥ã£ãŠãããšãã
#åé
第2å·ãã第4å·ãŸã§ã®èŠå®ã¯ããããã®èŠå®ã«èŠå®ããç Žç£åµæš©ã®ååŸã次ã®åå·ã«æ²ããåå ã®ããããã«åºã¥ãå Žåã«ã¯ãé©çšããªãã
##æ³å®ã®åå
##æ¯æäžèœã§ãã£ãããšåã¯æ¯æã®åæ¢è¥ããã¯ç Žç£æç¶éå§ã®ç³ç«ãŠããã£ãããšãç Žç£è
ã«å¯ŸããŠåµåãè² æ
ããè
ãç¥ã£ãæããåã«çããåå
##ç Žç£æç¶éå§ã®ç³ç«ãŠããã£ãæãã1幎以äžåã«çããåå
##ç Žç£è
ã«å¯ŸããŠåµåãè² æ
ããè
ãšç Žç£è
ãšã®éã®å¥çŽ
===æ¹æ£çµç·¯===
2004幎ïŒå¹³æ16幎ïŒå
šé¢æ¹æ£æã«ãæ§æ³ç¬¬104æ¡ã[[ç Žç£æ³ç¬¬71æ¡|åæ¡]]ãšãšãã«ç¶æ¿ã
==解説==
==åç
§æ¡æ==
==å€äŸ==
==åè==
2004幎ïŒå¹³æ16幎ïŒå
šé¢æ¹æ£åã«ã¯ãåŠèªæš©ã«é¢ããæ¡é
ããã£ãããæ¹æ£ã®äžã[[ç Žç£æ³ç¬¬160æ¡|第160æ¡]]ã«ç§»ãããã
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«ç Žç£æ³|ç Žç£æ³]]
|[[ã³ã³ã¡ã³ã¿ãŒã«ç Žç£æ³#2|第2ç« ç Žç£æç¶ã®éå§]]<br>
[[ã³ã³ã¡ã³ã¿ãŒã«ç Žç£æ³#s2-3|第3ç¯ãç Žç£æç¶éå§ã®å¹æ]]
[[ã³ã³ã¡ã³ã¿ãŒã«ç Žç£æ³#s2-3-5|第5欟 çžæ®ºæš©]]
|[[ç Žç£æ³ç¬¬71æ¡]]<br>(çžæ®ºã®çŠæ¢)
|[[ç Žç£æ³ç¬¬73æ¡]]<br>(ç Žç£ç®¡è²¡äººã®å¬åæš©)
}}
{{stub|law}}
[[category:ç Žç£æ³|72]] | 2023-04-12T12:40:05Z | 2023-04-12T12:40:05Z | [
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E7%A0%B4%E7%94%A3%E6%B3%95%E7%AC%AC72%E6%9D%A1 |
37,534 | æ£åã¢ã©ãã¢èª/ã¯ããã« | ã¢ã©ãã¢èªã¯ãäž»ã«åã¢ããªã«ã§äœ¿ãããŠããèšèªã§ãçŽ2å3500äžäººã®äººã
ã«è©±ãããŠããŸãã
ãŸãã1973幎ã«ã¯åœé£å
¬çšèªã«ãè¿œå ãããŸããã
ã¢ã©ãã¢èªã¯å€§ããåããŠæèªã®ãã¹ããŒãšå£èªã®ã¢ãŒã³ããŒã€ã«åããããŸãã(æ£åã¢ã©ãã¢èªã¯ãã¹ããŒã®ããšã§ãã)
ã¢ãŒã³ããŒã€ã«ã¯æ¹èšããããæ¹èšã«ãã£ãŠçºé³ãææ³ã倧ããå€ããããšããããŸãã
ãã¹ããŒã¯æ¥åžžäŒè©±ã§ã¯ããŸã䜿çšãããŸããããã³ã³ãã¥ãŒã¿ãŒã®ç»é¢ããã¥ãŒã¹çªçµãªã©ã«äœ¿çšãããããšããããã
ã¢ã©ãã¢èªã¯ãããäžçäžé£ããèšèªããšèšãããŸãããã¢ã©ãã¢èªã®é£ããèŠçŽ ã¯äœãªã®ã§ãããã
ã¢ã©ãã¢èªã§ã¯æ¯é³ãè¡šèšãããªãããšãå€ãã§ãã
åäŸãå€åœäººåãã®æžç±ã«ã¯æ¯é³èšå·ããã®ä»ã®èšå·(ã·ã£ã¯ã«)ãæžãããããšã¯ãããŸãããåºæ¬çã«ã¯è¡šèšãããæèã§å€æãããŸãã
äŸ:Ùتؚ
ãã®åèªã«ã¯ãkããtããbãã®æåãå«ãŸããŠããŸãããæ¯é³ã¯è¡šèšãããŠããŸãããã€ãŸãããã®åèªã¯ãkatabaã(圌ã¯æžãã)ãšèªãããšãã§ããŸãããkutubã(æ¬ã®è€æ°åœ¢)ãšèªãããšãã§ãããšããããšã§ãã
ã¢ã©ãã¢èªã®åè©ãªã©ã¯è€æ°åœ¢ãäžèŠåãªåèªãå€ãã§ãã
äŸ:Ùتاؚ(kitÄb)âÙتؚ(kutub) æ¬
ÙÙØš(kalb)âÙÙاؚ(kilÄb) ç¬
ä»ã«ãåè©æŽ»çšãªã©é£ããèŠçŽ ããããŸãããä»ã®èšèªãšæ¯ã¹ãŠç°¡åãªèŠçŽ ããããŸãã
ãŸããèšèªã®ç¿åŸé£æ床ã«ã¯å人差ãããã®ã§ããã¢ã©ãã¢èªã¯é£ããããšã¯äžæŠã«ã¯èšãåããŸãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "ã¢ã©ãã¢èªã¯ãäž»ã«åã¢ããªã«ã§äœ¿ãããŠããèšèªã§ãçŽ2å3500äžäººã®äººã
ã«è©±ãããŠããŸãã",
"title": "ã¢ã©ãã¢èªãšã¯ïŒ"
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ãŸãã1973幎ã«ã¯åœé£å
¬çšèªã«ãè¿œå ãããŸããã",
"title": "ã¢ã©ãã¢èªãšã¯ïŒ"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "ã¢ã©ãã¢èªã¯å€§ããåããŠæèªã®ãã¹ããŒãšå£èªã®ã¢ãŒã³ããŒã€ã«åããããŸãã(æ£åã¢ã©ãã¢èªã¯ãã¹ããŒã®ããšã§ãã)",
"title": "æ£åã¢ã©ãã¢èªãšã¯ïŒ"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "ã¢ãŒã³ããŒã€ã«ã¯æ¹èšããããæ¹èšã«ãã£ãŠçºé³ãææ³ã倧ããå€ããããšããããŸãã",
"title": "æ£åã¢ã©ãã¢èªãšã¯ïŒ"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "ãã¹ããŒã¯æ¥åžžäŒè©±ã§ã¯ããŸã䜿çšãããŸããããã³ã³ãã¥ãŒã¿ãŒã®ç»é¢ããã¥ãŒã¹çªçµãªã©ã«äœ¿çšãããããšããããã",
"title": "æ£åã¢ã©ãã¢èªãšã¯ïŒ"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "ã¢ã©ãã¢èªã¯ãããäžçäžé£ããèšèªããšèšãããŸãããã¢ã©ãã¢èªã®é£ããèŠçŽ ã¯äœãªã®ã§ãããã",
"title": "ã¢ã©ãã¢èªã¯é£ããïŒ"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "ã¢ã©ãã¢èªã§ã¯æ¯é³ãè¡šèšãããªãããšãå€ãã§ãã",
"title": "ã¢ã©ãã¢èªã¯é£ããïŒ"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "åäŸãå€åœäººåãã®æžç±ã«ã¯æ¯é³èšå·ããã®ä»ã®èšå·(ã·ã£ã¯ã«)ãæžãããããšã¯ãããŸãããåºæ¬çã«ã¯è¡šèšãããæèã§å€æãããŸãã",
"title": "ã¢ã©ãã¢èªã¯é£ããïŒ"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "äŸ:Ùتؚ",
"title": "ã¢ã©ãã¢èªã¯é£ããïŒ"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "ãã®åèªã«ã¯ãkããtããbãã®æåãå«ãŸããŠããŸãããæ¯é³ã¯è¡šèšãããŠããŸãããã€ãŸãããã®åèªã¯ãkatabaã(圌ã¯æžãã)ãšèªãããšãã§ããŸãããkutubã(æ¬ã®è€æ°åœ¢)ãšèªãããšãã§ãããšããããšã§ãã",
"title": "ã¢ã©ãã¢èªã¯é£ããïŒ"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "ã¢ã©ãã¢èªã®åè©ãªã©ã¯è€æ°åœ¢ãäžèŠåãªåèªãå€ãã§ãã",
"title": "ã¢ã©ãã¢èªã¯é£ããïŒ"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "äŸ:Ùتاؚ(kitÄb)âÙتؚ(kutub) æ¬",
"title": "ã¢ã©ãã¢èªã¯é£ããïŒ"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "ÙÙØš(kalb)âÙÙاؚ(kilÄb) ç¬",
"title": "ã¢ã©ãã¢èªã¯é£ããïŒ"
},
{
"paragraph_id": 13,
"tag": "p",
"text": "ä»ã«ãåè©æŽ»çšãªã©é£ããèŠçŽ ããããŸãããä»ã®èšèªãšæ¯ã¹ãŠç°¡åãªèŠçŽ ããããŸãã",
"title": "ã¢ã©ãã¢èªã¯é£ããïŒ"
},
{
"paragraph_id": 14,
"tag": "p",
"text": "ãŸããèšèªã®ç¿åŸé£æ床ã«ã¯å人差ãããã®ã§ããã¢ã©ãã¢èªã¯é£ããããšã¯äžæŠã«ã¯èšãåããŸãã",
"title": "ã¢ã©ãã¢èªã¯é£ããïŒ"
}
] | null | == ã¢ã©ãã¢èªãšã¯ïŒ ==
[[ãã¡ã€ã«:Arabic_speaking_world.svg|ãµã ãã€ã«|180x180ãã¯ã»ã«]]
ã¢ã©ãã¢èªã¯ãäž»ã«åã¢ããªã«ã§äœ¿ãããŠããèšèªã§ãçŽ2å3500äžäººã®äººã
ã«è©±ãããŠããŸãã<ref>[[w:ã¢ã©ãã¢èª|Wikipedia:ã¢ã©ãã¢èª]]</ref>
ãŸãã1973幎ã«ã¯åœé£å
¬çšèªã«ãè¿œå ãããŸããã
== æ£åã¢ã©ãã¢èªãšã¯ïŒ ==
ã¢ã©ãã¢èªã¯å€§ããåããŠæèªã®ãã¹ããŒãšå£èªã®ã¢ãŒã³ããŒã€ã«åããããŸããïŒæ£åã¢ã©ãã¢èªã¯ãã¹ããŒã®ããšã§ããïŒ
ã¢ãŒã³ããŒã€ã«ã¯æ¹èšããããæ¹èšã«ãã£ãŠçºé³ãææ³ã倧ããå€ããããšããããŸãã
ãã¹ããŒã¯æ¥åžžäŒè©±ã§ã¯ããŸã䜿çšãããŸããããã³ã³ãã¥ãŒã¿ãŒã®ç»é¢ããã¥ãŒã¹çªçµãªã©ã«äœ¿çšãããããšããããŸãã
== è泚 ==
{{Reflist}}
[[ã«ããŽãª:ã¢ã©ãã¢èª]] | 2023-04-12T13:52:14Z | 2023-10-05T12:49:00Z | [
"ãã³ãã¬ãŒã:Reflist"
] | https://ja.wikibooks.org/wiki/%E6%AD%A3%E5%89%87%E3%82%A2%E3%83%A9%E3%83%93%E3%82%A2%E8%AA%9E/%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB |
37,545 | é«çåŠæ ¡å®¶åºç·å/åœã®èªçâŠä¹³å
ã®æé·ã»çºé | 粟åãšåµåãå粟ããŠåå®®å
èã«çåºãããšãåŠåš ãå§ãŸããŸããåŠåš ãåãããšã女æ§ãã«ã¢ã³ã®åãã§çç(æçµ)ãäžæŠæ¢ãŸããŸãã
åµåã®å¯¿åœã¯æåµåŸ10æé以å
ã粟åã®å¯¿åœã¯å°ç²ŸåŸ2~3æ¥ä»¥å
ãšèšãããŠããŸãããã®æéãéãããšãå粟ããŸãããå粟ã¯ããŸãã«åçãªåºäŒããšãããã§ããããçåœã®èªçã¯å粟ããå§ãŸããŸãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "粟åãšåµåãå粟ããŠåå®®å
èã«çåºãããšãåŠåš ãå§ãŸããŸããåŠåš ãåãããšã女æ§ãã«ã¢ã³ã®åãã§çç(æçµ)ãäžæŠæ¢ãŸããŸãã",
"title": "åŠåš ããåè²ãŠãå§ãŸã"
},
{
"paragraph_id": 1,
"tag": "p",
"text": "åµåã®å¯¿åœã¯æåµåŸ10æé以å
ã粟åã®å¯¿åœã¯å°ç²ŸåŸ2~3æ¥ä»¥å
ãšèšãããŠããŸãããã®æéãéãããšãå粟ããŸãããå粟ã¯ããŸãã«åçãªåºäŒããšãããã§ããããçåœã®èªçã¯å粟ããå§ãŸããŸãã",
"title": "åŠåš ããåè²ãŠãå§ãŸã"
}
] | null | [[å°åŠæ ¡ã»äžåŠæ ¡ã»é«çåŠæ ¡ã®åŠç¿]]>[[é«çåŠæ ¡ã®åŠç¿]]>[[é«çåŠæ ¡å®¶åº]]>[[é«çåŠæ ¡å®¶åºç·å]]>åœã®èªç
== åŠåš ããåè²ãŠãå§ãŸã ==
ã粟åãšåµåã'''å粟'''ããŠåå®®å
èã«'''çåº'''ãããšã'''åŠåš '''ãå§ãŸããŸããåŠåš ãåãããšã女æ§ãã«ã¢ã³ã®åãã§ççïŒæçµïŒãäžæŠæ¢ãŸããŸãã
ãåµåã®å¯¿åœã¯æåµåŸïŒïŒæé以å
ã粟åã®å¯¿åœã¯å°ç²ŸåŸïŒïœïŒæ¥ä»¥å
ãšèšãããŠããŸãããã®æéãéãããšãå粟ããŸãããå粟ã¯ããŸãã«åçãªåºäŒããšãããã§ããããçåœã®èªçã¯å粟ããå§ãŸããŸãã | 2023-04-13T10:52:30Z | 2023-04-13T10:52:30Z | [] | https://ja.wikibooks.org/wiki/%E9%AB%98%E7%AD%89%E5%AD%A6%E6%A0%A1%E5%AE%B6%E5%BA%AD%E7%B7%8F%E5%90%88/%E5%91%BD%E3%81%AE%E8%AA%95%E7%94%9F%E2%80%A6%E4%B9%B3%E5%85%90%E3%81%AE%E6%88%90%E9%95%B7%E3%83%BB%E7%99%BA%E9%81%94 |
37,549 | å©æ¯å¶éæ³ç¬¬3æ¡ | ã³ã³ã¡ã³ã¿ãŒã«å©æ¯å¶éæ³
(ã¿ãªãå©æ¯) | [
{
"paragraph_id": 0,
"tag": "p",
"text": "ã³ã³ã¡ã³ã¿ãŒã«å©æ¯å¶éæ³",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "(ã¿ãªãå©æ¯)",
"title": "æ¡æ"
}
] | ã³ã³ã¡ã³ã¿ãŒã«å©æ¯å¶éæ³ | [[ã³ã³ã¡ã³ã¿ãŒã«å©æ¯å¶éæ³]]
==æ¡æ==
ïŒã¿ãªãå©æ¯ïŒ
;第3æ¡ ã
:åäºæ¡ã®èŠå®ã®é©çšã«ã€ããŠã¯ãééãç®çãšããæ¶è²»è²žåã«é¢ãåµæš©è
ã®åããå
æ¬ä»¥å€ã®ééã¯ã瀌éãå²åŒéãææ°æã調æ»æãã®ä»ãããªãå矩ããã£ãŠããããåãããå©æ¯ãšã¿ãªãããã ããå¥çŽã®ç· çµåã³åµåã®åŒæžã®è²»çšã¯ããã®éãã§ãªãã
==解説==
==åç
§æ¡æ==
==å€äŸ==
----
{{ååŸ
|[[å©æ¯å¶éæ³]]
|第1ç« å©æ¯çã®å¶é
|[[å©æ¯å¶éæ³ç¬¬2æ¡]]<br>ïŒå©æ¯ã®å€©åŒãïŒ
|[[å©æ¯å¶éæ³ç¬¬4æ¡]]<br>ïŒè³ åé¡ã®äºå®ã®å¶éïŒ
}}
{{stub|law}}
[[category:å©æ¯å¶éæ³|03]] | 2023-04-13T15:46:41Z | 2023-04-13T15:46:41Z | [
"ãã³ãã¬ãŒã:Stub",
"ãã³ãã¬ãŒã:ååŸ"
] | https://ja.wikibooks.org/wiki/%E5%88%A9%E6%81%AF%E5%88%B6%E9%99%90%E6%B3%95%E7%AC%AC3%E6%9D%A1 |
37,562 | TSDoc | TSDocã¯ãTypeScriptãããžã§ã¯ãã§äœ¿çšãããããã¥ã¡ã³ããŒã·ã§ã³ã³ã¡ã³ãã®ããã®èŠæ Œã§ããããã«ãããéçºè
ã¯TypeScriptã®åæ
å ±ãšãšãã«ãããæ確ãã€äžè²«ããããã¥ã¡ã³ããŒã·ã§ã³ãäœæã§ããŸãã
ãã®ãã¥ãŒããªã¢ã«ã§ã¯ãTSDocã®åºæ¬çãªæŠå¿µãšäœ¿çšæ³ã«ã€ããŠèª¬æããŸããå
·äœçã«ã¯ãTSDocã³ã¡ã³ãã®æžãæ¹ãäžè¬çãªã¿ã°ã®äœ¿çšæ¹æ³ãããã³é«åºŠãªã¿ã°ã®äœ¿çšæ¹æ³ã«ã€ããŠèª¬æããŸãã
ãŸããTSDocã®æçšæ§ãšããã¥ã¡ã³ããŒã·ã§ã³ã®éèŠæ§ã«ã€ããŠã觊ããŸãã ãã®ãã¥ãŒããªã¢ã«ãèªã¿çµãããšãéçºè
ã¯TypeScriptãããžã§ã¯ãã§TSDocã䜿çšããããã®ç¥èãç²åŸã§ããããè¯ãããã¥ã¡ã³ããŒã·ã§ã³ãäœæããããšãã§ããããã«ãªããŸãã
[TSDocã®æŠèŠãšããªãããã¥ã¡ã³ããŒã·ã§ã³ã«TSDocã䜿ãããã®ãã玹ä»ããŸãã]
TSDocãšã¯ãTypeScriptãããžã§ã¯ãã§äœ¿çšãããããã¥ã¡ã³ããŒã·ã§ã³ã³ã¡ã³ãã®ããã®èŠæ Œã§ããTSDocã¯ãJSDocãããŒã¹ã«äœæãããŠãããTypeScriptã®åæ
å ±ãå©çšããŠãããæ確ã§æ£ç¢ºãªããã¥ã¡ã³ããŒã·ã§ã³ãäœæããããšãã§ããŸãã
TSDocã¯ãTypeScriptã®åæ
å ±ã掻çšããããšã§ãããã¥ã¡ã³ããŒã·ã§ã³ã®ç²ŸåºŠãåäžãããããšãã§ããŸããäŸãã°ãTypeScriptã®åæ
å ±ãå©çšããããšã§ãé¢æ°ãã¡ãœããã®åŒæ°ãæ»ãå€ã®åãæ確ã«ããããšãã§ããŸããããã«ãããéçºè
ã¯ããæ£ç¢ºãªæ
å ±ãåŸãããšãã§ããã³ãŒãã®å©çšè
ãããç解ããããããã¥ã¡ã³ããŒã·ã§ã³ãåŸãããšãã§ããŸãã
TSDocã䜿çšãããäž»ãªçç±ã¯ãããã¥ã¡ã³ããŒã·ã§ã³ã®éèŠæ§ã§ããã³ãŒããæžãéã«ã¯ããããã©ã®ããã«åäœããããæ確ã«ããããšãéåžžã«éèŠã§ããããããã³ãŒããè€éã«ãªããšãããã¥ã¡ã³ããŒã·ã§ã³ãæžãããšãå°é£ã«ãªãããšããããŸãããã®ãããTSDocã䜿çšããããšã§ãéçºè
ã¯ããç°¡åã«æ£ç¢ºãã€æ確ãªããã¥ã¡ã³ããŒã·ã§ã³ãäœæã§ããŸãã
ãŸããTSDocã¯ãéçºè
ãã³ãŒããç¶æããããã®è² æ
ãæžããããšãã§ããŸããTSDocã³ã¡ã³ãã䜿çšããããšã§ãã³ãŒããå€æŽãããå Žåã«ãããã¥ã¡ã³ããŒã·ã§ã³ãèªåçã«æŽæ°ããããããæåã§ããã¥ã¡ã³ããŒã·ã§ã³ãæŽæ°ããå¿
èŠããããŸããã
以äžã®ããã«ãTSDocã¯ãæ£ç¢ºãã€æ確ãªããã¥ã¡ã³ããŒã·ã§ã³ãäœæããããšãã§ãããããTypeScriptãããžã§ã¯ãã§åºã䜿çšãããŠããŸãã次ã®ç« ã§ã¯ãTSDocã³ã¡ã³ãã®æžãæ¹ã«ã€ããŠèª¬æããŸãã
JSDocãšTSDocã¯ãJavaScriptãšTypeScriptã®äž¡æ¹ã§äœ¿çšããããã³ãŒãã®ããã¥ã¡ã³ããŒã·ã§ã³ã®ããã®ããŒã«ã§ãããããã€ãã®éãããããŸãã
TSDocã¯ãTypeScriptãããžã§ã¯ãã§äœ¿çšããããã«ãnpmããã±ãŒãžãšããŠæäŸãããŠããŸããTSDocãã€ã³ã¹ããŒã«ããã«ã¯ã以äžã®æé ãå®è¡ããŸãã
ãŸãããããžã§ã¯ãã®ã«ãŒããã£ã¬ã¯ããªã§ã以äžã®ã³ãã³ããå®è¡ããŸãã
次ã«ãtsconfig.jsonãã¡ã€ã«ãç·šéããŠãTSDocãæå¹ã«ããŸããtsconfig.jsonãã¡ã€ã«ã«ä»¥äžã®ã³ãŒããè¿œå ããŸãã
ããã«ãããTSDocãTypeScriptã®åæ
å ±ãèªã¿èŸŒãã§ãããã¥ã¡ã³ããŒã·ã§ã³ãçæããããã«ãªããŸãã
æåŸã«ãããã¥ã¡ã³ããŒã·ã§ã³ãçæããããã®ã³ãã³ããå®è¡ããŸãã以äžã®ã³ãã³ããå®è¡ãããšãTSDocã«ãã£ãŠããã¥ã¡ã³ããŒã·ã§ã³ãçæãããŸãã
以äžã®æé ã§ãTSDocãã€ã³ã¹ããŒã«ãããæå¹ã«ãªããããã¥ã¡ã³ããŒã·ã§ã³ãçæãããŸãã次ã®ç« ã§ã¯ãTSDocã³ã¡ã³ãã®æžãæ¹ã«ã€ããŠèª¬æããŸãã
[TSDocã§äœ¿çšãããåºæ¬çãªã¿ã°ãšããããã䜿çšããæ¹æ³ã玹ä»ããŸãã]
TSDocã§äœ¿çšãããåºæ¬çãªã¿ã°ã«ã¯ã以äžã®ãã®ããããŸãã
ãããã®ã¿ã°ã¯ãé¢æ°ãã¯ã©ã¹ãã¡ãœãããããããã£ãªã©ã®ããã¥ã¡ã³ããŒã·ã§ã³ã«äœ¿çšãããŸãã以äžã¯ã@paramãš@returnsã®äœ¿çšäŸã§ãã
ãã®äŸã§ã¯ã@paramã¿ã°ã2ã€äœ¿çšãããŠããŸããåã¿ã°ã«ã¯ããã©ã¡ãŒã¿ã®ååãšèª¬æãå«ãŸããŠããŸãã@returnsã¿ã°ã«ã¯ãæ»ãå€ã®åãšèª¬æãå«ãŸããŠããŸãã
[é¢æ°ã®ãã©ã¡ãŒã¿ãæ»ãå€ã®ããã¥ã¡ã³ããŒã·ã§ã³ã«ã€ããŠã詳ãã説æããŸãã]
é¢æ°ã®ãã©ã¡ãŒã¿ãæ»ãå€ã«é¢ããããã¥ã¡ã³ããŒã·ã§ã³ã¯ã@paramãš@returnsã¿ã°ã䜿çšããŠèšè¿°ã§ããŸãããããã®ã¿ã°ã«ã¯ããã©ã¡ãŒã¿ãæ»ãå€ã«é¢ããæ
å ±ãæäŸããããã®ããã€ãã®å±æ§ããããŸãã以äžã¯ã@paramã¿ã°ãš@returnsã¿ã°ã§äœ¿çšãããå±æ§ã®äžéšã§ãã
以äžã¯ããã©ã¡ãŒã¿ã«é¢ããããã¥ã¡ã³ããŒã·ã§ã³ã®äŸã§ãã
ãã®äŸã§ã¯ã@paramã¿ã°ã2ã€äœ¿çšãããŠããŸããåã¿ã°ã«ã¯ããã©ã¡ãŒã¿ã®ååãšèª¬æãå«ãŸããŠããŸãã
[TSDocã§äœ¿çšãããã¿ã°ã®ãã¡ããã詳现ãªèª¬æãå¿
èŠãªã¿ã°ã«ã€ããŠèª¬æããŸãã]
[TSDocã§ç¬èªã®ã«ã¹ã¿ã ã¿ã°ãäœæããæ¹æ³ã説æããŸãã]
TSDocã§ã¯ããããžã§ã¯ãã®ããŒãºã«å¿ããŠç¬èªã®ã«ã¹ã¿ã ã¿ã°ãäœæããããšãã§ããŸããã«ã¹ã¿ã ã¿ã°ãäœæããããšã§ããããžã§ã¯ãåºæã®æ
å ±ãããã¥ã¡ã³ããŒã·ã§ã³ã«å«ããããšãã§ããŸãã
ã«ã¹ã¿ã ã¿ã°ãäœæããã«ã¯ãTSDocã® @custom ã¿ã°ã䜿çšããŸãã @custom ã¿ã°ã«ã¯ã以äžã®ãããªå±æ§ãæå®ã§ããŸãã
ã«ã¹ã¿ã ã¿ã°ã®çš®é¡ãšããŠã¯ã以äžã®ãã®ããããŸãã
以äžã¯ã@custom ã¿ã°ã䜿çšããŠç¬èªã® @example ã¿ã°ãäœæããäŸã§ãã
ãã®äŸã§ã¯ã@example ã¿ã°ã®ååã example ã«èšå®ããçš®é¡ã block ã«èšå®ããŠããŸãããŸããã«ã¹ã¿ã ã¿ã°ã®èª¬æãšããŠãProvides an example of how to use a function or class. ãšããæãæå®ããŠããŸãã
ã«ã¹ã¿ã ã¿ã°ã䜿çšããå ŽåãTypeScriptã®ã³ã³ãã€ã©ã«ãªãã·ã§ã³ --customDocTags ãæå®ããŠãã«ã¹ã¿ã ã¿ã°ãèªèãããå¿
èŠããããŸãã以äžã¯ã@example ã¿ã°ã䜿çšããäŸã§ãã
ãã®äŸã§ã¯ã@example ã¿ã°ã䜿çšããŠãé¢æ°ã®äœ¿çšäŸãæäŸããŠããŸãã @example ã¿ã°ã¯ãã«ã¹ã¿ã ã¿ã°ãšããŠå®çŸ©ãããŠãããããã³ã³ãã€ã©ã« --customDocTags ãªãã·ã§ã³ãæå®ããå¿
èŠããããŸãã
[TSDocã䜿çšããŠãHTMLãJSONãªã©ã®åœ¢åŒã§ãœãŒã¹ã³ãŒãã®ããã¥ã¡ã³ããçæããæ¹æ³ã説æããŸãã]
TSDocã䜿çšããŠããœãŒã¹ã³ãŒãã®ããã¥ã¡ã³ããçæããæ¹æ³ã玹ä»ããŸããTSDocã«ã¯ãHTMLãJSONãªã©ã®åœ¢åŒã§ããã¥ã¡ã³ããçæããããã®ã³ãã³ããçšæãããŠããŸãã
HTMLãã¡ã€ã«ãçæããã«ã¯ãTSDocã«ä»å±ããtypedocã³ãã³ãã䜿çšããŸãã以äžã®ã³ãã³ããå®è¡ããããšã§ãæå®ããããœãŒã¹ã³ãŒãããHTMLãã¡ã€ã«ãçæããããšãã§ããŸãã
äžèšã®ã³ãã³ãã§ã¯ã./src以äžã®ãœãŒã¹ã³ãŒãããHTMLãã¡ã€ã«ãçæãã./docsãã£ã¬ã¯ããªã«åºåããŠããŸããçæãããHTMLãã¡ã€ã«ã¯ããã©ãŠã¶ã§éããŠé²èŠ§ããããšãã§ããŸãã
JSONãã¡ã€ã«ãçæããã«ã¯ãTSDocã«ä»å±ããts-json-docsã³ãã³ãã䜿çšããŸãã以äžã®ã³ãã³ããå®è¡ããããšã§ãæå®ããããœãŒã¹ã³ãŒãããJSONãã¡ã€ã«ãçæããããšãã§ããŸãã
äžèšã®ã³ãã³ãã§ã¯ã./src以äžã®.tsãã¡ã€ã«ããJSONãã¡ã€ã«ãçæãã./docs/api-docs.jsonã«åºåããŠããŸããçæãããJSONãã¡ã€ã«ã¯ãAPIããã¥ã¡ã³ãã®äœæãªã©ã«äœ¿çšããããšãã§ããŸãã
以äžããTSDocã䜿çšããŠãœãŒã¹ã³ãŒãã®ããã¥ã¡ã³ããçæããæ¹æ³ã§ããçæãããããã¥ã¡ã³ãã¯ãéçºè
ãã³ãŒããç解ããããã«éèŠãªæ
å ±ãæäŸããããããããžã§ã¯ãã®å質åäžã«åœ¹ç«ã¡ãŸãã
== TSDocã®ãšãã£ã¿ãµããŒã == [TSDocã䜿çšããããã¥ã¡ã³ããŒã·ã§ã³ã®å¹æãé«ããããã®ãããã€ãã®ãšãã£ã¿ã®ãã©ã°ã€ã³ãæ¡åŒµæ©èœã玹ä»ããŸãã] TSDocã䜿çšããããšã§ãã³ãŒãã®ããã¥ã¡ã³ããŒã·ã§ã³ãæ¹åãããŸããããšãã£ã¿ãµããŒãã䜿çšããããšã§ãéçºè
ã¯ããç°¡åã«TSDocãèšè¿°ã§ããŸãã以äžã¯ãTSDocããµããŒãããããã€ãã®ãšãã£ã¿ãã©ã°ã€ã³ã§ãã
ãããã®ãšãã£ã¿ãã©ã°ã€ã³ã䜿çšããããšã§ãTSDocã䜿çšããã³ãŒãã®ããã¥ã¡ã³ããŒã·ã§ã³ãããç°¡åã«ãªããéçºè
ã¯ããå¹æçã«ããã¥ã¡ã³ããäœæã§ããŸãã
[TSDocã§ã®ããã¥ã¡ã³ããŒã·ã§ã³ã®ãã¹ããã©ã¯ãã£ã¹ã玹ä»ããããèªã¿ããããæ確ãªã³ãŒãã®ããã¥ã¡ã³ããäœæããããã®ãã³ããæäŸããŸãã]
TSDocã䜿ã£ãŠå¹æçãªããã¥ã¡ã³ããŒã·ã§ã³ãäœæããã«ã¯ã以äžã®ãã¹ããã©ã¯ãã£ã¹ãéµå®ããããšãéèŠã§ãã
以äžããTSDocã䜿ã£ãå¹æçãªããã¥ã¡ã³ããŒã·ã§ã³ã®ããã®ãã¹ããã©ã¯ãã£ã¹ã§ããããããéµå®ããããšã§ãããèªã¿ããããæ確ãªã³ãŒãã®ããã¥ã¡ã³ããäœæããããšãã§ããŸãã
TSDocã§äœ¿çšãããåºæ¬çãªã¿ã°ãšãã®äœ¿ãæ¹ã®æŠèŠã§ãã
ãããã®ã¿ã°ã¯ã/** ... */ãããã¯ã³ã¡ã³ãã®äžã«èšè¿°ããŸããäŸãã°ã次ã®ãããªé¢æ°ãããã¥ã¡ã³ãåããå Žåã以äžã®ããã«TSDocã³ã¡ã³ããè¿œå ããŸãã
以äžã¯ãTSDocã®äž»èŠãªã¿ã°ã䜿çšããTypeScriptã®ã³ãŒãäŸã§ãã
ãã®TypeScriptã®ã³ãŒãã¯ã2D空éã®ç¹ãè¡šãPointã¯ã©ã¹ãšããã®ç¹ã®ã³ã¬ã¯ã·ã§ã³ãè¡šãPointCollectionã¯ã©ã¹ãå®çŸ©ããŠããŸãã
Pointã¯ã©ã¹ã«ã¯ãx座æšãšy座æšã®ããããã£ããããdistanceToã¡ãœããã䜿çšããŠä»ã®ç¹ãšã®è·é¢ãèšç®ããããšãã§ããŸãããã®ã¯ã©ã¹ã¯ã@publicã¿ã°ã§å
¬éãããŠãããä»ã®ã¢ãžã¥ãŒã«ãã䜿çšããããšãã§ããŸãã
PointCollectionã¯ã©ã¹ã¯ãPointãªããžã§ã¯ãã®é
åãåŒæ°ãšããŠåããé
åå
ã®ãã¹ãŠã®ç¹ãæ ŒçŽããŸãããã®ã¯ã©ã¹ãã@publicã¿ã°ã§å
¬éãããŠããŸãã
PointCollectionã¯ã©ã¹ã«ã¯ãaddã¡ãœããããããæ°ããPointãªããžã§ã¯ããè¿œå ã§ããŸãããŸããfindClosestã¡ãœããã䜿çšããŠãæå®ãããç¹ã«æãè¿ãç¹ãæ€çŽ¢ããããšãã§ããŸãããã®ã¡ãœããã¯ãPointãªããžã§ã¯ããè¿ããŸãã
ãã®ã³ãŒãã«ã¯ãTSDocã®äž»èŠãªã¿ã°ã䜿çšãããŠããŸããã¯ã©ã¹ãã¡ãœãããããã³ããããã£ã«ã¯ã@classã@publicã@paramãããã³@returnsã¿ã°ãå«ãŸããŸãããããã®ã¿ã°ã¯ãã³ãŒãã®ããã¥ã¡ã³ããŒã·ã§ã³ã«å¿
èŠãªæ
å ±ãæäŸããŸãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "TSDocã¯ãTypeScriptãããžã§ã¯ãã§äœ¿çšãããããã¥ã¡ã³ããŒã·ã§ã³ã³ã¡ã³ãã®ããã®èŠæ Œã§ããããã«ãããéçºè
ã¯TypeScriptã®åæ
å ±ãšãšãã«ãããæ確ãã€äžè²«ããããã¥ã¡ã³ããŒã·ã§ã³ãäœæã§ããŸãã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ãã®ãã¥ãŒããªã¢ã«ã§ã¯ãTSDocã®åºæ¬çãªæŠå¿µãšäœ¿çšæ³ã«ã€ããŠèª¬æããŸããå
·äœçã«ã¯ãTSDocã³ã¡ã³ãã®æžãæ¹ãäžè¬çãªã¿ã°ã®äœ¿çšæ¹æ³ãããã³é«åºŠãªã¿ã°ã®äœ¿çšæ¹æ³ã«ã€ããŠèª¬æããŸãã",
"title": ""
},
{
"paragraph_id": 2,
"tag": "p",
"text": "ãŸããTSDocã®æçšæ§ãšããã¥ã¡ã³ããŒã·ã§ã³ã®éèŠæ§ã«ã€ããŠã觊ããŸãã ãã®ãã¥ãŒããªã¢ã«ãèªã¿çµãããšãéçºè
ã¯TypeScriptãããžã§ã¯ãã§TSDocã䜿çšããããã®ç¥èãç²åŸã§ããããè¯ãããã¥ã¡ã³ããŒã·ã§ã³ãäœæããããšãã§ããããã«ãªããŸãã",
"title": ""
},
{
"paragraph_id": 3,
"tag": "p",
"text": "[TSDocã®æŠèŠãšããªãããã¥ã¡ã³ããŒã·ã§ã³ã«TSDocã䜿ãããã®ãã玹ä»ããŸãã]",
"title": "TSDocãšã¯"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "TSDocãšã¯ãTypeScriptãããžã§ã¯ãã§äœ¿çšãããããã¥ã¡ã³ããŒã·ã§ã³ã³ã¡ã³ãã®ããã®èŠæ Œã§ããTSDocã¯ãJSDocãããŒã¹ã«äœæãããŠãããTypeScriptã®åæ
å ±ãå©çšããŠãããæ確ã§æ£ç¢ºãªããã¥ã¡ã³ããŒã·ã§ã³ãäœæããããšãã§ããŸãã",
"title": "TSDocãšã¯"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "TSDocã¯ãTypeScriptã®åæ
å ±ã掻çšããããšã§ãããã¥ã¡ã³ããŒã·ã§ã³ã®ç²ŸåºŠãåäžãããããšãã§ããŸããäŸãã°ãTypeScriptã®åæ
å ±ãå©çšããããšã§ãé¢æ°ãã¡ãœããã®åŒæ°ãæ»ãå€ã®åãæ確ã«ããããšãã§ããŸããããã«ãããéçºè
ã¯ããæ£ç¢ºãªæ
å ±ãåŸãããšãã§ããã³ãŒãã®å©çšè
ãããç解ããããããã¥ã¡ã³ããŒã·ã§ã³ãåŸãããšãã§ããŸãã",
"title": "TSDocãšã¯"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "TSDocã䜿çšãããäž»ãªçç±ã¯ãããã¥ã¡ã³ããŒã·ã§ã³ã®éèŠæ§ã§ããã³ãŒããæžãéã«ã¯ããããã©ã®ããã«åäœããããæ確ã«ããããšãéåžžã«éèŠã§ããããããã³ãŒããè€éã«ãªããšãããã¥ã¡ã³ããŒã·ã§ã³ãæžãããšãå°é£ã«ãªãããšããããŸãããã®ãããTSDocã䜿çšããããšã§ãéçºè
ã¯ããç°¡åã«æ£ç¢ºãã€æ確ãªããã¥ã¡ã³ããŒã·ã§ã³ãäœæã§ããŸãã",
"title": "TSDocãšã¯"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "ãŸããTSDocã¯ãéçºè
ãã³ãŒããç¶æããããã®è² æ
ãæžããããšãã§ããŸããTSDocã³ã¡ã³ãã䜿çšããããšã§ãã³ãŒããå€æŽãããå Žåã«ãããã¥ã¡ã³ããŒã·ã§ã³ãèªåçã«æŽæ°ããããããæåã§ããã¥ã¡ã³ããŒã·ã§ã³ãæŽæ°ããå¿
èŠããããŸããã",
"title": "TSDocãšã¯"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "以äžã®ããã«ãTSDocã¯ãæ£ç¢ºãã€æ確ãªããã¥ã¡ã³ããŒã·ã§ã³ãäœæããããšãã§ãããããTypeScriptãããžã§ã¯ãã§åºã䜿çšãããŠããŸãã次ã®ç« ã§ã¯ãTSDocã³ã¡ã³ãã®æžãæ¹ã«ã€ããŠèª¬æããŸãã",
"title": "TSDocãšã¯"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "JSDocãšTSDocã¯ãJavaScriptãšTypeScriptã®äž¡æ¹ã§äœ¿çšããããã³ãŒãã®ããã¥ã¡ã³ããŒã·ã§ã³ã®ããã®ããŒã«ã§ãããããã€ãã®éãããããŸãã",
"title": "TSDocãšã¯"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "TSDocã¯ãTypeScriptãããžã§ã¯ãã§äœ¿çšããããã«ãnpmããã±ãŒãžãšããŠæäŸãããŠããŸããTSDocãã€ã³ã¹ããŒã«ããã«ã¯ã以äžã®æé ãå®è¡ããŸãã",
"title": "TSDocã®ã€ã³ã¹ããŒã«"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "ãŸãããããžã§ã¯ãã®ã«ãŒããã£ã¬ã¯ããªã§ã以äžã®ã³ãã³ããå®è¡ããŸãã",
"title": "TSDocã®ã€ã³ã¹ããŒã«"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "次ã«ãtsconfig.jsonãã¡ã€ã«ãç·šéããŠãTSDocãæå¹ã«ããŸããtsconfig.jsonãã¡ã€ã«ã«ä»¥äžã®ã³ãŒããè¿œå ããŸãã",
"title": "TSDocã®ã€ã³ã¹ããŒã«"
},
{
"paragraph_id": 13,
"tag": "p",
"text": "ããã«ãããTSDocãTypeScriptã®åæ
å ±ãèªã¿èŸŒãã§ãããã¥ã¡ã³ããŒã·ã§ã³ãçæããããã«ãªããŸãã",
"title": "TSDocã®ã€ã³ã¹ããŒã«"
},
{
"paragraph_id": 14,
"tag": "p",
"text": "æåŸã«ãããã¥ã¡ã³ããŒã·ã§ã³ãçæããããã®ã³ãã³ããå®è¡ããŸãã以äžã®ã³ãã³ããå®è¡ãããšãTSDocã«ãã£ãŠããã¥ã¡ã³ããŒã·ã§ã³ãçæãããŸãã",
"title": "TSDocã®ã€ã³ã¹ããŒã«"
},
{
"paragraph_id": 15,
"tag": "p",
"text": "以äžã®æé ã§ãTSDocãã€ã³ã¹ããŒã«ãããæå¹ã«ãªããããã¥ã¡ã³ããŒã·ã§ã³ãçæãããŸãã次ã®ç« ã§ã¯ãTSDocã³ã¡ã³ãã®æžãæ¹ã«ã€ããŠèª¬æããŸãã",
"title": "TSDocã®ã€ã³ã¹ããŒã«"
},
{
"paragraph_id": 16,
"tag": "p",
"text": "[TSDocã§äœ¿çšãããåºæ¬çãªã¿ã°ãšããããã䜿çšããæ¹æ³ã玹ä»ããŸãã]",
"title": "åºæ¬çãªTSDocã¿ã°"
},
{
"paragraph_id": 17,
"tag": "p",
"text": "TSDocã§äœ¿çšãããåºæ¬çãªã¿ã°ã«ã¯ã以äžã®ãã®ããããŸãã",
"title": "åºæ¬çãªTSDocã¿ã°"
},
{
"paragraph_id": 18,
"tag": "p",
"text": "ãããã®ã¿ã°ã¯ãé¢æ°ãã¯ã©ã¹ãã¡ãœãããããããã£ãªã©ã®ããã¥ã¡ã³ããŒã·ã§ã³ã«äœ¿çšãããŸãã以äžã¯ã@paramãš@returnsã®äœ¿çšäŸã§ãã",
"title": "åºæ¬çãªTSDocã¿ã°"
},
{
"paragraph_id": 19,
"tag": "p",
"text": "ãã®äŸã§ã¯ã@paramã¿ã°ã2ã€äœ¿çšãããŠããŸããåã¿ã°ã«ã¯ããã©ã¡ãŒã¿ã®ååãšèª¬æãå«ãŸããŠããŸãã@returnsã¿ã°ã«ã¯ãæ»ãå€ã®åãšèª¬æãå«ãŸããŠããŸãã",
"title": "åºæ¬çãªTSDocã¿ã°"
},
{
"paragraph_id": 20,
"tag": "p",
"text": "[é¢æ°ã®ãã©ã¡ãŒã¿ãæ»ãå€ã®ããã¥ã¡ã³ããŒã·ã§ã³ã«ã€ããŠã詳ãã説æããŸãã]",
"title": "ãã©ã¡ãŒã¿ãšæ»ãå€"
},
{
"paragraph_id": 21,
"tag": "p",
"text": "é¢æ°ã®ãã©ã¡ãŒã¿ãæ»ãå€ã«é¢ããããã¥ã¡ã³ããŒã·ã§ã³ã¯ã@paramãš@returnsã¿ã°ã䜿çšããŠèšè¿°ã§ããŸãããããã®ã¿ã°ã«ã¯ããã©ã¡ãŒã¿ãæ»ãå€ã«é¢ããæ
å ±ãæäŸããããã®ããã€ãã®å±æ§ããããŸãã以äžã¯ã@paramã¿ã°ãš@returnsã¿ã°ã§äœ¿çšãããå±æ§ã®äžéšã§ãã",
"title": "ãã©ã¡ãŒã¿ãšæ»ãå€"
},
{
"paragraph_id": 22,
"tag": "p",
"text": "以äžã¯ããã©ã¡ãŒã¿ã«é¢ããããã¥ã¡ã³ããŒã·ã§ã³ã®äŸã§ãã",
"title": "ãã©ã¡ãŒã¿ãšæ»ãå€"
},
{
"paragraph_id": 23,
"tag": "p",
"text": "ãã®äŸã§ã¯ã@paramã¿ã°ã2ã€äœ¿çšãããŠããŸããåã¿ã°ã«ã¯ããã©ã¡ãŒã¿ã®ååãšèª¬æãå«ãŸããŠããŸãã",
"title": "ãã©ã¡ãŒã¿ãšæ»ãå€"
},
{
"paragraph_id": 24,
"tag": "p",
"text": "[TSDocã§äœ¿çšãããã¿ã°ã®ãã¡ããã詳现ãªèª¬æãå¿
èŠãªã¿ã°ã«ã€ããŠèª¬æããŸãã]",
"title": "ã¿ã°ã®è©³çŽ°"
},
{
"paragraph_id": 25,
"tag": "p",
"text": "[TSDocã§ç¬èªã®ã«ã¹ã¿ã ã¿ã°ãäœæããæ¹æ³ã説æããŸãã]",
"title": "ã«ã¹ã¿ã ã¿ã°"
},
{
"paragraph_id": 26,
"tag": "p",
"text": "TSDocã§ã¯ããããžã§ã¯ãã®ããŒãºã«å¿ããŠç¬èªã®ã«ã¹ã¿ã ã¿ã°ãäœæããããšãã§ããŸããã«ã¹ã¿ã ã¿ã°ãäœæããããšã§ããããžã§ã¯ãåºæã®æ
å ±ãããã¥ã¡ã³ããŒã·ã§ã³ã«å«ããããšãã§ããŸãã",
"title": "ã«ã¹ã¿ã ã¿ã°"
},
{
"paragraph_id": 27,
"tag": "p",
"text": "ã«ã¹ã¿ã ã¿ã°ãäœæããã«ã¯ãTSDocã® @custom ã¿ã°ã䜿çšããŸãã @custom ã¿ã°ã«ã¯ã以äžã®ãããªå±æ§ãæå®ã§ããŸãã",
"title": "ã«ã¹ã¿ã ã¿ã°"
},
{
"paragraph_id": 28,
"tag": "p",
"text": "ã«ã¹ã¿ã ã¿ã°ã®çš®é¡ãšããŠã¯ã以äžã®ãã®ããããŸãã",
"title": "ã«ã¹ã¿ã ã¿ã°"
},
{
"paragraph_id": 29,
"tag": "p",
"text": "以äžã¯ã@custom ã¿ã°ã䜿çšããŠç¬èªã® @example ã¿ã°ãäœæããäŸã§ãã",
"title": "ã«ã¹ã¿ã ã¿ã°"
},
{
"paragraph_id": 30,
"tag": "p",
"text": "ãã®äŸã§ã¯ã@example ã¿ã°ã®ååã example ã«èšå®ããçš®é¡ã block ã«èšå®ããŠããŸãããŸããã«ã¹ã¿ã ã¿ã°ã®èª¬æãšããŠãProvides an example of how to use a function or class. ãšããæãæå®ããŠããŸãã",
"title": "ã«ã¹ã¿ã ã¿ã°"
},
{
"paragraph_id": 31,
"tag": "p",
"text": "ã«ã¹ã¿ã ã¿ã°ã䜿çšããå ŽåãTypeScriptã®ã³ã³ãã€ã©ã«ãªãã·ã§ã³ --customDocTags ãæå®ããŠãã«ã¹ã¿ã ã¿ã°ãèªèãããå¿
èŠããããŸãã以äžã¯ã@example ã¿ã°ã䜿çšããäŸã§ãã",
"title": "ã«ã¹ã¿ã ã¿ã°"
},
{
"paragraph_id": 32,
"tag": "p",
"text": "ãã®äŸã§ã¯ã@example ã¿ã°ã䜿çšããŠãé¢æ°ã®äœ¿çšäŸãæäŸããŠããŸãã @example ã¿ã°ã¯ãã«ã¹ã¿ã ã¿ã°ãšããŠå®çŸ©ãããŠãããããã³ã³ãã€ã©ã« --customDocTags ãªãã·ã§ã³ãæå®ããå¿
èŠããããŸãã",
"title": "ã«ã¹ã¿ã ã¿ã°"
},
{
"paragraph_id": 33,
"tag": "p",
"text": "[TSDocã䜿çšããŠãHTMLãJSONãªã©ã®åœ¢åŒã§ãœãŒã¹ã³ãŒãã®ããã¥ã¡ã³ããçæããæ¹æ³ã説æããŸãã]",
"title": "ãœãŒã¹ã³ãŒãã®çæ"
},
{
"paragraph_id": 34,
"tag": "p",
"text": "TSDocã䜿çšããŠããœãŒã¹ã³ãŒãã®ããã¥ã¡ã³ããçæããæ¹æ³ã玹ä»ããŸããTSDocã«ã¯ãHTMLãJSONãªã©ã®åœ¢åŒã§ããã¥ã¡ã³ããçæããããã®ã³ãã³ããçšæãããŠããŸãã",
"title": "ãœãŒã¹ã³ãŒãã®çæ"
},
{
"paragraph_id": 35,
"tag": "p",
"text": "HTMLãã¡ã€ã«ãçæããã«ã¯ãTSDocã«ä»å±ããtypedocã³ãã³ãã䜿çšããŸãã以äžã®ã³ãã³ããå®è¡ããããšã§ãæå®ããããœãŒã¹ã³ãŒãããHTMLãã¡ã€ã«ãçæããããšãã§ããŸãã",
"title": "ãœãŒã¹ã³ãŒãã®çæ"
},
{
"paragraph_id": 36,
"tag": "p",
"text": "äžèšã®ã³ãã³ãã§ã¯ã./src以äžã®ãœãŒã¹ã³ãŒãããHTMLãã¡ã€ã«ãçæãã./docsãã£ã¬ã¯ããªã«åºåããŠããŸããçæãããHTMLãã¡ã€ã«ã¯ããã©ãŠã¶ã§éããŠé²èŠ§ããããšãã§ããŸãã",
"title": "ãœãŒã¹ã³ãŒãã®çæ"
},
{
"paragraph_id": 37,
"tag": "p",
"text": "JSONãã¡ã€ã«ãçæããã«ã¯ãTSDocã«ä»å±ããts-json-docsã³ãã³ãã䜿çšããŸãã以äžã®ã³ãã³ããå®è¡ããããšã§ãæå®ããããœãŒã¹ã³ãŒãããJSONãã¡ã€ã«ãçæããããšãã§ããŸãã",
"title": "ãœãŒã¹ã³ãŒãã®çæ"
},
{
"paragraph_id": 38,
"tag": "p",
"text": "äžèšã®ã³ãã³ãã§ã¯ã./src以äžã®.tsãã¡ã€ã«ããJSONãã¡ã€ã«ãçæãã./docs/api-docs.jsonã«åºåããŠããŸããçæãããJSONãã¡ã€ã«ã¯ãAPIããã¥ã¡ã³ãã®äœæãªã©ã«äœ¿çšããããšãã§ããŸãã",
"title": "ãœãŒã¹ã³ãŒãã®çæ"
},
{
"paragraph_id": 39,
"tag": "p",
"text": "以äžããTSDocã䜿çšããŠãœãŒã¹ã³ãŒãã®ããã¥ã¡ã³ããçæããæ¹æ³ã§ããçæãããããã¥ã¡ã³ãã¯ãéçºè
ãã³ãŒããç解ããããã«éèŠãªæ
å ±ãæäŸããããããããžã§ã¯ãã®å質åäžã«åœ¹ç«ã¡ãŸãã",
"title": "ãœãŒã¹ã³ãŒãã®çæ"
},
{
"paragraph_id": 40,
"tag": "p",
"text": "== TSDocã®ãšãã£ã¿ãµããŒã == [TSDocã䜿çšããããã¥ã¡ã³ããŒã·ã§ã³ã®å¹æãé«ããããã®ãããã€ãã®ãšãã£ã¿ã®ãã©ã°ã€ã³ãæ¡åŒµæ©èœã玹ä»ããŸãã] TSDocã䜿çšããããšã§ãã³ãŒãã®ããã¥ã¡ã³ããŒã·ã§ã³ãæ¹åãããŸããããšãã£ã¿ãµããŒãã䜿çšããããšã§ãéçºè
ã¯ããç°¡åã«TSDocãèšè¿°ã§ããŸãã以äžã¯ãTSDocããµããŒãããããã€ãã®ãšãã£ã¿ãã©ã°ã€ã³ã§ãã",
"title": "ãœãŒã¹ã³ãŒãã®çæ"
},
{
"paragraph_id": 41,
"tag": "p",
"text": "ãããã®ãšãã£ã¿ãã©ã°ã€ã³ã䜿çšããããšã§ãTSDocã䜿çšããã³ãŒãã®ããã¥ã¡ã³ããŒã·ã§ã³ãããç°¡åã«ãªããéçºè
ã¯ããå¹æçã«ããã¥ã¡ã³ããäœæã§ããŸãã",
"title": "ãœãŒã¹ã³ãŒãã®çæ"
},
{
"paragraph_id": 42,
"tag": "p",
"text": "[TSDocã§ã®ããã¥ã¡ã³ããŒã·ã§ã³ã®ãã¹ããã©ã¯ãã£ã¹ã玹ä»ããããèªã¿ããããæ確ãªã³ãŒãã®ããã¥ã¡ã³ããäœæããããã®ãã³ããæäŸããŸãã]",
"title": "TSDocã®ãã¹ããã©ã¯ãã£ã¹"
},
{
"paragraph_id": 43,
"tag": "p",
"text": "TSDocã䜿ã£ãŠå¹æçãªããã¥ã¡ã³ããŒã·ã§ã³ãäœæããã«ã¯ã以äžã®ãã¹ããã©ã¯ãã£ã¹ãéµå®ããããšãéèŠã§ãã",
"title": "TSDocã®ãã¹ããã©ã¯ãã£ã¹"
},
{
"paragraph_id": 44,
"tag": "p",
"text": "以äžããTSDocã䜿ã£ãå¹æçãªããã¥ã¡ã³ããŒã·ã§ã³ã®ããã®ãã¹ããã©ã¯ãã£ã¹ã§ããããããéµå®ããããšã§ãããèªã¿ããããæ確ãªã³ãŒãã®ããã¥ã¡ã³ããäœæããããšãã§ããŸãã",
"title": "TSDocã®ãã¹ããã©ã¯ãã£ã¹"
},
{
"paragraph_id": 45,
"tag": "p",
"text": "TSDocã§äœ¿çšãããåºæ¬çãªã¿ã°ãšãã®äœ¿ãæ¹ã®æŠèŠã§ãã",
"title": "éé²"
},
{
"paragraph_id": 46,
"tag": "p",
"text": "ãããã®ã¿ã°ã¯ã/** ... */ãããã¯ã³ã¡ã³ãã®äžã«èšè¿°ããŸããäŸãã°ã次ã®ãããªé¢æ°ãããã¥ã¡ã³ãåããå Žåã以äžã®ããã«TSDocã³ã¡ã³ããè¿œå ããŸãã",
"title": "éé²"
},
{
"paragraph_id": 47,
"tag": "p",
"text": "以äžã¯ãTSDocã®äž»èŠãªã¿ã°ã䜿çšããTypeScriptã®ã³ãŒãäŸã§ãã",
"title": "éé²"
},
{
"paragraph_id": 48,
"tag": "p",
"text": "ãã®TypeScriptã®ã³ãŒãã¯ã2D空éã®ç¹ãè¡šãPointã¯ã©ã¹ãšããã®ç¹ã®ã³ã¬ã¯ã·ã§ã³ãè¡šãPointCollectionã¯ã©ã¹ãå®çŸ©ããŠããŸãã",
"title": "éé²"
},
{
"paragraph_id": 49,
"tag": "p",
"text": "Pointã¯ã©ã¹ã«ã¯ãx座æšãšy座æšã®ããããã£ããããdistanceToã¡ãœããã䜿çšããŠä»ã®ç¹ãšã®è·é¢ãèšç®ããããšãã§ããŸãããã®ã¯ã©ã¹ã¯ã@publicã¿ã°ã§å
¬éãããŠãããä»ã®ã¢ãžã¥ãŒã«ãã䜿çšããããšãã§ããŸãã",
"title": "éé²"
},
{
"paragraph_id": 50,
"tag": "p",
"text": "PointCollectionã¯ã©ã¹ã¯ãPointãªããžã§ã¯ãã®é
åãåŒæ°ãšããŠåããé
åå
ã®ãã¹ãŠã®ç¹ãæ ŒçŽããŸãããã®ã¯ã©ã¹ãã@publicã¿ã°ã§å
¬éãããŠããŸãã",
"title": "éé²"
},
{
"paragraph_id": 51,
"tag": "p",
"text": "PointCollectionã¯ã©ã¹ã«ã¯ãaddã¡ãœããããããæ°ããPointãªããžã§ã¯ããè¿œå ã§ããŸãããŸããfindClosestã¡ãœããã䜿çšããŠãæå®ãããç¹ã«æãè¿ãç¹ãæ€çŽ¢ããããšãã§ããŸãããã®ã¡ãœããã¯ãPointãªããžã§ã¯ããè¿ããŸãã",
"title": "éé²"
},
{
"paragraph_id": 52,
"tag": "p",
"text": "ãã®ã³ãŒãã«ã¯ãTSDocã®äž»èŠãªã¿ã°ã䜿çšãããŠããŸããã¯ã©ã¹ãã¡ãœãããããã³ããããã£ã«ã¯ã@classã@publicã@paramãããã³@returnsã¿ã°ãå«ãŸããŸãããããã®ã¿ã°ã¯ãã³ãŒãã®ããã¥ã¡ã³ããŒã·ã§ã³ã«å¿
èŠãªæ
å ±ãæäŸããŸãã",
"title": "éé²"
}
] | TSDocã¯ãTypeScriptãããžã§ã¯ãã§äœ¿çšãããããã¥ã¡ã³ããŒã·ã§ã³ã³ã¡ã³ãã®ããã®èŠæ Œã§ããããã«ãããéçºè
ã¯TypeScriptã®åæ
å ±ãšãšãã«ãããæ確ãã€äžè²«ããããã¥ã¡ã³ããŒã·ã§ã³ãäœæã§ããŸãã ãã®ãã¥ãŒããªã¢ã«ã§ã¯ãTSDocã®åºæ¬çãªæŠå¿µãšäœ¿çšæ³ã«ã€ããŠèª¬æããŸããå
·äœçã«ã¯ãTSDocã³ã¡ã³ãã®æžãæ¹ãäžè¬çãªã¿ã°ã®äœ¿çšæ¹æ³ãããã³é«åºŠãªã¿ã°ã®äœ¿çšæ¹æ³ã«ã€ããŠèª¬æããŸãã ãŸããTSDocã®æçšæ§ãšããã¥ã¡ã³ããŒã·ã§ã³ã®éèŠæ§ã«ã€ããŠã觊ããŸãã
ãã®ãã¥ãŒããªã¢ã«ãèªã¿çµãããšãéçºè
ã¯TypeScriptãããžã§ã¯ãã§TSDocã䜿çšããããã®ç¥èãç²åŸã§ããããè¯ãããã¥ã¡ã³ããŒã·ã§ã³ãäœæããããšãã§ããããã«ãªããŸãã | <!-- {{Wikipedia}} 2023幎4æ16æ¥çŸåšãjawp ã«ã¯ TSDoc ã®é
ç®ã¯ãããŸããã -->
TSDocã¯ãTypeScriptãããžã§ã¯ãã§äœ¿çšãããããã¥ã¡ã³ããŒã·ã§ã³ã³ã¡ã³ãã®ããã®èŠæ Œã§ããããã«ãããéçºè
ã¯TypeScriptã®åæ
å ±ãšãšãã«ãããæ確ãã€äžè²«ããããã¥ã¡ã³ããŒã·ã§ã³ãäœæã§ããŸãã
ãã®ãã¥ãŒããªã¢ã«ã§ã¯ãTSDocã®åºæ¬çãªæŠå¿µãšäœ¿çšæ³ã«ã€ããŠèª¬æããŸããå
·äœçã«ã¯ãTSDocã³ã¡ã³ãã®æžãæ¹ãäžè¬çãªã¿ã°ã®äœ¿çšæ¹æ³ãããã³é«åºŠãªã¿ã°ã®äœ¿çšæ¹æ³ã«ã€ããŠèª¬æããŸãã
ãŸããTSDocã®æçšæ§ãšããã¥ã¡ã³ããŒã·ã§ã³ã®éèŠæ§ã«ã€ããŠã觊ããŸãã
ãã®ãã¥ãŒããªã¢ã«ãèªã¿çµãããšãéçºè
ã¯TypeScriptãããžã§ã¯ãã§TSDocã䜿çšããããã®ç¥èãç²åŸã§ããããè¯ãããã¥ã¡ã³ããŒã·ã§ã³ãäœæããããšãã§ããããã«ãªããŸãã
== TSDocãšã¯ ==
[TSDocã®æŠèŠãšããªãããã¥ã¡ã³ããŒã·ã§ã³ã«TSDocã䜿ãããã®ãã玹ä»ããŸãã]
TSDocãšã¯ãTypeScriptãããžã§ã¯ãã§äœ¿çšãããããã¥ã¡ã³ããŒã·ã§ã³ã³ã¡ã³ãã®ããã®èŠæ Œã§ããTSDocã¯ã[[JSDoc]]ãããŒã¹ã«äœæãããŠãããTypeScriptã®åæ
å ±ãå©çšããŠãããæ確ã§æ£ç¢ºãªããã¥ã¡ã³ããŒã·ã§ã³ãäœæããããšãã§ããŸãã
TSDocã¯ãTypeScriptã®åæ
å ±ã掻çšããããšã§ãããã¥ã¡ã³ããŒã·ã§ã³ã®ç²ŸåºŠãåäžãããããšãã§ããŸããäŸãã°ãTypeScriptã®åæ
å ±ãå©çšããããšã§ãé¢æ°ãã¡ãœããã®åŒæ°ãæ»ãå€ã®åãæ確ã«ããããšãã§ããŸããããã«ãããéçºè
ã¯ããæ£ç¢ºãªæ
å ±ãåŸãããšãã§ããã³ãŒãã®å©çšè
ãããç解ããããããã¥ã¡ã³ããŒã·ã§ã³ãåŸãããšãã§ããŸãã
TSDocã䜿çšãããäž»ãªçç±ã¯ãããã¥ã¡ã³ããŒã·ã§ã³ã®éèŠæ§ã§ããã³ãŒããæžãéã«ã¯ããããã©ã®ããã«åäœããããæ確ã«ããããšãéåžžã«éèŠã§ããããããã³ãŒããè€éã«ãªããšãããã¥ã¡ã³ããŒã·ã§ã³ãæžãããšãå°é£ã«ãªãããšããããŸãããã®ãããTSDocã䜿çšããããšã§ãéçºè
ã¯ããç°¡åã«æ£ç¢ºãã€æ確ãªããã¥ã¡ã³ããŒã·ã§ã³ãäœæã§ããŸãã
ãŸããTSDocã¯ãéçºè
ãã³ãŒããç¶æããããã®è² æ
ãæžããããšãã§ããŸããTSDocã³ã¡ã³ãã䜿çšããããšã§ãã³ãŒããå€æŽãããå Žåã«ãããã¥ã¡ã³ããŒã·ã§ã³ãèªåçã«æŽæ°ããããããæåã§ããã¥ã¡ã³ããŒã·ã§ã³ãæŽæ°ããå¿
èŠããããŸããã
以äžã®ããã«ãTSDocã¯ãæ£ç¢ºãã€æ確ãªããã¥ã¡ã³ããŒã·ã§ã³ãäœæããããšãã§ãããããTypeScriptãããžã§ã¯ãã§åºã䜿çšãããŠããŸãã次ã®ç« ã§ã¯ãTSDocã³ã¡ã³ãã®æžãæ¹ã«ã€ããŠèª¬æããŸãã
=== JSDocãšTSDocã®éã ===
JSDocãšTSDocã¯ãJavaScriptãšTypeScriptã®äž¡æ¹ã§äœ¿çšããããã³ãŒãã®ããã¥ã¡ã³ããŒã·ã§ã³ã®ããã®ããŒã«ã§ãããããã€ãã®éãããããŸãã
;ãµããŒãããå: JSDocã¯ãJavaScriptã®åçåä»ãã«å¯Ÿå¿ããããã«ãåã®æšè«ã泚éã«JSDocã®ç¹å®ã®èšæ³ã䜿çšããŸããäžæ¹ãTSDocã¯ãTypeScriptã®éçåä»ãã«å¯Ÿå¿ããããã«ãTypeScriptã®åã¢ãããŒã·ã§ã³ãšçµ±åãããããèªç¶ãªåè¡šçŸãå¯èœã§ãã
;åå解決ã®ä»çµã¿: JSDocã¯ãåå解決ã«ãããŠã¢ãžã¥ãŒã«ã·ã¹ãã ã®ä»çµã¿ãèæ
®ããªããããè€æ°ã®ã¢ãžã¥ãŒã«éã§åãååãæã€å€æ°ãé¢æ°ãããã¥ã¡ã³ãåããå Žåãæ£ç¢ºãªæ
å ±ãæäŸããããšãé£ããã§ããäžæ¹ãTSDocã¯ãTypeScriptã®åå解決ã·ã¹ãã ã掻çšãããããåå解決ã®ç²ŸåºŠãåäžããŠããŸãã
;ããŒã«ãã§ãŒã³ã®ãµããŒã: TSDocã¯ãTypeScriptã®åã·ã¹ãã ãšçµ±åãããŠãããããTypeScriptã«ãã£ãŠæäŸããããã«ãããŒã«ããšãã£ã¿ãµããŒããšã·ãŒã ã¬ã¹ã«é£æºããããšãã§ããŸããäžæ¹ãJSDocã¯JavaScriptå°çšã®ããŒã«ã§ãããããTypeScriptãšã®çµ±åã«ã¯å¶éããããŸãã
;ã¿ã°ã®ãµããŒã: TSDocã¯ãTypeScriptåãã«éçºããããããTypeScriptã®åã·ã¹ãã ã«ç¹åããã¿ã°ãããã€ãè¿œå ãããŠããŸããäžæ¹ãJSDocã¯ãJavaScriptã®åçåä»ããèæ
®ãããããTSDocã«ã¯ãªãããã€ãã®ã¿ã°ããããŸãã
;åºåãã©ãŒããã: TSDocã¯ãTypeScriptåãã«éçºããããããTypeScriptã®åæ
å ±ãå«ãããã«èšèšãããŠããŸããäžæ¹ãJSDocã¯ãJavaScriptã®åçåä»ããèæ
®ãããããåæ
å ±ãå«ãŸãªãå ŽåããããŸãããŸããJSDocã¯ãæ§ã
ãªãã©ãŒãããã«åºåããããšãã§ããŸãããTSDocã¯ãçŸæç¹ã§ã¯äž»ã«HTMLãšJSON圢åŒã®åºåã«å¯Ÿå¿ããŠããŸãã
== TSDocã®ã€ã³ã¹ããŒã« ==
TSDocã¯ãTypeScriptãããžã§ã¯ãã§äœ¿çšããããã«ãnpmããã±ãŒãžãšããŠæäŸãããŠããŸããTSDocãã€ã³ã¹ããŒã«ããã«ã¯ã以äžã®æé ãå®è¡ããŸãã
ãŸãããããžã§ã¯ãã®ã«ãŒããã£ã¬ã¯ããªã§ã以äžã®ã³ãã³ããå®è¡ããŸãã
:<syntaxhighlight lang=bash>
npm install -g @microsoft/tsdoc
</syntaxhighlight>
次ã«ãtsconfig.jsonãã¡ã€ã«ãç·šéããŠãTSDocãæå¹ã«ããŸããtsconfig.jsonãã¡ã€ã«ã«ä»¥äžã®ã³ãŒããè¿œå ããŸãã
:<syntaxhighlight lang=json>
{
"compilerOptions": {
"declaration": true,
"emitDeclarationOnly": true,
"plugins": [
{
"name": "typescript-tsd",
"config": {}
}
]
},
"include": [
"src/**/*.ts"
],
"exclude": [
"node_modules",
"**/*.spec.ts"
]
}
</syntaxhighlight>
ããã«ãããTSDocãTypeScriptã®åæ
å ±ãèªã¿èŸŒãã§ãããã¥ã¡ã³ããŒã·ã§ã³ãçæããããã«ãªããŸãã
æåŸã«ãããã¥ã¡ã³ããŒã·ã§ã³ãçæããããã®ã³ãã³ããå®è¡ããŸãã以äžã®ã³ãã³ããå®è¡ãããšãTSDocã«ãã£ãŠããã¥ã¡ã³ããŒã·ã§ã³ãçæãããŸãã
:<syntaxhighlight lang=bash>
npx tsdoc
</syntaxhighlight>
以äžã®æé ã§ãTSDocãã€ã³ã¹ããŒã«ãããæå¹ã«ãªããããã¥ã¡ã³ããŒã·ã§ã³ãçæãããŸãã次ã®ç« ã§ã¯ãTSDocã³ã¡ã³ãã®æžãæ¹ã«ã€ããŠèª¬æããŸãã
== åºæ¬çãªTSDocã¿ã° ==
[TSDocã§äœ¿çšãããåºæ¬çãªã¿ã°ãšããããã䜿çšããæ¹æ³ã玹ä»ããŸãã]
TSDocã§äœ¿çšãããåºæ¬çãªã¿ã°ã«ã¯ã以äžã®ãã®ããããŸãã
* @param - é¢æ°ã®ãã©ã¡ãŒã¿ã«é¢ããæ
å ±ãæäŸããŸãã
* @returns - é¢æ°ã®æ»ãå€ã«é¢ããæ
å ±ãæäŸããŸãã
* @remarks - ãã®ä»ã®æ³šéãæäŸããŸãã
* @example - ã³ãŒãäŸãæäŸããŸãã
* @see - é¢é£ããããã¥ã¡ã³ãããªãœãŒã¹ãåç
§ããŸãã
* @deprecated - 䜿ãããŠããªããã®ãéæšå¥šã®ãã®ã瀺ããŸãã
ãããã®ã¿ã°ã¯ãé¢æ°ãã¯ã©ã¹ãã¡ãœãããããããã£ãªã©ã®ããã¥ã¡ã³ããŒã·ã§ã³ã«äœ¿çšãããŸãã以äžã¯ã@paramãš@returnsã®äœ¿çšäŸã§ãã
:<syntaxhighlight lang=ts>
/**
* Adds two numbers together.
* @param {number} x - The first number to add.
* @param {number} y - The second number to add.
* @returns {number} The sum of the two numbers.
*/
function addNumbers(x: number, y: number): number {
return x + y;
}
</syntaxhighlight>
ãã®äŸã§ã¯ã@paramã¿ã°ã2ã€äœ¿çšãããŠããŸããåã¿ã°ã«ã¯ããã©ã¡ãŒã¿ã®ååãšèª¬æãå«ãŸããŠããŸãã@returnsã¿ã°ã«ã¯ãæ»ãå€ã®åãšèª¬æãå«ãŸããŠããŸãã
== ãã©ã¡ãŒã¿ãšæ»ãå€ ==
[é¢æ°ã®ãã©ã¡ãŒã¿ãæ»ãå€ã®ããã¥ã¡ã³ããŒã·ã§ã³ã«ã€ããŠã詳ãã説æããŸãã]
é¢æ°ã®ãã©ã¡ãŒã¿ãæ»ãå€ã«é¢ããããã¥ã¡ã³ããŒã·ã§ã³ã¯ã@paramãš@returnsã¿ã°ã䜿çšããŠèšè¿°ã§ããŸãããããã®ã¿ã°ã«ã¯ããã©ã¡ãŒã¿ãæ»ãå€ã«é¢ããæ
å ±ãæäŸããããã®ããã€ãã®å±æ§ããããŸãã以äžã¯ã@paramã¿ã°ãš@returnsã¿ã°ã§äœ¿çšãããå±æ§ã®äžéšã§ãã
* name - ãã©ã¡ãŒã¿ãæ»ãå€ã®ååãæå®ããŸãã
* type - ãã©ã¡ãŒã¿ãæ»ãå€ã®åãæå®ããŸãã
* description - ãã©ã¡ãŒã¿ãæ»ãå€ã«é¢ãã説æãæäŸããŸãã
* default - ãã©ã¡ãŒã¿ã®ããã©ã«ãå€ãæå®ããŸãã
以äžã¯ããã©ã¡ãŒã¿ã«é¢ããããã¥ã¡ã³ããŒã·ã§ã³ã®äŸã§ãã
:<syntaxhighlight lang=ts>
/**
* Multiplies a number by a factor.
* @param {number} number - The number to multiply.
* @param {number} factor - The factor to multiply the number by.
* @returns {number} The result of multiplying the number by the factor.
*/
function multiply(number: number, factor: number): number {
return number * factor;
}
</syntaxhighlight>
ãã®äŸã§ã¯ã@paramã¿ã°ã2ã€äœ¿çšãããŠããŸããåã¿ã°ã«ã¯ããã©ã¡ãŒã¿ã®ååãšèª¬æãå«ãŸããŠããŸãã
== ã¿ã°ã®è©³çŽ° ==
[TSDocã§äœ¿çšãããã¿ã°ã®ãã¡ããã詳现ãªèª¬æãå¿
èŠãªã¿ã°ã«ã€ããŠèª¬æããŸãã]
{| class="wikitable"
|+ ã¿ã°ãšãã®æ©èœ
!ã¿ã°å
!説æ
|-
|<code>@param</code>
|é¢æ°ã®ãã©ã¡ãŒã¿ãŒã«ã€ããŠèª¬æããŸãããã©ã¡ãŒã¿ãŒã®ååãšèª¬ææãæå®ã§ããŸããäŸãã°ã <code>@param {number} x - æ°å€ã®åŒæ°</code> ãšãã£ã圢ã§äœ¿çšããŸãã
|-
|<code>@returns</code>
|é¢æ°ãè¿ãå€ã«ã€ããŠèª¬æããŸããæ»ãå€ã®åãšèª¬ææãæå®ã§ããŸããäŸãã°ã <code>@returns {boolean} çåœå€</code> ãšãã£ã圢ã§äœ¿çšããŸãã
|-
|<code>@type</code>
|å€æ°ãå®æ°ãªã©ã®åã«ã€ããŠèª¬æããŸããå€æ°ã®ååãšåãæå®ã§ããŸããäŸãã°ã <code>@type {string} name</code> ãšãã£ã圢ã§äœ¿çšããŸãã
|-
|<code>@template</code>
|ãžã§ããªãã¯ã¹ã®åãã©ã¡ãŒã¿ãŒã«ã€ããŠèª¬æããŸããåãã©ã¡ãŒã¿ãŒã®ååãšèª¬ææãæå®ã§ããŸããäŸãã°ã <code>@template T - ãžã§ããªãã¯ã¹ã®åãã©ã¡ãŒã¿ãŒ</code> ãšãã£ã圢ã§äœ¿çšããŸãã
|-
|<code>@example</code>
|ã³ãŒãã®äŸã瀺ããŸããã³ãŒããããã¯ã䜿ã£ãŠãå®éã®ã³ãŒããèšè¿°ããããšãã§ããŸããäŸãã°ã <code>@example\nconst result = add(2, 3);\nconsole.log(result);</code> ãšãã£ã圢ã§äœ¿çšããŸãã
|-
|<code>@deprecated</code>
|éæšå¥šã®èŠçŽ ã«ã€ããŠèª¬æããŸããéæšå¥šã«ãªã£ãçç±ã代æ¿ã®æ段ãªã©ã説æããããšãã§ããŸããäŸãã°ã <code>@deprecated 代ããã«</code> ãšãã£ã圢ã§äœ¿çšããŸãã
|-
|<code>@inheritdoc</code>
|ç¶æ¿å
ã®ããã¥ã¡ã³ããŒã·ã§ã³ãç¶æ¿ããããšãã§ããŸããç¶æ¿å
ã®ããã¥ã¡ã³ããŒã·ã§ã³ã« <code>@inheritdoc</code> ãæå®ããŠãç¶æ¿å
ã§ãã®èŠçŽ ãåç
§ããããšãã§ããŸããäŸãã°ã <code>@inheritdoc</code> ãšãã£ã圢ã§äœ¿çšããŸãã
|}
== ã«ã¹ã¿ã ã¿ã° ==
[TSDocã§ç¬èªã®ã«ã¹ã¿ã ã¿ã°ãäœæããæ¹æ³ã説æããŸãã]
TSDocã§ã¯ããããžã§ã¯ãã®ããŒãºã«å¿ããŠç¬èªã®ã«ã¹ã¿ã ã¿ã°ãäœæããããšãã§ããŸããã«ã¹ã¿ã ã¿ã°ãäœæããããšã§ããããžã§ã¯ãåºæã®æ
å ±ãããã¥ã¡ã³ããŒã·ã§ã³ã«å«ããããšãã§ããŸãã
ã«ã¹ã¿ã ã¿ã°ãäœæããã«ã¯ãTSDocã® <code>@custom</code> ã¿ã°ã䜿çšããŸãã <code>@custom</code> ã¿ã°ã«ã¯ã以äžã®ãããªå±æ§ãæå®ã§ããŸãã
* <code>name</code>: ã«ã¹ã¿ã ã¿ã°ã®ååãå¿
é ã
* <code>kind</code>: ã«ã¹ã¿ã ã¿ã°ã®çš®é¡ãä»»æã
* <code>body</code>: ã«ã¹ã¿ã ã¿ã°ã®èª¬æãä»»æã
ã«ã¹ã¿ã ã¿ã°ã®çš®é¡ãšããŠã¯ã以äžã®ãã®ããããŸãã
* <code>block</code>: è€æ°è¡ã«ããã説æãæäŸãããããã¯ã¿ã°ã
* <code>inline</code>: äžè¡ã®èª¬æãæäŸããã€ã³ã©ã€ã³ã¿ã°ã
* <code>modifier</code>: ä»ã®ã¿ã°ã®ä¿®é£ŸåãšããŠäœ¿çšãããã¿ã°ã
以äžã¯ã<code>@custom</code> ã¿ã°ã䜿çšããŠç¬èªã® <code>@example</code> ã¿ã°ãäœæããäŸã§ãã
:<syntaxhighlight lang=ts>
/**
* @custom
* @name example
* @kind block
* @body
* Provides an example of how to use a function or class.
*/
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>@example</code> ã¿ã°ã®ååã <code>example</code> ã«èšå®ããçš®é¡ã <code>block</code> ã«èšå®ããŠããŸãããŸããã«ã¹ã¿ã ã¿ã°ã®èª¬æãšããŠã<code>Provides an example of how to use a function or class.</code> ãšããæãæå®ããŠããŸãã
ã«ã¹ã¿ã ã¿ã°ã䜿çšããå ŽåãTypeScriptã®ã³ã³ãã€ã©ã«ãªãã·ã§ã³ <code>--customDocTags</code> ãæå®ããŠãã«ã¹ã¿ã ã¿ã°ãèªèãããå¿
èŠããããŸãã以äžã¯ã<code>@example</code> ã¿ã°ã䜿çšããäŸã§ãã
:<syntaxhighlight lang=ts>
/**
* Returns the sum of two numbers.
* @example
* ```
* const result = sum(1, 2);
* console.log(result); // Output: 3
* ```
*/
function sum(a: number, b: number): number {
return a + b;
}
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>@example</code> ã¿ã°ã䜿çšããŠãé¢æ°ã®äœ¿çšäŸãæäŸããŠããŸãã <code>@example</code> ã¿ã°ã¯ãã«ã¹ã¿ã ã¿ã°ãšããŠå®çŸ©ãããŠãããããã³ã³ãã€ã©ã« <code>--customDocTags</code> ãªãã·ã§ã³ãæå®ããå¿
èŠããããŸãã
== ãœãŒã¹ã³ãŒãã®çæ ==
[TSDocã䜿çšããŠãHTMLãJSONãªã©ã®åœ¢åŒã§ãœãŒã¹ã³ãŒãã®ããã¥ã¡ã³ããçæããæ¹æ³ã説æããŸãã]
TSDocã䜿çšããŠããœãŒã¹ã³ãŒãã®ããã¥ã¡ã³ããçæããæ¹æ³ã玹ä»ããŸããTSDocã«ã¯ãHTMLãJSONãªã©ã®åœ¢åŒã§ããã¥ã¡ã³ããçæããããã®ã³ãã³ããçšæãããŠããŸãã
=== HTMLãã¡ã€ã«ã®çæ ===
HTMLãã¡ã€ã«ãçæããã«ã¯ãTSDocã«ä»å±ãã<code>typedoc</code>ã³ãã³ãã䜿çšããŸãã以äžã®ã³ãã³ããå®è¡ããããšã§ãæå®ããããœãŒã¹ã³ãŒãããHTMLãã¡ã€ã«ãçæããããšãã§ããŸãã
:<syntaxhighlight lang=bash>
npx typedoc --out ./docs ./src
</syntaxhighlight>
äžèšã®ã³ãã³ãã§ã¯ã<code>./src</code>以äžã®ãœãŒã¹ã³ãŒãããHTMLãã¡ã€ã«ãçæãã<code>./docs</code>ãã£ã¬ã¯ããªã«åºåããŠããŸããçæãããHTMLãã¡ã€ã«ã¯ããã©ãŠã¶ã§éããŠé²èŠ§ããããšãã§ããŸãã
=== JSONãã¡ã€ã«ã®çæ ===
JSONãã¡ã€ã«ãçæããã«ã¯ãTSDocã«ä»å±ãã<code>ts-json-docs</code>ã³ãã³ãã䜿çšããŸãã以äžã®ã³ãã³ããå®è¡ããããšã§ãæå®ããããœãŒã¹ã³ãŒãããJSONãã¡ã€ã«ãçæããããšãã§ããŸãã
:<syntaxhighlight lang=bash>
npx ts-json-docs ./src/**/*.ts --output-file ./docs/api-docs.json
</syntaxhighlight>
äžèšã®ã³ãã³ãã§ã¯ã<code>./src</code>以äžã®<code>.ts</code>ãã¡ã€ã«ããJSONãã¡ã€ã«ãçæãã<code>./docs/api-docs.json</code>ã«åºåããŠããŸããçæãããJSONãã¡ã€ã«ã¯ãAPIããã¥ã¡ã³ãã®äœæãªã©ã«äœ¿çšããããšãã§ããŸãã
以äžããTSDocã䜿çšããŠãœãŒã¹ã³ãŒãã®ããã¥ã¡ã³ããçæããæ¹æ³ã§ããçæãããããã¥ã¡ã³ãã¯ãéçºè
ãã³ãŒããç解ããããã«éèŠãªæ
å ±ãæäŸããããããããžã§ã¯ãã®å質åäžã«åœ¹ç«ã¡ãŸãã
== TSDocã®ãšãã£ã¿ãµããŒã == [TSDocã䜿çšããããã¥ã¡ã³ããŒã·ã§ã³ã®å¹æãé«ããããã®ãããã€ãã®ãšãã£ã¿ã®ãã©ã°ã€ã³ãæ¡åŒµæ©èœã玹ä»ããŸãã]
TSDocã䜿çšããããšã§ãã³ãŒãã®ããã¥ã¡ã³ããŒã·ã§ã³ãæ¹åãããŸããããšãã£ã¿ãµããŒãã䜿çšããããšã§ãéçºè
ã¯ããç°¡åã«TSDocãèšè¿°ã§ããŸãã以äžã¯ãTSDocããµããŒãããããã€ãã®ãšãã£ã¿ãã©ã°ã€ã³ã§ãã
* Visual Studio CodeïŒMicrosoftã®ããã¹ããšãã£ã¿ã§ããVisual Studio Codeã¯ãTSDocããµããŒãããè±å¯ãªãã©ã°ã€ã³ãæäŸããŠããŸããäŸãã°ããTSDoc Commentsããã©ã°ã€ã³ã¯ãTSDocã³ã¡ã³ããç°¡åã«äœæããããã®ããŒã«ãæäŸããŸãã
* AtomïŒGitHubã«ãã£ãŠéçºãããããã¹ããšãã£ã¿ã§ããAtomããTSDocããµããŒãããããã€ãã®ããã±ãŒãžãæäŸããŠããŸããäŸãã°ããdocblockrãããã±ãŒãžã¯ãJavaScriptãTypeScriptã®é¢æ°ãã¡ãœããã®TSDocã³ã¡ã³ããç°¡åã«äœæã§ããŸãã
* JetBrains IDEsïŒJetBrainsã®IDEã§ããIntelliJ IDEAãWebStormãPhpStormãªã©ã¯ãTSDocããµããŒãããããã€ãã®ãã©ã°ã€ã³ãæäŸããŠããŸããäŸãã°ããTypeDocã³ã¡ã³ãããã©ã°ã€ã³ã¯ãTSDocã³ã¡ã³ããç°¡åã«çæããããã®ããŒã«ãæäŸããŸãã
ãããã®ãšãã£ã¿ãã©ã°ã€ã³ã䜿çšããããšã§ãTSDocã䜿çšããã³ãŒãã®ããã¥ã¡ã³ããŒã·ã§ã³ãããç°¡åã«ãªããéçºè
ã¯ããå¹æçã«ããã¥ã¡ã³ããäœæã§ããŸãã
== TSDocã®ãã¹ããã©ã¯ãã£ã¹ ==
[TSDocã§ã®ããã¥ã¡ã³ããŒã·ã§ã³ã®ãã¹ããã©ã¯ãã£ã¹ã玹ä»ããããèªã¿ããããæ確ãªã³ãŒãã®ããã¥ã¡ã³ããäœæããããã®ãã³ããæäŸããŸãã]
TSDocã䜿ã£ãŠå¹æçãªããã¥ã¡ã³ããŒã·ã§ã³ãäœæããã«ã¯ã以äžã®ãã¹ããã©ã¯ãã£ã¹ãéµå®ããããšãéèŠã§ãã
# å
šãŠã®å
¬éãããã¡ã³ããŒã«ããã¥ã¡ã³ããŒã·ã§ã³ãè¿œå ããïŒå
¬éãããã¡ãœãããã¯ã©ã¹ãé¢æ°ãã€ã³ã¿ãŒãã§ãŒã¹ãªã©ã®å
šãŠã®ã¡ã³ããŒã«å¯ŸããŠãé©åãªããã¥ã¡ã³ããŒã·ã§ã³ãæäŸããããšãéèŠã§ããããã«ãããä»ã®éçºè
ãã³ãŒããç解ãã䜿çšããã®ã容æã«ãªããŸãã
# ã¡ãœãããšé¢æ°ã«ã¯ããã©ã¡ãŒã¿ãšæ»ãå€ã®èª¬æãå«ããïŒé¢æ°ãã¡ãœãããããã¥ã¡ã³ãåããå Žåããã©ã¡ãŒã¿ãæ»ãå€ã®èª¬æãè¿œå ããããšãéèŠã§ããããã«ãããä»ã®éçºè
ãé¢æ°ã®äœ¿ãæ¹ãè¿ãããå€ãç解ããå¹æçã«äœ¿çšã§ããããã«ãªããŸãã
# çµ±äžãããã¹ã¿ã€ã«ã䜿çšããïŒããã¥ã¡ã³ããŒã·ã§ã³ã§äœ¿çšããèšæ³ãææ³ã®ã¹ã¿ã€ã«ã¯ãçµ±äžããããã®ã䜿çšããããšãéèŠã§ããããã«ãããããã¥ã¡ã³ããŒã·ã§ã³ã®äžè²«æ§ãä¿ã¡ãèªã¿ãããç解ããããããã¥ã¡ã³ããäœæããããšãã§ããŸãã
# ããã¥ã¡ã³ããŒã·ã§ã³ãææ°ã«ä¿ã€ïŒã³ãŒãã®å€æŽããã床ã«ãããã¥ã¡ã³ããŒã·ã§ã³ãæŽæ°ããããã«å¿ãããããšãéèŠã§ããããã«ãããä»ã®éçºè
ãææ°ã®æ
å ±ãåŸãããšãã§ããŸãã
# ãªãŒããŒããã¥ã¡ã³ããé¿ããïŒäžèŠãªæ
å ±ãå«ããããåé·ãªèª¬æããããããããšã§ãããã¥ã¡ã³ããèªã¿ã«ãããªããŸããå¿
èŠãªæ
å ±ã«çµã£ãŠãç°¡æœã«èª¬æããããšãéèŠã§ãã
# ãµã³ãã«ã³ãŒããæäŸããïŒã³ãŒãã®ããã¥ã¡ã³ãã«ã¯ã䜿çšäŸããµã³ãã«ã³ãŒããæäŸããããšãéèŠã§ããããã«ãããä»ã®éçºè
ãã³ãŒãã®äœ¿çšæ¹æ³ãç解ããè¿
éã«éçºãé²ããããšãã§ããŸãã
以äžããTSDocã䜿ã£ãå¹æçãªããã¥ã¡ã³ããŒã·ã§ã³ã®ããã®ãã¹ããã©ã¯ãã£ã¹ã§ããããããéµå®ããããšã§ãããèªã¿ããããæ確ãªã³ãŒãã®ããã¥ã¡ã³ããäœæããããšãã§ããŸãã
== éé² ==
=== ããŒãã·ãŒã ===
TSDocã§äœ¿çšãããåºæ¬çãªã¿ã°ãšãã®äœ¿ãæ¹ã®æŠèŠã§ãã
:{| class="sortable wikitable"
|+ TSDocã®ã¿ã°ã®åé¡ãšãã®æ©èœ
!ã¿ã°
!åé¡
!説æ
|-
|<code>@abstract</code>
|Class/Interface
|æœè±¡ã¡ã³ããŒã瀺ã
|-
|<code>@async</code>
|Function
|éåæé¢æ°ã瀺ã
|-
|<code>@class</code>
|Class/Interface
|ã¯ã©ã¹ã瀺ã
|-
|<code>@deprecated</code>
|Class/Interface/Enum/Function/Method/Property
|䜿ãããªããªã£ãAPIã瀺ã
|-
|<code>@enum</code>
|Enum
|åæåã瀺ã
|-
|<code>@function</code>
|Function
|é¢æ°ã瀺ã
|-
|<code>@inheritDoc</code>
|Class/Interface/Method/Property
|芪ã¯ã©ã¹ãã€ã³ã¿ãŒãã§ãŒã¹ãã¡ãœããããŸãã¯ããããã£ããã®ç¶æ¿ããã¥ã¡ã³ãã瀺ã
|-
|<code>@interface</code>
|Interface
|ã€ã³ã¿ãŒãã§ãŒã¹ã瀺ã
|-
|<code>@param</code>
|Function/Method/Constructor
|ãã©ã¡ãŒã¿ã®èª¬æã瀺ã
|-
|<code>@private</code>
|Class/Interface/Enum/Function/Method/Property
|ãã©ã€ããŒãã¡ã³ããŒã瀺ã
|-
|<code>@property</code>
|Class/Interface
|ããããã£ã瀺ã
|-
|<code>@protected</code>
|Class/Interface/Enum/Function/Method/Property
|ãããã¯ãã¡ã³ããŒã瀺ã
|-
|<code>@public</code>
|Class/Interface/Enum/Function/Method/Property
|ãããªãã¯ã¡ã³ããŒã瀺ã
|-
|<code>@readonly</code>
|Class/Interface/Property
|èªã¿åãå°çšããããã£ã瀺ã
|-
|<code>@returns</code>
|Function/Method
|æ»ãå€ã®èª¬æã瀺ã
|-
|<code>@template</code>
|Function/Class/Interface
|ãã³ãã¬ãŒãã®èª¬æã瀺ã
|-
|<code>@this</code>
|Function/Method/Constructor
|<code>this</code> ããŒã¯ãŒãã®èª¬æã瀺ã
|-
|<code>@throws</code>
|Function/Method
|äŸå€ã®èª¬æã瀺ã
|-
|<code>@type</code>
|Function/Method/Constructor/Property
|å€ã®åã瀺ã
|-
|<code>@typedef</code>
|Type Alias
|åã®ãšã€ãªã¢ã¹ã瀺ã
|-
|<code>@virtual</code>
|Method
|ä»®æ³ã¡ãœããã瀺ã
|-
|<code>@inheritdoc</code>
|Class/Interface/Method/Property
|ç¶æ¿å
ããã®ããã¥ã¡ã³ããç¶æ¿ããããšã瀺ã
|-
|<code>@example</code>
|Class/Interface/Function/Method
|ã³ãŒãã®äŸã瀺ã
|-
|<code>@remarks</code>
|Class/Interface/Enum/Function/Method/Property
|è£è¶³èª¬æã瀺ã
|-
|<code>@see</code>
|Class/Interface/Enum/Function/Method/Property
|é¢é£ããããã¥ã¡ã³ãã瀺ã
|-
|<code>@since</code>
|Class/Interface/Enum/Function/Method/Property
|APIãå°å
¥ãããããŒãžã§ã³ã瀺ã
|-
|<code>@summary</code>
|Class/Interface/Enum/Function/Method/Property
|èŠçŽã瀺ã
|-
|<code>@todo</code>
|Class/Interface/Enum/Function/Method/Property
|æªå®äºã®ã¿ã¹ã¯ã瀺ã
|}
ãããã®ã¿ã°ã¯ã<code>/** ... */</code>ãããã¯ã³ã¡ã³ãã®äžã«èšè¿°ããŸããäŸãã°ã次ã®ãããªé¢æ°ãããã¥ã¡ã³ãåããå Žåã以äžã®ããã«TSDocã³ã¡ã³ããè¿œå ããŸãã
以äžã¯ãTSDocã®äž»èŠãªã¿ã°ã䜿çšããTypeScriptã®ã³ãŒãäŸã§ãã
:<syntaxhighlight lang=ts>
/**
* Represents a point in 2D space.
* @public
*/
class Point {
/**
* The x-coordinate of the point.
*/
x: number;
/**
* The y-coordinate of the point.
*/
y: number;
/**
* Creates a new point.
* @param x - The x-coordinate of the point.
* @param y - The y-coordinate of the point.
*/
constructor(x: number, y: number) {
this.x = x;
this.y = y;
}
/**
* Returns the distance between this point and another point.
* @param other - The other point.
* @returns The distance between the two points.
*/
distanceTo(other: Point): number {
const dx = this.x - other.x;
const dy = this.y - other.y;
return Math.sqrt(dx * dx + dy * dy);
}
}
/**
* A collection of points.
* @public
*/
class PointCollection {
/**
* The points in the collection.
*/
private points: Point[];
/**
* Creates a new point collection.
* @param points - An array of points to initialize the collection with.
*/
constructor(points: Point[]) {
this.points = points;
}
/**
* Adds a point to the collection.
* @param point - The point to add.
*/
add(point: Point): void {
this.points.push(point);
}
/**
* Returns the closest point to a specified point.
* @param target - The point to find the closest point to.
* @returns The closest point in the collection.
*/
findClosest(target: Point): Point {
let closest: Point | undefined;
let closestDistance = Infinity;
for (const point of this.points) {
const distance = point.distanceTo(target);
if (distance < closestDistance) {
closest = point;
closestDistance = distance;
}
}
if (!closest) {
throw new Error('No points in collection');
}
return closest;
}
}
</syntaxhighlight>
ãã®TypeScriptã®ã³ãŒãã¯ã2D空éã®ç¹ãè¡šãPointã¯ã©ã¹ãšããã®ç¹ã®ã³ã¬ã¯ã·ã§ã³ãè¡šãPointCollectionã¯ã©ã¹ãå®çŸ©ããŠããŸãã
Pointã¯ã©ã¹ã«ã¯ãx座æšãšy座æšã®ããããã£ããããdistanceToã¡ãœããã䜿çšããŠä»ã®ç¹ãšã®è·é¢ãèšç®ããããšãã§ããŸãããã®ã¯ã©ã¹ã¯ã@publicã¿ã°ã§å
¬éãããŠãããä»ã®ã¢ãžã¥ãŒã«ãã䜿çšããããšãã§ããŸãã
PointCollectionã¯ã©ã¹ã¯ãPointãªããžã§ã¯ãã®é
åãåŒæ°ãšããŠåããé
åå
ã®ãã¹ãŠã®ç¹ãæ ŒçŽããŸãããã®ã¯ã©ã¹ãã@publicã¿ã°ã§å
¬éãããŠããŸãã
PointCollectionã¯ã©ã¹ã«ã¯ãaddã¡ãœããããããæ°ããPointãªããžã§ã¯ããè¿œå ã§ããŸãããŸããfindClosestã¡ãœããã䜿çšããŠãæå®ãããç¹ã«æãè¿ãç¹ãæ€çŽ¢ããããšãã§ããŸãããã®ã¡ãœããã¯ãPointãªããžã§ã¯ããè¿ããŸãã
ãã®ã³ãŒãã«ã¯ãTSDocã®äž»èŠãªã¿ã°ã䜿çšãããŠããŸããã¯ã©ã¹ãã¡ãœãããããã³ããããã£ã«ã¯ã@classã@publicã@paramãããã³@returnsã¿ã°ãå«ãŸããŸãããããã®ã¿ã°ã¯ãã³ãŒãã®ããã¥ã¡ã³ããŒã·ã§ã³ã«å¿
èŠãªæ
å ±ãæäŸããŸãã
=== çšèªé ===
# ããã¥ã¡ã³ããŒã·ã§ã³ã³ã¡ã³ãïŒdocumentation commentïŒïŒTSDocã§æžãããããã¥ã¡ã³ãã®ã³ã¡ã³ããJavaScriptãTypeScriptã®ã³ãŒãå
ã«èšè¿°ãããŸãã
# JSDocã³ã¡ã³ãïŒJSDoc commentïŒïŒTSDocã®å身ã§ããJSDocã§æžãããããã¥ã¡ã³ãã®ã³ã¡ã³ããçŸåšã¯äºææ§ã®ããã«TSDocã§ã䜿çšå¯èœã§ãã
# ã¿ã°ïŒtagïŒïŒTSDocã§äœ¿çšããããç¹å®ã®æ
å ±ãè¡šãããŒã¯ã¢ããèŠçŽ ã@ã§å§ãŸããååãšãªãã·ã§ã³ã®èª¬æãæã¡ãŸãã
# ãããã¯ã¿ã°ïŒblock tagïŒïŒã¿ã°ã®ãã¡ã説ææãæã€ãããã¯èŠçŽ ãè¡šãã¿ã°ã®ããšãäŸïŒ@paramã@returnsã
# ã€ã³ã©ã€ã³ã¿ã°ïŒinline tagïŒïŒã¿ã°ã®ãã¡ã説ææã®äžéšãšããŠäœ¿çšãããã€ã³ã©ã€ã³èŠçŽ ãè¡šãã¿ã°ã®ããšãäŸïŒ@linkã@codeã
# ãªãã·ã§ã³ïŒoptionïŒïŒã¿ã°ã«å«ãŸãããè¿œå ã®æ
å ±ãæäŸããããã®èŠçŽ ãäŸïŒ@paramã®typeãªãã·ã§ã³ã
# ãã£ã¬ã¯ãã£ãïŒdirectiveïŒïŒããã¥ã¡ã³ããŒã·ã§ã³ã³ã¡ã³ãå
ã§äœ¿çšããããTSDoc以å€ã®ããŒã«ã«æ瀺ãäžããããã®åœä»€ãäŸïŒ@ts-ignoreã
# ããã¥ã¡ã³ããŒã·ã§ã³ã»ããïŒdocumentation setïŒïŒããã°ã©ã ã®ãã¹ãŠã®ããã¥ã¡ã³ãã³ã¡ã³ãã®éåãTSDocã䜿çšããŠèªåçã«çæããããšãã§ããŸãã
# ããã¥ã¡ã³ããŒã·ã§ã³ããŒãžïŒdocumentation pageïŒïŒããã¥ã¡ã³ããŒã·ã§ã³ã»ããã®äžéšã衚瀺ããåäžã®ããŒãžãäžè¬çã«ãç¹å®ã®é¢æ°ãã¯ã©ã¹ã«å¯Ÿå¿ããŸãã
# ããã¥ã¡ã³ããŒã·ã§ã³ããŒã«ïŒdocumentation toolïŒïŒTSDocã«ãã£ãŠçæãããããã¥ã¡ã³ãã衚瀺ããããã®ããŒã«ãäŸïŒTypeDocãESDocã
[[ã«ããŽãª:ããã¥ã¡ã³ããŒã·ã§ã³ããŒã«]]
[[ã«ããŽãª:TypeScript]] | 2023-04-15T22:47:03Z | 2023-09-14T02:02:54Z | [] | https://ja.wikibooks.org/wiki/TSDoc |
37,565 | äžåŠæ ¡å®¶åº/æç¶å¯èœãªæ¶è²»ç掻ãç®æã㊠| èªåã家æã®æ¶è²»è¡åã瀟äŒã«äžãã圱é¿ããŸãšããŸãããã
ãè²·ãç©ã¯æ祚ããšã¯ãååã賌å
¥ããæã«ãæ¯åé ã®äžã«å
¥ããŠããããèšèã§ããéžæã®æ祚ãšåãã§ããç§éãååã賌å
¥ãããšããã®ååã®çç£è
ã販売è
ãå¿æŽããŠãããšãèšããŸããç§éã¯ãããè¯ãååãè²·ããæ¬ é¥ååã®è³Œå
¥ãæ§ãããšããã®ååãæ¹åãããäŒç€Ÿã®èãæ¹ãå€ããããããã«ãªããŸãã
2015幎9æãåœé£å çåœ193ã«åœã¯ããã¢ãžã§ã³ã2030ãã«åæããŸããããã®ç®çã¯ãä»åŸ15幎éã§æ·±å»ãªè²§å°ã»äžå¹³çã»äžæ£çŸ©ã解æ¶ãããããè¯ãå°çã«ããããã§ãããã¢ãžã§ã³ã2030ãã¯ãæç¶å¯èœãªéçºç®æš(Sustainable Development Goals)ããšããã°ããŠããŸããæç¶å¯èœãªéçºç®æšã«ã¯ãé·ãæç¶åºæ¥ã瀟äŒãäœãããã®17ã®ç®æšããããŸãããã®äžã®12çªç®ã¯ã人ã»ç°å¢ã»ç€ŸäŒã«åªããååãäœã販売ããçç£è
ã»è²©å£²è
ã®è²¬ä»»ãšè³Œå
¥ããæ¶è²»è
ã®è²¬ä»»ã§ããæ¶è²»è
ã»çç£è
ã»è²©å£²è
ããèªåéã®è¡åãçŸäžä»£ã»æ¬¡äžä»£ãåãããå°çç°å¢ãæ¶è²»çµæžã«ã©ã®ãããªåœ±é¿ãäžããã®ããæèããŠã責任ããæ¶è²»è¡åãããã°ãæç¶å¯èœãªç€ŸäŒãäœãåºããŸãã
ãšã³ããžã«ã«ã»ãããããªã³ãã¯ãå°çç°å¢ã§äººéã®è¡åãã©ã®ããã«åœ±é¿ããã®ãã枬ãææšã§ãããã®ææšã§ã¯ãå
šäžçã®äººã®ç掻ãæ¯ããããã«ã¯å°ç1.7ååãæ¥æ¬äººãšåãããã«ç掻ããããã«ã¯å°ç2.9ååãå¿
èŠãšãªããŸãã
æ¶è²»è¡åã¯æ§ã
ãªåœ±é¿ãåããŸãããã®ãããä»åŸã¯ãèªåã®å¹žãã ãã§ãªããä»äººã»ç€ŸäŒã»ç°å¢ã»å°åãªã©ãèããå«ççæ¶è²»(ãšã·ã«ã«æ¶è²»)ãæ±ããããŠããŸãããããŠãçŸåšã®äžä»£ãšæªæ¥ã®äžä»£ããšãã«å¹žãã«æ®ãããŠããããããªå
¬æ£ã§æç¶å¯èœãªç€ŸäŒãç¯ããªããã°ãªããŸããããã®ãããèªç±ãªæ¶è²»è
ãšããŠè¡ååºæ¥ããããªç€ŸäŒ(æ¶è²»è
åžæ°ç€ŸäŒ)ã«ãªãããã«ãå®è·µããŠãããŸãããã
â
å°ç£å°æ¶
â
被çœå°æ¯æŽåå
â
é害è
æ¯æŽã«ç¹ããåå
â
ãªãŒã¬ããã¯ã³ããã³è£œå
綿è±ã«é©ããåå°ã§æ œå¹ãããé©åãªéã®èŸ²è¬ãšè¥æã䜿ã£ãŠã瀟äŒãç°å¢ã®èŠåã«åŸã£ãŠäœããã補åã§ãã
â
ãªãµã€ã¯ã«ãã¢ãããµã€ã¯ã«ã®åå
å»æã䜿ããªããªã£ãç©ããçŽ æããã®ãŸãŸäœ¿ã£ããäœãæ¿ãããããŠãå¥ã®æ°ããªäŸ¡å€ãæã€ç©ãšããŠäœ¿ããŸãã
â
売ãäžãã®äžéšãå¯ä»ã«ãªãååã®äŸ
ã¬ããã«ãããã£ã³ããŒã³ã®ããŒã¯ãä»ããååã賌å
¥ãããšã売äžéé¡ã®äžéšãåŠæ ¡çµŠé£æ¯æŽã«åœ¹ç«ãŠãããŸãã
â
èªèšŒã©ãã«ä»ãã®ååã®äŸ
èªèšŒã©ãã«ä»ãååã賌å
¥ããŠããšã·ã«ã«æ¶è²»ãšãããŸããèªèšŒæ©é¢ã¯å€æ°ãããæ§ã
ãªååã«ä»ããããŠããŸãããããã¯ã»ãã®æ°äŸã«éããŸããã
(1)åœéãã§ã¢ãã¬ãŒãèªèšŒã©ãã«:ãã®èªèšŒã©ãã«ãä»ããŠããããåœéçãªãã§ã¢ãã¬ãŒãåºæºã«åŸã£ãŠããŸãã
(2)FSCèªèšŒ:森æè³æºã䜿ã£ãåå(çŽè£œåãªã©)ã«ä»ããããŠããŸãã
(3)MSCèªèšŒ:æ°Žç£ç©ã«ä»ããããŠããŸããæµ·ã®èªç¶ç°å¢ãæ°Žç£è³æºãå®ãããã«ãä»ããããŠããŸãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "èªåã家æã®æ¶è²»è¡åã瀟äŒã«äžãã圱é¿ããŸãšããŸãããã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ãè²·ãç©ã¯æ祚ããšã¯ãååã賌å
¥ããæã«ãæ¯åé ã®äžã«å
¥ããŠããããèšèã§ããéžæã®æ祚ãšåãã§ããç§éãååã賌å
¥ãããšããã®ååã®çç£è
ã販売è
ãå¿æŽããŠãããšãèšããŸããç§éã¯ãããè¯ãååãè²·ããæ¬ é¥ååã®è³Œå
¥ãæ§ãããšããã®ååãæ¹åãããäŒç€Ÿã®èãæ¹ãå€ããããããã«ãªããŸãã",
"title": "è²·ãç©ã¯æ祚"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "2015幎9æãåœé£å çåœ193ã«åœã¯ããã¢ãžã§ã³ã2030ãã«åæããŸããããã®ç®çã¯ãä»åŸ15幎éã§æ·±å»ãªè²§å°ã»äžå¹³çã»äžæ£çŸ©ã解æ¶ãããããè¯ãå°çã«ããããã§ãããã¢ãžã§ã³ã2030ãã¯ãæç¶å¯èœãªéçºç®æš(Sustainable Development Goals)ããšããã°ããŠããŸããæç¶å¯èœãªéçºç®æšã«ã¯ãé·ãæç¶åºæ¥ã瀟äŒãäœãããã®17ã®ç®æšããããŸãããã®äžã®12çªç®ã¯ã人ã»ç°å¢ã»ç€ŸäŒã«åªããååãäœã販売ããçç£è
ã»è²©å£²è
ã®è²¬ä»»ãšè³Œå
¥ããæ¶è²»è
ã®è²¬ä»»ã§ããæ¶è²»è
ã»çç£è
ã»è²©å£²è
ããèªåéã®è¡åãçŸäžä»£ã»æ¬¡äžä»£ãåãããå°çç°å¢ãæ¶è²»çµæžã«ã©ã®ãããªåœ±é¿ãäžããã®ããæèããŠã責任ããæ¶è²»è¡åãããã°ãæç¶å¯èœãªç€ŸäŒãäœãåºããŸãã",
"title": "æç¶å¯èœãªç€ŸäŒã®å®çŸ"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "ãšã³ããžã«ã«ã»ãããããªã³ãã¯ãå°çç°å¢ã§äººéã®è¡åãã©ã®ããã«åœ±é¿ããã®ãã枬ãææšã§ãããã®ææšã§ã¯ãå
šäžçã®äººã®ç掻ãæ¯ããããã«ã¯å°ç1.7ååãæ¥æ¬äººãšåãããã«ç掻ããããã«ã¯å°ç2.9ååãå¿
èŠãšãªããŸãã",
"title": "æç¶å¯èœãªç€ŸäŒã®å®çŸ"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "æ¶è²»è¡åã¯æ§ã
ãªåœ±é¿ãåããŸãããã®ãããä»åŸã¯ãèªåã®å¹žãã ãã§ãªããä»äººã»ç€ŸäŒã»ç°å¢ã»å°åãªã©ãèããå«ççæ¶è²»(ãšã·ã«ã«æ¶è²»)ãæ±ããããŠããŸãããããŠãçŸåšã®äžä»£ãšæªæ¥ã®äžä»£ããšãã«å¹žãã«æ®ãããŠããããããªå
¬æ£ã§æç¶å¯èœãªç€ŸäŒãç¯ããªããã°ãªããŸããããã®ãããèªç±ãªæ¶è²»è
ãšããŠè¡ååºæ¥ããããªç€ŸäŒ(æ¶è²»è
åžæ°ç€ŸäŒ)ã«ãªãããã«ãå®è·µããŠãããŸãããã",
"title": "ãšã·ã«ã«æ¶è²»ãšæ¶è²»è
åžæ°ç€ŸäŒ"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "â
å°ç£å°æ¶",
"title": "ãšã·ã«ã«æ¶è²»ãšæ¶è²»è
åžæ°ç€ŸäŒ"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "â
被çœå°æ¯æŽåå",
"title": "ãšã·ã«ã«æ¶è²»ãšæ¶è²»è
åžæ°ç€ŸäŒ"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "â
é害è
æ¯æŽã«ç¹ããåå",
"title": "ãšã·ã«ã«æ¶è²»ãšæ¶è²»è
åžæ°ç€ŸäŒ"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "â
ãªãŒã¬ããã¯ã³ããã³è£œå",
"title": "ãšã·ã«ã«æ¶è²»ãšæ¶è²»è
åžæ°ç€ŸäŒ"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "綿è±ã«é©ããåå°ã§æ œå¹ãããé©åãªéã®èŸ²è¬ãšè¥æã䜿ã£ãŠã瀟äŒãç°å¢ã®èŠåã«åŸã£ãŠäœããã補åã§ãã",
"title": "ãšã·ã«ã«æ¶è²»ãšæ¶è²»è
åžæ°ç€ŸäŒ"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "â
ãªãµã€ã¯ã«ãã¢ãããµã€ã¯ã«ã®åå",
"title": "ãšã·ã«ã«æ¶è²»ãšæ¶è²»è
åžæ°ç€ŸäŒ"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "å»æã䜿ããªããªã£ãç©ããçŽ æããã®ãŸãŸäœ¿ã£ããäœãæ¿ãããããŠãå¥ã®æ°ããªäŸ¡å€ãæã€ç©ãšããŠäœ¿ããŸãã",
"title": "ãšã·ã«ã«æ¶è²»ãšæ¶è²»è
åžæ°ç€ŸäŒ"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "â
売ãäžãã®äžéšãå¯ä»ã«ãªãååã®äŸ",
"title": "ãšã·ã«ã«æ¶è²»ãšæ¶è²»è
åžæ°ç€ŸäŒ"
},
{
"paragraph_id": 13,
"tag": "p",
"text": "ã¬ããã«ãããã£ã³ããŒã³ã®ããŒã¯ãä»ããååã賌å
¥ãããšã売äžéé¡ã®äžéšãåŠæ ¡çµŠé£æ¯æŽã«åœ¹ç«ãŠãããŸãã",
"title": "ãšã·ã«ã«æ¶è²»ãšæ¶è²»è
åžæ°ç€ŸäŒ"
},
{
"paragraph_id": 14,
"tag": "p",
"text": "â
èªèšŒã©ãã«ä»ãã®ååã®äŸ",
"title": "ãšã·ã«ã«æ¶è²»ãšæ¶è²»è
åžæ°ç€ŸäŒ"
},
{
"paragraph_id": 15,
"tag": "p",
"text": "èªèšŒã©ãã«ä»ãååã賌å
¥ããŠããšã·ã«ã«æ¶è²»ãšãããŸããèªèšŒæ©é¢ã¯å€æ°ãããæ§ã
ãªååã«ä»ããããŠããŸãããããã¯ã»ãã®æ°äŸã«éããŸããã",
"title": "ãšã·ã«ã«æ¶è²»ãšæ¶è²»è
åžæ°ç€ŸäŒ"
},
{
"paragraph_id": 16,
"tag": "p",
"text": "(1)åœéãã§ã¢ãã¬ãŒãèªèšŒã©ãã«:ãã®èªèšŒã©ãã«ãä»ããŠããããåœéçãªãã§ã¢ãã¬ãŒãåºæºã«åŸã£ãŠããŸãã",
"title": "ãšã·ã«ã«æ¶è²»ãšæ¶è²»è
åžæ°ç€ŸäŒ"
},
{
"paragraph_id": 17,
"tag": "p",
"text": "(2)FSCèªèšŒ:森æè³æºã䜿ã£ãåå(çŽè£œåãªã©)ã«ä»ããããŠããŸãã",
"title": "ãšã·ã«ã«æ¶è²»ãšæ¶è²»è
åžæ°ç€ŸäŒ"
},
{
"paragraph_id": 18,
"tag": "p",
"text": "(3)MSCèªèšŒ:æ°Žç£ç©ã«ä»ããããŠããŸããæµ·ã®èªç¶ç°å¢ãæ°Žç£è³æºãå®ãããã«ãä»ããããŠããŸãã",
"title": "ãšã·ã«ã«æ¶è²»ãšæ¶è²»è
åžæ°ç€ŸäŒ"
}
] | èªåã家æã®æ¶è²»è¡åã瀟äŒã«äžãã圱é¿ããŸãšããŸãããã | [[å°åŠæ ¡ã»äžåŠæ ¡ã»é«çåŠæ ¡ã®åŠç¿]]>[[äžåŠæ ¡ã®åŠç¿]]>[[äžåŠæ ¡å®¶åº]]>æç¶å¯èœãªæ¶è²»ç掻ãç®æããŠ
èªåã家æã®æ¶è²»è¡åã瀟äŒã«äžãã圱é¿ããŸãšããŸãããã
== è²·ãç©ã¯æ祚 ==
ãè²·ãç©ã¯æ祚ããšã¯ãååã賌å
¥ããæã«ãæ¯åé ã®äžã«å
¥ããŠããããèšèã§ããéžæã®æ祚ãšåãã§ããç§éãååã賌å
¥ãããšããã®ååã®çç£è
ã販売è
ãå¿æŽããŠãããšãèšããŸããç§éã¯ãããè¯ãååãè²·ããæ¬ é¥ååã®è³Œå
¥ãæ§ãããšããã®ååãæ¹åãããäŒç€Ÿã®èãæ¹ãå€ããããããã«ãªããŸãã
== æç¶å¯èœãªç€ŸäŒã®å®çŸ ==
ïŒïŒïŒïŒå¹ŽïŒæãåœé£å çåœïŒïŒïŒã«åœã¯ããã¢ãžã§ã³ãïŒïŒïŒïŒãã«åæããŸããããã®ç®çã¯ãä»åŸïŒïŒå¹Žéã§æ·±å»ãªè²§å°ã»äžå¹³çã»äžæ£çŸ©ã解æ¶ãããããè¯ãå°çã«ããããã§ãããã¢ãžã§ã³ãïŒïŒïŒïŒãã¯ãæç¶å¯èœãªéçºç®æšïŒ'''S'''ustainable '''D'''evelopment '''G'''oal'''s'''ïŒããšããã°ããŠããŸããæç¶å¯èœãªéçºç®æšã«ã¯ãé·ãæç¶åºæ¥ã瀟äŒãäœãããã®ïŒïŒã®ç®æšããããŸãããã®äžã®ïŒïŒçªç®ã¯ã人ã»ç°å¢ã»ç€ŸäŒã«åªããååãäœã販売ããçç£è
ã»è²©å£²è
ã®è²¬ä»»ãšè³Œå
¥ããæ¶è²»è
ã®è²¬ä»»ã§ããæ¶è²»è
ã»çç£è
ã»è²©å£²è
ããèªåéã®è¡åãçŸäžä»£ã»æ¬¡äžä»£ãåãããå°çç°å¢ãæ¶è²»çµæžã«ã©ã®ãããªåœ±é¿ãäžããã®ããæèããŠã責任ããæ¶è²»è¡åãããã°ãæç¶å¯èœãªç€ŸäŒãäœãåºããŸãã
ãšã³ããžã«ã«ã»ãããããªã³ãã¯ãå°çç°å¢ã§äººéã®è¡åãã©ã®ããã«åœ±é¿ããã®ãã枬ãææšã§ãããã®ææšã§ã¯ãå
šäžçã®äººã®ç掻ãæ¯ããããã«ã¯å°çïŒïŒïŒååãæ¥æ¬äººãšåãããã«ç掻ããããã«ã¯å°çïŒïŒïŒååãå¿
èŠãšãªããŸãã
== ãšã·ã«ã«æ¶è²»ãšæ¶è²»è
åžæ°ç€ŸäŒ ==
æ¶è²»è¡åã¯æ§ã
ãªåœ±é¿ãåããŸãããã®ãããä»åŸã¯ãèªåã®å¹žãã ãã§ãªããä»äººã»ç€ŸäŒã»ç°å¢ã»å°åãªã©ãèããå«ççæ¶è²»ïŒ'''ãšã·ã«ã«æ¶è²»'''ïŒãæ±ããããŠããŸãããããŠãçŸåšã®äžä»£ãšæªæ¥ã®äžä»£ããšãã«å¹žãã«æ®ãããŠããããããªå
¬æ£ã§æç¶å¯èœãªç€ŸäŒãç¯ããªããã°ãªããŸããããã®ãããèªç±ãªæ¶è²»è
ãšããŠè¡ååºæ¥ããããªç€ŸäŒïŒ'''æ¶è²»è
åžæ°ç€ŸäŒ'''ïŒã«ãªãããã«ãå®è·µããŠãããŸãããã{{ã³ã©ã |ããã«åºæ¥ãããšã·ã«ã«ãããšã·ã«ã«åäŒä»£è¡šçäºãæ«åéè±ãã|ããšã·ã«ã«ãã®æå³ã¯ããå«ççãªãã§ããã»ãšãã©ã®äººããæ£ããããšèãã瀟äŒèŠåãè¡šããŠããŸããé£ããèšèã«æãããããããŸãããããããæ¥æ¬ã®äŒçµ±çãªèãæ¹ããæ¥ãèšèãæãããããšããã£ãããªããã¯äŒŒãŠãããããããã®æå³ãã圱é¿ããã£ãããšèãããã§äœ¿ãããŠããŸãããã€ã䜿ã£ãããé£ã¹ãããçããããŠããååã«ãäœã人ãããŸãã人ã»ç€ŸäŒã»å°çç°å¢ã»å°åãèããŠã賌å
¥ããããæ¶è²»ãããããããã«ããŸãããã
ãšã·ã«ã«æ¶è²»ã¯ãããã«è¡åã«ç§»ããã®ã§æ³šç®ãããŠããŸããä»ã®æ代æ¯æ¥äœãããæ¶è²»ãããŠç掻ãå¶ãã§ããŸããå
šäžçã®äººãæ¶è²»è
ãªã®ã§ãå
šäžçã®äººããšã·ã«ã«æ¶è²»ãå®è·µåºæ¥ãŸãã}}
:â» é«æ ¡ã®ç€ŸäŒç§ã®ç§ç®ãå
Œ
±ãã§ãããšã·ã«ã«æ¶è²»ããå«ççæ¶è²»ãã玹ä»ãããŠããŸããäžåŠã§èŠããŠããŸããŸãããã
=== ãšã·ã«ã«æ¶è²»ã®äŸ ===
â
'''å°ç£å°æ¶'''
â
'''被çœå°æ¯æŽåå'''
â
'''é害è
æ¯æŽã«ç¹ããåå'''
'''â
ãªãŒã¬ããã¯ã³ããã³è£œå'''
綿è±ã«é©ããåå°ã§æ œå¹ãããé©åãªéã®èŸ²è¬ãšè¥æã䜿ã£ãŠã瀟äŒãç°å¢ã®èŠåã«åŸã£ãŠäœããã補åã§ãã
'''â
ãªãµã€ã¯ã«ãã¢ãããµã€ã¯ã«ã®åå'''
å»æã䜿ããªããªã£ãç©ããçŽ æããã®ãŸãŸäœ¿ã£ããäœãæ¿ãããããŠãå¥ã®æ°ããªäŸ¡å€ãæã€ç©ãšããŠäœ¿ããŸãã
'''â
売ãäžãã®äžéšãå¯ä»ã«ãªãååã®äŸ'''
ã¬ããã«ãããã£ã³ããŒã³ã®ããŒã¯ãä»ããååã賌å
¥ãããšã売äžéé¡ã®äžéšãåŠæ ¡çµŠé£æ¯æŽã«åœ¹ç«ãŠãããŸãã
'''â
èªèšŒã©ãã«ä»ãã®ååã®äŸ'''
èªèšŒã©ãã«ä»ãååã賌å
¥ããŠããšã·ã«ã«æ¶è²»ãšãããŸããèªèšŒæ©é¢ã¯å€æ°ãããæ§ã
ãªååã«ä»ããããŠããŸãããããã¯ã»ãã®æ°äŸã«éããŸããã
ïŒïŒïŒ'''åœéãã§ã¢ãã¬ãŒãèªèšŒã©ãã«ïŒ'''ãã®èªèšŒã©ãã«ãä»ããŠããããåœéçãªãã§ã¢ãã¬ãŒãåºæºã«åŸã£ãŠããŸãã
ïŒïŒïŒ'''èªèšŒïŒ'''森æè³æºã䜿ã£ãååïŒçŽè£œåãªã©ïŒã«ä»ããããŠããŸãã
ïŒïŒïŒ'''ïŒïŒ³ïŒ£èªèšŒïŒ'''æ°Žç£ç©ã«ä»ããããŠããŸããæµ·ã®èªç¶ç°å¢ãæ°Žç£è³æºãå®ãããã«ãä»ããããŠããŸãã
[[ã«ããŽãª:äžåŠæ ¡å®¶åºç§]]
[[ã«ããŽãª:çµæžç掻]] | 2023-04-16T11:38:51Z | 2023-09-05T14:28:55Z | [
"ãã³ãã¬ãŒã:ã³ã©ã "
] | https://ja.wikibooks.org/wiki/%E4%B8%AD%E5%AD%A6%E6%A0%A1%E5%AE%B6%E5%BA%AD/%E6%8C%81%E7%B6%9A%E5%8F%AF%E8%83%BD%E3%81%AA%E6%B6%88%E8%B2%BB%E7%94%9F%E6%B4%BB%E3%82%92%E7%9B%AE%E6%8C%87%E3%81%97%E3%81%A6 |
37,571 | JavaScript/FinalizationRegistry | JavaScriptã®FinalizationRegistryã¯ããªããžã§ã¯ãã®ã¬ããŒãžã³ã¬ã¯ã·ã§ã³åŸã«å®è¡ãããã³ãŒã«ããã¯é¢æ°ãèšå®ããããã®æ©èœãæäŸããã¯ã©ã¹ã§ãããã®æ©èœã䜿çšããããšã§ãã¡ã¢ãªãªãŒã¯ãåé¿ãããã解æŸåŸã«åŸåŠçãè¡ã£ããããããšãã§ããŸããæ¬ãã¥ãŒããªã¢ã«ã§ã¯ãFinalizationRegistryã®åºæ¬çãªäœ¿ãæ¹ã泚æç¹ã«ã€ããŠåŠã³ãå®éã®ããã°ã©ã ã§ã®æŽ»çšæ¹æ³ã玹ä»ããŸããææ°çã®JavaScriptç°å¢ã䜿ã£ãŠããããšãåæã«ãå
·äœçãªã³ãŒãäŸã亀ããŠè§£èª¬ããŠãããŸãã
JavaScriptã®FinalizationRegistryã¯ããªããžã§ã¯ããã¬ããŒãžã³ã¬ã¯ã¿(GC)ã«ãã£ãŠè§£æŸãããéã«ãé¢æ°ãåŒã³åºãæ©èœãæäŸããã¯ã©ã¹ã§ããJavaScriptã§ã¯ããªããžã§ã¯ããäžèŠã«ãªã£ãå Žåãã¬ããŒãžã³ã¬ã¯ã¿ã«ãã£ãŠèªåçã«è§£æŸãããŸãããããããã®è§£æŸã¿ã€ãã³ã°ã¯ä¿èšŒãããŠããŸããã
FinalizationRegistryã¯ããã®è§£æŸã¿ã€ãã³ã°ããã现ããå¶åŸ¡ã§ããããã«ããããã«ãJavaScriptã«å°å
¥ãããŸãããäŸãã°ããªããžã§ã¯ãã解æŸããããšãã«ããŒã¿ããŒã¹ãããã®ãªããžã§ã¯ãã«é¢é£ããæ
å ±ãåé€ãããããªå Žåã«ãFinalizationRegistryã䜿çšããããšãã§ããŸãã
FinalizationRegistryã¯ããªããžã§ã¯ãã®ãã³ãã«ãä¿æãããªããžã§ã¯ããGCãããéã«ç»é²ãããã³ãŒã«ããã¯é¢æ°ãåŒã³åºãããšãã§ããŸããFinalizationRegistryã«ç»é²ããããªããžã§ã¯ãã¯ã匱åç
§ãšããŠä¿æãããŸããã€ãŸãããªããžã§ã¯ããä»ã®åç
§ãæã£ãŠããªãå Žåã«ã¯ãGCã«ãã£ãŠè§£æŸãããŸãã
FinalizationRegistryã¯ãJavaScriptã®ã¬ããŒãžã³ã¬ã¯ã¿ãšå¯æ¥ã«é¢é£ããŠããŸããã¬ããŒãžã³ã¬ã¯ã¿ã¯ãåç
§ãããŠããªããªããžã§ã¯ãã解æŸããããšã§ã¡ã¢ãªã解æŸããŸãã
FinalizationRegistryã¯ããªããžã§ã¯ããGCãããéã«ã³ãŒã«ããã¯é¢æ°ãåŒã³åºãããããªããžã§ã¯ãã®è§£æŸã¿ã€ãã³ã°ãã³ã³ãããŒã«ããããšãã§ããŸãã
FinalizationRegistryã¯ã以äžã®ãããªç¶æ³ã§åœ¹ç«ã¡ãŸãã
FinalizationRegistryã䜿çšããã«ã¯ããŸãFinalizationRegistryã³ã³ã¹ãã©ã¯ã¿ã䜿çšããŠæ°ããFinalizationRegistryãªããžã§ã¯ããäœæããŸãã次ã«ããªããžã§ã¯ããç»é²ããã«ã¯ãFinalizationRegistryã®register()ã¡ãœããã䜿çšããŸããregister()ã¡ãœããã¯ãç»é²ããããªããžã§ã¯ãã«å¯Ÿããã³ãŒã«ããã¯é¢æ°ãåŒã³åºãããã®ãã³ãã©ãŒé¢æ°ãç»é²ããŸãããããŠããªããžã§ã¯ãã解æŸããããšãç»é²ãããã³ãŒã«ããã¯é¢æ°ãèªåçã«åŒã³åºãããŸãã
以äžã¯ãFinalizationRegistryã®ç°¡åãªäŸã§ãã
ãã®äŸã§ã¯ãFinalizationRegistryã«ç»é²ãããã³ãŒã«ããã¯é¢æ°ãããªããžã§ã¯ãã解æŸããããšãã«èªåçã«åŒã³åºãããŠããŸãã
FinalizationRegistryã䜿çšããããšã§ãJavaScriptã¢ããªã±ãŒã·ã§ã³ã®ã¡ã¢ãªç®¡çãããæ£ç¢ºã«å¶åŸ¡ããããšãã§ããŸããããããFinalizationRegistryã«ãã管çã«ã¯ãªãŒããŒããããçºçãããããé©åãªã¿ã€ãã³ã°ã§äœ¿çšããå¿
èŠããããŸãã
JavaScriptã®åŒ±åç
§ã¯ããªããžã§ã¯ããžã®åç
§ãä¿æãã€ã€ããã®ãªããžã§ã¯ããGCã®å¯Ÿè±¡ãšãªã£ãéã«ã匷å¶çã«è§£æŸããããšãã§ããåç
§ã®ããšã§ãã匱åç
§ã¯ããªããžã§ã¯ããžã®åç
§ãä¿æããããšã«ãã£ãŠããªããžã§ã¯ããGCã®å¯Ÿè±¡ã«ãªããªãããã«ããŸãããããããªããžã§ã¯ãã«ä»ã«åç
§ããªããªã£ãå Žåã匱åç
§ã¯ãªããžã§ã¯ããèªåçã«è§£æŸããããšãã§ããŸãã
JavaScriptã«ããã匱åç
§ã¯ãWeakMapãWeakSetãFinalizationRegistryãšãã£ãæ©èœã§å©çšãããŸãããããã®æ©èœã¯ããªããžã§ã¯ãã®åç
§ãä¿æãã€ã€ããªããžã§ã¯ããGCãããéã«èªåçã«è§£æŸããããšãã§ããŸããäŸãã°ãWeakMapã¯ããªããžã§ã¯ããããŒãšããŠä¿æããããŒã«å¯Ÿããå€ãåç
§ããéã«ãªããžã§ã¯ããžã®åŒ±åç
§ã䜿çšããŸããåæ§ã«ãWeakSetã¯ããªããžã§ã¯ãã®éåãä¿æããéã«ãªããžã§ã¯ããžã®åŒ±åç
§ã䜿çšããŸãã
FinalizationRegistryã¯ã匱åç
§ã䜿çšããŠããªããžã§ã¯ããGCãããéã«èªåçã«ã³ãŒã«ããã¯é¢æ°ãåŒã³åºãããšãã§ããŸããFinalizationRegistryã¯ããªããžã§ã¯ãã®ãã³ãã«ãä¿æãããªããžã§ã¯ããGCãããéã«ç»é²ãããã³ãŒã«ããã¯é¢æ°ãåŒã³åºãããšãã§ããŸããFinalizationRegistryã«ç»é²ããããªããžã§ã¯ãã¯ã匱åç
§ãšããŠä¿æãããŸããã€ãŸãããªããžã§ã¯ããä»ã®åç
§ãæã£ãŠããªãå Žåã«ã¯ãGCã«ãã£ãŠè§£æŸãããŸãã
匱åç
§ã¯ãJavaScriptã®ã¡ã¢ãªç®¡çãããå¹ççã«è¡ãããã«éåžžã«æçšãªæ©èœã§ããäŸãã°ã倧éã®ãªããžã§ã¯ãã管çããå Žåã«ã¯ã匱åç
§ã䜿çšããŠããªããžã§ã¯ããå¹ççã«è§£æŸããããšãã§ããŸãããŸããFinalizationRegistryã䜿çšããããšã§ããªããžã§ã¯ãã解æŸãããéã«å¿
èŠãªåŸåŠçãå®è¡ããããšãã§ããŸãã
ãããã®ããããã£ãšã¡ãœããã䜿çšããŠãFinalizationRegistryãªããžã§ã¯ãã䜿çšããããšãã§ããŸãã
以äžã¯JavaScriptã®FinalizationRegistryã«é¢ããããŒãã·ãŒãã§ããåããããã£ãšã¡ãœããã«ã€ããŠãç°¡åãªèª¬æãšäŸãå«ãŸããŠããŸãã
泚æ: FinalizationRegistryã¯ECMAScript 2021ã§å°å
¥ãããŸãããçŸåšããã¹ãŠã®ãã©ãŠã¶ã§ãµããŒããããŠããããã§ã¯ãããŸããã詳现ã«ã€ããŠã¯ããã©ãŠã¶ã®ããã¥ã¡ã³ãã確èªããŠãã ããã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "JavaScriptã®FinalizationRegistryã¯ããªããžã§ã¯ãã®ã¬ããŒãžã³ã¬ã¯ã·ã§ã³åŸã«å®è¡ãããã³ãŒã«ããã¯é¢æ°ãèšå®ããããã®æ©èœãæäŸããã¯ã©ã¹ã§ãããã®æ©èœã䜿çšããããšã§ãã¡ã¢ãªãªãŒã¯ãåé¿ãããã解æŸåŸã«åŸåŠçãè¡ã£ããããããšãã§ããŸããæ¬ãã¥ãŒããªã¢ã«ã§ã¯ãFinalizationRegistryã®åºæ¬çãªäœ¿ãæ¹ã泚æç¹ã«ã€ããŠåŠã³ãå®éã®ããã°ã©ã ã§ã®æŽ»çšæ¹æ³ã玹ä»ããŸããææ°çã®JavaScriptç°å¢ã䜿ã£ãŠããããšãåæã«ãå
·äœçãªã³ãŒãäŸã亀ããŠè§£èª¬ããŠãããŸãã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "JavaScriptã®FinalizationRegistryã¯ããªããžã§ã¯ããã¬ããŒãžã³ã¬ã¯ã¿(GC)ã«ãã£ãŠè§£æŸãããéã«ãé¢æ°ãåŒã³åºãæ©èœãæäŸããã¯ã©ã¹ã§ããJavaScriptã§ã¯ããªããžã§ã¯ããäžèŠã«ãªã£ãå Žåãã¬ããŒãžã³ã¬ã¯ã¿ã«ãã£ãŠèªåçã«è§£æŸãããŸãããããããã®è§£æŸã¿ã€ãã³ã°ã¯ä¿èšŒãããŠããŸããã",
"title": ""
},
{
"paragraph_id": 2,
"tag": "p",
"text": "FinalizationRegistryã¯ããã®è§£æŸã¿ã€ãã³ã°ããã现ããå¶åŸ¡ã§ããããã«ããããã«ãJavaScriptã«å°å
¥ãããŸãããäŸãã°ããªããžã§ã¯ãã解æŸããããšãã«ããŒã¿ããŒã¹ãããã®ãªããžã§ã¯ãã«é¢é£ããæ
å ±ãåé€ãããããªå Žåã«ãFinalizationRegistryã䜿çšããããšãã§ããŸãã",
"title": ""
},
{
"paragraph_id": 3,
"tag": "p",
"text": "FinalizationRegistryã¯ããªããžã§ã¯ãã®ãã³ãã«ãä¿æãããªããžã§ã¯ããGCãããéã«ç»é²ãããã³ãŒã«ããã¯é¢æ°ãåŒã³åºãããšãã§ããŸããFinalizationRegistryã«ç»é²ããããªããžã§ã¯ãã¯ã匱åç
§ãšããŠä¿æãããŸããã€ãŸãããªããžã§ã¯ããä»ã®åç
§ãæã£ãŠããªãå Žåã«ã¯ãGCã«ãã£ãŠè§£æŸãããŸãã",
"title": ""
},
{
"paragraph_id": 4,
"tag": "p",
"text": "FinalizationRegistryã¯ãJavaScriptã®ã¬ããŒãžã³ã¬ã¯ã¿ãšå¯æ¥ã«é¢é£ããŠããŸããã¬ããŒãžã³ã¬ã¯ã¿ã¯ãåç
§ãããŠããªããªããžã§ã¯ãã解æŸããããšã§ã¡ã¢ãªã解æŸããŸãã",
"title": ""
},
{
"paragraph_id": 5,
"tag": "p",
"text": "FinalizationRegistryã¯ããªããžã§ã¯ããGCãããéã«ã³ãŒã«ããã¯é¢æ°ãåŒã³åºãããããªããžã§ã¯ãã®è§£æŸã¿ã€ãã³ã°ãã³ã³ãããŒã«ããããšãã§ããŸãã",
"title": ""
},
{
"paragraph_id": 6,
"tag": "p",
"text": "FinalizationRegistryã¯ã以äžã®ãããªç¶æ³ã§åœ¹ç«ã¡ãŸãã",
"title": ""
},
{
"paragraph_id": 7,
"tag": "p",
"text": "FinalizationRegistryã䜿çšããã«ã¯ããŸãFinalizationRegistryã³ã³ã¹ãã©ã¯ã¿ã䜿çšããŠæ°ããFinalizationRegistryãªããžã§ã¯ããäœæããŸãã次ã«ããªããžã§ã¯ããç»é²ããã«ã¯ãFinalizationRegistryã®register()ã¡ãœããã䜿çšããŸããregister()ã¡ãœããã¯ãç»é²ããããªããžã§ã¯ãã«å¯Ÿããã³ãŒã«ããã¯é¢æ°ãåŒã³åºãããã®ãã³ãã©ãŒé¢æ°ãç»é²ããŸãããããŠããªããžã§ã¯ãã解æŸããããšãç»é²ãããã³ãŒã«ããã¯é¢æ°ãèªåçã«åŒã³åºãããŸãã",
"title": ""
},
{
"paragraph_id": 8,
"tag": "p",
"text": "以äžã¯ãFinalizationRegistryã®ç°¡åãªäŸã§ãã",
"title": ""
},
{
"paragraph_id": 9,
"tag": "p",
"text": "ãã®äŸã§ã¯ãFinalizationRegistryã«ç»é²ãããã³ãŒã«ããã¯é¢æ°ãããªããžã§ã¯ãã解æŸããããšãã«èªåçã«åŒã³åºãããŠããŸãã",
"title": ""
},
{
"paragraph_id": 10,
"tag": "p",
"text": "FinalizationRegistryã䜿çšããããšã§ãJavaScriptã¢ããªã±ãŒã·ã§ã³ã®ã¡ã¢ãªç®¡çãããæ£ç¢ºã«å¶åŸ¡ããããšãã§ããŸããããããFinalizationRegistryã«ãã管çã«ã¯ãªãŒããŒããããçºçãããããé©åãªã¿ã€ãã³ã°ã§äœ¿çšããå¿
èŠããããŸãã",
"title": ""
},
{
"paragraph_id": 11,
"tag": "p",
"text": "JavaScriptã®åŒ±åç
§ã¯ããªããžã§ã¯ããžã®åç
§ãä¿æãã€ã€ããã®ãªããžã§ã¯ããGCã®å¯Ÿè±¡ãšãªã£ãéã«ã匷å¶çã«è§£æŸããããšãã§ããåç
§ã®ããšã§ãã匱åç
§ã¯ããªããžã§ã¯ããžã®åç
§ãä¿æããããšã«ãã£ãŠããªããžã§ã¯ããGCã®å¯Ÿè±¡ã«ãªããªãããã«ããŸãããããããªããžã§ã¯ãã«ä»ã«åç
§ããªããªã£ãå Žåã匱åç
§ã¯ãªããžã§ã¯ããèªåçã«è§£æŸããããšãã§ããŸãã",
"title": ""
},
{
"paragraph_id": 12,
"tag": "p",
"text": "JavaScriptã«ããã匱åç
§ã¯ãWeakMapãWeakSetãFinalizationRegistryãšãã£ãæ©èœã§å©çšãããŸãããããã®æ©èœã¯ããªããžã§ã¯ãã®åç
§ãä¿æãã€ã€ããªããžã§ã¯ããGCãããéã«èªåçã«è§£æŸããããšãã§ããŸããäŸãã°ãWeakMapã¯ããªããžã§ã¯ããããŒãšããŠä¿æããããŒã«å¯Ÿããå€ãåç
§ããéã«ãªããžã§ã¯ããžã®åŒ±åç
§ã䜿çšããŸããåæ§ã«ãWeakSetã¯ããªããžã§ã¯ãã®éåãä¿æããéã«ãªããžã§ã¯ããžã®åŒ±åç
§ã䜿çšããŸãã",
"title": ""
},
{
"paragraph_id": 13,
"tag": "p",
"text": "FinalizationRegistryã¯ã匱åç
§ã䜿çšããŠããªããžã§ã¯ããGCãããéã«èªåçã«ã³ãŒã«ããã¯é¢æ°ãåŒã³åºãããšãã§ããŸããFinalizationRegistryã¯ããªããžã§ã¯ãã®ãã³ãã«ãä¿æãããªããžã§ã¯ããGCãããéã«ç»é²ãããã³ãŒã«ããã¯é¢æ°ãåŒã³åºãããšãã§ããŸããFinalizationRegistryã«ç»é²ããããªããžã§ã¯ãã¯ã匱åç
§ãšããŠä¿æãããŸããã€ãŸãããªããžã§ã¯ããä»ã®åç
§ãæã£ãŠããªãå Žåã«ã¯ãGCã«ãã£ãŠè§£æŸãããŸãã",
"title": ""
},
{
"paragraph_id": 14,
"tag": "p",
"text": "匱åç
§ã¯ãJavaScriptã®ã¡ã¢ãªç®¡çãããå¹ççã«è¡ãããã«éåžžã«æçšãªæ©èœã§ããäŸãã°ã倧éã®ãªããžã§ã¯ãã管çããå Žåã«ã¯ã匱åç
§ã䜿çšããŠããªããžã§ã¯ããå¹ççã«è§£æŸããããšãã§ããŸãããŸããFinalizationRegistryã䜿çšããããšã§ããªããžã§ã¯ãã解æŸãããéã«å¿
èŠãªåŸåŠçãå®è¡ããããšãã§ããŸãã",
"title": ""
},
{
"paragraph_id": 15,
"tag": "p",
"text": "ãããã®ããããã£ãšã¡ãœããã䜿çšããŠãFinalizationRegistryãªããžã§ã¯ãã䜿çšããããšãã§ããŸãã",
"title": ""
},
{
"paragraph_id": 16,
"tag": "p",
"text": "",
"title": ""
},
{
"paragraph_id": 17,
"tag": "p",
"text": "以äžã¯JavaScriptã®FinalizationRegistryã«é¢ããããŒãã·ãŒãã§ããåããããã£ãšã¡ãœããã«ã€ããŠãç°¡åãªèª¬æãšäŸãå«ãŸããŠããŸãã",
"title": ""
},
{
"paragraph_id": 18,
"tag": "p",
"text": "泚æ: FinalizationRegistryã¯ECMAScript 2021ã§å°å
¥ãããŸãããçŸåšããã¹ãŠã®ãã©ãŠã¶ã§ãµããŒããããŠããããã§ã¯ãããŸããã詳现ã«ã€ããŠã¯ããã©ãŠã¶ã®ããã¥ã¡ã³ãã確èªããŠãã ããã",
"title": ""
}
] | JavaScriptã®FinalizationRegistryã¯ããªããžã§ã¯ãã®ã¬ããŒãžã³ã¬ã¯ã·ã§ã³åŸã«å®è¡ãããã³ãŒã«ããã¯é¢æ°ãèšå®ããããã®æ©èœãæäŸããã¯ã©ã¹ã§ãããã®æ©èœã䜿çšããããšã§ãã¡ã¢ãªãªãŒã¯ãåé¿ãããã解æŸåŸã«åŸåŠçãè¡ã£ããããããšãã§ããŸããæ¬ãã¥ãŒããªã¢ã«ã§ã¯ãFinalizationRegistryã®åºæ¬çãªäœ¿ãæ¹ã泚æç¹ã«ã€ããŠåŠã³ãå®éã®ããã°ã©ã ã§ã®æŽ»çšæ¹æ³ã玹ä»ããŸããææ°çã®JavaScriptç°å¢ã䜿ã£ãŠããããšãåæã«ãå
·äœçãªã³ãŒãäŸã亀ããŠè§£èª¬ããŠãããŸãã JavaScriptã®FinalizationRegistryã¯ããªããžã§ã¯ããã¬ããŒãžã³ã¬ã¯ã¿ïŒGCïŒã«ãã£ãŠè§£æŸãããéã«ãé¢æ°ãåŒã³åºãæ©èœãæäŸããã¯ã©ã¹ã§ããJavaScriptã§ã¯ããªããžã§ã¯ããäžèŠã«ãªã£ãå Žåãã¬ããŒãžã³ã¬ã¯ã¿ã«ãã£ãŠèªåçã«è§£æŸãããŸãããããããã®è§£æŸã¿ã€ãã³ã°ã¯ä¿èšŒãããŠããŸããã FinalizationRegistryã¯ããã®è§£æŸã¿ã€ãã³ã°ããã现ããå¶åŸ¡ã§ããããã«ããããã«ãJavaScriptã«å°å
¥ãããŸãããäŸãã°ããªããžã§ã¯ãã解æŸããããšãã«ããŒã¿ããŒã¹ãããã®ãªããžã§ã¯ãã«é¢é£ããæ
å ±ãåé€ãããããªå Žåã«ãFinalizationRegistryã䜿çšããããšãã§ããŸãã FinalizationRegistryã¯ããªããžã§ã¯ãã®ãã³ãã«ãä¿æãããªããžã§ã¯ããGCãããéã«ç»é²ãããã³ãŒã«ããã¯é¢æ°ãåŒã³åºãããšãã§ããŸããFinalizationRegistryã«ç»é²ããããªããžã§ã¯ãã¯ã匱åç
§ãšããŠä¿æãããŸããã€ãŸãããªããžã§ã¯ããä»ã®åç
§ãæã£ãŠããªãå Žåã«ã¯ãGCã«ãã£ãŠè§£æŸãããŸãã FinalizationRegistryã¯ãJavaScriptã®ã¬ããŒãžã³ã¬ã¯ã¿ãšå¯æ¥ã«é¢é£ããŠããŸããã¬ããŒãžã³ã¬ã¯ã¿ã¯ãåç
§ãããŠããªããªããžã§ã¯ãã解æŸããããšã§ã¡ã¢ãªã解æŸããŸãã FinalizationRegistryã¯ããªããžã§ã¯ããGCãããéã«ã³ãŒã«ããã¯é¢æ°ãåŒã³åºãããããªããžã§ã¯ãã®è§£æŸã¿ã€ãã³ã°ãã³ã³ãããŒã«ããããšãã§ããŸãã FinalizationRegistryã¯ã以äžã®ãããªç¶æ³ã§åœ¹ç«ã¡ãŸãã ãªããžã§ã¯ãã®è§£æŸæã«å¿
èŠãªåŸåŠçãå®è¡ããå¿
èŠãããå Žåã
倧éã®ãªããžã§ã¯ãã管çããå Žåãã¡ã¢ãªãå¹ççã«ç®¡çããããã«ãªããžã§ã¯ãã解æŸããå¿
èŠãããå Žåã FinalizationRegistryã䜿çšããã«ã¯ããŸãFinalizationRegistryã³ã³ã¹ãã©ã¯ã¿ã䜿çšããŠæ°ããFinalizationRegistryãªããžã§ã¯ããäœæããŸãã次ã«ããªããžã§ã¯ããç»é²ããã«ã¯ãFinalizationRegistryã®registerã¡ãœããã䜿çšããŸããregisterã¡ãœããã¯ãç»é²ããããªããžã§ã¯ãã«å¯Ÿããã³ãŒã«ããã¯é¢æ°ãåŒã³åºãããã®ãã³ãã©ãŒé¢æ°ãç»é²ããŸãããããŠããªããžã§ã¯ãã解æŸããããšãç»é²ãããã³ãŒã«ããã¯é¢æ°ãèªåçã«åŒã³åºãããŸãã 以äžã¯ãFinalizationRegistryã®ç°¡åãªäŸã§ãã ãã®äŸã§ã¯ãFinalizationRegistryã«ç»é²ãããã³ãŒã«ããã¯é¢æ°ãããªããžã§ã¯ãã解æŸããããšãã«èªåçã«åŒã³åºãããŠããŸãã FinalizationRegistryã䜿çšããããšã§ãJavaScriptã¢ããªã±ãŒã·ã§ã³ã®ã¡ã¢ãªç®¡çãããæ£ç¢ºã«å¶åŸ¡ããããšãã§ããŸããããããFinalizationRegistryã«ãã管çã«ã¯ãªãŒããŒããããçºçãããããé©åãªã¿ã€ãã³ã°ã§äœ¿çšããå¿
èŠããããŸãã | {{Nav}}
JavaScriptã®FinalizationRegistryã¯ããªããžã§ã¯ãã®ã¬ããŒãžã³ã¬ã¯ã·ã§ã³åŸã«å®è¡ãããã³ãŒã«ããã¯é¢æ°ãèšå®ããããã®æ©èœãæäŸããã¯ã©ã¹ã§ãããã®æ©èœã䜿çšããããšã§ãã¡ã¢ãªãªãŒã¯ãåé¿ãããã解æŸåŸã«åŸåŠçãè¡ã£ããããããšãã§ããŸããæ¬ãã¥ãŒããªã¢ã«ã§ã¯ãFinalizationRegistryã®åºæ¬çãªäœ¿ãæ¹ã泚æç¹ã«ã€ããŠåŠã³ãå®éã®ããã°ã©ã ã§ã®æŽ»çšæ¹æ³ã玹ä»ããŸããææ°çã®JavaScriptç°å¢ã䜿ã£ãŠããããšãåæã«ãå
·äœçãªã³ãŒãäŸã亀ããŠè§£èª¬ããŠãããŸãã
__TOC__
JavaScriptã®FinalizationRegistryã¯ããªããžã§ã¯ããã¬ããŒãžã³ã¬ã¯ã¿ïŒGCïŒã«ãã£ãŠè§£æŸãããéã«ãé¢æ°ãåŒã³åºãæ©èœãæäŸããã¯ã©ã¹ã§ããJavaScriptã§ã¯ããªããžã§ã¯ããäžèŠã«ãªã£ãå Žåãã¬ããŒãžã³ã¬ã¯ã¿ã«ãã£ãŠèªåçã«è§£æŸãããŸãããããããã®è§£æŸã¿ã€ãã³ã°ã¯ä¿èšŒãããŠããŸããã
FinalizationRegistryã¯ããã®è§£æŸã¿ã€ãã³ã°ããã现ããå¶åŸ¡ã§ããããã«ããããã«ãJavaScriptã«å°å
¥ãããŸãããäŸãã°ããªããžã§ã¯ãã解æŸããããšãã«ããŒã¿ããŒã¹ãããã®ãªããžã§ã¯ãã«é¢é£ããæ
å ±ãåé€ãããããªå Žåã«ãFinalizationRegistryã䜿çšããããšãã§ããŸãã
FinalizationRegistryã¯ããªããžã§ã¯ãã®ãã³ãã«ãä¿æãããªããžã§ã¯ããGCãããéã«ç»é²ãããã³ãŒã«ããã¯é¢æ°ãåŒã³åºãããšãã§ããŸããFinalizationRegistryã«ç»é²ããããªããžã§ã¯ãã¯ã匱åç
§ãšããŠä¿æãããŸããã€ãŸãããªããžã§ã¯ããä»ã®åç
§ãæã£ãŠããªãå Žåã«ã¯ãGCã«ãã£ãŠè§£æŸãããŸãã
FinalizationRegistryã¯ãJavaScriptã®ã¬ããŒãžã³ã¬ã¯ã¿ãšå¯æ¥ã«é¢é£ããŠããŸããã¬ããŒãžã³ã¬ã¯ã¿ã¯ãåç
§ãããŠããªããªããžã§ã¯ãã解æŸããããšã§ã¡ã¢ãªã解æŸããŸãã
FinalizationRegistryã¯ããªããžã§ã¯ããGCãããéã«ã³ãŒã«ããã¯é¢æ°ãåŒã³åºãããããªããžã§ã¯ãã®è§£æŸã¿ã€ãã³ã°ãã³ã³ãããŒã«ããããšãã§ããŸãã
FinalizationRegistryã¯ã以äžã®ãããªç¶æ³ã§åœ¹ç«ã¡ãŸãã
* ãªããžã§ã¯ãã®è§£æŸæã«å¿
èŠãªåŸåŠçãå®è¡ããå¿
èŠãããå Žåã
* 倧éã®ãªããžã§ã¯ãã管çããå Žåãã¡ã¢ãªãå¹ççã«ç®¡çããããã«ãªããžã§ã¯ãã解æŸããå¿
èŠãããå Žåã
FinalizationRegistryã䜿çšããã«ã¯ããŸãFinalizationRegistryã³ã³ã¹ãã©ã¯ã¿ã䜿çšããŠæ°ããFinalizationRegistryãªããžã§ã¯ããäœæããŸãã次ã«ããªããžã§ã¯ããç»é²ããã«ã¯ãFinalizationRegistryã®register()ã¡ãœããã䜿çšããŸããregister()ã¡ãœããã¯ãç»é²ããããªããžã§ã¯ãã«å¯Ÿããã³ãŒã«ããã¯é¢æ°ãåŒã³åºãããã®ãã³ãã©ãŒé¢æ°ãç»é²ããŸãããããŠããªããžã§ã¯ãã解æŸããããšãç»é²ãããã³ãŒã«ããã¯é¢æ°ãèªåçã«åŒã³åºãããŸãã
以äžã¯ãFinalizationRegistryã®ç°¡åãªäŸã§ãã
:<syntaxhighlight lang=js>
const registry = new FinalizationRegistry((heldValue) => {
console.log(`Object ${heldValue} has been released`);
});
let obj = { name: 'John' };
registry.register(obj, obj.name);
obj = null; // objãnullã«èšå®ããŠããªããžã§ã¯ãã解æŸãã
// ã³ã³ãœãŒã«ã«ã¯ãObject John has been releasedããšè¡šç€ºãããŸãã
</syntaxhighlight>
ãã®äŸã§ã¯ãFinalizationRegistryã«ç»é²ãããã³ãŒã«ããã¯é¢æ°ãããªããžã§ã¯ãã解æŸããããšãã«èªåçã«åŒã³åºãããŠããŸãã
FinalizationRegistryã䜿çšããããšã§ãJavaScriptã¢ããªã±ãŒã·ã§ã³ã®ã¡ã¢ãªç®¡çãããæ£ç¢ºã«å¶åŸ¡ããããšãã§ããŸããããããFinalizationRegistryã«ãã管çã«ã¯ãªãŒããŒããããçºçãããããé©åãªã¿ã€ãã³ã°ã§äœ¿çšããå¿
èŠããããŸãã
=== 匱åç
§ ===
JavaScriptã®åŒ±åç
§ã¯ããªããžã§ã¯ããžã®åç
§ãä¿æãã€ã€ããã®ãªããžã§ã¯ããGCã®å¯Ÿè±¡ãšãªã£ãéã«ã匷å¶çã«è§£æŸããããšãã§ããåç
§ã®ããšã§ãã匱åç
§ã¯ããªããžã§ã¯ããžã®åç
§ãä¿æããããšã«ãã£ãŠããªããžã§ã¯ããGCã®å¯Ÿè±¡ã«ãªããªãããã«ããŸãããããããªããžã§ã¯ãã«ä»ã«åç
§ããªããªã£ãå Žåã匱åç
§ã¯ãªããžã§ã¯ããèªåçã«è§£æŸããããšãã§ããŸãã
JavaScriptã«ããã匱åç
§ã¯ãWeakMapãWeakSetãFinalizationRegistryãšãã£ãæ©èœã§å©çšãããŸãããããã®æ©èœã¯ããªããžã§ã¯ãã®åç
§ãä¿æãã€ã€ããªããžã§ã¯ããGCãããéã«èªåçã«è§£æŸããããšãã§ããŸããäŸãã°ãWeakMapã¯ããªããžã§ã¯ããããŒãšããŠä¿æããããŒã«å¯Ÿããå€ãåç
§ããéã«ãªããžã§ã¯ããžã®åŒ±åç
§ã䜿çšããŸããåæ§ã«ãWeakSetã¯ããªããžã§ã¯ãã®éåãä¿æããéã«ãªããžã§ã¯ããžã®åŒ±åç
§ã䜿çšããŸãã
FinalizationRegistryã¯ã匱åç
§ã䜿çšããŠããªããžã§ã¯ããGCãããéã«èªåçã«ã³ãŒã«ããã¯é¢æ°ãåŒã³åºãããšãã§ããŸããFinalizationRegistryã¯ããªããžã§ã¯ãã®ãã³ãã«ãä¿æãããªããžã§ã¯ããGCãããéã«ç»é²ãããã³ãŒã«ããã¯é¢æ°ãåŒã³åºãããšãã§ããŸããFinalizationRegistryã«ç»é²ããããªããžã§ã¯ãã¯ã匱åç
§ãšããŠä¿æãããŸããã€ãŸãããªããžã§ã¯ããä»ã®åç
§ãæã£ãŠããªãå Žåã«ã¯ãGCã«ãã£ãŠè§£æŸãããŸãã
匱åç
§ã¯ãJavaScriptã®ã¡ã¢ãªç®¡çãããå¹ççã«è¡ãããã«éåžžã«æçšãªæ©èœã§ããäŸãã°ã倧éã®ãªããžã§ã¯ãã管çããå Žåã«ã¯ã匱åç
§ã䜿çšããŠããªããžã§ã¯ããå¹ççã«è§£æŸããããšãã§ããŸãããŸããFinalizationRegistryã䜿çšããããšã§ããªããžã§ã¯ãã解æŸãããéã«å¿
èŠãªåŸåŠçãå®è¡ããããšãã§ããŸãã
=== ãããã㣠===
<!-- * [[{{PAGENAME}}/prototype|prototype]] -->
* <code>FinalizationRegistry.prototype</code>ïŒFinalizationRegistryãªããžã§ã¯ãã®ãããã¿ã€ããè¡šããŸãã
* <code>FinalizationRegistry.prototype.constructor</code>ïŒFinalizationRegistryãªããžã§ã¯ãã®ã³ã³ã¹ãã©ã¯ã¿é¢æ°ãè¡šããŸãã
* <code>FinalizationRegistry.prototype[Symbol.toStringTag]</code>ïŒFinalizationRegistryãªããžã§ã¯ãã®ããã©ã«ãã®æååè¡šçŸãè¡šããŸãã
=== ã¡ãœãã ===
* <code>FinalizationRegistry.prototype.register(target, heldValue, unregisterToken)</code>ïŒFinalizationRegistryã«ãªããžã§ã¯ããç»é²ããŸãããªããžã§ã¯ããã¬ããŒãžã³ã¬ã¯ã·ã§ã³ããããšãã«å®è¡ãããã³ãŒã«ããã¯é¢æ°ãã<code>unregisterToken</code>ãšããããŒã¯ã³ãšãšãã«è¿ãããŸãã
* <code>FinalizationRegistry.prototype.unregister(unregisterToken)</code>ïŒ<code>register</code>ã¡ãœããã§è¿ãããããŒã¯ã³ã䜿çšããŠãFinalizationRegistryãããªããžã§ã¯ããåé€ããŸãã
* <code>FinalizationRegistry.prototype.cleanupSome(callback)</code>ïŒFinalizationRegistryã®ç»é²ããããªããžã§ã¯ãããããŸã çåããŠãããã®ã®ãã¡ãäžéšã ããã¯ãªãŒã³ã¢ããããŸãã<code>callback</code>é¢æ°ã¯ãã¯ãªãŒã³ã¢ããããããªããžã§ã¯ãã®æ°ãåŒæ°ã«åããŸãã
* <code>FinalizationRegistry.prototype.cleanupScheduled()</code>: ååã® <code>cleanupSome()</code> ã¡ãœããåŒã³åºã以éã«ç»é²ããããªããžã§ã¯ãããããŸã çåããŠãããã®ã®ãã¡ãäžéšã ããã¯ãªãŒã³ã¢ããããŸãã
ãããã®ããããã£ãšã¡ãœããã䜿çšããŠãFinalizationRegistryãªããžã§ã¯ãã䜿çšããããšãã§ããŸãã
=== ããŒãã·ãŒã ===
以äžã¯JavaScriptã®FinalizationRegistryã«é¢ããããŒãã·ãŒãã§ããåããããã£ãšã¡ãœããã«ã€ããŠãç°¡åãªèª¬æãšäŸãå«ãŸããŠããŸãã
:<syntaxhighlight lang=js>
// FinalizationRegistryã®ã€ã³ã¹ã¿ã³ã¹ãäœæãã
const registry = new FinalizationRegistry((heldValue) => {
// heldValueãGCããããšãã«åŒã³åºãããã³ãŒã«ããã¯é¢æ°
console.log(`heldValue ${heldValue} has been garbage collected`);
});
// FinalizationRegistryã«ãªããžã§ã¯ããç»é²ãã
const obj = {name: 'John'};
registry.register(obj, 'some value');
// 'some value'ãheldValueãšããŠã³ãŒã«ããã¯é¢æ°ã«æž¡ããã
// FinalizationRegistryããç»é²ã解é€ãã
registry.unregister(obj);
// FinalizationRegistryã«ç»é²ãããŠãããã¹ãŠã®ãªããžã§ã¯ãã匷å¶çã«è§£æŸãã
registry.cleanupSome();
// FinalizationRegistryã«ç»é²ãããŠãããã¹ãŠã®ãªããžã§ã¯ãã解æŸãã
registry.cleanupNow();
</syntaxhighlight>
泚æ: FinalizationRegistryã¯ECMAScript 2021ã§å°å
¥ãããŸãããçŸåšããã¹ãŠã®ãã©ãŠã¶ã§ãµããŒããããŠããããã§ã¯ãããŸããã詳现ã«ã€ããŠã¯ããã©ãŠã¶ã®ããã¥ã¡ã³ãã確èªããŠãã ããã
=== çšèªé ===
# FinalizationRegistry: ãªããžã§ã¯ããGCãããéã«ãã³ãŒã«ããã¯é¢æ°ãåŒã³åºãããšãã§ããã¯ã©ã¹ã§ãã
# register(target, heldValue): FinalizationRegistryã«ãªããžã§ã¯ããç»é²ããŸããç»é²ãããªããžã§ã¯ãã¯targetãheldValueã¯ç»é²ããããªããžã§ã¯ããGCãããéã«ãã³ãŒã«ããã¯é¢æ°ã«æž¡ãããå€ã§ãã
# unregister(target): FinalizationRegistryãããªããžã§ã¯ããç»é²è§£é€ããŸãã
# cleanupSome(): FinalizationRegistryã«ç»é²ãããŠããäžéšã®ãªããžã§ã¯ãã匷å¶çã«è§£æŸããŸãã
# cleanupNow(): FinalizationRegistryã«ç»é²ãããŠãããã¹ãŠã®ãªããžã§ã¯ãã匷å¶çã«è§£æŸããŸãã
# heldValue: FinalizationRegistryã«ç»é²ãããªããžã§ã¯ããGCãããéã«ãã³ãŒã«ããã¯é¢æ°ã«æž¡ãããå€ã§ããregister()ã¡ãœããã®ç¬¬2åŒæ°ãšããŠæž¡ãããŸãã
# target: FinalizationRegistryã«ç»é²ãããªããžã§ã¯ãã§ããregister()ã¡ãœããã®ç¬¬1åŒæ°ãšããŠæž¡ãããŸãã
# ã³ãŒã«ããã¯é¢æ°: FinalizationRegistryã«ç»é²ããããªããžã§ã¯ããGCãããéã«ãåŒã³åºãããé¢æ°ã§ããFinalizationRegistryã®ã³ã³ã¹ãã©ã¯ã¿ã§æå®ããŸããåŒã³åºãããéã«ã¯ãheldValueãåŒæ°ãšããŠæž¡ãããŸãã
== èèš» ==
<references />
[[Category:JavaScript|{{SUBPAGENAME}}]] | 2023-04-17T05:01:31Z | 2023-04-17T05:01:31Z | [
"ãã³ãã¬ãŒã:Nav"
] | https://ja.wikibooks.org/wiki/JavaScript/FinalizationRegistry |
37,572 | JavaScript/Symbol | Symbolã¯ãECMAScript 6(ES6)ã§å°å
¥ãããæ°ããããŒã¿åã§ãããããªããã£ãåã®äžçš®ã§ãã Symbolã¯ããŠããŒã¯ãªèå¥åãçæããããã«äœ¿çšãããŸãã åŸæ¥ã®JavaScriptã®æååãæ°å€ãšã¯ç°ãªããSymbolã¯ä»ã®ã©ã®å€ãšãç°ãªãããšãä¿èšŒãããŠããŸãã Symbolã¯ããªããžã§ã¯ãã®ããããã£åãšããŠäœ¿çšãããããšãå€ããES6ã§å°å
¥ãããæ°ããæ©èœã§ãããããã·ãå埩åãªã©ã§ã䜿çšãããŠããŸãã ãã®ãã¥ãŒããªã¢ã«ã§ã¯ãSymbolã®åºæ¬çãªäœ¿ãæ¹ãäœææ¹æ³ãããããã£ãã¡ãœãããããã³å®çšçãªäŸã«ã€ããŠè§£èª¬ããŸãã
Symbolã¯ãããªããã£ãããŒã¿åã®äžã€ã§ãããäžæã®èå¥åãäœæããããã«äœ¿çšãããŸããSymbolã¯ãæååãšã¯ç°ãªããå€ãäžæã§ãããããç°ãªãå Žæã§åãSymbolã䜿çšããããšãã§ããŸããSymbolã¯ãéåžžãªããžã§ã¯ãã®ããããã£åãšããŠäœ¿çšãããä»ã®ããããã£åãšæ··åãããããšããªãããã«ããããã«äœ¿çšãããŸãã
Symbolãäœæããã«ã¯ãã°ããŒãã«ãªSymbol()é¢æ°ãåŒã³åºããŸããåŒæ°ãæž¡ãããšãã§ããŸãããåŒæ°ã¯èª¬æçãªç®çã§ã®ã¿äœ¿çšãããSymbolã®äžææ§ã«ã¯åœ±é¿ãäžããŸããã
Symbolã«ã¯ã次ã®ãããªããããã£ããããŸãã
Symbolã«ã¯ã次ã®ãããªã¡ãœããããããŸãã
Symbolã¯ããªããžã§ã¯ãã®ããããã£åãšããŠäœ¿çšãããããšãå€ãã以äžã®ãããªäŸããããŸãã
ãŸããã°ããŒãã«ã·ã³ãã«ã¬ãžã¹ããªã䜿çšããŠãã¢ããªã±ãŒã·ã§ã³å
šäœã§äžæã®ã·ã³ãã«ãå
±æããããšãã§ããŸããäŸãã°ã以äžã®ããã«ããŠãã·ã³ãã«ãå
±æããããšãã§ããŸãã
Well-known symbolsã¯ãJavaScriptã«ãããŠæšæºçã«å®çŸ©ãããã·ã³ãã«ã§ãç¹å®ã®åäœãããããã«äœ¿çšãããŸãã
以äžã¯ãWell-known symbolsã®äžèŠ§è¡šã§ãã
ãããã®ã·ã³ãã«ã¯ãJavaScriptã®æšæºçãªåäœãã«ã¹ã¿ãã€ãºããããèªåã§å®çŸ©ãããªããžã§ã¯ãã«ç¹å®ã®æ©èœãè¿œå ããããã«äœ¿çšãããŸãã
以äžã¯ãJavaScriptã®Symbolã«é¢ããããŒãã·ãŒãã§ãã
äžèšã®ã³ãŒãã§ã¯ã以äžã®å
容ãå«ãã§ããŸãã
ãã®ããŒãã·ãŒãã¯ãSymbolã®åºæ¬çãªäœ¿ãæ¹ãããããã£ãã¡ãœãããå®çšçãªäŸã網çŸ
ããŠããŸãã ãããã®æ
å ±ãåèã«ãSymbolã䜿ã£ãéçºãã¹ã ãŒãºã«é²ããŠããããšãã§ããã§ãããã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "Symbolã¯ãECMAScript 6(ES6)ã§å°å
¥ãããæ°ããããŒã¿åã§ãããããªããã£ãåã®äžçš®ã§ãã Symbolã¯ããŠããŒã¯ãªèå¥åãçæããããã«äœ¿çšãããŸãã åŸæ¥ã®JavaScriptã®æååãæ°å€ãšã¯ç°ãªããSymbolã¯ä»ã®ã©ã®å€ãšãç°ãªãããšãä¿èšŒãããŠããŸãã Symbolã¯ããªããžã§ã¯ãã®ããããã£åãšããŠäœ¿çšãããããšãå€ããES6ã§å°å
¥ãããæ°ããæ©èœã§ãããããã·ãå埩åãªã©ã§ã䜿çšãããŠããŸãã ãã®ãã¥ãŒããªã¢ã«ã§ã¯ãSymbolã®åºæ¬çãªäœ¿ãæ¹ãäœææ¹æ³ãããããã£ãã¡ãœãããããã³å®çšçãªäŸã«ã€ããŠè§£èª¬ããŸãã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "Symbolã¯ãããªããã£ãããŒã¿åã®äžã€ã§ãããäžæã®èå¥åãäœæããããã«äœ¿çšãããŸããSymbolã¯ãæååãšã¯ç°ãªããå€ãäžæã§ãããããç°ãªãå Žæã§åãSymbolã䜿çšããããšãã§ããŸããSymbolã¯ãéåžžãªããžã§ã¯ãã®ããããã£åãšããŠäœ¿çšãããä»ã®ããããã£åãšæ··åãããããšããªãããã«ããããã«äœ¿çšãããŸãã",
"title": "Symbolã®åºæ¬çãªäœ¿ãæ¹"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "Symbolãäœæããã«ã¯ãã°ããŒãã«ãªSymbol()é¢æ°ãåŒã³åºããŸããåŒæ°ãæž¡ãããšãã§ããŸãããåŒæ°ã¯èª¬æçãªç®çã§ã®ã¿äœ¿çšãããSymbolã®äžææ§ã«ã¯åœ±é¿ãäžããŸããã",
"title": "äœææ¹æ³"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "Symbolã«ã¯ã次ã®ãããªããããã£ããããŸãã",
"title": "ããããã£"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "Symbolã«ã¯ã次ã®ãããªã¡ãœããããããŸãã",
"title": "ã¡ãœãã"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "Symbolã¯ããªããžã§ã¯ãã®ããããã£åãšããŠäœ¿çšãããããšãå€ãã以äžã®ãããªäŸããããŸãã",
"title": "å®çšçãªäŸ"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "ãŸããã°ããŒãã«ã·ã³ãã«ã¬ãžã¹ããªã䜿çšããŠãã¢ããªã±ãŒã·ã§ã³å
šäœã§äžæã®ã·ã³ãã«ãå
±æããããšãã§ããŸããäŸãã°ã以äžã®ããã«ããŠãã·ã³ãã«ãå
±æããããšãã§ããŸãã",
"title": "å®çšçãªäŸ"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "Well-known symbolsã¯ãJavaScriptã«ãããŠæšæºçã«å®çŸ©ãããã·ã³ãã«ã§ãç¹å®ã®åäœãããããã«äœ¿çšãããŸãã",
"title": "Well-known symbols"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "以äžã¯ãWell-known symbolsã®äžèŠ§è¡šã§ãã",
"title": "Well-known symbols"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "ãããã®ã·ã³ãã«ã¯ãJavaScriptã®æšæºçãªåäœãã«ã¹ã¿ãã€ãºããããèªåã§å®çŸ©ãããªããžã§ã¯ãã«ç¹å®ã®æ©èœãè¿œå ããããã«äœ¿çšãããŸãã",
"title": "Well-known symbols"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "以äžã¯ãJavaScriptã®Symbolã«é¢ããããŒãã·ãŒãã§ãã",
"title": "éé²"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "äžèšã®ã³ãŒãã§ã¯ã以äžã®å
容ãå«ãã§ããŸãã",
"title": "éé²"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "ãã®ããŒãã·ãŒãã¯ãSymbolã®åºæ¬çãªäœ¿ãæ¹ãããããã£ãã¡ãœãããå®çšçãªäŸã網çŸ
ããŠããŸãã ãããã®æ
å ±ãåèã«ãSymbolã䜿ã£ãéçºãã¹ã ãŒãºã«é²ããŠããããšãã§ããã§ãããã",
"title": "éé²"
}
] | Symbolã¯ãECMAScript 6ïŒES6ïŒã§å°å
¥ãããæ°ããããŒã¿åã§ãããããªããã£ãåã®äžçš®ã§ãã
Symbolã¯ããŠããŒã¯ãªèå¥åãçæããããã«äœ¿çšãããŸãã
åŸæ¥ã®JavaScriptã®æååãæ°å€ãšã¯ç°ãªããSymbolã¯ä»ã®ã©ã®å€ãšãç°ãªãããšãä¿èšŒãããŠããŸãã
Symbolã¯ããªããžã§ã¯ãã®ããããã£åãšããŠäœ¿çšãããããšãå€ããES6ã§å°å
¥ãããæ°ããæ©èœã§ãããããã·ãå埩åãªã©ã§ã䜿çšãããŠããŸãã
ãã®ãã¥ãŒããªã¢ã«ã§ã¯ãSymbolã®åºæ¬çãªäœ¿ãæ¹ãäœææ¹æ³ãããããã£ãã¡ãœãããããã³å®çšçãªäŸã«ã€ããŠè§£èª¬ããŸãã | {{Nav}}
Symbolã¯ãECMAScript 6ïŒES6ïŒã§å°å
¥ãããæ°ããããŒã¿åã§ãããããªããã£ãåã®äžçš®ã§ã<ref>[https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol Symbol - JavaScriptïœMDN]</ref>ã
Symbolã¯ããŠããŒã¯ãªèå¥åãçæããããã«äœ¿çšãããŸãã
åŸæ¥ã®JavaScriptã®æååãæ°å€ãšã¯ç°ãªããSymbolã¯ä»ã®ã©ã®å€ãšãç°ãªãããšãä¿èšŒãããŠããŸãã
Symbolã¯ããªããžã§ã¯ãã®ããããã£åãšããŠäœ¿çšãããããšãå€ããES6ã§å°å
¥ãããæ°ããæ©èœã§ãããããã·ãå埩åãªã©ã§ã䜿çšãããŠããŸãã
ãã®ãã¥ãŒããªã¢ã«ã§ã¯ãSymbolã®åºæ¬çãªäœ¿ãæ¹ãäœææ¹æ³ãããããã£ãã¡ãœãããããã³å®çšçãªäŸã«ã€ããŠè§£èª¬ããŸãã
__TOC__
== Symbolã®åºæ¬çãªäœ¿ãæ¹ ==
Symbolã¯ãããªããã£ãããŒã¿åã®äžã€ã§ãããäžæã®èå¥åãäœæããããã«äœ¿çšãããŸããSymbolã¯ãæååãšã¯ç°ãªããå€ãäžæã§ãããããç°ãªãå Žæã§åãSymbolã䜿çšããããšãã§ããŸããSymbolã¯ãéåžžãªããžã§ã¯ãã®ããããã£åãšããŠäœ¿çšãããä»ã®ããããã£åãšæ··åãããããšããªãããã«ããããã«äœ¿çšãããŸãã
== äœææ¹æ³ ==
Symbolãäœæããã«ã¯ãã°ããŒãã«ãªSymbol()é¢æ°ãåŒã³åºããŸããåŒæ°ãæž¡ãããšãã§ããŸãããåŒæ°ã¯èª¬æçãªç®çã§ã®ã¿äœ¿çšãããSymbolã®äžææ§ã«ã¯åœ±é¿ãäžããŸããã
:<syntaxhighlight lang=js>
const sym1 = Symbol();
const sym2 = Symbol('description');
</syntaxhighlight>
== ãããã㣠==
Symbolã«ã¯ã次ã®ãããªããããã£ããããŸãã
* Symbol.iterator: ãªããžã§ã¯ãã®ããã©ã«ãã®ã€ãã¬ãŒã¿ãŒé¢æ°ãå®çŸ©ããããã«äœ¿çšãããŸãã
* Symbol.toStringTag: ãªããžã§ã¯ãã®æååè¡šçŸã«äœ¿çšãããã·ã³ãã«ã§ãã
* Symbol.species: 掟çãªããžã§ã¯ããäœæããéã«ããã®å
ãšãªããªããžã§ã¯ãã®ã³ã³ã¹ãã©ã¯ã¿ãåç
§ããããã«äœ¿çšãããŸãã
== ã¡ãœãã ==
Symbolã«ã¯ã次ã®ãããªã¡ãœããããããŸãã
* Symbol.for(key): ã°ããŒãã«ã·ã³ãã«ã¬ãžã¹ããªãããæå®ãããããŒã«å¯Ÿå¿ããSymbolãè¿ããŸããååšããªãå Žåã¯æ°ããSymbolãäœæããŸãã
* Symbol.keyFor(sym): ã°ããŒãã«ã·ã³ãã«ã¬ãžã¹ããªãããæå®ãããSymbolã«å¯Ÿå¿ããããŒãè¿ããŸããååšããªãå Žåã¯undefinedãè¿ããŸãã
== å®çšçãªäŸ ==
Symbolã¯ããªããžã§ã¯ãã®ããããã£åãšããŠäœ¿çšãããããšãå€ãã以äžã®ãããªäŸããããŸãã
:<syntaxhighlight lang=js>
const MY_KEY = Symbol();
const obj = {};
obj[MY_KEY] = 123;
console.log(obj[MY_KEY]); // 123
</syntaxhighlight>
ãŸããã°ããŒãã«ã·ã³ãã«ã¬ãžã¹ããªã䜿çšããŠãã¢ããªã±ãŒã·ã§ã³å
šäœã§äžæã®ã·ã³ãã«ãå
±æããããšãã§ããŸããäŸãã°ã以äžã®ããã«ããŠãã·ã³ãã«ãå
±æããããšãã§ããŸãã
:<syntaxhighlight lang=js>
// module1.js
const MY_KEY = Symbol.for('my key');
// module2.js
const MY_KEY = Symbol.for('my key');
console.log(MY_KEY === module1.MY_KEY); // true
</syntaxhighlight>
== Well-known symbols ==
Well-known symbolsã¯ãJavaScriptã«ãããŠæšæºçã«å®çŸ©ãããã·ã³ãã«ã§ãç¹å®ã®åäœãããããã«äœ¿çšãããŸãã
以äžã¯ãWell-known symbolsã®äžèŠ§è¡šã§ãã
{| class=wikitable
|+ Well-known symbol
!Well-known symbol
!説æ
|-
!Symbol.iterator
|ãªããžã§ã¯ãã«å¯Ÿããããã©ã«ãã®å埩åãå®çŸ©ããŸãã
|-
!Symbol.asyncIterator
|ãªããžã§ã¯ãã«å¯Ÿããéåæå埩åãå®çŸ©ããŸãã
|-
!Symbol.match
|æ£èŠè¡šçŸã«ãããããæååãè¿ãã¡ãœãããå®çŸ©ããŸãã
|-
!Symbol.replace
|æ£èŠè¡šçŸã«ãããããéšåã眮æããã¡ãœãããå®çŸ©ããŸãã
|-
!Symbol.search
|æ£èŠè¡šçŸã«ãããããæåã®ã€ã³ããã¯ã¹ãè¿ãã¡ãœãããå®çŸ©ããŸãã
|-
!Symbol.split
|æ£èŠè¡šçŸã«ãããããéšåã§æååãåå²ããã¡ãœãããå®çŸ©ããŸãã
|-
!Symbol.hasInstance
|ãªããžã§ã¯ããããã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ã§ãããã©ãããå€å®ããã¡ãœãããå®çŸ©ããŸãã
|-
!Symbol.isConcatSpreadable
|ãªããžã§ã¯ããArray.prototype.concat()ã®å±éæã«é
åã«å€æããããã©ãããå®çŸ©ããŸãã
|-
!Symbol.unscopables
|withæã§ã¹ã³ãŒãå€ã«ããããããã£ã®äžèŠ§ãå®çŸ©ããŸãã
|-
!Symbol.toPrimitive
|ãªããžã§ã¯ããããªããã£ãåã«å€æããã¡ãœãããå®çŸ©ããŸãã
|-
!Symbol.toStringTag
|ãªããžã§ã¯ãã®åã瀺ãæååãå®çŸ©ããŸãã
|-
!Symbol.species
|ãªããžã§ã¯ãã®ã³ã³ã¹ãã©ã¯ã¿é¢æ°ãè¿ãã¡ãœãããå®çŸ©ããŸãã
|-
!Symbol.for(key)
|ååä»ãã·ã³ãã«ãååŸããŸãã
|-
!Symbol.keyFor(sym)
|ååä»ãã·ã³ãã«ã®ããŒãååŸããŸãã
|}
ãããã®ã·ã³ãã«ã¯ãJavaScriptã®æšæºçãªåäœãã«ã¹ã¿ãã€ãºããããèªåã§å®çŸ©ãããªããžã§ã¯ãã«ç¹å®ã®æ©èœãè¿œå ããããã«äœ¿çšãããŸãã
== éé² ==
=== ããŒãã·ãŒã ===
以äžã¯ãJavaScriptã®Symbolã«é¢ããããŒãã·ãŒãã§ãã
:<syntaxhighlight lang=js>
// Symbolã®åºæ¬çãªäœ¿ãæ¹
const mySymbol = Symbol('mySymbol');
// äœææ¹æ³
const symbol1 = Symbol();
const symbol2 = Symbol('symbol2');
// ããããã£
console.log(Symbol.iterator); // Symbol(Symbol.iterator)
// ã¡ãœãã
const symbol3 = Symbol.for('symbol3');
console.log(Symbol.keyFor(symbol3)); // symbol3
// å®çšçãªäŸ
const myObj = {};
const mySymbol1 = Symbol('mySymbol1');
const mySymbol2 = Symbol('mySymbol2');
myObj[mySymbol1] = 'value1';
myObj[mySymbol2] = 'value2';
console.log(myObj[mySymbol1]); // value1
console.log(myObj[mySymbol2]); // value2
</syntaxhighlight>
äžèšã®ã³ãŒãã§ã¯ã以äžã®å
容ãå«ãã§ããŸãã
* åºæ¬çãªSymbolã®äœ¿ãæ¹
* Symbolã®äœææ¹æ³ã«é¢ããäŸ
* Symbolãªããžã§ã¯ãã®ããããã£ã®äŸïŒSymbol.iteratorïŒ
* Symbolãªããžã§ã¯ãã®ã¡ãœããã®äŸïŒSymbol.forãSymbol.keyForïŒ
* å®çšçãªäŸãšããŠãSymbolã䜿ã£ãŠãªããžã§ã¯ãã«ããããã£ãè¿œå ããäŸ
ãã®ããŒãã·ãŒãã¯ãSymbolã®åºæ¬çãªäœ¿ãæ¹ãããããã£ãã¡ãœãããå®çšçãªäŸã網çŸ
ããŠããŸãã
ãããã®æ
å ±ãåèã«ãSymbolã䜿ã£ãéçºãã¹ã ãŒãºã«é²ããŠããããšãã§ããã§ãããã
=== çšèªé ===
# Symbol: ES2015ã§å°å
¥ãããããªããã£ãåã®äžã€ã§ãäžæã®èå¥åãäœæããããã«äœ¿çšãããŸãã
# Symbol.for(key): ã°ããŒãã«ãªã·ã³ãã«ã¬ãžã¹ããªãä»ããŠãæå®ãããããŒã§ç»é²ãããæ¢åã®ã·ã³ãã«ãè¿ããŸããååšããªãå Žåã¯ãæ°ããã·ã³ãã«ãäœæããŸãã
# Symbol.keyFor(sym): ã°ããŒãã«ãªã·ã³ãã«ã¬ãžã¹ããªãããæå®ãããã·ã³ãã«ã«é¢é£ä»ããããããŒãååŸããŸããããŒãèŠã€ãããªãå Žåã¯undefinedãè¿ããŸãã
# Symbol.iterator: ãªããžã§ã¯ããfor...ofã«ãŒãã§å埩å¯èœã§ããããšã瀺ãã·ã³ãã«ã§ãã
# Well-known symbols: æ¢åã®ã·ã³ãã«ã®ãã¡ãç¹å®ã®ç®çã§äºçŽãããŠãããã®ã瀺ãçšèªã§ããäŸãã°ãSymbol.iteratorã¯Well-known symbolsã®äžã€ã§ãã
# Symbol.species: ã€ã³ã¹ã¿ã³ã¹ãäœæããããã®ãã¡ã¯ããªãŒã¡ãœãããæã€ã³ã³ã¹ãã©ã¯ã¿é¢æ°ã«ãããŠãçæããããªããžã§ã¯ãã®çš®é¡ãè¡šãã·ã³ãã«ã§ãã
# Symbol.hasInstance: ãªããžã§ã¯ããç¹å®ã®ã³ã³ã¹ãã©ã¯ã¿é¢æ°ã®ã€ã³ã¹ã¿ã³ã¹ã§ãããã©ãããå€å®ããããã«äœ¿çšãããã·ã³ãã«ã§ãã
# Symbol.toStringTag: ãªããžã§ã¯ãã®ããã©ã«ãã®æåååæã«äœ¿çšãããã¿ã°åãè¡šãã·ã³ãã«ã§ãã
# Symbol.match: æ£èŠè¡šçŸã®ãããã³ã°ãè¡ãããã®ã·ã³ãã«ã§ãã
# Symbol.toPrimitive: ãªããžã§ã¯ããããªããã£ãå€ã«å€æããããã®ã·ã³ãã«ã§ãã
# Symbol.isConcatSpreadable: é
åãconcat()ã¡ãœããã§å±éãããã©ããã瀺ãã·ã³ãã«ã§ãã
# Symbol.unscopables: withæã«ãã£ãŠã¹ã³ãŒããããªãããããã£åã®éåãè¡šãã·ã³ãã«ã§ãã
# Symbol.asyncIterator: ãªããžã§ã¯ããfor-await-ofã«ãŒãã§å埩å¯èœã§ããããšã瀺ãã·ã³ãã«ã§ãã
== èèš» ==
<references />
[[Category:JavaScript]] | 2023-04-17T05:23:29Z | 2023-04-17T05:23:29Z | [
"ãã³ãã¬ãŒã:Nav"
] | https://ja.wikibooks.org/wiki/JavaScript/Symbol |
37,575 | æ£åã¢ã©ãã¢èª/ååãæžããŠã¿ã | ã¢ã©ãã¢æåã§ååãæžããŠã¿ãŸãããã
以äžã®äŸå€ããªãå Žåã¯äºåé³è¡šãåèã«ããŠæžããŸãããã(å§âåã®é çªã«æžãããšãå€ãã§ãã)
äŸ:
ÙاجÙÙ
٠سÙزÙÙÙ(ã¹ãºã ããžã¡)
ÙارÙÙا ÙÙÙاÙ
ا(ã³ã€ã ãã«ã)
ååã»èåã®æåã®1æåç®ãã¢è¡ã®å Žåã¯äž(Ø¢ إ٠أ٠إ٠أÙ)ã䜿ããŸãã
äŸ:
Ø¢ÙÙرا Ø£ÙÙÙ(ãªã ã¢ãã©)
Ø¢Ù٠أÙت؎Ùدا(ãŠãã ã¢ã)
ååã»èåã®2æåç®ä»¥éãã¢è¡ã®å Žåã¯äž(ا Ù Ù Ù Ù)ã䜿ããŸãã
äŸ:
ÙاÙÙ٠آÙÙاÙ
ا(ã¢ãªã€ã ããªã)
ØŽÙÙر٠أÙÙÙ
اتسÙ(ãŠãšãã ã·ãªãª)
ã³ã®æ¬¡ã«ã¢è¡ãç¶ãå Žåã¯æ¶å»ããŸãã
äŸ:
ØŽÙÙÙت؎٠â ØŽÙÙت؎Ù(ã·ã³ã€ã)
äž(جا ج٠ج٠ج٠جÙ)ãšäž(غا غ٠غ٠غ٠غÙ)ã®äž¡æ¹ã䜿ããŸãã
ãã ããäžã€ã®æç« å
ã§ã¯è¡šèšãçµ±äžããããã«ããŸãããã
äŸ:
ØŽÙÙج٠أÙجاÙا(ãªã¬ã¯ ã·ã³ãŽ)
Ù
ÙغÙÙ
Ù ÙاغاÙ(ãã¬ã€ ã¡ã°ã)
äž(ص٠ط٠ضÙ)ãšäž(س٠د٠تÙ)ã®äž¡æ¹ã䜿ããŸãã
ãã ããäžã€ã®æç« å
ã§ã¯è¡šèšãçµ±äžããããã«ããŸãããã
äŸ:
Ù
اÙÙط٠صÙÙÙدا(ãœãã ãã³ã)
Ù
ادÙÙا سÙجÙÙ
ÙتÙ(ã¹ã®ã¢ã ããã«)
çæ¹ãæ¶å»ããŸãã(æ¶å»ããªãå ŽåããããŸãã)
äŸ:
جÙتÙÙ â جÙتÙ(ãŽããŠ)
ØŽÙÙتا â ØŽÙتا(ã·ã§ãŠã¿) | [
{
"paragraph_id": 0,
"tag": "p",
"text": "ã¢ã©ãã¢æåã§ååãæžããŠã¿ãŸãããã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "以äžã®äŸå€ããªãå Žåã¯äºåé³è¡šãåèã«ããŠæžããŸãããã(å§âåã®é çªã«æžãããšãå€ãã§ãã)",
"title": "ååã®æžãæ¹"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "äŸ:",
"title": "ååã®æžãæ¹"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "ÙاجÙÙ
٠سÙزÙÙÙ(ã¹ãºã ããžã¡)",
"title": "ååã®æžãæ¹"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "ÙارÙÙا ÙÙÙاÙ
ا(ã³ã€ã ãã«ã)",
"title": "ååã®æžãæ¹"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "ååã»èåã®æåã®1æåç®ãã¢è¡ã®å Žåã¯äž(Ø¢ إ٠أ٠إ٠أÙ)ã䜿ããŸãã",
"title": "ååã®æžãæ¹"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "äŸ:",
"title": "ååã®æžãæ¹"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "Ø¢ÙÙرا Ø£ÙÙÙ(ãªã ã¢ãã©)",
"title": "ååã®æžãæ¹"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "Ø¢Ù٠أÙت؎Ùدا(ãŠãã ã¢ã)",
"title": "ååã®æžãæ¹"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "ååã»èåã®2æåç®ä»¥éãã¢è¡ã®å Žåã¯äž(ا Ù Ù Ù Ù)ã䜿ããŸãã",
"title": "ååã®æžãæ¹"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "äŸ:",
"title": "ååã®æžãæ¹"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "ÙاÙÙ٠آÙÙاÙ
ا(ã¢ãªã€ã ããªã)",
"title": "ååã®æžãæ¹"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "ØŽÙÙر٠أÙÙÙ
اتسÙ(ãŠãšãã ã·ãªãª)",
"title": "ååã®æžãæ¹"
},
{
"paragraph_id": 13,
"tag": "p",
"text": "ã³ã®æ¬¡ã«ã¢è¡ãç¶ãå Žåã¯æ¶å»ããŸãã",
"title": "ååã®æžãæ¹"
},
{
"paragraph_id": 14,
"tag": "p",
"text": "äŸ:",
"title": "ååã®æžãæ¹"
},
{
"paragraph_id": 15,
"tag": "p",
"text": "ØŽÙÙÙت؎٠â ØŽÙÙت؎Ù(ã·ã³ã€ã)",
"title": "ååã®æžãæ¹"
},
{
"paragraph_id": 16,
"tag": "p",
"text": "äž(جا ج٠ج٠ج٠جÙ)ãšäž(غا غ٠غ٠غ٠غÙ)ã®äž¡æ¹ã䜿ããŸãã",
"title": "ååã®æžãæ¹"
},
{
"paragraph_id": 17,
"tag": "p",
"text": "ãã ããäžã€ã®æç« å
ã§ã¯è¡šèšãçµ±äžããããã«ããŸãããã",
"title": "ååã®æžãæ¹"
},
{
"paragraph_id": 18,
"tag": "p",
"text": "äŸ:",
"title": "ååã®æžãæ¹"
},
{
"paragraph_id": 19,
"tag": "p",
"text": "ØŽÙÙج٠أÙجاÙا(ãªã¬ã¯ ã·ã³ãŽ)",
"title": "ååã®æžãæ¹"
},
{
"paragraph_id": 20,
"tag": "p",
"text": "Ù
ÙغÙÙ
Ù ÙاغاÙ(ãã¬ã€ ã¡ã°ã)",
"title": "ååã®æžãæ¹"
},
{
"paragraph_id": 21,
"tag": "p",
"text": "äž(ص٠ط٠ضÙ)ãšäž(س٠د٠تÙ)ã®äž¡æ¹ã䜿ããŸãã",
"title": "ååã®æžãæ¹"
},
{
"paragraph_id": 22,
"tag": "p",
"text": "ãã ããäžã€ã®æç« å
ã§ã¯è¡šèšãçµ±äžããããã«ããŸãããã",
"title": "ååã®æžãæ¹"
},
{
"paragraph_id": 23,
"tag": "p",
"text": "äŸ:",
"title": "ååã®æžãæ¹"
},
{
"paragraph_id": 24,
"tag": "p",
"text": "Ù
اÙÙط٠صÙÙÙدا(ãœãã ãã³ã)",
"title": "ååã®æžãæ¹"
},
{
"paragraph_id": 25,
"tag": "p",
"text": "Ù
ادÙÙا سÙجÙÙ
ÙتÙ(ã¹ã®ã¢ã ããã«)",
"title": "ååã®æžãæ¹"
},
{
"paragraph_id": 26,
"tag": "p",
"text": "çæ¹ãæ¶å»ããŸãã(æ¶å»ããªãå ŽåããããŸãã)",
"title": "ååã®æžãæ¹"
},
{
"paragraph_id": 27,
"tag": "p",
"text": "äŸ:",
"title": "ååã®æžãæ¹"
},
{
"paragraph_id": 28,
"tag": "p",
"text": "جÙتÙÙ â جÙتÙ(ãŽããŠ)",
"title": "ååã®æžãæ¹"
},
{
"paragraph_id": 29,
"tag": "p",
"text": "ØŽÙÙتا â ØŽÙتا(ã·ã§ãŠã¿)",
"title": "ååã®æžãæ¹"
}
] | ã¢ã©ãã¢æåã§ååãæžããŠã¿ãŸãããã | ã¢ã©ãã¢æåã§ååãæžããŠã¿ãŸãããã
{| class="wikitable"
|+ã¢ã©ãã¢æåäºåé³è¡š
!
! colspan="2" |ã¢
! colspan="2" |ã€
! colspan="2" |ãŠ
! colspan="2" |ãš
! colspan="2" |ãª
! colspan="2" |ã€
! colspan="2" |ãŠ
! colspan="2" |ãš
|-
!ã¢
|Ø¢
ا
|ã¢
|Ø¥Ù
Ù
|ã€
|Ø£Ù
Ù
|ãŠ
|Ø¥Ù
Ù
|ãš
|Ø£Ù
Ù
|ãª
|Ùا
|ã€
|ÙÙ
|ãŠ
|ÙÙ
|ãš
|-
!ã«
|Ùا
|ã«
|ÙÙ
|ã
|ÙÙ
|ã¯
|ÙÙ
|ã±
|ÙÙ
|ã³
|ÙÙا
|ãã£
|ÙÙÙ
|ãã¥
|ÙÙÙ
|ãã§
|-
!ãµ
|سا
|ãµ
|ØŽÙ
|ã·
|سÙ
|ã¹
|سÙ
|ã»
|صÙ
سÙ
|ãœ
|؎ا
|ã·ã£
|ØŽÙ
|ã·ã¥
|ØŽÙ
|ã·ã§
|-
!ã¿
|تا
|ã¿
|ت؎Ù
|ã
|تسÙ
|ã
|تÙ
|ã
|تÙ
Ø·Ù
|ã
|ت؎ا
|ãã£
|ت؎Ù
|ãã¥
|ت؎Ù
|ãã§
|-
!ã
|Ùا
|ã
|ÙÙ
|ã
|ÙÙ
|ã
|ÙÙ
|ã
|ÙÙ
|ã
|ÙÙا
|ãã£
|ÙÙÙ
|ãã¥
|ÙÙÙ
|ãã§
|-
!ã
|Ùا
|ã
|ÙÙ
|ã
|ÙÙ
|ã
|ÙÙ
|ã
|ÙÙ
|ã
|ÙÙا
|ãã£
|ÙÙÙ
|ãã¥
|ÙÙÙ
|ãã§
|-
!ã
|Ù
ا
|ã
|Ù
Ù
|ã
|Ù
Ù
|ã
|Ù
Ù
|ã¡
|Ù
Ù
|ã¢
|Ù
Ùا
|ãã£
|Ù
ÙÙ
|ãã¥
|Ù
ÙÙ
|ãã§
|-
!ã©
|را
|ã©
|رÙ
|ãª
|رÙ
|ã«
|رÙ
|ã¬
|رÙ
|ã
|رÙا
|ãªã£
|رÙÙ
|ãªã¥
|رÙÙ
|ãªã§
|-
!ã¯
|Ùا
|ã¯
|ÙÙ
|ãŠã£
| colspan="2" rowspan="2" |
|ÙÙ
|ãŠã§
| colspan="2" rowspan="2" |
| colspan="2" rowspan="2" |
| colspan="2" rowspan="2" |
| colspan="2" rowspan="2" |
|-
!ã³
|Ù
|ã³
| colspan="2" |
| colspan="2" |
|-
!ã¬
|جا
غا
|ã¬
|جÙ
غÙ
|ã®
|جÙ
غÙ
|ã°
|جÙ
غÙ
|ã²
|جÙ
غÙ
|ãŽ
|جا
غÙا
|ã®ã£
|جÙ
غÙÙ
|ã®ã¥
|جÙ
غÙÙ
|ã®ã§
|-
!ã¶
|زا
|ã¶
| rowspan="2" |جÙ
|ãž
| rowspan="2" |زÙ
|ãº
|زÙ
|ãŒ
|زÙ
|ãŸ
| rowspan="2" |جا
|ãžã£
| rowspan="2" |جÙ
|ãžã¥
| rowspan="2" |جÙ
|ãžã§
|-
!ã
|دا
|ã
|ã
|ã
|دÙ
|ã
|ضÙ
دÙ
|ã
|ãã£
|ãã¥
|ãã§
|-
!ã
| rowspan="2" |ؚا
|ã
| rowspan="2" |ØšÙ
|ã
| rowspan="2" |ØšÙ
|ã
| rowspan="2" |ØšÙ
|ã
| rowspan="2" |ØšÙ
|ã
| rowspan="2" |ØšÙا
|ãã£
| rowspan="2" |ØšÙÙ
|ãã¥
| rowspan="2" |ØšÙÙ
|ãã§
|-
!ã
|ã
|ã
|ã
|ã
|ã
|ãã£
|ãã¥
|ãã§
|}
== ååã®æžãæ¹ ==
以äžã®äŸå€ããªãå Žåã¯äºåé³è¡šãåèã«ããŠæžããŸããããïŒ'''å§âå'''ã®é çªã«æžãããšãå€ãã§ããïŒ
äŸïŒ
<span lang="ar" dir="rtl">ÙاجÙÙ
٠سÙزÙÙÙ</span>ïŒã¹ãºããããžã¡ïŒ
<span lang="ar" dir="rtl">ÙارÙÙا ÙÙÙاÙ
ا</span>ïŒã³ã€ãããã«ãïŒ
=== ã¢è¡ãå«ãŸããåå ===
ååã»èåã®æåã®1æåç®ãã¢è¡ã®å Žåã¯äžïŒ<span lang="ar" dir="rtl">Ø¢</span> <span lang="ar" dir="rtl">Ø¥Ù</span> <span lang="ar" dir="rtl">Ø£Ù</span> <span lang="ar" dir="rtl">Ø¥Ù</span> <span lang="ar" dir="rtl">Ø£Ù</span>ïŒã䜿ããŸãã
äŸïŒ
<span lang="ar" dir="rtl">Ø¢ÙÙرا Ø£ÙÙÙ</span>ïŒ'''ãª'''ãã'''ã¢'''ãã©ïŒ
<span lang="ar" dir="rtl">Ø¢Ù٠أÙت؎Ùدا</span>ïŒ'''ãŠ'''ããã'''ã¢'''ãïŒ
ååã»èåã®2æåç®ä»¥éãã¢è¡ã®å Žåã¯äžïŒ<span lang="ar" dir="rtl">ا</span> <span lang="ar" dir="rtl">Ù</span> <span lang="ar" dir="rtl">Ù</span> <span lang="ar" dir="rtl">Ù</span> <span lang="ar" dir="rtl">Ù</span>ïŒã䜿ããŸãã
äŸïŒ
<span lang="ar" dir="rtl">ÙاÙÙ٠آÙÙاÙ
ا</span>ïŒã¢'''ãª'''ã€ããã'''ãª'''ãïŒ
<span lang="ar" dir="rtl">ØŽÙÙر٠أÙÙÙ
اتسÙ</span>ïŒãŠ'''ãš'''ãããã·'''ãª'''ãªïŒ
ã³ã®æ¬¡ã«ã¢è¡ãç¶ãå Žåã¯æ¶å»ããããšããããŸãã
äŸïŒ
<span lang="ar" dir="rtl">ØŽÙÙÙت؎Ù</span>ãâã<span lang="ar" dir="rtl">ØŽÙÙت؎Ù</span>ïŒã·'''ã³ã€'''ãïŒ
=== ã¬è¡ãå«ãŸããåå ===
äžïŒ<span lang="ar" dir="rtl">جا</span> <span lang="ar" dir="rtl">جÙ</span> <span lang="ar" dir="rtl">جÙ</span> <span lang="ar" dir="rtl">جÙ</span> <span lang="ar" dir="rtl">جÙ</span>ïŒãšäžïŒ<span lang="ar" dir="rtl">غا</span> <span lang="ar" dir="rtl">غÙ</span> <span lang="ar" dir="rtl">غÙ</span> <span lang="ar" dir="rtl">غÙ</span> <span lang="ar" dir="rtl">غÙ</span>ïŒã®äž¡æ¹ã䜿ããŸãã
ãã ããäžã€ã®æç« å
ã§ã¯è¡šèšãçµ±äžããããã«ããŸãããã
äŸïŒ
<span lang="ar" dir="rtl">ØŽÙÙج٠أÙجاÙا</span>ïŒãª'''ã¬'''ã¯ãã·ã³'''ãŽ'''ïŒ
<span lang="ar" dir="rtl">Ù
ÙغÙÙ
Ù ÙاغاÙ</span>ïŒã'''ã¬'''ã€ãã¡'''ã°'''ãïŒ
=== ãœã»ãã»ããå«ãŸããåå ===
äžïŒ<span lang="ar" dir="rtl">صÙ</span> <span lang="ar" dir="rtl">Ø·Ù</span> <span lang="ar" dir="rtl">ضÙ</span>ïŒãšäžïŒ<span lang="ar" dir="rtl">سÙ</span> <span lang="ar" dir="rtl">دÙ</span> <span lang="ar" dir="rtl">تÙ</span>ïŒã®äž¡æ¹ã䜿ããŸãã
ãã ããäžã€ã®æç« å
ã§ã¯è¡šèšãçµ±äžããããã«ããŸãããã
äŸïŒ
<span lang="ar" dir="rtl">Ù
اÙÙط٠صÙÙÙدا</span>ïŒ'''ãœ'''ããããã³'''ã'''ïŒ
<span lang="ar" dir="rtl">Ù
ادÙÙا سÙجÙÙ
ÙتÙ</span>ïŒã¹ã®ã¢'''ã'''ãã'''ã'''ã«ïŒ
=== åãæåãç¶ããå Žå ===
çæ¹ãæ¶å»ããŸããïŒæ¶å»ããªãå ŽåããããŸããïŒ
äŸïŒ
<span lang="ar" dir="rtl">جÙتÙÙ</span>ãâã<span lang="ar" dir="rtl">جÙتÙ</span>ïŒãŽ'''ããŠ'''ïŒ
<span lang="ar" dir="rtl">ØŽÙÙتا</span>ãâã<span lang="ar" dir="rtl">ØŽÙتا</span>ïŒ'''ã·ã§ãŠ'''ã¿ïŒ
[[ã«ããŽãª:ã¢ã©ãã¢èª]] | 2023-04-17T13:45:26Z | 2023-10-05T13:02:00Z | [] | https://ja.wikibooks.org/wiki/%E6%AD%A3%E5%89%87%E3%82%A2%E3%83%A9%E3%83%93%E3%82%A2%E8%AA%9E/%E5%90%8D%E5%89%8D%E3%82%92%E6%9B%B8%E3%81%84%E3%81%A6%E3%81%BF%E3%82%8B |
37,579 | JavaScript/ã³ãŒãã®ã£ã©ãªãŒ | ãã®æ¬ã«ã¯ãJavaScriptã®åºç€çãªææ³ãæ§æã ãã§ãªããå®éã®ã¢ããªã±ãŒã·ã§ã³ãWebããŒãžãäœãäžã§å¿
èŠãªæ©èœãã©ã€ãã©ãªã«ã€ããŠã詳ãã解説ããŠããŸããããããæ¬æžã§æ±ã£ãå
容ã ãã§ã¢ããªã±ãŒã·ã§ã³ãäœãããšã¯ã§ãããå®éã®éçºçŸå Žã§ã¯ããé«åºŠãªæ©èœãå¿
èŠã«ãªãããšããããŸãã
ããã§ãæ¬æžã§åŠãã åºç€çãªç¥èãå
ã«ãå®éã«äœ¿ããå¿çšäŸã玹ä»ãããã³ãŒãã®ã£ã©ãªãŒããçšæããŸããããã®ã³ãŒãã®ã£ã©ãªãŒã§ã¯ãå®éã®ã¢ããªã±ãŒã·ã§ã³ãWebããŒãžã§äœ¿çšããããããªæ©èœãå®çŸããããã®ã³ãŒããå€æ°æ²èŒããŠããŸãã
ãã®ã³ãŒãã®ã£ã©ãªãŒãéããŠãJavaScriptã®å¿çšçãªç¥èãéçºæè¡ã身ã«ã€ããããå®è·µçãªéçºã«ææŠããŠããã ããã°å¹žãã§ãã
ãã®ã³ãŒãã¯ããšã©ãã¹ããã¹ã®ç¯©ãçšããŠãæå®ãããç¯å²å
ã®çŽ æ°ãå
šãŠåºåããJavaScriptã®é¢æ°ã§ãã
é¢æ°æ¬äœã§ã¯ããŸãæå®ãããäžéå€+1ã®é·ããæã€Booleanåã®é
åsieveãäœæããå
šãŠã®èŠçŽ ãtrueã«åæåããŠããŸãããã®åŸãæåã®2ã€ã®èŠçŽ 0ãš1ã¯çŽ æ°ã§ã¯ãªããããfalseã«èšå®ããŠããŸãã
sieveé
åã®èŠçŽ ãé çªã«èª¿ã¹ãŠããforã«ãŒãã®äžã§ã¯ãããsieve[i]ãfalseã§ããã°ããã®æ°ã¯ãã§ã«çŽ æ°ã§ã¯ãªãããã次ã®ã«ãŒãã«ç§»ããŸããããã§ãªããã°ãçŽ æ°ã§ããããšã確å®ãããããããã®æ°ãåºåããŠããŸãããããŠããã®çŽ æ°ã®åæ°ã§ããsieve[j]ã®èŠçŽ ãfalseã«èšå®ããŠããããšã§ã篩ã«ãããçµæãçŽ æ°ã§ã¯ãªãæ°ãé€å€ããŠãããŸãã
æåŸã«ããã®é¢æ°ãå®è¡ããããã®ãµã³ãã«ãšããŠãeratosthenes(100)ãåŒã³åºããŠããŸããããã«ããã1ãã100ãŸã§ã®çŽ æ°ãå
šãŠåºåãããŸãã
ãšã©ãã¹ããã¹ã®ç¯©ã§ã¯ãããŸããããçŽ æŽã«çŽ æ°ãæ±ããã¢ã«ãŽãªãºã ã§ãã
ãã®JavaScriptã³ãŒãã¯ã2ãã999ãŸã§ã®ç¯å²ã§çŽ æ°ãèŠã€ãããã®çµæãprimesãšããé
åã«æ ŒçŽããæçµçã«ã³ã³ãœãŒã«ã«è¡šç€ºããŠããŸãã以äžã«ã³ãŒãã®åéšåã®èª¬æãèšèŒããŸãã
ãã®ã³ãŒãã¯ããšã©ãã¹ããã¹ã®ç¯©ãªã©ã®ã¢ã«ãŽãªãºã ã䜿çšããã«ãåçŽã«çŽ æ°ãèŠã€ããæ¹æ³ã®äžäŸã§ãã
ãã®JavaScriptã³ãŒãã¯ãäžããããæŽæ°ã®æ倧å
¬çŽæ°ãšæå°å
¬åæ°ãæ±ããããã®é¢æ°ãå®çŸ©ããŠããŸãããŸãããããã®é¢æ°ããã¹ãããããã®main()é¢æ°ãå®çŸ©ããŠããŸãã
ãŸããgcd2()é¢æ°ã¯ã2ã€ã®æŽæ°ãåŒæ°ã«åããååž°çã«æ倧å
¬çŽæ°ãæ±ããé¢æ°ã§ããJSDocã³ã¡ã³ãã§ãåŒæ°mãšnãæŽæ°ã§ããããšãæå®ããæ»ãå€ãšããŠæŽæ°1ãšæŽæ°2ã®æ倧å
¬çŽæ°ãè¿ãããšãæèšããŠããŸãã
次ã«ãgcd()é¢æ°ã¯ãå¯å€é·åŒæ°ãåãåããreduce()ã¡ãœããã䜿ã£ãŠè€æ°ã®æŽæ°ã®æ倧å
¬çŽæ°ãæ±ããé¢æ°ã§ããJSDocã³ã¡ã³ãã§ãå¯å€é·åŒæ°...intsãæ倧å
¬çŽæ°ãæ±ããæŽæ°é
åã§ããããšãæå®ããæ»ãå€ãšããŠäžããããæŽæ°é
åã®æ倧å
¬çŽæ°ãè¿ãããšãæèšããŠããŸãã
次ã«ãlcm2()é¢æ°ã¯ã2ã€ã®æŽæ°ãåŒæ°ã«åããæå°å
¬åæ°ãæ±ããé¢æ°ã§ããJSDocã³ã¡ã³ãã§ãåŒæ°mãšnãæŽæ°ã§ããããšãæå®ããæ»ãå€ãšããŠæŽæ°1ãšæŽæ°2ã®æå°å
¬åæ°ãè¿ãããšãæèšããŠããŸãã
æåŸã«ãlcm()é¢æ°ã¯ãå¯å€é·åŒæ°ãåãåããreduce()ã¡ãœããã䜿ã£ãŠè€æ°ã®æŽæ°ã®æå°å
¬åæ°ãæ±ããé¢æ°ã§ããJSDocã³ã¡ã³ãã§ãå¯å€é·åŒæ°...intsãæå°å
¬åæ°ãæ±ããæŽæ°é
åã§ããããšãæå®ããæ»ãå€ãšããŠäžããããæŽæ°é
åã®æå°å
¬åæ°ãè¿ãããšãæèšããŠããŸãã
æåŸã«ãmain()é¢æ°ã¯ãããããã®é¢æ°ãåŒã³åºããŠãã¹ãããããã®ãã®ã§ãã
äºåæ³
ãã®ã³ãŒãã¯ã2åæ³ã«ãã£ãŠæ°å€è§£ãæ±ããé¢æ° bisection ãšããã®ãã¹ãçšã®é¢æ° main ãããªããŸãã
bisection é¢æ°ã¯ãäžéå€ low_ãäžéå€ high_ãæ°å€è§£ãæ±ãã察象ãšãªãé¢æ° f ãåŒæ°ã«åããæ¹çšåŒã®æ°å€è§£ãæ±ããé¢æ°ã§ããJSDocã³ã¡ã³ãã«ãããåŒæ°ãšæ»ãå€ã®åãåã³é¢æ°ã®èª¬æãèšè¿°ãããŠããŸããé¢æ°å
éšã§ã¯ã2åæ³ã«ããæ°å€è§£ãæ±ããŸãããŸããäžéå€ãšäžéå€ã®å¹³åå€ã x ãšããŸããx ãåŒæ°ãšããŠé¢æ° f ãåŒã³åºãããã®æ»ãå€ã fx ãšããŸããfx ãæå®ãã粟床 +1.0e-10 以äžã«ãªã£ãå Žåãx ãæ°å€è§£ãšããŠè¿ããŸããããã§ãªãå Žåãfx ã 0 ããå°ãããã° x ãäžéå€ãšããããã§ãªããã° x ãäžéå€ãšããŸãããããŠãååž°çã« bisection é¢æ°ãåŒã³åºããŸãã
main é¢æ°ã¯ã bisection é¢æ°ããã¹ãããããã®é¢æ°ã§ã2ã€ã®æ¹çšåŒãåŒæ°ã« bisection é¢æ°ãåŒã³åºããçµæãã³ã³ãœãŒã«ã«åºåããŸãã
ãã®ã³ãŒãã§ã¯ãES6 ã® letããã³ãã¬ãŒããªãã©ã«ãã¢ããŒé¢æ°ã䜿ãããŠããŸãããŸããJSDocã³ã¡ã³ãã«ãããé¢æ°ã®èª¬æãæ瀺çã«ãªã£ãŠããŸãã
ãã®ã³ãŒãã¯ãJavaScript㧠Hello ã¯ã©ã¹ãå®çŸ©ãããã®ã¯ã©ã¹ã䜿ã£ãŠãã¹ããè¡ãããã®ã³ãŒãã§ããHello ã¯ã©ã¹ã¯ãæšæ¶æãæ±ãã¯ã©ã¹ã§ãããæšæ¶æã«å«ããæååãåŒæ°ãšããŠåãåããŸããåŒæ°ãçç¥ãããå Žåãããã©ã«ã㧠"world" ãšããæååãå«ããŸãã
Hello ã¯ã©ã¹ã«ã¯ãtoString() ã¡ãœãããš print() ã¡ãœããããããŸããtoString() ã¡ãœããã¯ã"Hello [æšæ¶æã«å«ããæåå]!" ãšããæååãè¿ããprint() ã¡ãœããã¯ãæšæ¶æã«å«ããæååãã³ã³ãœãŒã«ã«åºåããŸãã
ãŸããmain() é¢æ°ãå®çŸ©ãããã®é¢æ°ãåŒã³åºãããšã§ãHello ã¯ã©ã¹ã䜿ã£ãŠæšæ¶æãäœæããŠã³ã³ãœãŒã«ã«åºåãããã¹ããè¡ãããšãã§ããŸããmain() é¢æ°ã®äžã§ã¯ãHello ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ã2ã€äœæããããããã® toString() ã¡ãœãããš print() ã¡ãœãããåŒã³åºããŠããŸãããŸããHello ã¯ã©ã¹ã® constructor.name ããããã£ãã³ã³ãœãŒã«ã«åºåããŠãã¯ã©ã¹åãååŸã§ããããšã確èªããŠããŸãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "ãã®æ¬ã«ã¯ãJavaScriptã®åºç€çãªææ³ãæ§æã ãã§ãªããå®éã®ã¢ããªã±ãŒã·ã§ã³ãWebããŒãžãäœãäžã§å¿
èŠãªæ©èœãã©ã€ãã©ãªã«ã€ããŠã詳ãã解説ããŠããŸããããããæ¬æžã§æ±ã£ãå
容ã ãã§ã¢ããªã±ãŒã·ã§ã³ãäœãããšã¯ã§ãããå®éã®éçºçŸå Žã§ã¯ããé«åºŠãªæ©èœãå¿
èŠã«ãªãããšããããŸãã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ããã§ãæ¬æžã§åŠãã åºç€çãªç¥èãå
ã«ãå®éã«äœ¿ããå¿çšäŸã玹ä»ãããã³ãŒãã®ã£ã©ãªãŒããçšæããŸããããã®ã³ãŒãã®ã£ã©ãªãŒã§ã¯ãå®éã®ã¢ããªã±ãŒã·ã§ã³ãWebããŒãžã§äœ¿çšããããããªæ©èœãå®çŸããããã®ã³ãŒããå€æ°æ²èŒããŠããŸãã",
"title": ""
},
{
"paragraph_id": 2,
"tag": "p",
"text": "ãã®ã³ãŒãã®ã£ã©ãªãŒãéããŠãJavaScriptã®å¿çšçãªç¥èãéçºæè¡ã身ã«ã€ããããå®è·µçãªéçºã«ææŠããŠããã ããã°å¹žãã§ãã",
"title": ""
},
{
"paragraph_id": 3,
"tag": "p",
"text": "ãã®ã³ãŒãã¯ããšã©ãã¹ããã¹ã®ç¯©ãçšããŠãæå®ãããç¯å²å
ã®çŽ æ°ãå
šãŠåºåããJavaScriptã®é¢æ°ã§ãã",
"title": "ãšã©ãã¹ããã¹ã®ç¯©"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "é¢æ°æ¬äœã§ã¯ããŸãæå®ãããäžéå€+1ã®é·ããæã€Booleanåã®é
åsieveãäœæããå
šãŠã®èŠçŽ ãtrueã«åæåããŠããŸãããã®åŸãæåã®2ã€ã®èŠçŽ 0ãš1ã¯çŽ æ°ã§ã¯ãªããããfalseã«èšå®ããŠããŸãã",
"title": "ãšã©ãã¹ããã¹ã®ç¯©"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "sieveé
åã®èŠçŽ ãé çªã«èª¿ã¹ãŠããforã«ãŒãã®äžã§ã¯ãããsieve[i]ãfalseã§ããã°ããã®æ°ã¯ãã§ã«çŽ æ°ã§ã¯ãªãããã次ã®ã«ãŒãã«ç§»ããŸããããã§ãªããã°ãçŽ æ°ã§ããããšã確å®ãããããããã®æ°ãåºåããŠããŸãããããŠããã®çŽ æ°ã®åæ°ã§ããsieve[j]ã®èŠçŽ ãfalseã«èšå®ããŠããããšã§ã篩ã«ãããçµæãçŽ æ°ã§ã¯ãªãæ°ãé€å€ããŠãããŸãã",
"title": "ãšã©ãã¹ããã¹ã®ç¯©"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "æåŸã«ããã®é¢æ°ãå®è¡ããããã®ãµã³ãã«ãšããŠãeratosthenes(100)ãåŒã³åºããŠããŸããããã«ããã1ãã100ãŸã§ã®çŽ æ°ãå
šãŠåºåãããŸãã",
"title": "ãšã©ãã¹ããã¹ã®ç¯©"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "ãšã©ãã¹ããã¹ã®ç¯©ã§ã¯ãããŸããããçŽ æŽã«çŽ æ°ãæ±ããã¢ã«ãŽãªãºã ã§ãã",
"title": "ãšã©ãã¹ããã¹ã®ç¯©"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "ãã®JavaScriptã³ãŒãã¯ã2ãã999ãŸã§ã®ç¯å²ã§çŽ æ°ãèŠã€ãããã®çµæãprimesãšããé
åã«æ ŒçŽããæçµçã«ã³ã³ãœãŒã«ã«è¡šç€ºããŠããŸãã以äžã«ã³ãŒãã®åéšåã®èª¬æãèšèŒããŸãã",
"title": "ãšã©ãã¹ããã¹ã®ç¯©"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "ãã®ã³ãŒãã¯ããšã©ãã¹ããã¹ã®ç¯©ãªã©ã®ã¢ã«ãŽãªãºã ã䜿çšããã«ãåçŽã«çŽ æ°ãèŠã€ããæ¹æ³ã®äžäŸã§ãã",
"title": "ãšã©ãã¹ããã¹ã®ç¯©"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "ãã®JavaScriptã³ãŒãã¯ãäžããããæŽæ°ã®æ倧å
¬çŽæ°ãšæå°å
¬åæ°ãæ±ããããã®é¢æ°ãå®çŸ©ããŠããŸãããŸãããããã®é¢æ°ããã¹ãããããã®main()é¢æ°ãå®çŸ©ããŠããŸãã",
"title": "æ倧å
¬çŽæ°ãšæå°å
¬åæ°"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "ãŸããgcd2()é¢æ°ã¯ã2ã€ã®æŽæ°ãåŒæ°ã«åããååž°çã«æ倧å
¬çŽæ°ãæ±ããé¢æ°ã§ããJSDocã³ã¡ã³ãã§ãåŒæ°mãšnãæŽæ°ã§ããããšãæå®ããæ»ãå€ãšããŠæŽæ°1ãšæŽæ°2ã®æ倧å
¬çŽæ°ãè¿ãããšãæèšããŠããŸãã",
"title": "æ倧å
¬çŽæ°ãšæå°å
¬åæ°"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "次ã«ãgcd()é¢æ°ã¯ãå¯å€é·åŒæ°ãåãåããreduce()ã¡ãœããã䜿ã£ãŠè€æ°ã®æŽæ°ã®æ倧å
¬çŽæ°ãæ±ããé¢æ°ã§ããJSDocã³ã¡ã³ãã§ãå¯å€é·åŒæ°...intsãæ倧å
¬çŽæ°ãæ±ããæŽæ°é
åã§ããããšãæå®ããæ»ãå€ãšããŠäžããããæŽæ°é
åã®æ倧å
¬çŽæ°ãè¿ãããšãæèšããŠããŸãã",
"title": "æ倧å
¬çŽæ°ãšæå°å
¬åæ°"
},
{
"paragraph_id": 13,
"tag": "p",
"text": "次ã«ãlcm2()é¢æ°ã¯ã2ã€ã®æŽæ°ãåŒæ°ã«åããæå°å
¬åæ°ãæ±ããé¢æ°ã§ããJSDocã³ã¡ã³ãã§ãåŒæ°mãšnãæŽæ°ã§ããããšãæå®ããæ»ãå€ãšããŠæŽæ°1ãšæŽæ°2ã®æå°å
¬åæ°ãè¿ãããšãæèšããŠããŸãã",
"title": "æ倧å
¬çŽæ°ãšæå°å
¬åæ°"
},
{
"paragraph_id": 14,
"tag": "p",
"text": "æåŸã«ãlcm()é¢æ°ã¯ãå¯å€é·åŒæ°ãåãåããreduce()ã¡ãœããã䜿ã£ãŠè€æ°ã®æŽæ°ã®æå°å
¬åæ°ãæ±ããé¢æ°ã§ããJSDocã³ã¡ã³ãã§ãå¯å€é·åŒæ°...intsãæå°å
¬åæ°ãæ±ããæŽæ°é
åã§ããããšãæå®ããæ»ãå€ãšããŠäžããããæŽæ°é
åã®æå°å
¬åæ°ãè¿ãããšãæèšããŠããŸãã",
"title": "æ倧å
¬çŽæ°ãšæå°å
¬åæ°"
},
{
"paragraph_id": 15,
"tag": "p",
"text": "æåŸã«ãmain()é¢æ°ã¯ãããããã®é¢æ°ãåŒã³åºããŠãã¹ãããããã®ãã®ã§ãã",
"title": "æ倧å
¬çŽæ°ãšæå°å
¬åæ°"
},
{
"paragraph_id": 16,
"tag": "p",
"text": "äºåæ³",
"title": "äºåæ³"
},
{
"paragraph_id": 17,
"tag": "p",
"text": "ãã®ã³ãŒãã¯ã2åæ³ã«ãã£ãŠæ°å€è§£ãæ±ããé¢æ° bisection ãšããã®ãã¹ãçšã®é¢æ° main ãããªããŸãã",
"title": "äºåæ³"
},
{
"paragraph_id": 18,
"tag": "p",
"text": "bisection é¢æ°ã¯ãäžéå€ low_ãäžéå€ high_ãæ°å€è§£ãæ±ãã察象ãšãªãé¢æ° f ãåŒæ°ã«åããæ¹çšåŒã®æ°å€è§£ãæ±ããé¢æ°ã§ããJSDocã³ã¡ã³ãã«ãããåŒæ°ãšæ»ãå€ã®åãåã³é¢æ°ã®èª¬æãèšè¿°ãããŠããŸããé¢æ°å
éšã§ã¯ã2åæ³ã«ããæ°å€è§£ãæ±ããŸãããŸããäžéå€ãšäžéå€ã®å¹³åå€ã x ãšããŸããx ãåŒæ°ãšããŠé¢æ° f ãåŒã³åºãããã®æ»ãå€ã fx ãšããŸããfx ãæå®ãã粟床 +1.0e-10 以äžã«ãªã£ãå Žåãx ãæ°å€è§£ãšããŠè¿ããŸããããã§ãªãå Žåãfx ã 0 ããå°ãããã° x ãäžéå€ãšããããã§ãªããã° x ãäžéå€ãšããŸãããããŠãååž°çã« bisection é¢æ°ãåŒã³åºããŸãã",
"title": "äºåæ³"
},
{
"paragraph_id": 19,
"tag": "p",
"text": "main é¢æ°ã¯ã bisection é¢æ°ããã¹ãããããã®é¢æ°ã§ã2ã€ã®æ¹çšåŒãåŒæ°ã« bisection é¢æ°ãåŒã³åºããçµæãã³ã³ãœãŒã«ã«åºåããŸãã",
"title": "äºåæ³"
},
{
"paragraph_id": 20,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãES6 ã® letããã³ãã¬ãŒããªãã©ã«ãã¢ããŒé¢æ°ã䜿ãããŠããŸãããŸããJSDocã³ã¡ã³ãã«ãããé¢æ°ã®èª¬æãæ瀺çã«ãªã£ãŠããŸãã",
"title": "äºåæ³"
},
{
"paragraph_id": 21,
"tag": "p",
"text": "ãã®ã³ãŒãã¯ãJavaScript㧠Hello ã¯ã©ã¹ãå®çŸ©ãããã®ã¯ã©ã¹ã䜿ã£ãŠãã¹ããè¡ãããã®ã³ãŒãã§ããHello ã¯ã©ã¹ã¯ãæšæ¶æãæ±ãã¯ã©ã¹ã§ãããæšæ¶æã«å«ããæååãåŒæ°ãšããŠåãåããŸããåŒæ°ãçç¥ãããå Žåãããã©ã«ã㧠\"world\" ãšããæååãå«ããŸãã",
"title": "ã¯ã©ã¹å®çŸ©ãšã€ã³ã¹ã¿ã³ã¹åãšã¡ã³ããŒé¢æ°"
},
{
"paragraph_id": 22,
"tag": "p",
"text": "Hello ã¯ã©ã¹ã«ã¯ãtoString() ã¡ãœãããš print() ã¡ãœããããããŸããtoString() ã¡ãœããã¯ã\"Hello [æšæ¶æã«å«ããæåå]!\" ãšããæååãè¿ããprint() ã¡ãœããã¯ãæšæ¶æã«å«ããæååãã³ã³ãœãŒã«ã«åºåããŸãã",
"title": "ã¯ã©ã¹å®çŸ©ãšã€ã³ã¹ã¿ã³ã¹åãšã¡ã³ããŒé¢æ°"
},
{
"paragraph_id": 23,
"tag": "p",
"text": "ãŸããmain() é¢æ°ãå®çŸ©ãããã®é¢æ°ãåŒã³åºãããšã§ãHello ã¯ã©ã¹ã䜿ã£ãŠæšæ¶æãäœæããŠã³ã³ãœãŒã«ã«åºåãããã¹ããè¡ãããšãã§ããŸããmain() é¢æ°ã®äžã§ã¯ãHello ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ã2ã€äœæããããããã® toString() ã¡ãœãããš print() ã¡ãœãããåŒã³åºããŠããŸãããŸããHello ã¯ã©ã¹ã® constructor.name ããããã£ãã³ã³ãœãŒã«ã«åºåããŠãã¯ã©ã¹åãååŸã§ããããšã確èªããŠããŸãã",
"title": "ã¯ã©ã¹å®çŸ©ãšã€ã³ã¹ã¿ã³ã¹åãšã¡ã³ããŒé¢æ°"
}
] | ãã®æ¬ã«ã¯ãJavaScriptã®åºç€çãªææ³ãæ§æã ãã§ãªããå®éã®ã¢ããªã±ãŒã·ã§ã³ãWebããŒãžãäœãäžã§å¿
èŠãªæ©èœãã©ã€ãã©ãªã«ã€ããŠã詳ãã解説ããŠããŸããããããæ¬æžã§æ±ã£ãå
容ã ãã§ã¢ããªã±ãŒã·ã§ã³ãäœãããšã¯ã§ãããå®éã®éçºçŸå Žã§ã¯ããé«åºŠãªæ©èœãå¿
èŠã«ãªãããšããããŸãã ããã§ãæ¬æžã§åŠãã åºç€çãªç¥èãå
ã«ãå®éã«äœ¿ããå¿çšäŸã玹ä»ãããã³ãŒãã®ã£ã©ãªãŒããçšæããŸããããã®ã³ãŒãã®ã£ã©ãªãŒã§ã¯ãå®éã®ã¢ããªã±ãŒã·ã§ã³ãWebããŒãžã§äœ¿çšããããããªæ©èœãå®çŸããããã®ã³ãŒããå€æ°æ²èŒããŠããŸãã ãã®ã³ãŒãã®ã£ã©ãªãŒãéããŠãJavaScriptã®å¿çšçãªç¥èãéçºæè¡ã身ã«ã€ããããå®è·µçãªéçºã«ææŠããŠããã ããã°å¹žãã§ãã | {{Nav}}
ãã®æ¬ã«ã¯ãJavaScriptã®åºç€çãªææ³ãæ§æã ãã§ãªããå®éã®ã¢ããªã±ãŒã·ã§ã³ãWebããŒãžãäœãäžã§å¿
èŠãªæ©èœãã©ã€ãã©ãªã«ã€ããŠã詳ãã解説ããŠããŸããããããæ¬æžã§æ±ã£ãå
容ã ãã§ã¢ããªã±ãŒã·ã§ã³ãäœãããšã¯ã§ãããå®éã®éçºçŸå Žã§ã¯ããé«åºŠãªæ©èœãå¿
èŠã«ãªãããšããããŸãã
ããã§ãæ¬æžã§åŠãã åºç€çãªç¥èãå
ã«ãå®éã«äœ¿ããå¿çšäŸã玹ä»ãããã³ãŒãã®ã£ã©ãªãŒããçšæããŸããããã®ã³ãŒãã®ã£ã©ãªãŒã§ã¯ãå®éã®ã¢ããªã±ãŒã·ã§ã³ãWebããŒãžã§äœ¿çšããããããªæ©èœãå®çŸããããã®ã³ãŒããå€æ°æ²èŒããŠããŸãã
ãã®ã³ãŒãã®ã£ã©ãªãŒãéããŠãJavaScriptã®å¿çšçãªç¥èãéçºæè¡ã身ã«ã€ããããå®è·µçãªéçºã«ææŠããŠããã ããã°å¹žãã§ãã
== ãšã©ãã¹ããã¹ã®ç¯© ==
:<syntaxhighlight lang=js>
/**
* ãšã©ãã¹ããã¹ã®ç¯©ãçšããŠãn以äžã®çŽ æ°ãå
šãŠåºåããé¢æ°
* @param {number} n çŽ æ°ãæ¢ãç¯å²ã®äžéå€
* @returns {void}
*/
function eratosthenes(n) {
const sieve = new Array(n + 1).fill(true);
sieve[0] = false;
sieve[1] = false;
for (let i = 2; i < sieve.length; i++) {
if (!sieve[i]) {
continue;
}
console.log(i);
for (let j = i * 2; j < sieve.length; j += i) {
sieve[j] = false;
}
}
}
// Example usage
eratosthenes(100);
</syntaxhighlight>
ãã®ã³ãŒãã¯ããšã©ãã¹ããã¹ã®ç¯©ãçšããŠãæå®ãããç¯å²å
ã®çŽ æ°ãå
šãŠåºåããJavaScriptã®é¢æ°ã§ãã
é¢æ°æ¬äœã§ã¯ããŸãæå®ãããäžéå€+1ã®é·ããæã€Booleanåã®é
å<code>sieve</code>ãäœæããå
šãŠã®èŠçŽ ã<code>true</code>ã«åæåããŠããŸãããã®åŸãæåã®2ã€ã®èŠçŽ <code>0</code>ãš<code>1</code>ã¯çŽ æ°ã§ã¯ãªãããã<code>false</code>ã«èšå®ããŠããŸãã
<code>sieve</code>é
åã®èŠçŽ ãé çªã«èª¿ã¹ãŠãã<code>for</code>ã«ãŒãã®äžã§ã¯ããã<code>sieve[i]</code>ã<code>false</code>ã§ããã°ããã®æ°ã¯ãã§ã«çŽ æ°ã§ã¯ãªãããã次ã®ã«ãŒãã«ç§»ããŸããããã§ãªããã°ãçŽ æ°ã§ããããšã確å®ãããããããã®æ°ãåºåããŠããŸãããããŠããã®çŽ æ°ã®åæ°ã§ãã<code>sieve[j]</code>ã®èŠçŽ ã<code>false</code>ã«èšå®ããŠããããšã§ã篩ã«ãããçµæãçŽ æ°ã§ã¯ãªãæ°ãé€å€ããŠãããŸãã
æåŸã«ããã®é¢æ°ãå®è¡ããããã®ãµã³ãã«ãšããŠã<code>eratosthenes(100)</code>ãåŒã³åºããŠããŸããããã«ããã1ãã100ãŸã§ã®çŽ æ°ãå
šãŠåºåãããŸãã
=== å¥è§£ ===
ãšã©ãã¹ããã¹ã®ç¯©ã§ã¯ãããŸããããçŽ æŽã«çŽ æ°ãæ±ããã¢ã«ãŽãªãºã ã§ãã
:<syntaxhighlight lang=js>
const primes = [];
for (let i = 2; i < 1000; i++) {
if (primes.every(prime => i % prime !== 0)) {
primes.push(i);
}
}
console.log(primes)
</syntaxhighlight>
ãã®JavaScriptã³ãŒãã¯ã2ãã999ãŸã§ã®ç¯å²ã§çŽ æ°ãèŠã€ãããã®çµæã<code>primes</code>ãšããé
åã«æ ŒçŽããæçµçã«ã³ã³ãœãŒã«ã«è¡šç€ºããŠããŸãã以äžã«ã³ãŒãã®åéšåã®èª¬æãèšèŒããŸãã
# <code>const primes = [];</code>: 空ã®é
å<code>primes</code>ã宣èšããŠããŸãããã®é
åã«çŽ æ°ãä¿åãããŸãã
# <code>for (let i = 2; i < 1000; i++) {</code>: <code>i</code>ã2ããå§ãã999ãŸã§1ãã€å¢å ãããã«ãŒããèšå®ããŠããŸããããã«ããã2ãã999ãŸã§ã®æ°åãé çªã«ååŸããŸãã
# <code>if (primes.every(prime => i % prime !== 0)) {</code>: <code>every</code>ã¡ãœããã䜿çšããŠã<code>primes</code>é
åå
ã®èŠçŽ ãé ã«å¯ŸããŠæ¡ä»¶ã確èªããŠããŸããæ¡ä»¶ã¯ã<code>i</code>ãé
åå
ã®ä»»æã®çŽ æ°ã§å²ãåããªãããšã§ããããªãã¡ã<code>i</code>ãçŽ æ°ã§ãããã©ããã確èªããŠããŸããå²ãåããã<code>every</code>ã¡ãœããã¯å³æã«<code>false</code>ãè¿ããŸãã<code>primes</code>ã¯å°ããçŽ æ°ããé ã«äžŠãã§ããã®ã§çŽ æ©ãå æ°ãçºèŠã§ããŸãã
# æ¡ä»¶ãçã§ããã°ã<code>primes.push(i);</code>ãå®è¡ãããŸããããã«ããã<code>primes</code>é
åã«<code>i</code>ãè¿œå ãããŸãããªããªãã<code>i</code>ãçŽ æ°ã§ãããšç¢ºèªã§ããããã§ãã
# <code>console.log(primes);</code>: æçµçã«ããã¹ãŠã®ã«ãŒããçµäºããåŸã«ã<code>primes</code>é
åãã³ã³ãœãŒã«ã«è¡šç€ºããŸããããã«ããã2ãã999ãŸã§ã®ç¯å²ã§èŠã€ãã£ãçŽ æ°ã衚瀺ãããŸãã
ãã®ã³ãŒãã¯ããšã©ãã¹ããã¹ã®ç¯©ãªã©ã®ã¢ã«ãŽãªãºã ã䜿çšããã«ãåçŽã«çŽ æ°ãèŠã€ããæ¹æ³ã®äžäŸã§ãã
== æ倧å
¬çŽæ°ãšæå°å
¬åæ° ==
:<syntaxhighlight lang=js>
/**
* 2ã€ã®æŽæ°ã®æ倧å
¬çŽæ°ãååž°çã«æ±ããé¢æ°
* @param {number} m - æŽæ°1
* @param {number} n - æŽæ°2
* @returns {number} - æŽæ°1ãšæŽæ°2ã®æ倧å
¬çŽæ°
*/
function gcd2(m, n) {
if (n === 0) {
return m;
} else {
return gcd2(n, m % n);
}
}
/**
* è€æ°ã®æŽæ°ã®æ倧å
¬çŽæ°ãæ±ããé¢æ°
* @param {...number} ints - æ倧å
¬çŽæ°ãæ±ããæŽæ°é
å
* @returns {number} - äžããããæŽæ°é
åã®æ倧å
¬çŽæ°
*/
function gcd(...ints) {
return ints.reduce((x, y) => gcd2(x, y));
}
/**
* 2ã€ã®æŽæ°ã®æå°å
¬åæ°ãæ±ããé¢æ°
* @param {number} m - æŽæ°1
* @param {number} n - æŽæ°2
* @returns {number} - æŽæ°1ãšæŽæ°2ã®æå°å
¬åæ°
*/
function lcm2(m, n) {
return m * n / gcd2(m, n);
}
/**
* è€æ°ã®æŽæ°ã®æå°å
¬åæ°ãæ±ããé¢æ°
* @param {...number} ints - æå°å
¬åæ°ãæ±ããæŽæ°é
å
* @returns {number} - äžããããæŽæ°é
åã®æå°å
¬åæ°
*/
function lcm(...ints) {
return ints.reduce((x, y) => lcm2(x, y));
}
/**
* ãã¹ãã³ãŒã
*/
function main() {
console.log(`gcd2(30, 45) => ${gcd2(30, 45)}`);
console.log(`gcd(30, 72, 12) => ${gcd(30, 72, 12)}`);
console.log(`lcm2(30, 72) => ${lcm2(30, 72)}`);
console.log(`lcm(30,42,72) => ${lcm(30,42,72)}`);
}
main();
</syntaxhighlight>
ãã®JavaScriptã³ãŒãã¯ãäžããããæŽæ°ã®æ倧å
¬çŽæ°ãšæå°å
¬åæ°ãæ±ããããã®é¢æ°ãå®çŸ©ããŠããŸãããŸãããããã®é¢æ°ããã¹ãããããã®main()é¢æ°ãå®çŸ©ããŠããŸãã
ãŸãã<code>gcd2()</code>é¢æ°ã¯ã2ã€ã®æŽæ°ãåŒæ°ã«åããååž°çã«æ倧å
¬çŽæ°ãæ±ããé¢æ°ã§ããJSDocã³ã¡ã³ãã§ãåŒæ°mãšnãæŽæ°ã§ããããšãæå®ããæ»ãå€ãšããŠæŽæ°1ãšæŽæ°2ã®æ倧å
¬çŽæ°ãè¿ãããšãæèšããŠããŸãã
次ã«ã<code>gcd()</code>é¢æ°ã¯ãå¯å€é·åŒæ°ãåãåãã<code>reduce()</code>ã¡ãœããã䜿ã£ãŠè€æ°ã®æŽæ°ã®æ倧å
¬çŽæ°ãæ±ããé¢æ°ã§ããJSDocã³ã¡ã³ãã§ãå¯å€é·åŒæ°<code>...ints</code>ãæ倧å
¬çŽæ°ãæ±ããæŽæ°é
åã§ããããšãæå®ããæ»ãå€ãšããŠäžããããæŽæ°é
åã®æ倧å
¬çŽæ°ãè¿ãããšãæèšããŠããŸãã
次ã«ã<code>lcm2()</code>é¢æ°ã¯ã2ã€ã®æŽæ°ãåŒæ°ã«åããæå°å
¬åæ°ãæ±ããé¢æ°ã§ããJSDocã³ã¡ã³ãã§ãåŒæ°mãšnãæŽæ°ã§ããããšãæå®ããæ»ãå€ãšããŠæŽæ°1ãšæŽæ°2ã®æå°å
¬åæ°ãè¿ãããšãæèšããŠããŸãã
æåŸã«ã<code>lcm()</code>é¢æ°ã¯ãå¯å€é·åŒæ°ãåãåãã<code>reduce()</code>ã¡ãœããã䜿ã£ãŠè€æ°ã®æŽæ°ã®æå°å
¬åæ°ãæ±ããé¢æ°ã§ããJSDocã³ã¡ã³ãã§ãå¯å€é·åŒæ°<code>...ints</code>ãæå°å
¬åæ°ãæ±ããæŽæ°é
åã§ããããšãæå®ããæ»ãå€ãšããŠäžããããæŽæ°é
åã®æå°å
¬åæ°ãè¿ãããšãæèšããŠããŸãã
æåŸã«ã<code>main()</code>é¢æ°ã¯ãããããã®é¢æ°ãåŒã³åºããŠãã¹ãããããã®ãã®ã§ãã
== äºåæ³ ==
[[W:äºåæ³|äºåæ³]]
:<syntaxhighlight lang=js>
/**
* 2åæ³ã«ããæ¹çšåŒã®æ°å€è§£ãæ±ããé¢æ°
* @param {number} low_ - äžéå€
* @param {number} high_ - äžéå€
* @param {(x: number) => number} f - æ°å€è§£ãæ±ãã察象ãšãªãé¢æ°
* @returns {number} æ¹çšåŒã®æ°å€è§£
*/
function bisection(low_, high_, f) {
let low = low_;
let high = high_;
let x = (low + high) / 2;
let fx = f(x);
if (Math.abs(fx) < +1.0e-10) {
return x;
}
if (fx < 0.0) {
low = x;
} else {
high = x;
}
return bisection(low, high, f);
}
/**
* ãã¹ãçšã®é¢æ°
*/
function main() {
console.log(bisection(0, 3, x => x - 1));
console.log(bisection(0, 3, x => x * x - 1));
}
</syntaxhighlight>
: [[æ§èª²çš(-2012幎床)é«çåŠæ ¡æ°åŠB/æ°å€èšç®ãšã³ã³ãã¥ãŒã¿ãŒ#2åæ³]]ã®äŸã JavaScript ã«ç§»æ€ããŸããã
ãã®ã³ãŒãã¯ã2åæ³ã«ãã£ãŠæ°å€è§£ãæ±ããé¢æ° <code>bisection</code> ãšããã®ãã¹ãçšã®é¢æ° <code>main</code> ãããªããŸãã
<code>bisection</code> é¢æ°ã¯ãäžéå€ <code>low_</code>ãäžéå€ <code>high_</code>ãæ°å€è§£ãæ±ãã察象ãšãªãé¢æ° <code>f</code> ãåŒæ°ã«åããæ¹çšåŒã®æ°å€è§£ãæ±ããé¢æ°ã§ããJSDocã³ã¡ã³ãã«ãããåŒæ°ãšæ»ãå€ã®åãåã³é¢æ°ã®èª¬æãèšè¿°ãããŠããŸããé¢æ°å
éšã§ã¯ã2åæ³ã«ããæ°å€è§£ãæ±ããŸãããŸããäžéå€ãšäžéå€ã®å¹³åå€ã <code>x</code> ãšããŸãã<code>x</code> ãåŒæ°ãšããŠé¢æ° <code>f</code> ãåŒã³åºãããã®æ»ãå€ã <code>fx</code> ãšããŸãã<code>fx</code> ãæå®ãã粟床 <code>+1.0e-10</code> 以äžã«ãªã£ãå Žåã<code>x</code> ãæ°å€è§£ãšããŠè¿ããŸããããã§ãªãå Žåã<code>fx</code> ã 0 ããå°ãããã° <code>x</code> ãäžéå€ãšããããã§ãªããã° <code>x</code> ãäžéå€ãšããŸãããããŠãååž°çã« <code>bisection</code> é¢æ°ãåŒã³åºããŸãã
<code>main</code> é¢æ°ã¯ã <code>bisection</code> é¢æ°ããã¹ãããããã®é¢æ°ã§ã2ã€ã®æ¹çšåŒãåŒæ°ã« <code>bisection</code> é¢æ°ãåŒã³åºããçµæãã³ã³ãœãŒã«ã«åºåããŸãã
ãã®ã³ãŒãã§ã¯ãES6 ã® <code>let</code>ããã³ãã¬ãŒããªãã©ã«ãã¢ããŒé¢æ°ã䜿ãããŠããŸãããŸããJSDocã³ã¡ã³ãã«ãããé¢æ°ã®èª¬æãæ瀺çã«ãªã£ãŠããŸãã
== ã¯ã©ã¹å®çŸ©ãšã€ã³ã¹ã¿ã³ã¹åãšã¡ã³ããŒé¢æ° ==
:<syntaxhighlight lang=js>
/**
* Hello ã¯ã©ã¹
* @class
* @classdesc Hello ã¯ã©ã¹ã¯ãæšæ¶æãæ±ãã¯ã©ã¹ã§ãã
* @param {string} s - æšæ¶æã«å«ããæåå (çç¥å¯èœ)
*/
class Hello {
constructor(s = "world") {
/**
* æšæ¶æã«å«ããæåå
* @type {string}
*/
this.s = s;
}
/**
* æšæ¶æãæååã§è¡šçŸããé¢æ°
* @returns {string} æšæ¶æã®æåå
*/
toString() {
return `Hello ${this.s}!`;
}
/**
* æšæ¶æãåºåããé¢æ°
* @returns {void}
*/
print() {
console.log(this.s);
}
}
/**
* ãã¹ãçšã®é¢æ°
*/
function main() {
const hello1 = new Hello();
console.log(hello1.toString());
hello1.print();
const hello2 = new Hello("my friend");
console.log(hello2.toString());
hello2.print();
console.log(
`
Hello.constructor.name => ${Hello.constructor.name}
hello1 => ${hello1}
hello2.s => ${hello2.s}
`
);
}
</syntaxhighlight>
ãã®ã³ãŒãã¯ãJavaScript㧠Hello ã¯ã©ã¹ãå®çŸ©ãããã®ã¯ã©ã¹ã䜿ã£ãŠãã¹ããè¡ãããã®ã³ãŒãã§ããHello ã¯ã©ã¹ã¯ãæšæ¶æãæ±ãã¯ã©ã¹ã§ãããæšæ¶æã«å«ããæååãåŒæ°ãšããŠåãåããŸããåŒæ°ãçç¥ãããå Žåãããã©ã«ã㧠"world" ãšããæååãå«ããŸãã
Hello ã¯ã©ã¹ã«ã¯ãtoString() ã¡ãœãããš print() ã¡ãœããããããŸããtoString() ã¡ãœããã¯ã"Hello [æšæ¶æã«å«ããæåå]!" ãšããæååãè¿ããprint() ã¡ãœããã¯ãæšæ¶æã«å«ããæååãã³ã³ãœãŒã«ã«åºåããŸãã
ãŸããmain() é¢æ°ãå®çŸ©ãããã®é¢æ°ãåŒã³åºãããšã§ãHello ã¯ã©ã¹ã䜿ã£ãŠæšæ¶æãäœæããŠã³ã³ãœãŒã«ã«åºåãããã¹ããè¡ãããšãã§ããŸããmain() é¢æ°ã®äžã§ã¯ãHello ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ã2ã€äœæããããããã® toString() ã¡ãœãããš print() ã¡ãœãããåŒã³åºããŠããŸãããŸããHello ã¯ã©ã¹ã® constructor.name ããããã£ãã³ã³ãœãŒã«ã«åºåããŠãã¯ã©ã¹åãååŸã§ããããšã確èªããŠããŸãã
{{Nav}}
[[Category:JavaScript|{{SUBPAGENAME}}]] | 2023-04-17T23:23:42Z | 2024-01-14T07:55:29Z | [
"ãã³ãã¬ãŒã:Nav"
] | https://ja.wikibooks.org/wiki/JavaScript/%E3%82%B3%E3%83%BC%E3%83%89%E3%82%AE%E3%83%A3%E3%83%A9%E3%83%AA%E3%83%BC |
37,594 | æ¥æ¬åœæ²æ³ç¬¬19æ¡ | æ³åŠ>æ²æ³>æ¥æ¬åœæ²æ³>ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³
ãææ³ã»è¯å¿ã®èªç±ã
ææ³ã»è¯å¿ã®èªç±ãåç
§ã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ²æ³>æ¥æ¬åœæ²æ³>ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ãææ³ã»è¯å¿ã®èªç±ã",
"title": "æ¡æ"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "ææ³ã»è¯å¿ã®èªç±ãåç
§ã",
"title": "解説"
}
] | æ³åŠïŒæ²æ³ïŒæ¥æ¬åœæ²æ³ïŒã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³ | [[æ³åŠ]]ïŒ[[æ²æ³]]ïŒ[[æ¥æ¬åœæ²æ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³]]
==æ¡æ==
ãææ³ã»è¯å¿ã®èªç±ã
;第19æ¡
:ææ³åã³è¯å¿ã®èªç±ã¯ãããã䟵ããŠã¯ãªããªãã
==解説==
{{wikipedia|æ¥æ¬åœæ²æ³ç¬¬19æ¡}}
'''[[ææ³ã»è¯å¿ã®èªç±]]'''ãåç
§ã
==åç
§æ¡æ==
==å€äŸ==
#[http://www.courts.go.jp/search/jhsp0030?hanreiid=57207&hanreiKbn=02 éåå¥çŽè§£é€ç¡å¹ç¢ºèªä¿žçµŠæ¯æè«æ±]ïŒæé«è£å€æ±º æå27幎02æ22æ¥ïŒ[[æ¥æ¬åœæ²æ³ç¬¬20æ¡]],[[æ¥æ¬åœæ²æ³ç¬¬21æ¡]]
#;æ¿æ²»æŽ»åãããªãããšãæ¡ä»¶ãšããéåå¥çŽãšåºæ¬ç人暩ã®å¶é
#:æ²æ³ã§ä¿éãããããããåºæ¬ç人暩ã絶察ã®ãã®ã§ã¯ãªããèªå·±ã®èªç±ææã«åºãç¹å¥ãªå
¬æ³é¢ä¿ãŸãã¯ç§æ³é¢ä¿äžã®çŸ©åã«ãã€ãŠå¶éãåãããã®ã§ãã€ãŠãèªå·±ã®èªç±ææã«ãããæ ¡å
ã«ãããŠæ¿æ²»æŽ»åãããªãããšãæ¡ä»¶ãšããŠæå¡ãšããŠåŠæ ¡ã«éãããå Žåã«ã¯ããã®å¥çŽã¯ç¡å¹ã§ã¯ãªãã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=53255 âåšçæéæŽæ°äžèš±å¯åŠååæ¶]([[w:ãã¯ãªãŒã³äºä»¶|ãã¯ãªãŒã³äºä»¶]] æé«è£å€æ±º æå45幎06æ24æ¥)
#:â[[æ¥æ¬åœæ²æ³ç¬¬10æ¡#ãã¯ãªãŒã³äºä»¶|æ²æ³ç¬¬10æ¡å€äŸç¯åç
§]]
# [http://www.courts.go.jp/search/jhsp0030?hanreiid=51931&hanreiKbn=02 âåŽåå¥çŽé¢ä¿ååšç¢ºèªè«æ±]([[w:äžè±æš¹èäºä»¶|äžè±æš¹èäºä»¶]] æé«è£å€æ±º æå48幎12æ12æ¥)â[[æ¥æ¬åœæ²æ³ç¬¬14æ¡|æ²æ³ç¬¬14æ¡]]ïŒ[[æ°æ³ç¬¬1æ¡]]ïŒ[[æ°æ³ç¬¬90æ¡]]ïŒ[[åŽååºæºæ³ç¬¬3æ¡]]ïŒåŽååºæºæ³ç¬¬2ç«
#:â[[æ¥æ¬åœæ²æ³ç¬¬98æ¡#å€äŸ:æ²æ³ã®ç§äººéå¹å|æ²æ³ã®ç§äººéå¹å]]
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³|æ¥æ¬åœæ²æ³]]
|[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³#3|第3ç« åœæ°ã®æš©å©åã³çŸ©å]]
|[[æ¥æ¬åœæ²æ³ç¬¬18æ¡]]<br>ã奎é·çææã»èŠåœ¹ããã®èªç±ã
|[[æ¥æ¬åœæ²æ³ç¬¬20æ¡]]<br>ãä¿¡æã®èªç±ã»æ¿æåé¢ã
}}
{{stub|law}}
[[category:æ¥æ¬åœæ²æ³|19]] | 2023-04-19T22:55:08Z | 2023-08-15T20:11:39Z | [
"ãã³ãã¬ãŒã:Wikipedia",
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E6%97%A5%E6%9C%AC%E5%9B%BD%E6%86%B2%E6%B3%95%E7%AC%AC19%E6%9D%A1 |
37,595 | æ¥æ¬åœæ²æ³ç¬¬20æ¡ | æ³åŠ>æ²æ³>æ¥æ¬åœæ²æ³>ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³
ãä¿¡æã®èªç±ã»æ¿æåé¢ã
ä¿¡æã®èªç±ãåç
§ã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ²æ³>æ¥æ¬åœæ²æ³>ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ãä¿¡æã®èªç±ã»æ¿æåé¢ã",
"title": "æ¡æ"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "ä¿¡æã®èªç±ãåç
§ã",
"title": "解説"
}
] | æ³åŠïŒæ²æ³ïŒæ¥æ¬åœæ²æ³ïŒã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³ | [[æ³åŠ]]ïŒ[[æ²æ³]]ïŒ[[æ¥æ¬åœæ²æ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³]]
==æ¡æ==
ãä¿¡æã®èªç±ã»æ¿æåé¢ã
;第20æ¡
#ä¿¡æã®èªç±ã¯ãäœäººã«å¯ŸããŠããããä¿éããããããªãå®æå£äœããåœããç¹æš©ãåããåã¯æ¿æ²»äžã®æš©åãè¡äœ¿ããŠã¯ãªããªãã
#äœäººããå®æäžã®è¡çºãç¥å
žãååŒåã¯è¡äºã«åå ããããšã匷å¶ãããªãã
#åœåã³ãã®æ©é¢ã¯ãå®ææè²ãã®ä»ãããªãå®æç掻åãããŠã¯ãªããªãã
==解説==
{{wikipedia|æ¥æ¬åœæ²æ³ç¬¬20æ¡}}
===ä¿¡æã®èªç±===
'''[[ä¿¡æã®èªç±]]'''ãåç
§ã
===æ¿æåé¢===
;æ¿æåé¢èŠå®ã®æ¬è³ª
:æ¿æåé¢èŠå®ã¯ãããããå¶åºŠçä¿éã®èŠå®ã§ãã£ãŠãä¿¡æã®èªç±ãã®ãã®ãçŽæ¥ä¿éãããã®ã§ã¯ãªããåœå®¶ã»å°æ¹å
Œ
±å£äœãšå®æãšã®åé¢ãå¶åºŠãšããŠä¿éããããšã«ãããéæ¥çã«ä¿¡æã®èªç±ã®ä¿éã確ä¿ããããšãããã®ã§ããããããŠãæ²æ³ã®æ¿æåé¢èŠå®ã®åºç€ãšãªãããã®è§£éã®æå°åçãšãªãæ¿æåé¢ååã¯ãåœå®¶çãå®æçã«äžç«ã§ããããšãèŠæ±ãããã®ã§ã¯ããããåœå®¶çãå®æãšã®ããããåããæã€ããšãå
šãèš±ããªããšãããã®ã§ã¯ãªããå®æãšã®ããããåããããããè¡çºã®ç®çåã³å¹æã«ãããã¿ããã®ããããåãããæãåœã®ç€ŸäŒçãæåçè«žæ¡ä»¶ã«ç
§ãããä¿¡æã®èªç±ã®ä¿éã®ç¢ºä¿ãšããå¶åºŠã®æ ¹æ¬ç®çãšã®é¢ä¿ã§çžåœãšãããé床ãè¶
ãããã®ãšèªããããå Žåã«ãããèš±ããªããšãããã®ãšè§£ãã¹ããïŒ[[#ç®é¢å¿ éç¢èšŽèš|ç®é¢å¿ éç¢èšŽèš æé«è£å€æ±ºå¹³æ5幎2æ16æ¥]]ïŒ
;ãå®æç掻åãã®èŠä»¶çïŒ[[#接å°é®ç¥èšŽèš|接å°é®ç¥èšŽèš æé«è£å€æ±ºæå52幎7æ13æ¥]] ä»ïŒ
:#äž»äœ
:#:åœåã³ãã®æ©é¢
:#è¡çºã®ç®ç
:#:å®æçæ矩ããã£ãŠããããšã
:#è¡çºã®å¹æ
:#:å®æã«å¯ŸããæŽå©ãå©é·ãä¿é²åã¯å§è¿«ãå¹²æžçã«ãªãã
:#該åŠã®å€æåºæº
:#:ããè¡çºãå®æç掻åã«è©²åœãããåŠããæ€èšããã«åœãã£ãŠã¯ãåœè©²è¡çºã®äž»å®°è
ãå®æ家ã§ãããã©ããããã®é åºäœæ³ïŒåŒæ¬¡ç¬¬ïŒãå®æã®å®ããæ¹åŒã«åŸã£ããã®ã§ãããã©ãããªã©ãåœè©²è¡çºã®å€åœ¢çåŽé¢ã®ã¿ã«ãšããããããšãªããåœè©²è¡çºã®è¡ãããå Žæãåœè©²è¡çºã«å¯Ÿããäžè¬äººã®å®æçè©äŸ¡ãåœè©²è¡çºè
ãåœè©²è¡çºãè¡ãã«ã€ããŠã®æå³ãç®çåã³å®æçæèã®æç¡ãçšåºŠãåœè©²è¡çºã®äžè¬äººã«äžããå¹æã圱é¿çãè«žè¬ã®äºæ
ãèæ
®ãã瀟äŒé念ã«åŸã£ãŠã客芳çã«å€æããªããã°ãªããªããïŒ[[#ç®é¢å¿ éç¢èšŽèš|ç®é¢å¿ éç¢èšŽèš]]ïŒ
==åç
§æ¡æ==
*[[æ¥æ¬åœæ²æ³ç¬¬89æ¡]]
*[[瀟寺çã«ç¡åã§è²žãä»ããŠããåœæ財ç£ã®åŠåã«é¢ããæ³åŸ]]([https://elaws.e-gov.go.jp/document?lawid=322AC0000000053_20150801_000000000000000&keyword=%E7%A4%BE%E5%AF%BA%E7%AD%89%E3%81%AB%E7%84%A1%E5%84%9F%E3%81%A7%E8%B2%B8%E3%81%97%E4%BB%98%E3%81%91%E3%81%A6%E3%81%82%E3%82%8B%E5%9B%BD%E6%9C%89%E8%B2%A1%E7%94%A3%E3%81%AE%E5%87%A6%E5%88%86%E3%81%AB%E9%96%A2%E3%81%99%E3%82%8B%E6%B3%95%E5%BE%8B e-Govæ³ä»€æ€çŽ¢])
==å€äŸ==
==å€äŸ==
#[http://www.courts.go.jp/search/jhsp0030?hanreiid=57207&hanreiKbn=02 éåå¥çŽè§£é€ç¡å¹ç¢ºèªä¿žçµŠæ¯æè«æ±]ïŒæé«è£å€æ±º æå27幎02æ22æ¥ïŒ[[æ¥æ¬åœæ²æ³ç¬¬19æ¡]],[[æ¥æ¬åœæ²æ³ç¬¬21æ¡]]
#;æ¿æ²»æŽ»åãããªãããšãæ¡ä»¶ãšããéåå¥çŽãšåºæ¬ç人暩ã®å¶é
#:æ²æ³ã§ä¿éãããããããåºæ¬ç人暩ã絶察ã®ãã®ã§ã¯ãªããèªå·±ã®èªç±ææã«åºãç¹å¥ãªå
¬æ³é¢ä¿ãŸãã¯ç§æ³é¢ä¿äžã®çŸ©åã«ãã€ãŠå¶éãåãããã®ã§ãã€ãŠãèªå·±ã®èªç±ææã«ãããæ ¡å
ã«ãããŠæ¿æ²»æŽ»åãããªãããšãæ¡ä»¶ãšããŠæå¡ãšããŠåŠæ ¡ã«éãããå Žåã«ã¯ããã®å¥çŽã¯ç¡å¹ã§ã¯ãªãã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=51738 å·å®³èŽæ»]ïŒ[[w:å æç¥ç¥·äºä»¶|å æç¥ç¥·äºä»¶]] æé«è£å€æ±ºæå38幎5æ15æ¥ïŒ[[åæ³ç¬¬205æ¡]]
#;å æç¥ç¥·ã®çµæ人ãæ»äº¡ãããè¡çºãšæ²æ³ç¬¬20æ¡ç¬¬1é
#:粟ç¥ç°åžžè
ã®å¹³çãç¥é¡ããããã«å®æè¡çºãšããŠå æç¥ç¥·è¡çºããªãããå Žåã§ãããããåå€æ±ºã®èªå®ãããããªä»äººã®çåœã身äœçã«å±å®³ãåãŒãéæ³ãªæ圢åã®è¡äœ¿ã«åœããã®ã§ãããããã«ãã被害è
ãæ»ã«èŽãããã®ã§ãã以äžãæ²æ³ç¬¬20æ¡ç¬¬1é
ã®ä¿¡æã®èªç±ã®ä¿éã®éçãéžè±ãããã®ãšããã»ããªãããããåæ³ç¬¬205æ¡ã«è©²åœãããã®ãšããŠåŠçœ°ããããšã¯ãäœãæ²æ³ã®å³æ¡é
ã«åãããã®ã§ã¯ãªãã
#<span id="接å°é®ç¥èšŽèš"/>[https://www.courts.go.jp/app/hanrei_jp/detail2?id=54189 è¡æ¿åŠååæ¶ç]ïŒ[[w:接å°é®ç¥èšŽèš|接å°é®ç¥èšŽèš]] æé«è£å€æ±ºæå52幎7æ13æ¥ïŒ[[æ¥æ¬åœæ²æ³ç¬¬89æ¡|æ²æ³ç¬¬89æ¡]]
##'''æ²æ³ã«ãããæ¿æåé¢åå'''
##:æ²æ³ã®æ¿æåé¢ååã¯ãåœå®¶ãå®æçã«äžç«ã§ããããšãèŠæ±ãããã®ã§ã¯ããããåœå®¶ãå®æãšã®ããããåãããã€ããšãå
šãèš±ããªããšãããã®ã§ã¯ãªããå®æãšã®ããããåããããããè¡çºç®çåã³å¹æã«ãããã¿ããã®ããããåããããåœã®ç€ŸäŒçã»æåçè«žæ¡ä»¶ã«ç
§ããä¿¡æã®èªç±ã®ä¿éã®ç¢ºä¿ãšããå¶åºŠã®æ ¹æ¬ç®çãšã®é¢ä¿ã§çžåœãšãããé床ãè¶
ãããã®ãšèªããããå Žåã«ãããèš±ããªããšãããã®ã§ããã
##'''æ²æ³20æ¡3é
ã«ããå®æç掻åã®æ矩'''
##:æ²æ³20æ¡3é
ã«ããå®æç掻åãšã¯ãåœåã³ãã®æ©é¢ã®æŽ»åã§å®æãšã®ããããåãããã€ãã¹ãŠã®è¡çºãæããã®ã§ã¯ãªããåœè©²è¡çºã®ç®çãå®æçæ矩ããã¡ããã®å¹æãå®æã«å¯ŸããæŽå©ãå©é·ãä¿é²åã¯å§è¿«ãå¹²æžçã«ãªããããªè¡çºãããã
##'''åžãäž»å¬ãç¥åŒã«åãæè¡ãããåžäœè²é€šã®èµ·å·¥åŒãæ²æ³20æ¡3é
ã«ããå®æçãªæŽ»åã«ããããªããããäºäŸ'''
##:åžãäž»å¬ãç¥åŒã«åãæè¡ãããåžäœè²é€šã®èµ·å·¥åŒã¯ãå®æãšããããåãããã€ãã®ã§ããããšãåŠå®ããããšã¯ã§ããªããããã®ç®çã建ç¯çå·¥ã«éãåå°ã®å¹³å®å
åºãå·¥äºã®ç¡äºå®å
šãé¡ãã瀟äŒã®äžè¬çæ
£ç¿ã«åŸã€ãå瀌ãè¡ããšããå°ãäžä¿çãªãã®ãšèªãããããã®å¹æãç¥éãæŽå©ãå©é·ãä¿é²ãåã¯ä»ã®å®æã«å§è¿«ãå¹²æžãå ãããã®ãšã¯èªããããªãå€ç€ºã®äºæ
ã®ããšã«ãããŠã¯ãæ²æ³20æ¡3é
ã«ããå®æç掻åã«ããããªãã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=52169 èªè¡éãã«ããåç¥æç¶ã®åæ¶çè«æ±äºä»¶]ïŒ[[w:èªè¡å®åç¥èšŽèš|èªè¡å®åç¥èšŽèš]] æé«è£å€æ±ºæå63幎6æ1æ¥ïŒ
##'''ç§çå£äœãè·åœç¥ç€Ÿã«å¯Ÿãæ®è·èªè¡éå¡ã®åç¥ãç³è«ããéçšã«ãããŠèªè¡éè·å¡ã®ããè¡çºãæ²æ³20æ¡3é
ã«ããå®æç掻åã«åœãããªããšãããäºäŸ'''
##:瀟å£æ³äººïŒ¥äŒã®ïŒŠæ¯éšé£åäŒãïœçè·åœç¥ç€Ÿã«å¯ŸããŠæ®è·èªè¡éå¡ã®åç¥ãç³è«ããéçšã«ãããŠãèªè¡éïœã®è·å¡ãåç¥å®çŸã«ããèªè¡éå¡ã®ç€ŸäŒçå°äœã®åäžãšå£«æ°ã®é«æãå³ãæå³ãç®çã®äžã«å³é£åäŒã«ååããŠãä»ã®ïŒ¡ïœã«å¯Ÿãæ®è·èªè¡éå¡ã®åç¥ç¶æ³çãç
§äŒãããã®åçãå³é£åäŒäŒé·ã«é²èŠ§ããããªã©ããè¡çºã¯ãå®æãšã®ããããåããéæ¥çã§ãè·å¡ã®å®æçæèãã©ã¡ãããšããã°åžèã§ããããã®è¡çºã®æ
æ§ããããŠåœåã¯ãã®æ©é¢ãšããŠç¹å®ã®å®æãžã®é¢å¿ãåŒã³èµ·ããããããã¯ãããæŽå©ãå©é·ãä¿é²ããåã¯ä»ã®å®æã«å§è¿«ãå¹²æžãå ããå¹æããã€ãã®ãšäžè¬äººãã¡è©äŸ¡ãããè¡çºãšã¯èªãããããæ²æ³20æ¡3é
ã«ããå®æç掻åã«åœãããªãã
##'''æ»å»ããé
å¶è
ã®è¿œæ
ãæ
°éçã«é¢ããŠç§äººãããå®æäžã®è¡çºã«ãã€ãŠä¿¡ä»°ç掻ã®éè¬ã害ãããå Žåãšæ³çå©çã®äŸµå®³ã®æç¡'''
##:æ»å»ããé
å¶è
ã®è¿œæ
ãæ
°éçã«é¢ããŠç§äººãããå®æäžã®è¡çºã«ãã€ãŠä¿¡ä»°ç掻ã®éè¬ã害ããããšããŠãããããä¿¡æã®èªç±ã®äŸµå®³ã«åœããããã®æ
æ§ãçšåºŠã瀟äŒçã«èš±å®¹ãåŸãé床ãè¶
ããå Žåã§ãªãéããæ³çå©çã䟵害ããããšã¯ãããªãã
#<span id="ç®é¢å¿ éç¢èšŽèš"/>[https://www.courts.go.jp/app/hanrei_jp/detail2?id=56361 éåå Žäžéšå»æ¢æ±ºå®ç¡å¹ç¢ºèªçãåé垯åã³æ
°éç¥æ¯åºå·®æ¢]ïŒç®é¢å¿ éç¢èšŽèš æé«è£å€æ±ºå¹³æ5幎2æ16æ¥ïŒ
##'''åžãå¿ éç¢ã®åããå
¬æå°ã®ä»£æ¿å°ãè²·ãåããŠå³å¿ éç¢ã®ç§»èšã»å建ãããè¡çºåã³å³å¿ éç¢ãç¶æ管çããå°å
ã®æŠæ²¡è
éºæäŒã«å¯Ÿããã®æ·å°ãšããŠå³ä»£æ¿å°ãç¡å貞äžããè¡çºãæ²æ³20æ¡3é
ã«ããçŠæ¢ãããå®æç掻åã«ã¯åœãããªããšãããäºäŸ'''
##:åžãå¿ éç¢ã®åããå
¬æå°ã®ä»£æ¿å°ãè²·ãåããŠå³å¿ éç¢ã®ç§»èšãå建ãããè¡çºåã³å³å¿ éç¢ãç¶æ管çããå°å
ã®æŠæ²¡è
éºæäŒã«å¯Ÿããã®æ·å°ãšããŠå³ä»£æ¿å°ãç¡å貞äžããè¡çºã¯ãå³å¿ éç¢ããå
æ¥ãæŠæ²¡è
èšå¿µç¢çæ§æ Œã®ãã®ã§ãããç¹å®ã®å®æãšã®ãããããå°ãªããšãæŠåŸã«ãããŠã¯åžèã§ããããšãå³æŠæ²¡è
éºæäŒãå®æç掻åãããããšãæ¬æ¥ã®ç®çãšããå£äœã§ã¯ãªãããšãåžãå³ç§»èšãå建çãè¡ã€ãç®çããå³å¿ éç¢ã®åããå
¬æå°ãåŠæ ¡çšå°ãšããŠå©çšããããšãäž»çŒãšãããã®ã§ãå°ãäžä¿çãªãã®ã§ããããšãªã©å€ç€ºã®äºæ
ã®äžã«ãããŠã¯ãããããæ²æ³20æ¡3é
ã«ããçŠæ¢ãããå®æç掻åã«ã¯åœãããªãã
##*以äžã®è«žç¹ã«ãããã¿ããšãç®é¢åžãæ§å¿ éç¢ãªããæ¬ä»¶å¿ éç¢ã«é¢ããŠããåè¡çºã¯ãããããããã®ç®çã¯ãå°åŠæ ¡ã®æ ¡èã®å»ºæ¿ãçã®ãããå
¬æå°äžã«åããæŠæ²¡è
èšå¿µç¢çãªæ§æ Œãæããæœèšãä»ã®å Žæã«ç§»èšãããã®æ·å°ãåŠæ ¡çšå°ãšããŠå©çšããããšãäž»çŒãšãããã®ã§ããããã®ããã®æ¹çãšããŠãå³æœèšãç¶æ管çããåžéºæäŒã«å¯Ÿããå³æœèšã®ç§»èšå ŽæãšããŠä»£æ¿å°ãååŸããŠãåŸæ¥ã©ããããããå³æœèšã®æ·å°çãšããŠç¡åã§æäŸããå³æœèšã®ç§»èšãå建ãè¡ã£ããã®ã§ãã£ãŠãå°ãäžä¿çãªãã®ãšèªãããããã®å¹æããç¹å®ã®å®æãæŽå©ãå©é·ãä¿é²ãåã¯ä»ã®å®æã«å§è¿«ãå¹²æžãå ãããã®ãšã¯èªããããªãã
##*# æ§å¿ éç¢ã¯ãå°å
ã®äººã
ãé·ååºèº«ã®æŠæ²¡è
ã®æ
°éãé¡åœ°ã®ããã«èšãããã®ã§ãå
æ¥ãæŠæ²¡è
èšå¿µç¢çãªæ§æ Œã®ãã®ã§ãããæ¬ä»¶ç§»èšã»å建åŸã®æ¬ä»¶å¿ éç¢ãåæ§ã®æ§æ Œãæãããšã¿ããããã®ã§ãã£ãŠããã®ç¢åã§ãæŠæ²¡è
ã®æ
°éãè¿œæŒã®ããã®æ
°éç¥ããæ¯å¹ŽäžåãåžéºæäŒã®äžéšçµç¹ã§ããå°åºéºæäŒäž»å¬ã®äžã«ç¥åŒãä»åŒé幎亀æ¿ã§è¡ãããŠããããæ¬ä»¶å¿ éç¢ãšç¥éçã®ç¹å®ã®å®æãšã®ããããã¯ãå°ãªããšãæŠåŸã«ãããŠã¯åžèã§ãããæ¬ä»¶å¿ éç¢ãç¥ç€Ÿåã¯ïŒŽç¥ç€Ÿã®å身ïŒãããããæã®éåœãïŒãšã¿ãããšã¯ã§ããªãã
##*#æ¬ä»¶å¿ éç¢ãææãããããç¶æ管çããŠããåžéºæäŒã¯ãç®é¢åžå
ã«å±
äœããæŠæ²¡è
éºæãäŒå¡ãšããæŠæ²¡è
éºæã®çžäºæ¶å©ã»çŠç¥åäžãšè±éã®é¡åœ°ãäž»ããç®çãšããŠèšç«ãã掻åããŠããå£äœã§ãã£ãŠãå®æç掻åãããããšãæ¬æ¥ã®ç®çãšããå£äœã§ã¯ãªãã
##*#æ§å¿ éç¢ã¯ãæŠåŸã®äžææããã®ç¢ç³éšåãå°äžã«åããããããšããã£ããã倧æ£5幎ã«åäŒãïœæã®æ¿è«ŸãåŸãŠå
¬æå°äžã«èšçœ®ããŠä»¥æ¥ãå³å
¬æå°äžã«åç¶ããŠãããã®ã§ãã£ãŠãç®é¢åžãããæ¬ä»¶ç§»èšã»å建çã®è¡çºã¯ãå³å
¬æå°ã«é£æ¥ããå°åŠæ ¡ã«ãããå
ç«¥æ°ã®å¢å ãæ ¡èã®èæœåçã«ããæ ¡èã®å»ºæ¿ãçãè¡ãããšãæ¥åãšãªãããã®ããã«å³å
¬æå°ãåŠæ ¡æ·å°ã«ç·šå
¥ããå¿
èŠãçããæ§å¿ éç¢ãä»ã®å Žæã«ç§»èšããããåŸãªããªã£ãããšãããåžéºæäŒãšã®äº€æžã®çµæã«åºã¥ããåå°éçºå
¬ç€Ÿããæ¬ä»¶åå°ãè²·ãåããåŸåãšåæ§ãæ¬ä»¶æ·å°ã代æ¿å°ãšããŠåžéºæäŒã«å¯Ÿãç¡å貞äžããå³æ·å°äžã«ç§»èšãå建ããã«ãããªããã®ã§ããããšãæããã§ããã
##'''財å£æ³äººïŒ€äŒåã³ãã®æ¯éšãšæ²æ³20æ¡1é
åŸæ®µã«ãããå®æå£äœãåã³æ²æ³89æ¡ã«ãããå®æäžã®çµç¹è¥ããã¯å£äœã'''
##:財å£æ³äººïŒ€äŒåã³ãã®æ¯éšã¯ãæ²æ³20æ¡1é
åŸæ®µã«ãããå®æå£äœããæ²æ³89æ¡ã«ãããå®æäžã®çµç¹è¥ããã¯å£äœãã«è©²åœããªãã
##:*æ²æ³20æ¡1é
åŸæ®µã«ãããå®æå£äœããæ²æ³89æ¡ã«ãããå®æäžã®çµç¹è¥ããã¯å£äœããšã¯ãå®æãšäœããã®ããããåãã®ããè¡çºãè¡ã£ãŠããçµç¹ãªããå£äœã®ãã¹ãŠãæå³ãããã®ã§ã¯ãªããåœå®¶ãåœè©²çµç¹ãªããå£äœã«å¯Ÿãç¹æš©ãä»äžãããããŸããåœè©²çµç¹ãªããå£äœã®äœ¿çšã䟿çè¥ããã¯ç¶æã®ãããå
¬éãã®ä»ã®å
¬ã®è²¡ç£ãæ¯åºãåã¯ãã®å©çšã«äŸãããããããšããç¹å®ã®å®æã«å¯ŸããæŽå©ãå©é·ãä¿é²åã¯å§è¿«ãå¹²æžçã«ãªããæ²æ³äžã®æ¿æåé¢ååã«åãããšè§£ããããã®ãããã®ã§ãããæèšãããšãç¹å®ã®å®æã®ä¿¡ä»°ã瀌æåã¯æ®åçã®å®æç掻åãè¡ãããšãæ¬æ¥ã®ç®çãšããçµç¹ãªããå£äœãæããã®ãšè§£ããã®ãçžåœã§ããã
##'''åžã®æè²é·ãå°å
ã®æŠæ²¡è
éºæäŒãå¿ éç¢åã§ç¥åŒåã¯ä»åŒã§æè¡ããåæ
°éç¥ã«ååããè¡çºãæ²æ³äžã®æ¿æåé¢åååã³æ²æ³20æ¡ã89æ¡ã«éåããªããšãããäºäŸ'''
##:åžã®æè²é·ãå°å
ã®æŠæ²¡è
éºæäŒãå¿ éç¢åã§ç¥åŒåã¯ä»åŒã§æè¡ããåæ
°éç¥ã«ååããè¡çºã¯ãå³å¿ éç¢ããå
æ¥ãæŠæ²¡è
èšå¿µç¢çæ§æ Œã®ãã®ã§ããããšãå³æŠæ²¡è
éºæäŒãå®æç掻åãããããšãæ¬æ¥ã®ç®çãšããå£äœã§ã¯ãªãããšãå³ååã®ç®çãæŠæ²¡è
éºæã«å¯Ÿãã瀟äŒçå瀌ãå°œãããšããå°ãäžä¿çãªãã®ã§ããããšãªã©å€ç€ºã®äºæ
ã®äžã«ãããŠã¯ãæ²æ³äžã®æ¿æåé¢åååã³æ²æ³20æ¡ã89æ¡ã«éåããªãã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=55883 å®ææ³äººè§£æ£åœä»€ã«å¯Ÿããæåæ£åŽæ±ºå®ã«å¯Ÿããç¹å¥æå]ïŒ[[w:å®ææ³äººãªãŠã ççæ解æ£åœä»€äºä»¶|å®ææ³äººãªãŠã ççæ解æ£åœä»€äºä»¶]] æé«è£æ±ºå®å¹³æ8幎1æ30æ¥ïŒ[[å®ææ³äººæ³ç¬¬81æ¡]]
#;å®ææ³äººæ³81æ¡1é
1å·åã³2å·å段ã«èŠå®ããäºç±ããããšããŠãããå®ææ³äººã®è§£æ£åœä»€ãæ²æ³20æ¡1é
ã«éåããªããšãããäºäŸ
#:倧é殺人ãç®çãšããŠèšç»çãçµç¹çã«ãµãªã³ãçæããå®ææ³äººã«ã€ããŠãå®ææ³äººæ³81æ¡1é
1å·åã³2å·å段ã«èŠå®ããäºç±ããããšããŠããã<u>解æ£åœä»€ã¯ãå°ãå®ææ³äººã®äžä¿çåŽé¢ã察象ãšããå®æå£äœãä¿¡è
ã®ç²Ÿç¥çã»å®æçåŽé¢ã«å®¹ããããæå³ã«ãããã®ã§ã¯ãªã</u>ãå³å®ææ³äººã®è¡çºã«å¯ŸåŠããã«ã¯ããã®æ³äººæ Œã倱ãããããšãå¿
èŠãã€é©åã§ãããä»æ¹ã解æ£åœä»€ã«ãã£ãŠå®æå£äœããã®ä¿¡è
ããè¡ãå®æäžã®è¡çºã«äœããã®æ¯éãçããããšãé¿ããããªããšããŠãããã®æ¯éã¯è§£æ£åœä»€ã«äŒŽãéæ¥çã§äºå®äžã®ãã®ã«ãšã©ãŸããªã©å€ç€ºã®äºæ
ã®äžã«ãããŠã¯ãå¿
èŠã§ãããåŸãªãæ³çèŠå¶ã§ãããæ²æ³20æ¡1é
ã«éåããªãã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=55882 é²çŽæåŠåŠååæ¶ãéåŠåœä»€åŠåçåæ¶]ïŒ[[w:ç¥æžé«å°å£éå®ææåŠäºä»¶|ç¥æžé«å°å£éå®ææåŠäºä»¶]] æé«è£å€æ±ºå¹³æ8幎3æ8æ¥ïŒ
#;ä¿¡ä»°äžã®çç±ã«ããå£éå®æã®å±¥ä¿®ãæåŠããåžç«é«çå°éåŠæ ¡ã®åŠçã«å¯ŸããåçŽç眮åŠååã³éåŠåŠåãè£éæš©ã®ç¯å²ãè¶
ããéæ³ãªãã®ã§ãããšãããäºäŸ
#:åžç«é«çå°éåŠæ ¡ã®æ ¡é·ããä¿¡ä»°äžã®çç±ã«ããå£éå®æã®å±¥ä¿®ãæåŠããåŠçã«å¯Ÿããå¿
ä¿®ã§ããäœè²ç§ç®ã®ä¿®åŸèªå®ãåããããªãããšãçç±ãšããŠäºå¹Žé£ç¶ããŠåçŽç眮åŠåãããããã«ããããåæãšããŠéåŠåŠåãããå Žåã«ãããŠãå³åŠçã¯ãä¿¡ä»°ã®æ žå¿éšåãšå¯æ¥ã«é¢é£ããçããªçç±ãã履修ãæåŠãããã®ã§ãããä»ã®äœè²çš®ç®ã®å±¥ä¿®ã¯æåŠããŠããããä»ã®ç§ç®ã§ã¯æ瞟åªç§ã§ãã£ãäžãå³ååŠåã¯ãå人ã«é倧ãªäžå©çãåãŒãããããé¿ããããã«ã¯ãã®ä¿¡ä»°äžã®æ矩ã«åããè¡åãæ¡ãããšãäœåãªãããããšããæ§è³ªãæãããã®ã§ãããå人ãã¬ããŒãæåºçã®ä»£æ¿æªçœ®ãèªããŠæ¬²ããæšç³ãå
¥ããŠããã®ã«å¯ŸããåŠæ ¡åŽã¯ã代æ¿æªçœ®ãäžå¯èœãšããããã§ããªãã®ã«ãããã«ã€ãäœãæ€èšããããšããªããå³ç³å
¥ããäžåæåŠãããªã©å€ç€ºã®äºæ
ã®äžã«ãããŠã¯ãå³ååŠåã¯ã瀟äŒèŠ³å¿µäžèãã劥åœãæ¬ ããè£éæš©ã®ç¯å²ãè¶
ããéæ³ãªãã®ãšããã¹ãã§ããã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=54777 æå®³è³ å代äœ]ïŒ[[w:æåªçéåœç¥ç€Ÿçäž²æ蚎èš|æåªçéåœç¥ç€Ÿçäž²æ蚎èš]] æé«è£å€æ±ºå¹³æ9幎4æ2æ¥ïŒ[[æ¥æ¬åœæ²æ³ç¬¬89æ¡|æ²æ³ç¬¬89æ¡]]
##'''çãç¥ç€Ÿåã¯ïŒ¥ç¥ç€Ÿã®æè¡ããäŸå€§ç¥ãã¿ããŸç¥åã¯æ
°é倧ç¥ã«éãçäž²æãç®ç¯æåã¯äŸç©æãçã®å
¬éããæ¯åºããŠå¥çŽããããšãæ²æ³20æ¡3é
ã89æ¡ã«éåãããšãããäºäŸ'''
##:æåªçããå®ææ³äººïŒ€ç¥ç€Ÿã®æè¡ããæäŸã®å®æäžã®ç¥ç¥ã§ããäŸå€§ç¥ã«éãçäž²æãšããŠ9åã«ãããå5,000åïŒåèš45,000åïŒããåã¿ããŸç¥ã«éãç®ç¯æãšããŠ4åã«ãããå7,000ååã¯8,000åïŒåèš31,000åïŒããå®ææ³äººæåªçç¥ç€Ÿã®æè¡ããæäŸã®å®æäžã®ç¥ç¥ã§ããæ
°é倧ç¥ã«éãäŸç©æãšããŠ9åã«ãããå10,000åïŒåèš90,000åïŒããããããçã®å
¬éããæ¯åºããŠå¥çŽããããšã¯ãäžè¬äººãããã瀟äŒçå瀌ã«ãããªããã®ãšè©äŸ¡ããŠãããšã¯èãé£ãããã®å¥çŽè
ã«ãããŠããããå®æçæ矩ãæããè
ã§ãããšããæèãæããããåŸããããã«ããçãç¹å®ã®å®æå£äœãšã®éã«ã®ã¿æèçã«ç¹å¥ã®ããããåããæã£ãããšãåŠå®ããããšãã§ããªãã®ã§ãããããããäžè¬äººã«å¯ŸããŠãçãåœè©²ç¹å®ã®å®æå£äœãç¹å¥ã«æ¯æŽããŠããå³å®æå£äœãä»ã®å®æå£äœãšã¯ç°ãªãç¹å¥ã®ãã®ã§ãããšã®å°è±¡ãäžããç¹å®ã®å®æãžã®é¢å¿ãåŒã³èµ·ãããã®ãšãããããåŸãªããªã©å€ç€ºã®äºæ
ã®äžã«ãããŠã¯ãæ²æ³20æ¡3é
ã89æ¡ã«éåããã
##'''å§ä»»åã¯å°æ±ºã«ããçã®è£å©è·å¡ããå
¬éæ¯åºãåŠçããå Žåã«ãããŠç¥äºã¯ææ®ç£ç£äžã®çŸ©åã«éåãããã®ã§ããé倱ããã£ããè£å©è·å¡ãã¯å€æã誀ã£ãããã©ãé倧ãªé倱ããã£ããšããããšã¯ã§ããªããšãããäºäŸ'''
##:æåªçãæ²æ³20æ¡3é
ã89æ¡ã«éåããŠå®ææ³äººïŒ€ç¥ç€Ÿçã«çäž²æçãçã®å
¬éããæ¯åºããŠå¥çŽããããšã«ã€ããå³æ¯åºã®æš©éãæ³ä»€äžæ¬æ¥çã«æããç¥äºã¯ãå§ä»»ãåãåã¯å°æ±ºããããšãä»»ãããè£å©è·å¡ããå³æ¯åºãåŠçããå Žåã§ãã£ãŠããåç¥ç€Ÿçã«å¯Ÿããå³è£å©è·å¡ãã«çäž²æçãæåããããªã©ããŠãããå¥çŽãããšèªããããåœè©²æ¯åºã«ã¯æ²æ³ã«éåãããšããé倧ãªéæ³ããããå°æ¹å
Œ
±å£äœãç¹å®ã®å®æå£äœã«çäž²æçã®æ¯åºãããããšã«ã€ããŠãæéšçèªæ²»ççããæ¿æåé¢ååã«ç
§ãããæ
éãªå¯Ÿå¿ãæ±ãã趣æšã®ééãåçãããŠãããªã©ã®äºæ
ã®äžã«ãããŠã¯ããã®ææ®ç£ç£äžã®çŸ©åã«éåãããã®ã§ãããé倱ããã£ããšããã®ãçžåœã§ããããå³è£å©è·å¡ãã¯ãç¥äºã®å³ã®ãããªææ®ç£ç£ã®äžã§ãããè¡ããå³æ¯åºãæ²æ³ã«éåãããåŠãã極ããŠå®¹æã«å€æããããšãã§ãããšãŸã§ã¯ãããªããšããäºæ
ã®äžã«ãããŠã¯ããã®å€æã誀ã£ããã®ã§ããããé倧ãªé倱ããã£ããšããããšã¯ã§ããªãã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=62446 倧åçã«ä»£äœããŠè¡ãæå®³è³ åçè«æ±äºä»¶]ïŒæé«è£å€æ±ºå¹³æ14幎7æ9æ¥ïŒ[[åæ³ç¬¬205æ¡]]
#;ç¥äºããäž»åºç°ã®åã«ååããè¡çºãæ²æ³20æ¡3é
ã«éåããªããšãããäºäŸ
#:ç¥äºïŒå¯ç¥äºåã³ç蟲æ¿éšé·ãçå
ã§è¡ãããäž»åºç°ã®åã«ååããè¡çºã¯ïŒäž»åºç°ã®åãçäœç¶æ¿ã®éã«éåžžè¡ãããŠããç宀ã®äŒçµ±ååŒã§ãã倧åç¥ã®äžéšãæ§æããäžé£ã®ååŒã®äžã€ã§ããããšïŒä»ã®ååè
ãšå
±ã«ååããŠæ瀌ããã«ãšã©ãŸãããšïŒååãå
¬è·ã«ããè
ã®ç€ŸäŒçå瀌ãšããŠå€©çã®å³äœã«ç¥æïŒæ¬æãè¡šããç®çã§è¡ãããããšãªã©å€ç€ºã®äºæ
ã®äžã«ãããŠã¯ïŒæ²æ³20æ¡3é
ã«éåããªãã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=33254 éåœåæéæ²ç¢ºèªçè«æ±äºä»¶]ïŒæé«è£å€æ±ºå¹³æ18幎6æ23æ¥ïŒ
#;å
é£ç·ç倧è£ã®å°äœã«ããè
ãéåç¥ç€Ÿã«åæããè¡çºã«ããæ³çå©çã®äŸµå®³ã®æç¡
#:å
é£ç·ç倧è£ã®å°äœã«ããè
ãéåç¥ç€Ÿã«åæããè¡çºã«ãã£ãŠå人ã®å¿æ
ãªããå®æäžã®ææ
ã害ããããšããŠãïŒæå®³è³ åã®å¯Ÿè±¡ãšãªãåŸããããªæ³çå©çã®äŸµå®³ããã£ããšã¯ãããªãã
#:*人ãç¥ç€Ÿã«åæããè¡çºèªäœã¯ïŒä»äººã®ä¿¡ä»°ç掻çã«å¯ŸããŠå§è¿«ïŒå¹²æžãå ãããããªæ§è³ªã®ãã®ã§ã¯ãªãããïŒä»äººãç¹å®ã®ç¥ç€Ÿã«åæããããšã«ãã£ãŠïŒèªå·±ã®å¿æ
ãªããå®æäžã®ææ
ã害ããããšãïŒäžå¿«ã®å¿µãæ±ãããšããŠãïŒããã被䟵害å©çãšããŠïŒçŽã¡ã«æå®³è³ åãæ±ããããšã¯ã§ããªããšè§£ããã®ãçžåœã§ãããäžå人ãã®äž»åŒµããæš©å©ãªããå©çãïŒäžèšã®ãããªå¿æ
ãªããå®æäžã®ææ
ãšç°ãªããã®ã§ã¯ãªããšããã¹ãã§ããããã®ããšã¯ïŒå
é£ç·ç倧è£ã®å°äœã«ããè
ãéåç¥ç€Ÿãåæããå Žåã«ãããŠãç°ãªããã®ã§ã¯ãªãããïŒæ¬ä»¶åæã«ãã£ãŠäžå人ãã«æå®³è³ åã®å¯Ÿè±¡ãšãªãåŸããããªæ³çå©çã®äŸµå®³ããã£ããšã¯ãããªãããããã£ãŠïŒäžå人ãã®æå®³è³ åè«æ±ã¯ïŒãã®äœã®ç¹ã«ã€ããŠå€æãããŸã§ããªãçç±ããªããã®ãšããŠæ£åŽãã¹ãã§ããïŒãªãïŒä»¥äžã®ããšããããã°ïŒæ¬ä»¶åæãéæ²ã§ããããšã®ç¢ºèªãæ±ãã蚎ãã«ç¢ºèªã®å©çããªãïŒãããåŽäžãã¹ãããšãæããã§ãããïŒã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=38346 財ç£ç®¡çãæ ãäºå®ã®éæ³ç¢ºèªè«æ±äºä»¶]ïŒ[[w:ç å·æ¿æåé¢èšŽèš|ç å·æ¿æåé¢èšŽèš]]ã»å¯å¹³ç¥ç€ŸèšŽèš æé«è£å€æ±ºå¹³æ22幎1æ20æ¥ïŒ
#;åžãçºå
äŒã«å¯Ÿãç¡åã§ç¥ç€Ÿæœèšã®æ·å°ãšããŠã®å©çšã«äŸããŠããåžæå°ãåçºå
äŒã«è²äžããããšãæ²æ³20æ¡3é
ïŒ89æ¡ã«éåããªããšãããäºäŸ
#:åžãçºå
äŒã«å¯Ÿãç¡åã§ç¥ç€Ÿæœèšã®æ·å°ãšããŠã®å©çšã«äŸããŠããåžæå°ãåçºå
äŒã«è²äžããããšã¯ïŒæ¬¡ã®1.ã3.ãªã©å€ç€ºã®äºæ
ã®äžã§ã¯ïŒæ²æ³20æ¡3é
ïŒ89æ¡ã«éåããªãã
#:#äžèšç¥ç€Ÿæœèšã¯æããã«ç¥éã®ç¥ç€Ÿæœèšã§ããïŒããã§ã¯ç¥éã®æ¹åŒã«ã®ã£ãšã£ãå®æçè¡äºãè¡ãããŠããïŒäžèšã®ãããªåžæå°ã®æäŸè¡çºããã®ãŸãŸç¶ç¶ããããšã¯ïŒäžè¬äººã®ç®ããèŠãŠïŒåžãç¹å®ã®å®æã«å¯ŸããŠç¹å¥ã®äŸ¿çãæäŸãïŒãããæŽå©ããŠãããšè©äŸ¡ããããããããã£ãã
#:#äžèšè²äžã¯ïŒåžãïŒç£æ»å§å¡ã®ææãèæ
®ãïŒäžèš1.ã®ãããªæ²æ³ã®è¶£æšã«é©åããªããããã®ããç¶æ
ãæ¯æ£è§£æ¶ããããã«è¡ã£ããã®ã§ããã
#:#äžèšåžæå°ã¯ïŒããšããšäžèšçºå
äŒã®å身ã®å£äœããæŠåã«å°åŠæ ¡ã®æå¡äœå®
çšå°ãšããŠå¯éããããïŒæŠåŸïŒäžèšæå¡äœå®
ã®åå£ãã«äŒŽããã®çšéãå»æ¢ããããã®ã§ããã
#<span id="å審"/>[https://www.courts.go.jp/app/hanrei_jp/detail2?id=38347 財ç£ç®¡çãæ ãäºå®ã®éæ³ç¢ºèªè«æ±äºä»¶]ïŒ[[w:ç å·æ¿æåé¢èšŽèš|ç å·æ¿æåé¢èšŽèš]]ã»ç©ºç¥å€ªç¥ç€ŸèšŽèš æé«è£å€æ±ºå¹³æ22幎1æ20æ¥ïŒ
##'''åžãé£åçºå
äŒã«å¯Ÿãåžæå°ãç¡åã§ç¥ç€Ÿæœèšã®æ·å°ãšããŠã®å©çšã«äŸããŠããè¡çºãæ²æ³89æ¡ïŒ20æ¡1é
åŸæ®µã«éåãããšãããäºäŸ'''
##:åžãé£åçºå
äŒã«å¯Ÿãåžæå°ãç¡åã§å»ºç©ïŒå°åã®éäŒå Žçã§ãããïŒãã®å
éšã«ç¥ ãèšçœ®ããïŒå€å£ã«ç¥ç€Ÿã®è¡šç€ºãèšããããŠãããïŒïŒé³¥å±
åã³å°ç¥å®®ã®æ·å°ãšããŠã®å©çšã«äŸããŠããè¡çºã¯ïŒæ¬¡ã®1.ïŒ2.ãªã©å€ç€ºã®äºæ
ã®äžã§ã¯ïŒäžèšè¡çºãããšããšã¯å°åŠæ ¡æ·å°ã®æ¡åŒµã«ååããå°å
äœæ°ã«å ±ãããšããäžä¿çïŒå
Œ
±çãªç®çããå§ãŸã£ããã®ã§ãããšããŠãïŒäžè¬äººã®ç®ããèŠãŠïŒåžãç¹å®ã®å®æã«å¯ŸããŠç¹å¥ã®äŸ¿çãæäŸãïŒãããæŽå©ããŠãããšè©äŸ¡ãããŠããããåŸãªããã®ã§ãã£ãŠïŒæ²æ³89æ¡ïŒ20æ¡1é
åŸæ®µã«éåããã
##:#é³¥å±
ïŒå°ç¥å®®ïŒç¥ç€Ÿãšè¡šç€ºããã建ç©å
¥å£ããç¥ ã«è³ãäžèšåç©ä»¶ã¯ïŒäžäœãšããŠç¥éã®ç¥ç€Ÿæœèšã«åœãããã®ã§ïŒããã§è¡ãããŠããè«žè¡äºãïŒãã®ãããªæœèšã®æ§æ Œã«æ²¿ã£ãŠå®æçè¡äºãšããŠè¡ãããŠããã
##:#äžèšåç©ä»¶ã管çãïŒç¥äºãè¡ã£ãŠããæ°åéå£ã¯ïŒç¥äºã«äŒŽã建ç©äœ¿çšã®å¯ŸäŸ¡ãé£åçºå
äŒã«æ¯æãã»ãã¯ïŒäžèšåç©ä»¶ã®èšçœ®ã«éåžžå¿
èŠãšããã察䟡ãæ¯æãããšãªãïŒãã®èšçœ®ã«äŒŽã䟿çãé·æéã«ãããç¶ç¶çã«äº«åããŠããïŒåèšè¡çºã¯ïŒãã®çŽæ¥ã®å¹æãšããŠïŒå®æå£äœã§ããæ°åéå£ãç¥ç€Ÿãå©çšããå®æç掻åãè¡ãããšã容æã«ãããã®ã§ããã
##'''åžãé£åçºå
äŒã«å¯Ÿãåžæå°ãç¡åã§ç¥ç€Ÿæœèšã®æ·å°ãšããŠã®å©çšã«äŸããŠããè¡çºãæ²æ³ã®å®ããæ¿æåé¢ååã«éåãïŒåžé·ã«ãããŠåæœèšã®æ€å»åã³åå°ææž¡ããè«æ±ããªãããšãéæ³ã«è²¡ç£ã®ç®¡çãæ ããã®ã§ãããšããŠïŒåžã®äœæ°ãæ ãäºå®ã®éæ³ç¢ºèªãæ±ããŠããäœæ°èšŽèšã«ãããŠïŒäžèšè¡çºãéæ²ãšå€æãããå Žåã«ïŒãã®éæ²æ§ã解æ¶ããããã®ä»ã®åççã§çŸå®çãªæ段ãååšãããåŠãã«ã€ããŠå¯©çå€æããïŒåœäºè
ã«å¯Ÿãéææš©ãè¡äœ¿ããªããŸãŸïŒäžèšæ ãäºå®ãéæ³ãšããå審ã®å€æã«éæ³ããããšãããäºäŸ'''
##:åžãé£åçºå
äŒã«å¯Ÿãåžæå°ãç¡åã§ç¥ç€Ÿæœèšã®æ·å°ãšããŠã®å©çšã«äŸããŠããè¡çºãæ²æ³ã®å®ããæ¿æåé¢ååã«éåãïŒåžé·ã«ãããŠåæœèšã®æ€å»åã³åå°ææž¡ããè«æ±ããªãããšãéæ³ã«è²¡ç£ã®ç®¡çãæ ããã®ã§ãããšããŠïŒåžã®äœæ°ãæ ãäºå®ã®éæ³ç¢ºèªãæ±ããŠããäœæ°èšŽèšã«ãããŠïŒäžèšè¡çºãéæ²ãšå€æãããå Žåã«ïŒæ¬¡ã®1.ã3.ãªã©å€ç€ºã®äºæ
ã®äžã§ã¯ïŒãã®éæ²æ§ã解æ¶ããããã®ä»ã®åççã§çŸå®çãªæ段ãååšãããåŠãã«ã€ããŠå¯©çå€æããïŒåœäºè
ã«å¯Ÿãéææš©ãè¡äœ¿ããªããŸãŸïŒäžèšæ ãäºå®ãéæ³ãšããå審ã®å€æã«ã¯ïŒéæ³ãããã
##:#äžèšç¥ç€ŸæœèšãçŽã¡ã«æ€å»ãããã¹ããã®ãšããããšã¯ïŒæ°åéå£ã®åæœèšãå©çšããå®æç掻åãèããå°é£ãªãã®ã«ãïŒãã®æ§æå¡ã®ä¿¡æã®èªç±ã«é倧ãªäžå©çãåãŒããã®ãšãªãã
##:#ç¥ç€Ÿæœèšã®æ€å»åã³åå°ææž¡è«æ±ä»¥å€ã«ïŒäŸãã°åå°ã®è²äžïŒæåè²æž¡åã¯é©æ£ãªå¯ŸäŸ¡ã«ãã貞ä»ãçïŒäžèšè¡çºã®éæ²æ§ã解æ¶ããããã®ä»ã®æ段ãããåŸãããšã¯ïŒåœäºè
ã®äž»åŒµã®æç¡ã«ãããããæããã§ããã
##:#å審ã¯ïŒåœäºè
ãã»ãŒå
±éããä»ã®äœæ°èšŽèšã®å¯©çãéããŠïŒäžèšè¡çºã®éæ²æ§ã解æ¶ããããã®ä»ã®æ段ãååšããå¯èœæ§ãããïŒåžé·ãããããæ段ãè¬ããå Žåãããããšãè·åäžç¥ã£ãŠããã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=82003 財ç£ç®¡çãæ ãäºå®ã®éæ³ç¢ºèªè«æ±äºä»¶]ïŒ[[w:ç å·æ¿æåé¢èšŽèš|ç å·æ¿æåé¢èšŽèš]]ã»ç©ºç¥å€ªç¥ç€ŸèšŽèšå·®æ»å¯©äžå審 æé«è£å€æ±ºå¹³æ24幎2æ16æ¥ïŒ
#;åžãé£åçºå
äŒã«å¯Ÿãåžæå°ãç¡åã§ç¥ç€Ÿæœèšã®æ·å°ãšããŠã®å©çšã«äŸããŠããè¡çºã®éæ²æ§ã解æ¶ããããã®æ段ãšããŠïŒæ°åéå£ã«ããäžèšç¥ç€Ÿæœèšã®äžéšã®ç§»èšãæ€å»çãšäœµããŠåžãäžèšåžæå°ã®äžéšãäžèšæ°åéå£ã®æ°åç·ä»£é·ã«é©æ£ãªè³æã§è³è²žããããšãïŒæ²æ³89æ¡ïŒ20æ¡1é
åŸæ®µã«éåããªããšãããäºäŸ
#:[[#å審|åžãé£åçºå
äŒã«å¯Ÿãåžæå°ãç¡åã§ç¥ç€Ÿæœèšã®æ·å°ãšããŠã®å©çšã«äŸããŠããè¡çºãæ²æ³89æ¡ïŒ20æ¡1é
åŸæ®µã«éåããå Žå]]ã«ãããŠïŒåžãïŒäžèšç¥ç€Ÿæœèšã®æ€å»åã³äžèšåžæå°ã®ææž¡ãã®è«æ±ã®æ¹æ³ãæ¡ããã«ïŒæ°åéå£ã«ããäžèšç¥ç€Ÿæœèšã®äžéšã®ç§»èšãæ€å»çãšäœµããŠäžèšåžæå°ã®äžéšãäžèšæ°åéå£ã®æ°åç·ä»£é·ã«é©æ£ãªè³æã§è³è²žããããšã¯ïŒäžèšæ°åéå£ãåœè©²è³è²žéšåã«ãããŠäžèšç¥ç€Ÿæœèšã®äžéšãç¶æãïŒå¹Žã«æ°åçšåºŠã®ç¥äºçãä»åŸãç¶ç¶ããŠè¡ãããšã«ãªããšããŠãïŒæ¬¡ã®1.ã3.ãªã©å€ç€ºã®äºæ
ã®äžã§ã¯ïŒäžèšã®éæ²æ§ã解æ¶ããããã®æ段ãšããŠåççãã€çŸå®çã§ãã£ãŠïŒæ²æ³89æ¡ïŒ20æ¡1é
åŸæ®µã«éåããªãã
#:#
#:##äžèšè³è²žãããããšïŒäžèšæ°åéå£ãå©çšããåžæå°ã®éšåã倧å¹
ã«çž®å°ããïŒåœè©²è³è²žéšåã®ç¯å²ãå€èŠçã«ãæ確ã«ããæªçœ®ã«ããå©çšã®ç¯å²ãäºå®äžæ¡å€§ããããšãé²æ¢ãããäžïŒäžèšç¥ç€Ÿæœèšã®äžéšã®ç§»èšãæ€å»çã®æªçœ®ã«ããäžèšåžæå°ã®ä»ã®éšåããã¯äžèšç¥ç€Ÿæœèšã«é¢é£ããç©ä»¶ã衚瀺ã¯é€å»ãããããšãšãªãã
#:##äžèšæ°åéå£ãäžèš1.ã®ç§»èšãæ€å»çã®åŸã«åœéã«é¢ããŠããåœè©²è³è²žéšåã«ãããŠç¥äºçãè¡ãå Žåã«ïŒäžèšåžæå°ã®ä»ã®éšåã䜿çšããå¿
èŠã¯ãªãã
#:##äžèšç¥ç€Ÿæœèšã®å身ã¯äžèšåžæå°ãå
¬æãšãªãåãããã®äžã«ååšããŠããïŒäžèšåžæå°ãå
¬æãšãªã£ãã®ãïŒå°åŠæ ¡æ·å°ã®æ¡åŒµã«ååããçšå°æäŸè
ã«å ±ãããšããç®çã«ãããã®ã§ãã£ãã
#:#äžèšç¥ç€Ÿæœèšãå
šãŠçŽã¡ã«æ€å»ããããšïŒäžèšæ°åéå£ããããå©çšããŠããå¹³ç©ãªæ
æ§ã§è¡ã£ãŠããç¥äºçã®ç¶ç¶ãèããå°é£ã«ãªãã®ã«å¯ŸãïŒäžèšè³è²žãããããšïŒäžèšæ°åéå£ã¯åœè©²è³è²žéšåã«ãããŠåŸåãšåæ§ã®ç¥äºçãè¡ãããšãå¯èœãšãªãã
#:#äžèšè³è²žã®å®æœã¯åžè°äŒã®è°æ±ºãèŠãããã®ã§ã¯ãªãïŒäžèšè³è²žã®æ¹éã¯äžèšæ°åéå£ãé£åçºå
äŒã®æèŠèŽåãçµãŠãã®äºè§£ãåŸãäžã§çå®ããããã®ã§ããïŒè³æã®é¡ã幎3äžåäœã§ãã£ãŠïŒãã®æ¯æãå°æ¥æ»ãèç¶æ§ããããšã¯èãé£ãã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=90039 åºå®è³ç£çšç課çšå
é€æªçœ®åæ¶ïŒäœæ°èšŽèšïŒè«æ±äºä»¶]ïŒ[[w:ååå»èšŽèš|ååå»èšŽèš]] æé«è£å€æ±ºä»€å3幎2æ24æ¥ïŒ
#;åžé·ãåžã®ç®¡çããéœåžå
¬åå
ã«ååçãç¥ã£ãæœèšãææããäžè¬ç€Ÿå£æ³äººã«å¯ŸããŠåæœèšã®æ·å°ã®äœ¿çšæã®å
šé¡ãå
é€ããè¡çºãæ²æ³20æ¡3é
ã«éåãããšãããäºäŸ
#:åžé·ãåžã®ç®¡çããéœåžå
¬åå
ã®åœå
¬æå°äžã«ååçãç¥ã£ãæœèšãææããäžè¬ç€Ÿå£æ³äººã«å¯ŸããŠäžèšæœèšã®æ·å°ã®äœ¿çšæã®å
šé¡ãå
é€ããè¡çºã¯ïŒæ¬¡ã®1.ïœ5.ãªã©å€ç€ºã®äºæ
ã®äžã§ã¯ïŒäžèšæœèšã®èŠ³å
è³æºçãšããŠã®æ矩ãæŽå²ç䟡å€ãèæ
®ããŠãïŒäžè¬äººã®ç®ããèŠãŠïŒåžãäžèšæ³äººã®äžèšæœèšã«ããã掻åã«ä¿ãç¹å®ã®å®æã«å¯ŸããŠç¹å¥ã®äŸ¿çãæäŸãïŒãããæŽå©ããŠãããšè©äŸ¡ãããŠããããåŸãªããã®ã§ãã£ãŠïŒæ²æ³20æ¡3é
ã«éåããã
#:#äžèšæœèšã¯ïŒäžèšéœåžå
¬åã®ä»ã®éšåããä»åãããåºåå
ã«äžäœãšããŠèšçœ®ããïŒäžèšæœèšã®æ¬æ®¿ãšäœçœ®ä»ããããŠãã建ç©ã¯ïŒãã®å
éšã®æ£é¢ã«ã¯ååã®ååã³ç¥äœïŒç¥éãæ®ããæïŒãé
眮ããïŒå®¶æç¹æ ïŒåŠæ¥æå°±ïŒè©Šéšåæ Œçãç¥é¡ããå€ãã®äººã
ã«ããåæãåããŠããã»ãïŒäžèšå»ºç©ã®éŠçç°ãå°å
¥ããããåŠæ¥æå°±ïŒç¥é¡ïŒã«ãŒãããäžèšæœèšã§è²©å£²ãããŠããããšããã£ãã
#:#äžèšæœèšã§è¡ãããååŒã¯ïŒååã®éã®ååšãåæãšããŠïŒãããåŽãå¥ããšããå®æçæ矩ãæãããã®ã§ããïŒäžèšæœèšã®å»ºç©çã¯ïŒäžèšååŒãå®æœãããšããç®çã«åŸã£ãŠé
眮ããããã®ã§ããã
#:#åžãçå®ããäžèšéœåžå
¬ååšèŸºã®åå°å©çšèšç»æ¡ã«ãããŠã¯ïŒåèšç»æ¡ã®çå®æ¥åã«ä¿ãå§å¡äŒçã§ååçãç¥ãå»ã®å®ææ§ãåé¡èŠããæèŠããã£ãããšçãèžãŸããŠïŒåèš1.ã®å»ºç©ã建èšããäºå®ã®æ·å°ã«ã€ãäžèšæ³äººã®ææããåå°ãšã®æå°ããããªã©ããŠïŒå建ç©ãç§æå°å
ã«é
眮ããããšãèããããæšã®æŽçããããŠããã
#:#äžèšæ³äººã«å¯Ÿããäžèšæœèšã®èšçœ®èš±å¯ã«ä¿ãå çšé¢ç©ã¯1335ã¡ã§ããïŒå
é€ã®å¯Ÿè±¡ãšãªãæ·å°ã®äœ¿çšæã«çžåœããé¡ã¯å¹Žéã§576äž7200åã§ããïŒãŸãïŒäžèšèšçœ®èš±å¯ã®æéã¯3幎ã§ãããïŒå
¬åã®ç®¡çäžæ¯éããªãéãæŽæ°ãäºå®ãããŠããã
#:#äžèšæ³äººã¯ïŒäžèšæœèšã®å
¬éãåèš2.ã®ååŒã®æè¡ãå®æ¬Ÿäžã®ç®çåã¯äºæ¥ãšããŠæ²ããŠããã
#:*æ¬å€æ±ºåŸãæœèšæææ³äººã¯åžã«äœ¿çšæãæ¯æãæ·å°ãç¶ç¶ããŠäœ¿çšããã®åŸãæ·å°ã®æäŸèªäœãéæ²ãšã®èšŽãããªãããããå蚎èšã¯åæ²ã§ç¢ºå®ããã
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³|æ¥æ¬åœæ²æ³]]
|[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³#3|第3ç« åœæ°ã®æš©å©åã³çŸ©å]]
|[[æ¥æ¬åœæ²æ³ç¬¬19æ¡]]<br>ãææ³ã»è¯å¿ã®èªç±ã
|[[æ¥æ¬åœæ²æ³ç¬¬21æ¡]]<br>ãéäŒã»çµç€Ÿã»è¡šçŸã®èªç±ãæ€é²ã®çŠæ¢ãéä¿¡ã®ç§å¯ã
}}
{{stub|law}}
[[category:æ¥æ¬åœæ²æ³|20]] | 2023-04-19T22:59:23Z | 2023-10-07T20:02:00Z | [
"ãã³ãã¬ãŒã:Wikipedia",
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E6%97%A5%E6%9C%AC%E5%9B%BD%E6%86%B2%E6%B3%95%E7%AC%AC20%E6%9D%A1 |
37,596 | æ¥æ¬åœæ²æ³ç¬¬21æ¡ | æ³åŠ>æ²æ³>æ¥æ¬åœæ²æ³>ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³
ãéäŒã»çµç€Ÿã»è¡šçŸã®èªç±ãæ€é²ã®çŠæ¢ãéä¿¡ã®ç§å¯ã
è¡šçŸã®èªç±ãåç
§ã
æ€é²ãšäºåæå¶ã®çŠæ¢ãåç
§ã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ²æ³>æ¥æ¬åœæ²æ³>ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ãéäŒã»çµç€Ÿã»è¡šçŸã®èªç±ãæ€é²ã®çŠæ¢ãéä¿¡ã®ç§å¯ã",
"title": "æ¡æ"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "è¡šçŸã®èªç±ãåç
§ã",
"title": "解説"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "æ€é²ãšäºåæå¶ã®çŠæ¢ãåç
§ã",
"title": "解説"
}
] | æ³åŠïŒæ²æ³ïŒæ¥æ¬åœæ²æ³ïŒã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³ | [[æ³åŠ]]ïŒ[[æ²æ³]]ïŒ[[æ¥æ¬åœæ²æ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³]]
==æ¡æ==
ãéäŒã»çµç€Ÿã»è¡šçŸã®èªç±ãæ€é²ã®çŠæ¢ãéä¿¡ã®ç§å¯ã
;第21æ¡
#éäŒãçµç€Ÿåã³èšè«ãåºçãã®ä»äžåã®è¡šçŸã®èªç±ã¯ããããä¿éããã
#æ€é²ã¯ããããããŠã¯ãªããªããéä¿¡ã®ç§å¯ã¯ãããã䟵ããŠã¯ãªããªãã
==解説==
{{wikipedia|æ¥æ¬åœæ²æ³ç¬¬21æ¡}}
===è¡šçŸã®èªç±===
'''[[è¡šçŸã®èªç±]]'''ãåç
§ã
===æ€é²ã®çŠæ¢ã»éä¿¡ã®ç§å¯===
'''[[æ€é²ãšäºåæå¶ã®çŠæ¢]]'''ãåç
§ã
====æ€é²ãšã¯====
:ãè¡æ¿æš©ãäž»äœãšãªã€ãŠãææ³å
容çã®è¡šçŸç©ã察象ãšãããã®å
šéšåã¯äžéšã®çºè¡šã®çŠæ¢ãç®çãšããŠã察象ãšãããäžå®ã®è¡šçŸç©ã«ã€ã網çŸ
çäžè¬çã«ãçºè¡šåã«ãã®å
容ã審æ»ãããããäžé©åœãšèªãããã®ã®çºè¡šãçŠæ¢ããããšãããã®ç¹è³ªãšããŠåãããã®ã(ã[[w:æå¹çšé¢æ€æ»äºä»¶|æå¹çšé¢æ€æ»äºä»¶]]ã[[#æå€æå59幎12æ12æ¥|æå€æå59幎12æ12æ¥]])
:ãè¡šçŸç©ã®å
容ã®ç¶²çŸ
çäžè¬çãªå¯©æ»ã«åºã¥ãäºåèŠå¶ãè¡æ¿æ©é¢ã«ããããèªäœãç®çãšããŠè¡ãããå ŽåãïŒã[[w:åæ¹ãžã£ãŒãã«äºä»¶|åæ¹ãžã£ãŒãã«äºä»¶]]ã[[#åæ¹ãžã£ãŒãã«|æå€æå61幎6æ11æ¥]]ïŒ
:*äž»äœ: è¡æ¿æ©é¢
:*è¡çº: 察象ãšãããäžå®ã®è¡šçŸç©ã«ã€ã網çŸ
çäžè¬çã«ãçºè¡šåã«ãã®å
容ã審æ»ãããããäžé©åœãšèªãããã®ã®çºè¡šãçŠæ¢ããããš/è¡šçŸç©ã®å
容ã®ç¶²çŸ
çäžè¬çãªå¯©æ»ã«åºã¥ãäºåèŠå¶
:*:ã網çŸ
çäžè¬çãªå¯©æ»ã
:*ç®ç: ãã®å
šéšåã¯äžéšã®çºè¡šã®çŠæ¢/äºåèŠå¶
==åç
§æ¡æ==
==å€äŸ==
#[http://www.courts.go.jp/search/jhsp0030?hanreiid=57207&hanreiKbn=02 éåå¥çŽè§£é€ç¡å¹ç¢ºèªä¿žçµŠæ¯æè«æ±]ïŒæé«è£å€æ±º æå27幎02æ22æ¥ïŒ[[æ¥æ¬åœæ²æ³ç¬¬19æ¡]],[[æ¥æ¬åœæ²æ³ç¬¬21æ¡]]
#;æ¿æ²»æŽ»åãããªãããšãæ¡ä»¶ãšããéåå¥çŽãšåºæ¬ç人暩ã®å¶é
#:æ²æ³ã§ä¿éãããããããåºæ¬ç人暩ã絶察ã®ãã®ã§ã¯ãªããèªå·±ã®èªç±ææã«åºãç¹å¥ãªå
¬æ³é¢ä¿ãŸãã¯ç§æ³é¢ä¿äžã®çŸ©åã«ãã€ãŠå¶éãåãããã®ã§ãã€ãŠãèªå·±ã®èªç±ææã«ãããæ ¡å
ã«ãããŠæ¿æ²»æŽ»åãããªãããšãæ¡ä»¶ãšããŠæå¡ãšããŠåŠæ ¡ã«éãããå Žåã«ã¯ããã®å¥çŽã¯ç¡å¹ã§ã¯ãªãã
#<span id="ãã£ã¿ã¬ãŒäºä»¶"/>[https://www.courts.go.jp/app/hanrei_jp/detail2?id=51271 ç¥è€»ææžè²©å£²]ïŒ[[w:ãã£ã¿ã¬ãŒäºä»¶|ãã£ã¿ã¬ãŒäºä»¶]] æé«è£å€æ±ºæå32幎3æ13æ¥åé11å·»3å·997é ïŒ[[åæ³ç¬¬175æ¡|åæ³175æ¡]], [[åæ³ç¬¬38æ¡|åæ³38æ¡]]1é
ïŒ[[æ¥æ¬åœæ²æ³ç¬¬76æ¡|æ²æ³76æ¡]]3é
ïŒåºçæ³ïŒææ²»26幎æ³åŸ15å·ïŒ27æ¡ïŒ[[åäºèšŽèšæ³ç¬¬400æ¡|å蚎æ³400æ¡]]
##'''åæ³ç¬¬175æ¡ã«ãããããç¥è€»ææžãã®æå³'''
##:åæ³ç¬¬175æ¡ã«ãããããç¥è€»ææžããšã¯ããã®å
容ãåŸãã«æ§æ¬²ãè奮åã¯åºæããããäžã€ãæ®é人ã®æ£åžžãªæ§ççŸæ¥å¿ã害ããåè¯ãªæ§çé矩芳念ã«åããææžãããã
##'''ãç¥è€»ææžãã«åœããã©ããã¯äºå®åé¡ãæ³åŸåé¡ãã'''
##:ææžããç¥è€»ææžãã«åœããã©ããã®å€æã¯ãåœè©²ææžã«ã€ããŠãªãããäºå®èªå®ã®åé¡ã§ãªããæ³è§£éã®åé¡ã§ããã
##'''ãç¥è€»ææžãã«åœããã©ããã®å€æã®åºæºã'''
##:ææžãããç¥è€»ææžãã«åœããã©ããã¯ãäžè¬ç€ŸäŒã«ãããŠè¡ãããŠããè¯èãããªãã¡ã瀟äŒé念ã«åŸã€ãŠå€æãã¹ããã®ã§ããã
##'''瀟äŒé念ãšã¯äœãã'''
##:瀟äŒé念ã¯ãåã
人ã®èªèã®éååã¯ãã®å¹³åå€ã§ãªãããããè¶
ããéå£æèã§ãããåã
人ãããã«åããèªèããã€ããšã«ãã€ãŠåŠå®ããããã®ã§ãªãã
##'''åæ³ç¬¬175æ¡ã«ãããããç¥è€»ææžãã«åœãäžäºäŸã'''
##:ã®ç¿»èš³ã«ããããæå25幎4æ2æ¥æ ªåŒäŒç€Ÿå°å±±æžåºçºè¡ã®ããã€ã¿ã¬ã€å€«äººã®æ人ãäžãäžäºå·»ïŒãã¬ã³ã¹éžéïŒã»ïŒïŒã¯ãåæ³ç¬¬175æ¡ã«ããããç¥è€»ææžã«åœãã
##'''èžè¡çäœåãšç¥è€»æ§ã'''
##:èžè¡çäœåã§ãã€ãŠãç¥è€»æ§ãæããå Žåãããã
##'''ç¥è€»æ§ã®ååŠãšäœè
ã®äž»èŠ³çæå³ã'''
##:ç¥è€»æ§ã®ååŠã¯ãåœè©²äœåèªäœã«ãã€ãŠå®¢èŠ³çã«å€æãã¹ããã®ã§ãã€ãŠãäœè
ã®äž»èŠ³çæå³ã«ãã€ãŠåœ±é¿ããããã®ã§ã¯ãªãã
##'''åæ³ç¬¬175æ¡ã«èŠå®ããç¥è€»ææžè²©å£²çœªã«ãããç¯æã'''
##:åæ³ç¬¬175æ¡ã«èŠå®ããç¥è€»ææžè²©å£²çœªã®ç¯æããããšããããã«ã¯ãåœè©²èšèŒã®ååšã®èªèãšãããé åžã販売ããããšã®èªèãããã°è¶³ãããããèšèŒã®ããææžãåæ¡æå®ã®ç¥è€»æ§ãå
·åãããã©ããã®èªèãŸã§å¿
èŠãšãããã®ã§ã¯ãªãã
##'''æ²æ³ç¬¬21æ¡ã«ä¿éããè¡šçŸã®èªç±ãšå
Œ
±ã®çŠç¥ã'''
##:æ²æ³ç¬¬21æ¡ã®ä¿éããè¡šçŸã®èªç±ãšããã©ã絶察ç¡å¶éã®ãã®ã§ã¯ãªããå
Œ
±ã®çŠç¥ã«åããããšã¯èš±ãããªãã
##'''æ§åºçæ³ç¬¬27æ¡ãšåæ³ç¬¬175æ¡ãšã®é¢ä¿ã'''
##:æ§åºçæ³ç¬¬27æ¡ãšåæ³ç¬¬175æ¡ãšã¯ç¹å¥æ³ãšæ®éæ³ã®é¢ä¿ã«ããã
##'''æ²æ³ç¬¬21æ¡ç¬¬2é
ã«ããæ€é²ã®çŠæ¢ãšç¥è€»ææžè²©å£²çœªã'''
##:æ²æ³ç¬¬21æ¡ç¬¬2é
ã«ãã€ãŠäºåã®æ€é²ãçŠæ¢ãããããšã«ãã€ãŠãç¥è€»ææžã®é åžã販売ãçŠæ¢ãåŸãªããªã€ããã®ã§ã¯ãªãã
##'''æ²æ³ç¬¬76æ¡ç¬¬3é
ã«ããè£å€å®ãè¯å¿ã«åŸããšã®æå³ã'''
##:æ²æ³ç¬¬76æ¡ç¬¬3é
ã«ããè£å€å®ãè¯å¿ã«åŸããšã¯ãè£å€å®ãæ圢ãç¡åœ¢ã®å€éšã®å§è¿«ãªããèªæã«å±ããªãã§èªå·±ã®å
å¿ã®è¯èãšé埳æã«åŸãæå³ã§ããã
#<span id="æªåŸ³ã®æ ãäºä»¶"/>[https://www.courts.go.jp/app/files/hanrei_jp/747/050747_hanrei.pdf âç¥è€»ææžè²©å£²ãåææ]([[w:æªåŸ³ã®æ ãäºä»¶|æªåŸ³ã®æ ãäºä»¶]] æé«è£å€æ±º æå44幎10æ15æ¥)[[åæ³ç¬¬175æ¡|åæ³175æ¡]]ïŒ[[æ¥æ¬åœæ²æ³ç¬¬23æ¡|æ²æ³23æ¡]]ïŒ[[åäºèšŽèšæ³ç¬¬400æ¡|å蚎æ³400æ¡]]
##'''èžè¡çææ³ç䟡å€ã®ããææžãšç¥è€»æ§'''
##:èžè¡çã»ææ³ç䟡å€ã®ããææžã§ãã€ãŠãããããç¥è€»æ§ãæãããã®ãšããããšã¯ããã€ãããªãã
##'''ææžã®éšåã«ã€ããŠã®ç¥è€»æ§ãšææžå
šäœãšã®é¢ä¿'''
##:ææžã®åã
ã®ç« å¥ã®éšåã®ç¥è€»æ§ã®æç¡ã¯ãææžå
šäœãšã®é¢é£ã«ãããŠå€æãããªããã°ãªããªãã
##'''æ²æ³21æ¡ã»23æ¡ãšå
Œ
±ã®çŠç¥'''
##:æ²æ³21æ¡ã®è¡šçŸã®èªç±ãåæ³23æ¡ã®åŠåã®èªç±ã¯ã絶察ç¡å¶éãªãã®ã§ã¯ãªããå
Œ
±ã®çŠç¥ã®å¶éã®äžã«ç«ã€ãã®ã§ããã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=53255 âåšçæéæŽæ°äžèš±å¯åŠååæ¶]([[w:ãã¯ãªãŒã³äºä»¶|ãã¯ãªãŒã³äºä»¶]] æé«è£å€æ±º æå45幎06æ24æ¥)
#:â[[æ¥æ¬åœæ²æ³ç¬¬10æ¡#ãã¯ãªãŒã³äºä»¶|æ²æ³ç¬¬10æ¡å€äŸç¯åç
§]]
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=50906 è·æ¥å®å®æ³éå]([[w:å
šèŸ²æèŠè·æ³äºä»¶|å
šèŸ²æèŠè·æ³äºä»¶]] æé«è£å€æ±º æå48幎4æ25æ¥ åé12å·»7å·1351é )[[æ¥æ¬åœæ²æ³ç¬¬28æ¡|æ²æ³28æ¡]]ã[[æ¥æ¬åœæ²æ³ç¬¬18æ¡|æ²æ³18æ¡]]ã[[æ¥æ¬åœæ²æ³ç¬¬31æ¡|æ²æ³31æ¡]]ãåœå®¶å
¬åå¡æ³ïŒæå40幎æ³åŸç¬¬69å·ã«ããæ¹æ£åã®ãã®ïŒ98æ¡5é
ïŒçŸã»[[åœå®¶å
¬åå¡æ³ç¬¬98æ¡]]第2é
ïŒã110æ¡1é
17å·ïŒçŸã»[[åœå®¶å
¬åå¡æ³ç¬¬111æ¡ã®2]]第1å·ïŒ
#*[[åœå®¶å
¬åå¡æ³ç¬¬98æ¡]]第2é
#*:è·å¡ã¯ãæ¿åºã代衚ãã䜿çšè
ãšããŠã®å
¬è¡ã«å¯ŸããŠåç眷æ¥ãæ æ¥ãã®ä»ã®äºè°è¡çºããªããåã¯æ¿åºã®æŽ»åèœçãäœäžãããæ æ¥çè¡çºãããŠã¯ãªããªããåãäœäººãããã®ãããªéæ³ãªè¡çºãäŒãŠãåã¯ãã®éè¡ãå
±è¬ããããã®ãããè¥ããã¯ããã€ãŠã¯ãªããªãã
#*[[åœå®¶å
¬åå¡æ³ç¬¬111æ¡ã®2]]
#*:次ã®åå·ã®ããããã«è©²åœããè
ã¯ã3幎以äžã®çŠé®åã¯100äžå以äžã®çœ°éã«åŠããã
#*:#äœäººãããåãã第98æ¡ç¬¬2é
å段ã«èŠå®ããéæ³ãªè¡çºã®éè¡ãå
±è¬ããåããè¥ããã¯ããããåã¯ãããã®è¡çºãäŒãŠãè
##'''åœå®¶å
¬åå¡æ³98æ¡5é
ã110æ¡1é
17å·ã®åæ²æ§'''
##:åœå®¶å
¬åå¡æ³98æ¡5é
ã110æ¡1é
17å·ã¯æ²æ³28æ¡ã«ãåœå®¶å
¬åå¡æ³110æ¡1é
17å·ã¯æ²æ³18æ¡ã21æ¡ã31æ¡ã«éåããªãã
##'''åœå®¶å
¬åå¡æ³110æ¡1é
17å·ã«ãããããããããã³ãäŒãŠãã®æ矩'''
##:åœå®¶å
¬åå¡æ³110æ¡1é
17å·ã«ããããããããšã¯ãåæ³98æ¡5é
å段ã«èŠå®ããéæ³è¡çºãå®è¡ãããç®çããã€ãŠãä»äººã«å¯Ÿãããã®è¡çºãå®è¡ãã決æãçãããããããªããŸãã¯ããã§ã«çããŠãã決æãå©é·ããããããªå¢ãã®ããåºæ¿ãäžããããšãããããäŒãŠããšã¯ãå³éæ³è¡çºãå
±è¬ããããã®ããããŸãã¯ããããè¡çºã®éè¡ãèšç»æºåããããšã§ãã€ãŠãéæ³è¡çºçºçã®å±éºæ§ãå
·äœçã«çãããšèªãããç¶æ
ã«éãããã®ãããã
##'''åœå®¶å
¬åå¡æ³98æ¡5é
ã110æ¡1é
17å·ã®æ³æ'''
##:åœå®¶å
¬åå¡æ³98æ¡5é
ã110æ¡1é
17å·ã¯ãå
¬åå¡ã®äºè°è¡çºã®ãã¡åæ³ã«ãã€ãŠéæ³ãšããããã®ãšãããªããã®ãšãåºå¥ããããã«éæ³ãšãããäºè°è¡çºã«ã€ããŠãéæ³æ§ã®åŒ·ããã®ãšåŒ±ããã®ãšãåºå¥ãããããåäºå¶è£ãç§ããã®ã¯ãã®ãã¡éæ³æ§ã®åŒ·ãäºè°è¡çºã«éããã®ãšãããããã¯ããããè¡çºçã«ã€ããäºè°è¡çºã®äŒç»ãå
±è¬ã説åŸãæ
«æ
ãæ什çãäºè°è¡çºã«ããããéåžžé䌎ãããã®ãšããŠäºè°è¡çºèªäœãšåäžèŠãããããåäºå¶è£ã®å¯Ÿè±¡ããé€ããã®ãšãã趣æšã§ã¯ãªãã
##'''æ¿æ²»çç®çã®ããã®äºè°è¡çºãšæ²æ³28æ¡'''
##:ç§äŒæ¥ã®åŽåè
ã§ãããšãå
¬åå¡ãå«ããã®ä»ã®å€åŽè
ã§ãããšãåããã䜿çšè
ã«å¯Ÿããçµæžçå°äœã®åäžã®èŠè«ãšã¯çŽæ¥é¢ä¿ã®ãªãèŠå¯å®è·åå·è¡æ³ã®æ¹æ£ã«å¯Ÿããå察ã®ãããªæ¿æ²»çç®çã®ããã«äºè°è¡çºãè¡ãªãããšã¯ãæ²æ³28æ¡ãšã¯ç¡é¢ä¿ãªãã®ã§ããã
#<span id="æå€æå59幎12æ12æ¥"/>[https://www.courts.go.jp/app/hanrei_jp/detail2?id=62891 ç°è°ç³åºæ£åŽæ±ºå®åæ¶]([[w:æå¹çšé¢æ€æ»äºä»¶|æå¹çšé¢æ€æ»äºä»¶]] æé«è£å€æ±º æå59幎12æ12æ¥)
##'''æ²æ³21æ¡2é
å段ã®æ€é²çŠæ¢ã®è¶£æš'''
##:æ²æ³21æ¡2é
å段ã®æ€é²çŠæ¢ã¯ãå
Œ
±ã®çŠç¥ãçç±ãšããäŸå€ã®èš±å®¹ããèªããªã趣æšãšè§£ãã¹ãã§ããã
##'''æ²æ³21æ¡2é
ã«ãããæ€é²ã'''
##:æ²æ³21æ¡2é
ã«ãããæ€é²ããšã¯ãè¡æ¿æš©ãäž»äœãšãªã€ãŠãææ³å
容çã®è¡šçŸç©ã察象ãšãããã®å
šéšåã¯äžéšã®çºè¡šã®çŠæ¢ãç®çãšããŠã察象ãšãããäžå®ã®è¡šçŸç©ã«ã€ã網çŸ
çäžè¬çã«ãçºè¡šåã«ãã®å
容ã審æ»ãããããäžé©åœãšèªãããã®ã®çºè¡šãçŠæ¢ããããšãããã®ç¹è³ªãšããŠåãããã®ãæããšè§£ãã¹ãã§ããã
##'''é¢çšå®çæ³21æ¡2é
3å·æå®ã®ç©ä»¶ã«é¢ããçšé¢æ€æ»ãšæ²æ³21æ¡2é
ã«ãããæ€é²ã'''
##:é¢çšå®çæ³21æ¡1é
3å·æå®ã®ç©ä»¶ã«é¢ãã茞å
¥æç¶ã«ãããŠçšé¢è·å¡ãè¡ãæ€æ»ã¯ãæ²æ³21æ¡2é
ã«ãããæ€é²ãã«ããããªãã
##:#茞å
¥ãçŠæ¢ãããè¡šçŸç©ã¯ãäžè¬ã«ãåœå€ã«ãããŠã¯æ¢ã«çºè¡šæžã¿ã®ãã®ã§ãã€ãŠããã®èŒžå
¥ãçŠæ¢ãããããšãã€ãŠãããã¯ãåœè©²è¡šçŸç©ã«ã€ããäºåã«çºè¡šãã®ãã®ãäžåçŠæ¢ãããšãããã®ã§ã¯ãªãããŸããåœè©²è¡šçŸç©ã¯ã茞å
¥ãçŠæ¢ãããã ãã§ãã€ãŠãçšé¢ã«ãã没åãå»æ£ãããããã§ã¯ãªããããçºè¡šã®æ©äŒãå
šé¢çã«å¥ªãããŠããŸããšããããã®ãã®ã§ããªãã
##:#çšé¢æ€æ»ã¯ãé¢çšåŸŽåæç¶ã®äžç°ãšããŠãããã«ä»éããŠè¡ããããã®ã§ãææ³å
容çã®è¡šçŸç©ã«éãããåºã茞å
¥ããã貚ç©åã³èŒžå
¥ãããéµäŸ¿ç©äžã®ä¿¡æžä»¥å€ã®ç©ã®å
šè¬ã察象ãšããäžå·ç©ä»¶ã«ã€ããŠããå³ã®ãããªä»éçæç¶ã®äžã§å®¹æã«å€å®ãåŸãéãã«ãããŠå¯©æ»ããããšãããã®ã«ããããææ³å
容çããèªäœã網çŸ
çã«å¯©æ»ãèŠå¶ããããšãç®çãšãããã®ã§ã¯ãªãã
##:#çšé¢ã¯ãé¢çšã®ç¢ºå®åã³åŸŽåãæ¬æ¥ã®è·åå
容ãšããæ©é¢ã§ãã€ãŠãç¹ã«ææ³å
容çã察象ãšããŠãããèŠå¶ããããšãç¬èªã®äœ¿åœãšãããã®ã§ã¯ãªãããŸããææ³å
容çã®è¡šçŸç©ã«ã€ãçšé¢é·ã®éç¥ãããããšãã¯åžæ³å¯©æ»ã®æ©äŒãäžããããŠããã®ã§ãã€ãŠãè¡æ¿æš©ã®å€æãæçµçãªãã®ãšãããããã§ã¯ãªãã
##'''é¢çšå®çæ³21æ¡2é
3å·ã®èŠå®ã«ããç¥è€»è¡šçŸç©ã®èŒžå
¥èŠå¶ãšæ²æ³21æ¡1é
'''
##:é¢çšå®çæ³21æ¡1é
3å·ã®èŠå®ã«ããç¥è€»è¡šçŸç©ã®èŒžå
¥èŠå¶ã¯ãæ²æ³21æ¡1é
ã«éåããªãã
##:*è¡šçŸã®èªç±ã¯ãæ²æ³ã®ä¿éããåºæ¬ç人暩ã®äžã§ãç¹ã«éèŠèŠãããã¹ããã®ã§ãããããããšãŠçµ¶å¯Ÿç¡å¶éãªãã®ã§ã¯ãªããå
Œ
±ã®çŠç¥ã«ããå¶éã®äžã«ããããšã¯ããããŸã§ããªãããŸããæ§ç秩åºãå®ããæå°é床ã®æ§é埳ãç¶æããããšã¯å
Œ
±ã®çŠç¥ã®å
容ããªããã®ã§ãã€ãŠãç¥è€»ææžã®é åžçã¯å
Œ
±ã®çŠç¥ã«åãããã®ã§ããããããåŠçœ°ã®å¯Ÿè±¡ãšããããšãè¡šçŸã®èªç±ã«é¢ããæ²æ³21æ¡1é
ã®èŠå®ã«éåãããã®ã§ãªãããšããæããã§ããïŒ[[#ãã£ã¿ã¬ãŒäºä»¶|æé«è£æå32幎3æ18æ¥å€§æ³å»·å€æ±º]]ã[[#æªåŸ³ã®æ ãäºä»¶ä»¶|æé«è£æå44幎10æ15æ¥å€§æ³å»·å€æ±º]]åç
§ïŒããããŠãããåœå
ã«ãããå¥å
šãªæ§ç颚ä¿ãç¶æ確ä¿ããèŠå°ãããããšãã¯ãç¥è€»è¡šçŸç©ãã¿ã ãã«åœå€ããæµå
¥ããããšãé»æ¢ããããšã¯ãå
Œ
±ã®çŠç¥ã«åèŽãããã®ã§ãããç¥è€»åè¡ç©ãæµåžåååŒãçŠæ¢ãçºãåœéæ¡çŽïŒæå11幎æ¡çŽç¬¬3å·ïŒ1æ¡ã®èŠå®ãç· çŽåœã«é åžçãç®çãšããç¥è€»ãªç©åã®èŒžå
¥è¡çºçãåŠçœ°ããããšã矩åã¥ããŠããããšãã䜵ãèãããšãè¡šçŸã®èªç±ã«é¢ããæ²æ³ã®ä¿éãããã®éãã«ãããŠå¶çŽãåããã
##'''è¡šçŸã®èªç±ãèŠå¶ããæ³åŸã®èŠå®ã«ã€ããŠ[[åæ²éå®è§£é|éå®è§£é]]ãããããšãèš±ãããå Žå'''
##:è¡šçŸã®èªç±ãèŠå¶ããæ³åŸã®èŠå®ã«ã€ããŠ[[åæ²éå®è§£é|éå®è§£é]]ãããããšãèš±ãããã®ã¯ããã®è§£éã«ãããèŠå¶ã®å¯Ÿè±¡ãšãªããã®ãšããã§ãªããã®ãšãæ確ã«åºå¥ããããã€ãåæ²çã«èŠå¶ããããã®ã®ã¿ãèŠå¶ã®å¯Ÿè±¡ãšãªãããšãæããã«ãããå Žåã§ãªããã°ãªããããŸããäžè¬åœæ°ã®ç解ã«ãããŠãå
·äœçå Žåã«åœè©²è¡šçŸç©ãèŠå¶ã®å¯Ÿè±¡ãšãªããã©ããã®å€æãå¯èœãªãããããããªåºæºããã®èŠå®ããèªã¿ãšãããšãã§ãããã®ã§ãªããã°ãªããªãã
##:*éå®è§£éãããããšãèš±ãããããã«ã¯ä»¥äžã®äºã€ã®èŠä»¶ãæºããå¿
èŠãããã
##:*#ãã®è§£éã«ããïŒèŠå¶ã®å¯Ÿè±¡ãšãªããã®ãšããã§ãªããã®ãšãæ確ã«åºå¥ããïŒãã€ïŒåæ²çã«èŠå¶ããããã®ã®ã¿ãèŠå¶ã®å¯Ÿè±¡ãšãªãããšãæããã«ãããå Žåã§ããããšã
##:*#äžè¬åœæ°ã®ç解ã«ãããŠïŒå
·äœçå Žåã«åœè©²è¡šçŸç©ãèŠå¶ã®å¯Ÿè±¡ãšãªããã©ããã®å€æãå¯èœãªãããããããªåºæºããã®èŠå®ããèªã¿ãšãããšãã§ãããã®ã§ããããšã
##'''é¢çšå®çæ³21æ¡2é
3å·ã®ã颚ä¿ã害ãã¹ãæžç±ãå³ç»ãçãšã®èŠå®ã®æ矩åã³ãã®åæ²æ§'''
##:é¢çšå®çæ³21æ¡1é
3å·ã®ã颚ä¿ã害ãã¹ãæžç±ãå³ç»ãçãšã¯ãç¥è€»ãªæžç±ãå³ç»çãæããã®ãšè§£ãã¹ãã§ãããå³èŠå®ã¯åºæ±åã¯äžæ確ã®æ
ã«æ²æ³21æ¡1é
ã«éåãããã®ã§ã¯ãªãã
##:*[[w:äŒè€æ£å·±|äŒè€æ£å·±]]è£å€å®ä»4è£å€å®ã«ããå察æèŠïŒ[[é床ã«åºæ±æ§ããç¡å¹ã®æ³ç]]ïŒ
##:**è¡šçŸã®èªç±ãèŠå¶ããæ³åŸã®èŠå®ã¯ãããèªäœæ確ãªåºæºã瀺ããã®ã§ãªããã°ãªããªããæ®ã«ãè¡šçŸã®èªç±ã®èŠå¶ãäºåã®ãã®ã§ããå Žåã«ã¯ããã®èŠå®ã¯ãç«æ³äžå¯èœãªéãæ確ãªåºæºã瀺ããã®ã§ããããšãå¿
èŠã§ãããããæ
ãè¡šçŸã®èªç±ãèŠå¶ããæ³åŸã®èŠå®ããåœæ°ã«å¯ŸãäœãèŠå¶ã®å¯Ÿè±¡ãšãªãã®ãã«ã€ããŠé©æ£ãªåç¥ãããæ©èœãæããåŸãããŸããèŠå¶æ©é¢ã®æ£æçãªé©çšãèš±ãäœå°ãããçšã«äžæ確ãªå Žåã«ã¯ããã®èŠå®ã¯æ²æ³21æ¡1é
ã«éåããç¡å¹ã§ãããšå€æãããªããã°ãªããªãã
##:**è¡šçŸã®èªç±ãèŠå¶ããæ³åŸã®èŠå®ã®é©çšç¯å²ãåºæ±ã«éããå³èŠå®ãæ¬æ¥èŠå¶ã®èš±ãããã¹ãã§ãªãå Žåã«ãŸã§é©çšãããå¯èœæ§ãç¡èŠãåŸãªãå Žåã«ã¯ããã¯ãæ²æ³21æ¡1é
ã«ãã€ãŠéæ²ç¡å¹ãšå€æãããªããã°ãªããªãã
##:**åå·ã®ã颚ä¿ã害ãã¹ãæžç±ãå³ç»ãçãšããèŠå®ã¯ãäžæ確ã§ãããšåæã«åºæ±ã«éãããã®ã§ããããã€ããããæ¬æ¥èŠå¶ã®èš±ãããã¹ãã§ãªãå Žåã«ãé©çšãããå¯èœæ§ãç¡èŠãåŸãªããšèãããããããæ²æ³21æ¡1é
ã«éåããç¡å¹ã§ãããšãããªããã°ãªããªãã
##:**:ã颚ä¿ããšããçšèªã®æå³å
容ã¯æ§ç颚ä¿ã瀟äŒç颚ä¿ãå®æç颚ä¿çå€çŸ©ã«ããããã®ã§ããããããå€æ°æèŠã®ããããã«æ§ç颚ä¿ã«éå®ããã颚ä¿ã害ãã¹ãæžç±ãå³ç»ãçãç¥è€»è¡šçŸç©ã«éããšè§£ãã¹ãæ ¹æ ã¯ãªããçŸåšã®çšé¢æ€æ»ã®å®åã«ãããŠã¯ã被äžå人ã®èªé³ããåŠããå³ã®æžç±ãå³ç»çãç¥è€»ç©ã«éå®ããåæ±ãããããŠãããšããŠãããã®æèšèªäœããã¿ãã°ãå³èŠå®ãç¥è€»ç©ä»¥å€ã®ç©ã«é©çšãããå¯èœæ§ãåŠå®ããããšã¯ã§ããªãã
#<span id="åæ¹ãžã£ãŒãã«"/>[https://www.courts.go.jp/app/hanrei_jp/detail2?id=52665 æå®³è³ å]([[w:åæ¹ãžã£ãŒãã«äºä»¶|åæ¹ãžã£ãŒãã«äºä»¶]] æé«è£å€æ±º æå61幎6æ11æ¥ æ°é40å·»4å·872é )[[æ¥æ¬åœæ²æ³ç¬¬13æ¡|æ²æ³13æ¡]]
##'''åºçç©ã®å°å·ã補æ¬ã販売ãé åžçã®ä»®åŠåã«ããäºåå·®æ¢ããšæ²æ³21æ¡2é
å段ã«ããæ€é²'''
##:éèªãã®ä»ã®åºçç©ã®å°å·ã補æ¬ã販売ãé åžçã®ä»®åŠåã«ããäºåå·®æ¢ãã¯ãæ²æ³21æ¡2é
å段ã«ããæ€é²ã«åœãããªãã
##:*äžå®ã®èšäºãæ²èŒããéèªãã®ä»ã®åºçç©ã®å°å·ã補æ¬ã販売ãé åžçã®ä»®åŠåã«ããäºåå·®æ¢ãã¯ãè£å€ã®åœ¢åŒã«ãããšã¯ãããå£é åŒè«ãªããåµåè
ã®å¯©å°ãå¿
èŠçãšãããç«èšŒã«ã€ããŠãçæã§è¶³ãããšãããŠãããªã©ç°¡ç¥ãªæç¶ã«ãããã®ã§ããããŸããããããæºè¶³çä»®åŠåãšããŠäºãã®ããæš©å©é¢ä¿ãæ«å®çã«èŠåŸãããã®ã§ãã€ãŠãéèšçãªèŠçŽ ãæããããšãåŠå®ããããšã¯ã§ããªãããä»®åŠåã«ããäºåå·®æ¢ãã¯ãè¡šçŸç©ã®å
容ã®ç¶²çŸ
çäžè¬çãªå¯©æ»ã«åºã¥ãäºåèŠå¶ãè¡æ¿æ©é¢ã«ããããèªäœãç®çãšããŠè¡ãããå Žåãšã¯ç°ãªããåå¥çãªç§äººéã®çŽäºã«ã€ããŠãåžæ³è£å€æã«ãããåœäºè
ã®ç³è«ã«åºã¥ãå·®æ¢è«æ±æš©çã®ç§æ³äžã®è¢«ä¿å
šæš©å©ã®ååŠãä¿å
šã®å¿
èŠæ§ã®æç¡ã審çå€æããŠçºãããããã®ã§ãã€ãŠãå³å€ç€ºã«ãããæ€é²ãã«ã¯åœãããªããã®ãšããã¹ãã§ããã
##'''åèªäŸµå®³ãšäŸµå®³è¡çºã®å·®æ¢è«æ±æš©'''
##:åèªäŸµå®³ã®è¢«å®³è
ã¯ãäººæ Œæš©ãšããŠã®åèªæš©ã«åºã¥ããå 害è
ã«å¯ŸããŠãçŸã«è¡ãããŠãã䟵害è¡çºãæé€ããåã¯å°æ¥çãã¹ã䟵害ãäºé²ããããã䟵害è¡çºã®å·®æ¢ããæ±ããããšãã§ããã
##'''å
¬åå¡åã¯å
¬è·éžæã®åè£è
ã«å¯Ÿããè©äŸ¡ãæ¹å€çã«é¢ããåºçç©ã®å°å·ã補æ¬ã販売ãé åžçã®äºåå·®æ¢ãã®èš±åŠ'''
##:äººæ Œæš©ãšããŠã®åèªæš©ã«åºã¥ãåºçç©ã®å°å·ã補æ¬ã販売ãé åžçã®äºåå·®æ¢ãã¯ãå³åºçç©ãå
¬åå¡åã¯å
¬è·éžæã®åè£è
ã«å¯Ÿããè©äŸ¡ãæ¹å€çã«é¢ãããã®ã§ããå Žåã«ã¯ãååãšããŠèš±ãããããã®è¡šçŸå
容ãçå®ã§ãªããåã¯å°ãå
¬çãå³ãç®çã®ãã®ã§ãªãããšãæçœã§ãã€ãŠããã€ã被害è
ãé倧ã«ããŠèããå埩å°é£ãªæ害ã被ãèããããšãã«éããäŸå€çã«èš±ãããã
##'''å
Œ
±ã®å©å®³ã«é¢ããäºé
ã«ã€ããŠã®è¡šçŸè¡çºã®äºåå·®æ¢ããä»®åŠåã«ãã€ãŠåœããå Žåãšå£é åŒè«åã¯åµåè
審å°'''
##:å
Œ
±ã®å©å®³ã«é¢ããäºé
ã«ã€ããŠã®è¡šçŸè¡çºã®äºåå·®æ¢ããä»®åŠåã«ãã€ãŠåœããå Žåã«ã¯ãååãšããŠå£é åŒè«åã¯åµåè
ã®å¯©å°ãçµãããšãèŠããããåµæš©è
ã®æåºããè³æã«ãã€ãŠãè¡šçŸå
容ãçå®ã§ãªããåã¯å°ãå
¬çãå³ãç®çã®ãã®ã§ãªãããšãæçœã§ããããã€ãåµæš©è
ãé倧ã«ããŠèããå埩å°é£ãªæ害ã被ãèããããšèªãããããšãã¯ãå£é åŒè«åã¯åµåè
ã®å¯©å°ãçµãªããŠãæ²æ³21æ¡ã®è¶£æšã«åãããã®ãšã¯ãããªãã
#<span id="家氞æç§æžè£å€"/>[https://www.courts.go.jp/app/hanrei_jp/detail2?id=56358 æå®³è³ å]([[w:家氞æç§æžè£å€|家氞æç§æžè£å€]] æé«è£å€æ±ºå¹³æ5幎3æ16æ¥ æ°é第47å·»5å·3483é )åŠæ ¡æè²æ³21æ¡1é
ïŒæå45幎æ³åŸç¬¬48å·ã«ããæ¹æ£åã®ãã®ïŒïŒåŠæ ¡æè²æ³51æ¡ïŒæå49幎æ³åŸç¬¬70å·ã«ããæ¹æ£åã®ãã®ïŒïŒæ§æç§çšå³æžæ€å®èŠåïŒæå23幎æéšç什第4å·ïŒ1ãªãã3æ¡ïŒ[[æ¥æ¬åœæ²æ³ç¬¬23æ¡|æ²æ³23æ¡]]ïŒ[[æ¥æ¬åœæ²æ³ç¬¬26æ¡|æ²æ³26æ¡]]ïŒ[[æè²åºæ¬æ³ç¬¬10æ¡|æè²åºæ¬æ³10æ¡]]ïŒ[[åœå®¶è³ åæ³ç¬¬1æ¡|åœå®¶è³ åæ³1æ¡]]1é
#;æç§æžæ€å®ã¯æ€é²ã«åœãããã
#:æç§æžæ€å®ã¯æ€é²ã«åœãããªãã
#:*æ²æ³21æ¡2é
ã«ããæ€é²ãšã¯ãè¡æ¿æš©ãäž»äœãšãªã£ãŠãææ³å
容çã®è¡šçŸç©ã察象ãšãããã®å
šéšåã¯äžéšã®çºè¡šã®çŠæ¢ãç®çãšãã察象ãšãããäžå®ã®è¡šçŸç©ã«ã€ã網çŸ
çäžè¬çã«ãçºè¡šåã«ãã®å
容ã審æ»ããäžãäžé©åœãšèªãããã®ã®çºè¡šãçŠæ¢ããããšãç¹è³ªãšããŠåãããã®ãæããšè§£ãã¹ãã§ãããæ¬ä»¶æ€å®ã¯ãäžè¬å³æžãšããŠã®çºè¡ãäœã劚ãããã®ã§ã¯ãªããçºè¡šçŠæ¢ç®çãçºè¡šåã®å¯©æ»ãªã©ã®ç¹è³ªããªããããæ€é²ã«åœããããæ²æ³21æ¡2é
å段ã®èŠå®ã«éåãããã®ã§ã¯ãªãã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=35114 âåºå³¶åžæŽèµ°æè¿œæŸæ¡äŸéå被åäºä»¶]([[w:åºå³¶åžæŽèµ°æè¿œæŸæ¡äŸäºä»¶|åºå³¶åžæŽèµ°æè¿œæŸæ¡äŸäºä»¶]] æé«è£å€æ±ºå¹³æ19幎9æ18æ¥ åé第61å·»6å·601é )[[æ¥æ¬åœæ²æ³ç¬¬31æ¡|æ²æ³31æ¡]]ïŒåºå³¶åžæŽèµ°æè¿œæŸæ¡äŸïŒå¹³æ14幎åºå³¶åžæ¡äŸç¬¬39å·ïŒ16æ¡1é
1å·ïŒ17æ¡ïŒ19æ¡
#:*åºå³¶åžæŽèµ°æè¿œæŸæ¡äŸ16æ¡1é
#:*:äœäººãã次ã«æ²ããè¡çºãããŠã¯ãªããªãã
#:*:1.å
Œ
±ã®å Žæã«ãããŠãåœè©²å Žæã®ææè
åã¯ç®¡çè
ã®æ¿è«Ÿåã¯èš±å¯ãåŸãªãã§ãå
¬è¡ã«äžå®åã¯ææãèŠãããããããªãéåã¯éäŒãè¡ãããšã
#;åºå³¶åžæŽèµ°æè¿œæŸæ¡äŸ16æ¡1é
1å·ïŒ17æ¡ïŒ19æ¡ã®èŠå®ãéå®è§£éã«ããæ²æ³21æ¡1é
ïŒ31æ¡ã«éåããªããšããäºäŸ
#::*äºæ¡
#::*:æå®æŽåå£ã®é¢ä¿è
ã§æŽèµ°æã§ããçµç¹Aã®ãªãŒããŒãããŠãã被å人ãïŒå€ç€ºã®åºå Žã«ãããŠïŒåŒéåŒãšç§°ããéäŒã匷è¡ããŠæŽèµ°æã®ååšãèªç€ºããããšèãïŒçµç¹Aãªã©ã®æŽèµ°ææ§æå¡çŽ40åãšå
±è¬ãïŒæå±ããæŽèµ°æã®ã°ã«ãŒãåãåºãã
ããããç¹æ»æããšåŒã°ããæãççšãïŒé¡é¢ã®å
šéšåã¯äžéšãèŠãé ãïŒåé£ãçµã¿ïŒæãç«ãŠãçã®åšå¢ã瀺ããŠïŒå
¬è¡ã«äžå®åã¯ææãèŠãããããããªéäŒãè¡ãïŒåžé·ããã®äžæ¢ã»éå»åœä»€ãåºãããã®ã«ïŒããã«åŸããªãã£ãã
#::*è«ç¹
#::*:åºå³¶åžæŽèµ°æè¿œæŸæ¡äŸ116æ¡1é
1å·ïŒ17æ¡ïŒ19æ¡ã®èŠå®ã®æèšããããã°ïŒãã®é©çšç¯å²ãåºç¯ã«éããã[[é床ã«åºæ±æ§ããç¡å¹ã®æ³ç|é床ã«åºæ±æ§ããç¡å¹]]ããåŠãã
#:åºå³¶åžæŽèµ°æè¿œæŸæ¡äŸ16æ¡1é
1å·ã«ãããéäŒãã¯ïŒæŽèµ°è¡çºãç®çãšããŠçµæãããéå£ã§ããæ¬æ¥çãªæå³ã«ãããæŽèµ°æã®å€ïŒæè£
ïŒæïŒèšåãªã©ã«ãããŠãã®ãããªæŽèµ°æã«é¡äŒŒã瀟äŒé念äžãããšåèŠããããšãã§ããéå£ã«ãã£ãŠè¡ããããã®ã«éå®ããããšè§£ããïŒãã®ããã«è§£éããã°ïŒåæ¡äŸ16æ¡1é
1å·ïŒ17æ¡ïŒ19æ¡ã¯ïŒæ²æ³21æ¡1é
ïŒ31æ¡ã«éåããªãã
#:*æ¬æ¡äŸã®å
šäœããèªã¿åãããšãã§ãã趣æšïŒããã«ã¯æ¬æ¡äŸæœè¡èŠåã®èŠå®çãç·åããã°ïŒæ¬æ¡äŸãèŠå¶ã®å¯Ÿè±¡ãšããŠãããæŽèµ°æãã¯ïŒæ¬æ¡äŸ2æ¡7å·ã®å®çŸ©ã«ããããããïŒæŽèµ°è¡çºãç®çãšããŠçµæãããéå£ã§ããæ¬æ¥çãªæå³ã«ãããæŽèµ°æã®å€ã«ã¯ïŒæè£
ïŒæïŒèšåãªã©ã«ãããŠãã®ãããªæŽèµ°æã«é¡äŒŒã瀟äŒé念äžãããšåèŠããããšãã§ããéå£ã«éããããã®ãšè§£ããïŒãããã£ãŠïŒåžé·ã«ãããŠæ¬æ¡äŸã«ããäžæ¢ã»éå»åœä»€ãçºãåŸã察象ãïŒè¢«å人ã«é©çšãããŠãããéäŒããšã®é¢ä¿ã§ã¯ïŒæ¬æ¥çãªæå³ã«ãããæŽèµ°æåã³äžèšã®ãããªãã®é¡äŒŒéå£ã«ããéäŒãïŒæ¬æ¡äŸ16æ¡1é
1å·ïŒ17æ¡æå®ã®å Žæåã³æ
æ§ã§è¡ãããŠããå Žåã«éå®ããããšè§£ãããããã®ããã«éå®çã«è§£éããã°ïŒæ¬æ¡äŸ16æ¡1é
1å·ïŒ17æ¡ïŒ19æ¡ã®èŠå®ã«ããèŠå¶ã¯ïŒåºå³¶åžå
ã®å
Œ
±ã®å Žæã«ãããæŽèµ°æã«ããéäŒçãå
¬è¡ã®å¹³ç©ã害ããŠããããšïŒèŠå¶ã«ä¿ãéäŒã§ãã£ãŠãïŒãããè¡ãããšãçŽã¡ã«ç¯çœªãšããŠåŠçœ°ããã®ã§ã¯ãªãïŒåžé·ã«ããäžæ¢åœä»€çã®å¯Ÿè±¡ãšããã«ãšã©ãïŒãã®åœä»€ã«éåããå Žåã«åããŠåŠçœ°ãã¹ããã®ãšãããšããäºåŸçãã€æ®µéçèŠå¶ã«ãã£ãŠããããšçã«ãããã¿ããšïŒãã®åŒå®³ãé²æ¢ããããšããèŠå¶ç®çã®æ£åœæ§ïŒåŒå®³é²æ¢æ段ãšããŠã®åçæ§ïŒãã®èŠå¶ã«ããåŸãããå©çãšå€±ãããå©çãšã®åè¡¡ã®èŠ³ç¹ã«ç
§ããïŒããŸã æ²æ³21æ¡1é
ïŒ31æ¡ã«éåãããšãŸã§ã¯ãããªãã
#:*:[[w:è€ç°å®é|è€ç°å®é]]è£å€å®åã³ç°åçŠå€«è£å€å®ã®å察æèŠ
#:*:*è¡šçŸã®å眰èŠå¶ã®å Žé¢ã§ã¯ãå¿
ãããæ³åŸã«æãããªãäžè¬äººãèŸæžçãªççŽãªè§£éããããšãã«ãåœè©²æ¡é
ããèçž®çå¹æïŒChilling EffectïŒãåããã®ã§ããã°ãæé¢éæ²ãããã¯ïŒé©çšå¯©æ»ã®äžïŒæ³ä»€éæ²ã§èšãã¹ãã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=92502âå©æéäžäº€ä»æ±ºå®åŠååæ¶è«æ±äºä»¶](æé«è£å€æ±ºä»€å5幎11æ17æ¥)[https://elaws.e-gov.go.jp/document?lawid=414AC0000000163_20150801_000000000000000&keyword=%E7%8B%AC%E7%AB%8B%E8%A1%8C%E6%94%BF%E6%B3%95%E4%BA%BA%E6%97%A5%E6%9C%AC%E8%8A%B8%E8%A1%93%E6%96%87%E5%8C%96%E6%8C%AF%E8%88%88%E4%BC%9A%E6%B3%95 ç¬ç«è¡æ¿æ³äººæ¥æ¬èžè¡æåæ¯èäŒæ³]第3æ¡,第14æ¡
#;ç¬ç«è¡æ¿æ³äººæ¥æ¬èžè¡æåæ¯èäŒã®çäºé·ããããåæ ç»ã®è£œäœæŽ»åã«å¯Ÿããå©æéã亀ä»ããªãæšã®æ±ºå®ããäžèšçäºé·ã®è£éæš©ã®ç¯å²ãéžè±ãåã¯ãããæ¿«çšãããã®ãšããŠéæ³ã§ãããšãããäºäŸ
#:*èžè¡çãªèŠ³ç¹ããã¯å©æã®å¯Ÿè±¡ãšããããšãçžåœãšããã掻åã«ã€ããæ¬ä»¶å©æéã亀ä»ãããšåœè©²æŽ»åã«ä¿ãè¡šçŸè¡çºã®å
容ã«ç
§ãããŠäžè¬çãªå
¬çã害ãããããšãçç±ãšãã亀ä»ã®æåŠãåºãè¡ããããšããã°ãå
¬çãããããæœè±¡çãªæŠå¿µã§ãã£ãŠå©æ察象掻åã®éžå¥ã®åºæºãäžæ確ã«ãªããããåŸãªãããšãããå©æãå¿
èŠãšããè
ã«ãã亀ä»ã®ç³è«ãå©æãåŸãããšããè
ã®è¡šçŸè¡çºã®å
容ã«èçž®çãªåœ±é¿ãåã¶å¯èœæ§ãããããã®ãããªäºæ
ã¯ãæ¬ä»¶å©æéã®è¶£æšãªãã被äžå人ã®ç®çã害ããã®ã¿ãªãããèžè¡å®¶çã®èªäž»æ§ãåµé æ§ããæãªããã®ã§ãããæ²æ³21æ¡1é
ã«ããè¡šçŸã®èªç±ã®ä¿éã®è¶£æšã«ç
§ãããŠããçéãé£ããã®ãšããããšãã§ããã
#:*å©æéã®äº€ä»ã«ä¿ãå€æã«ãããŠãããã亀ä»ãããšãã®å¯Ÿè±¡ãšãã掻åã«ä¿ãè¡šçŸè¡çºã®å
容ã«ç
§ãããŠäžè¬çãªå
¬çã害ããããšããããšãæ¶æ¥µçãªèæ
®äºæ
ãšããŠéèŠãåŸãã®ã¯ã<u>åœè©²å
¬çãéèŠãªãã®ã§ããããã€ãåœè©²å
¬çã害ãããå
·äœçãªå±éºãããå Žåã«éããã</u>ãã®ãšè§£ããã®ãçžåœã§ããã
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³|æ¥æ¬åœæ²æ³]]
|[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³#3|第3ç« åœæ°ã®æš©å©åã³çŸ©å]]
|[[æ¥æ¬åœæ²æ³ç¬¬20æ¡]]<br>ãä¿¡æã®èªç±ã»æ¿æåé¢ã
|[[æ¥æ¬åœæ²æ³ç¬¬22æ¡]]<br>ãå±
äœã»ç§»è»¢ã»è·æ¥éžæã®èªç±ãå€åœç§»äœã»åœç±é¢è±ã®èªç±ã
}}
{{stub|law}}
[[category:æ¥æ¬åœæ²æ³|21]] | 2023-04-19T23:05:03Z | 2023-11-18T21:51:40Z | [
"ãã³ãã¬ãŒã:Wikipedia",
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E6%97%A5%E6%9C%AC%E5%9B%BD%E6%86%B2%E6%B3%95%E7%AC%AC21%E6%9D%A1 |
37,597 | Lua/ãã¥ãŒããªã¢ã« | Luaã¯ã軜éã§é«éãªã¹ã¯ãªããèšèªã§ãããåºã䜿ãããŠããããã°ã©ãã³ã°èšèªã®äžã€ã§ããLuaã¯ãç°¡åã«åŠã¹ãèšèªã§ãããªãããå€ãã®æ©èœãåãã£ãŠãããã²ãŒã éçºãWebã¢ããªã±ãŒã·ã§ã³ãçµã¿èŸŒã¿ã·ã¹ãã ãªã©ãæ§ã
ãªåéã§äœ¿ãããŠããŸãã
æ¬ãã¥ãŒããªã¢ã«ã§ã¯ãLuaã®åºç€çãªæ§æãæ©èœã«ã€ããŠèª¬æããLuaã䜿ã£ãããã°ã©ãã³ã°ã«ã€ããŠã®ç¥èã身ã«ä»ããããšãç®çãšããŠããŸããæ¬ãã¥ãŒããªã¢ã«ã¯ãåå¿è
ããäžçŽè
ãŸã§ã察象ã«ããŠãããLuaã®åºç€ããå§ããŠãåŸã
ã«å¿çšçãªå
容ã«ç§»ã£ãŠãããŸãã
Luaã®åŠç¿ã¯ãããã°ã©ãã³ã°åå¿è
ã«ãåãçµã¿ããããããŸããŸãªã¢ããªã±ãŒã·ã§ã³ã§æŽ»çšã§ããããšãããå°æ¥æ§ãé«ã泚ç®ãéããŠããŸããæ¬ãã¥ãŒããªã¢ã«ãéããŠãLuaã®åºç€ãåŠã³ãLuaã䜿ã£ãããã°ã©ãã³ã°ã®é
åã«è§ŠããŠããã ããã°å¹žãã§ãã
Luaã¯ã1993幎ã«ãã©ãžã«ã§éçºããã軜éã§é«éãªã¹ã¯ãªããèšèªã§ããªãŒãã³ãœãŒã¹ã§ããããšãç¹åŸŽã§ããLuaã¯ãã¹ã¯ãªããèšèªãšããŠã¯æ¯èŒçå°ãããCèšèªã§æžãããŠãããããé«éã§ã¡ã¢ãªå¹çãè¯ããšããç¹åŸŽããããŸãã
Luaã®ç¹åŸŽã¯ã軜éã§é«éãªããšããCèšèªãšã®èŠªåæ§ãé«ãããšã«å ãã以äžã®ãããªãã®ãæããããŸãã
Luaã¯ã以äžã®ãããªåéã§äœ¿ãããŠããŸãã
Luaã¯ããã®å°ãããé«éæ§ãæ¡åŒµæ§ãåã蟌ã¿æ§ãªã©ã®ç¹åŸŽãããæ§ã
ãªåéã§å©çšãããŠããŸãã
Luaã¯ãå
¬åŒãµã€ã( https://www.lua.org/download.html )ããããœãŒã¹ã³ãŒãããã€ããªãã¡ã€ã«ãããŠã³ããŒãããããšãã§ããŸãã ãŸããäžéšã®Linuxãã£ã¹ããªãã¥ãŒã·ã§ã³ãBSDç³»UNIXã§ã¯ãããã±ãŒãžãããŒãžã£ãå©çšããŠç°¡åã«ã€ã³ã¹ããŒã«ããããšãã§ããŸãã
ã€ã³ã¹ããŒã«ãå®äºããããã³ãã³ãã©ã€ã³ãã以äžã®ããã«å
¥åããããšã§ãLuaã®å¯Ÿè©±ã¢ãŒããèµ·åããããšãã§ããŸãã
察話ã¢ãŒãã¯ãã³ãã³ãã©ã€ã³ããäžè¡ãã€Luaã®ã³ãŒããå
¥åããŠãå³åº§ã«è©äŸ¡ããããšãã§ããŸãã
ãŸããLuaã®ããã°ã©ã ããã¡ã€ã«ã«ä¿åããŠå®è¡ããããšãã§ããŸããäŸãã°ã以äžã®ãããªã¹ã¯ãªãããã¡ã€ã«ãäœæãã"hello.lua"ãšããååã§ä¿åããŸãã
ãããŠãã³ãã³ãã©ã€ã³ãã以äžã®ããã«å
¥åããããšã§ãã¹ã¯ãªãããå®è¡ããããšãã§ããŸãã
Luaã®ããã°ã©ã ãæžãããã«ã¯ãããã¹ããšãã£ã¿ãŒãå¿
èŠã§ãã å€ãã®ããã¹ããšãã£ã¿ãŒãLuaã®ã·ã³ã¿ãã¯ã¹ãã€ã©ã€ãããµããŒãããŠããŸãããç¹ã«ãããããªã®ã¯ãZeroBrane StudioãVisual Studio Codeãªã©ã®ãLuaéçºã«ç¹åãããšãã£ã¿ãŒã§ãã ãããã®ãšãã£ã¿ãŒã«ã¯ããããã°æ©èœãã³ãŒãè£å®æ©èœãªã©ãéçºãå¹çåããæ©èœãå€æ°åãã£ãŠããŸãã
Luaã§ã¯ãå€æ°åã®åã«localããŒã¯ãŒããä»ããããšã§ããã®å€æ°ãããŒã«ã«ã¹ã³ãŒãã§å®£èšããããšãã§ããŸããäŸãã°ã以äžã®ããã«ããŠãxãšããå€æ°ã宣èšããããšãã§ããŸãã
å€æ°ã«åæå€ã代å
¥ããå Žåã¯ã以äžã®ããã«å®£èšãšä»£å
¥ãåæã«è¡ãããšãã§ããŸãã
Luaã«ã¯ã以äžã®ãããªããŒã¿åããããŸãã
å€æ°ã«å€ã代å
¥ããå Žåã¯ã以äžã®ããã«ããŠè¡ããŸãã
ãŸãã代å
¥ãããå€ãåãåºããŠæäœããå Žåã¯ã以äžã®ããã«ããŠè¡ããŸãã
æååã®å Žåã¯ã以äžã®ããã«ããŠé£çµããããšãã§ããŸãã
ãŸããããŒãã«ã®å Žåã¯ã以äžã®ããã«ããŠèŠçŽ ãè¿œå ããããåé€ãããããããšãã§ããŸãã
ãããã®æäœãå©çšããŠãLuaã§æ§ã
ãªåŠçãè¡ãããšãã§ããŸãã
以äžã¯ãLuaã®å¶åŸ¡æ§é ã®ããã€ãã®äŸã§ãã
æ¡ä»¶åå²ã«ã¯ifæã䜿çšããŸãã以äžã¯ãxãæ£ã®æ°ã§ããã°ã"positive"ãšè¡šç€ºããããã°ã©ã ã®äŸã§ãã
ãŸããifæã®åŸã«elseifãç¶ããŠæžãããšã§ãè€æ°ã®æ¡ä»¶åå²ãè¡ãããšãã§ããŸãã
Luaã«ã¯ã以äžã®3çš®é¡ã®ã«ãŒãåŠçããããŸãã
whileã«ãŒãã¯ãæ¡ä»¶åŒãtrueã®éãç¹°ãè¿ãåŠçãè¡ããŸãã
repeat-untilã«ãŒãã¯ãæ¡ä»¶åŒãtrueã«ãªããŸã§ãç¹°ãè¿ãåŠçãè¡ããŸãã
forã«ãŒãã¯ããããããæå®ããåæ°åãç¹°ãè¿ãåŠçãè¡ããŸãã以äžã¯ã1ãã10ãŸã§ã®æ°åãé çªã«è¡šç€ºããããã°ã©ã ã®äŸã§ãã
ãã®ã³ãŒãã¯ãLuaã®forã«ãŒãã䜿çšããŠ1ãã10ãŸã§ã®æ°å€ã2ãã€å¢ãããªããé ã«åãåºãããããããåºåããããã°ã©ã ã§ãã
forã«ãŒãã®æžåŒã¯ã以äžã®ããã«ãªã£ãŠããŸãã
åæå€ããå§ãŸããçµäºå€ã«éãããŸã§ãæå®ãããå¢åãã€å€ãå¢ãããªããã«ãŒãåŠçãå®è¡ãããŸãã
å¢åã¯çç¥å¯èœã§ããã®å Žå㯠1 ãä»®å®ãããŸãã
ä»åã®ã³ãŒãã§ã¯ãåæå€ã1ãçµäºå€ã10ãå¢åã2ãšããŠããããã1, 3, 5, 7, 9ã®5ã€ã®æ°å€ãé ã«åãåºããããããããprint()é¢æ°ã§åºåãããŸãã
å
·äœçã«å®è¡ãããšã以äžã®ãããªçµæãåŸãããŸãã
breakæã䜿çšããããšã§ãã«ãŒãåŠçãéäžã§çµäºããããšãã§ããŸãã
以äžã¯ã1ãã10ãŸã§ã®æ°åãé çªã«è¡šç€ºãã5ã«ãªã£ããã«ãŒããçµäºããããã°ã©ã ã®äŸã§ãã
é¢æ°ãå®çŸ©ããã«ã¯ã以äžã®ããã«functionããŒã¯ãŒãã䜿çšããŸãããŸããåŒæ°ãæž¡ãå Žåã¯ã()ã®äžã«åŒæ°åãæžããŸãã
é¢æ°ãåŒã³åºãã«ã¯ãé¢æ°åãšãšãã«åŒæ°ãæž¡ããŸãã以äžã¯ãgreeté¢æ°ãåŒã³åºãããã°ã©ã ã®äŸã§ãã
Luaã«ã¯ããŒã¯ãŒãåŒæ°ããªããé¢æ°ã®åŒæ°ã¯äœçœ®åŒæ°ãšããŠæž¡ãããŸãã
å¯å€é·åŒæ°ãåãåããããLuaã§ã¯ ... ãšããæ§æããããŸããããã¯é¢æ°ã®åŒæ°ãªã¹ãã®æåŸã«çœ®ãããŸããå¯å€é·åŒæ°ã¯ãåŒã³åºãåŽãæž¡ãåŒæ°ã®æ°ã«ãã£ãŠç°ãªããŸããé¢æ°å
ã§ã¯ãå¯å€é·åŒæ°ã¯ããŒãã«ãšããŠæ±ãããŸããããšãã°ã以äžã®ããã«ããŠå¯å€é·åŒæ°ãåãåãé¢æ°ãå®çŸ©ã§ããŸãã
æ®äœåŒæ°ã¯ãããŸããããå¯å€é·åŒæ°ãåãåã£ãåŸã«ãä»»æã®äœçœ®åŒæ°ãåãåãããšãã§ããŸããããšãã°ã以äžã®ããã«ã㊠x ãšããäœçœ®åŒæ°ãåãåãé¢æ°ãå®çŸ©ã§ããŸãã
Luaã§ã¯ãé¢æ°ããªããžã§ã¯ãã®äžçš®ã§ãããããå€æ°ã«é¢æ°ã代å
¥ããããšãã§ããŸãã
é¢æ°ã®è¿ãå€ãååŸããã«ã¯ãreturnããŒã¯ãŒãã䜿çšããŸãã
Luaã¯æååæäœã«äŸ¿å©ãªæ©èœãæäŸããŠããŸããæååã¯ãã¯ã©ãŒããŒã·ã§ã³ã§å²ãã æåã®ã·ãŒã±ã³ã¹ã§ããããã«ã¯ã©ãŒããŒã·ã§ã³ãŸãã¯ã·ã³ã°ã«ã¯ã©ãŒããŒã·ã§ã³ã®ã©ã¡ãã§ãè¡šçŸã§ããŸãã
æååã¯ã..æŒç®åã§é£çµããããšãã§ããŸãã
æååãéšåçã«åãåºãã«ã¯ãstring.subé¢æ°ã䜿çšããŸãã
ãŸããæååãéé ã«ããã«ã¯ãstring.reverseé¢æ°ã䜿çšããŸãã
Luaã¯ãCèšèªãšåæ§ã«ãæååã®ãã©ãŒãããã«äŸ¿å©ãªæ©èœãæäŸããŠããŸããstring.formaté¢æ°ã䜿çšããŠãæååãç¹å®ã®åœ¢åŒã«æŽåœ¢ããããšãã§ããŸãã
ãã®äŸã§ã¯ã%sã¯æååã%dã¯10é²æ°ã%.1fã¯å°æ°ç¹ä»¥äž1æ¡ã®æµ®åå°æ°ç¹æ°ãè¡šããŸããstring.formaté¢æ°ã«æž¡ãåŒæ°ã¯ããã©ãŒãããæååå
ã®å€æ°ãšäžèŽããé åºã§æå®ããå¿
èŠããããŸãã
ãããã®æ©èœãé§äœ¿ããããšã§ãLuaã§æè»ãªæååæäœãå¯èœã«ãªããŸãã
Luaã«ãããŠãããŒãã«ã¯è€æ°ã®å€ãæ ŒçŽããããã®ããŒã¿æ§é ã®1ã€ã§ããããŒãã«ã¯é
åãèŸæžã®ãããªåœ¢åŒã§ãããŒãšå€ããã¢ãšããŠæã¡ãŸãã
ããŒãã«ã¯ã{}ã§äœæããããšãã§ããŸãã以äžã®ããã«ãèŠçŽ ãã«ã³ãã§åºåã£ãŠåæããããšã§åæåããããšãã§ããŸãã
ãŸãã以äžã®ããã«ãã€ã³ããã¯ã¹ãæå®ããŠèŠçŽ ãè¿œå ããããšãã§ããŸãã
ããŒãã«ã«æ ŒçŽãããèŠçŽ ã«ã¯ã以äžã®ãããªæ¹æ³ã§ã¢ã¯ã»ã¹ããããšãã§ããŸãã
以äžã«ãããããã®æäœã®äŸã瀺ããŸãã
Luaã¯ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåèšèªã§ãããã¯ã©ã¹ãå®çŸ©ããã®ã§ã¯ãªãããªããžã§ã¯ãã®ãããã¿ã€ããäœæããããšã§ãªããžã§ã¯ããçæããŸãã
ãªããžã§ã¯ãã¯ããŒãã«ãšããŠè¡šçŸããããªããžã§ã¯ãã®æ¯ãèããæŒç®åã®æ¯ãèããå®çŸ©ããããã«ãããŒãã«ã«ã¡ãœãããè¿œå ã§ããŸãããŸããã¡ãœããã®åŒã³åºãã«ã¯ã.ãã䜿ããŸãã
ã¡ã¿ããŒãã«ã¯ãããŒãã«ã«ç¹å®ã®åäœãå®çŸ©ããããã«äœ¿çšãããŸããäŸãã°ãã¡ã¿ããŒãã«ã䜿çšããŠããªããžã§ã¯ããå ç®ãæžç®ãæ¯èŒãªã©ã®æŒç®ããµããŒãããããã«ããããšãã§ããŸãã
ã¡ã¿ããŒãã«ã¯ã__indexã__newindexã__addã__subã__mulã__divã__modã__powã__unmã__eqã__ltã__leã__callãªã©ã®ç¹æ®ãªããŒãæã€ããŒãã«ãšããŠå®çŸ©ãããŸãããããã®ããŒã«ã¯ãç¹å®ã®åäœãé¢é£ä»ããããŠããŸãã
å
·äœçãªäŸãèŠãŠã¿ãŸãããã以äžã®ãããªAnimalããŒãã«ãäœæããŸãã
ãã®äŸã§ã¯ãAnimalããŒãã«ã«soundãã£ãŒã«ããå®çŸ©ããnew()é¢æ°ããªããžã§ã¯ãäœæã®ããã«å®çŸ©ããŠããŸããmakeSound()é¢æ°ã¯Animalãªããžã§ã¯ããåŒã³åºããããšãã«ããªããžã§ã¯ãã®soundãã£ãŒã«ãã®é³ãåºåããããã«äœ¿çšãããŸãã
次ã«ãAnimalããŒãã«ããCatããŒãã«ãäœæããŸãã
ãã®äŸã§ã¯ãCatããŒãã«ã¯AnimalããŒãã«ãã掟çããŠãããCatãªããžã§ã¯ãã«ã¯makeSound()ã¡ãœãããå«ãŸããsoundãã£ãŒã«ãã«ã¯"Meow"ãšããå€ãæ ŒçŽãããŠããŸããscratch()ã¡ãœãããè¿œå ãããŸããã
æåŸã«ãæ°ããCatãªããžã§ã¯ããäœæããŠãã¡ãœããã®åäœã確èªããŸãã
ãã®äŸã§ã¯ãCatããŒãã«ã䜿çšããããšã§ãAnimalããŒãã«ã®makeSound()ã¡ãœãããåå©çšããæ°ããã¡ãœããscratch()ãè¿œå ããŸããããŸããã¡ã¿ããŒãã«ãéããŠããªããžã§ã¯ããšããŠã®Catã®æ¯ãèããã«ã¹ã¿ãã€ãºããããšãã§ããŸãã
ãŠãŒã¶ãŒå®çŸ©ã®ãªããžã§ã¯ãã®äŸãšããŠãè€çŽ æ°ãªããžã§ã¯ãã®å®çŸ©ãåãäžããŸãã
LuaRocksã¯ãLuaèšèªçšã®ããã±ãŒãžç®¡çããŒã«ã§ãã ãã®ããŒã«ã䜿çšãããšãLuaã®æ¡åŒµæ©èœããŠãŒãã£ãªãã£ãç°¡åã«ã€ã³ã¹ããŒã«ãã¢ããã°ã¬ãŒããåé€ããããšãã§ããŸãã LuaRocksã䜿ãããã«ã¯ãå
ã«Luaã®ã©ã³ã¿ã€ã ãå¿
èŠã«ãªããŸãã
以äžã«ãLuaRocksã®åºæ¬çãªäœ¿ãæ¹ã説æããŸãã
æ°ããããã±ãŒãžãã€ã³ã¹ããŒã«ããã«ã¯ã以äžã®ã³ãã³ããå®è¡ããŸãã
ããšãã°ãluasocketãšããããã±ãŒãžãã€ã³ã¹ããŒã«ããå Žåã¯ã以äžã®ããã«å
¥åããŸãã
äžèŠãªããã±ãŒãžãã¢ã³ã€ã³ã¹ããŒã«ããã«ã¯ã以äžã®ã³ãã³ããå®è¡ããŸãã
ããšãã°ãå
ã»ã©ã€ã³ã¹ããŒã«ããluasocketããã±ãŒãžãã¢ã³ã€ã³ã¹ããŒã«ããå Žåã¯ã以äžã®ããã«å
¥åããŸãã
ã€ã³ã¹ããŒã«ãããŠããããã±ãŒãžã®äžèŠ§ã衚瀺ããã«ã¯ã以äžã®ã³ãã³ããå
¥åããŸãã
ã€ã³ã¹ããŒã«ãããŠããããã±ãŒãžã®ããŒãžã§ã³ã確èªããã«ã¯ã以äžã®ã³ãã³ããå
¥åããŸãã
ãã ãããã®ã³ãã³ãã¯ã€ã³ã¹ããŒã«ãããŠããããã±ãŒãžã«éå®ãããŸããã€ã³ã¹ããŒã«ãããŠããªãããã±ãŒãžã®ããŒãžã§ã³ã確èªãããå Žåã¯ã以äžã®ããã«å
¥åããŸãã
以äžããLuaRocksã®åºæ¬çãªäœ¿ãæ¹ã§ãããããã®ã³ãã³ããå®è¡ããããšã§ãLuaã®æ¡åŒµæ©èœããŠãŒãã£ãªãã£ãç°¡åã«ã€ã³ã¹ããŒã«ãã¢ããã°ã¬ãŒããåé€ããããšãã§ããŸãã
LuaDocã¯ãLuaã®ããã¥ã¡ã³ããŒã·ã§ã³ããŒã«ã§ããããœãŒã¹ã³ãŒãå
ã«ããé¢æ°ãã¢ãžã¥ãŒã«ã«ã€ããŠã®æ
å ±ãèªåçã«æœåºããŠãHTMLãXMLããŸãã¯ããã¹ã圢åŒã®ããã¥ã¡ã³ããçæããããšãã§ããŸãã
以äžã«ãLuaDocã«ãã£ãŠçæãããããã¥ã¡ã³ãã«å«ãŸããæ
å ±ã®çš®é¡ã瀺ããŸãã
LuaDocã¯ãLuaã®ããŒãã«ããªããžã§ã¯ãæåããã°ã©ãã³ã°ãããã³ããŒãžã§ã³å¶åŸ¡ã·ã¹ãã ã«ã察å¿ããŠããŸãããŸããLuaDocã¯ããŠãŒã¶ãŒå®çŸ©ã®ã¿ã°ã䜿çšããŠãã«ã¹ã¿ã ã¿ã°ãäœæããããšãã§ããŸãã
LuaDocã«ã¯ã以äžã®ãããªäž»ãªæ©èœããããŸãã
ãŠãŒã¶ãŒå®çŸ©ã®æ¡åŒµ LuaDocã¯ããŠãŒã¶ãŒãç¬èªã®ã¿ã°ãå®çŸ©ããŠãããã¥ã¡ã³ãåããæ
å ±ãã«ã¹ã¿ãã€ãºããããšãã§ããŸãã
以äžããLuaDocã®æŠèŠã§ããLuaDocã¯ãLuaã³ãã¥ããã£ãŒã«ãããŠãåºã䜿ãããŠããããã¥ã¡ã³ããŒã·ã§ã³ããŒã«ã§ãããLuaãããžã§ã¯ãã®éçºè
ã«ãšã£ãŠéèŠãªããŒã«ã®1ã€ã§ãã
LuaDocã§äœ¿çšãããåºæ¬æ§æã®äŸã§ãã
Luadocã¯ãç¹æ®ãªæ¹æ³ã§Luaã®ã³ã¡ã³ããèªèããŸãã次ã®ãããªäŸã§ãã
---ã§å§ãŸãè¡ã¯ãLuaDocã«ãã£ãŠããã¥ã¡ã³ãã®äžéšãšããŠè§£éãããŸããã³ã¡ã³ãè¡ãç¶ããŠè¡ãããšãå¯èœã§ããããã¯å
šãŠåãããã¥ã¡ã³ãããã¹ããšããŠåŠçãããŸãã
ã³ã¡ã³ãã«ã¯ãè¡ã«ç¶ãã¿ã°ãå«ããããããšããããŸããã³ã¡ã³ããšã¿ã°ã®éã«ã¯ãã¹ããŒã¹ãå¿
èŠã§ãã
LuaDocã§ã¯ãããã€ãã®ããã¥ã¡ã³ãã¿ã°ã䜿çšãããŸããäžèšã«äŸãæããŸãã
é¢æ°ã®åŒæ°ã®èª¬æãæäŸããŸãã
é¢æ°ãè¿ãå€ã説æããŸãã
é¢æ°ãªã©ã®é¢é£ããå
容ãåç
§å
ã説æããã¿ã°ã
ãã®ããã«ããŠãLuaDocã䜿çšããããšã§ãLuaã®ã³ãŒãã«å¯ŸããŠããã¥ã¡ã³ããèªåçã«çæããããšãã§ããŸãã
Luadocã¯ãã³ã¡ã³ãã«èšè¿°ãããç¹å®ã®ãã¿ãŒã³ã解æããããã¥ã¡ã³ãã®çæã«äœ¿çšããŸããã³ã¡ã³ãã«æ¿å
¥ãããã¿ã°ã®äŸãããã€ã瀺ããŸãã
ãªãã¡ã¬ã³ã¹ã®çæãææžã®ãã«ãããœãŒã¹ã³ãŒãã®ãããã¡ã€ãªã³ã°ãªã©ãLuadocã®ããŸããŸãªã³ãã³ããå©çšã§ããŸãã以äžã¯ããã€ãã®ä»£è¡šçãªã³ãã³ãã§ãã
以äžã¯Luaã«ããããã¡ã€ã«å
¥åºåã«é¢ããåºæ¬çãªæäœã®äŸã§ãã
äžèšã®äŸã§ã¯ãio.opené¢æ°ã䜿ã£ãŠãã¡ã€ã«ãéããfileå€æ°ã«ä»£å
¥ããŠããŸãã第äžåŒæ°ã«ãã¡ã€ã«åã第äºåŒæ°ã«ã¢ãŒããæå®ããŸããrã¢ãŒãã¯èªã¿èŸŒã¿å°çšã¢ãŒããè¡šããŸãã
次ã«ãfile:lines()ã䜿ã£ãŠãã¡ã€ã«ãã1è¡ãã€èªã¿èŸŒã¿ãforã«ãŒãã䜿ã£ãŠè¡ãåºåããŠããŸãã
æåŸã«ããã¡ã€ã«ãéããããã«file:close()ãåŒã³åºããŠããŸãã
äžèšã®äŸã§ã¯ãio.opené¢æ°ã䜿ã£ãŠãã¡ã€ã«ãéããfileå€æ°ã«ä»£å
¥ããŠããŸãã第äžåŒæ°ã«ãã¡ã€ã«åã第äºåŒæ°ã«ã¢ãŒããæå®ããŸããwã¢ãŒãã¯æžã蟌ã¿å°çšã¢ãŒããè¡šããŸããæ¢åã®ãã¡ã€ã«ãããå Žåãå
容ãäžæžããããŸãã
次ã«ãfile:write()ã䜿ã£ãŠãã¡ã€ã«ã«æååãæžã蟌ãã§ããŸãã
æåŸã«ããã¡ã€ã«ãéããããã«file:close()ãåŒã³åºããŠããŸãã
äžèšã®äŸã§ã¯ããã¡ã€ã«ãžã®æžã蟌ã¿ãå®äºããæç¹ã§ããã¡ã€ã«ãéããããããããã¡ã€ã«ãæ瀺çã«éããå¿
èŠã¯ãããŸããããã ãããã¡ã€ã«ãéãããŸãŸã«ããŠãããšãã¡ã¢ãªãªãŒã¯ãªã©ã®åé¡ãçºçããå¯èœæ§ãããããããã¡ã€ã«ã®æäœãçµäºãããå¿
ãfile:close()ãåŒã³åºãããã«ããŠãã ããã
ã¢ãžã¥ãŒã«ãšã¯ãäžé£ã®é¢æ°ãå€æ°ããŸãšãããã®ã§ãåå©çšæ§ãé«ããã³ãŒãã®å
±ææ¹æ³ã§ããããã±ãŒãžã¯ãè€æ°ã®ã¢ãžã¥ãŒã«ããŸãšããŠç®¡çããæ¹æ³ã§ãã
Luaã«ãããŠãã¢ãžã¥ãŒã«ã¯ããŒãã«ã䜿ã£ãŠå®è£
ãããŸããéåžžãã¢ãžã¥ãŒã«ã¯æ°ããããŒãã«ãäœæããŠãããã«é¢æ°ãå€æ°ãæ ŒçŽããŸããã¢ãžã¥ãŒã«ãå©çšããåŽã¯ããã®ã¢ãžã¥ãŒã«ãæäŸããé¢æ°ãå€æ°ã«ã¢ã¯ã»ã¹ããããã«ãã¢ãžã¥ãŒã«ãããŒãããå¿
èŠããããŸãã
ããã±ãŒãžã¯ãè€æ°ã®ã¢ãžã¥ãŒã«ãäžã€ã®ããã±ãŒãžã«ãŸãšãããã®ããã±ãŒãžãå©çšããæ¹æ³ãæäŸããŸããããã±ãŒãžã«ã¯ãäžã€ä»¥äžã®ã¢ãžã¥ãŒã«ãå«ãŸããŠããå ŽåããããŸããéåžžãããã±ãŒãžã¯ãã£ã¬ã¯ããªéå±€ã䜿ã£ãŠç®¡çãããããã±ãŒãžã®ååã¯ãã£ã¬ã¯ããªåã«å¯Ÿå¿ããŸããããã±ãŒãžã¯ãLuaã®æšæºã©ã€ãã©ãªããããŒãããããšãã§ããŸãããã«ã¹ã¿ã ã®ããã±ãŒãžãäœæããããšãã§ããŸãã
以äžã¯ãã¢ãžã¥ãŒã«ãšããã±ãŒãžã®äŸã§ãã
ãããã®ã³ãŒãã¯ã"mymodule.lua"ãšããååã®ã¢ãžã¥ãŒã«ãäœæãã"main.lua"ã§ããŒãããŠäœ¿çšããäŸãšã"mypackage"ãšããååã®ããã±ãŒãžãäœæãããã®äžã«"mymodule"ãšããååã®ã¢ãžã¥ãŒã«ãå«ããŠã"main.lua"ã§äœ¿çšããäŸã瀺ããŠããŸãã
Luaã¯ãCèšèªã«ããæ¡åŒµã容æã«è¡ããããã«èšèšãããŠããŸããLuaã®C APIã䜿ãããšã§ãCèšèªã§æžãããã¢ãžã¥ãŒã«ãã©ã€ãã©ãªãLuaããå©çšããããšãã§ããŸãã Luaã®C APIã¯ãLuaã®ä»æ§ã«åºã¥ããŠäœãããŠãããããCèšèªããLuaã¹ã¯ãªãããå®è¡ããããLuaã¹ã¯ãªããããCèšèªã®é¢æ°ãåŒã³åºãããããããšãã§ããŸãã
Luaã¯æ¡åŒµæ§ã«åªããã¹ã¯ãªããèšèªã§ããã¹ãã¢ããªã±ãŒã·ã§ã³ã«åãããŠæè»ã«ã«ã¹ã¿ãã€ãºããããšãã§ããŸããLuaã¯Cã§å®è£
ãããŠãããC APIãéããŠLuaã®æ©èœãæ¡åŒµããããšãã§ããŸãã
C APIã䜿çšããããšã§ãCããã°ã©ã ããLuaã¹ã¯ãªãããåŒã³åºãããšãã§ããŸãããŸããLuaã¹ã¯ãªããããCé¢æ°ãåŒã³åºãããšãã§ããŸããC APIã«ã¯ãLuaã®å€ã®ã¹ã¿ãã¯ãæäœããããã®é¢æ°ããæ°ããé¢æ°ãããŒãã«ãäœæããããã®é¢æ°ãªã©ãå«ãŸããŠããŸãã
äŸãã°ã以äžã®ãããªCããã°ã©ã ãèããŠã¿ãŸãããã
ãã®ããã°ã©ã ã§ã¯ãluaL_newstateé¢æ°ã§Luaã¹ããŒããäœæããluaL_openlibsé¢æ°ã§Luaã®æšæºã©ã€ãã©ãªããªãŒãã³ããŠããŸãããããŠãluaL_dostringé¢æ°ã§Luaã¹ã¯ãªãããå®è¡ããŠããŸããæåŸã«ãlua_closeé¢æ°ã§Luaã¹ããŒãã解æŸããŠããŸãã
ãã®ããã«ãC APIã䜿çšããããšã§Luaã®æ©èœãæ¡åŒµããããšãã§ããŸããããããC APIã¯è€éã§ãããããLuaã®åºç€ãç解ããäžã§äœ¿çšããããšãããããããŸãã
以äžã¯ãæ°ãåãåãããããå¶æ°ãå¥æ°ããå€å®ããç°¡åãªLuaããã°ã©ã ã®äŸã§ãã
ãã®ããã°ã©ã ã§ã¯ã even_or_odd é¢æ°ãæ°å€ãå¶æ°ãå¥æ°ããå€å®ããããã«äœ¿çšãããŠããŸãããã®åŸã io ã©ã€ãã©ãªã䜿çšããŠãŠãŒã¶ãŒããæ°å€ãååŸãã even_or_odd é¢æ°ãåŒã³åºããŠçµæã衚瀺ããŸãã
次ã«ããã®ããã°ã©ã ãæ¹è¯ããŠãå¶æ°ãšå¥æ°ã®ã«ãŠã³ããè¿œå ããŠã¿ãŸãããã
ãã®ããã°ã©ã ã§ã¯ãå¶æ°ãšå¥æ°ã®ã«ãŠã³ãã even_count ãš odd_count å€æ°ã«æ ŒçŽãããŸãããã®åŸãã«ãŒãã®æåŸã«ãããã衚瀺ããŸãã
ãã®ããã°ã©ã ã¯ãããè€éãªæ©èœãè¿œå ããŠãLuaããã°ã©ã ãæ¹è¯ããæ¡åŒµããæ¹æ³ã瀺ããŠããŸãã
ãã®Luaã®ã³ãŒãã¯ããšã©ãã¹ããã¹ã®ç¯©ã䜿ã£ãŠäžãããã n ãŸã§ã®çŽ æ°ãèŠã€ããé¢æ° eratosthenes ãå®çŸ©ããŠããŸãã
ãã®ããã°ã©ã 㯠eratosthenes(100) ãåŒã³åºãããšã§ã100 ãŸã§ã®çŽ æ°ãèŠã€ããŠè¡šç€ºããŸãã
ãã®Luaã®ã³ãŒãã¯ãæ倧å
¬çŽæ°(GCD)ãšæå°å
¬åæ°(LCM)ãèšç®ããé¢æ°ãæäŸããŠããŸãããŸããgcd2é¢æ°ã¯ãæ倧å
¬çŽæ°ãååž°çã«æ±ããããã®ãã®ã§ããäžãããã2ã€ã®æ°å€ã®æ倧å
¬çŽæ°ãèšç®ããŸããgcdé¢æ°ã¯å¯å€é·åŒæ°ãåãåãããããã®æ°å€ã®æ倧å
¬çŽæ°ãèšç®ããŸããlcm2é¢æ°ã¯2ã€ã®æ°å€ã®æå°å
¬åæ°ãèšç®ããlcmé¢æ°ã¯å¯å€é·åŒæ°ãæã¡ããããã®æ°å€ã®æå°å
¬åæ°ãèšç®ããŸãã
æåŸã«ãããããã®é¢æ°ãçšããŠgcd2ãgcdãlcm2ãlcmãå®è¡ããçµæãåºåããŠããŸãããããã®é¢æ°ã䜿ã£ãŠãäžããããæ°å€ã®æ倧å
¬çŽæ°ãšæå°å
¬åæ°ãæ±ããããšãã§ããŸãã
äºåæ³
ãã®Luaã®ã³ãŒãã¯ãäºåæ³ã䜿ã£ãŠé¢æ°ã®æ ¹(æ¹çšåŒã®è§£)ãèŠã€ããããã®é¢æ° bisection ãå®è£
ããŠããŸããããã§ãæž¡ãããé¢æ° f ã¯ãäžããããç¯å² low ãš high ã®éã§è§£ãæ¢çŽ¢ããŸãã絶察å€ãéåžžã«å°ãã(ãã®å Žå㯠1.0e-10 ããå°ãã)å€ãèŠã€ããå Žåããã® x ã®å€ã解ãšããŠè¿ããŸãã
次ã«ãäžãããã2ã€ã®æ¹çšåŒã«å¯Ÿã㊠bisection é¢æ°ã䜿çšããããããã®è§£ãæ±ããŠããŸãã
ããããã®è§£ã print ã䜿ã£ãŠã³ã³ãœãŒã«ã«åºåãããŸãããã®ããã«ãbisection é¢æ°ãçšããŠäžããããé¢æ°ã®æ ¹ãèŠã€ããããšãã§ããŸãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "Luaã¯ã軜éã§é«éãªã¹ã¯ãªããèšèªã§ãããåºã䜿ãããŠããããã°ã©ãã³ã°èšèªã®äžã€ã§ããLuaã¯ãç°¡åã«åŠã¹ãèšèªã§ãããªãããå€ãã®æ©èœãåãã£ãŠãããã²ãŒã éçºãWebã¢ããªã±ãŒã·ã§ã³ãçµã¿èŸŒã¿ã·ã¹ãã ãªã©ãæ§ã
ãªåéã§äœ¿ãããŠããŸãã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "æ¬ãã¥ãŒããªã¢ã«ã§ã¯ãLuaã®åºç€çãªæ§æãæ©èœã«ã€ããŠèª¬æããLuaã䜿ã£ãããã°ã©ãã³ã°ã«ã€ããŠã®ç¥èã身ã«ä»ããããšãç®çãšããŠããŸããæ¬ãã¥ãŒããªã¢ã«ã¯ãåå¿è
ããäžçŽè
ãŸã§ã察象ã«ããŠãããLuaã®åºç€ããå§ããŠãåŸã
ã«å¿çšçãªå
容ã«ç§»ã£ãŠãããŸãã",
"title": ""
},
{
"paragraph_id": 2,
"tag": "p",
"text": "Luaã®åŠç¿ã¯ãããã°ã©ãã³ã°åå¿è
ã«ãåãçµã¿ããããããŸããŸãªã¢ããªã±ãŒã·ã§ã³ã§æŽ»çšã§ããããšãããå°æ¥æ§ãé«ã泚ç®ãéããŠããŸããæ¬ãã¥ãŒããªã¢ã«ãéããŠãLuaã®åºç€ãåŠã³ãLuaã䜿ã£ãããã°ã©ãã³ã°ã®é
åã«è§ŠããŠããã ããã°å¹žãã§ãã",
"title": ""
},
{
"paragraph_id": 3,
"tag": "p",
"text": "Luaã¯ã1993幎ã«ãã©ãžã«ã§éçºããã軜éã§é«éãªã¹ã¯ãªããèšèªã§ããªãŒãã³ãœãŒã¹ã§ããããšãç¹åŸŽã§ããLuaã¯ãã¹ã¯ãªããèšèªãšããŠã¯æ¯èŒçå°ãããCèšèªã§æžãããŠãããããé«éã§ã¡ã¢ãªå¹çãè¯ããšããç¹åŸŽããããŸãã",
"title": "ã€ã³ãããã¯ã·ã§ã³"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "Luaã®ç¹åŸŽã¯ã軜éã§é«éãªããšããCèšèªãšã®èŠªåæ§ãé«ãããšã«å ãã以äžã®ãããªãã®ãæããããŸãã",
"title": "ã€ã³ãããã¯ã·ã§ã³"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "Luaã¯ã以äžã®ãããªåéã§äœ¿ãããŠããŸãã",
"title": "ã€ã³ãããã¯ã·ã§ã³"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "Luaã¯ããã®å°ãããé«éæ§ãæ¡åŒµæ§ãåã蟌ã¿æ§ãªã©ã®ç¹åŸŽãããæ§ã
ãªåéã§å©çšãããŠããŸãã",
"title": "ã€ã³ãããã¯ã·ã§ã³"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "Luaã¯ãå
¬åŒãµã€ã( https://www.lua.org/download.html )ããããœãŒã¹ã³ãŒãããã€ããªãã¡ã€ã«ãããŠã³ããŒãããããšãã§ããŸãã ãŸããäžéšã®Linuxãã£ã¹ããªãã¥ãŒã·ã§ã³ãBSDç³»UNIXã§ã¯ãããã±ãŒãžãããŒãžã£ãå©çšããŠç°¡åã«ã€ã³ã¹ããŒã«ããããšãã§ããŸãã",
"title": "ã€ã³ã¹ããŒã«ãšã»ããã¢ãã"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "ã€ã³ã¹ããŒã«ãå®äºããããã³ãã³ãã©ã€ã³ãã以äžã®ããã«å
¥åããããšã§ãLuaã®å¯Ÿè©±ã¢ãŒããèµ·åããããšãã§ããŸãã",
"title": "ã€ã³ã¹ããŒã«ãšã»ããã¢ãã"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "察話ã¢ãŒãã¯ãã³ãã³ãã©ã€ã³ããäžè¡ãã€Luaã®ã³ãŒããå
¥åããŠãå³åº§ã«è©äŸ¡ããããšãã§ããŸãã",
"title": "ã€ã³ã¹ããŒã«ãšã»ããã¢ãã"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "ãŸããLuaã®ããã°ã©ã ããã¡ã€ã«ã«ä¿åããŠå®è¡ããããšãã§ããŸããäŸãã°ã以äžã®ãããªã¹ã¯ãªãããã¡ã€ã«ãäœæãã\"hello.lua\"ãšããååã§ä¿åããŸãã",
"title": "ã€ã³ã¹ããŒã«ãšã»ããã¢ãã"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "ãããŠãã³ãã³ãã©ã€ã³ãã以äžã®ããã«å
¥åããããšã§ãã¹ã¯ãªãããå®è¡ããããšãã§ããŸãã",
"title": "ã€ã³ã¹ããŒã«ãšã»ããã¢ãã"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "Luaã®ããã°ã©ã ãæžãããã«ã¯ãããã¹ããšãã£ã¿ãŒãå¿
èŠã§ãã å€ãã®ããã¹ããšãã£ã¿ãŒãLuaã®ã·ã³ã¿ãã¯ã¹ãã€ã©ã€ãããµããŒãããŠããŸãããç¹ã«ãããããªã®ã¯ãZeroBrane StudioãVisual Studio Codeãªã©ã®ãLuaéçºã«ç¹åãããšãã£ã¿ãŒã§ãã ãããã®ãšãã£ã¿ãŒã«ã¯ããããã°æ©èœãã³ãŒãè£å®æ©èœãªã©ãéçºãå¹çåããæ©èœãå€æ°åãã£ãŠããŸãã",
"title": "ã€ã³ã¹ããŒã«ãšã»ããã¢ãã"
},
{
"paragraph_id": 13,
"tag": "p",
"text": "Luaã§ã¯ãå€æ°åã®åã«localããŒã¯ãŒããä»ããããšã§ããã®å€æ°ãããŒã«ã«ã¹ã³ãŒãã§å®£èšããããšãã§ããŸããäŸãã°ã以äžã®ããã«ããŠãxãšããå€æ°ã宣èšããããšãã§ããŸãã",
"title": "å€æ°ãšããŒã¿å"
},
{
"paragraph_id": 14,
"tag": "p",
"text": "å€æ°ã«åæå€ã代å
¥ããå Žåã¯ã以äžã®ããã«å®£èšãšä»£å
¥ãåæã«è¡ãããšãã§ããŸãã",
"title": "å€æ°ãšããŒã¿å"
},
{
"paragraph_id": 15,
"tag": "p",
"text": "Luaã«ã¯ã以äžã®ãããªããŒã¿åããããŸãã",
"title": "å€æ°ãšããŒã¿å"
},
{
"paragraph_id": 16,
"tag": "p",
"text": "å€æ°ã«å€ã代å
¥ããå Žåã¯ã以äžã®ããã«ããŠè¡ããŸãã",
"title": "å€æ°ãšããŒã¿å"
},
{
"paragraph_id": 17,
"tag": "p",
"text": "ãŸãã代å
¥ãããå€ãåãåºããŠæäœããå Žåã¯ã以äžã®ããã«ããŠè¡ããŸãã",
"title": "å€æ°ãšããŒã¿å"
},
{
"paragraph_id": 18,
"tag": "p",
"text": "æååã®å Žåã¯ã以äžã®ããã«ããŠé£çµããããšãã§ããŸãã",
"title": "å€æ°ãšããŒã¿å"
},
{
"paragraph_id": 19,
"tag": "p",
"text": "ãŸããããŒãã«ã®å Žåã¯ã以äžã®ããã«ããŠèŠçŽ ãè¿œå ããããåé€ãããããããšãã§ããŸãã",
"title": "å€æ°ãšããŒã¿å"
},
{
"paragraph_id": 20,
"tag": "p",
"text": "ãããã®æäœãå©çšããŠãLuaã§æ§ã
ãªåŠçãè¡ãããšãã§ããŸãã",
"title": "å€æ°ãšããŒã¿å"
},
{
"paragraph_id": 21,
"tag": "p",
"text": "以äžã¯ãLuaã®å¶åŸ¡æ§é ã®ããã€ãã®äŸã§ãã",
"title": "å¶åŸ¡æ§æ"
},
{
"paragraph_id": 22,
"tag": "p",
"text": "æ¡ä»¶åå²ã«ã¯ifæã䜿çšããŸãã以äžã¯ãxãæ£ã®æ°ã§ããã°ã\"positive\"ãšè¡šç€ºããããã°ã©ã ã®äŸã§ãã",
"title": "å¶åŸ¡æ§æ"
},
{
"paragraph_id": 23,
"tag": "p",
"text": "ãŸããifæã®åŸã«elseifãç¶ããŠæžãããšã§ãè€æ°ã®æ¡ä»¶åå²ãè¡ãããšãã§ããŸãã",
"title": "å¶åŸ¡æ§æ"
},
{
"paragraph_id": 24,
"tag": "p",
"text": "Luaã«ã¯ã以äžã®3çš®é¡ã®ã«ãŒãåŠçããããŸãã",
"title": "å¶åŸ¡æ§æ"
},
{
"paragraph_id": 25,
"tag": "p",
"text": "whileã«ãŒãã¯ãæ¡ä»¶åŒãtrueã®éãç¹°ãè¿ãåŠçãè¡ããŸãã",
"title": "å¶åŸ¡æ§æ"
},
{
"paragraph_id": 26,
"tag": "p",
"text": "repeat-untilã«ãŒãã¯ãæ¡ä»¶åŒãtrueã«ãªããŸã§ãç¹°ãè¿ãåŠçãè¡ããŸãã",
"title": "å¶åŸ¡æ§æ"
},
{
"paragraph_id": 27,
"tag": "p",
"text": "forã«ãŒãã¯ããããããæå®ããåæ°åãç¹°ãè¿ãåŠçãè¡ããŸãã以äžã¯ã1ãã10ãŸã§ã®æ°åãé çªã«è¡šç€ºããããã°ã©ã ã®äŸã§ãã",
"title": "å¶åŸ¡æ§æ"
},
{
"paragraph_id": 28,
"tag": "p",
"text": "ãã®ã³ãŒãã¯ãLuaã®forã«ãŒãã䜿çšããŠ1ãã10ãŸã§ã®æ°å€ã2ãã€å¢ãããªããé ã«åãåºãããããããåºåããããã°ã©ã ã§ãã",
"title": "å¶åŸ¡æ§æ"
},
{
"paragraph_id": 29,
"tag": "p",
"text": "forã«ãŒãã®æžåŒã¯ã以äžã®ããã«ãªã£ãŠããŸãã",
"title": "å¶åŸ¡æ§æ"
},
{
"paragraph_id": 30,
"tag": "p",
"text": "åæå€ããå§ãŸããçµäºå€ã«éãããŸã§ãæå®ãããå¢åãã€å€ãå¢ãããªããã«ãŒãåŠçãå®è¡ãããŸãã",
"title": "å¶åŸ¡æ§æ"
},
{
"paragraph_id": 31,
"tag": "p",
"text": "å¢åã¯çç¥å¯èœã§ããã®å Žå㯠1 ãä»®å®ãããŸãã",
"title": "å¶åŸ¡æ§æ"
},
{
"paragraph_id": 32,
"tag": "p",
"text": "ä»åã®ã³ãŒãã§ã¯ãåæå€ã1ãçµäºå€ã10ãå¢åã2ãšããŠããããã1, 3, 5, 7, 9ã®5ã€ã®æ°å€ãé ã«åãåºããããããããprint()é¢æ°ã§åºåãããŸãã",
"title": "å¶åŸ¡æ§æ"
},
{
"paragraph_id": 33,
"tag": "p",
"text": "å
·äœçã«å®è¡ãããšã以äžã®ãããªçµæãåŸãããŸãã",
"title": "å¶åŸ¡æ§æ"
},
{
"paragraph_id": 34,
"tag": "p",
"text": "breakæã䜿çšããããšã§ãã«ãŒãåŠçãéäžã§çµäºããããšãã§ããŸãã",
"title": "å¶åŸ¡æ§æ"
},
{
"paragraph_id": 35,
"tag": "p",
"text": "以äžã¯ã1ãã10ãŸã§ã®æ°åãé çªã«è¡šç€ºãã5ã«ãªã£ããã«ãŒããçµäºããããã°ã©ã ã®äŸã§ãã",
"title": "å¶åŸ¡æ§æ"
},
{
"paragraph_id": 36,
"tag": "p",
"text": "é¢æ°ãå®çŸ©ããã«ã¯ã以äžã®ããã«functionããŒã¯ãŒãã䜿çšããŸãããŸããåŒæ°ãæž¡ãå Žåã¯ã()ã®äžã«åŒæ°åãæžããŸãã",
"title": "å¶åŸ¡æ§æ"
},
{
"paragraph_id": 37,
"tag": "p",
"text": "é¢æ°ãåŒã³åºãã«ã¯ãé¢æ°åãšãšãã«åŒæ°ãæž¡ããŸãã以äžã¯ãgreeté¢æ°ãåŒã³åºãããã°ã©ã ã®äŸã§ãã",
"title": "å¶åŸ¡æ§æ"
},
{
"paragraph_id": 38,
"tag": "p",
"text": "Luaã«ã¯ããŒã¯ãŒãåŒæ°ããªããé¢æ°ã®åŒæ°ã¯äœçœ®åŒæ°ãšããŠæž¡ãããŸãã",
"title": "å¶åŸ¡æ§æ"
},
{
"paragraph_id": 39,
"tag": "p",
"text": "å¯å€é·åŒæ°ãåãåããããLuaã§ã¯ ... ãšããæ§æããããŸããããã¯é¢æ°ã®åŒæ°ãªã¹ãã®æåŸã«çœ®ãããŸããå¯å€é·åŒæ°ã¯ãåŒã³åºãåŽãæž¡ãåŒæ°ã®æ°ã«ãã£ãŠç°ãªããŸããé¢æ°å
ã§ã¯ãå¯å€é·åŒæ°ã¯ããŒãã«ãšããŠæ±ãããŸããããšãã°ã以äžã®ããã«ããŠå¯å€é·åŒæ°ãåãåãé¢æ°ãå®çŸ©ã§ããŸãã",
"title": "å¶åŸ¡æ§æ"
},
{
"paragraph_id": 40,
"tag": "p",
"text": "æ®äœåŒæ°ã¯ãããŸããããå¯å€é·åŒæ°ãåãåã£ãåŸã«ãä»»æã®äœçœ®åŒæ°ãåãåãããšãã§ããŸããããšãã°ã以äžã®ããã«ã㊠x ãšããäœçœ®åŒæ°ãåãåãé¢æ°ãå®çŸ©ã§ããŸãã",
"title": "å¶åŸ¡æ§æ"
},
{
"paragraph_id": 41,
"tag": "p",
"text": "Luaã§ã¯ãé¢æ°ããªããžã§ã¯ãã®äžçš®ã§ãããããå€æ°ã«é¢æ°ã代å
¥ããããšãã§ããŸãã",
"title": "å¶åŸ¡æ§æ"
},
{
"paragraph_id": 42,
"tag": "p",
"text": "é¢æ°ã®è¿ãå€ãååŸããã«ã¯ãreturnããŒã¯ãŒãã䜿çšããŸãã",
"title": "å¶åŸ¡æ§æ"
},
{
"paragraph_id": 43,
"tag": "p",
"text": "Luaã¯æååæäœã«äŸ¿å©ãªæ©èœãæäŸããŠããŸããæååã¯ãã¯ã©ãŒããŒã·ã§ã³ã§å²ãã æåã®ã·ãŒã±ã³ã¹ã§ããããã«ã¯ã©ãŒããŒã·ã§ã³ãŸãã¯ã·ã³ã°ã«ã¯ã©ãŒããŒã·ã§ã³ã®ã©ã¡ãã§ãè¡šçŸã§ããŸãã",
"title": "æååæäœ"
},
{
"paragraph_id": 44,
"tag": "p",
"text": "æååã¯ã..æŒç®åã§é£çµããããšãã§ããŸãã",
"title": "æååæäœ"
},
{
"paragraph_id": 45,
"tag": "p",
"text": "æååãéšåçã«åãåºãã«ã¯ãstring.subé¢æ°ã䜿çšããŸãã",
"title": "æååæäœ"
},
{
"paragraph_id": 46,
"tag": "p",
"text": "ãŸããæååãéé ã«ããã«ã¯ãstring.reverseé¢æ°ã䜿çšããŸãã",
"title": "æååæäœ"
},
{
"paragraph_id": 47,
"tag": "p",
"text": "Luaã¯ãCèšèªãšåæ§ã«ãæååã®ãã©ãŒãããã«äŸ¿å©ãªæ©èœãæäŸããŠããŸããstring.formaté¢æ°ã䜿çšããŠãæååãç¹å®ã®åœ¢åŒã«æŽåœ¢ããããšãã§ããŸãã",
"title": "æååæäœ"
},
{
"paragraph_id": 48,
"tag": "p",
"text": "ãã®äŸã§ã¯ã%sã¯æååã%dã¯10é²æ°ã%.1fã¯å°æ°ç¹ä»¥äž1æ¡ã®æµ®åå°æ°ç¹æ°ãè¡šããŸããstring.formaté¢æ°ã«æž¡ãåŒæ°ã¯ããã©ãŒãããæååå
ã®å€æ°ãšäžèŽããé åºã§æå®ããå¿
èŠããããŸãã",
"title": "æååæäœ"
},
{
"paragraph_id": 49,
"tag": "p",
"text": "ãããã®æ©èœãé§äœ¿ããããšã§ãLuaã§æè»ãªæååæäœãå¯èœã«ãªããŸãã",
"title": "æååæäœ"
},
{
"paragraph_id": 50,
"tag": "p",
"text": "Luaã«ãããŠãããŒãã«ã¯è€æ°ã®å€ãæ ŒçŽããããã®ããŒã¿æ§é ã®1ã€ã§ããããŒãã«ã¯é
åãèŸæžã®ãããªåœ¢åŒã§ãããŒãšå€ããã¢ãšããŠæã¡ãŸãã",
"title": "ããŒãã«ãšé
å"
},
{
"paragraph_id": 51,
"tag": "p",
"text": "ããŒãã«ã¯ã{}ã§äœæããããšãã§ããŸãã以äžã®ããã«ãèŠçŽ ãã«ã³ãã§åºåã£ãŠåæããããšã§åæåããããšãã§ããŸãã",
"title": "ããŒãã«ãšé
å"
},
{
"paragraph_id": 52,
"tag": "p",
"text": "ãŸãã以äžã®ããã«ãã€ã³ããã¯ã¹ãæå®ããŠèŠçŽ ãè¿œå ããããšãã§ããŸãã",
"title": "ããŒãã«ãšé
å"
},
{
"paragraph_id": 53,
"tag": "p",
"text": "ããŒãã«ã«æ ŒçŽãããèŠçŽ ã«ã¯ã以äžã®ãããªæ¹æ³ã§ã¢ã¯ã»ã¹ããããšãã§ããŸãã",
"title": "ããŒãã«ãšé
å"
},
{
"paragraph_id": 54,
"tag": "p",
"text": "以äžã«ãããããã®æäœã®äŸã瀺ããŸãã",
"title": "ããŒãã«ãšé
å"
},
{
"paragraph_id": 55,
"tag": "p",
"text": "Luaã¯ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåèšèªã§ãããã¯ã©ã¹ãå®çŸ©ããã®ã§ã¯ãªãããªããžã§ã¯ãã®ãããã¿ã€ããäœæããããšã§ãªããžã§ã¯ããçæããŸãã",
"title": "ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæå"
},
{
"paragraph_id": 56,
"tag": "p",
"text": "ãªããžã§ã¯ãã¯ããŒãã«ãšããŠè¡šçŸããããªããžã§ã¯ãã®æ¯ãèããæŒç®åã®æ¯ãèããå®çŸ©ããããã«ãããŒãã«ã«ã¡ãœãããè¿œå ã§ããŸãããŸããã¡ãœããã®åŒã³åºãã«ã¯ã.ãã䜿ããŸãã",
"title": "ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæå"
},
{
"paragraph_id": 57,
"tag": "p",
"text": "ã¡ã¿ããŒãã«ã¯ãããŒãã«ã«ç¹å®ã®åäœãå®çŸ©ããããã«äœ¿çšãããŸããäŸãã°ãã¡ã¿ããŒãã«ã䜿çšããŠããªããžã§ã¯ããå ç®ãæžç®ãæ¯èŒãªã©ã®æŒç®ããµããŒãããããã«ããããšãã§ããŸãã",
"title": "ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæå"
},
{
"paragraph_id": 58,
"tag": "p",
"text": "ã¡ã¿ããŒãã«ã¯ã__indexã__newindexã__addã__subã__mulã__divã__modã__powã__unmã__eqã__ltã__leã__callãªã©ã®ç¹æ®ãªããŒãæã€ããŒãã«ãšããŠå®çŸ©ãããŸãããããã®ããŒã«ã¯ãç¹å®ã®åäœãé¢é£ä»ããããŠããŸãã",
"title": "ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæå"
},
{
"paragraph_id": 59,
"tag": "p",
"text": "å
·äœçãªäŸãèŠãŠã¿ãŸãããã以äžã®ãããªAnimalããŒãã«ãäœæããŸãã",
"title": "ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæå"
},
{
"paragraph_id": 60,
"tag": "p",
"text": "ãã®äŸã§ã¯ãAnimalããŒãã«ã«soundãã£ãŒã«ããå®çŸ©ããnew()é¢æ°ããªããžã§ã¯ãäœæã®ããã«å®çŸ©ããŠããŸããmakeSound()é¢æ°ã¯Animalãªããžã§ã¯ããåŒã³åºããããšãã«ããªããžã§ã¯ãã®soundãã£ãŒã«ãã®é³ãåºåããããã«äœ¿çšãããŸãã",
"title": "ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæå"
},
{
"paragraph_id": 61,
"tag": "p",
"text": "次ã«ãAnimalããŒãã«ããCatããŒãã«ãäœæããŸãã",
"title": "ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæå"
},
{
"paragraph_id": 62,
"tag": "p",
"text": "ãã®äŸã§ã¯ãCatããŒãã«ã¯AnimalããŒãã«ãã掟çããŠãããCatãªããžã§ã¯ãã«ã¯makeSound()ã¡ãœãããå«ãŸããsoundãã£ãŒã«ãã«ã¯\"Meow\"ãšããå€ãæ ŒçŽãããŠããŸããscratch()ã¡ãœãããè¿œå ãããŸããã",
"title": "ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæå"
},
{
"paragraph_id": 63,
"tag": "p",
"text": "æåŸã«ãæ°ããCatãªããžã§ã¯ããäœæããŠãã¡ãœããã®åäœã確èªããŸãã",
"title": "ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæå"
},
{
"paragraph_id": 64,
"tag": "p",
"text": "ãã®äŸã§ã¯ãCatããŒãã«ã䜿çšããããšã§ãAnimalããŒãã«ã®makeSound()ã¡ãœãããåå©çšããæ°ããã¡ãœããscratch()ãè¿œå ããŸããããŸããã¡ã¿ããŒãã«ãéããŠããªããžã§ã¯ããšããŠã®Catã®æ¯ãèããã«ã¹ã¿ãã€ãºããããšãã§ããŸãã",
"title": "ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæå"
},
{
"paragraph_id": 65,
"tag": "p",
"text": "ãŠãŒã¶ãŒå®çŸ©ã®ãªããžã§ã¯ãã®äŸãšããŠãè€çŽ æ°ãªããžã§ã¯ãã®å®çŸ©ãåãäžããŸãã",
"title": "ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæå"
},
{
"paragraph_id": 66,
"tag": "p",
"text": "LuaRocksã¯ãLuaèšèªçšã®ããã±ãŒãžç®¡çããŒã«ã§ãã ãã®ããŒã«ã䜿çšãããšãLuaã®æ¡åŒµæ©èœããŠãŒãã£ãªãã£ãç°¡åã«ã€ã³ã¹ããŒã«ãã¢ããã°ã¬ãŒããåé€ããããšãã§ããŸãã LuaRocksã䜿ãããã«ã¯ãå
ã«Luaã®ã©ã³ã¿ã€ã ãå¿
èŠã«ãªããŸãã",
"title": "LuaRocks"
},
{
"paragraph_id": 67,
"tag": "p",
"text": "以äžã«ãLuaRocksã®åºæ¬çãªäœ¿ãæ¹ã説æããŸãã",
"title": "LuaRocks"
},
{
"paragraph_id": 68,
"tag": "p",
"text": "æ°ããããã±ãŒãžãã€ã³ã¹ããŒã«ããã«ã¯ã以äžã®ã³ãã³ããå®è¡ããŸãã",
"title": "LuaRocks"
},
{
"paragraph_id": 69,
"tag": "p",
"text": "ããšãã°ãluasocketãšããããã±ãŒãžãã€ã³ã¹ããŒã«ããå Žåã¯ã以äžã®ããã«å
¥åããŸãã",
"title": "LuaRocks"
},
{
"paragraph_id": 70,
"tag": "p",
"text": "äžèŠãªããã±ãŒãžãã¢ã³ã€ã³ã¹ããŒã«ããã«ã¯ã以äžã®ã³ãã³ããå®è¡ããŸãã",
"title": "LuaRocks"
},
{
"paragraph_id": 71,
"tag": "p",
"text": "ããšãã°ãå
ã»ã©ã€ã³ã¹ããŒã«ããluasocketããã±ãŒãžãã¢ã³ã€ã³ã¹ããŒã«ããå Žåã¯ã以äžã®ããã«å
¥åããŸãã",
"title": "LuaRocks"
},
{
"paragraph_id": 72,
"tag": "p",
"text": "ã€ã³ã¹ããŒã«ãããŠããããã±ãŒãžã®äžèŠ§ã衚瀺ããã«ã¯ã以äžã®ã³ãã³ããå
¥åããŸãã",
"title": "LuaRocks"
},
{
"paragraph_id": 73,
"tag": "p",
"text": "ã€ã³ã¹ããŒã«ãããŠããããã±ãŒãžã®ããŒãžã§ã³ã確èªããã«ã¯ã以äžã®ã³ãã³ããå
¥åããŸãã",
"title": "LuaRocks"
},
{
"paragraph_id": 74,
"tag": "p",
"text": "ãã ãããã®ã³ãã³ãã¯ã€ã³ã¹ããŒã«ãããŠããããã±ãŒãžã«éå®ãããŸããã€ã³ã¹ããŒã«ãããŠããªãããã±ãŒãžã®ããŒãžã§ã³ã確èªãããå Žåã¯ã以äžã®ããã«å
¥åããŸãã",
"title": "LuaRocks"
},
{
"paragraph_id": 75,
"tag": "p",
"text": "以äžããLuaRocksã®åºæ¬çãªäœ¿ãæ¹ã§ãããããã®ã³ãã³ããå®è¡ããããšã§ãLuaã®æ¡åŒµæ©èœããŠãŒãã£ãªãã£ãç°¡åã«ã€ã³ã¹ããŒã«ãã¢ããã°ã¬ãŒããåé€ããããšãã§ããŸãã",
"title": "LuaRocks"
},
{
"paragraph_id": 76,
"tag": "p",
"text": "LuaDocã¯ãLuaã®ããã¥ã¡ã³ããŒã·ã§ã³ããŒã«ã§ããããœãŒã¹ã³ãŒãå
ã«ããé¢æ°ãã¢ãžã¥ãŒã«ã«ã€ããŠã®æ
å ±ãèªåçã«æœåºããŠãHTMLãXMLããŸãã¯ããã¹ã圢åŒã®ããã¥ã¡ã³ããçæããããšãã§ããŸãã",
"title": "Luadoc"
},
{
"paragraph_id": 77,
"tag": "p",
"text": "以äžã«ãLuaDocã«ãã£ãŠçæãããããã¥ã¡ã³ãã«å«ãŸããæ
å ±ã®çš®é¡ã瀺ããŸãã",
"title": "Luadoc"
},
{
"paragraph_id": 78,
"tag": "p",
"text": "LuaDocã¯ãLuaã®ããŒãã«ããªããžã§ã¯ãæåããã°ã©ãã³ã°ãããã³ããŒãžã§ã³å¶åŸ¡ã·ã¹ãã ã«ã察å¿ããŠããŸãããŸããLuaDocã¯ããŠãŒã¶ãŒå®çŸ©ã®ã¿ã°ã䜿çšããŠãã«ã¹ã¿ã ã¿ã°ãäœæããããšãã§ããŸãã",
"title": "Luadoc"
},
{
"paragraph_id": 79,
"tag": "p",
"text": "LuaDocã«ã¯ã以äžã®ãããªäž»ãªæ©èœããããŸãã",
"title": "Luadoc"
},
{
"paragraph_id": 80,
"tag": "p",
"text": "ãŠãŒã¶ãŒå®çŸ©ã®æ¡åŒµ LuaDocã¯ããŠãŒã¶ãŒãç¬èªã®ã¿ã°ãå®çŸ©ããŠãããã¥ã¡ã³ãåããæ
å ±ãã«ã¹ã¿ãã€ãºããããšãã§ããŸãã",
"title": "Luadoc"
},
{
"paragraph_id": 81,
"tag": "p",
"text": "以äžããLuaDocã®æŠèŠã§ããLuaDocã¯ãLuaã³ãã¥ããã£ãŒã«ãããŠãåºã䜿ãããŠããããã¥ã¡ã³ããŒã·ã§ã³ããŒã«ã§ãããLuaãããžã§ã¯ãã®éçºè
ã«ãšã£ãŠéèŠãªããŒã«ã®1ã€ã§ãã",
"title": "Luadoc"
},
{
"paragraph_id": 82,
"tag": "p",
"text": "LuaDocã§äœ¿çšãããåºæ¬æ§æã®äŸã§ãã",
"title": "Luadoc"
},
{
"paragraph_id": 83,
"tag": "p",
"text": "Luadocã¯ãç¹æ®ãªæ¹æ³ã§Luaã®ã³ã¡ã³ããèªèããŸãã次ã®ãããªäŸã§ãã",
"title": "Luadoc"
},
{
"paragraph_id": 84,
"tag": "p",
"text": "---ã§å§ãŸãè¡ã¯ãLuaDocã«ãã£ãŠããã¥ã¡ã³ãã®äžéšãšããŠè§£éãããŸããã³ã¡ã³ãè¡ãç¶ããŠè¡ãããšãå¯èœã§ããããã¯å
šãŠåãããã¥ã¡ã³ãããã¹ããšããŠåŠçãããŸãã",
"title": "Luadoc"
},
{
"paragraph_id": 85,
"tag": "p",
"text": "ã³ã¡ã³ãã«ã¯ãè¡ã«ç¶ãã¿ã°ãå«ããããããšããããŸããã³ã¡ã³ããšã¿ã°ã®éã«ã¯ãã¹ããŒã¹ãå¿
èŠã§ãã",
"title": "Luadoc"
},
{
"paragraph_id": 86,
"tag": "p",
"text": "LuaDocã§ã¯ãããã€ãã®ããã¥ã¡ã³ãã¿ã°ã䜿çšãããŸããäžèšã«äŸãæããŸãã",
"title": "Luadoc"
},
{
"paragraph_id": 87,
"tag": "p",
"text": "é¢æ°ã®åŒæ°ã®èª¬æãæäŸããŸãã",
"title": "Luadoc"
},
{
"paragraph_id": 88,
"tag": "p",
"text": "é¢æ°ãè¿ãå€ã説æããŸãã",
"title": "Luadoc"
},
{
"paragraph_id": 89,
"tag": "p",
"text": "é¢æ°ãªã©ã®é¢é£ããå
容ãåç
§å
ã説æããã¿ã°ã",
"title": "Luadoc"
},
{
"paragraph_id": 90,
"tag": "p",
"text": "ãã®ããã«ããŠãLuaDocã䜿çšããããšã§ãLuaã®ã³ãŒãã«å¯ŸããŠããã¥ã¡ã³ããèªåçã«çæããããšãã§ããŸãã",
"title": "Luadoc"
},
{
"paragraph_id": 91,
"tag": "p",
"text": "Luadocã¯ãã³ã¡ã³ãã«èšè¿°ãããç¹å®ã®ãã¿ãŒã³ã解æããããã¥ã¡ã³ãã®çæã«äœ¿çšããŸããã³ã¡ã³ãã«æ¿å
¥ãããã¿ã°ã®äŸãããã€ã瀺ããŸãã",
"title": "Luadoc"
},
{
"paragraph_id": 92,
"tag": "p",
"text": "ãªãã¡ã¬ã³ã¹ã®çæãææžã®ãã«ãããœãŒã¹ã³ãŒãã®ãããã¡ã€ãªã³ã°ãªã©ãLuadocã®ããŸããŸãªã³ãã³ããå©çšã§ããŸãã以äžã¯ããã€ãã®ä»£è¡šçãªã³ãã³ãã§ãã",
"title": "Luadoc"
},
{
"paragraph_id": 93,
"tag": "p",
"text": "以äžã¯Luaã«ããããã¡ã€ã«å
¥åºåã«é¢ããåºæ¬çãªæäœã®äŸã§ãã",
"title": "ãã¡ã€ã«å
¥åºå"
},
{
"paragraph_id": 94,
"tag": "p",
"text": "äžèšã®äŸã§ã¯ãio.opené¢æ°ã䜿ã£ãŠãã¡ã€ã«ãéããfileå€æ°ã«ä»£å
¥ããŠããŸãã第äžåŒæ°ã«ãã¡ã€ã«åã第äºåŒæ°ã«ã¢ãŒããæå®ããŸããrã¢ãŒãã¯èªã¿èŸŒã¿å°çšã¢ãŒããè¡šããŸãã",
"title": "ãã¡ã€ã«å
¥åºå"
},
{
"paragraph_id": 95,
"tag": "p",
"text": "次ã«ãfile:lines()ã䜿ã£ãŠãã¡ã€ã«ãã1è¡ãã€èªã¿èŸŒã¿ãforã«ãŒãã䜿ã£ãŠè¡ãåºåããŠããŸãã",
"title": "ãã¡ã€ã«å
¥åºå"
},
{
"paragraph_id": 96,
"tag": "p",
"text": "æåŸã«ããã¡ã€ã«ãéããããã«file:close()ãåŒã³åºããŠããŸãã",
"title": "ãã¡ã€ã«å
¥åºå"
},
{
"paragraph_id": 97,
"tag": "p",
"text": "äžèšã®äŸã§ã¯ãio.opené¢æ°ã䜿ã£ãŠãã¡ã€ã«ãéããfileå€æ°ã«ä»£å
¥ããŠããŸãã第äžåŒæ°ã«ãã¡ã€ã«åã第äºåŒæ°ã«ã¢ãŒããæå®ããŸããwã¢ãŒãã¯æžã蟌ã¿å°çšã¢ãŒããè¡šããŸããæ¢åã®ãã¡ã€ã«ãããå Žåãå
容ãäžæžããããŸãã",
"title": "ãã¡ã€ã«å
¥åºå"
},
{
"paragraph_id": 98,
"tag": "p",
"text": "次ã«ãfile:write()ã䜿ã£ãŠãã¡ã€ã«ã«æååãæžã蟌ãã§ããŸãã",
"title": "ãã¡ã€ã«å
¥åºå"
},
{
"paragraph_id": 99,
"tag": "p",
"text": "æåŸã«ããã¡ã€ã«ãéããããã«file:close()ãåŒã³åºããŠããŸãã",
"title": "ãã¡ã€ã«å
¥åºå"
},
{
"paragraph_id": 100,
"tag": "p",
"text": "äžèšã®äŸã§ã¯ããã¡ã€ã«ãžã®æžã蟌ã¿ãå®äºããæç¹ã§ããã¡ã€ã«ãéããããããããã¡ã€ã«ãæ瀺çã«éããå¿
èŠã¯ãããŸããããã ãããã¡ã€ã«ãéãããŸãŸã«ããŠãããšãã¡ã¢ãªãªãŒã¯ãªã©ã®åé¡ãçºçããå¯èœæ§ãããããããã¡ã€ã«ã®æäœãçµäºãããå¿
ãfile:close()ãåŒã³åºãããã«ããŠãã ããã",
"title": "ãã¡ã€ã«å
¥åºå"
},
{
"paragraph_id": 101,
"tag": "p",
"text": "ã¢ãžã¥ãŒã«ãšã¯ãäžé£ã®é¢æ°ãå€æ°ããŸãšãããã®ã§ãåå©çšæ§ãé«ããã³ãŒãã®å
±ææ¹æ³ã§ããããã±ãŒãžã¯ãè€æ°ã®ã¢ãžã¥ãŒã«ããŸãšããŠç®¡çããæ¹æ³ã§ãã",
"title": "ã¢ãžã¥ãŒã«ãšããã±ãŒãž"
},
{
"paragraph_id": 102,
"tag": "p",
"text": "Luaã«ãããŠãã¢ãžã¥ãŒã«ã¯ããŒãã«ã䜿ã£ãŠå®è£
ãããŸããéåžžãã¢ãžã¥ãŒã«ã¯æ°ããããŒãã«ãäœæããŠãããã«é¢æ°ãå€æ°ãæ ŒçŽããŸããã¢ãžã¥ãŒã«ãå©çšããåŽã¯ããã®ã¢ãžã¥ãŒã«ãæäŸããé¢æ°ãå€æ°ã«ã¢ã¯ã»ã¹ããããã«ãã¢ãžã¥ãŒã«ãããŒãããå¿
èŠããããŸãã",
"title": "ã¢ãžã¥ãŒã«ãšããã±ãŒãž"
},
{
"paragraph_id": 103,
"tag": "p",
"text": "ããã±ãŒãžã¯ãè€æ°ã®ã¢ãžã¥ãŒã«ãäžã€ã®ããã±ãŒãžã«ãŸãšãããã®ããã±ãŒãžãå©çšããæ¹æ³ãæäŸããŸããããã±ãŒãžã«ã¯ãäžã€ä»¥äžã®ã¢ãžã¥ãŒã«ãå«ãŸããŠããå ŽåããããŸããéåžžãããã±ãŒãžã¯ãã£ã¬ã¯ããªéå±€ã䜿ã£ãŠç®¡çãããããã±ãŒãžã®ååã¯ãã£ã¬ã¯ããªåã«å¯Ÿå¿ããŸããããã±ãŒãžã¯ãLuaã®æšæºã©ã€ãã©ãªããããŒãããããšãã§ããŸãããã«ã¹ã¿ã ã®ããã±ãŒãžãäœæããããšãã§ããŸãã",
"title": "ã¢ãžã¥ãŒã«ãšããã±ãŒãž"
},
{
"paragraph_id": 104,
"tag": "p",
"text": "以äžã¯ãã¢ãžã¥ãŒã«ãšããã±ãŒãžã®äŸã§ãã",
"title": "ã¢ãžã¥ãŒã«ãšããã±ãŒãž"
},
{
"paragraph_id": 105,
"tag": "p",
"text": "ãããã®ã³ãŒãã¯ã\"mymodule.lua\"ãšããååã®ã¢ãžã¥ãŒã«ãäœæãã\"main.lua\"ã§ããŒãããŠäœ¿çšããäŸãšã\"mypackage\"ãšããååã®ããã±ãŒãžãäœæãããã®äžã«\"mymodule\"ãšããååã®ã¢ãžã¥ãŒã«ãå«ããŠã\"main.lua\"ã§äœ¿çšããäŸã瀺ããŠããŸãã",
"title": "ã¢ãžã¥ãŒã«ãšããã±ãŒãž"
},
{
"paragraph_id": 106,
"tag": "p",
"text": "Luaã¯ãCèšèªã«ããæ¡åŒµã容æã«è¡ããããã«èšèšãããŠããŸããLuaã®C APIã䜿ãããšã§ãCèšèªã§æžãããã¢ãžã¥ãŒã«ãã©ã€ãã©ãªãLuaããå©çšããããšãã§ããŸãã Luaã®C APIã¯ãLuaã®ä»æ§ã«åºã¥ããŠäœãããŠãããããCèšèªããLuaã¹ã¯ãªãããå®è¡ããããLuaã¹ã¯ãªããããCèšèªã®é¢æ°ãåŒã³åºãããããããšãã§ããŸãã",
"title": "Luaã®æ¡åŒµæ§ãšC API"
},
{
"paragraph_id": 107,
"tag": "p",
"text": "Luaã¯æ¡åŒµæ§ã«åªããã¹ã¯ãªããèšèªã§ããã¹ãã¢ããªã±ãŒã·ã§ã³ã«åãããŠæè»ã«ã«ã¹ã¿ãã€ãºããããšãã§ããŸããLuaã¯Cã§å®è£
ãããŠãããC APIãéããŠLuaã®æ©èœãæ¡åŒµããããšãã§ããŸãã",
"title": "Luaã®æ¡åŒµæ§ãšC API"
},
{
"paragraph_id": 108,
"tag": "p",
"text": "C APIã䜿çšããããšã§ãCããã°ã©ã ããLuaã¹ã¯ãªãããåŒã³åºãããšãã§ããŸãããŸããLuaã¹ã¯ãªããããCé¢æ°ãåŒã³åºãããšãã§ããŸããC APIã«ã¯ãLuaã®å€ã®ã¹ã¿ãã¯ãæäœããããã®é¢æ°ããæ°ããé¢æ°ãããŒãã«ãäœæããããã®é¢æ°ãªã©ãå«ãŸããŠããŸãã",
"title": "Luaã®æ¡åŒµæ§ãšC API"
},
{
"paragraph_id": 109,
"tag": "p",
"text": "äŸãã°ã以äžã®ãããªCããã°ã©ã ãèããŠã¿ãŸãããã",
"title": "Luaã®æ¡åŒµæ§ãšC API"
},
{
"paragraph_id": 110,
"tag": "p",
"text": "ãã®ããã°ã©ã ã§ã¯ãluaL_newstateé¢æ°ã§Luaã¹ããŒããäœæããluaL_openlibsé¢æ°ã§Luaã®æšæºã©ã€ãã©ãªããªãŒãã³ããŠããŸãããããŠãluaL_dostringé¢æ°ã§Luaã¹ã¯ãªãããå®è¡ããŠããŸããæåŸã«ãlua_closeé¢æ°ã§Luaã¹ããŒãã解æŸããŠããŸãã",
"title": "Luaã®æ¡åŒµæ§ãšC API"
},
{
"paragraph_id": 111,
"tag": "p",
"text": "ãã®ããã«ãC APIã䜿çšããããšã§Luaã®æ©èœãæ¡åŒµããããšãã§ããŸããããããC APIã¯è€éã§ãããããLuaã®åºç€ãç解ããäžã§äœ¿çšããããšãããããããŸãã",
"title": "Luaã®æ¡åŒµæ§ãšC API"
},
{
"paragraph_id": 112,
"tag": "p",
"text": "以äžã¯ãæ°ãåãåãããããå¶æ°ãå¥æ°ããå€å®ããç°¡åãªLuaããã°ã©ã ã®äŸã§ãã",
"title": "ãããžã§ã¯ãäŸ"
},
{
"paragraph_id": 113,
"tag": "p",
"text": "ãã®ããã°ã©ã ã§ã¯ã even_or_odd é¢æ°ãæ°å€ãå¶æ°ãå¥æ°ããå€å®ããããã«äœ¿çšãããŠããŸãããã®åŸã io ã©ã€ãã©ãªã䜿çšããŠãŠãŒã¶ãŒããæ°å€ãååŸãã even_or_odd é¢æ°ãåŒã³åºããŠçµæã衚瀺ããŸãã",
"title": "ãããžã§ã¯ãäŸ"
},
{
"paragraph_id": 114,
"tag": "p",
"text": "次ã«ããã®ããã°ã©ã ãæ¹è¯ããŠãå¶æ°ãšå¥æ°ã®ã«ãŠã³ããè¿œå ããŠã¿ãŸãããã",
"title": "ãããžã§ã¯ãäŸ"
},
{
"paragraph_id": 115,
"tag": "p",
"text": "ãã®ããã°ã©ã ã§ã¯ãå¶æ°ãšå¥æ°ã®ã«ãŠã³ãã even_count ãš odd_count å€æ°ã«æ ŒçŽãããŸãããã®åŸãã«ãŒãã®æåŸã«ãããã衚瀺ããŸãã",
"title": "ãããžã§ã¯ãäŸ"
},
{
"paragraph_id": 116,
"tag": "p",
"text": "ãã®ããã°ã©ã ã¯ãããè€éãªæ©èœãè¿œå ããŠãLuaããã°ã©ã ãæ¹è¯ããæ¡åŒµããæ¹æ³ã瀺ããŠããŸãã",
"title": "ãããžã§ã¯ãäŸ"
},
{
"paragraph_id": 117,
"tag": "p",
"text": "ãã®Luaã®ã³ãŒãã¯ããšã©ãã¹ããã¹ã®ç¯©ã䜿ã£ãŠäžãããã n ãŸã§ã®çŽ æ°ãèŠã€ããé¢æ° eratosthenes ãå®çŸ©ããŠããŸãã",
"title": "éé²"
},
{
"paragraph_id": 118,
"tag": "p",
"text": "ãã®ããã°ã©ã 㯠eratosthenes(100) ãåŒã³åºãããšã§ã100 ãŸã§ã®çŽ æ°ãèŠã€ããŠè¡šç€ºããŸãã",
"title": "éé²"
},
{
"paragraph_id": 119,
"tag": "p",
"text": "ãã®Luaã®ã³ãŒãã¯ãæ倧å
¬çŽæ°(GCD)ãšæå°å
¬åæ°(LCM)ãèšç®ããé¢æ°ãæäŸããŠããŸãããŸããgcd2é¢æ°ã¯ãæ倧å
¬çŽæ°ãååž°çã«æ±ããããã®ãã®ã§ããäžãããã2ã€ã®æ°å€ã®æ倧å
¬çŽæ°ãèšç®ããŸããgcdé¢æ°ã¯å¯å€é·åŒæ°ãåãåãããããã®æ°å€ã®æ倧å
¬çŽæ°ãèšç®ããŸããlcm2é¢æ°ã¯2ã€ã®æ°å€ã®æå°å
¬åæ°ãèšç®ããlcmé¢æ°ã¯å¯å€é·åŒæ°ãæã¡ããããã®æ°å€ã®æå°å
¬åæ°ãèšç®ããŸãã",
"title": "éé²"
},
{
"paragraph_id": 120,
"tag": "p",
"text": "æåŸã«ãããããã®é¢æ°ãçšããŠgcd2ãgcdãlcm2ãlcmãå®è¡ããçµæãåºåããŠããŸãããããã®é¢æ°ã䜿ã£ãŠãäžããããæ°å€ã®æ倧å
¬çŽæ°ãšæå°å
¬åæ°ãæ±ããããšãã§ããŸãã",
"title": "éé²"
},
{
"paragraph_id": 121,
"tag": "p",
"text": "äºåæ³",
"title": "éé²"
},
{
"paragraph_id": 122,
"tag": "p",
"text": "ãã®Luaã®ã³ãŒãã¯ãäºåæ³ã䜿ã£ãŠé¢æ°ã®æ ¹(æ¹çšåŒã®è§£)ãèŠã€ããããã®é¢æ° bisection ãå®è£
ããŠããŸããããã§ãæž¡ãããé¢æ° f ã¯ãäžããããç¯å² low ãš high ã®éã§è§£ãæ¢çŽ¢ããŸãã絶察å€ãéåžžã«å°ãã(ãã®å Žå㯠1.0e-10 ããå°ãã)å€ãèŠã€ããå Žåããã® x ã®å€ã解ãšããŠè¿ããŸãã",
"title": "éé²"
},
{
"paragraph_id": 123,
"tag": "p",
"text": "次ã«ãäžãããã2ã€ã®æ¹çšåŒã«å¯Ÿã㊠bisection é¢æ°ã䜿çšããããããã®è§£ãæ±ããŠããŸãã",
"title": "éé²"
},
{
"paragraph_id": 124,
"tag": "p",
"text": "ããããã®è§£ã print ã䜿ã£ãŠã³ã³ãœãŒã«ã«åºåãããŸãããã®ããã«ãbisection é¢æ°ãçšããŠäžããããé¢æ°ã®æ ¹ãèŠã€ããããšãã§ããŸãã",
"title": "éé²"
}
] | Luaã¯ã軜éã§é«éãªã¹ã¯ãªããèšèªã§ãããåºã䜿ãããŠããããã°ã©ãã³ã°èšèªã®äžã€ã§ããLuaã¯ãç°¡åã«åŠã¹ãèšèªã§ãããªãããå€ãã®æ©èœãåãã£ãŠãããã²ãŒã éçºãWebã¢ããªã±ãŒã·ã§ã³ãçµã¿èŸŒã¿ã·ã¹ãã ãªã©ãæ§ã
ãªåéã§äœ¿ãããŠããŸãã æ¬ãã¥ãŒããªã¢ã«ã§ã¯ãLuaã®åºç€çãªæ§æãæ©èœã«ã€ããŠèª¬æããLuaã䜿ã£ãããã°ã©ãã³ã°ã«ã€ããŠã®ç¥èã身ã«ä»ããããšãç®çãšããŠããŸããæ¬ãã¥ãŒããªã¢ã«ã¯ãåå¿è
ããäžçŽè
ãŸã§ã察象ã«ããŠãããLuaã®åºç€ããå§ããŠãåŸã
ã«å¿çšçãªå
容ã«ç§»ã£ãŠãããŸãã Luaã®åŠç¿ã¯ãããã°ã©ãã³ã°åå¿è
ã«ãåãçµã¿ããããããŸããŸãªã¢ããªã±ãŒã·ã§ã³ã§æŽ»çšã§ããããšãããå°æ¥æ§ãé«ã泚ç®ãéããŠããŸããæ¬ãã¥ãŒããªã¢ã«ãéããŠãLuaã®åºç€ãåŠã³ãLuaã䜿ã£ãããã°ã©ãã³ã°ã®é
åã«è§ŠããŠããã ããã°å¹žãã§ãã | Luaã¯ã軜éã§é«éãªã¹ã¯ãªããèšèªã§ãããåºã䜿ãããŠããããã°ã©ãã³ã°èšèªã®äžã€ã§ããLuaã¯ãç°¡åã«åŠã¹ãèšèªã§ãããªãããå€ãã®æ©èœãåãã£ãŠãããã²ãŒã éçºãWebã¢ããªã±ãŒã·ã§ã³ãçµã¿èŸŒã¿ã·ã¹ãã ãªã©ãæ§ã
ãªåéã§äœ¿ãããŠããŸãã
æ¬ãã¥ãŒããªã¢ã«ã§ã¯ãLuaã®åºç€çãªæ§æãæ©èœã«ã€ããŠèª¬æããLuaã䜿ã£ãããã°ã©ãã³ã°ã«ã€ããŠã®ç¥èã身ã«ä»ããããšãç®çãšããŠããŸããæ¬ãã¥ãŒããªã¢ã«ã¯ãåå¿è
ããäžçŽè
ãŸã§ã察象ã«ããŠãããLuaã®åºç€ããå§ããŠãåŸã
ã«å¿çšçãªå
容ã«ç§»ã£ãŠãããŸãã
Luaã®åŠç¿ã¯ãããã°ã©ãã³ã°åå¿è
ã«ãåãçµã¿ããããããŸããŸãªã¢ããªã±ãŒã·ã§ã³ã§æŽ»çšã§ããããšãããå°æ¥æ§ãé«ã泚ç®ãéããŠããŸããæ¬ãã¥ãŒããªã¢ã«ãéããŠãLuaã®åºç€ãåŠã³ãLuaã䜿ã£ãããã°ã©ãã³ã°ã®é
åã«è§ŠããŠããã ããã°å¹žãã§ãã
== ã€ã³ãããã¯ã·ã§ã³ ==
=== Luaãšã¯äœãïŒ ===
Luaã¯ã1993幎ã«ãã©ãžã«ã§éçºããã軜éã§é«éãªã¹ã¯ãªããèšèªã§ããªãŒãã³ãœãŒã¹ã§ããããšãç¹åŸŽã§ããLuaã¯ãã¹ã¯ãªããèšèªãšããŠã¯æ¯èŒçå°ãããCèšèªã§æžãããŠãããããé«éã§ã¡ã¢ãªå¹çãè¯ããšããç¹åŸŽããããŸãã
=== Luaã®ç¹åŸŽ ===
Luaã®ç¹åŸŽã¯ã軜éã§é«éãªããšããCèšèªãšã®èŠªåæ§ãé«ãããšã«å ãã以äžã®ãããªãã®ãæããããŸãã
* æ¡åŒµæ§ãé«ãïŒLuaã¯ãCèšèªã§æžãããŠãããããCèšèªãšã®é£æºã容æã§ããããŸããLuaã®èšèªä»æ§èªäœãæ¡åŒµæ§ãé«ããæ©èœãèªç±ã«è¿œå ã§ããŸãã
* åã蟌ã¿ã容æïŒLuaã¯ãä»ã®ããã°ã©ãã³ã°èšèªã«åã蟌ãã§äœ¿çšããããšãã§ããå€ãã®ã¢ããªã±ãŒã·ã§ã³ã§å©çšãããŠããŸãã
* ç°¡æœã§ããããããæ§æïŒLuaã®æ§æã¯ãCèšèªãJavaãªã©ã®èšèªã«äŒŒãŠãããåŠç¿ãæ¯èŒç容æã§ãã
=== Luaã®çšé ===
Luaã¯ã以äžã®ãããªåéã§äœ¿ãããŠããŸãã
* ã²ãŒã éçºïŒLuaã¯ãå€ãã®ã²ãŒã ãšã³ãžã³ã§ã¹ã¯ãªããèšèªãšããŠå©çšãããŠããŸããUnityãCorona SDKãLÃVEãªã©ãå€ãã®ã²ãŒã ãšã³ãžã³ãLuaãæ¡çšããŠããŸãã
* Webã¢ããªã±ãŒã·ã§ã³ïŒLuaã¯ãWebã¢ããªã±ãŒã·ã§ã³ã®éçºã«ãå©çšãããŠããŸããOpenRestyãLapisãªã©ãLuaãå©çšããWebãã¬ãŒã ã¯ãŒã¯ãååšããŸãã
* çµã¿èŸŒã¿ã·ã¹ãã ïŒLuaã¯ãçµã¿èŸŒã¿ã·ã¹ãã ã®ããã°ã©ãã³ã°ã«ãå©çšãããŠããŸããLuaã¯ãã¡ã¢ãªå¹çãé«ããããå°èŠæš¡ãªã·ã¹ãã ã§ãå©çšããããšãã§ããŸãã
Luaã¯ããã®å°ãããé«éæ§ãæ¡åŒµæ§ãåã蟌ã¿æ§ãªã©ã®ç¹åŸŽãããæ§ã
ãªåéã§å©çšãããŠããŸãã
== ã€ã³ã¹ããŒã«ãšã»ããã¢ãã ==
=== Luaã®ã€ã³ã¹ããŒã«æ¹æ³ ===
Luaã¯ãå
¬åŒãµã€ã( https://www.lua.org/download.html )ããããœãŒã¹ã³ãŒãããã€ããªãã¡ã€ã«ãããŠã³ããŒãããããšãã§ããŸãã
ãŸããäžéšã®Linuxãã£ã¹ããªãã¥ãŒã·ã§ã³ãBSDç³»UNIXã§ã¯ãããã±ãŒãžãããŒãžã£ãå©çšããŠç°¡åã«ã€ã³ã¹ããŒã«ããããšãã§ããŸãã
=== Luaã®å®è¡æ¹æ³ ===
ã€ã³ã¹ããŒã«ãå®äºããããã³ãã³ãã©ã€ã³ãã以äžã®ããã«å
¥åããããšã§ãLuaã®å¯Ÿè©±ã¢ãŒããèµ·åããããšãã§ããŸãã
:<syntaxhighlight lang=bash>
$ lua
</syntaxhighlight>
察話ã¢ãŒãã¯ãã³ãã³ãã©ã€ã³ããäžè¡ãã€Luaã®ã³ãŒããå
¥åããŠãå³åº§ã«è©äŸ¡ããããšãã§ããŸãã
ãŸããLuaã®ããã°ã©ã ããã¡ã€ã«ã«ä¿åããŠå®è¡ããããšãã§ããŸããäŸãã°ã以äžã®ãããªã¹ã¯ãªãããã¡ã€ã«ãäœæãã"hello.lua"ãšããååã§ä¿åããŸãã
;hello.lua:<syntaxhighlight lang=lua>
print("Hello, world!")
</syntaxhighlight>
ãããŠãã³ãã³ãã©ã€ã³ãã以äžã®ããã«å
¥åããããšã§ãã¹ã¯ãªãããå®è¡ããããšãã§ããŸãã
:<syntaxhighlight lang=bash>
$ lua
</syntaxhighlight>
=== ããã¹ããšãã£ã¿ãŒã®éžæ ===
Luaã®ããã°ã©ã ãæžãããã«ã¯ãããã¹ããšãã£ã¿ãŒãå¿
èŠã§ãã
å€ãã®ããã¹ããšãã£ã¿ãŒãLuaã®ã·ã³ã¿ãã¯ã¹ãã€ã©ã€ãããµããŒãããŠããŸãããç¹ã«ãããããªã®ã¯ã[https://studio.zerobrane.com/ ZeroBrane Studio]ã[https://code.visualstudio.com/ Visual Studio Code]ãªã©ã®ãLuaéçºã«ç¹åãããšãã£ã¿ãŒã§ãã
ãããã®ãšãã£ã¿ãŒã«ã¯ããããã°æ©èœãã³ãŒãè£å®æ©èœãªã©ãéçºãå¹çåããæ©èœãå€æ°åãã£ãŠããŸãã
== å€æ°ãšããŒã¿å ==
=== å€æ°ã®å®£èš ===
Luaã§ã¯ãå€æ°åã®åã«localããŒã¯ãŒããä»ããããšã§ããã®å€æ°ãããŒã«ã«ã¹ã³ãŒãã§å®£èšããããšãã§ããŸããäŸãã°ã以äžã®ããã«ããŠãxãšããå€æ°ã宣èšããããšãã§ããŸãã
:<syntaxhighlight lang=lua>
local x
</syntaxhighlight>
å€æ°ã«åæå€ã代å
¥ããå Žåã¯ã以äžã®ããã«å®£èšãšä»£å
¥ãåæã«è¡ãããšãã§ããŸãã
:<syntaxhighlight lang=lua>
local x = 42
</syntaxhighlight>
=== ããŒã¿åã®çš®é¡ ===
Luaã«ã¯ã以äžã®ãããªããŒã¿åããããŸãã
*nil: å€ãååšããªãããšãè¡šã
*boolean: trueãŸãã¯falseã®å€ãè¡šã
*number: æ°å€ãè¡šã
*string: æååãè¡šã
*function: é¢æ°ãè¡šã
*table: ããŒãã«ãè¡šãïŒé
åãé£æ³é
åãªã©ãè€æ°ã®å€ããŸãšããŠæ±ãããŒã¿æ§é ïŒ
{{ã³ã©ã |æŽæ°ãµããŒãã®æ¹å|2=Lua 5.3以éã«ã¯æŽæ°ã«é¢ããããã€ãã®æ¹è¯ãå ããããŠããŸãã
ãŸããLua 5.2ãŸã§ã¯å
šãŠã®æ°å€ãå粟床浮åå°æ°ç¹æ°å (double) ã§è¡šçŸãããŠããŸããããLua 5.3ããã¯æŽæ°ãšå®æ°ã®åºå¥ãæ確ã«ãªããŸããã
æŽæ°ã¯64ããã笊å·ä»ãæŽæ°å (long long) ã§è¡šçŸãããŸããããã«ãããæŽæ°æŒç®ãããé«éã«ãªããã¡ã¢ãªæ¶è²»ãæžããŸãã
:<syntaxhighlight lang=lua>
for i = 0, 64 do
n = 2 ^ i
print(i, n, type(n), math.type(n), math.type(math.tointeger(n)))
end
</syntaxhighlight>
;å®è¡çµæ:<syntaxhighlight lang=text>
0 1.0 number float integer
1 2.0 number float integer
2 4.0 number float integer
3 8.0 number float integer
4 16.0 number float integer
5 32.0 number float integer
6 64.0 number float integer
7 128.0 number float integer
8 256.0 number float integer
9 512.0 number float integer
10 1024.0 number float integer
11 2048.0 number float integer
12 4096.0 number float integer
13 8192.0 number float integer
14 16384.0 number float integer
15 32768.0 number float integer
16 65536.0 number float integer
17 131072.0 number float integer
18 262144.0 number float integer
19 524288.0 number float integer
20 1048576.0 number float integer
21 2097152.0 number float integer
22 4194304.0 number float integer
23 8388608.0 number float integer
24 16777216.0 number float integer
25 33554432.0 number float integer
26 67108864.0 number float integer
27 134217728.0 number float integer
28 268435456.0 number float integer
29 536870912.0 number float integer
30 1073741824.0 number float integer
31 2147483648.0 number float integer
32 4294967296.0 number float integer
33 8589934592.0 number float integer
34 17179869184.0 number float integer
35 34359738368.0 number float integer
36 68719476736.0 number float integer
37 137438953472.0 number float integer
38 274877906944.0 number float integer
39 549755813888.0 number float integer
40 1099511627776.0 number float integer
41 2199023255552.0 number float integer
42 4398046511104.0 number float integer
43 8796093022208.0 number float integer
44 17592186044416.0 number float integer
45 35184372088832.0 number float integer
46 70368744177664.0 number float integer
47 1.4073748835533e+14 number float integer
48 2.8147497671066e+14 number float integer
49 5.6294995342131e+14 number float integer
50 1.1258999068426e+15 number float integer
51 2.2517998136852e+15 number float integer
52 4.5035996273705e+15 number float integer
53 9.007199254741e+15 number float integer
54 1.8014398509482e+16 number float integer
55 3.6028797018964e+16 number float integer
56 7.2057594037928e+16 number float integer
57 1.4411518807586e+17 number float integer
58 2.8823037615171e+17 number float integer
59 5.7646075230342e+17 number float integer
60 1.1529215046068e+18 number float integer
61 2.3058430092137e+18 number float integer
62 4.6116860184274e+18 number float integer
63 9.2233720368548e+18 number float nil
64 1.844674407371e+19 number float nil
</syntaxhighlight>
64ããã笊å·ä»ãæŽæ°åã®å€ã¯æ°å€ãªãã©ã«ã®ç¯å²å€ã§ããå ŽåããªãŒããŒãããŒããŠæ±ãããŸãã
äŸãã°ã0x8000000000000000 㯠64 ããã笊å·ä»ãæŽæ°åã®ç¯å²ãè¶
ããŠãããããæ£ãã解éãããŸããã
ãŸããæŽæ°åãšå®æ°åã®æŒç®ã¯å®æ°åãšåãããã«æ±ããããããæŽæ°åã«ãã£ã¹ãããªããã°ãªããªãå ŽåããããŸãã
}}
=== å€æ°ã®ä»£å
¥ãšæäœ ===
å€æ°ã«å€ã代å
¥ããå Žåã¯ã以äžã®ããã«ããŠè¡ããŸãã
:<syntaxhighlight lang=lua>
local x
x = 42
</syntaxhighlight>
ãŸãã代å
¥ãããå€ãåãåºããŠæäœããå Žåã¯ã以äžã®ããã«ããŠè¡ããŸãã
:<syntaxhighlight lang=lua>
local x = 42
x = x + 1 -- xã®å€ã1å¢ãã
</syntaxhighlight>
æååã®å Žåã¯ã以äžã®ããã«ããŠé£çµããããšãã§ããŸãã
:<syntaxhighlight lang=lua>
local str1 = "Hello, "
local str2 = "world!"
local message = str1 .. str2 -- "Hello, world!"ãšããæååãäœããã
</syntaxhighlight>
ãŸããããŒãã«ã®å Žåã¯ã以äžã®ããã«ããŠèŠçŽ ãè¿œå ããããåé€ãããããããšãã§ããŸãã
:<syntaxhighlight lang=lua>
local tbl = {}
tbl[1] = "apple"
tbl[2] = "banana"
tbl[3] = "orange"
table.remove(tbl, 2) -- tblãã"banana"ãåé€ãã
</syntaxhighlight>
ãããã®æäœãå©çšããŠãLuaã§æ§ã
ãªåŠçãè¡ãããšãã§ããŸãã
{{ã³ã©ã |Luaã§ã¯å宣èšã¯äžèŠã§ããïŒ|2=ã¯ããLuaã§ã¯å€æ°ã®å®£èšæã«åãæ瀺çã«æå®ããå¿
èŠã¯ãããŸãããå€æ°ã«åæå€ã代å
¥ããå Žåã«ã¯ãLuaãèªåçã«ããŒã¿åãæšæž¬ããŸãããŸããåŸããå¥ã®ããŒã¿åã®å€ã代å
¥ããããšãå¯èœã§ãããã®ãããªæ§è³ªããåçåä»ãããšåŒã³ãŸããåçåä»ãã«ãããæè»ã§ããããããã³ãŒããæžãããšãã§ããŸãããäžæ¹ã§ããŒã¿åã®äžäžèŽã«ãããšã©ãŒãçºçããå¯èœæ§ãããããã泚æãå¿
èŠã§ãã}}
== å¶åŸ¡æ§æ ==
以äžã¯ãLuaã®å¶åŸ¡æ§é ã®ããã€ãã®äŸã§ãã
:<syntaxhighlight lang=lua>
-- æ¡ä»¶åå²
if x > 0 then
print("x is positive")
elseif x == 0 then
print("x is zero")
else
print("x is negative")
end
-- ã«ãŒã
---- whileã«ãŒã
while x < 10 do
print(x)
x = x + 1
end
---- repeat-untilã«ãŒã
repeat
print(x)
x = x + 1
until x == 10
---- forã«ãŒã
-- æ°åã®ã¹ãããã¯1
for i=1, 10 do
print(i)
end
-- æ°åã®ã¹ããããå€æŽ
for i=1, 10, 2 do
print(i)
end
-- é
åã®èŠçŽ ãååŸ
fruits = {"apple", "banana", "pear"}
for i, fruit in ipairs(fruits) do
print(i, fruit)
end
-- ãžã£ã³ã
-- break
---- ã«ãŒããéäžã§çµäºããå Žåã«äœ¿çšããŸãã
while true do
if x == 10 then
break
end
print(x)
x = x + 1
end
-- goto
---- ã©ãã«ã«ãžã£ã³ãããå Žåã«äœ¿çšã§ããŸãããªãã¹ã䜿çšãé¿ããããã«ããŸãããã
::label::
print("Hello, world!")
goto label
</syntaxhighlight>
=== æ¡ä»¶åå² ===
æ¡ä»¶åå²ã«ã¯<code>if</code>æã䜿çšããŸãã以äžã¯ã<code>x</code>ãæ£ã®æ°ã§ããã°ã<code>"positive"</code>ãšè¡šç€ºããããã°ã©ã ã®äŸã§ãã
:<syntaxhighlight lang=lua>
local x = 5
if x > 0 then
print("positive")
end
</syntaxhighlight>
ãŸãã<code>if</code>æã®åŸã«<code>elseif</code>ãç¶ããŠæžãããšã§ãè€æ°ã®æ¡ä»¶åå²ãè¡ãããšãã§ããŸãã
:<syntaxhighlight lang=lua>
local x = 5
if x > 0 then
print("positive")
elseif x == 0 then
print("zero")
else
print("negative")
end
</syntaxhighlight>
=== ã«ãŒãåŠç ===
Luaã«ã¯ã以äžã®3çš®é¡ã®ã«ãŒãåŠçããããŸãã
==== whileã«ãŒã ====
<code>while</code>ã«ãŒãã¯ãæ¡ä»¶åŒã<code>true</code>ã®éãç¹°ãè¿ãåŠçãè¡ããŸãã
:<syntaxhighlight lang=lua>
local i = 1
while i <= 10 do
print(i)
i = i + 1
end
</syntaxhighlight>
==== repeat-untilã«ãŒã ====
<code>repeat-until</code>ã«ãŒãã¯ãæ¡ä»¶åŒã<code>true</code>ã«ãªããŸã§ãç¹°ãè¿ãåŠçãè¡ããŸãã
:<syntaxhighlight lang=lua>
local i = 1
repeat
print(i)
i = i + 1
until i > 10
</syntaxhighlight>
==== forã«ãŒã ====
<code>for</code>ã«ãŒãã¯ããããããæå®ããåæ°åãç¹°ãè¿ãåŠçãè¡ããŸãã以äžã¯ã<code>1</code>ãã<code>10</code>ãŸã§ã®æ°åãé çªã«è¡šç€ºããããã°ã©ã ã®äŸã§ãã
:<syntaxhighlight lang=lua>
for i = 1, 10 do
print(i)
end
</syntaxhighlight>
===== å¢å =====
:<syntaxhighlight lang=lua>
for i = 1, 10, 2 do
print(i)
end
</syntaxhighlight>
ãã®ã³ãŒãã¯ãLuaã®forã«ãŒãã䜿çšããŠ1ãã10ãŸã§ã®æ°å€ã2ãã€å¢ãããªããé ã«åãåºãããããããåºåããããã°ã©ã ã§ãã
forã«ãŒãã®æžåŒã¯ã以äžã®ããã«ãªã£ãŠããŸãã
:<syntaxhighlight lang=lua>
for åæå€, çµäºå€[, å¢å] do
-- ã«ãŒãåŠç
end
</syntaxhighlight>
åæå€ããå§ãŸããçµäºå€ã«éãããŸã§ãæå®ãããå¢åãã€å€ãå¢ãããªããã«ãŒãåŠçãå®è¡ãããŸãã
å¢åã¯çç¥å¯èœã§ããã®å Žå㯠1 ãä»®å®ãããŸãã
ä»åã®ã³ãŒãã§ã¯ãåæå€ã1ãçµäºå€ã10ãå¢åã2ãšããŠããããã1, 3, 5, 7, 9ã®5ã€ã®æ°å€ãé ã«åãåºãããããããã<code>print()</code>é¢æ°ã§åºåãããŸãã
å
·äœçã«å®è¡ãããšã以äžã®ãããªçµæãåŸãããŸãã
:<syntaxhighlight lang=text>
1
3
5
7
9
</syntaxhighlight>
==== breakæ ====
<code>break</code>æã䜿çšããããšã§ãã«ãŒãåŠçãéäžã§çµäºããããšãã§ããŸãã
以äžã¯ã<code>1</code>ãã<code>10</code>ãŸã§ã®æ°åãé çªã«è¡šç€ºãã<code>5</code>ã«ãªã£ããã«ãŒããçµäºããããã°ã©ã ã®äŸã§ãã
:<syntaxhighlight lang=lua>
for i = 1, 10 do
print(i)
if i >= 5 then
break
end
end
</syntaxhighlight>
{{ã³ã©ã |luaã«ã¯continueæã¯ãªãã®ã§ããïŒ|2=Luaã«ã¯<code>continue</code>æã¯ãããŸããã代ããã«ã<code>break</code>æãšæ¡ä»¶åå²ã䜿çšããŠãåããããªåŠçãå®çŸããããšãã§ããŸãã
äŸãã°ã以äžã®ããã«<code>if</code>æã䜿çšããŠãç¹å®ã®æ¡ä»¶ãæç«ããå Žåã«ã¯åŠçãã¹ãããããããšãã§ããŸãã
:<syntaxhighlight lang=lua>
for i = 1, 10 do
if i % 2 == 0 then -- iãå¶æ°ã®å Žåã¯ã¹ããã
goto continue
end
print(i)
::continue::
end
</syntaxhighlight>
ãã ãã<code>goto</code>æã¯äœ¿çšããªãæ¹ãè¯ããšãããŠããããã代æ¿æ¡ãšããŠä»¥äžã®ããã«<code>if</code>æãå
¥ãåã«ããæ¹æ³ããããŸãã
:<syntaxhighlight lang=lua>
for i = 1, 10 do
if i % 2 ~= 0 then -- iãå¥æ°ã®å Žåã®ã¿åŠçãå®è¡
print(i)
end
end
</syntaxhighlight>
ãã®ããã«ãLuaã§ã¯<code>continue</code>æãçŽæ¥ãµããŒãããŠããŸãããã代æ¿æ段ãçšããããšã§åæ§ã®åŠçãå®çŸããããšãã§ããŸãã
}}
=== é¢æ°ã®å®çŸ©ãšåŒã³åºã ===
é¢æ°ãå®çŸ©ããã«ã¯ã以äžã®ããã«<code>function</code>ããŒã¯ãŒãã䜿çšããŸãããŸããåŒæ°ãæž¡ãå Žåã¯ã<code>()</code>ã®äžã«åŒæ°åãæžããŸãã
:<syntaxhighlight lang=lua>
function greet(name)
print("Hello, " .. name .. "!")
end
</syntaxhighlight>
é¢æ°ãåŒã³åºãã«ã¯ãé¢æ°åãšãšãã«åŒæ°ãæž¡ããŸãã以äžã¯ã<code>greet</code>é¢æ°ãåŒã³åºãããã°ã©ã ã®äŸã§ãã
:<syntaxhighlight lang=lua>
greet("Alice") -- "Hello, Alice!"ãšè¡šç€ºããã
</syntaxhighlight>
==== é¢æ°ã®åŒæ° ====
Luaã«ã¯ããŒã¯ãŒãåŒæ°ããªããé¢æ°ã®åŒæ°ã¯äœçœ®åŒæ°ãšããŠæž¡ãããŸãã
å¯å€é·åŒæ°ãåãåããããLuaã§ã¯ ... ãšããæ§æããããŸããããã¯é¢æ°ã®åŒæ°ãªã¹ãã®æåŸã«çœ®ãããŸããå¯å€é·åŒæ°ã¯ãåŒã³åºãåŽãæž¡ãåŒæ°ã®æ°ã«ãã£ãŠç°ãªããŸããé¢æ°å
ã§ã¯ãå¯å€é·åŒæ°ã¯ããŒãã«ãšããŠæ±ãããŸããããšãã°ã以äžã®ããã«ããŠå¯å€é·åŒæ°ãåãåãé¢æ°ãå®çŸ©ã§ããŸãã
:<syntaxhighlight lang=lua>
function myfunc(...)
for i,v in ipairs({...}) do
print(i, v)
end
end
</syntaxhighlight>
æ®äœåŒæ°ã¯ãããŸããããå¯å€é·åŒæ°ãåãåã£ãåŸã«ãä»»æã®äœçœ®åŒæ°ãåãåãããšãã§ããŸããããšãã°ã以äžã®ããã«ã㊠x ãšããäœçœ®åŒæ°ãåãåãé¢æ°ãå®çŸ©ã§ããŸãã
:<syntaxhighlight lang=lua>
function myfunc(..., x)
local varargs = {...} -- å¯å€é·åŒæ°
print("varargs:", unpack(varargs))
print("x:", x)
end
</syntaxhighlight>
==== é¢æ°ããªããžã§ã¯ã ====
Luaã§ã¯ãé¢æ°ããªããžã§ã¯ãã®äžçš®ã§ãããããå€æ°ã«é¢æ°ã代å
¥ããããšãã§ããŸãã
:<syntaxhighlight lang=lua>
local square = function(x)
return x * x
end
print(square(5)) -- "25"ãšè¡šç€ºããã
</syntaxhighlight>
é¢æ°ã®è¿ãå€ãååŸããã«ã¯ã<code>return</code>ããŒã¯ãŒãã䜿çšããŸãã
{{ã³ã©ã |Luaã®é¢æ°ã«é¢ããããŠããŠ|2=Luaã«ã¯ãå€ãã®ããã°ã©ãã³ã°èšèªãšåæ§ã«é¢æ°ããããŸãã
Luaã®é¢æ°ã¯ã以äžã®ãããªç¹åŸŽããããŸãã
* åŒæ°ã®åæ°ãå¯å€é·ã§ããããšãã§ããŸããããªãã¡ãé¢æ°ãåŒã³åºããšãã«æž¡ãåŒæ°ã®åæ°ãèªç±ã«æå®ã§ããŸãã
* é¢æ°ã®æ»ãå€ãè€æ°ããããšãã§ããŸããããªãã¡ãé¢æ°ããè€æ°ã®å€ãè¿ãããšãã§ããŸãã
* é¢æ°ã¯ãå€æ°ã«ä»£å
¥ããããããŒãã«ã®å€ãšããŠä¿åãããããããšãã§ããŸãã
Luaã®é¢æ°ã¯ã以äžã®ããã«å®çŸ©ããŸãã
:<syntaxhighlight lang=lua>
function é¢æ°å(åŒæ°1, åŒæ°2, ...)
-- é¢æ°ã®åŠç
return æ»ãå€1, æ»ãå€2, ...
end
</syntaxhighlight>
äŸãã°ã以äžã®ãããªé¢æ°ãå®çŸ©ããããšãã§ããŸãã
:<syntaxhighlight lang=lua>
function add(a, b)
return a + b
end
</syntaxhighlight>
ãã®é¢æ°ã¯ã2ã€ã®åŒæ°ãåãåããããããå ç®ããçµæãè¿ããŸããé¢æ°ãåŒã³åºããšãã¯ã以äžã®ããã«ããŸãã
:<syntaxhighlight lang=lua>
local result = add(1, 2)
print(result) -- 3
</syntaxhighlight>
ãŸããè€æ°ã®æ»ãå€ãè¿ãããšãã§ããŸããäŸãã°ã以äžã®ãããªé¢æ°ãå®çŸ©ããããšãã§ããŸãã
:<syntaxhighlight lang=lua>
function getMinMax(numbers)
local min = numbers[1]
local max = numbers[1]
for i = 2, #numbers do
if numbers[i] < min then
min = numbers[i]
end
if numbers[i] > max then
max = numbers[i]
end
end
return min, max
end
</syntaxhighlight>
ãã®é¢æ°ã¯ãé
å <code>numbers</code> ã«æ ŒçŽãããŠããæ°å€ã®äžã§ãæå°å€ãšæ倧å€ãæ±ããŸããé¢æ°ãåŒã³åºããšãã¯ã以äžã®ããã«ããŸãã
:<syntaxhighlight lang=lua>
local numbers = {5, 3, 9, 1, 7}
local min, max = getMinMax(numbers)
print("min:", min) -- 1
print("max:", max) -- 9
</syntaxhighlight>
ãã®ããã«ãLuaã®é¢æ°ã¯æè»æ§ãé«ããå€æ§ãªçšéã«å¯Ÿå¿ããããšãã§ããŸãã
}}
== æååæäœ ==
Luaã¯æååæäœã«äŸ¿å©ãªæ©èœãæäŸããŠããŸããæååã¯ãã¯ã©ãŒããŒã·ã§ã³ã§å²ãã æåã®ã·ãŒã±ã³ã¹ã§ããããã«ã¯ã©ãŒããŒã·ã§ã³ãŸãã¯ã·ã³ã°ã«ã¯ã©ãŒããŒã·ã§ã³ã®ã©ã¡ãã§ãè¡šçŸã§ããŸãã
=== æååã®äœæãšæäœ ===
æååã¯ã<code>..</code>æŒç®åã§é£çµããããšãã§ããŸãã
:<syntaxhighlight lang=lua>
str1 = "Hello"
str2 = "World"
str3 = str1 .. " " .. str2 -- "Hello World"
</syntaxhighlight>
æååãéšåçã«åãåºãã«ã¯ã<code>string.sub</code>é¢æ°ã䜿çšããŸãã
:<syntaxhighlight lang=lua>
str = "Hello World"
substr = string.sub(str, 1, 5) -- "Hello"
</syntaxhighlight>
ãŸããæååãéé ã«ããã«ã¯ã<code>string.reverse</code>é¢æ°ã䜿çšããŸãã
:<syntaxhighlight lang=lua>
str = "Hello"
reverse_str = string.reverse(str) -- "olleH"
</syntaxhighlight>
=== æååã®ãã©ãŒããã ===
Luaã¯ãCèšèªãšåæ§ã«ãæååã®ãã©ãŒãããã«äŸ¿å©ãªæ©èœãæäŸããŠããŸãã<code>string.format</code>é¢æ°ã䜿çšããŠãæååãç¹å®ã®åœ¢åŒã«æŽåœ¢ããããšãã§ããŸãã
:<syntaxhighlight lang=lua>
name = "John"
age = 30
height = 180.5
str = string.format("My name is %s, I'm %d years old, and my height is %.1f cm", name, age, height)
print(str) -- "My name is John, I'm 30 years old, and my height is 180.5 cm"
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>%s</code>ã¯æååã<code>%d</code>ã¯10é²æ°ã<code>%.1f</code>ã¯å°æ°ç¹ä»¥äž1æ¡ã®æµ®åå°æ°ç¹æ°ãè¡šããŸãã<code>string.format</code>é¢æ°ã«æž¡ãåŒæ°ã¯ããã©ãŒãããæååå
ã®å€æ°ãšäžèŽããé åºã§æå®ããå¿
èŠããããŸãã
ãããã®æ©èœãé§äœ¿ããããšã§ãLuaã§æè»ãªæååæäœãå¯èœã«ãªããŸãã
== ããŒãã«ãšé
å ==
=== ããŒãã«ãšã¯äœãïŒ ===
Luaã«ãããŠãããŒãã«ã¯è€æ°ã®å€ãæ ŒçŽããããã®ããŒã¿æ§é ã®1ã€ã§ããããŒãã«ã¯é
åãèŸæžã®ãããªåœ¢åŒã§ãããŒãšå€ããã¢ãšããŠæã¡ãŸãã
=== ããŒãã«ã®äœæãšåæå ===
ããŒãã«ã¯ã<code>{}</code>ã§äœæããããšãã§ããŸãã以äžã®ããã«ãèŠçŽ ãã«ã³ãã§åºåã£ãŠåæããããšã§åæåããããšãã§ããŸãã
:<syntaxhighlight lang=lua>
-- ããŒãã«ã®äœæãšåæå
fruits = {'apple', 'banana', 'orange'}
</syntaxhighlight>
ãŸãã以äžã®ããã«ãã€ã³ããã¯ã¹ãæå®ããŠèŠçŽ ãè¿œå ããããšãã§ããŸãã
:<syntaxhighlight lang=lua>
-- ããŒãã«ã®äœæãšåæå
fruits = {}
fruits[1] = 'apple'
fruits[2] = 'banana'
fruits[3] = 'orange'
</syntaxhighlight>
=== ããŒãã«ã®æäœ ===
ããŒãã«ã«æ ŒçŽãããèŠçŽ ã«ã¯ã以äžã®ãããªæ¹æ³ã§ã¢ã¯ã»ã¹ããããšãã§ããŸãã
* ã€ã³ããã¯ã¹ãæå®ããŠèŠçŽ ãåãåºã
* forã«ãŒãã䜿çšããŠãå
šãŠã®èŠçŽ ã«ã¢ã¯ã»ã¹ãã
* <code>table.insert()</code>é¢æ°ã䜿çšããŠãããŒãã«ã®æ«å°Ÿã«èŠçŽ ãè¿œå ãã
* <code>table.remove()</code>é¢æ°ã䜿çšããŠãæå®ããäœçœ®ã®èŠçŽ ãåé€ãã
* <code>table.sort()</code>é¢æ°ã䜿çšããŠãããŒãã«ããœãŒããã
以äžã«ãããããã®æäœã®äŸã瀺ããŸãã
:<syntaxhighlight lang=lua>
-- ã€ã³ããã¯ã¹ãæå®ããŠèŠçŽ ãåãåºã
print(fruits[1]) -- "apple"
-- forã«ãŒãã䜿çšããŠãå
šãŠã®èŠçŽ ã«ã¢ã¯ã»ã¹ãã
for i, fruit in ipairs(fruits) do
print(i, fruit)
end
-- table.insert()é¢æ°ã䜿çšããŠãããŒãã«ã®æ«å°Ÿã«èŠçŽ ãè¿œå ãã
table.insert(fruits, 'grape')
-- table.remove()é¢æ°ã䜿çšããŠãæå®ããäœçœ®ã®èŠçŽ ãåé€ãã
table.remove(fruits, 2)
-- table.sort()é¢æ°ã䜿çšããŠãããŒãã«ããœãŒããã
table.sort(fruits)
</syntaxhighlight>
{{ã³ã©ã |ããŒãã«ãšãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæå|2=Luaã¯ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåãæ¡çšããŠãããããããŒãã«ã䜿ã£ãŠãªããžã§ã¯ããè¡šçŸããŸããã€ãŸããããŒãã«ã䜿ã£ãŠãªããžã§ã¯ããçæãããã®ããŒãã«ãè€è£œããŠæ°ãããªããžã§ã¯ããäœæããããããŒãã«å士ãçµåããŠãªããžã§ã¯ããæ¡åŒµããããšãã§ããŸãã
å
·äœçã«ã¯ãããŒãã«ã«ã¡ãœãããå±æ§ãæ ŒçŽããŠãªããžã§ã¯ããè¡šçŸããŸãããªããžã§ã¯ãã®äœæã«ã¯ãããŒãã«ãè€è£œããŠå¿
èŠãªå±æ§ãè¿œå ããããæ¢åã®ããŒãã«ã«å±æ§ãè¿œå ããããšã§å®çŸã§ããŸãã
äŸãã°ã以äžã®ããã«Personãšããã¯ã©ã¹ãè¡šçŸããããšãã§ããŸãã
:<syntaxhighlight lang=lua>
-- Personã¯ã©ã¹ãè¡šçŸããããŒãã«
Person = {}
-- ã³ã³ã¹ãã©ã¯ã¿
function Person:new(name, age)
local obj = { name = name, age = age }
setmetatable(obj, self)
self.__index = self
return obj
end
-- ã€ã³ã¹ã¿ã³ã¹ã¡ãœãã
function Person:sayHello()
print("Hello, my name is " .. self.name .. " and I am " .. self.age .. " years old.")
end
-- ã€ã³ã¹ã¿ã³ã¹çæ
local p1 = Person:new("John", 30)
-- ã¡ãœããåŒã³åºã
p1:sayHello() -- "Hello, my name is John and I am 30 years old."
</syntaxhighlight>
ãã®äŸã§ã¯ãPersonãšããããŒãã«ãå®çŸ©ããŠããã®äžã«newãšããã³ã³ã¹ãã©ã¯ã¿ãšsayHelloãšããã€ã³ã¹ã¿ã³ã¹ã¡ãœãããå®çŸ©ããŠããŸããnewã¯ããŒãã«ãçæããããã®ã¡ãœããã§ãããsetmetatableãšself.__indexã䜿ã£ãŠããªããžã§ã¯ããPersonããŒãã«ãç¶æ¿ããããã«ããŠããŸãããŸããã€ã³ã¹ã¿ã³ã¹ã¡ãœããã§ããsayHelloã¯ããªããžã§ã¯ãã®å±æ§ãåç
§ããŠã¡ãã»ãŒãžã衚瀺ããã¡ãœããã§ãã
ãã®ããã«ãLuaã§ã¯ããŒãã«ã䜿ã£ãŠãªããžã§ã¯ããè¡šçŸããããšãã§ããŸãããããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåã¯ãã¯ã©ã¹ã䜿ã£ããªããžã§ã¯ãæåãšæ¯èŒããŠæè»æ§ãé«ããåçãªãªããžã§ã¯ãçæãã¯ã©ã¹ã®å€æŽã容æã§ãããããLuaã®ãããªã¹ã¯ãªããèšèªã«é©ããŠããŸãã
}}
== ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæå ==
Luaã¯ãããã¿ã€ãããŒã¹ã®ãªããžã§ã¯ãæåèšèªã§ãããã¯ã©ã¹ãå®çŸ©ããã®ã§ã¯ãªãããªããžã§ã¯ãã®ãããã¿ã€ããäœæããããšã§ãªããžã§ã¯ããçæããŸãã
ãªããžã§ã¯ãã¯ããŒãã«ãšããŠè¡šçŸããããªããžã§ã¯ãã®æ¯ãèããæŒç®åã®æ¯ãèããå®çŸ©ããããã«ãããŒãã«ã«ã¡ãœãããè¿œå ã§ããŸãããŸããã¡ãœããã®åŒã³åºãã«ã¯ã.ãã䜿ããŸãã
ã¡ã¿ããŒãã«ã¯ãããŒãã«ã«ç¹å®ã®åäœãå®çŸ©ããããã«äœ¿çšãããŸããäŸãã°ãã¡ã¿ããŒãã«ã䜿çšããŠããªããžã§ã¯ããå ç®ãæžç®ãæ¯èŒãªã©ã®æŒç®ããµããŒãããããã«ããããšãã§ããŸãã
ã¡ã¿ããŒãã«ã¯ã__indexã__newindexã__addã__subã__mulã__divã__modã__powã__unmã__eqã__ltã__leã__callãªã©ã®ç¹æ®ãªããŒãæã€ããŒãã«ãšããŠå®çŸ©ãããŸãããããã®ããŒã«ã¯ãç¹å®ã®åäœãé¢é£ä»ããããŠããŸãã
å
·äœçãªäŸãèŠãŠã¿ãŸãããã以äžã®ãããªAnimalããŒãã«ãäœæããŸãã
:<syntaxhighlight lang=lua>
Animal = {sound = "No sound"}
function Animal:new(o)
o = o or {}
setmetatable(o, self)
self.__index = self
return o
end
function Animal:makeSound()
print(self.sound)
end
</syntaxhighlight>
ãã®äŸã§ã¯ãAnimalããŒãã«ã«soundãã£ãŒã«ããå®çŸ©ããnew()é¢æ°ããªããžã§ã¯ãäœæã®ããã«å®çŸ©ããŠããŸããmakeSound()é¢æ°ã¯Animalãªããžã§ã¯ããåŒã³åºããããšãã«ããªããžã§ã¯ãã®soundãã£ãŒã«ãã®é³ãåºåããããã«äœ¿çšãããŸãã
次ã«ãAnimalããŒãã«ããCatããŒãã«ãäœæããŸãã
:<syntaxhighlight lang=lua>
Cat = Animal:new({sound = "Meow"})
function Cat:scratch()
print("I am scratching stuff!")
end
</syntaxhighlight>
ãã®äŸã§ã¯ãCatããŒãã«ã¯AnimalããŒãã«ãã掟çããŠãããCatãªããžã§ã¯ãã«ã¯makeSound()ã¡ãœãããå«ãŸããsoundãã£ãŒã«ãã«ã¯"Meow"ãšããå€ãæ ŒçŽãããŠããŸããscratch()ã¡ãœãããè¿œå ãããŸããã
æåŸã«ãæ°ããCatãªããžã§ã¯ããäœæããŠãã¡ãœããã®åäœã確èªããŸãã
:<syntaxhighlight lang=lua>
myCat = Cat:new{}
myCat:makeSound() -- Prints "Meow"
myCat:scratch() -- Prints "I am scratching stuff!"
</syntaxhighlight>
ãã®äŸã§ã¯ãCatããŒãã«ã䜿çšããããšã§ãAnimalããŒãã«ã®makeSound()ã¡ãœãããåå©çšããæ°ããã¡ãœããscratch()ãè¿œå ããŸããããŸããã¡ã¿ããŒãã«ãéããŠããªããžã§ã¯ããšããŠã®Catã®æ¯ãèããã«ã¹ã¿ãã€ãºããããšãã§ããŸãã
=== è€çŽ æ°ãªããžã§ã¯ãã®å®çŸ© ===
ãŠãŒã¶ãŒå®çŸ©ã®ãªããžã§ã¯ãã®äŸãšããŠãè€çŽ æ°ãªããžã§ã¯ãã®å®çŸ©ãåãäžããŸãã
;complex.lua:<syntaxhighlight lang=lua>
-- è€çŽ æ°ãªããžã§ã¯ã
Complex = {}
function Complex:new(r, i)
--[[ Create a new 'Complex' object.
@param r The real part of the complex number.
@param i The imaginary part of the complex number.
]]
local c = {}
setmetatable(c, self)
self.__index = self
c.r = r or 0
c.i = i or 0
return c
end
-- è€çŽ æ°ã®å ç®
function Complex:__add(other)
--[[ Add two 'Complex' objects.
@param other The 'Complex' object to add to self.
@return A new 'Complex' object representing the sum of self and other.
]]
return Complex:new(self.r + other.r, self.i + other.i)
end
-- è€çŽ æ°ã®æžç®
function Complex:__sub(other)
--[[ Subtract two 'Complex' objects.
@param other The 'Complex' object to subtract from self.
@return A new 'Complex' object representing the difference between self and other.
]]
return Complex:new(self.r - other.r, self.i - other.i)
end
-- è€çŽ æ°ã®ä¹ç®
function Complex:__mul(other)
--[[ Multiply two 'Complex' objects.
@param other The 'Complex' object to multiply with self.
@return A new 'Complex' object representing the product of self and other.
]]
return Complex:new(self.r * other.r - self.i * other.i, self.r * other.i + self.i * other.r)
end
-- è€çŽ æ°ã®é€ç®
function Complex:__div(other)
--[[ Divide two 'Complex' objects.
@param other The 'Complex' object to divide self by.
@return A new 'Complex' object representing the quotient of self and other.
]]
local denom = other.r * other.r + other.i * other.i
return Complex:new((self.r * other.r + self.i * other.i) / denom, (self.i * other.r - self.r * other.i) / denom)
end
-- è€çŽ æ°ã®çµ¶å¯Ÿå€
function Complex:abs()
--[[ Get the absolute value of the 'Complex' object.
@return A number representing the absolute value of the complex number.
]]
return math.sqrt(self.r^2 + self.i^2)
end
-- è€çŽ æ°ã®æååå
function Complex:__tostring()
--[[ Get the string representation of the 'Complex' object.
@return A string representing the complex number.
]]
if (self.i < 0) then
return self.r .. "-" .. -self.i .. "i"
end
return self.r .. "+" .. self.i .. "i"
end
-- ãµã³ãã«ã³ãŒã
c1 = Complex:new(1, 2)
c2 = Complex:new(3, 4)
print(c1) -- 1+2i
print(c2) -- 3+4i
print(c1 + c2) -- 4+6i
print(c1 - c2) -- -2-2i
print(c1 * c2) -- -5+10i
print(c1 / c2) -- 0.44+0.08i
print(c2:abs()) -- 5.0
</syntaxhighlight>
=== ãã³ãœã«ãªããžã§ã¯ãã®å®çŸ© ===
:<syntaxhighlight lang=lua>
-- ãã³ãœã«ãªããžã§ã¯ããå®çŸ©ããã³ã³ã¹ãã©ã¯ã¿é¢æ°
function Tensor(...)
local obj = {}
obj.data = {...}
obj.size = #obj.data
setmetatable(obj, TensorMeta)
return obj
end
-- ãã³ãœã«ãªããžã§ã¯ãã«å¯Ÿããã¡ã¿ããŒãã«
TensorMeta = {}
-- ãã³ãœã«ãªããžã§ã¯ãã®è¶³ãç®
function TensorMeta.__add(a, b)
local c = {}
for i = 1, a.size do
c[i] = a.data[i] + b.data[i]
end
return Tensor(table.unpack(c))
end
-- ãã³ãœã«ãªããžã§ã¯ãã®åŒãç®
function TensorMeta.__sub(a, b)
local c = {}
for i = 1, a.size do
c[i] = a.data[i] - b.data[i]
end
return Tensor(table.unpack(c))
end
-- ãã³ãœã«ãªããžã§ã¯ãã®æãç®
function TensorMeta.__mul(a, b)
local c = {}
for i = 1, a.size do
c[i] = a.data[i] * b.data[i]
end
return Tensor(table.unpack(c))
end
-- ãã³ãœã«ãªããžã§ã¯ãã®å²ãç®
function TensorMeta.__div(a, b)
local c = {}
for i = 1, a.size do
c[i] = a.data[i] / b.data[i]
end
return Tensor(table.unpack(c))
end
-- ãã³ãœã«ãªããžã§ã¯ãã®çæ
a = Tensor(1, 2, 3)
b = Tensor(4, 5, 6)
-- ãã³ãœã«ãªããžã§ã¯ãã®è¶³ãç®
c = a + b
print(c.data[1], c.data[2], c.data[3]) --> 5 7 9
-- ãã³ãœã«ãªããžã§ã¯ãã®åŒãç®
c = a - b
print(c.data[1], c.data[2], c.data[3]) --> -3 -3 -3
-- ãã³ãœã«ãªããžã§ã¯ãã®æãç®
c = a * b
print(c.data[1], c.data[2], c.data[3]) --> 4 10 18
-- ãã³ãœã«ãªããžã§ã¯ãã®å²ãç®
c = a / b
print(c.data[1], c.data[2], c.data[3]) --> 0.25 0.4 0.5
</syntaxhighlight>
== LuaRocks ==
LuaRocksã¯ãLuaèšèªçšã®ããã±ãŒãžç®¡çããŒã«ã§ãã
ãã®ããŒã«ã䜿çšãããšãLuaã®æ¡åŒµæ©èœããŠãŒãã£ãªãã£ãç°¡åã«ã€ã³ã¹ããŒã«ãã¢ããã°ã¬ãŒããåé€ããããšãã§ããŸãã
LuaRocksã䜿ãããã«ã¯ãå
ã«Luaã®ã©ã³ã¿ã€ã ãå¿
èŠã«ãªããŸãã
以äžã«ãLuaRocksã®åºæ¬çãªäœ¿ãæ¹ã説æããŸãã
=== ããã±ãŒãžã®ã€ã³ã¹ããŒã« ===
æ°ããããã±ãŒãžãã€ã³ã¹ããŒã«ããã«ã¯ã以äžã®ã³ãã³ããå®è¡ããŸãã
:<syntaxhighlight lang=bash>
$ luarocks install package-name
</syntaxhighlight>
ããšãã°ãluasocketãšããããã±ãŒãžãã€ã³ã¹ããŒã«ããå Žåã¯ã以äžã®ããã«å
¥åããŸãã
:<syntaxhighlight lang=bash>
$ luarocks install luasocket
</syntaxhighlight>
=== ããã±ãŒãžã®ã¢ã³ã€ã³ã¹ããŒã« ===
äžèŠãªããã±ãŒãžãã¢ã³ã€ã³ã¹ããŒã«ããã«ã¯ã以äžã®ã³ãã³ããå®è¡ããŸãã
:<syntaxhighlight lang=bash>
$ luarocks remove package-name
</syntaxhighlight>
ããšãã°ãå
ã»ã©ã€ã³ã¹ããŒã«ããluasocketããã±ãŒãžãã¢ã³ã€ã³ã¹ããŒã«ããå Žåã¯ã以äžã®ããã«å
¥åããŸãã
:<syntaxhighlight lang=bash>
$ luarocks remove luasocket
</syntaxhighlight>
=== ããã±ãŒãžã®äžèŠ§è¡šç€º ===
ã€ã³ã¹ããŒã«ãããŠããããã±ãŒãžã®äžèŠ§ã衚瀺ããã«ã¯ã以äžã®ã³ãã³ããå
¥åããŸãã
:<syntaxhighlight lang=bash>
$ luarocks list
</syntaxhighlight>
=== ããã±ãŒãžã®ããŒãžã§ã³ç¢ºèª ===
ã€ã³ã¹ããŒã«ãããŠããããã±ãŒãžã®ããŒãžã§ã³ã確èªããã«ã¯ã以äžã®ã³ãã³ããå
¥åããŸãã
:<syntaxhighlight lang=bash>
$ luarocks show package-name
</syntaxhighlight>
ãã ãããã®ã³ãã³ãã¯ã€ã³ã¹ããŒã«ãããŠããããã±ãŒãžã«éå®ãããŸããã€ã³ã¹ããŒã«ãããŠããªãããã±ãŒãžã®ããŒãžã§ã³ã確èªãããå Žåã¯ã以äžã®ããã«å
¥åããŸãã
:<syntaxhighlight lang=bash>
$ luarocks search package-name
</syntaxhighlight>
以äžããLuaRocksã®åºæ¬çãªäœ¿ãæ¹ã§ãããããã®ã³ãã³ããå®è¡ããããšã§ãLuaã®æ¡åŒµæ©èœããŠãŒãã£ãªãã£ãç°¡åã«ã€ã³ã¹ããŒã«ãã¢ããã°ã¬ãŒããåé€ããããšãã§ããŸãã
== Luadoc ==
LuaDocã¯ãLuaã®ããã¥ã¡ã³ããŒã·ã§ã³ããŒã«ã§ããããœãŒã¹ã³ãŒãå
ã«ããé¢æ°ãã¢ãžã¥ãŒã«ã«ã€ããŠã®æ
å ±ãèªåçã«æœåºããŠãHTMLãXMLããŸãã¯ããã¹ã圢åŒã®ããã¥ã¡ã³ããçæããããšãã§ããŸãã
以äžã«ãLuaDocã«ãã£ãŠçæãããããã¥ã¡ã³ãã«å«ãŸããæ
å ±ã®çš®é¡ã瀺ããŸãã
* ã¢ãžã¥ãŒã«ã®ååãæŠèŠãããã³èª¬æ
* é¢æ°ãåŒæ°ãæ»ãå€ãåŒæ°ãšæ»ãå€ã®çš®é¡ãããã³é¢æ°ã®æŠèŠãšèª¬æ
* å€æ°ããã®åãããã³å€æ°ã®èª¬æ
* ã¢ãžã¥ãŒã«ãšãã®é¢æ°ãå€æ°ãããã³ããŒãã«ã®éå±€æ§é
* åç
§é¢ä¿ãé¢é£ããé¢æ°ãªã©ã®ãªã³ã¯
LuaDocã¯ãLuaã®ããŒãã«ããªããžã§ã¯ãæåããã°ã©ãã³ã°ãããã³ããŒãžã§ã³å¶åŸ¡ã·ã¹ãã ã«ã察å¿ããŠããŸãããŸããLuaDocã¯ããŠãŒã¶ãŒå®çŸ©ã®ã¿ã°ã䜿çšããŠãã«ã¹ã¿ã ã¿ã°ãäœæããããšãã§ããŸãã
LuaDocã«ã¯ã以äžã®ãããªäž»ãªæ©èœããããŸãã
* ããã¥ã¡ã³ãåãããã³ãŒãã®æœåºïŒLuaDocã¯ãLuaã®ãœãŒã¹ã³ãŒããããã³ã¡ã³ããšé¢æ°/å€æ°ã®æ
å ±ãæœåºããããšãã§ããŸãããããã®æ
å ±ã¯ãã¢ãžã¥ãŒã«ã¬ãã«ã®ããã¥ã¡ã³ããé¢æ°åäœã®ããã¥ã¡ã³ããããã³å€æ°åäœã®ããã¥ã¡ã³ããšããŠåºåãããŸãã
* å€æ§ãªåºå圢åŒïŒLuaDocã¯ãHTMLãLaTeXãXMLãããã³ããã¹ã圢åŒãªã©ãå€æ§ãªåœ¢åŒã§ããã¥ã¡ã³ããåºåããããšãã§ããŸããåºå圢åŒã¯ããã³ãã¬ãŒãã䜿çšããŠã«ã¹ã¿ãã€ãºããããšãã§ããŸãã
*ã¢ãžã¥ãŒã«ãé¢æ°ã®ã°ã©ãã£ã«ã«ãªéå±€æ§é ïŒLuaDocã¯ãã¢ãžã¥ãŒã«ãé¢æ°ã®éå±€æ§é ãããã¥ã¡ã³ãåããã°ã©ãã£ã«ã«ãªåœ¢åŒã§è¡šç€ºããããšãã§ããŸãã
ãŠãŒã¶ãŒå®çŸ©ã®æ¡åŒµ LuaDocã¯ããŠãŒã¶ãŒãç¬èªã®ã¿ã°ãå®çŸ©ããŠãããã¥ã¡ã³ãåããæ
å ±ãã«ã¹ã¿ãã€ãºããããšãã§ããŸãã
以äžããLuaDocã®æŠèŠã§ããLuaDocã¯ãLuaã³ãã¥ããã£ãŒã«ãããŠãåºã䜿ãããŠããããã¥ã¡ã³ããŒã·ã§ã³ããŒã«ã§ãããLuaãããžã§ã¯ãã®éçºè
ã«ãšã£ãŠéèŠãªããŒã«ã®1ã€ã§ãã
=== åºæ¬æ§æ ===
LuaDocã§äœ¿çšãããåºæ¬æ§æã®äŸã§ãã
==== ã³ã¡ã³ã ====
Luadocã¯ãç¹æ®ãªæ¹æ³ã§Luaã®ã³ã¡ã³ããèªèããŸãã次ã®ãããªäŸã§ãã
:<syntaxhighlight lang=lua>
--- This is a comment that LuaDoc recognizes.
</syntaxhighlight>
---ã§å§ãŸãè¡ã¯ãLuaDocã«ãã£ãŠããã¥ã¡ã³ãã®äžéšãšããŠè§£éãããŸããã³ã¡ã³ãè¡ãç¶ããŠè¡ãããšãå¯èœã§ããããã¯å
šãŠåãããã¥ã¡ã³ãããã¹ããšããŠåŠçãããŸãã
:<syntaxhighlight lang=lua>
--- This is a comment that LuaDoc recognizes.
--- It continues onto another line.
</syntaxhighlight>
ã³ã¡ã³ãã«ã¯ãè¡ã«ç¶ãã¿ã°ãå«ããããããšããããŸããã³ã¡ã³ããšã¿ã°ã®éã«ã¯ãã¹ããŒã¹ãå¿
èŠã§ãã
:<syntaxhighlight lang=lua>
--- @param x The x coordinate.
--- @param y The y coordinate.
function point(x,y)
-- ...
end
</syntaxhighlight>
==== ã¿ã° ====
LuaDocã§ã¯ãããã€ãã®ããã¥ã¡ã³ãã¿ã°ã䜿çšãããŸããäžèšã«äŸãæããŸãã
===== @param =====
é¢æ°ã®åŒæ°ã®èª¬æãæäŸããŸãã
:<syntaxhighlight lang=lua>
--- @param x The x coordinate.
--- @param y The y coordinate.
function point(x,y)
-- ...
end
</syntaxhighlight>
===== @return =====
é¢æ°ãè¿ãå€ã説æããŸãã
:<syntaxhighlight lang=lua>
--- @return A new point table.
function point(x,y)
-- ...
end
</syntaxhighlight>
===== @see =====
é¢æ°ãªã©ã®é¢é£ããå
容ãåç
§å
ã説æããã¿ã°ã
:<syntaxhighlight lang=lua>
--- @see UUIDUtils
function generateUUID()
-- ...
end
</syntaxhighlight>
ãã®ããã«ããŠãLuaDocã䜿çšããããšã§ãLuaã®ã³ãŒãã«å¯ŸããŠããã¥ã¡ã³ããèªåçã«çæããããšãã§ããŸãã
=== åºæ¬çãªçšèª ===
* ã³ã¡ã³ã - ã³ãŒãå
ã®èª¬æãèšè¿°ããããã®ã¡ã¢ãè¡ã®å
é ã« <code>--</code> ãä»ããããšã§äœæã§ããã
* ã¿ã° - ã³ã¡ã³ãã«åã蟌ãŸããããŒã¯ã¢ããã¿ã°ãç¹å®ã®ãã¿ãŒã³ãæã€ã³ã¡ã³ãè¡ã«å¯Ÿå¿ããããã«äœ¿çšãããŸãã
* ããã¥ã¡ã³ã - ã³ãŒãããèªåçæããã説æããªãã¡ã¬ã³ã¹ã
* API - ããŒã¿æ§é ãé¢æ°ããã®ä»ã®ããã°ã©ãã³ã°ã€ã³ã¿ãŒãã§ã€ã¹ã®å
šäœçãªã»ããã
* ãããã¡ã€ã« - ããã°ã©ã ã®ããã©ãŒãã³ã¹ã枬å®ããããšã
=== Luadoc ã¿ã° ===
Luadocã¯ãã³ã¡ã³ãã«èšè¿°ãããç¹å®ã®ãã¿ãŒã³ã解æããããã¥ã¡ã³ãã®çæã«äœ¿çšããŸããã³ã¡ã³ãã«æ¿å
¥ãããã¿ã°ã®äŸãããã€ã瀺ããŸãã
* <code>@param</code> - é¢æ°ã®ãã©ã¡ãŒã¿ãŒã®èª¬æãæäŸããããã«äœ¿çšãããŸãã
* <code>@return</code> - é¢æ°ã®æ»ãå€ã®èª¬æãæäŸããããã«äœ¿çšãããŸãã
* <code>@class</code> - ã¯ã©ã¹ã®ããã¥ã¡ã³ãã瀺ãããã«äœ¿çšãããŸãã
* <code>@module</code> - ã¢ãžã¥ãŒã«ã®ããã¥ã¡ã³ãã瀺ãããã«äœ¿çšãããŸãã
* <code>@field</code> - ã¯ã©ã¹ã¡ã³ããŒã®èª¬æãæäŸããããã«äœ¿çšããŸãã
* <code>@see</code> - å¥ã®å Žæã«ããé¢é£ããã¥ã¡ã³ããžã®åç
§ãæäŸããããã«äœ¿çšãããŸãã
* <code>@tparam</code> - ãžã§ããªãã¯é¢æ°ã®åãã©ã¡ãŒã¿ãŒã®èª¬æãæäŸããããã«äœ¿çšãããŸãã
=== Luadoc ã³ãã³ã ===
ãªãã¡ã¬ã³ã¹ã®çæãææžã®ãã«ãããœãŒã¹ã³ãŒãã®ãããã¡ã€ãªã³ã°ãªã©ãLuadocã®ããŸããŸãªã³ãã³ããå©çšã§ããŸãã以äžã¯ããã€ãã®ä»£è¡šçãªã³ãã³ãã§ãã
* <code>luadoc</code> - ãœãŒã¹ãã¡ã€ã«ããããã¥ã¡ã³ããçæããHTML圢åŒã§åºåããŸãã
* <code>luadoc -d <directory> <filename></code> - åºåãã©ã«ããæå®ããŠãã¡ã€ã«ããããã¥ã¡ã³ããçæããŸãã
* <code>luadoc -h</code> - ãã«ãã衚瀺ããŸãã
* <code>luadoc -p</code> - ãœãŒã¹ã³ãŒãããããã¡ã€ãªã³ã°ããŠããã©ãŒãã³ã¹ã«é¢ããæ
å ±ãçæããŸãã
=== Luadoc ã»ã¯ã·ã§ã³ ===
* <code>@module <module_name></code> - ã¢ãžã¥ãŒã«ã®ããã¥ã¡ã³ããäœæããŸãã
* <code>@class <class_name></code> - ã¯ã©ã¹ã®ããã¥ã¡ã³ããäœæããŸãã
* <code>@method <method_name></code> - ã¯ã©ã¹ã¡ãœããã®ããã¥ã¡ã³ããäœæããŸãã
* <code>@tparam <type></code> - ãžã§ããªãã¯é¢æ°ã®åãã©ã¡ãŒã¿ãŒã®ããã¥ã¡ã³ããäœæããŸãã
* <code>@property <property_name></code> - ã¯ã©ã¹ã®ã¡ã³ããŒããããã£ã®ããã¥ã¡ã³ããäœæããŸãã
== ãã¡ã€ã«å
¥åºå ==
以äžã¯Luaã«ããããã¡ã€ã«å
¥åºåã«é¢ããåºæ¬çãªæäœã®äŸã§ãã
=== ãã¡ã€ã«ã®èªã¿èŸŒã¿ ===
:<syntaxhighlight lang=lua>
-- ãã¡ã€ã«ãéã
local file = io.open("sample.txt", "r")
-- ãã¡ã€ã«ãã1è¡ãã€èªã¿èŸŒã
for line in file:lines() do
print(line)
end
-- ãã¡ã€ã«ãéãã
file:close()
</syntaxhighlight>
äžèšã®äŸã§ã¯ã<code>io.open</code>é¢æ°ã䜿ã£ãŠãã¡ã€ã«ãéãã<code>file</code>å€æ°ã«ä»£å
¥ããŠããŸãã第äžåŒæ°ã«ãã¡ã€ã«åã第äºåŒæ°ã«ã¢ãŒããæå®ããŸãã<code>r</code>ã¢ãŒãã¯èªã¿èŸŒã¿å°çšã¢ãŒããè¡šããŸãã
次ã«ã<code>file:lines()</code>ã䜿ã£ãŠãã¡ã€ã«ãã1è¡ãã€èªã¿èŸŒã¿ã<code>for</code>ã«ãŒãã䜿ã£ãŠè¡ãåºåããŠããŸãã
æåŸã«ããã¡ã€ã«ãéããããã«<code>file:close()</code>ãåŒã³åºããŠããŸãã
=== ãã¡ã€ã«ã®æžã蟌㿠===
:<syntaxhighlight lang=lua>
-- ãã¡ã€ã«ãéã
local file = io.open("output.txt", "w")
-- ãã¡ã€ã«ã«æååãæžã蟌ã
file:write("Hello, world!")
-- ãã¡ã€ã«ãéãã
file:close()
</syntaxhighlight>
äžèšã®äŸã§ã¯ã<code>io.open</code>é¢æ°ã䜿ã£ãŠãã¡ã€ã«ãéãã<code>file</code>å€æ°ã«ä»£å
¥ããŠããŸãã第äžåŒæ°ã«ãã¡ã€ã«åã第äºåŒæ°ã«ã¢ãŒããæå®ããŸãã<code>w</code>ã¢ãŒãã¯æžã蟌ã¿å°çšã¢ãŒããè¡šããŸããæ¢åã®ãã¡ã€ã«ãããå Žåãå
容ãäžæžããããŸãã
次ã«ã<code>file:write()</code>ã䜿ã£ãŠãã¡ã€ã«ã«æååãæžã蟌ãã§ããŸãã
æåŸã«ããã¡ã€ã«ãéããããã«<code>file:close()</code>ãåŒã³åºããŠããŸãã
äžèšã®äŸã§ã¯ããã¡ã€ã«ãžã®æžã蟌ã¿ãå®äºããæç¹ã§ããã¡ã€ã«ãéããããããããã¡ã€ã«ãæ瀺çã«éããå¿
èŠã¯ãããŸããããã ãããã¡ã€ã«ãéãããŸãŸã«ããŠãããšãã¡ã¢ãªãªãŒã¯ãªã©ã®åé¡ãçºçããå¯èœæ§ãããããããã¡ã€ã«ã®æäœãçµäºãããå¿
ã<code>file:close()</code>ãåŒã³åºãããã«ããŠãã ããã
== ã¢ãžã¥ãŒã«ãšããã±ãŒãž ==
ã¢ãžã¥ãŒã«ãšã¯ãäžé£ã®é¢æ°ãå€æ°ããŸãšãããã®ã§ãåå©çšæ§ãé«ããã³ãŒãã®å
±ææ¹æ³ã§ããããã±ãŒãžã¯ãè€æ°ã®ã¢ãžã¥ãŒã«ããŸãšããŠç®¡çããæ¹æ³ã§ãã
Luaã«ãããŠãã¢ãžã¥ãŒã«ã¯ããŒãã«ã䜿ã£ãŠå®è£
ãããŸããéåžžãã¢ãžã¥ãŒã«ã¯æ°ããããŒãã«ãäœæããŠãããã«é¢æ°ãå€æ°ãæ ŒçŽããŸããã¢ãžã¥ãŒã«ãå©çšããåŽã¯ããã®ã¢ãžã¥ãŒã«ãæäŸããé¢æ°ãå€æ°ã«ã¢ã¯ã»ã¹ããããã«ãã¢ãžã¥ãŒã«ãããŒãããå¿
èŠããããŸãã
ããã±ãŒãžã¯ãè€æ°ã®ã¢ãžã¥ãŒã«ãäžã€ã®ããã±ãŒãžã«ãŸãšãããã®ããã±ãŒãžãå©çšããæ¹æ³ãæäŸããŸããããã±ãŒãžã«ã¯ãäžã€ä»¥äžã®ã¢ãžã¥ãŒã«ãå«ãŸããŠããå ŽåããããŸããéåžžãããã±ãŒãžã¯ãã£ã¬ã¯ããªéå±€ã䜿ã£ãŠç®¡çãããããã±ãŒãžã®ååã¯ãã£ã¬ã¯ããªåã«å¯Ÿå¿ããŸããããã±ãŒãžã¯ãLuaã®æšæºã©ã€ãã©ãªããããŒãããããšãã§ããŸãããã«ã¹ã¿ã ã®ããã±ãŒãžãäœæããããšãã§ããŸãã
以äžã¯ãã¢ãžã¥ãŒã«ãšããã±ãŒãžã®äŸã§ãã
;mymodule.lua:<syntaxhighlight lang=lua>
local mymodule = {}
function mymodule.greet(name)
print("Hello, " .. name .. "!")
end
return mymodule
</syntaxhighlight>
;main.lua:<syntaxhighlight lang=lua>
local mymodule = require("mymodule")
mymodule.greet("Alice")
</syntaxhighlight>
;mypackage/init.lua:<syntaxhighlight lang=lua>
local mypackage = {}
mypackage.mymodule = require("mypackage.mymodule")
return mypackage
</syntaxhighlight>
;main.lua:<syntaxhighlight lang=lua>
local mypackage = require("mypackage")
mypackage.mymodule.greet("Bob")
</syntaxhighlight>
ãããã®ã³ãŒãã¯ã"mymodule.lua"ãšããååã®ã¢ãžã¥ãŒã«ãäœæãã"main.lua"ã§ããŒãããŠäœ¿çšããäŸãšã"mypackage"ãšããååã®ããã±ãŒãžãäœæãããã®äžã«"mymodule"ãšããååã®ã¢ãžã¥ãŒã«ãå«ããŠã"main.lua"ã§äœ¿çšããäŸã瀺ããŠããŸãã
== Luaã®æ¡åŒµæ§ãšC API ==
Luaã¯ãCèšèªã«ããæ¡åŒµã容æã«è¡ããããã«èšèšãããŠããŸããLuaã®C APIã䜿ãããšã§ãCèšèªã§æžãããã¢ãžã¥ãŒã«ãã©ã€ãã©ãªãLuaããå©çšããããšãã§ããŸãã
Luaã®C APIã¯ãLuaã®ä»æ§ã«åºã¥ããŠäœãããŠãããããCèšèªããLuaã¹ã¯ãªãããå®è¡ããããLuaã¹ã¯ãªããããCèšèªã®é¢æ°ãåŒã³åºãããããããšãã§ããŸãã
=== Luaã®æ¡åŒµæ§ãšã¯äœãïŒ ===
Luaã¯æ¡åŒµæ§ã«åªããã¹ã¯ãªããèšèªã§ããã¹ãã¢ããªã±ãŒã·ã§ã³ã«åãããŠæè»ã«ã«ã¹ã¿ãã€ãºããããšãã§ããŸããLuaã¯Cã§å®è£
ãããŠãããC APIãéããŠLuaã®æ©èœãæ¡åŒµããããšãã§ããŸãã
C APIã䜿çšããããšã§ãCããã°ã©ã ããLuaã¹ã¯ãªãããåŒã³åºãããšãã§ããŸãããŸããLuaã¹ã¯ãªããããCé¢æ°ãåŒã³åºãããšãã§ããŸããC APIã«ã¯ãLuaã®å€ã®ã¹ã¿ãã¯ãæäœããããã®é¢æ°ããæ°ããé¢æ°ãããŒãã«ãäœæããããã®é¢æ°ãªã©ãå«ãŸããŠããŸãã
äŸãã°ã以äžã®ãããªCããã°ã©ã ãèããŠã¿ãŸãããã
:<syntaxhighlight lang=c>
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
int main(int argc, char *argv[]) {
lua_State *L = luaL_newstate(); // Luaã¹ããŒããäœæ
luaL_openlibs(L); // Luaã®æšæºã©ã€ãã©ãªããªãŒãã³
luaL_dostring(L, "print('Hello, world!')"); // Luaã¹ã¯ãªãããå®è¡
lua_close(L); // Luaã¹ããŒãã解æŸ
return 0;
}
</syntaxhighlight>
ãã®ããã°ã©ã ã§ã¯ã<code>luaL_newstate</code>é¢æ°ã§Luaã¹ããŒããäœæãã<code>luaL_openlibs</code>é¢æ°ã§Luaã®æšæºã©ã€ãã©ãªããªãŒãã³ããŠããŸãããããŠã<code>luaL_dostring</code>é¢æ°ã§Luaã¹ã¯ãªãããå®è¡ããŠããŸããæåŸã«ã<code>lua_close</code>é¢æ°ã§Luaã¹ããŒãã解æŸããŠããŸãã
ãã®ããã«ãC APIã䜿çšããããšã§Luaã®æ©èœãæ¡åŒµããããšãã§ããŸããããããC APIã¯è€éã§ãããããLuaã®åºç€ãç解ããäžã§äœ¿çšããããšãããããããŸãã
== ãããžã§ã¯ãäŸ ==
=== ç°¡åãªãããžã§ã¯ãã®äœæ ===
以äžã¯ãæ°ãåãåãããããå¶æ°ãå¥æ°ããå€å®ããç°¡åãªLuaããã°ã©ã ã®äŸã§ãã
:<syntaxhighlight lang=lua>
function even_or_odd(num)
if num % 2 == 0 then
return "even"
else
return "odd"
end
end
-- ãŠãŒã¶ãŒããæ°å€ãåãåã
io.write("Enter a number: ")
num = io.read("*n")
-- æ°åãå¶æ°ãå¥æ°ãå€å®ãã
result = even_or_odd(num)
-- çµæã衚瀺ãã
print(num .. " is " .. result)
</syntaxhighlight>
ãã®ããã°ã©ã ã§ã¯ã <code>even_or_odd</code> é¢æ°ãæ°å€ãå¶æ°ãå¥æ°ããå€å®ããããã«äœ¿çšãããŠããŸãããã®åŸã <code>io</code> ã©ã€ãã©ãªã䜿çšããŠãŠãŒã¶ãŒããæ°å€ãååŸãã <code>even_or_odd</code> é¢æ°ãåŒã³åºããŠçµæã衚瀺ããŸãã
=== ãããžã§ã¯ãã®æ¹è¯ãšæ¡åŒµ ===
次ã«ããã®ããã°ã©ã ãæ¹è¯ããŠãå¶æ°ãšå¥æ°ã®ã«ãŠã³ããè¿œå ããŠã¿ãŸãããã
:<syntaxhighlight lang=lua>
function even_or_odd(num)
if num % 2 == 0 then
return "even"
else
return "odd"
end
end
-- ã«ãŠã³ã¿ãŒã®åæå
even_count = 0
odd_count = 0
-- æ°åã 10 ååãåã
for i = 1, 10 do
io.write("Enter a number: ")
num = io.read("*n")
result = even_or_odd(num)
if result == "even" then
even_count = even_count + 1
else
odd_count = odd_count + 1
end
end
-- çµæã衚瀺ãã
print("Even numbers: " .. even_count)
print("Odd numbers: " .. odd_count)
</syntaxhighlight>
ãã®ããã°ã©ã ã§ã¯ãå¶æ°ãšå¥æ°ã®ã«ãŠã³ãã <code>even_count</code> ãš <code>odd_count</code> å€æ°ã«æ ŒçŽãããŸãããã®åŸãã«ãŒãã®æåŸã«ãããã衚瀺ããŸãã
ãã®ããã°ã©ã ã¯ãããè€éãªæ©èœãè¿œå ããŠãLuaããã°ã©ã ãæ¹è¯ããæ¡åŒµããæ¹æ³ã瀺ããŠããŸãã
== éé² ==
=== ããŒãã·ãŒã ===
:<syntaxhighlight lang=lua>
-- å€æ°ã®å®£èšãšä»£å
¥
local x = 10
local y = "Hello World!"
-- æ¡ä»¶åå²
if x > 5 then
print("x is greater than 5")
elseif x == 5 then
print("x is equal to 5")
else
print("x is less than 5")
end
-- ã«ãŒãåŠç
for i = 1, 10 do
print(i)
end
-- ããŒãã«ã®äœæãšæäœ
local t = {1, 2, 3, 4, 5}
t[6] = 6
table.insert(t, 7)
table.remove(t, 1)
-- é¢æ°ã®å®çŸ©ãšåŒã³åºã
function add(a, b)
return a + b
end
local result = add(3, 5)
print(result) -- 8
-- ãã¡ã€ã«ã®èªã¿èŸŒã¿ãšæžã蟌ã¿
local file = io.open("example.txt", "w")
file:write("Hello World!")
file:close()
local file = io.open("example.txt", "r")
local content = file:read("*all")
print(content) -- Hello World!
file:close()
</syntaxhighlight>
=== ã³ãŒãã®ã£ã©ãªãŒ ===
==== ãšã©ãã¹ããã¹ã®ç¯© ====
:<syntaxhighlight lang=lua>
function eratosthenes(n)
sieve = {}
for i = 1, n do
sieve[i] = true
end
sieve[1] = false
for i = 2, n do
if sieve[i] then
print(i)
for j = i * 2, n, i do
sieve[j] = false
end
end
end
end
eratosthenes(100)
</syntaxhighlight>
ãã®Luaã®ã³ãŒãã¯ããšã©ãã¹ããã¹ã®ç¯©ã䜿ã£ãŠäžãããã <code>n</code> ãŸã§ã®çŽ æ°ãèŠã€ããé¢æ° <code>eratosthenes</code> ãå®çŸ©ããŠããŸãã
* <code>sieve</code> ããŒãã«ã¯ <code>true</code> ã§åæåããã<code>i</code> çªç®ã®èŠçŽ ãçŽ æ°ã§ãããã©ããã瀺ããŸããæåã®ã«ãŒã㧠<code>sieve[1]</code> ã <code>false</code> ã«èšå®ããŠããã®ã¯ã1ã¯çŽ æ°ã§ã¯ãªãããã§ãã
* 次ã®ã«ãŒãã§ã¯ã<code>2</code> ãã <code>n</code> ãŸã§ã®åæ°å€ã«å¯ŸããŠããã®æ°å€ãçŽ æ°ã§ããå Žåã«ä»¥äžã®æäœãè¡ããŸãïŒ
** çŽ æ°ãèŠã€ããå Žåããã®æ°å€ã衚瀺ããŸãïŒ<code>print(i)</code>ïŒã
** ãã®åŸããã®çŽ æ°ã®åæ°ã <code>false</code> ã«èšå®ããŠããŸããäŸãã°ã2ãçŽ æ°ã§ããå Žåã¯ã2ã®åæ°ã§ãã4ã6ã8ã10...ã <code>false</code> ã«ããŠããŸãã
ãã®ããã°ã©ã 㯠<code>eratosthenes(100)</code> ãåŒã³åºãããšã§ã<code>100</code> ãŸã§ã®çŽ æ°ãèŠã€ããŠè¡šç€ºããŸãã
==== æ倧å
¬çŽæ°ãšæå°å
¬åæ° ====
:<syntaxhighlight lang=lua>
function reduce(operation, values)
local result = values[1]
for i = 2, #values do
result = operation(result, values[i])
end
return result
end
function gcd2(m, n)
return n == 0 and m or gcd2(n, m % n)
end
function gcd(...)
local ints = { ... }
if #ints == 0 then
error("List of integers cannot be empty")
end
return reduce(gcd2, ints)
end
function lcm2(m, n)
return m * n / gcd2(m, n)
end
function lcm(...)
local ints = { ... }
if #ints == 0 then
error("List of integers cannot be empty")
end
return reduce(lcm2, ints)
end
print("gcd2(30, 45) =>", gcd2(30, 45))
print("gcd(30, 72, 12) =>", gcd(30, 72, 12))
print("lcm2(30, 72) =>", lcm2(30, 72))
print("lcm(30, 42, 72) =>", lcm(30, 42, 72))
</syntaxhighlight>
; <code>reduce</code> é¢æ°
* <code>reduce</code>é¢æ°ã¯ãæž¡ããã <code>operation</code> é¢æ°ã䜿çšããŠãé
åã®å€ããªãã¯ã·ã§ã³ïŒçž®çŽïŒããŸãã
* é
åã®æåã®èŠçŽ ãåæå€ãšãããã以éã®èŠçŽ ã«å¯Ÿã㊠<code>operation</code> ãç¹°ãè¿ãé©çšããŠæçµçãªçµæãè¿ããŸãã
; <code>gcd2</code> é¢æ°
* <code>gcd2</code>é¢æ°ã¯ããŠãŒã¯ãªããã®äºé€æ³ã䜿çšããŠæŽæ° <code>m</code> ãš <code>n</code> ã®æ倧å
¬çŽæ°ïŒGCDïŒãååž°çã«èšç®ããŸãã
* äžé
æŒç®å <code>n == 0 and m or gcd2(n, m % n)</code> ã䜿çšããŠã<code>n</code> ã 0 ãªãã° <code>m</code> ããããã§ãªããã°ååž°çã« <code>gcd2</code> ãåŒã³åºããŸãã
; <code>gcd</code> é¢æ°
* <code>gcd</code>é¢æ°ã¯ãå¯å€é·åŒæ°ãåãåãããã®æŽæ°ã®æ倧å
¬çŽæ°ïŒGCDïŒãèšç®ããŸãã
* åŒæ°ããªãå Žåã¯ãšã©ãŒãã¹ããŒããŸãã
* <code>reduce(gcd2, ints)</code> ã䜿çšããŠã<code>gcd2</code>ã䜿ã£ãŠå¯å€é·åŒæ°å
ã®åæŽæ°ã«å¯ŸããŠæ倧å
¬çŽæ°ãèšç®ããŸãã
; <code>lcm2</code> é¢æ°
* <code>lcm2</code>é¢æ°ã¯ãæŽæ° <code>m</code> ãš <code>n</code> ã®æå°å
¬åæ°ïŒLCMïŒãèšç®ããŸãã
* <code>m * n / gcd2(m, n)</code> ã䜿çšããŠã<code>m</code> ãš <code>n</code> ã®ç©ãæ倧å
¬çŽæ°ïŒ<code>gcd2</code>ïŒã§å²ã£ãŠLCMãèšç®ããŠããŸãã
; <code>lcm</code> é¢æ°
* <code>lcm</code>é¢æ°ã¯ãå¯å€é·åŒæ°ãåãåãããã®æŽæ°ã®æå°å
¬åæ°ïŒLCMïŒãèšç®ããŸãã
* åŒæ°ããªãå Žåã¯ãšã©ãŒãã¹ããŒããŸãã
* <code>reduce(lcm2, ints)</code> ã䜿çšããŠã<code>lcm2</code>ã䜿ã£ãŠå¯å€é·åŒæ°å
ã®åæŽæ°ã«å¯ŸããŠæå°å
¬åæ°ãèšç®ããŸãã
; ã¡ã€ã³ããã°ã©ã
* ã¡ã€ã³ããã°ã©ã ã§ã¯ãããããã®é¢æ°ãåŒã³åºããŠçµæã衚瀺ããŠããŸãã
==== äºåæ³ ====
[[W:äºåæ³|äºåæ³]]
:<syntaxhighlight lang=lua>
function bisection(low, high, f)
local x = (low + high) / 2
local fx = f(x)
if math.abs(fx) < 1.0e-10 then
return x
end
if fx < 0.0 then
low = x
else
high = x
end
return bisection(low, high, f)
end
local result1 = bisection(0, 3, function(x) return x - 1 end)
print(result1)
local result2 = bisection(0, 3, function(x) return x * x - 1 end)
print(result2)
</syntaxhighlight>
: [[æ§èª²çš(-2012幎床)é«çåŠæ ¡æ°åŠB/æ°å€èšç®ãšã³ã³ãã¥ãŒã¿ãŒ#2åæ³]]ã®äŸã Lua ã«ç§»æ€ããŸããã
ãã®Luaã®ã³ãŒãã¯ãäºåæ³ã䜿ã£ãŠé¢æ°ã®æ ¹ïŒæ¹çšåŒã®è§£ïŒãèŠã€ããããã®é¢æ° <code>bisection</code> ãå®è£
ããŠããŸããããã§ãæž¡ãããé¢æ° <code>f</code> ã¯ãäžããããç¯å² <code>low</code> ãš <code>high</code> ã®éã§è§£ãæ¢çŽ¢ããŸãã絶察å€ãéåžžã«å°ããïŒãã®å Žå㯠<code>1.0e-10</code> ããå°ããïŒå€ãèŠã€ããå Žåããã® <code>x</code> ã®å€ã解ãšããŠè¿ããŸãã
次ã«ãäžãããã2ã€ã®æ¹çšåŒã«å¯Ÿã㊠<code>bisection</code> é¢æ°ã䜿çšããããããã®è§£ãæ±ããŠããŸãã
* <code>result1</code> ã¯ãé¢æ° <code>f(x) = x - 1</code> ã®è§£ãæ±ããŸãã
* <code>result2</code> ã¯ãé¢æ° <code>f(x) = x^2 - 1</code> ã®è§£ãæ±ããŸãã
ããããã®è§£ã <code>print</code> ã䜿ã£ãŠã³ã³ãœãŒã«ã«åºåãããŸãããã®ããã«ã<code>bisection</code> é¢æ°ãçšããŠäžããããé¢æ°ã®æ ¹ãèŠã€ããããšãã§ããŸãã
=== çšèªé ===
# Lua: ã¹ã¯ãªããèšèªã§ãããæ¡åŒµæ§ãé«éæ§ã軜éæ§ãå¯èªæ§ã®é«ããç¹åŸŽã§ããã
# ã°ããŒãã«å€æ°ïŒGlobal variableïŒ: ããã°ã©ã ã®ã©ã®å Žæããã§ãåç
§å¯èœãªå€æ°ã§ãã¹ã¯ãªããã®å®è¡äžã«ã°ããŒãã«ããŒãã«ã«ä¿åãããã
# ããŒã«ã«å€æ°ïŒLocal variableïŒ: 宣èšããããããã¯å
ã§ã®ã¿åç
§å¯èœãªå€æ°ã§ãã¡ã¢ãªã®å¹ççãªäœ¿çšãå¯èœã
# ããŒãã«ïŒTableïŒ: Luaã§äœ¿çšãããåºæ¬çãªããŒã¿æ§é ã§ãé
åãé£æ³é
åãå®çŸããã
# ã¢ãžã¥ãŒã«ïŒModuleïŒ: 1ã€ä»¥äžã®é¢æ°ãå€æ°ãå«ãLuaãã¡ã€ã«ã§ãããé¢é£ããæ©èœãã°ã«ãŒãåããããšãã§ããã
# ã³ã«ãŒãã³ïŒCoroutineïŒ: è€æ°ã®Luaããã°ã©ã ã®å®è¡ãåæã«è¡ãããã«äœ¿çšãããæ©èœã§ãããã°ã©ã ã®å®è¡ãäžæããŠå¥ã®å®è¡ã«åãæ¿ããå¿
èŠãªãšãã«åéããããšãã§ããã
# ã¬ããŒãžã³ã¬ã¯ã·ã§ã³ïŒGarbage collectionïŒ: Luaã«ãããŠãã¡ã¢ãªç®¡çãèªåçã«è¡ãä»çµã¿ã§ãããäžèŠã«ãªã£ããªããžã§ã¯ããèªåçã«è§£æŸããããšãã§ããã
# ã¡ã¿ããŒãã«ïŒMetatableïŒ: ããŒãã«ã®æ¯ãèããã«ã¹ã¿ãã€ãºããããã«äœ¿çšããããç¹å¥ãªããŒãã«ã§ããã
# ã³ã³ãã€ã«ïŒCompileïŒ: ã¹ã¯ãªããèšèªã®ããã°ã©ã ããã€ããªã³ãŒãã«å€æããããšã§ãå®è¡é床ãé«ããããšãã§ããã
# C API: Luaããã°ã©ã ãC/C++ããã°ã©ã ããæäœããããã®APIã§ãããLuaããã°ã©ã ã®å®è¡ãããŒãã«æäœãäŸå€åŠçãªã©ãæäŸããã
[[ã«ããŽãª:Lua|ãã¥ãŒããªã¢ã«]] | 2023-04-19T23:51:51Z | 2024-01-24T10:18:17Z | [
"ãã³ãã¬ãŒã:ã³ã©ã "
] | https://ja.wikibooks.org/wiki/Lua/%E3%83%81%E3%83%A5%E3%83%BC%E3%83%88%E3%83%AA%E3%82%A2%E3%83%AB |
37,599 | æ¥æ¬åœæ²æ³ç¬¬38æ¡ | æ³åŠ>æ²æ³>æ¥æ¬åœæ²æ³>ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³
ãäžå©çäŸè¿°ã®äžåŒ·èŠãèªçœã®èšŒæ èœåã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ²æ³>æ¥æ¬åœæ²æ³>ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ãäžå©çäŸè¿°ã®äžåŒ·èŠãèªçœã®èšŒæ èœåã",
"title": "æ¡æ"
}
] | æ³åŠïŒæ²æ³ïŒæ¥æ¬åœæ²æ³ïŒã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³ | [[æ³åŠ]]ïŒ[[æ²æ³]]ïŒ[[æ¥æ¬åœæ²æ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³]]
{{wikipedia|æ¥æ¬åœæ²æ³ç¬¬38æ¡}}
==æ¡æ==
ãäžå©çäŸè¿°ã®äžåŒ·èŠãèªçœã®èšŒæ èœåã
;第38æ¡
#äœäººããèªå·±ã«äžå©çãªäŸè¿°ã匷èŠãããªãã
#匷å¶ãæ·åè¥ããã¯è
è¿«ã«ããèªçœåã¯äžåœã«é·ãæçè¥ããã¯æçŠãããåŸã®èªçœã¯ãããã蚌æ ãšããããšãã§ããªãã
#äœäººããèªå·±ã«äžå©çãªå¯äžã®èšŒæ ãæ¬äººã®èªçœã§ããå Žåã«ã¯ãæ眪ãšãããåã¯å眰ãç§ããããªãã
==解説==
{{wikipedia|éæ³åé蚌æ æé€æ³å}}
==åç
§æ¡æ==
*[[åäºèšŽèšæ³ç¬¬319æ¡]]
*# 匷å¶ãæ·ååã¯è
è¿«ã«ããèªçœãäžåœã«é·ãæçåã¯æçŠãããåŸã®èªçœãã®ä»ä»»æã«ããããã®ã§ãªãçã®ããèªçœã¯ãããã蚌æ ãšããããšãã§ããªãã
*# 被å人ã¯ãå
¬å€å»·ã«ãããèªçœã§ãããšåŠãšãåããããã®èªçœãèªå·±ã«äžå©çãªå¯äžã®èšŒæ ã§ããå Žåã«ã¯ãæ眪ãšãããªãã
*# åäºé
ã®èªçœã«ã¯ã起蚎ãããç¯çœªã«ã€ããŠæ眪ã§ããããšãèªèªããå Žåãå«ãã
==å€äŸ==
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=55242 çªç]ïŒæé«è£å€æå€æ±ºæå23幎12æ22æ¥ïŒ[[æ¥æ¬åœæ²æ³ç¬¬37æ¡|æ²æ³ç¬¬37æ¡]]
#;被å人ã®å
¬å€å»·ã«ãããèªçœãšæ²æ³ç¬¬38æ¡ç¬¬3é
ã®èªçœ
#:è£å€æã蚌æ ã«åŒçšãã被åã®èªçœãããã®è£å€æã®å
¬å€å»·ã«ãããèªçœã§ãããªãã°ãããã¯æ²æ³ç¬¬38æ¡ç¬¬3é
ã®èªçœã«å«ãŸããªãããšã¯ãåœè£å€æã®å€äŸãšããŠç€ºãããšããã§ããã
#[http://www.courts.go.jp/search/jhsp0030?hanreiid=55357&hanreiKbn=02 匷ç殺人æªéãéç ²çä¿æçŠæ¢ä»€éå](æé«è£å€æ±º æå24幎12æ21æ¥)[[åäºèšŽèšæ³ç¬¬319æ¡]]
#;æ²æ³ç¬¬38æ¡ç¬¬3é
ã«ããããæ¬äººã®èªçœãšå蚎æ³ç¬¬319æ¡ç¬¬2é
ã®æ矩
#:æ²æ³ç¬¬38æ¡ç¬¬3é
ã®æ¬äººã®èªçœã«ã¯å
¬å€å»·ã§ã®èªçœã¯å«ãŸããªããæ°å蚎æ³ãå
¬å€å»·ã§ã®èªçœã被å人ã«äžå©çãªå¯äžã®èšŒæ ã§ããå Žåã«ã¯æ眪ãšãããªãæšã®èŠå®ãæ°èšããããšã¯ãèªçœåéã®åŒå®³ãç¯æ£ã被å人ã®äººæš©ãæè·ããããã®ãã®ã§ãããæ²æ³ã®æ ¹æ¬ç²Ÿç¥ãæ¡å
ãããã®ã§ãããšãããã®èŠå®ã¯æ²æ³ç¬¬38æ¡ç¬¬3é
ã«å¯Ÿãã解éèŠå®ã§ã¯ãªãã
#:*æ²æ³ç¬¬38æ¡ç¬¬3é
ã«æè¬æ¬äººã®èªçœã«ã¯å€æ±ºè£å€æã®å
¬å€å»·ã«ãããèªçœãå«ãŸãªããšè§£ãã¹ãããšã¯ãåœè£å€æã®å€äŸã«ãããŠå±¡å±¡å€ç€ºãããšããã§ãããä»ãã®å€äŸãå€æŽããå¿
èŠãèªããªããæ°å蚎æ³ã第319æ¡ç¬¬2é
ã«ãããŠå
¬å€å»·ã«ãããèªçœã§ãã€ãŠãããã被å人ã«äžå©çãªå¯äžã®èšŒæ ã§ããå Žåã«ã¯ããã«ãã€ãŠæ眪ãšãããªãæšã®èŠå®ãæ°èšããããšã¯æè«ã®ãšããã§ããããããããããèŠå®ãèšããããšã®åœåŠã¯ãã°ãããããæªããšããŠãã®èŠå®ã¯æ²æ³ç¬¬38æ¡ç¬¬3é
ã«å¯Ÿããæè¬è§£éèŠå®ã§ã¯ãªãèªçœåéã®åŒå®³ãç¯æ£ã被å人ã®äººæš©ãæè·ãããšããæ²æ³ã®æ ¹æ¬ç²Ÿç¥ãããã«æ¡å
ãããšå
±ã«æ°å蚎æ³ã®æå°åçããåœäºè
察ç䞻矩ã«ãç«èããŠãèªçœãåœäºè
ã§ãã被å人ã®äŸè¿°ããç¹ãèæ
®ããŠãã®èšŒæ èœåã«ã€ããŠãæ°ããªäžã®å¶éãèšãå
¬å€å»·ã«ãããèªçœã«ãŸã§åãŒãããã®ã«éããªãã®ã§ãããããã¯äžåºŠæ²æ³ç¬¬38æ¡ç¬¬2é
ã«ãããŠã¯ã匷å¶æ·åè¥ããã¯è
è¿«ã«ããèªçœåã¯äžåœã«é·ãæçè¥ããã¯æçŠãããåŸã®èªçœãã«ã€ããŠèšŒæ èœåãå¶éããŠããã®ããæ°å蚎æ³ç¬¬319æ¡ç¬¬1é
ã«ãããŠã¯ããã«æ¡å
ããŠããã®ä»ä»»æã«ããããã®ã§ãªãçãã®ããèªçœãã«ã€ããŠã蚌æ èœåãå¶éããã«è³ã€ãã®ãšåæ§ã§ãããããçã¯äœããæ²æ³ã®åºæ¬ç²Ÿç¥ãæ¡å
ããã®ç·ã«æ²¿ã€ãæ³åŸæ¹æ£ã§ãã€ãŠã毫ãæ²æ³ã®è¶£æšã«èåãããã®ã§ãªããããã®åæ²æ§ãæããããšã¯çã®ãªããšããã§ãããããã°æ²æ³ç¬¬38æ¡ç¬¬3é
ã®åçç解éãšããŠç€ºããå€äŸã®èŠè§£ã¯æ¯«ãæ°å蚎æ³ç¬¬319æ¡ç¬¬2é
ã®èŠå®ãšççŸãããšããã¯ãªãä»åŸãç¶æããã¹ããã®ã§ãããåŸã€ãŠå察ã®èŠå°ã«ç«ã€ãŠå³å€äŸã®å€æŽãæ±ããæè«ã«ã¯è³åããããšã¯ã§ããªãã
#[http://www.courts.go.jp/search/jhsp0030?hanreiid=55300&hanreiKbn=02 åœèšŒã飲é£å¶æ¥ç·æ¥æªçœ®ä»€éå](æé«è£å€æ±º æå27幎11æ05æ¥)
#;蚌èšæ絶暩ãã蚌人ã宣èªãããŠå°åããå Žåãšæ²æ³ç¬¬38æ¡ç¬¬1é
#:æ§å蚎第188æ¡ç¬¬1é
ã«ãããå Žåã蚌人ã¯èšŒèšãæãæš©å©ããããããå³èšŒäººã«å®£èªãããŠå°åãããããšãã€ãŠçŽã¡ã«æ²æ³ç¬¬38æ¡ç¬¬1é
ã«ããèªå·±ã«äžå©çãªäŸè¿°ã匷èŠãããã®ãšããããšã¯ã§ããªãã
#:#æ§å蚎第188æ¡ç¬¬1é
ïŒåæš:çŸè¡[[åäºèšŽèšæ³ç¬¬146æ¡]]ïŒ
#:#:蚌èšãçºãã«å ãèªå·±åã¯èªå·±ãšç¬¬186æ¡ç¬¬1é
ïŒåæš:[[åäºèšŽèšæ³ç¬¬147æ¡]]ïŒã«èŠå®ããé¢ä¿ããè
åäºèšŽè¿œãåããèããããšãã¯èšŒèšãæãããšãåŸ
#[http://www.courts.go.jp/search/jhsp0030?hanreiid=51237&hanreiKbn=02 é»è»é¡èŠèŽæ»ãåœèšŒ]([[w:äžé·¹äºä»¶|äžé·¹äºä»¶]] æé«è£å€æ±º æå30幎06æ22æ¥)[[åæ³ç¬¬126æ¡]]ã[[åæ³ç¬¬127æ¡]]
#:被å人ã®èªçœã«ã€ããŠïœ€å人ãç¯çœªã®å®è¡è
ã§ãããšæšæããã«è¶³ãçŽæ¥ã®è£åŒ·èšŒæ ãæ¬ ããŠããŠããã®ä»ã®ç¹ã«ã€ããŠè£åŒ·èšŒæ ãåãããããšè¢«å人ã®èªçœãšãç¶åããŠç¯çœªäºå®ãèªå®ããã«è¶³ã以äžïœ€æ²æ³ç¬¬38æ¡ç¬¬3é
ã®éåããããšããããšã¯ã§ããªã
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³|æ¥æ¬åœæ²æ³]]
|[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³#3|第3ç« åœæ°ã®æš©å©åã³çŸ©å]]
|[[æ¥æ¬åœæ²æ³ç¬¬37æ¡]]<br>ãåäºè¢«å人ã®è«žæš©å©ã
|[[æ¥æ¬åœæ²æ³ç¬¬39æ¡]]<br>ãé¡ååŠçœ°ã®çŠæ¢ãäºéåŠçœ°ã®çŠæ¢ã
}}
{{stub|law}}
[[category:æ¥æ¬åœæ²æ³|38]] | 2023-04-20T04:08:33Z | 2024-02-07T10:23:03Z | [
"ãã³ãã¬ãŒã:Wikipedia",
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E6%97%A5%E6%9C%AC%E5%9B%BD%E6%86%B2%E6%B3%95%E7%AC%AC38%E6%9D%A1 |
37,600 | æ¥æ¬åœæ²æ³ç¬¬82æ¡ | æ³åŠ>æ²æ³>æ¥æ¬åœæ²æ³>ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³
ãè£å€ã®å
¬éã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ²æ³>æ¥æ¬åœæ²æ³>ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ãè£å€ã®å
¬éã",
"title": "æ¡æ"
}
] | æ³åŠïŒæ²æ³ïŒæ¥æ¬åœæ²æ³ïŒã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³ | [[æ³åŠ]]ïŒ[[æ²æ³]]ïŒ[[æ¥æ¬åœæ²æ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³]]
==æ¡æ==
ãè£å€ã®å
¬éã
;第82æ¡
#è£å€ã®å¯Ÿå¯©åã³å€æ±ºã¯ãå
¬éæ³å»·ã§ãããè¡ãµã
#è£å€æããè£å€å®ã®å
šå¡äžèŽã§ãå
¬ã®ç§©åºåã¯åè¯ã®é¢šä¿ã害ããèããããšæ±ºããå Žåã«ã¯ã察審ã¯ãå
¬éããªãã§ãããè¡ãµããšãã§ãããäœããæ¿æ²»ç¯çœªãåºçã«é¢ããç¯çœªåã¯ãã®æ²æ³ç¬¬äžç« ã§ä¿éããåœæ°ã®æš©å©ãåé¡ãšãªã€ãŠããäºä»¶ã®å¯Ÿå¯©ã¯ãåžžã«ãããå
¬éããªããã°ãªããªãã
==解説==
{{wikipedia}}
==åç
§æ¡æ==
==å€äŸ==
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³|æ¥æ¬åœæ²æ³]]
|[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³#6|第6ç« åžæ³]]
|[[æ¥æ¬åœæ²æ³ç¬¬81æ¡]]<br>ãéæ²å¯©æ»å¶ã
|[[æ¥æ¬åœæ²æ³ç¬¬83æ¡]]<br>ã財æ¿åŠçã®åºæ¬ååã
}}
{{stub|law}}
[[category:æ¥æ¬åœæ²æ³|82]] | 2023-04-20T04:33:08Z | 2023-04-20T04:33:08Z | [
"ãã³ãã¬ãŒã:Wikipedia",
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E6%97%A5%E6%9C%AC%E5%9B%BD%E6%86%B2%E6%B3%95%E7%AC%AC82%E6%9D%A1 |
37,601 | æ¥æ¬åœæ²æ³ç¬¬31æ¡ | æ³åŠ>æ²æ³>æ¥æ¬åœæ²æ³>ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³
ãæ³å®æç¶ã®è£åã
åäºæç¶ã¯æ³å®ã®é©æ£æç¶ã«ããããš(ãã¥ãŒã»ããã»ã¹ã»ãªãã»ããŒ)ãå®ããã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ²æ³>æ¥æ¬åœæ²æ³>ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ãæ³å®æç¶ã®è£åã",
"title": "æ¡æ"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "åäºæç¶ã¯æ³å®ã®é©æ£æç¶ã«ããããš(ãã¥ãŒã»ããã»ã¹ã»ãªãã»ããŒ)ãå®ããã",
"title": "解説"
}
] | æ³åŠïŒæ²æ³ïŒæ¥æ¬åœæ²æ³ïŒã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³ | [[æ³åŠ]]ïŒ[[æ²æ³]]ïŒ[[æ¥æ¬åœæ²æ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³]]
==æ¡æ==
ãæ³å®æç¶ã®è£åã
;第31æ¡
:äœäººããæ³åŸã®å®ããæç¶ã«ãããªããã°ããã®çåœè¥ããã¯èªç±ã奪ã¯ããåã¯ãã®ä»ã®å眰ãç§ããããªãã
==解説==
{{wikipedia}}
{{wikipedia|ãã¥ãŒã»ããã»ã¹ã»ãªãã»ããŒ}}
åäºæç¶ã¯æ³å®ã®é©æ£æç¶ã«ããããšïŒãã¥ãŒã»ããã»ã¹ã»ãªãã»ããŒïŒãå®ããã
===眪åæ³å®äž»çŸ©ã®äžå±é¢ãšããŠã®æ確æ§ã®çè«===
:è¡šçŸã®èªç±ãªã©ç²Ÿç¥çèªç±ãèŠå¶ããç«æ³ã¯æ確ã§ãªããã°ãªããªããšããæ²æ³äžã®èŠè«ïŒéæ²å€æã®åºæºïŒã§ãããæ確æ§ã®åºæºãã眪åæ³å®äž»çŸ©ã®èŠ³ç¹ããå眰æ³èŠã«é©çšããæ³çè«ãæ³æãæŒ ç¶äžæ確ãªæ³ä»€ã¯éæ²ã§ãã£ãŠç¡å¹ã«ãªãïŒæŒ ç¶æ§ããã«ç¡å¹ïŒãæ³æã¯äžå¿æ確ã§ããèŠå¶ã®ç¯å²ãããŸãã«ãåŸåã§éæ²çã«é©çšãããå¯èœæ§ã®ããæ³ä»€ãåæ§ã«éæ²ç¡å¹ãšãããïŒé床ã®åºæ±æ§ããã«ç¡å¹ïŒã
==åç
§æ¡æ==
*[[æ¥æ¬åœæ²æ³ç¬¬39æ¡]]
==å€äŸ==
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=56447 ææ¯é£²é£ç©çåç· ä»€éæ³]ïŒæé«è£å€æ±ºæå23幎11æ17æ¥ïŒ[[æ¥æ¬åœæ²æ³ç¬¬37æ¡|æ²æ³37æ¡]]ïŒ[[æ¥æ¬åœæ²æ³ç¬¬38æ¡|æ²æ³38æ¡]]ïŒ[[æ¥æ¬åœæ²æ³ç¬¬76æ¡|æ²æ³76æ¡]]ïŒè£å€ææ³æœè¡ä»€1æ¡ïŒå蚎å¿æ¥æªçœ®æ³12æ¡1é
ïŒå蚎å¿æ¥æªçœ®æ³12æ¡ïŒå蚎å¿æ¥æªçœ®æ³17æ¡ïŒå蚎å¿æ¥æªçœ®æ³10æ¡ïŒå蚎æ³337æ¡
##'''å€æ±ºã«ãããé©çšæ³èŠã®å称ã®èª€èšãšæ²æ³ç¬¬31æ¡'''
##:ææ¯é£®é£ç©çåç· ä»€ãšããå
什ã¯æå¹ã«å®æœããããŠãããèããŠååã®æ³åŸã¯ååšããŠããªãã®ã§ããããã第äºå¯©å€æ±ºãå³å
什ãæå21幎å
什第52å·ãšè¡šç€ºãã¹ããšããããæå21幎æ³åŸç¬¬52å·ãšèª€ã€ãŠè¡šç€ºããã®ã§ããããšãæããã§ãããèããŠç¬¬äºå¯©è£å€æãå³å
什ã®ç¬¬1æ¡åã³ç¬¬4æ¡ãé©çšããã®ã§ãããããè«æšã®ããã«çœªåæ³å®äž»çŸ©ã®ååã«åãããåŸã€ãŠåå€æ±ºã¯æ²æ³ç¬¬31æ¡ã«éåãããã®ã§ã¯ãªãã
##'''äžå審ã«ãããå蚎å¿æ¥æªçœ®æ³ç¬¬12æ¡ç¬¬1é
äœæžã®é©çšã®æç¡ãšæ²æ³ç¬¬31æ¡'''
##:å蚎å¿æ¥æªçœ®æ³ç¬¬12æ¡ã®èŠå®ã¯è£å€æãäºå®èªå®ãããã«åœã蚌æ ãšããŠæ¡åŠãå®ããåºæºã«é¢ãããã®ã§ãã€ãŠããã®æ§è³ªäžåœç¶äºå®å¯©ã®ã¿ã«é©çšããèŠå®ã§ãããããã°åäžå審ã蚌æ 調ãããªã以äžãæè«ã®ç¬¬12æ¡äœæžãé©çšããªãã€ãã®ã¯èª ã«åœç¶ã§ãã€ãŠãæ²æ³ç¬¬31æ¡éåã®åé¡ãçããªãã
##:*å蚎å¿æ¥æªçœ®æ³12æ¡
##:*#蚌人ãã®ä»ã®è
ïŒè¢«å人ãé€ããïŒã®äŸè¿°ãé²åããæžé¡åã¯ããã«ä»£ããã¹ãæžé¡ã¯ã被å人ã®è«æ±ããããšãã¯ããã®äŸè¿°è
åã¯äœæè
ãå
¬å€ææ¥ã«ãããŠèšåããæ©äŒã被å人ã«äžããªããã°ãããã蚌æ ãšããããšãã§ããªããäœãããã®æ©äŒãäžããããšãã§ãããåã¯èããå°é£ãªå Žåã«ã¯ãè£å€æã¯ãããã®æžé¡ã«ã€ããŠã®å¶éåã³è¢«å人ã®æ²æ³äžã®æš©å©ãé©åœã«èæ
®ããŠãããã蚌æ ãšããããšãã§ããã
##:*#åäºèšŽèšæ³ç¬¬343æ¡(æ§æ³)ã®èŠå®ã¯ããããé©çšããªãã
##'''å
¬å€å»·ã«ãããåŠèªã®äŸè¿°ããã«æãããæ€äºã«å¯Ÿãã被å人ã®è¯å®ã®äŸè¿°ã蚌æ ã«æ¡ãããšã®å¯åŠãšæ²æ³ç¬¬31æ¡'''
##:被å人ã®æ€äºã«å¯Ÿããè¯å®ã®äŸè¿°ãšãå
¬å€å»·ã«ãããåŠèªã®äŸè¿°ãšã¯åå¥åã®äŸè¿°ã§ãã€ãŠãæè«ã®ããã«ãåŠå®ãšããäžåã®è§å¿µãæ§æããäžå¯åã®ãã®ã§ã¯ãªããããè¯å®ã®äŸè¿°ããšãåŠèªã®äŸè¿°ããšããªãã€ããšããŠãéæ³ã§ã¯ãªããåŸã€ãŠæ²æ³ç¬¬31æ¡ã«åãããã®ã§ã¯ãªãã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=71399 èšæç©è³é絊調æŽæ³éå](æé«è£å€æ±º æå26幎2æ27æ¥)[[æ¥æ¬åœæ²æ³ç¬¬73æ¡]]
#;蟲æç什第27å·éåæå®ã®ãâŠèŠåå»æ¢åã«ããè¡çºã«å¯Ÿãã眰åã®é©çšã«ã€ããŠã¯âŠãªãåŸåã®äŸã«ããããšããèŠåã®è¶£æšãšæ²æ³ç¬¬31æ¡ã»ç¬¬73æ¡ç¬¬6å·
#:æè«æå25幎3æ27æ¥èŸ²æç什第27å·éåã®è¶£æšã¯å 工氎ç£ç©é
絊èŠåå»æ¢åã«è¡ãããéåè¡çºã«å¯ŸããŠã¯åèŠåå»æ¢åŸãå»æ¢åã«è¡ãããéåè¡çºã®çœ°åã«é¢ããç¯å²ã«ãããŠã¯ããããå»æ¢ããªã趣æšã§ãã€ãŠãäžæŠå»æ¢ããŠæŽã«çœ°åãèšãããšãã趣æšã§ãªãæ
æè«éæ²è«ã¯åæãæ¬ ãæ¡çšã§ããªãã
#[http://www.courts.go.jp/search/jhsp0030?hanreiid=51500&hanreiKbn=02 匷ç殺人ãæ»äœéºæ£ç](æé«è£å€æ±º æå31幎12æ25æ¥)
#;ç¡ææ²åœ¹åã®åæ²æ§
#:ç¡ææ²åœ¹åã¯[[æ¥æ¬åœæ²æ³ç¬¬13æ¡|æ²æ³ç¬¬13æ¡]]ã»[[æ¥æ¬åœæ²æ³ç¬¬31æ¡|第31æ¡]]ã«éåããªãã
#:*[[åæ³ç¬¬11æ¡#æ»ååæ²å€æ±º|æå23幎æé«è£å€§æ³å»·å€æ±º]]ã«ãããæ»åãããæ®èãªå眰ããšãããŠããªãã®ã§ãããããç¡ææ²åœ¹ãæ®èãªå眰ãšããããšã¯ã§ããªãã
#<span id="倧éªåžæ¡äŸ"></span>[https://www.courts.go.jp/app/hanrei_jp/detail2?id=56974 倧éªåžæ¡äŸç¬¬å
å
«å·éå](æé«è£å€æ±º æå37幎5æ30æ¥)[[æ¥æ¬åœæ²æ³ç¬¬73æ¡]]
##æ²æ³ç¬¬31æ¡ã®è¶£æšâå眰ã¯ãã¹ãŠæ³åŸãã®ãã®ã§å®ããªããã°ãªããªãã
##:æ²æ³31æ¡ã¯ããªããããå眰ããã¹ãŠæ³åŸãã®ãã®ã§å®ããããªããã°ãªããªããšãããã®ã§ãªããæ³åŸã®ææš©ã«ãã€ãŠãã以äžã®æ³ä»€ã«ãã€ãŠå®ããããšãã§ãããšè§£ãã¹ãã§ããã®ããšã¯æ²æ³73æ¡6å·äœæžã«ãã€ãŠãæããã§ããã
##å°æ¹èªæ²»æ³ç¬¬14æ¡ç¬¬5é
ããã³ããã«åºã¥ãæå25幎倧éªåžæ¡äŸç¬¬68å·ç¬¬2æ¡ç¬¬1é
ã®åæ²æ§
##:å°æ¹èªæ²»æ³ç¬¬14æ¡ç¬¬5é
ããã³ããã«åºã¥ãæå25幎倧éªåžæ¡äŸç¬¬68å·ãè¡è·¯çã«ããã売æ¥å§èªè¡çºçã®åç· æ¡äŸã第2æ¡ç¬¬1é
ã¯ãæ²æ³ç¬¬31æ¡ã«éåããªãã
##:*æ³åŸã®ææš©ãäžç¹å®ãªäžè¬çã®çœçŽå§ä»»çãªãã®ã§ãã€ãŠã¯ãªããªããããããã®äºé
ãæ§å°æ¹èªæ²»æ³ç¬¬2æ¡ç¬¬3é
第7å·çã«èŠå®ããäºé
ãã¯çžåœã«å
·äœçãªå
容ã®ãã®ã§ããããåæ³14æ¡5é
ãçŸ[[å°æ¹èªæ²»æ³ç¬¬14æ¡]]第3é
çžåœãã«ãã眰åã®ç¯å²ãéå®ãããŠãããããããæ¡äŸã¯ãæ³åŸä»¥äžã®æ³ä»€ãšãã€ãŠããäžè¿°ã®ããã«ãå
¬éžã®è°å¡ããã€ãŠçµç¹ããå°æ¹å
Œ
±å£äœã®è°äŒã®è°æ±ºãçµãŠå¶å®ãããèªæ²»ç«æ³ã§ãã€ãŠãè¡æ¿åºã®å¶å®ããåœä»€çãšã¯æ§è³ªãç°ã«ãããããåœæ°ã®å
¬éžããè°å¡ããã€ãŠçµç¹ããåœäŒã®è°æ±ºãçµãŠå¶å®ãããæ³åŸã«é¡ãããã®ã§ãããããæ¡äŸã«ãã€ãŠå眰ãå®ããå Žåã«ã¯ãæ³åŸã®ææš©ãçžåœãªçšåºŠã«å
·äœçã§ãããéå®ãããŠããã°ããããšè§£ããã®ãæ£åœã§ãããå°æ¹èªæ²»æ³2æ¡3é
7å·åã³1å·ã®ããã«'''çžåœã«å
·äœçãªå
容ã®äºé
ã«ã€ã'''ãåæ³14æ¡5é
ã®ããã«'''éå®ãããå眰ã®ç¯å²å
ã«ãããŠãæ¡äŸããã€ãŠçœ°åãå®ããããšãã§ãããšããã®ã¯ãæ²æ³31æ¡ã®æå³ã«ãããŠæ³åŸã®å®ããæç¶ã«ãã€ãŠå眰ãç§ãããã®ãšããããšãã§ãã'''ã®ã§ãã€ãŠãåæ¡ã«éåãããšã¯ãããªãã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=69591 é路亀éæ³éå](æé«è£å€æ±º æå39幎9æ18æ¥)[[æ¥æ¬åœæ²æ³ç¬¬73æ¡]]
#;ç¯çœªã®æ§æèŠä»¶ã¯ãã¹ãŠæ³åŸãã®ãã®ã§å®ããããªããã°ãªããªããã
#:ç¯çœªã®æ§æèŠä»¶ã¯ããã¹ãŠæ³åŸãã®ãã®ã§å®ããããªããã°ãªããªããã®ã§ã¯ãªããæ³åŸã®ææš©ã«ãã€ãŠããã®äžéšãå
¬å®å§å¡äŒèŠåã«ãã€ãŠå®ããããšãã§ããããšã¯ãåœè£å€æã®å€äŸïŒæå27幎ïŒãïŒç¬¬4533å·å33幎7æ9æ¥å€§æ³å»·å€æ±ºãåé12å·»11å·2407é ã»[[#倧éªåžæ¡äŸ|æå31幎ïŒãïŒç¬¬4289å·å37幎5æ30æ¥å€§æ³å»·å€æ±ºãè£å€é142å·»847é ]]ïŒã®è¶£æšãšãããšããã§ããã
#[[w:第äžè
ææç©æ²¡åäºä»¶|第äžè
ææç©æ²¡åäºä»¶]]ïŒæé«è£å€§æ³å»·å€æ±º æå37幎11æ28æ¥ 2件ïŒ[[æ¥æ¬åœæ²æ³ç¬¬29æ¡]]ã
#*[https://www.courts.go.jp/app/hanrei_jp/detail2?id=56954 é¢çšæ³éå](åéã第16å·»11å·1593é ) æ§é¢çšæ³ïŒæå29幎æ³åŸç¬¬61å·ã«ããæ¹æ£åã®é¢çšæ³ããããïŒç¬¬83æ¡ç¬¬1é
#*[https://www.courts.go.jp/app/hanrei_jp/detail2?id=56959 é¢çšæ³éå](åéã第16å·»11å·1577é ) é¢çšæ³ç¬¬118æ¡ç¬¬1é
##'''æ§é¢çšæ³ç¬¬83æ¡ç¬¬1é
/é¢çšæ³ç¬¬118æ¡ç¬¬1é
ã«ãã第äžè
ã®ææç©ã没åããããšã¯ããæ²æ³ç¬¬31æ¡ã第29æ¡ã«éåããã'''
##:æ§é¢çšæ³ç¬¬83æ¡ç¬¬1é
/é¢çšæ³ç¬¬118æ¡ç¬¬1é
ã®èŠå®ã«ãã第äžè
ã®ææç©ã没åããããšã¯ãæ²æ³ç¬¬31æ¡ã第29æ¡ã«éåããã
##:*第äžè
ã®ææç©ã没åããå Žåã«ãããŠããã®æ²¡åã«é¢ããŠåœè©²ææè
ã«å¯Ÿããäœãåç¥ãåŒè§£ãé²çŠŠã®æ©äŒãäžããããšãªãããã®æææš©ã奪ãããšã¯ãèããäžåçã§ãã€ãŠãæ²æ³ã®å®¹èªããªããšããã§ããã
##'''第äžè
ææç©ã®æ²¡åã®éæ²ãçç±ãšããŠäžåããããšãã§ããã'''
##:åé
ã®å Žåã没åã«èšæž¡ãåãã被å人ã¯ãããšã第äžè
ã®ææç©ã«é¢ããå Žåã§ãã€ãŠãããããéæ²ã§ãããšããŠäžåãããããšãã§ããã
##:*ããã没åã®èšæž¡ãåãã被å人ã¯ãããšã第äžè
ã®ææç©ã«é¢ããå Žåã§ãã€ãŠãã被å人ã«å¯Ÿããéå åã§ãã以äžã没åã®è£å€ã®éæ²ãçç±ãšããŠäžåããªãããããšã¯ãåœç¶ã§ãããã®ã¿ãªããã被å人ãšããŠã没åã«ä¿ãç©ã®å ææš©ãå¥å¥ªããããŸãã¯ããã䜿çšãåçããªãããªãç¶æ
ã«ããããæŽã«ã¯æææš©ãå¥å¥ªããã第äžè
ããè³ åè«æ±æš©çãè¡äœ¿ãããå±éºã«æãããçãå©å®³é¢ä¿ãæããããšãæããã§ãããããäžåã«ãããããææžãæ±ããããšãã§ãããã®ãšè§£ãã¹ãã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=50906 è·æ¥å®å®æ³éå]([[w:å
šèŸ²æèŠè·æ³äºä»¶|å
šèŸ²æèŠè·æ³äºä»¶]] æé«è£å€æ±º æå48幎4æ25æ¥ åé12å·»7å·1351é )[[æ¥æ¬åœæ²æ³ç¬¬28æ¡|æ²æ³28æ¡]]ã[[æ¥æ¬åœæ²æ³ç¬¬18æ¡|æ²æ³18æ¡]]ã[[æ¥æ¬åœæ²æ³ç¬¬21æ¡|æ²æ³21æ¡]]ãåœå®¶å
¬åå¡æ³ïŒæå40幎æ³åŸç¬¬69å·ã«ããæ¹æ£åã®ãã®ïŒ98æ¡5é
ã110æ¡1é
17å·
##åœå®¶å
¬åå¡æ³98æ¡5é
ã110æ¡1é
17å·ã®åæ²æ§
##:åœå®¶å
¬åå¡æ³98æ¡5é
ã110æ¡1é
17å·ã¯æ²æ³28æ¡ã«ãåœå®¶å
¬åå¡æ³110æ¡1é
17å·ã¯æ²æ³18æ¡ã21æ¡ã31æ¡ã«éåããªãã
##åœå®¶å
¬åå¡æ³110æ¡1é
17å·ã«ãããããããããã³ãäŒãŠãã®æ矩
##:åœå®¶å
¬åå¡æ³110æ¡1é
17å·ã«ããããããããšã¯ãåæ³98æ¡5é
å段ã«èŠå®ããéæ³è¡çºãå®è¡ãããç®çããã€ãŠãä»äººã«å¯Ÿãããã®è¡çºãå®è¡ãã決æãçãããããããªããŸãã¯ããã§ã«çããŠãã決æãå©é·ããããããªå¢ãã®ããåºæ¿ãäžããããšãããããäŒãŠããšã¯ãå³éæ³è¡çºãå
±è¬ããããã®ããããŸãã¯ããããè¡çºã®éè¡ãèšç»æºåããããšã§ãã€ãŠãéæ³è¡çºçºçã®å±éºæ§ãå
·äœçã«çãããšèªãããç¶æ
ã«éãããã®ãããã
##åœå®¶å
¬åå¡æ³98æ¡5é
ã110æ¡1é
17å·ã®æ³æ
##:åœå®¶å
¬åå¡æ³98æ¡5é
ã110æ¡1é
17å·ã¯ãå
¬åå¡ã®äºè°è¡çºã®ãã¡åæ³ã«ãã€ãŠéæ³ãšããããã®ãšãããªããã®ãšãåºå¥ããããã«éæ³ãšãããäºè°è¡çºã«ã€ããŠãéæ³æ§ã®åŒ·ããã®ãšåŒ±ããã®ãšãåºå¥ãããããåäºå¶è£ãç§ããã®ã¯ãã®ãã¡éæ³æ§ã®åŒ·ãäºè°è¡çºã«éããã®ãšãããããã¯ããããè¡çºçã«ã€ããäºè°è¡çºã®äŒç»ãå
±è¬ã説åŸãæ
«æ
ãæ什çãäºè°è¡çºã«ããããéåžžé䌎ãããã®ãšããŠäºè°è¡çºèªäœãšåäžèŠãããããåäºå¶è£ã®å¯Ÿè±¡ããé€ããã®ãšãã趣æšã§ã¯ãªãã
##æ¿æ²»çç®çã®ããã®äºè°è¡çºãšæ²æ³28æ¡
##:ç§äŒæ¥ã®åŽåè
ã§ãããšãå
¬åå¡ãå«ããã®ä»ã®å€åŽè
ã§ãããšãåããã䜿çšè
ã«å¯Ÿããçµæžçå°äœã®åäžã®èŠè«ãšã¯çŽæ¥é¢ä¿ã®ãªãèŠå¯å®è·åå·è¡æ³ã®æ¹æ£ã«å¯Ÿããå察ã®ãããªæ¿æ²»çç®çã®ããã«äºè°è¡çºãè¡ãªãããšã¯ãæ²æ³28æ¡ãšã¯ç¡é¢ä¿ãªãã®ã§ããã
#<span id="埳島åžå
¬å®æ¡äŸ"></span>[https://www.courts.go.jp/app/hanrei_jp/detail2?id=51070 éå£è¡é²åã³éå£ç€ºåšéåã«é¢ãã埳島åžæ¡äŸéåãé路亀éæ³éå]([[w:埳島åžå
¬å®æ¡äŸäºä»¶|埳島åžå
¬å®æ¡äŸäºä»¶]] æé«è£å€æ±º æå50幎9æ10æ¥) æå27幎埳島åžæ¡äŸ3å·ïŒéå£è¡é²åã³éå£ç€ºåšéåã«é¢ããæ¡äŸ ;以äžãéå£è¡é²çã«é¢ãã埳島çæ¡äŸããšèšãïŒ3æ¡3å·ïŒéå£è¡é²çã«é¢ãã埳島çæ¡äŸ5æ¡, [[é路亀éæ³ç¬¬77æ¡|é路亀éæ³77æ¡]]1é
4å·ïŒé路亀éæ³77æ¡3é
ïŒ[[é路亀éæ³ç¬¬119æ¡|é路亀éæ³119æ¡]]1é
13å·ïŒåŸ³å³¶çé路亀éæœè¡çŽ°åïŒæå47幎埳島çå
¬å®å§å¡äŒèŠå1å·ã«ããæ¹æ£åã®ãã®ïŒ11æ¡3å·ïŒ
#:'''æ³åŸãšæ¡äŸã®é¢ä¿''':[[æ¥æ¬åœæ²æ³ç¬¬94æ¡#埳島åžå
¬å®æ¡äŸ|æ²æ³94æ¡]]ïŒ'''眪æ°''':[[åæ³ç¬¬54æ¡#埳島åžå
¬å®æ¡äŸ|åæ³54æ¡]]1é
å段
##'''å眰æ³èŠããããŸãäžæ確ã®ããã«æ²æ³31æ¡ã«éåãããã©ããã®å€æåºæº'''
##:å眰æ³èŠããããŸãäžæ確ã®ããã«æ²æ³31æ¡ã«éåãããã©ããã¯ãéåžžã®å€æèœåãæããäžè¬äººã®ç解ã«ãããŠãå
·äœçå Žåã«åœè©²è¡çºããã®é©çšãåãããã®ãã©ããã®å€æãå¯èœãªãããããããªåºæºãèªã¿ãšãããã©ããã«ãã£ãŠããã決å®ãã¹ãã§ãããïŒãé床ã®åºæ±æ§ããã«ç¡å¹ãã®çè«ïŒ
##'''éå£è¡é²çã«é¢ãã埳島çæ¡äŸ3æ¡3å·ã®ã亀é秩åºãç¶æããããšãã®æ矩ãšãã®ç¯çœªæ§æèŠä»¶ãšããŠã®æ確æ§'''
##:éå£è¡é²çã«é¢ãã埳島çæ¡äŸ3æ¡3å·ããéå£è¡é²çã«ã€ããŠã®éµå®äºé
ã®äžãšããŠã亀é秩åºãç¶æããããšããæ²ããŠããã®ã¯ãéè·¯ã«ãããéå£è¡é²çãäžè¬çã«ç§©åºæ£ããå¹³ç©ã«è¡ãããå Žåã«ããã«é䌎ãã亀é秩åºé»å®³ã®çšåºŠãè¶
ãããæ®æŽãªäº€é秩åºã®é»å®³ããããããããªè¡çºãé¿æ¢ãã¹ãããšãåœããŠãããã®ãšè§£ããããã®ããã«è§£éããå Žåãå³èŠå®ã¯å³æ¡äŸ5æ¡ã®ç¯çœªæ§æèŠä»¶ã®å
容ããªããã®ãšããŠæ²æ³31æ¡ã«éåãããããªäžæ確æ§ãæãããã®ã§ã¯ãªãã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=60306 çŸäœå»ºé ç©çæŸç«æªéãç«çã³ã䜿çšçã®åŠçœ°ã«é¢ããæ³åŸéåãå·å®³ãççºç©åç· çœ°åéåãéçŸäœå»ºé ç©çæŸç«](æé«è£å€æ±º æå53幎10æ20æ¥)
#;ççºç©åç· çœ°åã«é¢ããéæ²äž»åŒµãææ¥ãããäºäŸ
#:æè«ã¯ãæ²æ³31æ¡ã59æ¡1é
ã73æ¡6é
ã98æ¡1é
éåãããããççºç©åç· çœ°åãçŸè¡æ²æ³æœè¡åŸã®ä»æ¥ã«ãããŠããªãæ³åŸãšããŠã®å¹åãä¿æããŠãããã®ã§ããããšã¯ãåœè£å€æã®å€äŸãšãããšããã§ããïŒæå23幎ïŒãïŒç¬¬1140å·å24幎4æ6æ¥å€§æ³å»·å€æ±ºã»åé3å·»4å·456é ãæå32幎ïŒãïŒç¬¬309å·å34幎7æ3æ¥ç¬¬äºå°æ³å»·å€æ±ºã»åé13å·»7å·1075é ãæå46幎ïŒãïŒç¬¬2179å·å47幎3æ9æ¥ç¬¬äžå°æ³å»·å€æ±ºã»åé26å·»2å·151é åç
§ïŒãæè«ã¯çç±ããªãã
#[http://www.courts.go.jp/search/jhsp0030?hanreiid=51193&hanreiKbn=02 ç§çç¬å ã®çŠæ¢åã³å
¬æ£ååŒã®ç¢ºä¿ã«é¢ããæ³åŸéå]('''[[ç§çç¬å ã®çŠæ¢åã³å
¬æ£ååŒã®ç¢ºä¿ã«é¢ããæ³åŸç¬¬3æ¡#ç³æ²¹äŸ¡æ Œã«ã«ãã«|ç³æ²¹äŸ¡æ Œã«ã«ãã«åäºäºä»¶]]''' ãæé«è£å€äŸ æå59幎02æ24æ¥)
#;ç¬çŠæ³85æ¡3å·ã®èŠå®ãšæ²æ³14æ¡1é
ã31æ¡ã32æ¡
#:ç¬çŠæ³89æ¡ãã91æ¡ãŸã§ã®çœªã«ä¿ã蚎èšã«ã€ãäºå¯©å¶ãå®ãã[[ç§çç¬å ã®çŠæ¢åã³å
¬æ£ååŒã®ç¢ºä¿ã«é¢ããæ³åŸç¬¬85æ¡|åæ³85æ¡]]3å·ã®èŠå®ã¯ãæ²æ³14æ¡1é
ã31æ¡ã32æ¡ã«éåããªãã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=50269 çŠå²¡çéå°å¹Žä¿è·è²ææ¡äŸéå](æé«è£å€æ±º æå60幎10æ23æ¥)
#::*æ¬æ¡äŸã¯ãéå°å¹Žã®å¥å
šãªè²æãå³ãããéå°å¹Žãä¿è·ããããšãç®çãšããŠå®ãããïŒ1æ¡1é
ïŒãä»ã®æ³ä»€ã«ããæ幎è
ãšåäžã®èœåãæããè
ãé€ããå°åŠæ ¡å°±åŠã®å§æããæº18æ³ã«éãããŸã§ã®è
ãéå°å¹Žãšå®çŸ©ããïŒ3æ¡1é
ïŒäžã§ããäœäººããéå°å¹Žã«å¯Ÿããæ·«è¡åã¯ãããã€ã®è¡çºãããŠã¯ãªããªãããïŒ10æ¡1é
ïŒãšèŠå®ãããã®éåè
ã«å¯ŸããŠã¯2幎以äžã®æ²åœ¹åã¯10äžå以äžã®çœ°éãç§ãïŒ16æ¡1é
ïŒãéåè
ãéå°å¹Žã§ãããšãã¯ãããã«å¯ŸããŠçœ°åãé©çšããªãïŒ17æ¡ïŒããšãšããŠããã
#::*ïŒåèïŒ
#::*:[[å
ç«¥çŠç¥æ³ç¬¬34æ¡]]第1é
ãäœäººãã次ã«æ²ããè¡çºãããŠã¯ãªããªããã第6å·ãå
ç«¥ã«æ·«è¡ããããè¡çºã
#::*:[[å
ç«¥çŠç¥æ³ç¬¬60æ¡]]第1é
ã第34æ¡ç¬¬1é
第6å·ã®èŠå®ã«éåããè
ã¯ã10幎以äžã®æ²åœ¹è¥ããã¯300äžå以äžã®çœ°éã«åŠããåã¯ããã䜵ç§ãããã
##'''çŠå²¡çéå°å¹Žä¿è·è²ææ¡äŸ10æ¡1é
ã16æ¡1é
ã®èŠå®ãšæ²æ³31æ¡'''
##:18æ³æªæºã®éå°å¹Žã«å¯Ÿãããæ·«è¡ããçŠæ¢åŠçœ°ããçŠå²¡çéå°å¹Žä¿è·è²ææ¡äŸ10æ¡1é
ã16æ¡1é
ã®èŠå®ã¯ãæ²æ³31æ¡ã«éåããªãã
##:*以äžã®2.ã«ç€ºã解蚳ã¯éåžžã®å€æèœåãæããäžè¬äººã®ç解ã«ãé©ããã®ã§ããããæ·«è¡ãã®æ矩ã以äžã®ããã«è§£éãããšãã¯ãåèŠå®ã«ã€ãåŠçœ°ã®ç¯å²ãäžåœã«åºéãããšãäžæ確ã§ãããšããããªããããæ¬ä»¶åèŠå®ãæ²æ³31æ¡ã®èŠå®ã«éåãããã®ãšã¯ãããªãã
##'''çŠå²¡çéå°å¹Žä¿è·è²ææ¡äŸ10æ¡1é
ã®èŠå®ã«ãããæ·«è¡ãã®æ矩'''
##:çŠå²¡çéå°å¹Žä¿è·è²ææ¡äŸ10æ¡1é
ã®èŠå®ã«ãããæ·«è¡ããšã¯ãåºãéå°å¹Žã«å¯Ÿããæ§è¡çºäžè¬ããããã®ãšè§£ãã¹ãã§ã¯ãªããéå°å¹Žãèªæããåšè¿«ãã欺çœãåã¯å°æãããçãã®å¿èº«ã®æªæçã«ä¹ããäžåœãªæ段ã«ããè¡ãæ§äº€åã¯æ§äº€é¡äŒŒè¡çºã®ã»ããéå°å¹Žãåã«èªå·±ã®æ§ç欲æãæºè¶³ãããããã®å¯Ÿè±¡ãšããŠæ±ã€ãŠãããšããèªããããªããããªæ§äº€åã¯æ§äº€é¡äŒŒè¡çºããããã®ãšè§£ãã¹ãã§ããã
##:*ãæ·«è¡ããåºãéå°å¹Žã«å¯Ÿããæ§è¡çºäžè¬ãæããã®ãšè§£ãããšãã¯ããæ·«ããªãæ§è¡çºãæããæ·«è¡ãã®çšèªèªäœã®æ矩ã«æ·»ããªãã°ããã§ãªããäŸãã°å©çŽäžã®éå°å¹Žåã¯ããã«æºããçæ¯ãªäº€éé¢ä¿ã«ããéå°å¹Žãšã®éã§è¡ãããæ§è¡çºçã瀟äŒé念äžãããåŠçœ°ã®å¯Ÿè±¡ãšããŠèãé£ããã®ããå«ãããšãšãªã€ãŠããã®è§£éã¯åºãã«å€±ããããšãæããã§ããããŸãããæ·«è¡ããç®ããŠåã«åå«ççãããã¯äžçŽãªæ§è¡çºãšè§£ããã®ã§ã¯ãç¯çœªã®æ§æèŠä»¶ãšããŠäžæ確ã§ãããšã®æ¹å€ãå
ããªãã®ã§ãã€ãŠãåèšã®èŠå®ã®æçããåççã«å°ãåºããåŸã解éã®ç¯å²å
ã§ãååã®ããã«éå®ããŠè§£ããã®ãçžåœãšããã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=85518 匷ç殺人被åäºä»¶](æé«è£å€æ±º å¹³æ27幎12æ3æ¥)[[æ¥æ¬åœæ²æ³ç¬¬39æ¡]], [[åäºèšŽèšæ³ç¬¬250æ¡|å蚎æ³250æ¡]]1é
#;å
¬èšŽæå¹ãå»æ¢ãããªã©ãããåæ³åã³åäºèšŽèšæ³ã®äžéšãæ¹æ£ããæ³åŸãïŒå¹³æ22幎æ³åŸç¬¬26å·ïŒã®çµéæªçœ®ãå®ããåæ³éå3æ¡2é
ãšæ²æ³39æ¡ïŒ31æ¡
#:å
¬èšŽæå¹ãå»æ¢ãããªã©ãããåæ³åã³åäºèšŽèšæ³ã®äžéšãæ¹æ£ããæ³åŸãïŒå¹³æ22幎æ³åŸç¬¬26å·ïŒã®çµéæªçœ®ãšããŠïŒåæ¹æ£æ³åŸæœè¡ã®éå
¬èšŽæå¹ãå®æããŠããªã眪ã«ã€ããŠæ¹æ£åŸã®å蚎æ³250æ¡1é
ãé©çšããæšãå®ããåæ¹æ£æ³åŸéå3æ¡2é
ã¯ïŒæ²æ³39æ¡ïŒ31æ¡ã«éåããïŒãããã®è¶£æšã«ãåããªãã
#:*å
¬èšŽæå¹å¶åºŠã®è¶£æšã¯ïŒæã®çµéã«å¿ããŠå
¬èšŽæš©ãå¶éãã蚎èšæ³èŠãéããŠåŠçœ°ã®å¿
èŠæ§ãšæ³çå®å®æ§ã®èª¿åãå³ãããšã«ãããæ¬æ³ã¯ïŒãã®è¶£æšãå®çŸããããïŒäººãæ»äº¡ããã眪ã§ãã£ãŠïŒæ»åã«åœãããã®ã«ã€ããŠå
¬èšŽæå¹ãå»æ¢ãïŒæ²åœ¹åã¯çŠé®ã®åã«åœãããã®ã«ã€ããŠå
¬èšŽæå¹æéã延é·ããã«ãããïŒè¡çºæç¹ã«ãããéæ³æ§ã®è©äŸ¡ã責任ã®éããé¡ã£ãŠå€æŽãããã®ã§ã¯ãªãããããŠïŒæ¬æ³éåïŒæ¡ïŒé
ã¯ïŒæ¬æ³æœè¡ã®éå
¬èšŽæå¹ãå®æããŠããªã眪ã«ã€ããŠæ¬æ³ã«ããæ¹æ£åŸã®å蚎æ³250æ¡1é
ãé©çšãããšãããã®ã§ããããïŒè¢«çè
ã»è¢«å人ãšãªãåŸãè
ã«ã€ãæ¢ã«çããŠããæ³åŸäžã®å°äœãèããäžå®å®ã«ãããããªãã®ã§ããªãã
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³|æ¥æ¬åœæ²æ³]]
|[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³#3|第3ç« åœæ°ã®æš©å©åã³çŸ©å]]
|[[æ¥æ¬åœæ²æ³ç¬¬30æ¡]]<br>ãçŽçšã®çŸ©åã
|[[æ¥æ¬åœæ²æ³ç¬¬32æ¡]]<br>ãè£å€ãåããæš©å©ã
}}
{{stub|law}}
[[category:æ¥æ¬åœæ²æ³|31]] | 2023-04-20T04:43:21Z | 2024-03-23T09:35:21Z | [
"ãã³ãã¬ãŒã:Wikipedia",
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E6%97%A5%E6%9C%AC%E5%9B%BD%E6%86%B2%E6%B3%95%E7%AC%AC31%E6%9D%A1 |
37,606 | æ¥æ¬åœæ²æ³ç¬¬28æ¡ | æ³åŠ>æ²æ³>æ¥æ¬åœæ²æ³>ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³
ãåŽååºæ¬æš©ã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ²æ³>æ¥æ¬åœæ²æ³>ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ãåŽååºæ¬æš©ã",
"title": "æ¡æ"
}
] | æ³åŠïŒæ²æ³ïŒæ¥æ¬åœæ²æ³ïŒã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³ | [[æ³åŠ]]ïŒ[[æ²æ³]]ïŒ[[æ¥æ¬åœæ²æ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³]]
==æ¡æ==
ãåŽååºæ¬æš©ã
;第28æ¡
:å€åŽè
ã®å£çµããæš©å©åã³å£äœäº€æžãã®ä»ã®å£äœè¡åãããæš©å©ã¯ããããä¿éããã
==解説==
{{wikipedia}}
==åç
§æ¡æ==
==å€äŸ==
#<span id="æå24幎5æ18æ¥å€§æ³å»·å€æ±º"/>[https://www.courts.go.jp/app/hanrei_jp/detail2?id=55221 è
è¿«](æé«è£å€æ±º æå24幎5æ18æ¥)[[åæ³ç¬¬37æ¡|åæ³37æ¡]]ïŒ[[åæ³ç¬¬35æ¡|åæ³35æ¡]]ïŒ[[åæ³ç¬¬38æ¡|åæ³38æ¡]]1é
ïŒ[[åŽåçµåæ³ç¬¬1æ¡|åŽåçµåæ³1æ¡]]2é
#;æ²æ³ç¬¬28æ¡ã«ããããå£çµæš©ã®æ矩ãšå€§è¡éåã®åæ³æ§ã®éç
#:æ²æ³ç¬¬28æ¡ã¯ãã®è¶£æšã«ãããŠãäŒæ¥è
察å€åŽè
ããªãã¡äœ¿çšè
察被çšè
ãšãããããªé¢ä¿ã«ç«ã€ãã®ã®éã«ãããŠãçµæžäžã®åŒ±è
ã§ããå€åŽè
ã®ããã«å£çµæš©ä¹è³å£äœè¡åæš©ãä¿éãããã®ã«å€ãªããªãããæ
ããã®å£çµæš©ã«é¢ããæ²æ³ã®ä¿éãå€åŽè
以å€ã®å£äœåã¯å人ã®åãªãéåã«éããªããã®ã«å¯ŸããŠãŸã§æ¡åŒµãããšããè«æšã®èŠè§£ã«ã¯ã«ããã«è³åããããšã¯ã§ããªãã®ã§ãããããšãäžè¬æ°è¡ãæ³èŠãã®ä»å
¬åºè¯ä¿ã«åããªãé床ã«ãããŠãæè¬å€§è¡éåãªããã®ãè¡ãåŸã¹ãããšã¯ãäœäººãç°è«ã®ãªããšããã§ãããããã©ããã®å€§è¡éåãªãã®äžäºããèãããã®éåã«é¢ããè¡ç²ã§ããéãåžžã«ãããæ£åœè¡çºãªããšããŠåæ³ç¬¬35æ¡ã«åŸãå眰æ³ä»€ã®é©çšãæé€ãã¹ãã§ãããšçµè«ããããšã¯ã§ããªãã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=54342 建é ç©äŸµå
¥](æé«è£å€æ±º æå25幎9æ27æ¥)[[æ¥æ¬åœæ²æ³ç¬¬37æ¡|æ²æ³37æ¡]]3é
ïŒ[[åæ³ç¬¬130æ¡|åæ³130æ¡]]ïŒ[[åæ³ç¬¬35æ¡|åæ³35æ¡]]ïŒ[[åæ³ç¬¬36æ¡|åæ³36æ¡]]ïŒ[[åæ³ç¬¬37æ¡|åæ³37æ¡]]ïŒæ§å蚎æ³69æ¡1é
#;æ²æ³ç¬¬28æ¡ã«ãããããä¿éãã¯å€åŽè
以å€ã®å£äœåã¯å人ã®åãªãéåã«åã¶ã
#:æ²æ³ç¬¬28æ¡ã®ä¿éã¯ãå€åŽè
以å€ã®å£äœåã¯å人ã®åãªãéåã«éããªããã®ã®è¡åã«å¯ŸããŠãŸã§åãŒããã®ã§ã¯ãªããïŒ[[#æå24幎5æ18æ¥å€§æ³å»·å€æ±º|æå22幎ïŒãïŒç¬¬319å·æå24幎5æ18æ¥å€§æ³å»·å€æ±º]]åç
§ïŒ
#[http://www.courts.go.jp/search/jhsp0030?hanreiid=55588&hanreiKbn=02 æŽåè¡çºçåŠçœ°ã«é¢ããæ³ç¬¬åŸéåã»æ¥å劚害ã建é ç©äŸµå
¥ãçªç](æé«è£å€æ±º æå26幎07æ18æ¥)
#;æŽåè¡çºãçåŠçœ°ã«é¢ããæ³åŸç¬¬1æ¡ç¬¬1é
ã®åæ²æ§
#:[[æŽåè¡çºçåŠçœ°ã«é¢ããæ³åŸç¬¬1æ¡]]第1é
ã®èŠå®ã¯ã[[æ²æ³ç¬¬28æ¡]],[[æ²æ³ç¬¬98æ¡]]ã«éåããªãã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=50540 è·æ¥å®å®æ³éå](æé«è£å€æ±º æå33幎5æ6æ¥ åé12å·»7å·1351é )[[æ¥æ¬åœæ²æ³ç¬¬11æ¡|æ²æ³11æ¡]]ã[[æ¥æ¬åœæ²æ³ç¬¬18æ¡|æ²æ³18æ¡]]ã[[åæ³ç¬¬18æ¡]]
#;åæ³ç¬¬18æ¡ã¯ãæ²æ³ç¬¬11æ¡ã第13æ¡ã第18æ¡ã«éåããã
#:åæ³ç¬¬18æ¡ã¯ãæ²æ³ç¬¬11æ¡ã第13æ¡ã第18æ¡ã«éåããªãã
#[http://www.courts.go.jp/search/jhsp0030?hanreiid=51237&hanreiKbn=02 é»è»é¡èŠèŽæ»ãåœèšŒ]([[w:äžé·¹äºä»¶|äžé·¹äºä»¶]] æé«è£å€æ±º æå30幎06æ22æ¥)[[åæ³ç¬¬126æ¡]]ã[[åæ³ç¬¬127æ¡]]
#:æ¥æ¬åœæééè·å¡ãå
Œ
±äŒæ¥äœåŽåé¢ä¿æ³ç¬¬17æ¡ã«ããäºè°è¡çºãçŠæ¢ãããŠãæ²æ³ç¬¬28æ¡ã«éåããªã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=50720 å
¬è·éžææ³éå](æé«è£å€æ±ºæå43幎12æ4æ¥)[[æ¥æ¬åœæ²æ³ç¬¬15æ¡|æ²æ³ç¬¬15æ¡]]ïŒ[[æ¥æ¬åœæ²æ³ç¬¬25æ¡|æ²æ³ç¬¬25æ¡]]ïŒ[[åŽåçµåæ³ç¬¬1æ¡|åŽåçµåæ³1æ¡]]1é
ïŒ[[åŽåçµåæ³ç¬¬2æ¡|åŽåçµåæ³2æ¡]]ïŒ[[å
¬è·éžææ³ç¬¬10æ¡]]ïŒ[[å
¬è·éžææ³ç¬¬225æ¡]]1å·ïŒå
¬è·éžææ³225æ¡3å·
##'''åŽåçµåã®çµ±å¶æš©ãšæ²æ³ç¬¬28æ¡'''
##:åŽåçµåã¯ãæ²æ³ç¬¬28æ¡ã«ããåŽåè
ã®å£çµæš©ä¿éã®å¹æãšããŠããã®ç®çãéæããããã«å¿
èŠã§ããããã€ãåççãªç¯å²å
ã«ãããŠã¯ããã®çµåå¡ã«å¯Ÿããçµ±å¶æš©ãæããã
##'''å
¬è·éžæãžã®ç«åè£ã®èªç±ãšæ²æ³ç¬¬15æ¡ç¬¬1é
'''
##:å
¬è·ã®éžæã«ç«åè£ããèªç±ã¯ãæ²æ³ç¬¬15æ¡ç¬¬1é
ã®ä¿éããéèŠãªåºæ¬ç人暩ã®äžã€ãšè§£ãã¹ãã§ããã
##'''åŽåçµåã®çµ±å¶æš©ãšçµåå¡ã®ç«åè£ã®èªç±'''
##:åŽåçµåããå°æ¹è°äŒè°å¡ã®éžæã«ããããããããçµ±äžåè£ã決å®ããçµåãæããŠéžæéåãæšé²ããŠããå Žåã«ãããŠãçµ±äžåè£ã®éžã«ãããçµåå¡ããçµåã®æ¹éã«åããŠç«åè£ããããšãããšãã¯ããããæ念ããããå§åãŸãã¯èª¬åŸããããšã¯èš±ããããããã®åãè¶
ããŠãç«åè£ãåããããããšãèŠæ±ããããã«åŸããªãããšãçç±ã«çµ±å¶éåè
ãšããŠåŠåããããšã¯ãçµåã®çµ±å¶æš©ã®éçãè¶
ãããã®ãšããŠèš±ãããªãã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=50906 è·æ¥å®å®æ³éå]([[w:å
šèŸ²æèŠè·æ³äºä»¶|å
šèŸ²æèŠè·æ³äºä»¶]] æé«è£å€æ±º æå48幎4æ25æ¥ åé12å·»7å·1351é )[[æ¥æ¬åœæ²æ³ç¬¬18æ¡|æ²æ³18æ¡]]ã[[æ¥æ¬åœæ²æ³ç¬¬21æ¡|æ²æ³21æ¡]]ã[[æ¥æ¬åœæ²æ³ç¬¬31æ¡|æ²æ³31æ¡]]ãåœå®¶å
¬åå¡æ³ïŒæå40幎æ³åŸç¬¬69å·ã«ããæ¹æ£åã®ãã®ïŒ98æ¡5é
ã110æ¡1é
17å·
##åœå®¶å
¬åå¡æ³98æ¡5é
ã110æ¡1é
17å·ã®åæ²æ§
##:åœå®¶å
¬åå¡æ³98æ¡5é
ã110æ¡1é
17å·ã¯æ²æ³28æ¡ã«ãåœå®¶å
¬åå¡æ³110æ¡1é
17å·ã¯æ²æ³18æ¡ã21æ¡ã31æ¡ã«éåããªãã
##åœå®¶å
¬åå¡æ³110æ¡1é
17å·ã«ãããããããããã³ãäŒãŠãã®æ矩
##:åœå®¶å
¬åå¡æ³110æ¡1é
17å·ã«ããããããããšã¯ãåæ³98æ¡5é
å段ã«èŠå®ããéæ³è¡çºãå®è¡ãããç®çããã€ãŠãä»äººã«å¯Ÿãããã®è¡çºãå®è¡ãã決æãçãããããããªããŸãã¯ããã§ã«çããŠãã決æãå©é·ããããããªå¢ãã®ããåºæ¿ãäžããããšãããããäŒãŠããšã¯ãå³éæ³è¡çºãå
±è¬ããããã®ããããŸãã¯ããããè¡çºã®éè¡ãèšç»æºåããããšã§ãã€ãŠãéæ³è¡çºçºçã®å±éºæ§ãå
·äœçã«çãããšèªãããç¶æ
ã«éãããã®ãããã
##åœå®¶å
¬åå¡æ³98æ¡5é
ã110æ¡1é
17å·ã®æ³æ
##:åœå®¶å
¬åå¡æ³98æ¡5é
ã110æ¡1é
17å·ã¯ãå
¬åå¡ã®äºè°è¡çºã®ãã¡åæ³ã«ãã€ãŠéæ³ãšããããã®ãšãããªããã®ãšãåºå¥ããããã«éæ³ãšãããäºè°è¡çºã«ã€ããŠãéæ³æ§ã®åŒ·ããã®ãšåŒ±ããã®ãšãåºå¥ãããããåäºå¶è£ãç§ããã®ã¯ãã®ãã¡éæ³æ§ã®åŒ·ãäºè°è¡çºã«éããã®ãšãããããã¯ããããè¡çºçã«ã€ããäºè°è¡çºã®äŒç»ãå
±è¬ã説åŸãæ
«æ
ãæ什çãäºè°è¡çºã«ããããéåžžé䌎ãããã®ãšããŠäºè°è¡çºèªäœãšåäžèŠãããããåäºå¶è£ã®å¯Ÿè±¡ããé€ããã®ãšãã趣æšã§ã¯ãªãã
##æ¿æ²»çç®çã®ããã®äºè°è¡çºãšæ²æ³28æ¡
##:ç§äŒæ¥ã®åŽåè
ã§ãããšãå
¬åå¡ãå«ããã®ä»ã®å€åŽè
ã§ãããšãåããã䜿çšè
ã«å¯Ÿããçµæžçå°äœã®åäžã®èŠè«ãšã¯çŽæ¥é¢ä¿ã®ãªãèŠå¯å®è·åå·è¡æ³ã®æ¹æ£ã«å¯Ÿããå察ã®ãããªæ¿æ²»çç®çã®ããã«äºè°è¡çºãè¡ãªãããšã¯ãæ²æ³28æ¡ãšã¯ç¡é¢ä¿ãªãã®ã§ããã
# [http://www.courts.go.jp/app/hanrei_jp/detail2?id=52696 è³é](æé«è£å€æ±º å¹³æå
幎12æ14æ¥)[[åŽååºæºæ³ç¬¬39æ¡]], [[åŽååºæºæ³ç¬¬65æ¡]], [[åŽååºæºæ³ç¬¬66æ¡]], [[åŽååºæºæ³ç¬¬67æ¡]], [[åŽååºæºæ³ç¬¬68æ¡]], [[åŽååºæºæ³ç¬¬76æ¡]], åŽåçµåæ³ç¬¬2ç« , [[åŽåçµåæ³ç¬¬14æ¡]], [[åŽåçµåæ³ç¬¬16æ¡]], [[æ°æ³ç¬¬90æ¡]]
#;å幎ã®çšŒåçã«ãã£ãŠåŸæ¥å¡ãç¿å¹ŽåºŠã®è³éåŒäžã察象è
ããé€å€ããæšã®åŽååçŽæ¡é
ã®äžéšãå
¬åºã«åãç¡å¹ãšãããäºäŸ
#:ãã¹ãŠã®åå ã«ããäžå°±åŽãåºç€ãšããŠç®åºããå幎ã®çšŒåçã80ããŒã»ã³ã以äžã®åŸæ¥å¡ãç¿å¹ŽåºŠã®ããŒã¹ã¢ãããå«ãè³éåŒäžãã®å¯Ÿè±¡è
ããé€å€ããæšã®åŽååçŽæ¡é
ã¯ããã®ãã¡åŽååºæºæ³åã¯åŽåçµåæ³äžã®æš©å©ã«åºã¥ããã®ä»¥å€ã®äžå°±åŽã皌åçç®å®ã®åºç€ãšããéšåã¯æå¹ã§ããããå³åæš©å©ã«åºã¥ãäžå°±åŽã皌åçç®å®ã®åºç€ãšããéšåã¯å
¬åºã«åãç¡å¹ã§ããã
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³|æ¥æ¬åœæ²æ³]]
|[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³#3|第3ç« åœæ°ã®æš©å©åã³çŸ©å]]
|[[æ¥æ¬åœæ²æ³ç¬¬27æ¡]]<br>ãå€åŽã®æš©å©çŸ©åãå€åŽæ¡ä»¶ã®åºæºãå
ç«¥é
·äœ¿ã®çŠæ¢ã
|[[æ¥æ¬åœæ²æ³ç¬¬29æ¡]]<br>ã財ç£æš©ã
}}
{{stub|law}}
[[category:æ¥æ¬åœæ²æ³|28]] | 2023-04-20T09:57:02Z | 2023-09-12T13:55:49Z | [
"ãã³ãã¬ãŒã:Wikipedia",
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E6%97%A5%E6%9C%AC%E5%9B%BD%E6%86%B2%E6%B3%95%E7%AC%AC28%E6%9D%A1 |
37,607 | æ¥æ¬åœæ²æ³ç¬¬37æ¡ | æ³åŠ>æ²æ³>æ¥æ¬åœæ²æ³>ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³
ãåäºè¢«å人ã®è«žæš©å©ã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ²æ³>æ¥æ¬åœæ²æ³>ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ãåäºè¢«å人ã®è«žæš©å©ã",
"title": "æ¡æ"
}
] | æ³åŠïŒæ²æ³ïŒæ¥æ¬åœæ²æ³ïŒã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³ | [[æ³åŠ]]ïŒ[[æ²æ³]]ïŒ[[æ¥æ¬åœæ²æ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³]]
==æ¡æ==
ãåäºè¢«å人ã®è«žæš©å©ã
;第37æ¡
#ãã¹ãŠåäºäºä»¶ã«ãããŠã¯ã被å人ã¯ãå
¬å¹³ãªè£å€æã®è¿
éãªå
¬éè£å€ãåããæš©å©ãæããã
#åäºè¢«å人ã¯ããã¹ãŠã®èšŒäººã«å¯ŸããŠå¯©åããæ©äŒãå
åã«äžãžãããåãå
¬è²»ã§èªå·±ã®ããã«åŒ·å¶çæç¶ã«ãã蚌人ãæ±ããæš©å©ãæããã
#åäºè¢«å人ã¯ããããªãå Žåã«ããè³æ ŒãæããåŒè·äººãäŸé Œããããšãã§ããã被å人ãèªããããäŸé Œããããšãã§ããªããšãã¯ãåœã§ãããéããã
==解説==
{{wikipedia}}
==åç
§æ¡æ==
*[[åäºèšŽèšæ³ç¬¬30æ¡]]
*[[åäºèšŽèšæ³ç¬¬36æ¡]]
*[[åäºèšŽèšæ³ç¬¬37æ¡]]
*[[åäºèšŽèšæ³ç¬¬37æ¡ã®2]]
*[[åäºèšŽèšæ³ç¬¬37æ¡ã®4]]
*[[åäºèšŽèšæ³ç¬¬289æ¡]]
==å€äŸ==
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=56447 ææ¯é£²é£ç©çåç· ä»€éæ³]ïŒæé«è£å€æ±ºæå23幎11æ17æ¥ïŒ[[æ¥æ¬åœæ²æ³ç¬¬31æ¡|æ²æ³31æ¡]]ïŒ[[æ¥æ¬åœæ²æ³ç¬¬38æ¡|æ²æ³38æ¡]]ïŒ[[æ¥æ¬åœæ²æ³ç¬¬76æ¡|æ²æ³76æ¡]]ïŒè£å€ææ³æœè¡ä»€1æ¡ïŒå蚎å¿æ¥æªçœ®æ³12æ¡1é
ïŒå蚎å¿æ¥æªçœ®æ³12æ¡ïŒå蚎å¿æ¥æªçœ®æ³17æ¡ïŒå蚎å¿æ¥æªçœ®æ³10æ¡ïŒå蚎æ³337æ¡
##'''é¢ä¿äººã«å¯Ÿããæ€äºã®èŽåæžäžã®è¢«å人ã®åŠèªããéšåã®äŸè¿°èšèŒã蚌æ ã«æ¡ãããšã®å¯åŠãšæ²æ³ç¬¬37æ¡åã³å蚎å¿æ¥æªçœ®æ³ç¬¬12æ¡'''
##:æ€äºã®é¢ä¿äººã«å¯ŸããèŽåæžã«ãããäºå®ã被å人ãåŠèªãããŠããŠããè£å€æã¯è¢«å人ã®å³äŸè¿°ãæ¡çšããªãã§ãä»ã®èšŒæ ãç¶åããŠäºå®ãèªå®ã§ããããšã¯ã寧ãæ¡èšŒæ³äžã®ååã§ãã€ãŠã[[匟åŸäž»çŸ©]]ã«åãããã®ã§ãªãããšã¯åºããæ²æ³ç¬¬37æ¡ã®è¶£æšäžŠã³ã«å蚎å¿æ¥æªçœ®æ³ç¬¬12æ¡ã®èŠå®ã«æ¯«ãæµè§Šãããã®ã§ã¯ãªãã
##'''蚌æ ã®åæšéžæã®èªç±ãšæ²æ³ç¬¬37æ¡ç¬¬1é
åã³ç¬¬76æ¡ç¬¬3é
'''
##:è«æšã¯ã被å人ããã®ç¯æãåŠå®ããã«è¶³ãäºå®ãå
¬å€å»·ã§äŸè¿°ããã®ã第äºå¯©ãæ¡çšããªãã€ãããšãåäžå審ã«å¯ŸããŠåŒ·èª¿ããã®ã«ããããããåäžå審ã¯å³äž»åŒµãç¡èŠããã®ã¯ç¬¬äºå¯©ã®è©ãæã¡ããããã®ã§ãã€ãŠãæ²æ³ç¬¬37æ¡ç¬¬1é
ã®å
¬å¹³ãªè£å€æãšããããšãã§ããªããåæ²æ³ç¬¬76æ¡ç¬¬3é
ã«ããè¯å¿ã«åŸã€ãŠè£å€ããããšããããšãã§ãã¬ãšäºãã®ã§ããããããæ²æ³ç¬¬37æ¡ç¬¬1é
ã®å
¬å¹³ãªè£å€æã®è£å€ãšããã®ã¯ãæ§æãã®ä»ã«ãããŠåé ã®æ§ã®ãªãè£å€æã®è£å€ãšããæå³ã§ãããåæ²æ³ç¬¬76æ¡ç¬¬3é
ã®è£å€å®ãè¯å¿ã«åŸããšããã®ã¯ãè£å€å®ãæ圢ç¡åœ¢ã®å€éšã®å§è¿«ä¹è³èªæã«å±ããªãã§èªå·±å
å¿ã®è¯èãšé埳æã«åŸãã®æå³ã§ãããããã°åäžå審ãã蚌æ ã®åæšéžæã«äºå®å¯©ã®å°æ€ã«å±ãããã®ãšããŠç¬¬äºå¯©ã®äºå®èªå®ãæ¯èªããã®ã¯åœç¶ã§ãã€ãŠåŒ·ããŠå
¬å¹³ã猺ãäžè¯å¿ã«åŸã¯ãªãã§è£å€ããããšè«é£ããããšã¯ã§ããªãã
#<span id="æå23幎12æ22æ¥"/>[https://www.courts.go.jp/app/hanrei_jp/detail2?id=55242 çªç]ïŒæé«è£å€æå€æ±ºæå23幎12æ22æ¥ïŒ[[æ¥æ¬åœæ²æ³ç¬¬38æ¡|æ²æ³ç¬¬38æ¡]]
#;è£å€ãè¿
éãæ¬ ãæ²æ³ç¬¬37æ¡ç¬¬1é
ã«éåããå Žåãšäžåçç±
#:è£å€ãè¿
éãæ¬ ãæ²æ³ç¬¬37æ¡ç¬¬1é
ã«éåãããšããŠããããã¯å€æ±ºã«åœ±é¿ãåãŒããªãããšãæããã§ãããããäžåã®çç±ãšããããšãã§ããªãã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=56666 åœé å
¬ææžè¡äœ¿ãå
¬ææžåœé ãè©æ¬º]ïŒæé«è£å€æå€æ±ºæå24幎11æ30æ¥ïŒ[[æ¥æ¬åœæ²æ³ç¬¬34æ¡|æ²æ³ç¬¬34æ¡]]
##'''è£å€ãè¿
éãæ¬ ããããšãšäžåçç±'''
##:è£å€ãè¿
éãæ¬ ãããã©ãããšããããšã¯å Žåã«ãã€ãŠã¯ä¿å®ã®è²¬ä»»ã®åé¡ãçããããç¥ããªãããã©ãããã®ããå€æ±ºç Žæ¯ã®çç±ãšãªããã®ã§ã¯ãªãããšåœè£å€æã®å€äŸãšãããšããã§ãããïŒ[[#æå23幎12æ22æ¥|æå23幎ïŒãïŒç¬¬1071å·äºä»¶æå23幎12æ22æ¥å€§æ³å»·èšæž¡å€æ±º]]ïŒ
##'''æ²æ³ç¬¬34æ¡å段åã³åæ³ç¬¬37æ¡ç¬¬3é
å段æå®ã®åŒè·äººã«äŸé Œããæš©å©ãšè£å€ææ€å¯å®çã®çŸ©åæ²æ³ç¬¬37æ¡ç¬¬3é
ãšåæ¡é
åŸæ®µã®äºç±ãåç¥ãã¹ã矩å'''
##:æè«æ²æ³äžã®æš©å©ã¯è¢«å人ãèªãè¡äœ¿ãã¹ããã®ã§è£å€æãæ€å¯å®çã¯è¢«å人ããã®æš©å©ãè¡äœ¿ããæ©äŒãäžãããã®è¡äœ¿ã劚ããªããã°ããã®ã§ãããèšé²ã粟æ»ãããšè¢«å人ã¯é®æãããæ¥ïŒæå22幎9æ30æ¥ïŒã«åžæ³èŠå¯å®ã®èšåãåããã®éãä»åã®äºä»¶ã§åŒè·äººãéžä»»ããããšãã§ãããæšãåããããŠããæŽã«å幎10æ2æ¥éæ€äºã®èšå調æžã«è«æšæé²ã®åŠãåçãããã°ããã§ãªããå€äºã®åŸçèšåã®éã«ãåŒè·äººãéžä»»ãåŸãããšãåããããŠãããããã°è¢«å人ã¯é®æçŽåŸåŸçåã«åŒè·äººãäŸé Œããæ©äŒãååäžããããããšãèªããã«è¶³ãè£å€æãããã劚ããäºå®ã¯äº³ãèªããããªããã被å人ããåœéžåŒè·äººéžä»»ã®è«æ±ããã€ãäºè·¡ããªããããããŠæ³ã¯æè«ã®ãããªããšãç¹ã«è¢«å人ã«åãã矩åãè£å€æã«è² ãããŠãããã®ã§ã¯ãªãããåå€æ±ºã«ã¯æè«ã®ãããªéæ³ã¯ãªãè«æšã¯çç±ããªãã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=54342 建é ç©äŸµå
¥](æé«è£å€æ±º æå25幎9æ27æ¥)[[æ¥æ¬åœæ²æ³ç¬¬28æ¡|æ²æ³28æ¡]]ïŒ[[åæ³ç¬¬130æ¡|åæ³130æ¡]]ïŒ[[åæ³ç¬¬35æ¡|åæ³35æ¡]]ïŒ[[åæ³ç¬¬36æ¡|åæ³36æ¡]]ïŒ[[åæ³ç¬¬37æ¡|åæ³37æ¡]]ïŒæ§å蚎æ³69æ¡1é
#;åŒè·äººã®æ°åãå€æ±ºæžã«èšèŒããããšã®èŠåŠ
#:æ²æ³ç¬¬37æ¡ç¬¬3é
ã¯ãåäºè¢«å人ã¯ããããªãå Žåã«ãè³æ ŒãæããåŒè·äººãäŸé Œããããšãã§ããããšãåã³è¢«å人ãèªããããäŸé Œããããšãã§ããªããšãã¯åœã§ãããéããæšãèŠå®ããã ãã§ãã€ãŠãå€æ±ºæžã«å
¬å€ã«ç«äŒã€ãåŒè·äººã®æ°åãèšèŒãã¹ãæšãèŠå®ãããã®ã§ã¯ãªãããããŠæ§å蚎æ³ç¬¬69æ¡ç¬¬2é
ã¯å€æ±ºæžã«é¢äžããæ€å¯å®ã®å®æ°åãèšèŒãã¹ãæšãèŠå®ããŠããããå
¬å€ã«ç«äŒã€ãåŒè·äººã®æ°åãèšèŒãã¹ãæšãèŠå®ããŠããªããããã°åå€æ±ºæžã«ã¯ãæ¬ä»¶å
¬å€ã«ç«äŒã€ãåŒè·äººã®æ°åãèšèŒããŠããªãããšã¯æè«ã®ãšããã§ããããããããã®çºäœçæ§å蚎æ³ã®æ¡èŠã«åãããšããã¯ãªãããŸãæ²æ³ç¬¬37æ¡ç¬¬3é
ã«åãããã®ã§ããªãããããŠå€æ±ºæžã«å
¬å€ã«ç«äŒã€ãåŒè·äººã®æ°åãèšèŒããªããããšãŠæè«ã®ããã«è£å€ã®å
¬æ£ãçãããããã®ã§ã¯ãªãã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=54283 çªç](æé«è£å€æ±º æå25幎9æ27æ¥)
#;æ²æ³ç¬¬37æ¡2é
ãšè¢«å人ã«å察èšåã®æ©äŒãäžããªãã§äœæããã被害å§æ«æžçã®èšŒæ èœå
#:æ²æ³ç¬¬37æ¡ç¬¬2é
ã¯ã被å人ã«å察èšåã®æ©äŒãäžããªãã§äœæããã被害å§æ«æžçã®èšŒæ æžé¡ã蚌æ ãšããããšãã絶察ã«çŠæ¢ãããã®ã§ã¯ãªãã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=57788 âéšæŸéåéè¡ãéšæŸå©å¢ãéšæŸææ®ãéšæŸéŠéãå€åœäººç»é²æ³éåãæŸç«æªéãæŽåè¡çºçåŠçœ°ã«é¢ããæ³åŸéåãå€åœäººç»é²ä»€éå]ïŒæé«è£æ±ºå®æå53幎9æ4æ¥ïŒ[[åæ³ç¬¬106æ¡]], [[åäºèšŽèšæ³ç¬¬1æ¡]]
#;æ²æ³37æ¡1é
ã®è¿
éãªè£å€ã®ä¿éæ¡é
ã«åããç°åžžãªäºæ
ãçããŠããªããã®ãšãããäºäŸ
#:被å人ãã«å¯Ÿãã審çãã第äžå¯©ã«ãããŠçŽ16幎ãªãã17幎3ãæãæ§èšŽå¯©ã«ãããŠçŽ5幎4ãæãèŠããä»æ¥ã§ã¯æåã®èµ·èšŽããçŽ26幎ãã®é·æéãçµéããŠãããšããŠããå³å¯©çé·æåã®åå ããäºæ¡ã®è€éå°é£ã蚌æ ã®å倧ã被å人ã®å€æ°ãšããããšã®ã»ãã«ã被å人ãã«ãããŠå·æãªããããæ³å»·éäºãå±éããããšã«ããããšèªããããæ¬ä»¶ã«ãããŠã¯ãããŸã æ²æ³37æ¡1é
ã«å®ããè¿
éãªè£å€ã®ä¿éæ¡é
ã«åããç°åžžãªäºæ
ã«ç«ã¡è³ã€ããã®ãšã¯ãããªãã
#[http://www.courts.go.jp/search/jhsp0030?hanreiid=51209&hanreiKbn=02 æ¥åäžé倱èŽæ»ãåå·å®³](æé«è£æ±ºå® æå63幎02æ29æ¥) [[åæ³ç¬¬54æ¡]]1é
,[[åäºèšŽèšæ³ç¬¬250æ¡|å蚎æ³ç¬¬250æ¡]],[[åäºèšŽèšæ³ç¬¬253æ¡|å蚎æ³ç¬¬253æ¡]]1é
#;è¿
éãªè£å€ã®ä¿éãšã®é¢ä¿ã§å
¬èšŽæèµ·ã®é
延ãããŸã èãããšãŸã§ã¯èªããããªããšãããäºäŸ
#:å
¬èšŽæèµ·ãäºä»¶çºçããçžåœã®é·å¹ŽæãçµéããåŸã«ãªããããšããŠããè€éãªéçšãçµãŠçºçããæªæŸæã®å
¬å®³äºç¯ã§ãã€ãŠãã®è§£æã«æ Œå¥ã®å°é£ããã€ãããšçã®ç¹æ®äºæ
ããããšãã¯ãè¿
éãªè£å€ã®ä¿éãšã®é¢ä¿ã«ãããŠãããŸã å
¬èšŽæèµ·ã®é
延ãèãããšãŸã§ã¯ãããªãã
#:*æ²æ³37æ¡1é
éåãããç¹ã¯ãæ¬ä»¶å
¬èšŽæèµ·ãäºä»¶çºçããçžåœã®é·å¹ŽæãçµéããåŸã«ãªãããŠããããšã¯æè«ææã®ãšããã§ããããæ¬ä»¶ãè€éãªéçšãçµãŠçºçããæªæŸæã®å
¬å®³äºç¯ã§ãã€ãŠãäºæ¡ã®è§£æã«æ Œå¥ã®å°é£ããã€ãããšçã®ç¹æ®äºæ
ã«ç
§ãããšãããŸã å
¬èšŽæèµ·ã®é
延ãèãããšãŸã§ã¯èªããããªãã
#:*:çç±ãæ£åœã§ãªãå
¬èšŽæèµ·ã®èããé
延ã¯æ²æ³37æ¡1é
éåãåããããã
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³|æ¥æ¬åœæ²æ³]]
|[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³#3|第3ç« åœæ°ã®æš©å©åã³çŸ©å]]
|[[æ¥æ¬åœæ²æ³ç¬¬36æ¡]]<br>ãæ·åã»æ®èåã®çŠæ¢ã
|[[æ¥æ¬åœæ²æ³ç¬¬38æ¡]]<br>ãäžå©çäŸè¿°ã®äžåŒ·èŠãèªçœã®èšŒæ èœåã
}}
{{stub|law}}
[[category:æ¥æ¬åœæ²æ³|37]] | 2023-04-20T10:16:27Z | 2024-02-07T10:23:43Z | [
"ãã³ãã¬ãŒã:Wikipedia",
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E6%97%A5%E6%9C%AC%E5%9B%BD%E6%86%B2%E6%B3%95%E7%AC%AC37%E6%9D%A1 |
37,608 | æ¥æ¬åœæ²æ³ç¬¬98æ¡ | æ³åŠ>æ²æ³>æ¥æ¬åœæ²æ³>ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³
ãæ²æ³ã®æé«æ³èŠæ§ãåœéæ³èŠã®éµå®ã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ²æ³>æ¥æ¬åœæ²æ³>ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ãæ²æ³ã®æé«æ³èŠæ§ãåœéæ³èŠã®éµå®ã",
"title": "æ¡æ"
}
] | æ³åŠïŒæ²æ³ïŒæ¥æ¬åœæ²æ³ïŒã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³ | [[æ³åŠ]]ïŒ[[æ²æ³]]ïŒ[[æ¥æ¬åœæ²æ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³]]
==æ¡æ==
ãæ²æ³ã®æé«æ³èŠæ§ãåœéæ³èŠã®éµå®ã
;第98æ¡
#ãã®æ²æ³ã¯ãåœã®æé«æ³èŠã§ãã€ãŠããã®æ¡èŠã«åããæ³åŸãåœä»€ãè©å
åã³åœåã«é¢ãããã®ä»ã®è¡çºã®å
šéšåã¯äžéšã¯ããã®å¹åãæããªãã
#æ¥æ¬åœãç· çµããæ¡çŽåã³ç¢ºç«ãããåœéæ³èŠã¯ããããèª å®ã«éµå®ããããšãå¿
èŠãšããã
==解説==
{{wikipedia}}
===æ²æ³ã®ç§äººéå¹å===
==åç
§æ¡æ==
==å€äŸ==
#[http://www.courts.go.jp/search/jhsp0030?hanreiid=55588&hanreiKbn=02 æŽåè¡çºçåŠçœ°ã«é¢ããæ³ç¬¬åŸéåã»æ¥å劚害ã建é ç©äŸµå
¥ãçªç](æé«è£å€æ±º æå26幎07æ18æ¥)
#;æŽåè¡çºãçåŠçœ°ã«é¢ããæ³åŸç¬¬1æ¡ç¬¬1é
ã®åæ²æ§
#:[[æŽåè¡çºçåŠçœ°ã«é¢ããæ³åŸç¬¬1æ¡]]第1é
ã®èŠå®ã¯ã[[æ²æ³ç¬¬28æ¡]],[[æ²æ³ç¬¬98æ¡]]ã«éåããªãã
#<span id="ç å·äºä»¶"></span>[https://www.courts.go.jp/app/hanrei_jp/detail2?id=55816 æ¥æ¬åœãšã¢ã¡ãªã«åè¡åœãšã®éã®å®å
šä¿éæ¡çŽç¬¬3æ¡ã«åºãè¡æ¿åå®ã«äŒŽãåäºç¹å¥æ³éå]([[w:ç å·äºä»¶|ç å·äºä»¶]] æé«è£å€æ±º æå34幎12æ16æ¥) - [[æ¥æ¬åœæ²æ³ç¬¬9æ¡#ç å·äºä»¶|æ²æ³ç¬¬9æ¡ã«ä¿ãå€æã¯åæ³èšäºå€äŸç¯]]ã[[æ¥æ¬åœæ²æ³ç¬¬73æ¡#ç å·äºä»¶|æ²æ³ç¬¬73æ¡ã«ä¿ãå€æã¯åæ³èšäºå€äŸç¯]]åç
§
##'''æ¥æ¬åœãšã¢ã¡ãªã«åè¡åœãšã®éã®å®å
šä¿éæ¡çŽïŒä»¥äžå®ä¿æ¡çŽãšç¥ããïŒãšåžæ³è£å€æã®åžæ³å¯©æ»æš©'''
##:å®ä¿æ¡çŽã®åŠãã䞻暩åœãšããŠã®ããåœã®åç«ã®åºç€ã«é倧ãªé¢ä¿ãæã€é«åºŠã®æ¿æ²»æ§ãæãããã®ããéæ²ã§ãããåŠã®æ³çå€æã¯ãçŽåžæ³çæ©èœã䜿åœãšãã'''åžæ³è£å€æã®å¯©æ»ã«ååãšããŠãªããŸãªã'''æ§è³ªã®ãã®ã§ãããããã'''äžèŠæ¥µããŠæçœã«éæ²ç¡å¹ã§ãããšèªããããªãéã'''ã¯ãè£å€æã®åžæ³å¯©æ»æš©ã®ç¯å²å€ã«ãããšè§£ãããçžåœãšããã
##:*䞻暩åœãšããŠã®ããåœã®åç«ã®åºç€ã«æ¥µããŠé倧ãªé¢ä¿ããã€é«åºŠã®æ¿æ²»æ§ãæããæ¡çŽã«ã€ããŠã¯ããã®ç· çµæš©ãæããå
é£ããã³ããã«å¯ŸããŠæ¿èªæš©ãæããåœäŒã®å€æã«åŸãã¹ããçµå±çã«ã¯ã䞻暩ãæããåœæ°ã®æ¿æ²»çæ¹å€ã«å§ãããã¹ããã®ã§ãããšè§£ãã
##'''å®ä¿æ¡çŽãããããåæåé¡ãšãªã€ãŠããå Žåãšåžæ³è£å€æã®åžæ³å¯©æ»æš©'''
##:å®ä¿æ¡çŽïŒãŸãã¯ããã«åºãæ¿åºã®è¡çºïŒãéæ²ã§ãããåŠãããæ¬ä»¶ã®ããã«ïŒè¡æ¿åå®ã«äŒŽãåäºç¹å¥æ³ç¬¬2æ¡ãéæ²ã§ãããïŒåæåé¡ãšãªã€ãŠããå Žåã«ãããŠããããã«å¯Ÿããåžæ³è£å€æã®å¯©æ»æš©ã¯åé
ãšåæ§ã§ããã
##'''å®ä¿æ¡çŽã¯äžèŠæçœã«éæ²ãšèªããããã'''
##:å®ä¿æ¡çŽïŒããã³ããã«åºãã¢ã¡ãªã«åè¡åœè»éã®é§çïŒã¯ãæ²æ³ç¬¬9æ¡ã第98æ¡ç¬¬2é
ããã³åæã®è¶£æšã«åããŠéæ²ç¡å¹ã§ããããšãäžèŠæ¥µããŠæçœã§ãããšã¯èªããããªãã
##:*é§çè»éã¯å€åœè»éã§ãã€ãŠãããåœèªäœã®æŠåã§ãªãããšã¯ãã¡ãããããã«å¯Ÿããææ®æš©ã管çæš©ã¯ããã¹ãŠã¢ã¡ãªã«åè¡åœã«åããããåœããã®äž»äœãšãªã€ãŠãã ããèªåœã®è»éã«å¯Ÿãããšåæ§ã®ææ®æš©ã管çæš©ãæãããã®ã§ã¯ãªãã
##:*å®å
šä¿éæ¡çŽã®åæã«ç€ºããã趣æšã«ãããŠé§çãããã®ã§ãããåæ¡çŽ1æ¡ã®ç€ºãããã«æ¥µæ±ã«ãããåœéã®å¹³åãšå®å
šã®ç¶æã«å¯äžãããªãã³ã«äžãŸãã¯äºä»¥äžã®å€éšã®åœã«ããæåãŸãã¯å¹²æžã«ãã€ãŠåŒãèµ·ãããããåœã«ããã倧èŠæš¡ã®å
ä¹±ããã³éšããããé®å§ãããããããåœæ¿åºã®æ瀺ã®èŠè«ã«å¿ããŠäžããããæŽå©ãå«ããŠãå€éšããã®æŠåæ»æã«å¯Ÿããæ¥æ¬åœã®å®å
šã«å¯äžããããã«äœ¿çšããããšãšãªã€ãŠããããã®ç®çã¯ãå°ãããåœããã³ããåœãå«ãã極æ±ã®å¹³åãšå®å
šãç¶æããåã³æŠäºã®æšçŠãèµ·ããªãããã«ããããšã«åããããåœããã®é§çã蚱容ããã®ã¯ãããåœã®é²è¡åã®äžè¶³ããå¹³åãæ奜ããè«žåœæ°ã®å
¬æ£ãšä¿¡çŸ©ã«ä¿¡é ŒããŠè£ãªãããšãããã®ã«å€ãªããªãã
##:*æ²æ³9æ¡ã98æ¡2é
ããã³åæã®è¶£æšã«é©åããããããããã®æ¡ç« ã«åããŠéæ²ç¡å¹ã§ããããšãäžèŠæ¥µããŠæçœã§ãããšã¯ãå°åºèªããããªãã
#<span id="çŸé"></span>[http://www.courts.go.jp/app/hanrei_jp/detail2?id=52161 äžåç£ææ暩確èªãæææš©ååŸç»èšæ¹æ¶è«æ±æ¬èšŽãåå蚎ãäžåç£ææ暩確èªãåæ¢æ¡ä»¶ä»ææ暩移転仮ç»èšæ¹æ¶ç»èšè«æ±æ¬èšŽãåå蚎åã³åœäºè
åå ]([[w:çŸéåºå°èšŽèš|çŸéåºå°èšŽèš]] æé«è£å€æ±º å¹³æå
幎6æ20æ¥)[[æ¥æ¬åœæ²æ³ç¬¬9æ¡]]
#;åœãè¡ãç§æ³äžã®è¡çºãšæ²æ³98æ¡1é
ã«ãããåœåã«é¢ãããã®ä»ã®è¡çºã
#:åœãè¡ãç§æ³äžã®è¡çºã¯ãæ²æ³98æ¡1é
ã«ãããåœåã«é¢ãããã®ä»ã®è¡çºãã«ã¯åœãããªãã
#:*æ²æ³98æ¡1é
ã¯ãæ²æ³ãåœã®æé«æ³èŠã§ããããšãããªãã¡ãæ²æ³ãæææ³ã®åœæ³åœ¢åŒãšããŠæã匷ã圢åŒçå¹åãæããæ²æ³ã«éåãããã®äœã®æ³åœ¢åŒã®å
šéšåã¯äžéšã¯ãã®éåããé床ã«ãããŠæ³èŠç¯ãšããŠã®æ¬æ¥ã®å¹åãæããªãããšãå®ããèŠå®ã§ãããããåæ¡é
ã«ãããåœåã«é¢ãããã®ä»ã®è¡çºããšã¯ãåæ¡é
ã«åæãããæ³åŸãåœä»€ãè©å
ãšåäžã®æ§è³ªãæããåœã®è¡çºãèšãæããã°ãå
¬æš©åãè¡äœ¿ããŠæ³èŠç¯ãå®ç«ããåœã®è¡çºãæå³ãããããã€ãŠãè¡æ¿åŠåãè£å€ãªã©ã®åœã®è¡çºã¯ãåå¥çã»å
·äœçãªãããå
¬æš©åãè¡äœ¿ããŠæ³èŠç¯ãå®ç«ããåœã®è¡çºã§ããããããããæ³èŠç¯ãå®ç«ããéãã«ãããŠåœåã«é¢ããè¡çºã«è©²åœãããã®ãšããã¹ãã§ããããåœã®è¡çºã§ãã€ãŠããç§äººãšå¯Ÿçã®ç«å Žã§è¡ãåœã®è¡çºã¯ãå³ã®ãããªæ³èŠç¯ã®å®ç«ã䌎ããªãããæ²æ³98æ¡1é
ã«ãããåœåã«é¢ãããã®ä»ã®è¡çºãã«è©²åœããªããã®ãšè§£ãã¹ãã§ããã
===å€äŸ:æ²æ³ã®ç§äººéå¹å===
# [http://www.courts.go.jp/search/jhsp0030?hanreiid=51931&hanreiKbn=02 âåŽåå¥çŽé¢ä¿ååšç¢ºèªè«æ±]([[w:äžè±æš¹èäºä»¶|äžè±æš¹èäºä»¶]] æé«è£å€æ±º æå48幎12æ12æ¥)â[[æ¥æ¬åœæ²æ³ç¬¬14æ¡|æ²æ³ç¬¬14æ¡]]ïŒ[[æ¥æ¬åœæ²æ³ç¬¬19æ¡|æ²æ³ç¬¬19æ¡]]ïŒ[[æ°æ³ç¬¬1æ¡]]ïŒ[[æ°æ³ç¬¬90æ¡]]ïŒ[[åŽååºæºæ³ç¬¬3æ¡]]ïŒåŽååºæºæ³ç¬¬2ç«
#;æ²æ³14æ¡ã19æ¡ãšç§äººçžäºéã®é¢ä¿
#:æ²æ³14æ¡ã19æ¡ã®èŠå®ã¯ãçŽæ¥ç§äººçžäºéã®é¢ä¿ã«é©çšããããã®ã§ã¯ãªãã
#:*æ²æ³ã®å³åèŠå®ã¯ãåæ³ç¬¬3ç« ã®ãã®ä»ã®èªç±æš©çåºæ¬æš©ã®ä¿éèŠå®ãšåãããåœãŸãã¯å
Œ
±å£äœã®çµ±æ²»è¡åã«å¯ŸããŠå人ã®åºæ¬çãªèªç±ãšå¹³çãä¿éããç®çã«åºããã®ã§ããã€ã±ãåœãŸãã¯å
Œ
±å£äœãšå人ãšã®é¢ä¿ãèŠåŸãããã®ã§ãããç§äººçžäºã®é¢ä¿ãçŽæ¥èŠåŸããããšãäºå®ãããã®ã§ã¯ãªãã
#:*ç§äººéã®é¢ä¿ã«ãããŠããçžäºã®ç€ŸäŒçåé¢ä¿ã®çžéãããäžæ¹ãä»æ¹ã«åªè¶ããäºå®äžåŸè
ãåè
ã®ææã«æåŸããããããªãå Žåãããããã®ãããªå Žåã«ç§çèªæ²»ã®åã®äžã«åªäœè
ã®æ¯é
åãç¡å¶éã«èªãããšãã¯ãå£äœè
ã®èªç±ãå¹³çãèãã䟵害ãŸãã¯å¶éããããšãšãªãããããããããšã¯åŠã¿é£ããããã®ããã«ãã®ãããªå Žåã«éãæ²æ³ã®åºæ¬æš©ä¿éèŠå®ã®é©çšãªããã¯é¡æšé©çšãèªããã¹ãã§ãããšããèŠè§£ããŸããæ¡çšããããšã¯ã§ããªãã
#:*ç§çæ¯é
é¢ä¿ã«ãããŠã¯ãå人ã®åºæ¬çãªèªç±ãå¹³çã«å¯Ÿããå
·äœçãªäŸµå®³ãŸãã¯ãã®ããããããããã®æ
æ§ãçšåºŠã瀟äŒçã«èš±å®¹ãããé床ãè¶
ãããšãã¯ãããã«å¯Ÿããç«æ³æªçœ®ã«ãã€ãŠãã®æ¯æ£ãå³ãããšãå¯èœã§ãããããŸããå Žåã«ãã€ãŠã¯ãç§çèªæ²»ã«å¯Ÿããäžè¬çå¶éèŠå®ã§ããæ°æ³1æ¡ã90æ¡ãäžæ³è¡çºã«é¢ããè«žèŠå®çã®é©åãªéçšã«ãã€ãŠãäžé¢ã§ç§çèªæ²»ã®ååãå°éããªãããä»é¢ã§ç€ŸäŒç蚱容æ§ã®é床ãè¶
ãã䟵害ã«å¯Ÿãåºæ¬çãªèªç±ãå¹³çã®å©çãä¿è·ãããã®éã®é©åãªèª¿æŽãå³ãæ¹éãåããã®ã§ããããããŠãã®å Žåãå人ã®åºæ¬çãªèªç±ãå¹³çã極ããŠéèŠãªæ³çãšããŠå°éãã¹ãããšã¯åœç¶ã§ããããããã絶察èŠããããšãèš±ãããã統治è¡åã®å Žåãšåäžã®åºæºã芳念ã«ãã€ãŠãããåŸããããšãã§ããªãããšã¯ãè«ããŸããªãã
#:*æ²æ³ã¯ãææ³ãä¿¡æ¡ã®èªç±ãæ³ã®äžã®å¹³çãä¿éãããšåæã«ãä»æ¹ã22æ¡ã29æ¡çã«ãããŠã財ç£æš©ã®è¡äœ¿ãå¶æ¥ãã®ä»åºãçµæžæŽ»åã®èªç±ããåºæ¬ç人暩ãšããŠä¿éããŠããããããããäŒæ¥è
ã¯ãããããªçµæžæŽ»åã®äžç°ãšããŠããå¥çŽç· çµã®èªç±ãæããèªå·±ã®å¶æ¥ã®ããã«åŽåè
ãéåããã«ãããããããªãè
ãéãå
¥ãããããããªãæ¡ä»¶ã§ãããéããã«ã€ããŠãæ³åŸãã®ä»ã«ããç¹å¥ã®å¶éããªãéããååãšããŠèªç±ã«ããã決å®ããããšãã§ããã®ã§ãã€ãŠãäŒæ¥è
ãç¹å®ã®ææ³ãä¿¡æ¡ãæããè
ããã®ããããã€ãŠéãå
¥ããããšãæãã§ãããããåœç¶ã«éæ³ãšããããšã¯ã§ããªãã
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³|æ¥æ¬åœæ²æ³]]
|[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³#10|第10ç« æé«æ³èŠ]]
|[[æ¥æ¬åœæ²æ³ç¬¬97æ¡]]<br>ãåºæ¬ç人暩ã®æ¬è³ªã
|[[æ¥æ¬åœæ²æ³ç¬¬99æ¡]]<br>ãæ²æ³å°éæè·ã®çŸ©åã
}}
{{stub|law}}
[[category:æ¥æ¬åœæ²æ³|99]] | 2023-04-20T10:27:10Z | 2023-08-15T10:51:34Z | [
"ãã³ãã¬ãŒã:Stub",
"ãã³ãã¬ãŒã:Wikipedia",
"ãã³ãã¬ãŒã:ååŸ"
] | https://ja.wikibooks.org/wiki/%E6%97%A5%E6%9C%AC%E5%9B%BD%E6%86%B2%E6%B3%95%E7%AC%AC98%E6%9D%A1 |
37,609 | æ¥æ¬åœæ²æ³ç¬¬14æ¡ | æ³åŠ>æ²æ³>æ¥æ¬åœæ²æ³>ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³
ãæ³ã®äžã®å¹³çã貎ææ¿æ²»ã®å»æ¢ãæ å
žã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ²æ³>æ¥æ¬åœæ²æ³>ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ãæ³ã®äžã®å¹³çã貎ææ¿æ²»ã®å»æ¢ãæ å
žã",
"title": "æ¡æ"
}
] | æ³åŠïŒæ²æ³ïŒæ¥æ¬åœæ²æ³ïŒã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³ | [[æ³åŠ]]ïŒ[[æ²æ³]]ïŒ[[æ¥æ¬åœæ²æ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³]]
==æ¡æ==
ãæ³ã®äžã®å¹³çã貎ææ¿æ²»ã®å»æ¢ãæ å
žã
;第14æ¡
#ãã¹ãŠåœæ°ã¯ãæ³ã®äžã«å¹³çã§ãã€ãŠã人皮ãä¿¡æ¡ãæ§å¥ã瀟äŒç身ååã¯éå°ã«ãããæ¿æ²»çãçµæžçåã¯ç€ŸäŒçé¢ä¿ã«ãããŠãå·®å¥ãããªãã
#è¯æãã®ä»ã®è²Žæã®å¶åºŠã¯ããããèªããªãã
#æ èªãå²ç« ãã®ä»ã®æ å
žã®æäžã¯ããããªãç¹æš©ã䌎ã¯ãªããæ å
žã®æäžã¯ãçŸã«ãããæããåã¯å°æ¥ãããåããè
ã®äžä»£ã«éãããã®å¹åãæããã
==解説==
{{wikipedia}}
{{main|æ³ã®äžã®å¹³ç}}
==åç
§æ¡æ==
*[[æ¥æ¬åœæ²æ³ç¬¬24æ¡]]ã家æç掻ã«ãããå人ã®å°å³ãäž¡æ§ã®å¹³çã
==å€äŸ==
# [https://www.courts.go.jp/app/hanrei_jp/detail2?id=50422 売æ¥çåç· æ¡äŸéå](æé«è£å€æ±º æå33幎10æ15æ¥)
#;å°æ¹å
Œ
±å£äœãå¶å®ãã売æ¥åç· ã«é¢ããæ¡äŸã®åæ²æ§ã- å
±éããè¡çºãæ¡äŸã§ç¯çœªãšããŠåŠçœ°ããå Žåãæ¡äŸéã§åŠçœ°ã®å
容çãç°ãªã£ãŠèŠå®ãããããšã¯æ³ã®äžã®å¹³çã䟵害ãããã®ãšãªããã
#:å°æ¹å
Œ
±å£äœã売æ¥ã®åç· ã«ã€ããŠåå¥ã«æ¡äŸãå¶å®ããçµæããã®åæ±ã«å·®å¥ãçããããšããã€ãŠããæ²æ³ç¬¬14æ¡ã«éåããªãã
#:*æ²æ³ãåå°æ¹å
Œ
±å£äœã®æ¡äŸå¶å®æš©ãèªãã以äžãå°åã«ãã€ãŠå·®å¥ãçããããšã¯åœç¶ã«äºæãããããšã§ããããããããå·®å¥ã¯æ²æ³ã¿ããã容èªãããšããã§ãããšè§£ãã¹ãã§ãããããæ
ãå°æ¹å
Œ
±å£äœã売æ¥ã®åç· ã«ã€ããŠåå¥ã«æ¡äŸãå¶å®ããçµæããã®åæ±ã«å·®å¥ãçããããšããã€ãŠããæè«ã®ããã«å°åå·®ã®æ
ããã€ãŠéæ²ãšããããšã¯ã§ããªãã
#:*:ïŒ[[w:äžé£¯å最倫|äžé£¯å最倫]]è£å€å®åã³[[w:奥éå¥äž|奥éå¥äž]]è£å€å®ã«ããè£è¶³æèŠïŒ
#:*::æ²æ³94æ¡ã¯ãå°æ¹å
Œ
±å£äœã¯âŠâŠæ³åŸã®ç¯å²å
ã§æ¡äŸãå¶å®ããããšãã§ããããšèŠå®ããæ¡äŸå¶å®æš©ã¯ãæ³åŸã®ç¯å²å
ã§èš±ãããããšãèŠå®ããŠãã以äžãæ³åŸã®äžäœã«ããæ²æ³ã®è«žååã®æ¯é
ããåãããã®ãšè§£ãã¹ãããšã¯åœç¶ã§ãã€ãŠãåå
Œ
±å£äœã®å¶å®ããæ¡äŸããæ²æ³14æ¡ã®ãæ³ã®äžã«å¹³çã®ååãã«éåããããšã¯èš±ãããªããã®ãšè§£ãããããªãã¡ãæ²æ³ãèªãå
Œ
±å£äœã«æ¡äŸå¶å®æš©ãèªããŠãããããšãã€ãŠããã®åæ¡äŸçžäºã®å
容ã®å·®ç°ããæ²æ³14æ¡ã®ååãç Žããããªçµæãçãããšãã¯ããã¯ãéæ²åé¡ãçãããã®ãšããã¹ãã§ãã€ãŠãäŸãã°ãåçš®ã®è¡çºã«ã€ããŠäžå°åã§ã¯å€åœäººã®ã¿ãåŠçœ°ããããä»ã®å°åã§ã¯å€åœäººã®ã¿ã«ã€ãåŠçœ°ãå
é€ãããåŠãåæ¡äŸã¯ãç¹æ®µã®åççæ ¹æ ã®ãªãéããæ²æ³14æ¡ã«åããããšã«ãªããããããèŠããã«ãæ²æ³ãåå°æ¹å
Œ
±å£äœã«ãæ¡äŸå¶å®æš©ãèªããŠãããããšãã€ãŠãåœç¶ã«ãåæ¡äŸçžäºéã«æ²æ³14æ¡ã®ååãç ŽãçµæãçããããšãŸã§ããæ²æ³ãæ¯èªããŠãããã®ãšè§£ãã¹ãã§ã¯ãªããåæ¡äŸãåå°åã®ç¹æ®ãªå°æ¹ã®å®æ
ãã®ä»ã®åççæ ¹æ ã«åºããŠå¶å®ããããã®çµæçããåæ¡äŸçžäºéã®å·®ç°ããåççãªãã®ãšããŠæ¯èªããããŠå§ããŠãåæ²ãšå€æãã¹ããã®ãšèããã
# [https://www.courts.go.jp/app/hanrei_jp/detail2?id=53093 åŸ
åœåŠåç¡å¹ç¢ºèªãå€å®åæ¶çè«æ±](æé«è£å€æ±º æå39幎5æ27æ¥)
#;é«éœ¢è
ã§ããããšãäžå¿ã®åºæºãšããŠãªãããå°æ¹å
¬åå¡ã®åŸ
åœåŠåãšæ²æ³ç¬¬14æ¡ç¬¬1é
ããã³å°æ¹å
¬åå¡æ³ç¬¬13æ¡ã
#:çºé·ãçºæ¡äŸã«åºã¥ããéå¡æŽçã®ç®çã§è¡ãªã€ãçºè·å¡ã«å¯ŸããåŸ
åœåŠåã¯ã55æ³ä»¥äžã®é«éœ¢è
ã§ããããšãäžå¿ã®åºæºãšããããããã®è©²åœè
ã«ã€ãããã«å€åæ瞟çãèæ
®ããŠãªããããã®ã§ãããšãã¯ãæ²æ³ç¬¬14æ¡ç¬¬1é
ããã³å°æ¹å
¬åå¡æ³ç¬¬13æ¡ã«éåããªãã
#:*æ²æ³14æ¡1é
åã³å°æ¹å
¬åå¡æ³13æ¡ã«ãã瀟äŒç身åãšã¯ã人ã瀟äŒã«ãããŠå ããç¶ç¶çãªå°äœããããã®ãšè§£ããããããé«éœ¢ã§ãããšããããšã¯å³ã®ç€ŸäŒç身åã«åœããªããšã®å審ã®å€æã¯çžåœãšæãããããå³åæ³æ¡ã¯ãåœæ°ã«å¯Ÿããæ³ã®äžã®å¹³çãä¿éãããã®ã§ãããå³åæ³æ¡ã«åæãããäºç±ã¯äŸç€ºçãªãã®ã§ãã€ãŠãå¿
ãããããã«éããã®ã§ã¯ãªããšè§£ããã®ãçžåœã§ãããããåå€æ±ºããé«éœ¢ã§ããããšã¯ç€ŸäŒç身åã«åœããªããšã®äžäºã«ãããããããäžå人ã®å瀺䞻匵ãææ¥ããã®ã¯ãå¿
ãããååã«æãå°œãããã®ãšã¯ãããªãã
#:*ããããå³åæ³æ¡ã¯ã<u>åœæ°ã«å¯Ÿã絶察çãªå¹³çãä¿éãããã®ã§ã¯ãªããå·®å¥ãã¹ãåççãªçç±ãªãããŠå·®å¥ããããšãçŠæ¢ããŠãã趣æš</u>ãšè§£ãã¹ãã§ããããã<u>äºæã®æ§è³ªã«å³å¿ããŠåççãšèªããããå·®å¥çåæ±ãããããšã¯ããªããå³åæ³æ¡ã®åŠå®ãããšããã§ã¯ãªã</u>ã
#:*ä»»åœæš©è
ãã被äžå人ãã55æ³ä»¥äžã®é«éœ¢ã§ããããšãåŸ
åœåŠåã®äžå¿ã®åºæºãšããäžãäžå人ã¯ããã«è©²åœãããããããã®å€åæ瞟ãè¯å¥œã§ãªãããšçã®äºæ
ããèæ
®ã®äžãäžå人ã«å¯Ÿãæ¬ä»¶åŸ
åœåŠåã«åºãããšã¯ãä»»åœæš©è
ã«ä»»ããããè£éæš©ã®ç¯å²ãéžè±ãããã®ãšã¯èªãããããé«éœ¢ã§ããäžå人ã«å¯Ÿãä»ã®è·å¡ã«æ¯ãäžåçãªå·®å¥ããããã®ãšãèªããããªãã
# <span id="å°å±æ®ºæ³å®åéæ²äºä»¶"/>[https://www.courts.go.jp/app/hanrei_jp/detail2?id=51807âå°å±æ®ºäºº]([[w:å°å±æ®ºæ³å®åéæ²äºä»¶|å°å±æ®ºæ³å®åéæ²äºä»¶]] æé«è£å€æ±º æå48幎4æ4æ¥ åé第27å·»3å·265é )â[[åæ³ç¬¬199æ¡|åæ³199æ¡]]ïŒ[[åæ³ç¬¬200æ¡|åæ³200æ¡]]ïŒæ¬å€æ±ºãåãåé€æžã¿ïŒ
#;åæ³200æ¡ãšæ²æ³14æ¡1é
#:åæ³200æ¡ã¯æ²æ³14æ¡1é
ã«éåããã
#:*<span id="å°å±æ®ºæ³å®åéæ²äºä»¶1"/>å°å±ã®æ®ºå®³ã¯éåžžã®æ®ºäººã«æ¯ããŠäžè¬ã«é«åºŠã®ç€ŸäŒçé矩çéé£ãåããŠç¶ãã¹ãã§ãããšããŠããã®ããšããã®åŠçœ°ã«åæ ãããŠããããªãã¡äžåçã§ãããšã¯ãããªããããã§ã被害è
ãå°å±ã§ããããšãç¯æ
ã®ã²ãšã€ãšããŠå
·äœçäºä»¶ã®éåäžéèŠããããšã¯èš±ããããã®ã§ããã®ã¿ãªãããããã«é²ãã§ãã®ããšãé¡ååããæ³åŸäžãåã®å éèŠä»¶ãšããèŠå®ãèšããŠãããããå·®å¥çåæ±ãããã€ãŠãã ã¡ã«åççãªæ ¹æ ãæ¬ ããã®ãšæããããšã¯ã§ããããããã€ãŠãŸããæ²æ³14æ¡1é
ã«éåãããšããããšãã§ããªãã
#:*<span id="å°å±æ®ºæ³å®åéæ²äºä»¶2"/>ããããªãããå眰å éã®çšåºŠãããã«ãã€ãŠã¯ãããã'''å·®å¥ã®åçæ§'''ãåŠå®ãã¹ãå Žåããªããšã¯ãããªããããªãã¡ãå éã®çšåºŠã極端ã§ãã€ãŠãå瀺ã®ããšãç«æ³ç®çéæã®æ段ãšããŠçã ããåè¡¡ã倱ãããããæ£åœåããã¹ãæ ¹æ ãèŠåºãããªããšãã¯ããã®å·®å¥ã¯èããäžåçãªãã®ãšãããªããã°ãªããããããèŠå®ã¯æ²æ³14æ¡1é
ã«éåããŠç¡å¹ã§ãããšããªããã°ãªããªãã
#:*:cf.眪åã®åè¡¡:[[æ¥æ¬åœæ²æ³ç¬¬36æ¡|æ²æ³ç¬¬36æ¡]]ãæ·åã»æ®èåã®çŠæ¢ã
# [http://www.courts.go.jp/search/jhsp0030?hanreiid=51931&hanreiKbn=02 âåŽåå¥çŽé¢ä¿ååšç¢ºèªè«æ±]([[w:äžè±æš¹èäºä»¶|äžè±æš¹èäºä»¶]] æé«è£å€æ±º æå48幎12æ12æ¥)â[[æ¥æ¬åœæ²æ³ç¬¬19æ¡|æ²æ³ç¬¬19æ¡]]ïŒ[[æ°æ³ç¬¬1æ¡]]ïŒ[[æ°æ³ç¬¬90æ¡]]ïŒ[[åŽååºæºæ³ç¬¬3æ¡]]ïŒåŽååºæºæ³ç¬¬2ç«
#:â[[æ¥æ¬åœæ²æ³ç¬¬98æ¡#å€äŸ:æ²æ³ã®ç§äººéå¹å|æ²æ³ã®ç§äººéå¹å]]
# [https://www.courts.go.jp/app/hanrei_jp/detail2?id=51064âå°å±å·å®³èŽæ»](æé«è£å€æ±º æå49幎9æ26æ¥)â[[åæ³ç¬¬199æ¡|åæ³199æ¡]]ïŒ[[åæ³ç¬¬205æ¡|åæ³205æ¡]]ïŒç¬¬2é
ã«å®ããããŠãããå°å±å·å®³èŽæ»çœªã¯åæ³çŸä»£èªåæ¹æ£ã®éã«åé€ïŒ
#;åæ³205æ¡2é
ãšæ²æ³14æ¡1é
#:å°å±å·å®³èŽæ»ã«é¢ããåæ³205æ¡2é
ã®èŠå®ã¯ãæ²æ³14æ¡1é
ã«éåããªãã
#:*å°å±ã«å¯Ÿããå°éå ±æ©ã¯ã瀟äŒç掻äžã®åºæ¬çé矩ã§ãã€ãŠããã®ãããªæ®éçå«çã®ç¶æã¯ãåæ³äžã®ä¿è·ã«å€ãããããå°å±ã«å¯Ÿããå·å®³èŽæ»ãéåžžã®å·å®³èŽæ»ãããéãåŠçœ°ããèŠå®ãèšãããšããŠãããããå·®å¥çåæ±ãããã€ãŠãçŽã¡ã«åççæ ¹æ ãæ¬ ããã®ãšæããããšã¯ã§ããããããã€ãŠãŸããæ²æ³14æ¡1é
ã«éåãããšããããšãã§ããªãããšã¯'''[[#å°å±æ®ºæ³å®åéæ²äºä»¶1|åœè£å€æã®å€äŸ]]'''ã®è¶£æšã«åŸŽãæããã§ããã
#:*å°å±å·å®³èŽæ»çœªã«å¯Ÿããå眰å éã®çšåºŠã«ãã€ãŠã¯ããã®å·®å¥çåæ±ãã®åçæ§ãæ¬ ããæ²æ³14æ¡1é
ã«éåãããã®ãšãããªããã°ãªããªãããšãã[[#å°å±æ®ºæ³å®åéæ²äºä»¶2|åèšå€äŸã®è¶£æšãšãããšãã]]ã§ããããå°å±å·å®³èŽæ»ã«é¢ããåæ³205æ¡2é
ã®å®ããæ³å®åã¯ãåççæ ¹æ ã«åºã¥ãå·®å¥çåæ±ãã®åãåºãªããã®ã§ãã€ãŠãæ²æ³14æ¡1é
ã«éåãããã®ãšã¯ãããªãã
#[http://www.courts.go.jp/search/jhsp0030?hanreiid=19761&hanreiKbn=06 ç§ç°çžäºéè¡å¥³åè³éå·®å¥](ç§ç°å°æ¹è£å€æå€æ±º æå50幎04æ10æ¥)[[åŽååºæºæ³ç¬¬4æ¡]],[[æ°æ³ç¬¬90æ¡]]
#:åŽåå¥çŽã«ãããŠã䜿çšè
ããåŽåè
ã女åã§ããããšãçç±ãšããŠãè³éã«ã€ããŠãç·åãšå·®å¥çåæ±ããããå Žåã«ã¯ãåŽåå¥çŽã®å³ã®éšåã¯ãåŽååºæºæ³4æ¡ã«éåããŠç¡å¹ã§ããããã女åã¯ç·åã«æ¯æãããéé¡ãšã®å·®é¡ãè«æ±ããããšãã§ãããã®ãšè§£ããã®ãçžåœãšããã
#:*åŽååºæºæ³ã§å®ããåºæºã«éããªãåŽåæ¡ä»¶ãå®ããåŽåå¥çŽã¯ããã®éšåã«ã€ããŠã¯ç¡å¹ãšããããã®ç¡å¹ãšãªã€ãéšåã¯ãåŽååºæºæ³ã§å®ããåºæºã«ããæšã®åŽååºæºæ³13æ¡ã®è¶£æšã¯ãåæ³4æ¡éåã®ãããªé倧ãªéåãããå¥çŽã«ã€ããŠã¯ãããäžå±€ãã®ç¡å¹ãšãªã€ã空çœã®éšåãè£å
ããããã®ãã®ãšããŠæŽçšããããšãã§ãã
# [http://www.courts.go.jp/app/hanrei_jp/detail2?id=56345 éåé¢ä¿åç¶ç¢ºèªç](é称[[w:æ¥ç£èªåè»äºä»¶#1981幎ã®è£å€ã®æŠèª¬|æ¥ç£èªåè»å¥³åå®å¹Žå¶äºä»¶]] æé«è£å€æ±º æå56幎3æ24æ¥)[[æ°æ³ç¬¬1æ¡]]ã2ïŒ[[æ°æ³ç¬¬90æ¡]]ïŒåŽååºæºæ³ç¬¬1ç« ç·å, [[åŽååºæºæ³ç¬¬1æ¡]]
#;å®å¹Žå¹Žéœ¢ãç·å60æ³å¥³å55æ³ãšå®ããå°±æ¥èŠåäžå¥³åã®å®å¹Žå¹Žéœ¢ãç·åããäœãå®ããéšåãæ§å¥ã®ã¿ã«ããäžåçãªå·®å¥ãå®ãããã®ãšããŠæ°æ³90æ¡ã®èŠå®ã«ããç¡å¹ãšãããäºäŸ
#:äŒç€Ÿããã®å°±æ¥èŠåäžã«å®å¹Žå¹Žéœ¢ãç·å60æ³ã女å55æ³ãšå®ããå Žåã«ãããŠãæ
åœè·åãçžåœåºç¯å²ã«ããã€ãŠããŠå¥³ååŸæ¥å¡å
šäœãäŒç€Ÿã«å¯Ÿããè²¢ç®åºŠã®äžãããªãåŸæ¥å¡ãšã¿ãã¹ãæ ¹æ ã¯ãªããåŽåã®è³ªéãåäžããªãã®ã«å®è³ªè³éãäžæãããšããäžåè¡¡ã¯çããŠããããå°ãªããšã60æ³ååŸãŸã§ã¯ç·å¥³ãšãå³äŒç€Ÿã®éåžžã®è·åã§ããã°è·åéè¡èœåã«æ¬ ãããšããã¯ãªããäžåŸã«åŸæ¥å¡ãšããŠäžé©æ Œãšã¿ãŠäŒæ¥å€ãžæé€ãããŸã§ã®çç±ã¯ãªããªã©ãåå€ç€ºã®äºæ
ããã€ãŠãäŒç€Ÿã®äŒæ¥çµå¶äžå®å¹Žå¹Žéœ¢ã«ãããŠå¥³åãå·®å¥ããªããã°ãªããªãåçççç±ãèªããããªããšãã¯ãå³å°±æ¥èŠåäžå¥³åã®å®å¹Žå¹Žéœ¢ãç·åããäœãå®ããéšåã¯ãæ§å¥ã®ã¿ã«ããäžåçãªå·®å¥ãå®ãããã®ãšããŠæ°æ³90æ¡ã®èŠå®ã«ããç¡å¹ã§ããã
#:*å€æ±ºæã«åç
§æ¡æãšããŠæ¬æ¡ãåŒãã
#:*:(åŒçš)å°ã女åã§ããããšã®ã¿ãçç±ãšããŠå·®å¥ããããšã«åž°çãããã®ã§ãããæ§å¥ã®ã¿ã«ããäžåçãªå·®å¥ãå®ãããã®ãšããŠæ°æ³90æ¡ã®èŠå®ã«ããç¡å¹ã§ãããšè§£ããã®ãçžåœã§ããïŒæ²æ³14æ¡1é
ãæ°æ³1æ¡ã2åç
§ïŒã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=55154 æå®³è³ åç]([[w:å æšèšŽèš|å æšèšŽèš]] æé«è£å€æ±º æå57幎7æ7æ¥ æ°é36å·»7å·1235é )[[æ¥æ¬åœæ²æ³ç¬¬13æ¡|æ²æ³13æ¡]]ã[[æ¥æ¬åœæ²æ³ç¬¬25æ¡|æ²æ³25æ¡]]ãå
ç«¥æ¶é€æåœæ³ïŒæå48幎æ³åŸç¬¬93å·ã«ããæ¹æ£åã®ãã®ïŒ4æ¡3é
3å·
##å
ç«¥æ¶é€æåœæ³4æ¡3é
3å·ãšæ²æ³25æ¡
##:å
ç«¥æ¶é€æåœæ³4æ¡3é
3å·ã¯æ²æ³25æ¡ã«éåããªãã
##'''å
ç«¥æ¶é€æåœæ³4æ¡3é
3å·ãšæ²æ³14æ¡ã13æ¡'''
##:å
ç«¥æ¶é€æåœæ³4æ¡3é
3å·ã¯æ²æ³14æ¡ã13æ¡ã«éåããªãã
##*æ¬ä»¶äœµçµŠèª¿æŽæ¡é
ããã®å絊ããé害çŠç¥å¹Žéãšå
ç«¥æ¶é€æåœãšã®äœµçµŠãçŠããããšãæ²æ³14æ¡åã³13æ¡ã«éåãããã
##*:å絊è
ã®ç¯å²ãæ¯çµŠèŠä»¶ãæ¯çµŠéé¡çã«ã€ããªããåçççç±ã®ãªãäžåœãªå·®å¥çåæ±ããããããããã¯å人ã®å°å³ãæ¯æãããããªå
容ã®å®ããèšããŠãããšãã¯ãæ²æ³14æ¡åã³13æ¡éåã®åé¡ãçãããããç·åçã«å€æãããšãå³å·®å¥ããªããåçççç±ã®ãªãäžåœãªãã®ã§ãããšã¯ãããªãã
#[http://www.courts.go.jp/search/jhsp0030?hanreiid=51193&hanreiKbn=02 ç§çç¬å ã®çŠæ¢åã³å
¬æ£ååŒã®ç¢ºä¿ã«é¢ããæ³åŸéå]('''[[ç§çç¬å ã®çŠæ¢åã³å
¬æ£ååŒã®ç¢ºä¿ã«é¢ããæ³åŸç¬¬3æ¡#ç³æ²¹äŸ¡æ Œã«ã«ãã«|ç³æ²¹äŸ¡æ Œã«ã«ãã«åäºäºä»¶]]''' ãæé«è£å€äŸ æå59幎02æ24æ¥)
#;ç¬çŠæ³85æ¡3å·ã®èŠå®ãšæ²æ³14æ¡1é
ã31æ¡ã32æ¡
#:ç¬çŠæ³89æ¡ãã91æ¡ãŸã§ã®çœªã«ä¿ã蚎èšã«ã€ãäºå¯©å¶ãå®ãã[[ç§çç¬å ã®çŠæ¢åã³å
¬æ£ååŒã®ç¢ºä¿ã«é¢ããæ³åŸç¬¬85æ¡|åæ³85æ¡]]3å·ã®èŠå®ã¯ãæ²æ³14æ¡1é
ã31æ¡ã32æ¡ã«éåããªãã
#<span id="æé«è£å€æ±ºå¹³æ7幎7æ5æ¥"/>[http://www.courts.go.jp/search/jhsp0030?hanreiid=55859&hanreiKbn=02 éå«¡åºåæ³å®çžç¶å·®å¥äºä»¶](æé«è£å€æ±ºå¹³æ7幎7æ5æ¥ [[#éå«¡åºåéæ²|ãå©å€åçžç¶å·®å¥ãã«é¢ããæ§å€äŸã»æé«è£å¹³æ25幎9æ4æ¥æ±ºå®ã«ããå€äŸå€æŽ]])
#;æ°æ³900æ¡4å·ãã ãæžå段ãšæ²æ³14æ¡1é
#:æ°æ³900æ¡4å·ãã ãæžå段ã¯æ²æ³14æ¡1é
ã«éåããªãã
#:*çžç¶å¶åºŠã¯ã被çžç¶äººã®è²¡ç£ã誰ã«ãã©ã®ããã«æ¿ç¶ãããããå®ãããã®ã§ãããããã®åœ¢æ
ã«ã¯æŽå²çã瀟äŒçã«ã¿ãŠçš®ã
ã®ãã®ãããããŸããçžç¶å¶åºŠãå®ããã«åœãã£ãŠã¯ãããããã®åœã®äŒçµ±ã瀟äŒäºæ
ãåœæ°ææ
ãªã©ãèæ
®ãããªããã°ãªãããååœã®çžç¶å¶åºŠã¯ãå€ããå°ãªããããããã®äºæ
ãèŠçŽ ãåæ ããŠãããããã«ãçŸåšã®çžç¶å¶åºŠã¯ã家æãšãããã®ãã©ã®ããã«èããããšããããšãšå¯æ¥ã«é¢ä¿ããŠããã®ã§ãã£ãŠããã®åœã«ãããå©å§»ãªãã芪åé¢ä¿ã«å¯ŸããèŠåŸçãé¢ããŠãããå®ããããšã¯ã§ããªããããããç·åçã«èæ
®ããäžã§ãçžç¶å¶åºŠãã©ã®ããã«å®ãããã¯ãç«æ³åºã®åççãªè£éå€æã«ãã ããããŠãããã®ãšããã»ããªãããããŠãåèšã®ãšãããæ¬ä»¶èŠå®ãå«ãæ³å®çžç¶åã®å®ãã¯ãå³çžç¶åã«åŸã£ãŠçžç¶ãè¡ãããã¹ãããšãå®ãããã®ã§ã¯ãªããéºèšã«ããçžç¶åã®æå®çããªãå Žåãªã©ã«ãããŠè£å
çã«æ©èœããèŠå®ã§ããããšããèæ
®ããã°ãæ¬ä»¶èŠå®ã«ãããå«¡åºåãšéå«¡åºåã®æ³å®çžç¶åã®åºå¥ã¯ããã®ç«æ³çç±ã«åççãªæ ¹æ ãããããã€ããã®åºå¥ãå³ç«æ³çç±ãšã®é¢é£ã§èããäžåçãªãã®ã§ãªãã<u>ããŸã ç«æ³åºã«äžããããåççãªè£éå€æã®éçãè¶
ããŠããªã</u>ãšèªããããéããåçççç±ã®ãªãå·®å¥ãšã¯ãããããããæ²æ³14æ¡1é
ã«åãããã®ãšããããšã¯ã§ããªããšããã¹ãã§ããã
#:*æ¬ä»¶èŠå®ã®ç«æ³çç±ã¯ãæ³åŸäžã®é
å¶è
ãšã®éã«åºçããå«¡åºåã®ç«å Žãå°éãããšãšãã«ãä»æ¹ã被çžç¶äººã®åã§ããéå«¡åºåã®ç«å Žã«ãé
æ
®ããŠãéå«¡åºåã«å«¡åºåã®äºåã®äžã®æ³å®çžç¶åãèªããããšã«ãããéå«¡åºåãä¿è·ããããšãããã®ã§ãããæ³åŸå©ã®å°éãšéå«¡åºåã®ä¿è·ã®èª¿æŽãå³ã£ããã®ãšè§£ãããããããèšãæããã°ãæ°æ³ãæ³åŸå©äž»çŸ©ãæ¡çšããŠãã以äžãæ³å®çžç¶åã¯å©å§»é¢ä¿ã«ããé
å¶è
ãšãã®åãåªéããŠãããå®ããããä»æ¹ãéå«¡åºåã«ãäžå®ã®æ³å®çžç¶åãèªããŠãã®ä¿è·ãå³ã£ããã®ã§ãããšè§£ããããçŸè¡æ°æ³ã¯æ³åŸå©äž»çŸ©ãæ¡çšããŠããã®ã§ãããããå³ã®ãããªæ¬ä»¶èŠå®ã®ç«æ³çç±ã«ãåççãªæ ¹æ ããããšããã¹ãã§ãããæ¬ä»¶èŠå®ãéå«¡åºåã®æ³å®çžç¶åãå«¡åºåã®äºåã®äžãšããããšããå³ç«æ³çç±ãšã®é¢é£ã«ãããŠèããäžåçã§ãããç«æ³åºã«äžããããåççãªè£éå€æã®éçãè¶
ãããã®ãšããããšã¯ã§ããªãã®ã§ãã£ãŠãæ¬ä»¶èŠå®ã¯ãåçççç±ã®ãªãå·®å¥ãšã¯ããããæ²æ³14æ¡1é
ã«åãããã®ãšã¯ãããªãã
#<span id="å¹³æ7幎å€æ±º"/>[http://www.courts.go.jp/app/hanrei_jp/detail2?id=76107 æå®³è³ å]ïŒæé«è£<!--äžå°-->å€æ±ºå¹³æ7幎12æ5æ¥ å€æ1563.81ãã'''å¹³æ7幎å€æ±º'''ãïŒ[[æ°æ³ç¬¬733æ¡|æ°æ³733æ¡]]ïŒåœå®¶è³ åæ³1æ¡1é
#;åå©çŠæ¢æéã«ã€ããŠç·å¥³éã«å·®ç°ãèšããæ°æ³733æ¡ã¯æ²æ³14æ¡1é
ã«éåããã
#:æ°æ³733æ¡ã®å
æ¥ã®ç«æ³è¶£æšããç¶æ§ã®æšå®ã®éè€ãåé¿ããç¶åé¢ä¿ããããçŽäºã®çºçãæªç¶ã«é²ãããšã«ãããšè§£ããã以äžãåççãªæ ¹æ ã«åºã¥ããŠå人ã®æ³çåæ±ãã«åºå¥ãèšããããšã¯æ²æ³14æ¡1é
ã«éåãããã®ã§ã¯ãªãã
#<span id="å¹³æ16幎1æ14æ¥"/>[https://www.courts.go.jp/app/hanrei_jp/detail2?id=52391 éžæç¡å¹è«æ±äºä»¶]ïŒæé«è£å€æ±ºå¹³æ16幎1æ14æ¥ïŒ[[å
¬è·éžææ³ç¬¬14æ¡|å
¬è·éžææ³14æ¡]]ïŒ[[å
¬è·éžææ³å¥è¡šç¬¬3]]
#;å
¬è·éžææ³14æ¡ïŒå¥è¡šç¬¬3ã®åè°é¢ïŒéžæåºéžåºïŒè°å¡ã®è°å¡å®æ°é
åèŠå®ã®åæ²æ§
#:å
¬è·éžææ³14æ¡ïŒå¥è¡šç¬¬3ã®åè°é¢ïŒéžæåºéžåºïŒè°å¡ã®è°å¡å®æ°é
åèŠå®ã¯ïŒå¹³æ13幎7æ29æ¥æœè¡ã®åè°é¢è°å¡éåžžéžæåœæïŒæ²æ³14æ¡1é
ã«éåããŠãããã®ãšããããšã¯ã§ããªãã
#:*æ¬ä»¶æ¹æ£ã¯ïŒæ²æ³ãéžæå¶åºŠã®å
·äœçãªä»çµã¿ã®æ±ºå®ã«ã€ãåœäŒã«ãã ããç«æ³è£éæš©ã®éçãè¶
ãããã®ã§ã¯ãªãïŒæ¬ä»¶éžæåœæã«ãããŠæ¬ä»¶å®æ°é
åèŠå®ãæ²æ³ã«éåããã«è³ã£ãŠãããã®ãšããããšã¯ã§ããªãã
#<span id="æ±äº¬éœç®¡çè·éžèåœç±èŠä»¶äºä»¶"/>[http://www.courts.go.jp/search/jhsp0030?hanreiid=52248&hanreiKbn=02 管çè·éžèåéšè³æ Œç¢ºèªçè«æ±äºä»¶](æé«è£å€æ±ºâå¹³æ17幎01æ26æ¥)[[åŽååºæºæ³ç¬¬3æ¡]]ïŒ[[åŽååºæºæ³ç¬¬112æ¡]]ïŒå°æ¹å
¬åå¡æ³ïŒå¹³æ10幎æ³åŸç¬¬112å·ã«ããæ¹æ£åã®ãã®ïŒ58æ¡3é
ïŒ[[å°æ¹å
¬åå¡æ³ç¬¬13æ¡]]ïŒ[[å°æ¹å
¬åå¡æ³ç¬¬17æ¡]]ïŒ[[å°æ¹å
¬åå¡æ³ç¬¬19æ¡]]
##'''å°æ¹å
Œ
±å£äœãæ¥æ¬åœæ°ã§ããè·å¡ã«éã£ãŠç®¡çè·ã«æä»»ããããšãã§ããããšãšããæªçœ®ãå·ãããšãšåŽååºæºæ³3æ¡ïŒæ²æ³14æ¡1é
'''
##:å°æ¹å
Œ
±å£äœãïŒå
¬æš©åã®è¡äœ¿ã«åœããè¡çºãè¡ãããšãªã©ãè·åãšããå°æ¹å
¬åå¡ã®è·ãšããã«æä»»ããã®ã«å¿
èŠãªè·åçµéšãç©ãããã«çµãã¹ãè·ãšãå
å«ããäžäœçãªç®¡çè·ã®ä»»çšå¶åºŠãæ§ç¯ããäžã§ïŒæ¥æ¬åœæ°ã§ããè·å¡ã«éã£ãŠç®¡çè·ã«æä»»ããããšãã§ããããšãšããæªçœ®ãå·ãããšã¯ïŒåŽååºæºæ³3æ¡ïŒæ²æ³14æ¡1é
ã«éåããªãã
##:*å°æ¹å
¬åå¡ã®ãã¡ïŒäœæ°ã®æš©å©çŸ©åãçŽæ¥åœ¢æãïŒãã®ç¯å²ã確å®ãããªã©ã®å
¬æš©åã®è¡äœ¿ã«åœããè¡çºãè¡ãïŒè¥ããã¯æ®éå°æ¹å
Œ
±å£äœã®éèŠãªæœçã«é¢ãã決å®ãè¡ãïŒåã¯ãããã«åç»ããããšãè·åãšãããã®ïŒä»¥äžãå
¬æš©åè¡äœ¿çå°æ¹å
¬åå¡ããšãããïŒã«ã€ããŠïŒè·åã®éè¡ã¯ïŒäœæ°ã®æš©å©çŸ©åãæ³çå°äœã®å
容ãå®ãïŒãããã¯ãããã«äºå®äžå€§ããªåœ±é¿ãåãŒããªã©ïŒäœæ°ã®ç掻ã«çŽæ¥éæ¥ã«é倧ãªãããããæãããã®ã§ããïŒåœæ°äž»æš©ã®åçã«åºã¥ãïŒåœåã³æ®éå°æ¹å
Œ
±å£äœã«ãã統治ã®åšãæ¹ã«ã€ããŠã¯æ¥æ¬åœã®çµ±æ²»è
ãšããŠã®åœæ°ãæçµçãªè²¬ä»»ãè² ãã¹ããã®ã§ããããšïŒæ²æ³1æ¡ïŒ15æ¡1é
åç
§ïŒã«ç
§ããïŒååãšããŠæ¥æ¬ã®åœç±ãæããè
ãå
¬æš©åè¡äœ¿çå°æ¹å
¬åå¡ã«å°±ä»»ããããšãæ³å®ãããŠãããšã¿ãã¹ãã§ããïŒæãåœä»¥å€ã®åœå®¶ã«åž°å±ãïŒãã®åœå®¶ãšã®éã§ãã®åœæ°ãšããŠã®æš©å©çŸ©åãæããå€åœäººãå
¬æš©åè¡äœ¿çå°æ¹å
¬åå¡ã«å°±ä»»ããããšã¯ïŒæ¬æ¥æãåœã®æ³äœç³»ã®æ³å®ãããšããã§ã¯ãªãã
##'''æ±äº¬éœã管çè·ã«æä»»ããããã®è³æ ŒèŠä»¶ãšããŠæ¥æ¬ã®åœç±ãæããããšãå®ããæªçœ®ãåŽååºæºæ³3æ¡ïŒæ²æ³14æ¡1é
ã«éåããªããšãããäºäŸ'''
##:æ±äº¬éœã管çè·ã«æä»»ããã°å
¬æš©åã®è¡äœ¿ã«åœããè¡çºãè¡ãããšãªã©ãè·åãšããå°æ¹å
¬åå¡ã«å°±ä»»ããããšãããããšãåœç¶ã®åæãšããŠä»»çšç®¡çãè¡ã管çè·ã®ä»»çšå¶åºŠãèšããŠãããªã©å€ç€ºã®äºæ
ã®äžã§ã¯ïŒè·å¡ã管çè·ã«æä»»ããããã®è³æ ŒèŠä»¶ãšããŠæ¥æ¬ã®åœç±ãæããããšãå®ããæ±äº¬éœã®æªçœ®ã¯ïŒåŽååºæºæ³3æ¡ïŒæ²æ³14æ¡1é
ã«éåããªãã
#[http://www.courts.go.jp/search/jhsp0030?hanreiid=32834&hanreiKbn=02 å°äœç¢ºèªçè«æ±äºä»¶](æé«è£å€æ±º å¹³æ18幎03æ17æ¥)[[æ°æ³ç¬¬2æ¡]],[[æ°æ³ç¬¬90æ¡]],[[æ°æ³ç¬¬92æ¡]],[[æ°æ³ç¬¬263æ¡]],[[æ°æ³ç¬¬294æ¡]]
##'''å
¥äŒéšèœã®æ
£ç¿ã«åºã¥ãå
¥äŒéå£ã®äŒåã®ãã¡å
¥äŒæš©è
ã®è³æ ŒèŠä»¶ãäžå®¶ã®ä»£è¡šè
ãšããŠã®äžåž¯äž»ã«éå®ããéšåãå
¬åºè¯ä¿ã«åããªããšãããäºäŸ'''
##:å
¥äŒéšèœã®æ
£ç¿ã«åºã¥ãå
¥äŒéå£ã®äŒåã®ãã¡å
¥äŒæš©è
ã®è³æ ŒèŠä»¶ãäžå®¶ã®ä»£è¡šè
ãšããŠã®äžåž¯äž»ã«éå®ããéšåã¯ïŒçŸåšã«ãããŠãïŒå
¬åºè¯ä¿ã«åãããã®ãšããããšã¯ã§ããªãã
##'''å
¥äŒéšèœã®æ
£ç¿ã«åºã¥ãå
¥äŒéå£ã®äŒåã®ãã¡å
¥äŒæš©è
ã®è³æ ŒãååãšããŠç·åå«ã«éå®ãåå
¥äŒéšèœã®éšèœæ°ä»¥å€ã®ç·æ§ãšå©å§»ãã女åå«ã¯é¢å©ããŠæ§å§ã«åŸ©ããªãéãå
¥äŒæš©è
ã®è³æ Œãèªããªããšããéšåã[[æ°æ³ç¬¬90æ¡]]ã®èŠå®ã«ããç¡å¹ãšãããäºäŸ'''
##:å
¥äŒéšèœã®æ
£ç¿ã«åºã¥ãå
¥äŒéå£ã®äŒåã®ãã¡ïŒå
¥äŒæš©è
ã®è³æ ŒãååãšããŠç·åå«ã«éå®ãïŒåå
¥äŒéšèœã®éšèœæ°ä»¥å€ã®ç·æ§ãšå©å§»ãã女åå«ã¯é¢å©ããŠæ§å§ã«åŸ©ããªãéãå
¥äŒæš©è
ã®è³æ Œãèªããªããšããéšåã¯ïŒé
ããšãå¹³æïŒå¹Žä»¥éã«ãããŠã¯ïŒæ§å¥ã®ã¿ã«ããäžåçãªå·®å¥ãšããŠ[[æ°æ³ç¬¬90æ¡]]ã®èŠå®ã«ããç¡å¹ã§ããã
#<span id="å¹³æ21幎9æ30æ¥"/>[https://www.courts.go.jp/app/hanrei_jp/detail2?id=38014 éžæç¡å¹è«æ±äºä»¶]ïŒæé«è£å€æ±ºå¹³æ21幎9æ30æ¥ïŒ[[å
¬è·éžææ³ç¬¬14æ¡|å
¬è·éžææ³14æ¡]]ïŒ[[å
¬è·éžææ³å¥è¡šç¬¬3]]
#;å
¬è·éžææ³14æ¡ïŒå¥è¡šç¬¬3ã®åè°é¢ïŒéžæåºéžåºïŒè°å¡ã®è°å¡å®æ°é
åèŠå®ã®åæ²æ§
#:å
¬è·éžææ³14æ¡ïŒå¥è¡šç¬¬3ã®åè°é¢ïŒéžæåºéžåºïŒè°å¡ã®è°å¡å®æ°é
åèŠå®ã¯ïŒå¹³æ19幎7æ29æ¥æœè¡ã®åè°é¢è°å¡éåžžéžæåœæïŒæ²æ³14æ¡1é
ã«éåããŠãããã®ãšããããšã¯ã§ããªãã
#:*åè°é¢ã§ã¯ïŒ[[#å¹³æ16幎1æ14æ¥|å¹³æ16幎倧æ³å»·å€æ±º]]äžã®ææãåãïŒåœé¢ã®æ¯æ£æªçœ®ãè¬ããå¿
èŠããããšãšãã«ïŒãã®åŸãå®æ°èŒå·®ã®ç¶ç¶çãªæ€èšŒèª¿æ»ãé²ããŠããå¿
èŠããããšèªèããããæ¬ä»¶æ¹æ£ã¯ïŒããããèªèã®äžã«è¡ããããã®ã§ããïŒãã®çµæïŒå¹³æ17幎10æå®æœã®åœå¢èª¿æ»çµæã«ãã人å£ã«åºã¥ãéžæåºéã«ãããè°å¡1人åœããã®äººå£ã®æ倧èŒå·®ã¯ïŒ1察4.84ã«çž®å°ããããšãšãªã£ãããŸãïŒæ¬ä»¶éžæã¯ïŒæ¬ä»¶æ¹æ£ã®çŽ1幎2ãæåŸã«æ¬ä»¶å®æ°é
åèŠå®ã®äžã§æœè¡ãããåããŠã®åè°é¢è°å¡éåžžéžæã§ããïŒæ¬ä»¶éžæåœæã®éžæåºéã«ãããè°å¡ïŒäººåœããã®éžæ人æ°ã®æ倧èŒå·®ã¯1察4.86ã§ãã£ããšããïŒãã®èŒå·®ã¯ïŒæ¬ä»¶æ¹æ£åã®åè°é¢è°å¡å®æ°é
åèŠå®ã®äžã§æœè¡ãããååéžæåœæã®äžèšæ倧èŒå·®1察5.13ã«æ¯ã¹ãŠçž®å°ãããã®ãšãªã£ãŠãããæ¬ä»¶éžæã®åŸã«ã¯ïŒåè°é¢æ¹é©åè°äŒãèšçœ®ããïŒååè°äŒã®äžã«éžæå¶åºŠã«ä¿ãå°éå§å¡äŒãèšçœ®ããããªã©ïŒå®æ°èŒå·®ã®åé¡ã«ã€ããŠä»åŸãæ€èšãè¡ãããããšãšãããŠããããããŠïŒçŸè¡ã®éžæå¶åºŠã®ä»çµã¿ã倧ããå€æŽããã«ã¯ïŒåŸã«è¿°ã¹ãããã«çžå¿ã®æéãèŠããããšã¯åŠå®ã§ããªããšããã§ãã£ãŠïŒæ¬ä»¶éžæãŸã§ã«ãã®ãããªèŠçŽããè¡ãããšã¯æ¥µããŠå°é£ã§ãã£ããšãããããåŸãªãã以äžã®ãããªäºæ
ãèæ
®ããã°ïŒæ¬ä»¶éžæãŸã§ã®éã«æ¬ä»¶å®æ°é
åèŠå®ãæŽã«æ¹æ£ããªãã£ãããšãåœäŒã®è£éæš©ã®éçãè¶
ãããã®ãšããããšã¯ã§ããïŒæ¬ä»¶éžæåœæã«ãããŠïŒæ¬ä»¶å®æ°é
åèŠå®ãæ²æ³ã«éåããã«è³ã£ãŠãããã®ãšããããšã¯ã§ããªãã
#:*ããããªããïŒæ¬ä»¶æ¹æ£ã®çµæã«ãã£ãŠãæ®ãããšãšãªã£ãäžèšã®ãããªèŒå·®ã¯ïŒæ祚䟡å€ã®å¹³çãšãã芳ç¹ããã¯ïŒãªã倧ããªäžå¹³çãåããç¶æ
ã§ããïŒéžæåºéã«ãããéžæ人ã®æ祚䟡å€ã®èŒå·®ã®çž®å°ãå³ãããšãæ±ããããç¶æ³ã«ãããšãããããåŸãªãããã ïŒå°éå§å¡äŒã®å ±åæžã«è¡šããæèŠã«ããããšããïŒçŸè¡ã®éžæå¶åºŠã®ä»çµã¿ãç¶æããéãïŒåéžæåºã®å®æ°ãæ¯ãæ¿ããæªçœ®ã«ããã ãã§ã¯ïŒæ倧èŒå·®ã®å€§å¹
ãªçž®å°ãå³ãããšã¯å°é£ã§ããïŒãããè¡ãããšããã°ïŒçŸè¡ã®éžæå¶åºŠã®ä»çµã¿èªäœã®èŠçŽããå¿
èŠãšãªãããšã¯åŠå®ã§ããªãããã®ãããªèŠçŽããè¡ãã«ã€ããŠã¯ïŒåè°é¢ã®åšãæ¹ããèžãŸããé«åºŠã«æ¿æ²»çãªå€æãå¿
èŠã§ããïŒäºæã®æ§è³ªäžèª²é¡ãå€ãïŒãã®æ€èšã«çžå¿ã®æéãèŠããããšã¯èªããããåŸãªããïŒåœæ°ã®ææãé©æ£ã«åæ ããéžæå¶åºŠãæ°äž»æ¿æ²»ã®åºç€ã§ããïŒæ祚䟡å€ã®å¹³çãæ²æ³äžã®èŠè«ã§ããããšã«ãããã¿ããšïŒåœäŒã«ãããŠïŒéããã«ïŒæ祚䟡å€ã®å¹³çã®éèŠæ§ãååã«èžãŸããŠïŒé©åãªæ€èšãè¡ãããããšãæãŸããã
#<span id="å¹³æ24幎10æ17æ¥"/>[https://www.courts.go.jp/app/hanrei_jp/detail2?id=82641 éžæç¡å¹è«æ±äºä»¶]ïŒæé«è£å€æ±ºå¹³æ24幎10æ17æ¥ïŒ[[æ¥æ¬åœæ²æ³ç¬¬15æ¡|æ²æ³15æ¡]]1é
ïŒæ²æ³15æ¡3é
ïŒ[[æ¥æ¬åœæ²æ³ç¬¬43æ¡|æ²æ³43æ¡]]1é
ïŒ[[æ¥æ¬åœæ²æ³ç¬¬44æ¡|æ²æ³44æ¡]]ïŒ[[å
¬è·éžææ³ç¬¬14æ¡|å
¬è·éžææ³14æ¡]]ïŒ[[å
¬è·éžææ³å¥è¡šç¬¬3]]
#;å
¬è·éžææ³14æ¡ïŒå¥è¡šç¬¬3ã®åè°é¢ïŒéžæåºéžåºïŒè°å¡ã®è°å¡å®æ°é
åèŠå®ã®åæ²æ§
#:å
¬è·éžææ³14æ¡ïŒå¥è¡šç¬¬3ã®åè°é¢ïŒéžæåºéžåºïŒè°å¡ã®è°å¡å®æ°é
åèŠå®ã®äžã§ïŒå¹³æ22幎7æ11æ¥æœè¡ã®åè°é¢è°å¡éåžžéžæåœæïŒéžæåºéã«ãããæ祚䟡å€ã®äžåè¡¡ã¯éæ²ã®åé¡ãçããçšåºŠã®èããäžå¹³çç¶æ
ã«è³ã£ãŠãããïŒäžèšéžæãŸã§ã®éã«äžèšèŠå®ãæ¹æ£ããªãã£ãããšãåœäŒã®è£éæš©ã®éçãè¶
ãããã®ãšã¯ãããïŒäžèšèŠå®ãæ²æ³14æ¡1é
çã«éåããã«è³ã£ãŠãããšããããšã¯ã§ããªãã
#:*ãããã®äºæ
ãç·åèæ
®ãããšïŒæ¬ä»¶éžæãå¹³æ18幎æ¹æ£ã«ãã4å¢4æžã®æªçœ®åŸã«å®æœããã2åç®ã®éåžžéžæã§ããããšãåæ¡ããŠãïŒæ¬ä»¶éžæåœæïŒåèšã®èŒå·®ã瀺ãéžæåºéã«ãããæ祚䟡å€ã®äžåè¡¡ã¯ïŒæ祚䟡å€ã®å¹³çã®éèŠæ§ã«ç
§ãããŠãã¯ãçéãåŸãªãçšåºŠã«éããŠããïŒãããæ£åœåãã¹ãç¹å¥ã®çç±ãèŠãã ããªã以äžïŒ'''éæ²ã®åé¡ãçããçšåºŠã®èããäžå¹³çç¶æ
ã«è³ã£ãŠãã'''ãšããã»ãã¯ãªãã
#:*ãã£ãšãïŒåœè£å€æã[[#å¹³æ21幎9æ30æ¥|å¹³æ21幎倧æ³å»·å€æ±º]]ã«ãããŠããããåè°é¢è°å¡ã®éžæå¶åºŠã®æ§é çåé¡åã³ãã®ä»çµã¿èªäœã®èŠçŽãã®å¿
èŠæ§ãææããã®ã¯æ¬ä»¶éžæã®çŽ9ãæåã®ããšã§ããïŒãã®å€ç€ºã®äžã§ãèšåãããŠããããã«ïŒéžæå¶åºŠã®ä»çµã¿èªäœã®èŠçŽãã«ã€ããŠã¯ïŒåè°é¢ã®åšãæ¹ããèžãŸããé«åºŠã«æ¿æ²»çãªå€æãæ±ãããããªã©ïŒäºæã®æ§è³ªäžèª²é¡ãå€ããããã®æ€èšã«çžå¿ã®æéãèŠããããšã¯èªããããåŸãªãããšïŒåè°é¢ã«ãããŠïŒåå€æ±ºã®è¶£æšãèžãŸãïŒåè°é¢æ¹é©åè°äŒã®äžã«èšçœ®ãããå°éå§å¡äŒã«ãããåè°ãããããªã©ïŒéžæå¶åºŠã®ä»çµã¿èªäœã®èŠçŽããå«ãå¶åºŠæ¹é©ã«åããŠã®æ€èšãè¡ãããŠããããšïŒãªãïŒæ¬ä»¶éžæåŸã«åœäŒã«æåºãããå
¬è·éžææ³ã®äžéšãæ¹æ£ããæ³åŸæ¡ã¯ïŒåã«4éžæåºã§å®æ°ã4å¢4æžãããã®ã«ãšã©ãŸããïŒãã®éåã«ã¯éžæå¶åºŠã®ææ¬çãªèŠçŽãã«ã€ããŠåŒãç¶ãæ€èšãè¡ãæšã®èŠå®ã眮ãããŠãããïŒãªã©ãèæ
®ãããšïŒ'''æ¬ä»¶éžæãŸã§ã®éã«æ¬ä»¶å®æ°é
åèŠå®ãæ¹æ£ããªãã£ãããšãåœäŒã®è£éæš©ã®éçãè¶
ãããã®ãšã¯ãããïŒæ¬ä»¶å®æ°é
åèŠå®ãæ²æ³ã«éåããã«è³ã£ãŠãããšããããšã¯ã§ããªã'''ã
#<span id="éå«¡åºåéæ²"/>[https://www.courts.go.jp/app/hanrei_jp/detail2?id=83520 éºç£åå²å¯©å€ã«å¯Ÿããæåæ£åŽæ±ºå®ã«å¯Ÿããç¹å¥æåäºä»¶]([[w:å©å€åçžç¶å·®å¥èšŽèš|å©å€åçžç¶å·®å¥èšŽèš]] æé«è£æ±ºå® å¹³æ25幎9æ4æ¥ æ°é第67å·»6å·1320é )[[æ¥æ¬åœæ²æ³ç¬¬81æ¡|æ²æ³81æ¡]]ã[[æ°æ³ç¬¬900æ¡|æ°æ³ç¬¬900æ¡]]
##'''æ°æ³900æ¡4å·ãã ãæžå段ã®èŠå®ãšæ²æ³14æ¡1é
'''
##:æ°æ³900æ¡4å·ãã ãæžå段ã®èŠå®ã¯ïŒé
ããšãå¹³æ13幎7æåœæã«ãããŠïŒæ²æ³14æ¡1é
ã«éåããŠããã
##:*æ¬ä»¶èŠå®ã®åçæ§ã«é¢é£ãã以äžã®ãããªçš®ã
ã®äºæã®å€é·çã¯ïŒãã®äžã®ããããäžã€ãæããŠïŒæ¬ä»¶èŠå®ã«ããæ³å®çžç¶åã®åºå¥ãäžåçãšãã¹ã決å®çãªçç±ãšãåŸããã®ã§ã¯ãªãããããïŒæå22幎æ°æ³æ¹æ£æããçŸåšã«è³ããŸã§ã®éã®ç€ŸäŒã®ååïŒæãåœã«ããã家æ圢æ
ã®å€æ§åãããã«äŒŽãåœæ°ã®æèã®å€åïŒè«žå€åœã®ç«æ³ã®ããå¢åã³æãåœãæ¹åããæ¡çŽã®å
容ãšããã«åºã¥ãèšçœ®ãããå§å¡äŒããã®ææïŒå«¡åºåãšå«¡åºã§ãªãåã®åºå¥ã«é¢ããæ³å¶çã®å€åïŒæŽã«ã¯ãããŸã§ã®åœå¯©å€äŸã«ããã床éãªãåé¡ã®ææçãç·åçã«èå¯ããã°ïŒå®¶æãšããå
±åäœã®äžã«ãããå人ã®å°éãããæ確ã«èªèãããŠããããšã¯æããã§ãããšãããããããŠïŒæ³åŸå©ãšããå¶åºŠèªäœã¯æãåœã«å®çããŠãããšããŠãïŒäžèšã®ãããªèªèã®å€åã«äŒŽãïŒäžèšå¶åºŠã®äžã§<u>ç¶æ¯ãå©å§»é¢ä¿ã«ãªãã£ããšããïŒåã«ãšã£ãŠã¯èªãéžæãªããä¿®æ£ããäœå°ã®ãªãäºæãçç±ãšããŠãã®åã«äžå©çãåãŒãããšã¯èš±ãããïŒåãå人ãšããŠå°éãïŒãã®æš©å©ãä¿éãã¹ãã§ãã</u>ãšããèãã確ç«ãããŠããŠãããã®ãšããããšãã§ããã
##'''æ°æ³900æ¡4å·ãã ãæžå段ã®èŠå®ãéæ²ãšããæé«è£å€æã®å€æãä»ã®çžç¶ã«ãããäžèšèŠå®ãåæãšããæ³åŸé¢ä¿ã«åãŒã圱é¿'''
##:æ°æ³900æ¡4å·ãã ãæžå段ã®èŠå®ãé
ããšãå¹³æ13幎7æåœæã«ãããŠæ²æ³14æ¡1é
ã«éåããŠãããšããæé«è£å€æã®å€æã¯ïŒäžèšåœæããåå€ææãŸã§ã®éã«éå§ãããä»ã®çžç¶ã«ã€ãïŒåå·ãã ãæžå段ã®èŠå®ãåæãšããŠãããéºç£ã®åå²ã®å¯©å€ãã®ä»ã®è£å€ïŒéºç£ã®åå²ã®åè°ãã®ä»ã®åæçã«ãã確å®çãªãã®ãšãªã£ãæ³åŸé¢ä¿ã«åœ±é¿ãåãŒããã®ã§ã¯ãªãã
#<span id="å¹³æ27幎å€æ±º"/>[https://www.courts.go.jp/app/hanrei_jp/detail2?id=85547 æå®³è³ åè«æ±äºä»¶]ïŒæé«è£å€§æ³å»·å€æ±ºå¹³æ27幎12æ16æ¥ãã'''å¹³æ27幎å€æ±º'''ãïŒ[[æ¥æ¬åœæ²æ³ç¬¬24æ¡|æ²æ³24æ¡]]ïŒ[[æ°æ³ç¬¬733æ¡|æ°æ³733æ¡]]ïŒ[[æ°æ³ç¬¬772æ¡|æ°æ³772æ¡]]ïŒåœå®¶è³ åæ³1æ¡1é
##'''æ°æ³733æ¡1é
ã®èŠå®ã®ãã¡100æ¥ã®åå©çŠæ¢æéãèšããéšåãšæ²æ³14æ¡1é
ã24æ¡2é
'''
##:æ°æ³733æ¡1é
ã®èŠå®ã®ãã¡100æ¥ã®åå©çŠæ¢æéãèšããéšåã¯æ²æ³14æ¡1é
ã24æ¡2é
ã«éåããªãã
##:*[[æ°æ³ç¬¬772æ¡|æ°æ³772æ¡]]2é
ã¯ïŒãå©å§»ã®æç«ã®æ¥ãã200æ¥ãçµéããåŸåã¯å©å§»ã®è§£æ¶è¥ããã¯åæ¶ãã®æ¥ãã300æ¥ä»¥å
ã«çãŸããåã¯ïŒå©å§»äžã«æèãããã®ãšæšå®ãããããšèŠå®ããŠïŒåºç£ã®ææããéç®ããŠæèã®ææãæšå®ãïŒãã®çµæå©å§»äžã«æèãããã®ãšæšå®ãããåã«ã€ããŠïŒåæ¡1é
ãã劻ãå©å§»äžã«æèããåã¯ïŒå€«ã®åãšæšå®ãããããšèŠå®ããŠããããããããšïŒå¥³æ§ã®åå©åŸã«çãŸããåã«ã€ããŠã¯ïŒèšç®äž100æ¥ã®åå©çŠæ¢æéãèšããããšã«ãã£ãŠïŒç¶æ§ã®æšå®ã®éè€ãåé¿ãããããšã«ãªãã
##'''æ°æ³733æ¡1é
ã®èŠå®ã®ãã¡100æ¥ãè¶
ããŠåå©çŠæ¢æéãèšããéšåãšæ²æ³14æ¡1é
ã24æ¡2é
'''
##:æ°æ³733æ¡1é
ã®èŠå®ã®ãã¡100æ¥ãè¶
ããŠåå©çŠæ¢æéãèšããéšåã¯ïŒå¹³æ20幎åœæã«ãããŠãæ²æ³14æ¡1é
ã24æ¡2é
ã«éåããã«è³ã£ãŠããã
##:*æ¬ä»¶èŠå®ã®ãã¡100æ¥è¶
ééšåã¯ïŒé
ããšãäžå人ãåå©ã解æ¶ããæ¥ãã100æ¥ãçµéããæç¹ãŸã§ã«ã¯ïŒå©å§»åã³å®¶æã«é¢ããäºé
ã«ã€ããŠåœäŒã«èªããããåççãªç«æ³è£éã®ç¯å²ãè¶
ãããã®ãšããŠïŒãã®ç«æ³ç®çãšã®é¢é£ã«ãããŠåçæ§ãæ¬ ããã®ã«ãªã£ãŠãããšè§£ãããã
#<span id="倫婊å¥å§"></span>[https://www.courts.go.jp/app/hanrei_jp/detail2?id=85546 æå®³è³ åè«æ±äºä»¶](倫婊å¥å§ãæ±ãããã® æé«è£å€æ±º å¹³æ27幎12æ16æ¥ æ°é第69å·»8å·2586é )[[æ¥æ¬åœæ²æ³ç¬¬13æ¡#倫婊å¥å§|æ²æ³13æ¡]]1é
ã[[æ¥æ¬åœæ²æ³ç¬¬24æ¡#倫婊å¥å§|æ²æ³24æ¡]]ã[[æ°æ³ç¬¬750æ¡#倫婊å¥å§|æ°æ³ç¬¬750æ¡]]
#;æ°æ³750æ¡ãšæ²æ³14æ¡
#:æ°æ³750æ¡ã¯æ²æ³14æ¡ã«éåããªãã
#:*æ¬ä»¶èŠå®ã¯ïŒå€«å©Šã倫åã¯åŠ»ã®æ°ã称ãããã®ãšããŠããïŒå€«å©Šããããã®æ°ã称ãããã倫婊ãšãªãããšããè
ã®éã®åè°ã«å§ããŠããã®ã§ãã£ãŠïŒãã®æèšäžæ§å¥ã«åºã¥ãæ³çãªå·®å¥çåæ±ããå®ããŠããããã§ã¯ãªãïŒæ¬ä»¶èŠå®ã®å®ãã倫婊åæ°å¶ããèªäœã«ç·å¥³éã®åœ¢åŒçãªäžå¹³çãååšããããã§ã¯ãªããæãåœã«ãããŠïŒå€«å©Šãšãªãããšããè
ã®éã®åã
ã®åè°ã®çµæãšããŠå€«ã®æ°ãéžæãã倫婊ãå§åçå€æ°ãå ããããšãèªãããããšããŠãïŒãããïŒæ¬ä»¶èŠå®ã®åšãæ¹èªäœããçããçµæã§ãããšããããšã¯ã§ããªãã
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³|æ¥æ¬åœæ²æ³]]
|[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³#3|第3ç« åœæ°ã®æš©å©åã³çŸ©å]]
|[[æ¥æ¬åœæ²æ³ç¬¬13æ¡]]<br>ãå人ã®å°å³ãšå
Œ
±ã®çŠç¥ã
|[[æ¥æ¬åœæ²æ³ç¬¬15æ¡]]<br>ãå
¬åå¡ã®éžå®ã»çœ·å
æš©ãå
¬åå¡ã®å
šäœå¥ä»è
æ§ãæ®ééžæã®ä¿éãç§å¯éžæã®ä¿éã
}}
{{stub|law}}
[[category:æ¥æ¬åœæ²æ³|14]] | 2023-04-20T10:42:41Z | 2024-03-23T06:04:11Z | [
"ãã³ãã¬ãŒã:Wikipedia",
"ãã³ãã¬ãŒã:Main",
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E6%97%A5%E6%9C%AC%E5%9B%BD%E6%86%B2%E6%B3%95%E7%AC%AC14%E6%9D%A1 |
37,612 | æ¥æ¬åœæ²æ³ç¬¬11æ¡ | æ³åŠ>æ²æ³>æ¥æ¬åœæ²æ³>ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³
ãåºæ¬ç人暩ã®äº«æã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ²æ³>æ¥æ¬åœæ²æ³>ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ãåºæ¬ç人暩ã®äº«æã",
"title": "æ¡æ"
}
] | æ³åŠïŒæ²æ³ïŒæ¥æ¬åœæ²æ³ïŒã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³ | [[æ³åŠ]]ïŒ[[æ²æ³]]ïŒ[[æ¥æ¬åœæ²æ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³]]
==æ¡æ==
ãåºæ¬ç人暩ã®äº«æã
;第11æ¡
:åœæ°ã¯ããã¹ãŠã®åºæ¬ç人暩ã®äº«æã劚ããããªãããã®æ²æ³ãåœæ°ã«ä¿éããåºæ¬ç人暩ã¯ã䟵ãããšã®ã§ããªãæ°žä¹
ã®æš©å©ãšããŠãçŸåšåã³å°æ¥ã®åœæ°ã«äžãžãããã
==解説==
{{wikipedia|æ¥æ¬åœæ²æ³ç¬¬11æ¡}}
==åç
§æ¡æ==
==å€äŸ==
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=50540 è·æ¥å®å®æ³éå](æé«è£å€æ±º æå33幎5æ6æ¥ åé12å·»7å·1351é )[[æ¥æ¬åœæ²æ³ç¬¬11æ¡|æ²æ³11æ¡]]ã[[æ¥æ¬åœæ²æ³ç¬¬18æ¡|æ²æ³18æ¡]]ã[[åæ³ç¬¬18æ¡]]
#;åæ³ç¬¬18æ¡ã¯ãæ²æ³ç¬¬11æ¡ã第13æ¡ã第18æ¡ã«éåããã
#:åæ³ç¬¬18æ¡ã¯ãæ²æ³ç¬¬11æ¡ã第13æ¡ã第18æ¡ã«éåããªãã
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=51296 åºå³¶åžéå£è¡é²åã³éå£ç€ºåšéåã«é¢ããæ¡äŸéåãå
¬åå·è¡åŠšå®³](æé«è£å€æ±º æå35幎7æ20æ¥ åé14å·»9å·1197é )[[æ¥æ¬åœæ²æ³ç¬¬21æ¡|æ²æ³21æ¡]],[[æ¥æ¬åœæ²æ³ç¬¬11æ¡|æ²æ³11æ¡]]
#;æå25幎åºå³¶åžæ¡äŸç¬¬32å·éå£è¡é²åã³éå£ç€ºåšéåã«é¢ããæ¡äŸã®åæ²æ§ã
#:æå25幎åºå³¶åžæ¡äŸç¬¬32å·éå£è¡é²åã³éå£ç€ºåšéåã«é¢ããæ¡äŸã¯ãæ²æ³ç¬¬21æ¡ã第11æ¡ã第13æ¡ã«éåããªãã
#:*æ¬æ¡äŸã®å¯Ÿè±¡ãšããéå£è¡åããšãã«éå£ç€ºåšéåã¯ãæ¬æ¥å¹³ç©ã«ã秩åºãéãããŠãªããã¹ãçŽç²ãªãè¡šçŸã®èªç±ã®è¡äœ¿ã®ç¯å²ãéžè±ããéã²ã€ãä¹±ããæŽåã«çºå±ããå±éºæ§ã®ããç©ççåãå
å
ããŠãããã®ã§ãããåŸã€ãŠããã«é¢ããããçšåºŠã®æ³çèŠå¶ã¯å¿
èŠã§ãªããšã¯ãããªãããã®éçšã®åŠäœã«ãã€ãŠã¯æ²æ³21æ¡ã®ä¿éããè¡šçŸã®èªç±ã®ä¿éã䟵ãå±éºã絶察ã«å
èµããªããšã¯ãããªãããæ¿«çšã®èããããåŸããããšãã€ãŠãæ¬æ¡äŸãæ²æ³21æ¡ã«éåãããã®ãšã¯ãããªããããŠã¿ãã°æ¬æ¡äŸãæ²æ³11æ¡ã13æ¡ã«éåãããšãããªãããšãæããã§ããã
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³|æ¥æ¬åœæ²æ³]]
|[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³#3|第3ç« åœæ°ã®æš©å©åã³çŸ©å]]
|[[æ¥æ¬åœæ²æ³ç¬¬10æ¡]]<br>ãåœæ°ã®èŠä»¶ã
|[[æ¥æ¬åœæ²æ³ç¬¬12æ¡]]<br>ãèªç±ã»æš©å©ã®ä¿æ責任ãšãã®æ¿«çšã®çŠæ¢ã
}}
{{stub|law}}
[[category:æ¥æ¬åœæ²æ³|11]] | 2023-04-20T14:39:53Z | 2023-04-20T14:39:53Z | [
"ãã³ãã¬ãŒã:Wikipedia",
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E6%97%A5%E6%9C%AC%E5%9B%BD%E6%86%B2%E6%B3%95%E7%AC%AC11%E6%9D%A1 |
37,614 | æ¥æ¬åœæ²æ³ç¬¬35æ¡ | æ³åŠ>æ²æ³>æ¥æ¬åœæ²æ³>ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³
ãäœå±
ã®äŸµå
¥ãæ玢ã»æŒåã®èŠä»¶ã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ²æ³>æ¥æ¬åœæ²æ³>ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ãäœå±
ã®äŸµå
¥ãæ玢ã»æŒåã®èŠä»¶ã",
"title": "æ¡æ"
}
] | æ³åŠïŒæ²æ³ïŒæ¥æ¬åœæ²æ³ïŒã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³ | [[æ³åŠ]]ïŒ[[æ²æ³]]ïŒ[[æ¥æ¬åœæ²æ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³]]
==æ¡æ==
ãäœå±
ã®äŸµå
¥ãæ玢ã»æŒåã®èŠä»¶ã
;第35æ¡
#äœäººãããã®äœå±
ãæžé¡åã³ææåã«ã€ããŠã䟵å
¥ãæ玢åã³æŒåãåããããšã®ãªãæš©å©ã¯ã[[æ¥æ¬åœæ²æ³ç¬¬33æ¡|第33æ¡]]ã®å Žåãé€ããŠã¯ãæ£åœãªçç±ã«åºããŠçºããããäžã€æ玢ããå Žæåã³æŒåããç©ãæ瀺ãã什ç¶ããªããã°ã䟵ãããªãã
#æ玢åã¯æŒåã¯ãæš©éãæããåžæ³å®æ²ãçºããåå¥ã®ä»€ç¶ã«ããããããè¡ãµã
==解説==
{{wikipedia|æ¥æ¬åœæ²æ³ç¬¬35æ¡}}
==åç
§æ¡æ==
==å€äŸ==
#<span id="京éœåºåŠé£äºä»¶"></span>[https://www.courts.go.jp/app/hanrei_jp/detail2?id=51765 å
¬åå·è¡åŠšå®³ãå·å®³]([[w:京éœåºåŠé£äºä»¶|京éœåºåŠé£äºä»¶]] æé«è£å€æ±º æå44幎12æ24æ¥ åé23å·»12å·1625é )[[æ¥æ¬åœæ²æ³ç¬¬13æ¡|æ²æ³13æ¡]]
##æå29幎京éœåžæ¡äŸç¬¬10å·éäŒãéå£è¡é²åã³éå£ç€ºåšéåã«é¢ããæ¡äŸã®åæ²æ§
##:æå29幎京éœåžæ¡äŸç¬¬10å·éäŒãéå£è¡é²åã³éå£ç€ºåšéåã«é¢ããæ¡äŸã¯ãæ²æ³21æ¡ã«éåããªãã
##'''ã¿ã ãã«å®¹ãŒãçãæ®åœ±ãããªãèªç±ãšæ²æ³13æ¡'''
##:äœäººãããã®æ¿è«Ÿãªãã«ãã¿ã ãã«ãã®å®¹ãŒãã»å§¿æ
ãæ®åœ±ãããªãèªç±ãæããèŠå¯å®ããæ£åœãªçç±ããªãã®ã«ãå人ã®å®¹ãŒãçãæ®åœ±ããããšã¯ãæ²æ³13æ¡ã®è¶£æšã«åãèš±ãããªãã
##:*æ²æ³13æ¡ã¯ãåœæ°ã®ç§ç掻äžã®èªç±ããèŠå¯æš©çã®åœå®¶æš©åã®è¡äœ¿ã«å¯ŸããŠãä¿è·ããŠããã
##:*å人ã®ç§ç掻äžã®èªç±ã®äžã€ãšããŠãäœäººãããã®æ¿è«Ÿãªãã«ãã¿ã ãã«ãã®å®¹ãŒãã»æ
姿ãæ®åœ±ãããªãèªç±ãæããã
##'''ç¯çœªææ»ã®ãã容ãŒãçã®åçæ®åœ±ã蚱容ãããé床ãšæ²æ³13æ¡ã35æ¡'''
##:èŠå¯å®ã«ããå人ã®å®¹ãŒãçã®åçæ®åœ±ã¯ãçŸã«ç¯çœªãè¡ãªãããããã¯è¡ãªãããã®ã¡éããªããšèªããããå Žåã§ãã€ãŠã蚌æ ä¿å
šã®å¿
èŠæ§ããã³ç·æ¥æ§ãããããã®æ®åœ±ãäžè¬çã«èš±å®¹ãããé床ããããªãçžåœãªæ¹æ³ããã€ãŠè¡ãªããããšãã¯ãæ®åœ±ãããæ¬äººã®åæããªãããŸãè£å€å®ã®ä»€ç¶ããªããŠããæ²æ³äžäžæ¡ãäžäºæ¡ã«éåããªãã
##:*èŠå¯å®ãç¯çœªææ»ã®å¿
èŠäžåçãæ®åœ±ããéã«ãç¯äººã®ã¿ãªãã第äžè
ã§ããå人ãå«ãŸããŠãããšããŠãã蚱容ãããå ŽåãããåŸãã
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³|æ¥æ¬åœæ²æ³]]
|[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³#3|第3ç« åœæ°ã®æš©å©åã³çŸ©å]]
|[[æ¥æ¬åœæ²æ³ç¬¬34æ¡]]<br>ãæçã»æçŠã®èŠä»¶ãæçŠçç±ã®é瀺ã
|[[æ¥æ¬åœæ²æ³ç¬¬36æ¡]]<br>ãæ·åã»æ®èåã®çŠæ¢ã
}}
{{stub|law}}
[[category:æ¥æ¬åœæ²æ³|35]] | 2023-04-20T16:03:21Z | 2023-09-12T04:22:07Z | [
"ãã³ãã¬ãŒã:Wikipedia",
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E6%97%A5%E6%9C%AC%E5%9B%BD%E6%86%B2%E6%B3%95%E7%AC%AC35%E6%9D%A1 |
37,615 | æ¥æ¬åœæ²æ³ç¬¬25æ¡ | æ³åŠ>æ²æ³>æ¥æ¬åœæ²æ³>ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³
ãåœæ°ã®çåæš©ãåœã®ç€ŸäŒä¿éç矩åã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ²æ³>æ¥æ¬åœæ²æ³>ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ãåœæ°ã®çåæš©ãåœã®ç€ŸäŒä¿éç矩åã",
"title": "æ¡æ"
}
] | æ³åŠïŒæ²æ³ïŒæ¥æ¬åœæ²æ³ïŒã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³ | [[æ³åŠ]]ïŒ[[æ²æ³]]ïŒ[[æ¥æ¬åœæ²æ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³]]
==æ¡æ==
ãåœæ°ã®çåæš©ãåœã®ç€ŸäŒä¿éç矩åã
;第25æ¡
#ãã¹ãŠåœæ°ã¯ãå¥åº·ã§æåçãªæäœé床ã®ç掻ãå¶ãæš©å©ãæããã
#åœã¯ããã¹ãŠã®ç掻éšé¢ã«ã€ããŠã瀟äŒçŠç¥ã瀟äŒä¿éåã³å
¬è¡è¡çã®åäžåã³å¢é²ã«åªããªããã°ãªããªãã
==解説==
{{wikipedia|æ¥æ¬åœæ²æ³ç¬¬25æ¡}}
==åç
§æ¡æ==
==å€äŸ==
#[https://www.courts.go.jp/app/hanrei_jp/detail2?id=56515 é£ç³§ç®¡çæ³éå] æé«è£å€æ±º æå23幎9æ29æ¥)
#;é£ç³§ç®¡çæ³ã®åæ²æ§ãšæ²æ³ç¬¬25æ¢ç¬¬1é
#:æ²æ³ç¬¬25æ¢ç¬¬1é
ã¯ããã¹ãŠã®åæ°ãå¥åº·ã§æåçãªæäœé床ã®ç掻ãçã¿åŸãããåæ¿ãéçãã¹ãããšãå家ã®è²¬åãšããŠå®£èšãããã®ã§ãããããªãã¡åæ°ã¯ãåæ°äžè¬ã«å°ããŠæŠæ¬çã«ããã責åãè² æããããåæ¿äžã®ä»»åãšããã®ã§ããããã©ããåã
ã®åæ°ã«å°ããŠå
·é«çã«ããã矩åãæãããã®ã§ã¯ãªããããã°ãäžå人ããå³æ²æ³ã®èŠå®ããçŽæ¥ã«çŸå¯Šçãªç掻æ¬ãä¿éããããäžè¶³é£ç³§ã®è³Œå
¥éæ¬ã¯ç掻æ¬ã®è¡äœ¿ã§ããããããããéæ³ãªããšããé£ç³§ç®¡çæ³ã®èŠå®ã¯æ²æ³éåã§ãããšè«ããã®ã¯ãåæ¢ã®èª€è§£ã«åºãè«æšã§ãã€ãŠæ¡çšããããšãåŸãªããåæ³ã¯ãåæ°å
šè¬ã®çŠç¥ã®ãããèœãéããã®ç掻æ¢ä»¶ãå®å®ããããããã®æ³åŸã§ãã€ãŠããŸãã«æ²æ³ç¬¬25æ¢ã®è¶£æšã«é©åããç«æ³ã§ãããšèšããªããã°ãªããªããããã°ãåæ³ãæããŠéæ²ç¡å¹ã§ãããšãããšè«æšã¯ããã®é»ã«ãããŠã誀ãã§ããããšãæããã§ããã
#<span id="å æšèšŽèš"></span>[https://www.courts.go.jp/app/hanrei_jp/detail2?id=55154 æå®³è³ åç]([[w:å æšèšŽèš|å æšèšŽèš]] æé«è£å€æ±º æå57幎7æ7æ¥ æ°é36å·»7å·1235é )[[æ¥æ¬åœæ²æ³ç¬¬13æ¡#å æšèšŽèš|æ²æ³13æ¡]]ã[[æ¥æ¬åœæ²æ³ç¬¬14æ¡#å æšèšŽèš|æ²æ³14æ¡]]ãå
ç«¥æ¶é€æåœæ³ïŒæå48幎æ³åŸç¬¬93å·ã«ããæ¹æ£åã®ãã®ïŒ4æ¡3é
3å·
#;å
ç«¥æ¶é€æåœæ³4æ¡3é
3å·ãšæ²æ³25æ¡
#:å
ç«¥æ¶é€æåœæ³4æ¡3é
3å·ã¯æ²æ³25æ¡ã«éåããªãã
#:*æ²æ³25æ¡1é
ã¯ããã¹ãŠåœæ°ã¯ãå¥åº·ã§æåçãªæäœé床ã®ç掻ãå¶ãæš©å©ãæãããããšèŠå®ããŠãããããã®èŠå®ããããããçŠç¥åœå®¶ã®ç念ã«åºã¥ãããã¹ãŠã®åœæ°ãå¥åº·ã§æåçãªæäœé床ã®ç掻ãå¶ã¿ããããåœæ¿ãéå¶ãã¹ãããšãåœã®è²¬åãšããŠå®£èšãããã®ã§ããããšããŸããåæ¡äºé
ã¯ãåœã¯ããã¹ãŠã®ç掻éšé¢ã«ã€ããŠã瀟äŒçŠç¥ã瀟äŒä¿éåã³å
¬è¡è¡çã®åäžåã³å¢é²ã«åªããªããã°ãªããªããããšèŠå®ããŠãããããã®èŠå®ããåããçŠç¥åœå®¶ã®ç念ã«åºã¥ãã瀟äŒçç«æ³åã³ç€ŸäŒçæœèšã®åµé æ¡å
ã«åªåãã¹ãããšãåœã®è²¬åãšããŠå®£èšãããã®ã§ããããšããããŠãåæ¡äžé
ã¯ãåœãåã
ã®åœæ°ã«å¯ŸããŠå
·äœçã»çŸå®çã«å³ã®ãããªçŸ©åãæããããšãèŠå®ãããã®ã§ã¯ãªããåæ¡äºé
ã«ãã€ãŠåœã®è²¬åã§ãããšãããŠãã瀟äŒçç«æ³åã³ç€ŸäŒçæœèšã®åµé æ¡å
ã«ããåã
ã®åœæ°ã®å
·äœçã»çŸå®çãªç掻暩ãèšå®å
å®ãããŠãããã®ã§ãããšè§£ãã¹ãã
#:*æ²æ³25æ¡ã®èŠå®ã¯ãåœæš©ã®äœçšã«å¯Ÿããäžå®ã®ç®çãèšå®ããã®å®çŸã®ããã®ç©æ¥µçãªçºåãæåŸ
ãããšããæ§è³ªã®ãã®ã§ãããããããå³èŠå®ã«ãããå¥åº·ã§æåçãªæäœé床ã®ç掻ããªããã®ã¯ãããããŠæœè±¡çã»çžå¯ŸçãªæŠå¿µã§ãã€ãŠããã®å
·äœçå
容ã¯ããã®æã
ã«ãããæåã®çºéã®çšåºŠãçµæžçã»ç€ŸäŒçæ¡ä»¶ãäžè¬çãªåœæ°ç掻ã®ç¶æ³çãšã®çžé¢é¢ä¿ã«ãããŠå€æ決å®ãããã¹ããã®ã§ãããšãšãã«ãå³èŠå®ãçŸå®ã®ç«æ³ãšããŠå
·äœåããã«åœãã€ãŠã¯ãåœã®è²¡æ¿äºæ
ãç¡èŠããããšãã§ããããŸããå€æ¹é¢ã«ãããè€éå€æ§ãªããããé«åºŠã®å°éæè¡çãªèå¯ãšããã«åºã¥ããæ¿ççå€æãå¿
èŠãšãããã®ã§ããããããã€ãŠãæ²æ³25æ¡ã®èŠå®ã®è¶£æšã«ããããŠå
·äœçã«ã©ã®ãããªç«æ³æªçœ®ãè¬ãããã®éžæ決å®ã¯ãç«æ³åºã®åºãè£éã«ãã ããããŠããããããèããåçæ§ãæ¬ ãæããã«è£éã®éžè±ã»æ¿«çšãšèŠãããããªããããªå Žåãé€ããè£å€æã審æ»å€æããã®ã«é©ããªãäºæã§ããã
#:*瀟äŒä¿é絊ä»ã®å
šè¬çå
¬å¹³ãå³ãããå
¬ç幎éçžäºéã«ããã䜵絊調æŽãè¡ããã©ããã¯ãç«æ³åºã®è£éã®ç¯å²ã«å±ããäºæãšèŠãã¹ãã§ããããŸãããã®çš®ã®ç«æ³ã«ããã絊ä»é¡ã®æ±ºå®ããç«æ³æ¿çäžã®è£éäºé
ã§ããããããäœé¡ã§ãããããšãã€ãŠåœç¶ã«æ²æ³25æ¡éåã«çµã³ã€ããã®ãšããããšã¯ã§ããªãã
----
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³|æ¥æ¬åœæ²æ³]]
|[[ã³ã³ã¡ã³ã¿ãŒã«æ¥æ¬åœæ²æ³#3|第3ç« åœæ°ã®æš©å©åã³çŸ©å]]
|[[æ¥æ¬åœæ²æ³ç¬¬24æ¡]]<br>ã家æç掻ã«ãããå人ã®å°å³ãäž¡æ§ã®å¹³çã
|[[æ¥æ¬åœæ²æ³ç¬¬26æ¡]]<br>ãæè²ãåããæš©å©ãæè²ã®çŸ©åã
}}
{{stub|law}}
[[category:æ¥æ¬åœæ²æ³|25]] | 2023-04-20T16:31:46Z | 2023-04-20T16:31:46Z | [
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub",
"ãã³ãã¬ãŒã:Wikipedia"
] | https://ja.wikibooks.org/wiki/%E6%97%A5%E6%9C%AC%E5%9B%BD%E6%86%B2%E6%B3%95%E7%AC%AC25%E6%9D%A1 |
37,653 | é¯èª€ | æ³åŠ>æ°äºæ³>æ°æ³>æ°æ³ç·å>æ³åŸè¡çº>ææ衚瀺>é¯èª€ | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ°äºæ³>æ°æ³>æ°æ³ç·å>æ³åŸè¡çº>ææ衚瀺>é¯èª€",
"title": ""
}
] | æ³åŠïŒæ°äºæ³ïŒæ°æ³ïŒæ°æ³ç·åïŒæ³åŸè¡çºïŒææ衚瀺ïŒé¯èª€ | {{otheruses|æ°äºæ³ã«ãããé¯èª€|åæ³ã«ãããé¯èª€|é¯èª€è«}}
[[æ³åŠ]]ïŒ[[æ°äºæ³]]ïŒ[[æ°æ³]]ïŒ[[æ°æ³ç·å]]ïŒ[[æ³åŸè¡çº]]ïŒ[[ææ衚瀺]]ïŒ'''é¯èª€'''
{{wikipedia|é¯èª€ (æ°æ³)}}
== ç·èª¬ ==
*[[æ°æ³ç¬¬95æ¡]]
== èŠä»¶ ==
:èŠçŽ ã®é¯èª€
=== åæ©ã®é¯èª€ ===
== å¹æ ==
{{stub|law}}
[[category:æ°æ³|ããã]] | 2023-04-22T15:22:43Z | 2023-04-22T15:22:43Z | [
"ãã³ãã¬ãŒã:Stub",
"ãã³ãã¬ãŒã:Otheruses",
"ãã³ãã¬ãŒã:Wikipedia"
] | https://ja.wikibooks.org/wiki/%E9%8C%AF%E8%AA%A4 |
37,666 | Visual Basic .NET | ãã®ãã¥ãŒããªã¢ã«ã¯ãVisual Basic .NETã®åºç€ãåŠã¶ããã®ãã®ã§ãã Visual Basic .NETã¯ãMicrosoftãæäŸãããªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã§ããã Windowsã¢ããªã±ãŒã·ã§ã³ã®éçºã«åºã䜿çšãããŠããŸãã ãã®ãã¥ãŒããªã¢ã«ã§ã¯ãåå¿è
åãã«ãåºæ¬çãªæŠå¿µãææ³ãããã³ããã°ã©ãã³ã°æè¡ãåŠã¶ããšãã§ããŸãã ãŸããå®éã®ããã°ã©ãã³ã°ã®åé¡ã«åãçµãããšã§ãå®è·µçãªã¹ãã«ã身ã«ã€ããããšãã§ããŸãã ãã®ãã¥ãŒããªã¢ã«ãçµãããšãVisual Basic .NETã§ç°¡åãªã¢ããªã±ãŒã·ã§ã³ãæ§ç¯ããããšãã§ããããã«ãªããŸãã
Visual Basic .NETãšã¯ãMicrosoftã«ãã£ãŠéçºãããããã°ã©ãã³ã°èšèªã§ãããVisual Studioãšããçµ±åéçºç°å¢ã§äœ¿çšãããŸãã Visual Basic .NETã¯ãGUIã¢ããªã±ãŒã·ã§ã³ãWebã¢ããªã±ãŒã·ã§ã³ãã²ãŒã éçºãªã©ãæ§ã
ãªçšéã«äœ¿çšãããŸãã Visual Basic .NETã¯.NET Frameworkã®äžéšã§ãããéçºè
ã.NETãåºç€ãšããã¢ããªã±ãŒã·ã§ã³ãéçºããããšãã§ããŸãã .NET Framework ã®åŸç¶ã® .Net Core ã§ã .NET Core 2.0 以éã§Visual Basic .NETã®ãµããŒããè¿œå ãããŸããã
Visual Basic .NETã«ã¯ãæ°å€ãæååãçåœå€ãæ¥ä»æå»ãªã©ã®ããŒã¿åããããŸãã以äžã«ãã䜿ãããããŒã¿åã瀺ããŸãã
å€æ°ã¯ãããŒã¿ãæ ŒçŽããå
¥ãç©ã§ããå€æ°ã宣èšããã«ã¯ãããŒã¿åãšå€æ°åãæå®ããŸããäŸãã°ã以äžã®ããã«å€æ°ã宣èšããŸãã
å€æ°ã宣èšãããšåæã«ãåæåããããšãã§ããŸãã
å®æ°ã¯ãå€æ°ãšåæ§ã«ããŒã¿ãæ ŒçŽãããã®ã§ããããã®å€ã¯å€æŽã§ããŸããã以äžã®ããã«å®æ°ã宣èšããŸãã
Visual Basic .NETã«ã¯ãååæŒç®ãæ¯èŒæŒç®ãè«çæŒç®ãªã©ã®æŒç®åããããŸãã以äžã«æŒç®åã®äŸã瀺ããŸãã
å¶åŸ¡æ§æã¯ãæ¡ä»¶åå²ãç¹°ãè¿ãåŠçãè¡ãããã®ãã®ã§ãã以äžã«å¶åŸ¡æ§æã®äŸã瀺ããŸãã
é
åã¯ãè€æ°ã®å€ããŸãšããŠæ±ãããã®ãã®ã§ãã以äžã®ããã«é
åã宣èšããŸãã
é
åã®èŠçŽ ã«ã¢ã¯ã»ã¹ããã«ã¯ãã€ã³ããã¯ã¹ãæå®ããŸãã
' ããè¡æ«ãŸã§ãã³ã¡ã³ãã§ãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "ãã®ãã¥ãŒããªã¢ã«ã¯ãVisual Basic .NETã®åºç€ãåŠã¶ããã®ãã®ã§ãã Visual Basic .NETã¯ãMicrosoftãæäŸãããªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã§ããã Windowsã¢ããªã±ãŒã·ã§ã³ã®éçºã«åºã䜿çšãããŠããŸãã ãã®ãã¥ãŒããªã¢ã«ã§ã¯ãåå¿è
åãã«ãåºæ¬çãªæŠå¿µãææ³ãããã³ããã°ã©ãã³ã°æè¡ãåŠã¶ããšãã§ããŸãã ãŸããå®éã®ããã°ã©ãã³ã°ã®åé¡ã«åãçµãããšã§ãå®è·µçãªã¹ãã«ã身ã«ã€ããããšãã§ããŸãã ãã®ãã¥ãŒããªã¢ã«ãçµãããšãVisual Basic .NETã§ç°¡åãªã¢ããªã±ãŒã·ã§ã³ãæ§ç¯ããããšãã§ããããã«ãªããŸãã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "Visual Basic .NETãšã¯ãMicrosoftã«ãã£ãŠéçºãããããã°ã©ãã³ã°èšèªã§ãããVisual Studioãšããçµ±åéçºç°å¢ã§äœ¿çšãããŸãã Visual Basic .NETã¯ãGUIã¢ããªã±ãŒã·ã§ã³ãWebã¢ããªã±ãŒã·ã§ã³ãã²ãŒã éçºãªã©ãæ§ã
ãªçšéã«äœ¿çšãããŸãã Visual Basic .NETã¯.NET Frameworkã®äžéšã§ãããéçºè
ã.NETãåºç€ãšããã¢ããªã±ãŒã·ã§ã³ãéçºããããšãã§ããŸãã .NET Framework ã®åŸç¶ã® .Net Core ã§ã .NET Core 2.0 以éã§Visual Basic .NETã®ãµããŒããè¿œå ãããŸããã",
"title": "ã¯ããã«"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "Visual Basic .NETã«ã¯ãæ°å€ãæååãçåœå€ãæ¥ä»æå»ãªã©ã®ããŒã¿åããããŸãã以äžã«ãã䜿ãããããŒã¿åã瀺ããŸãã",
"title": "åºæ¬æ§æã®è§£èª¬"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "å€æ°ã¯ãããŒã¿ãæ ŒçŽããå
¥ãç©ã§ããå€æ°ã宣èšããã«ã¯ãããŒã¿åãšå€æ°åãæå®ããŸããäŸãã°ã以äžã®ããã«å€æ°ã宣èšããŸãã",
"title": "åºæ¬æ§æã®è§£èª¬"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "å€æ°ã宣èšãããšåæã«ãåæåããããšãã§ããŸãã",
"title": "åºæ¬æ§æã®è§£èª¬"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "å®æ°ã¯ãå€æ°ãšåæ§ã«ããŒã¿ãæ ŒçŽãããã®ã§ããããã®å€ã¯å€æŽã§ããŸããã以äžã®ããã«å®æ°ã宣èšããŸãã",
"title": "åºæ¬æ§æã®è§£èª¬"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "Visual Basic .NETã«ã¯ãååæŒç®ãæ¯èŒæŒç®ãè«çæŒç®ãªã©ã®æŒç®åããããŸãã以äžã«æŒç®åã®äŸã瀺ããŸãã",
"title": "åºæ¬æ§æã®è§£èª¬"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "å¶åŸ¡æ§æã¯ãæ¡ä»¶åå²ãç¹°ãè¿ãåŠçãè¡ãããã®ãã®ã§ãã以äžã«å¶åŸ¡æ§æã®äŸã瀺ããŸãã",
"title": "åºæ¬æ§æã®è§£èª¬"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "é
åã¯ãè€æ°ã®å€ããŸãšããŠæ±ãããã®ãã®ã§ãã以äžã®ããã«é
åã宣èšããŸãã",
"title": "åºæ¬æ§æã®è§£èª¬"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "é
åã®èŠçŽ ã«ã¢ã¯ã»ã¹ããã«ã¯ãã€ã³ããã¯ã¹ãæå®ããŸãã",
"title": "åºæ¬æ§æã®è§£èª¬"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "' ããè¡æ«ãŸã§ãã³ã¡ã³ãã§ãã",
"title": "åºæ¬æ§æã®è§£èª¬"
}
] | ãã®ãã¥ãŒããªã¢ã«ã¯ãVisual Basic .NETã®åºç€ãåŠã¶ããã®ãã®ã§ãã
Visual Basic .NETã¯ãMicrosoftãæäŸãããªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã§ããã
Windowsã¢ããªã±ãŒã·ã§ã³ã®éçºã«åºã䜿çšãããŠããŸãã
ãã®ãã¥ãŒããªã¢ã«ã§ã¯ãåå¿è
åãã«ãåºæ¬çãªæŠå¿µãææ³ãããã³ããã°ã©ãã³ã°æè¡ãåŠã¶ããšãã§ããŸãã
ãŸããå®éã®ããã°ã©ãã³ã°ã®åé¡ã«åãçµãããšã§ãå®è·µçãªã¹ãã«ã身ã«ã€ããããšãã§ããŸãã
ãã®ãã¥ãŒããªã¢ã«ãçµãããšãVisual Basic .NETã§ç°¡åãªã¢ããªã±ãŒã·ã§ã³ãæ§ç¯ããããšãã§ããããã«ãªããŸãã | ãã®ãã¥ãŒããªã¢ã«ã¯ãVisual Basic .NETã®åºç€ãåŠã¶ããã®ãã®ã§ãã
Visual Basic .NETã¯ãMicrosoftãæäŸãããªããžã§ã¯ãæåããã°ã©ãã³ã°èšèªã§ããã
Windowsã¢ããªã±ãŒã·ã§ã³ã®éçºã«åºã䜿çšãããŠããŸãã
ãã®ãã¥ãŒããªã¢ã«ã§ã¯ãåå¿è
åãã«ãåºæ¬çãªæŠå¿µãææ³ãããã³ããã°ã©ãã³ã°æè¡ãåŠã¶ããšãã§ããŸãã
ãŸããå®éã®ããã°ã©ãã³ã°ã®åé¡ã«åãçµãããšã§ãå®è·µçãªã¹ãã«ã身ã«ã€ããããšãã§ããŸãã
ãã®ãã¥ãŒããªã¢ã«ãçµãããšãVisual Basic .NETã§ç°¡åãªã¢ããªã±ãŒã·ã§ã³ãæ§ç¯ããããšãã§ããããã«ãªããŸãã
__TOC__
== ã¯ããã« ==
=== Visual Basic .NETãšã¯ïŒ ===
Visual Basic .NETãšã¯ãMicrosoftã«ãã£ãŠéçºãããããã°ã©ãã³ã°èšèªã§ãããVisual Studioãšããçµ±åéçºç°å¢ã§äœ¿çšãããŸãã
Visual Basic .NETã¯ãGUIã¢ããªã±ãŒã·ã§ã³ãWebã¢ããªã±ãŒã·ã§ã³ãã²ãŒã éçºãªã©ãæ§ã
ãªçšéã«äœ¿çšãããŸãã
Visual Basic .NETã¯.NET Frameworkã®äžéšã§ãããéçºè
ã.NETãåºç€ãšããã¢ããªã±ãŒã·ã§ã³ãéçºããããšãã§ããŸãã
.NET Framework ã®åŸç¶ã® .Net Core ã§ã .NET Core 2.0 以éã§Visual Basic .NETã®ãµããŒããè¿œå ãããŸããã
== åºæ¬æ§æã®è§£èª¬ ==
=== ããŒã¿å ===
Visual Basic .NETã«ã¯ãæ°å€ãæååãçåœå€ãæ¥ä»æå»ãªã©ã®ããŒã¿åããããŸãã以äžã«ãã䜿ãããããŒã¿åã瀺ããŸãã
* IntegerïŒæŽæ°ïŒäŸ: 42ïŒ
* DoubleïŒæµ®åå°æ°ç¹æ° (äŸ: 3.14)
* BooleanïŒçåœå€ (äŸ: True ãŸã㯠False)
* CharïŒäžæå (äŸ: "A")
* StringïŒæåå (äŸ: "Hello, World!")
* DateïŒæ¥ä»æå» (äŸ: #2023/04/25 23:18:00#)
=== å€æ° ===
å€æ°ã¯ãããŒã¿ãæ ŒçŽããå
¥ãç©ã§ããå€æ°ã宣èšããã«ã¯ãããŒã¿åãšå€æ°åãæå®ããŸããäŸãã°ã以äžã®ããã«å€æ°ã宣èšããŸãã
:<syntaxhighlight lang=vb.net>
Dim age As Integer
age = 42
</syntaxhighlight>
å€æ°ã宣èšãããšåæã«ãåæåããããšãã§ããŸãã
:<syntaxhighlight lang=vb.net>
Dim message As String = "Hello, World!"
</syntaxhighlight>
=== å®æ° ===
å®æ°ã¯ãå€æ°ãšåæ§ã«ããŒã¿ãæ ŒçŽãããã®ã§ããããã®å€ã¯å€æŽã§ããŸããã以äžã®ããã«å®æ°ã宣èšããŸãã
:<syntaxhighlight lang=vb.net>
Const PI As Double = 3.14159
</syntaxhighlight>
=== æŒç®å ===
Visual Basic .NETã«ã¯ãååæŒç®ãæ¯èŒæŒç®ãè«çæŒç®ãªã©ã®æŒç®åããããŸãã以äžã«æŒç®åã®äŸã瀺ããŸãã
:<syntaxhighlight lang=vb.net>
Dim x As Integer = 10
Dim y As Integer = 3
Dim result As Integer
result = x + y ' 足ãç®
result = x - y ' åŒãç®
result = x * y ' æãç®
result = x / y ' å²ãç®
result = x ^ y ' ã¹ãä¹
result = x Mod y ' äœã
result = x > y ' ãã倧ãããã©ãã
result = x <= y ' 以äžãã©ãã
result = x And y ' AndæŒç®ïŒè«çç©ïŒ
result = x Or y ' OræŒç®ïŒè«çåïŒ
result = Not x ' NotæŒç®ïŒåŠå®ïŒ
</syntaxhighlight>
=== å¶åŸ¡æ§æ ===
å¶åŸ¡æ§æã¯ãæ¡ä»¶åå²ãç¹°ãè¿ãåŠçãè¡ãããã®ãã®ã§ãã以äžã«å¶åŸ¡æ§æã®äŸã瀺ããŸãã
==== æ¡ä»¶åå²ïŒIfæïŒ====
:<syntaxhighlight lang=vb.net>
Dim score As Integer = 80
If score >= 60 Then
Console.WriteLine("åæ Œ")
Else
Console.WriteLine("äžåæ Œ")
End If
</syntaxhighlight>
==== ç¹°ãè¿ãåŠçïŒForã«ãŒãïŒ ====
:<syntaxhighlight lang=vb.net>
For i As Integer = 1 To 10 Step 1
Console.WriteLine(i)
Next i
</syntaxhighlight>
==== é
å ====
é
åã¯ãè€æ°ã®å€ããŸãšããŠæ±ãããã®ãã®ã§ãã以äžã®ããã«é
åã宣èšããŸãã
:<syntaxhighlight lang=vb.net>
Dim numbers(4) As Integer
numbers(0) = 10
numbers(1) = 20
numbers(2) = 30
numbers(3) = 40
numbers(4) = 50
</syntaxhighlight>
é
åã®èŠçŽ ã«ã¢ã¯ã»ã¹ããã«ã¯ãã€ã³ããã¯ã¹ãæå®ããŸãã
:<syntaxhighlight lang=vb.net>
Console.WriteLine(numbers(0)) ' 10ãåºåããã
</syntaxhighlight>
==== ã³ã¡ã³ã ====
<code>'</code> ããè¡æ«ãŸã§ãã³ã¡ã³ãã§ãã
=== ãŸãšã ===
:<syntaxhighlight lang=vb.net>
' å€æ°
'' 宣èš
Dim <å€æ°å> As <ããŒã¿å>
'' 代å
¥
<å€æ°å> = <å€>
â å¶åŸ¡æ§é
ââ æ¡ä»¶åå²
âââ Ifæ
If <æ¡ä»¶åŒ1> Then
<åŠç1>
ElseIf <æ¡ä»¶åŒ2> Then
<åŠç2>
Else
<åŠç3>
End If
ââ ã«ãŒã
âââ Foræ
For <ã«ãŠã³ã¿å€æ°> = <éå§å€> To <çµäºå€>
<åŠç>
Next
âââ For Eachæ
For Each <å€æ°> In <ã³ã¬ã¯ã·ã§ã³>
<åŠç>
Next
âââ Whileæ
While <æ¡ä»¶åŒ>
<åŠç>
End While
</syntaxhighlight>
== é¢æ°ã®è§£èª¬ ==
=== é¢æ°ã®æžãæ¹ ===
=== åŒæ° ===
=== è¿ãå€ ===
=== ã©ã ãåŒ ===
:<syntaxhighlight lang=vb.net>
â é¢æ°ã»ãµãã«ãŒãã³
ââ é¢æ°
Function <é¢æ°å>(<åŒæ°1> As <ããŒã¿å1>, <åŒæ°2> As <ããŒã¿å2>) As <æ»ãå€ã®ããŒã¿å>
<åŠç>
Return <æ»ãå€>
End Function
'' ãµãã«ãŒãã³
Sub <ãµãã«ãŒãã³å>(<åŒæ°1> As <ããŒã¿å1>, <åŒæ°2> As <ããŒã¿å2>)
<åŠç>
End Sub
</syntaxhighlight>
{{ã³ã©ã |Visual Basic .NETã®ããŒãžã§ã³å±¥æŽ|2=Visual Basic .NETã®å称ãšããŒãžã§ã³ã®å€é·ã®æŠèŠã説æããŸãã
;2002幎ïŒVB 7.0ïŒ
:åã®ããŒãžã§ã³ã§ã.NET Framework 1.0ãããŒã¹ã«ããŠããã
:æãéèŠãªç¹åŸŽã¯ãããŒãžãã³ãŒãã§ãããããã¯åŸæ¥ã®Visual Basicãšã¯ç°ãªããã®ã§ãã£ãã
:Visual Basic .NETãšèªç§°ããŠããã®ã¯ããã®ããŒãžã§ã³ã®ã¿ã§ãããããã®åŸãVB6以åãVBAãšåºå¥ããããVisual Basic .NETãããã¯VB.NETãšåºã称ãããŠããã
;2003幎ïŒVB 7.1ïŒ
:.NET Framework 1.1ã§ãªãªãŒã¹ã
:.NET Compact Frameworkã®ãµããŒãè¿œå ããVBã®ã¢ããã°ã¬ãŒããŠã£ã¶ãŒãã®æ¹åãå«ãŸããã
:ããã©ãŒãã³ã¹ãšä¿¡é Œæ§ã®åäžãVisual Basic .NET 2003ã¯ç¹å®ã®åŠè
ã«ç¡åã§æäŸãããã
;2005幎ïŒVB 8.0ïŒ
:ã.NETãã®ååã補ååããåé€ããã次ã®ããŒãžã§ã³ã¯ãVisual Basic 2005ããšåŒã°ããã
:ããè¿
éãªã¢ããªã±ãŒã·ã§ã³éçºãã©ãããã©ãŒã ãšããŠã®VB.NETã®çŠç¹ã匷åãããããå€ãã®æ°æ©èœãè¿œå ãããã
;2008幎ïŒVB 9.0ïŒ
:.NET Framework 3.5ãšåæã«ãªãªãŒã¹ã
:æ¡ä»¶æŒç®åãIf(condition as boolean, truepart, falsepart)ãã®å°å
¥ãå¿ååãLINQã®ãµããŒããã©ã ãåŒãXMLãªãã©ã«ãåæšè«ãæ¡åŒµã¡ãœãããªã©ã®å€ãã®æ°æ©èœãè¿œå ãããã
;2010幎ïŒVB 10.0ïŒ
:Visual Basic 2010ããªãªãŒã¹ãããDynamic Language RuntimeïŒDLRïŒã®ä»£ããã«ãC#ãšã®ããªãã£ã匷åããæŠç¥ãæ¡çšãããã
:DLRã掻çšããCLRãCOMãªããžã§ã¯ããšã®åçãªå¯Ÿè©±èœåãåäžããã
;2012幎ïŒVB 11.0ïŒ
:.NET Framework 4.5ãšåæã«ãªãªãŒã¹ã
:éåæããã°ã©ãã³ã°ãã€ãã¬ãŒã¿ãåŒã³åºãéå±€ãåŒã³åºãå
æ
å ±ãªã©ã®äž»èŠãªæ©èœãå°å
¥ãããã
;2013幎ïŒVB 12.0ïŒ
:.NET Framework 4.5.1ãšå
±ã«ãªãªãŒã¹ã
:Visual Studio 2013ã§å©çšå¯èœã§ãéçºè
ããã¯ãã€ã³ã¹ããŒã«ããããšã§.NET Framework 4.5.2ã¢ããªã±ãŒã·ã§ã³ãæ§ç¯å¯èœã
;2015幎ïŒVB 14.0ïŒ
:Visual Studio 2015ãšå
±ã«ãªãªãŒã¹ã
:æ°ãã"?."æŒç®åãå«ãèšèªæ©èœãå°å
¥ãããæååè£éæ©èœãæäŸãããã
;2017幎ïŒVB 15.xïŒ
:Visual Studio 2017ãšå
±ã«ãªãªãŒã¹ã
:æ°ããVisual Basic 15èšèªæ©èœã®ãµããŒããæ¡åŒµããããœãŒã¹ã³ãŒãã®æŽçãè¡ããæ°ãããªãã¡ã¯ã¿ãªã³ã°ãå°å
¥ãããã
;2019幎ïŒVB 16.0ïŒ
:Visual Studio 2019ãšå
±ã«ãªãªãŒã¹ã
:.NET Coreã«çŠç¹ãåœãŠãåã®Visual BasicããŒãžã§ã³ãšãªã£ãã
}}
== ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã®è§£èª¬ ==
=== ã¯ã©ã¹ã®å®çŸ© ===
=== ãªããžã§ã¯ãã®çæ ===
=== ç¶æ¿ ===
=== ããªã¢ãŒãã£ãºã ===
== ãã¡ã€ã«ã®æäœ ==
=== ãã¡ã€ã«ã®èªã¿æžã ===
=== ãã£ã¬ã¯ããªã®æäœ ===
== ããŒã¿ããŒã¹ã®æäœ ==
=== ããŒã¿ããŒã¹ã«ã€ã㊠===
=== ããŒã¿ããŒã¹ã®æ¥ç¶ ===
=== SQLã®å®è¡ ===
== GUIã¢ããªã±ãŒã·ã§ã³ã®äœææ¹æ³ ==
=== Windowsãã©ãŒã ã®äœæ ===
=== ã³ã³ãããŒã«ã®é
眮 ===
=== ã€ãã³ãåŠç ===
== ãšã©ãŒåŠç ==
=== äŸå€åŠçã®åºæ¬ ===
=== èªäœäŸå€ã®äœæ ===
== å¿çšç·š ==
=== LINQãšã¯ ===
=== ãã«ãã¹ã¬ãã ===
== ãããã« ==
=== ãã®ãã¥ãŒããªã¢ã«ã§åŠã¹ãããš ===
=== ä»åŸã®åŠç¿ã®ããã®ã¢ããã€ã¹ ===
[[ã«ããŽãª:ããã°ã©ãã³ã°èšèª]] | 2023-04-25T14:40:04Z | 2023-10-10T04:50:11Z | [] | https://ja.wikibooks.org/wiki/Visual_Basic_.NET |
37,679 | äŒç€Ÿæ³æœè¡èŠå第4æ¡ã®2 | æ³åŠ>æ°äºæ³>åæ³>ã³ã³ã¡ã³ã¿ãŒã«äŒç€Ÿæ³>äŒç€Ÿæ³æœè¡èŠå (ã³ã³ã¡ã³ã¿ãŒã«äŒç€Ÿæ³)
(æ ªåŒäº€ä»åäŒç€Ÿ) | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ°äºæ³>åæ³>ã³ã³ã¡ã³ã¿ãŒã«äŒç€Ÿæ³>äŒç€Ÿæ³æœè¡èŠå (ã³ã³ã¡ã³ã¿ãŒã«äŒç€Ÿæ³)",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "(æ ªåŒäº€ä»åäŒç€Ÿ)",
"title": "æ¡æ"
}
] | æ³åŠïŒæ°äºæ³ïŒåæ³ïŒã³ã³ã¡ã³ã¿ãŒã«äŒç€Ÿæ³ïŒäŒç€Ÿæ³æœè¡èŠå (ã³ã³ã¡ã³ã¿ãŒã«äŒç€Ÿæ³) | [[æ³åŠ]]ïŒ[[æ°äºæ³]]ïŒ[[åæ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«äŒç€Ÿæ³]]ïŒ[[äŒç€Ÿæ³æœè¡èŠå (ã³ã³ã¡ã³ã¿ãŒã«äŒç€Ÿæ³)]]
==æ¡æ==
ïŒæ ªåŒäº€ä»åäŒç€ŸïŒ
;第4æ¡ã®2
:[[äŒç€Ÿæ³ç¬¬2æ¡|æ³ç¬¬2æ¡]]第32å·ã®2ã«èŠå®ããæ³åç什ã§å®ãããã®ã¯ãåæ¡ç¬¬3å·ã«èŠå®ããäŒç€Ÿãä»ã®äŒç€Ÿçã®è²¡ååã³äºæ¥ã®æ¹éã®æ±ºå®ãæ¯é
ããŠããå ŽåïŒ[[äŒç€Ÿæ³æœè¡èŠå第3æ¡|第3æ¡]]第3é
第1å·ã«æ²ããå Žåã«éããïŒã«ãããåœè©²ä»ã®äŒç€Ÿçãšããã
==解説==
==é¢é£æ¡æ==
----
{{ååŸ
|[[äŒç€Ÿæ³æœè¡èŠå]]
|[[äŒç€Ÿæ³æœè¡èŠå#1|第1ç·š ç·å]]<br>
[[äŒç€Ÿæ³æœè¡èŠå#1-2|第2ç« åäŒç€Ÿåã³èŠªäŒç€Ÿ]]<br>
|[[äŒç€Ÿæ³æœè¡èŠå第4æ¡]]<br>ïŒç¹å¥ç®çäŒç€Ÿã®ç¹åïŒ
|[[äŒç€Ÿæ³æœè¡èŠå第5æ¡]]<br>ïŒèšç«è²»çšïŒ
}}
{{stub|law}}
[[category:äŒç€Ÿæ³æœè¡èŠå|4ã®2]] | 2023-04-27T10:33:42Z | 2023-04-27T10:33:42Z | [
"ãã³ãã¬ãŒã:Stub",
"ãã³ãã¬ãŒã:ååŸ"
] | https://ja.wikibooks.org/wiki/%E4%BC%9A%E7%A4%BE%E6%B3%95%E6%96%BD%E8%A1%8C%E8%A6%8F%E5%89%87%E7%AC%AC4%E6%9D%A1%E3%81%AE2 |
37,681 | äŒç€Ÿæ³æœè¡èŠå第222æ¡ | æ³åŠ>æ°äºæ³>åæ³>ã³ã³ã¡ã³ã¿ãŒã«äŒç€Ÿæ³>äŒç€Ÿæ³æœè¡èŠå (ã³ã³ã¡ã³ã¿ãŒã«äŒç€Ÿæ³)
(é»ç£çæ¹æ³) | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ³åŠ>æ°äºæ³>åæ³>ã³ã³ã¡ã³ã¿ãŒã«äŒç€Ÿæ³>äŒç€Ÿæ³æœè¡èŠå (ã³ã³ã¡ã³ã¿ãŒã«äŒç€Ÿæ³)",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "(é»ç£çæ¹æ³)",
"title": "æ¡æ"
}
] | æ³åŠïŒæ°äºæ³ïŒåæ³ïŒã³ã³ã¡ã³ã¿ãŒã«äŒç€Ÿæ³ïŒäŒç€Ÿæ³æœè¡èŠå (ã³ã³ã¡ã³ã¿ãŒã«äŒç€Ÿæ³) | [[æ³åŠ]]ïŒ[[æ°äºæ³]]ïŒ[[åæ³]]ïŒ[[ã³ã³ã¡ã³ã¿ãŒã«äŒç€Ÿæ³]]ïŒ[[äŒç€Ÿæ³æœè¡èŠå (ã³ã³ã¡ã³ã¿ãŒã«äŒç€Ÿæ³)]]
==æ¡æ==
ïŒé»ç£çæ¹æ³ïŒ
;第222æ¡
:[[äŒç€Ÿæ³ç¬¬2æ¡#34|æ³ç¬¬2æ¡ç¬¬34å·]]ã«èŠå®ããé»åæ
å ±åŠççµç¹ã䜿çšããæ¹æ³ãã®ä»ã®æ
å ±éä¿¡ã®æè¡ãå©çšããæ¹æ³ã§ãã£ãŠæ³åç什ã§å®ãããã®ã¯ã次ã«æ²ããæ¹æ³ãšããã
#é»åæ
å ±åŠççµç¹ã䜿çšããæ¹æ³ã®ãã¡ã€åã¯ãã«æ²ãããã®
<ol style="list-style-type: katakana-iroha">
::<li>éä¿¡è
ã®äœ¿çšã«ä¿ãé»åèšç®æ©ãšåä¿¡è
ã®äœ¿çšã«ä¿ãé»åèšç®æ©ãšãæ¥ç¶ããé»æ°éä¿¡åç·ãéããŠéä¿¡ããåä¿¡è
ã®äœ¿çšã«ä¿ãé»åèšç®æ©ã«åãããããã¡ã€ã«ã«èšé²ããæ¹æ³</li>
::<li>éä¿¡è
ã®äœ¿çšã«ä¿ãé»åèšç®æ©ã«åãããããã¡ã€ã«ã«èšé²ãããæ
å ±ã®å
容ãé»æ°éä¿¡åç·ãéããŠæ
å ±ã®æäŸãåããè
ã®é²èŠ§ã«äŸããåœè©²æ
å ±ã®æäŸãåããè
ã®äœ¿çšã«ä¿ãé»åèšç®æ©ã«åãããããã¡ã€ã«ã«åœè©²æ
å ±ãèšé²ããæ¹æ³</li>
::<li>ç£æ°ãã£ã¹ã¯ãã®ä»ããã«æºããæ¹æ³ã«ããäžå®ã®æ
å ±ã確å®ã«èšé²ããŠããããšãã§ããç©ããã£ãŠèª¿è£œãããã¡ã€ã«ã«æ
å ±ãèšé²ãããã®ã亀ä»ããæ¹æ³</li></ol>
<ol start="2">
<li>åé
åå·ã«æ²ããæ¹æ³ã¯ãåä¿¡è
ããã¡ã€ã«ãžã®èšé²ãåºåããããšã«ããæžé¢ãäœæããããšãã§ãããã®ã§ãªããã°ãªããªãã</li></ol>
==解説==
==é¢é£æ¡æ==
----
{{ååŸ
|[[äŒç€Ÿæ³æœè¡èŠå]]
|[[äŒç€Ÿæ³æœè¡èŠå#7|第7ç·š éå]]<br>
[[äŒç€Ÿæ³æœè¡èŠå#7-4|第4ç« é»ç£çæ¹æ³åã³é»ç£çèšé²ç]]<br>
[[äŒç€Ÿæ³æœè¡èŠå#7-4-1|第1ç¯ é»ç£çæ¹æ³åã³é»ç£çèšé²ç]]<br>
|[[äŒç€Ÿæ³æœè¡èŠå第221æ¡]]<br>ãå
¬åã
|[[äŒç€Ÿæ³æœè¡èŠå第223æ¡]]<br>ïŒé»åå
¬åãè¡ãããã®é»ç£çæ¹æ³ïŒ
}}
{{stub|law}}
[[category:äŒç€Ÿæ³æœè¡èŠå|222]] | 2023-04-27T14:27:48Z | 2023-04-27T14:27:48Z | [
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Stub"
] | https://ja.wikibooks.org/wiki/%E4%BC%9A%E7%A4%BE%E6%B3%95%E6%96%BD%E8%A1%8C%E8%A6%8F%E5%89%87%E7%AC%AC222%E6%9D%A1 |
37,684 | Ada | ãã®Adaãã¥ãŒããªã¢ã«ã¯ãAdaããã°ã©ãã³ã°èšèªã«èå³ãæã£ãŠãã人ããŸãã¯æ¢ã«Adaãç¥ã£ãŠãããããæ·±ãç解ããããšæã£ãŠãã人åãã«äœæãããŠããŸãã Adaã¯ãé«ä¿¡é Œæ§ãæ±ããããã·ã¹ãã éçºãçµèŸŒã¿ã·ã¹ãã éçºã«é©ããèšèªã§ãããçŸåšã§ãå€ãã®ç£æ¥åéã§äœ¿ãããŠããŸãã
ãã®ãã¥ãŒããªã¢ã«ã§ã¯ãAdaèšèªã®åºæ¬çãªæŠå¿µããå§ããããã°ã©ãã³ã°ã®åºç€ã解説ããŠããŸããåå¿è
ã§ãç解ããããããã«ãå
·äœçãªäŸã亀ããªãããäžå¯§ã«èª¬æããŠãããŸãã
ãã®ãã¥ãŒããªã¢ã«ãéããŠãAdaãããæ·±ãç解ããé«ä¿¡é Œæ§ã®é«ããœãããŠã§ã¢éçºã«åœ¹ç«ãŠãŠããã ããã°å¹žãã§ãã
[Adaãã©ã®ãããªããã°ã©ãã³ã°èšèªã§ããããéçºã®èæ¯ãå©ç¹ã«ã€ããŠèª¬æããŸãã]
Adaã¯ã1980幎代ã«ã¢ã¡ãªã«åè¡åœã®åœé²ç·çãéçºããé«ä¿¡é Œæ§ãœãããŠã§ã¢ãéçºããããã®ããã°ã©ãã³ã°èšèªã§ãããã®åŸãæ°éåéã§ãå©çšãããããã«ãªããçŸåšã§ãèªç©ºå®å®ãééãå»çæ©åšãªã©ãé«ãä¿¡é Œæ§ãæ±ããããåéã§åºã䜿ãããŠããŸãã
Adaã®ç¹åŸŽãšããŠã¯ã以äžã®ãããªç¹ãæããããŸãã
Adaã®å©ç¹ãšããŠã¯ãé«ä¿¡é Œæ§ãå®å
šæ§ãä¿å®æ§ãå質ã®é«ããªã©ãæããããŸãããã ããAdaã®åŠç¿æ²ç·ãããé«ããä»ã®äžè¬çãªèšèªãšæ¯ã¹ããšã䜿ãããªãã®ã«æéããããããšããããŸãã
[Adaã®éçºã«å¿
èŠãªãœãããŠã§ã¢ãããŒã«ãã€ã³ã¹ããŒã«ããç°å¢ãæ§ç¯ããæ¹æ³ã«ã€ããŠèª¬æããŸãã]
Adaã®éçºç°å¢ãæ§ç¯ããããã«ã¯ãGNATãšããã³ã³ãã€ã©ãã€ã³ã¹ããŒã«ããå¿
èŠããããŸããGNATã¯ãAdaèšèªã®ããªãŒã§ãªãŒãã³ãœãŒã¹ãªå®è£
ã§ãããGNU Compiler Collection (GCC) ã«å«ãŸããŠããŸãã
MSYS2ã«GNATãã€ã³ã¹ããŒã«ããæé ã¯ä»¥äžã®éãã§ãã
macOSã«GNATãã€ã³ã¹ããŒã«ããæé ã¯ä»¥äžã®éãã§ãã
FreeBSDã«GNATãã€ã³ã¹ããŒã«ããæé ã¯ä»¥äžã®éãã§ãã
Adaããã°ã©ã ã®ãããã¬ãã«ã®æ§é ã¯ã以äžã®ããã«ãªããŸãã
withæã¯ã䜿çšããããã±ãŒãžãæå®ããããã«äœ¿çšãããŸããuseæã¯ãããã±ãŒãžã®äœ¿çšæ¹æ³ãæå®ããŸãã
ããã°ã©ã åã¯ãããã°ã©ã ã®ååãæå®ããŸããããã°ã©ã åã®äžã«ãå®æ°ãåãå€æ°ããµãããã°ã©ã ãã¿ã¹ã¯ãªã©ã宣èšããããšãã§ããŸãã
beginããŒã¯ãŒãã®åŸã«ã¯ãããã°ã©ã ã®å®è¡éšåãç¶ããŸãã
ãœãŒã¹ã³ãŒãã®ãã¡ã€ã«åã®ã«ãŒã«ã¯ã以äžã®ããã«ãªããŸãã
äŸãã°ã以äžã®ãããªãã¡ã€ã«æ§æã«ãªããŸãã
Adaã®ã³ã¡ã³ãã¯ãããã«ãã€ãã³(--)ã§ã¯ããŸããã©ã®è¡ã«ã衚瀺ããããšãã§ããŸããã³ã¡ã³ãã¯ã³ã³ãã€ã©ã«ãã£ãŠç¡èŠãããã³ãŒããèšé²ããããã«äœ¿çšãããŸãã
以äžã¯ãAdaã®ã³ã¡ã³ãã®äŸã§ã:
ã³ã¡ã³ãã¯ãã³ãŒãã®äžéšã®ç®çã説æããããè¿œå æ
å ±ãæäŸããããçŸåšäœ¿çšãããŠããªãã³ãŒãã®ã»ã¯ã·ã§ã³ãããŒã¯ããããã«äœ¿çšããããšãã§ããŸãã
ã³ã¡ã³ãã¯ãã³ãŒããããèªã¿ããããç解ããããããããã®è²ŽéãªããŒã«ã§ãããŸããã³ãŒãã®ä¿å®æ§ãåäžããããããã°ã容æã«ããå¹æããããŸãã
Adaã«ã¯ãããŸããŸãªããŒã¿åããããŸãããã®ç« ã§ã¯ãAdaã§äœ¿çšã§ããäž»èŠãªããŒã¿åãšå€æ°ã®å®£èšæ¹æ³ãããŒã¿ã®ä»£å
¥ãæŒç®ã«ã€ããŠèª¬æããŸãã
Adaã«ã¯ã以äžã®ãããªäž»èŠãªããŒã¿åããããŸãã
ãããã®ããŒã¿åãçµã¿åãããŠãããè€éãªããŒã¿åãå®çŸ©ããããšãã§ããŸãã
æŽæ°å(Integer)ã¯ãAdaã§æãäžè¬çãªããŒã¿åã®äžã€ã§ããã笊å·ä»ãæŽæ°å€ãè¡šããŸããIntegerã®ç¯å²ã¯å®è£
ã«ãã£ãŠç°ãªããŸãããéåžžã¯-2^31ãã2^31-1ãŸã§ã®å€ãè¡šãããšãã§ããŸãã以äžã¯ãIntegeråã䜿çšããã³ãŒãäŸã§ãã
å®æ°å(Float)ã¯ãæµ®åå°æ°ç¹æ°å€ãè¡šãããã«äœ¿çšãããŸããAdaã«ã¯ãããã€ãã®ç°ãªã粟床ã®FloatåããããŸããäŸãã°ãFloatåã¯éåžžãå粟床ã®æµ®åå°æ°ç¹æ°ãè¡šããLong_Floatåã¯å粟床ã®æµ®åå°æ°ç¹æ°ãè¡šããŸãã以äžã¯ãFloatåã䜿çšããã³ãŒãäŸã§ãã
æåå(Character)ã¯ãåäžã®æåãè¡šããŸããAdaã®æååã¯ãUnicodeæåã»ããããµããŒãããŠããŸãã以äžã¯ãCharacteråã䜿çšããã³ãŒãäŸã§ãã
çåœå€å(Boolean)ã¯ãçãŸãã¯åœã®è«çå€ãè¡šããŸãã以äžã¯ãBooleanåã䜿çšããã³ãŒãäŸã§ãã
åæå(Enumeration)ã¯ãæå®ãããå€ã®éåãè¡šããŸããäŸãã°ã以äžã®ã³ãŒãäŸã§ã¯ãææ¥ãè¡šãããã«ãåæåã䜿çšããŠããŸãã
é
åå(Array)ã¯ãåãããŒã¿åã®å€ã®éåãè¡šããŸããé
åã¯ãåºå®ãµã€ãºãŸãã¯å¯å€ãµã€ãºã®å ŽåããããŸãã以äžã¯ãIntegeråã®é
åã䜿çšããã³ãŒãäŸã§ãã
ã¬ã³ãŒãå(Record)ã¯ãç°ãªãããŒã¿åã®å€ã®éåãè¡šããŸããã¬ã³ãŒãã«ã¯ãååä»ããã£ãŒã«ãããããŸãã以äžã¯ãPersonãšããååã®ã¬ã³ãŒãåã䜿çšããã³ãŒãäŸã§ãã
æ§é äœå(Access)ã¯ãåçã«ç¢ºä¿ãããããŒã¿æ§é ãè¡šããŸããæ§é äœã«ã¯ãååä»ããã£ãŒã«ãããããŸãã以äžã¯ãPersonãšããååã®Accessåã䜿çšããã³ãŒãäŸã§ãã
å€æ°ã宣èšããã«ã¯ã以äžã®ãããªæ§æã䜿çšããŸãã
å€æ°åã¯ãè±æ°åãšã¢ã³ããŒã¹ã³ã¢ããæ§æãããŸããããŒã¿åã¯ãåè¿°ã®ããŒã¿åã®ãããããæå®ããŸããåæå€ã¯ãªãã·ã§ã³ã§ãå€æ°ã®å®£èšæã«ä»£å
¥ãããŸãã
äŸãã°ãæŽæ°åã®å€æ°xã宣èšããåæå€ã10ã«èšå®ããå Žåã¯ã以äžã®ããã«ãªããŸãã
å€æ°ã«ããŒã¿ã代å
¥ããã«ã¯ã以äžã®ãããªæ§æã䜿çšããŸãã
å€æ°åã¯ã代å
¥å
ã®å€æ°ãæå®ããŸããæ°ããå€ã¯ã代å
¥æŒç®å:=ã®åŸã«ç¶ããŠæå®ããŸãã
äŸãã°ãäžèšã®äŸã§å®£èšããæŽæ°åã®å€æ°xã«ãæ°ããå€20ã代å
¥ããå Žåã¯ã以äžã®ããã«ãªããŸãã
Adaèšèªã§ã¯ãåŒãšã¯å€æ°ãå®æ°ããªãã©ã«å€ãé¢æ°ãããã³æŒç®åãå«ãã³ãŒãã®æçã§ããåŒã¯ãåŒèªäœãå€ãè¿ãããã«è©äŸ¡ãããå€æ°ã®å€ãååŸããããé¢æ°ãåŒã³åºãããããããšãã§ããŸãã
äŸãã°ã以äžã®ã³ãŒãã¯ãåŒã䜿çšããŠå€æ°xãšyã®å€ãå ç®ããçµæãå€æ°zã«æ ŒçŽããŸãã
æŒç®åãšã¯ãç®è¡ãæ¯èŒãè«çããããæŒç®ãªã©ãããã°ã©ã ã§äœ¿çšãããæäœãè¡šãç¹æ®ãªèšå·ã§ããæŒç®åã¯ãäžè¬ã«äžã€ãŸãã¯è€æ°ã®ãªãã©ã³ãã«é©çšãããŸãã
Adaã«ã¯ã次ã®ãããªæŒç®åã®çš®é¡ããããŸãã
Adaã«ã¯ãCèšèªã®ãããªè€éãªæŒç®åããªããããæ確ã§ããããããã³ãŒããæžããŸãã
Adaã«ç¹æã®æŒç®åã®äžã€ã¯ãç¯å²æŒç®å(..)ã§ããããã¯ãç¯å²ãè¡šãããã«äœ¿çšãããŸããããšãã°ã1ãã10ãŸã§ã®æŽæ°ã®ç¯å²ãè¡šãã«ã¯ã1..10ãšæžããŸãã
ãŸããAdaã«ã¯ãå°äœæŒç®å(mod)ããããŸããããã¯ã2ã€ã®æŽæ°ã®å°äœãèšç®ããŸãã
以äžã¯ãAdaã§ç®è¡æŒç®åã䜿çšããäŸã§ãã
以äžã«ãAdaã®æŒç®åãåé¡ããšã«äžèŠ§è¡šã«ãŸãšããŸããã
以äžã®è¡šã«ç€ºãããæŒç®åãé©åã«äœ¿çšããããšã§ãAdaããã°ã©ã ãããå¹ççãã€ããããããèšè¿°ããããšãã§ããŸãã
å¶åŸ¡æ§é (Control Structures)ã¯ãããã°ã©ã ã®æµããå¶åŸ¡ããããã®æ§é ã§ãããããã°ã©ã ãããè€éãªåäœãè¡ããããã«ããŸããAdaã§ã¯ãäž»ã«æ¡ä»¶åå²(ifæ)ãšã«ãŒã(foræ)ãå©çšãããŸãã
æ¡ä»¶åå²ã¯ãæ¡ä»¶ã«ãã£ãŠåŠçãåå²ãããããã®æ§é ã§ããifæãçšããŠãæ¡ä»¶ãçã§ããå Žåãšåœã§ããå Žåã§ãããããç°ãªãåŠçãè¡ãããšãã§ããŸãã
Adaã«ãããcaseæã¯ãè€æ°ã®æ¡ä»¶åå²ãè¡ãããã«äœ¿çšãããå¶åŸ¡æ§é ã®äžã€ã§ããcaseæã¯ãå€ã«ãã£ãŠç°ãªããããã¯ãå®è¡ããããšãã§ããŸãã
caseæã¯ä»¥äžã®ãããªæ§æãæã¡ãŸãã
expressionã«ã¯æ¡ä»¶åå²ã®å¯Ÿè±¡ãšãªãåŒãæå®ããŸããchoiceã«ã¯æ¡ä»¶åå²ã®åè£ãšãªãå€ãæå®ããŸããwhenããŒã¯ãŒãã®åŸã«ç¶ãchoiceã«è©²åœããå Žåããã®ãããã¯å
ã®åŠçãå®è¡ãããŸããæåŸã«ãwhen othersã䜿çšããŠãã©ã®æ¡ä»¶ã«ã該åœããªãå Žåã®åŠçãæå®ããããšãã§ããŸãã
Adaã«ãããã«ãŒã(ç¹°ãè¿ã)ã¯ãåãåŠçãç¹°ãè¿ãå®è¡ããããã®å¶åŸ¡æ§é ã§ããAdaã«ã¯ã以äžã®3ã€ã®ã«ãŒãããããŸãã
loopã«ãŒãã¯ãæ¡ä»¶åŒãfalseã«ãªããŸã§ãç¹°ãè¿ãåŠçãå®è¡ããŸãã以äžã¯ãloopã«ãŒãã®æ§æã§ãã
以äžã¯ãloopã«ãŒãã®äŸã§ãã
ãã®äŸã§ã¯ãIã5ã«ãªããŸã§ãPut_Lineã§Iã®å€ã衚瀺ããåŠçãç¹°ãè¿ããŠããŸããexit whenæã䜿çšããŠãIã5ã«ãªã£ãæç¹ã§ã«ãŒããçµäºããããã«ããŠããŸãã
whileã«ãŒãã¯ãæ¡ä»¶åŒãtrueã®éãç¹°ãè¿ãåŠçãå®è¡ããŸãã以äžã¯ãwhileã«ãŒãã®æ§æã§ãã
以äžã¯ãwhileã«ãŒãã®äŸã§ãã
ãã®äŸã§ã¯ãIã5以äžã§ããéããPut_Lineã§Iã®å€ã衚瀺ããåŠçãç¹°ãè¿ããŠããŸãã
forã«ãŒãã¯ãåæå€ããçµäºå€ãŸã§ãæå®ãããã¹ãããã§ç¹°ãè¿ãåŠçãå®è¡ããŸãã以äžã¯ãforã«ãŒãã®æ§æã§ãã
以äžã¯ãforã«ãŒãã®äŸã§ãã
ãã®äŸã§ã¯ã1ãã5ãŸã§ã®æ°å€ããIã«é çªã«ä»£å
¥ããŠPut_Lineã§Iã®å€ã衚瀺ããåŠçãç¹°ãè¿ããŠããŸãã
以äžã¯ãæ¡ä»¶åå²ãã«ãŒããªã©ã®å¶åŸ¡æ§é ããã¹ãŠäœ¿çšãã Ada ã®ããã°ã©ã äŸã§ãã
ãã®ããã°ã©ã ã§ã¯ããŠãŒã¶ãŒããã®å
¥åãåãåããif-then-else æã䜿çšããŠå
¥åãããæ°å€ã®ç¬Šå·ãå€å®ããcase æã䜿çšããŠå
¥åãããæ°å€ã®å€ã«ãã£ãŠåå²ããŸãã ããã«ãfor ã«ãŒããš while ã«ãŒãã䜿çšããŠãæ°å€ãç¹°ãè¿ãåºåããexit æã䜿çšããŠã«ãŒãããæãåºãããšã瀺ããŠããŸãã
[æç¶ããé¢æ°ã®å®£èšæ¹æ³ãåŒæ°ã®æž¡ãæ¹ãæ»ãå€ã®åãæ±ããªã©ã説æããŸãã]
ãµãããã°ã©ã ã¯ãã¡ã€ã³ããã°ã©ã ã®äžã§å®è¡ãããç¬ç«ããã³ãŒãã®ãããã¯ã§ãããæç¶ããšé¢æ°ã®2ã€ã®åœ¢åŒããããŸããæç¶ãã¯ãäœããå®è¡ããããã®ãµãããã°ã©ã ã§ãããæ»ãå€ãè¿ããªãã®ã«å¯ŸããŠãé¢æ°ã¯å€ãè¿ããŸãã
Adaã§ã¯ãåŒæ°ãåç
§æž¡ããå€æž¡ããããã³äžå€æž¡ãã®3ã€ã®æ¹æ³ã§æž¡ãããšãã§ããŸããåç
§æž¡ãã¯ãåŒæ°ããµãããã°ã©ã å
ã§å€æŽãããå ŽåãåŒã³åºãå
ã®å€æ°ã«ãåæ ãããŸããå€æž¡ãã¯ãåŒæ°ããµãããã°ã©ã ã«ã³ããŒãããããåŒã³åºãå
ã®å€æ°ã«ã¯åœ±é¿ãäžããŸãããäžå€æž¡ãã¯ãåŒã³åºãå
ã®å€æ°ãä¿è·ããããããµãããã°ã©ã å
ã§åŒæ°ãå€æŽããããšã¯ã§ããŸããã
é¢æ°ã¯åžžã«å€ãè¿ããŸãããã®ãããé¢æ°ã®æ»ãå€ãå€æ°ã«ä»£å
¥ããããšãã§ããŸãã
[Adaã§ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã®åºæ¬æŠå¿µããã¯ã©ã¹ã®å®çŸ©æ¹æ³ãç¶æ¿ãããªã¢ãŒãã£ãºã ãªã©ã説æããŸãã]
ãªããžã§ã¯ãæåããã°ã©ãã³ã°(OOP)ã¯ãããã°ã©ã ããªããžã§ã¯ããšåŒã°ããåäœã«åå²ãããããã®çžäºäœçšã«ãã£ãŠããã°ã©ã ãæ§æããããã°ã©ãã³ã°ã®æ¹æ³è«ã§ããAdaãOOPã«å¯Ÿå¿ããŠããã以äžã«åºæ¬æŠå¿µãã¯ã©ã¹ã®å®çŸ©æ¹æ³ãªã©ã説æããŸãã
ã¯ã©ã¹ã¯ãããŒã¿åã®å®çŸ©ã«äŒŒãæ¹æ³ã§å®çŸ©ãããŸããäŸãã°ã以äžã¯ã¯ã©ã¹ Point ãå®çŸ©ããäŸã§ãã
ã¯ã©ã¹ã®å®£èšã¯ãpackage(ããã±ãŒãž)æã§è¡ãããŸããtypeæã«ãã£ãŠãPoint ãšããååã®ã¯ã©ã¹ãå®çŸ©ãããtagged(ã¿ã°ä»ã)ã«èšå®ãããŸããã¿ã°ä»ãã®ã¯ã©ã¹ã¯ã掟çå(ã¯ã©ã¹)ãå®çŸ©ããéã«å¿
èŠã§ãããŸããrecordæã«ãã£ãŠãã¯ã©ã¹ã®ã¡ã³ããŒãå®çŸ©ãããŸãã
次ã«ãã¯ã©ã¹ã®ã¡ã³ããŒã«ã¢ã¯ã»ã¹ããããã®æç¶ããé¢æ°ãå®çŸ©ããŸãããã®äŸã§ã¯ãããã·ãŒãžã£ Set_Point ã§ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ P ã®ã¡ã³ã㌠X ãš Y ã«å€ãèšå®ããé¢æ° Get_X, Get_Y ã§ããããã®å€ãååŸããããšãã§ããŸãã
Adaã¯ãç¶æ¿ããµããŒãããŠããŸãã掟çå(ãµãã¯ã©ã¹)ã¯ãåºåºå(ã¹ãŒããŒã¯ã©ã¹)ãæ¡åŒµããããšãã§ããŸããäŸãã°ã以äžã¯ã¯ã©ã¹ Circle ãå®çŸ©ããäŸã§ãPoint ã¯ã©ã¹ãç¶æ¿ããŠããŸãã
typeæã® new æ§æã§ã掟çå Circle ã Point ã¯ã©ã¹ãç¶æ¿ããããšãæå®ãããŠããŸãããŸããwith record ã§ãCircle ã¯ã©ã¹ã«ç¬èªã®ãã£ãŒã«ã Radius ãè¿œå ããŠããŸããç¶æ¿å
ã®ã¯ã©ã¹(ã¹ãŒããŒã¯ã©ã¹)ã®ãã£ãŒã«ãã¯ãåŒãç¶ã Circle ã¯ã©ã¹ã§ã䜿çšããããšãã§ããŸãã
[äŸå€ãçºçããå Žåã®åŠçæ¹æ³ã«ã€ããŠèª¬æããŸãã]
Adaã«ã¯äŸå€åŠçæ©æ§ãåãã£ãŠãããäŸå€ãçºçããå Žåã«å¯ŸåŠããããšãã§ããŸããäŸå€ã¯ãå®è¡æã«çºçãããšã©ãŒã§ãããäºæããªãç¶æ³ãçºçããå Žåã«çºçããããšããããŸããäŸãã°ããŒãé€ç®ãé
åã®å¢çå€ã¢ã¯ã»ã¹ãäžæ£ãªå
¥åãã¡ã¢ãªäžè¶³ãªã©ãæããããŸãã
äŸå€åŠçã®æ§æã¯ä»¥äžã®ããã«ãªããŸãã
ããã§ãException1ãException2ã¯ãäŸå€ã®çš®é¡ã瀺ãäŸå€åã§ãããå
·äœçãªäŸå€åã¯ã¢ããªã±ãŒã·ã§ã³ã«ãã£ãŠç°ãªããŸãã
äŸå€åŠçã¯ãtry-catchæ§æã®ãããªæ§é ã§ãããããããã°ã©ã ãäŸå€ããã£ããããå Žåã該åœããäŸå€åŠçãããã¯ãå®è¡ãããŸããothersããŒã¯ãŒãã¯ãäžèšã®äŸå€ä»¥å€ã®ãã¹ãŠã®äŸå€ããã£ããããããã«äœ¿çšãããŸãã
以äžã¯ãäŸå€åŠçã®äŸã§ãã
ãã®äŸã§ã¯ãDivideé¢æ°ã§Bã0ã§ããå ŽåãProgram_ErroräŸå€ãçºçããŸããProgram_ErroräŸå€ã¯ãAdaã®æšæºäŸå€ã§ãããå®è¡æãšã©ãŒãçºçããå Žåã«èªåçã«ã¹ããŒãããŸããDivideé¢æ°ãå®è¡ããããã«ãtry-catchæ§æã䜿çšããProgram_ErroräŸå€ããã£ãããããšã©ãŒã¡ãã»ãŒãžã衚瀺ããŸãã
[ã¿ã¹ã¯ã®å®çŸ©æ¹æ³ãã¹ã±ãžã¥ãŒãªã³ã°ãçžäºæé€ãªã©ã«ã€ããŠèª¬æããŸãã]
ã¿ã¹ã¯ãšã¯ã䞊è¡åŠçãå®çŸããããã«äœ¿çšãããæŠå¿µã§ããã¿ã¹ã¯ã¯ãèªå·±å®çµåã§ç¬ç«ããã¹ã¬ããã®ãããªãã®ã§ãèªåèªèº«ãå®è¡å¯èœã§ãããšåæã«ãä»ã®ã¿ã¹ã¯ããã®ã¡ãã»ãŒãžãåä¿¡ããŠåŠçãè¡ãããšãã§ããŸããã¿ã¹ã¯ã®ã¹ã±ãžã¥ãŒãªã³ã°ã¯ãAdaã©ã³ã¿ã€ã ã·ã¹ãã ã«ãã£ãŠèªåçã«å¶åŸ¡ãããŸãã
ã¿ã¹ã¯ã®å®£èšæ¹æ³ã¯ã以äžã®ããã«ãªããŸãã
ããã§ãTask_Name ã¯ã¿ã¹ã¯ã®ååãEntry_Name ã¯ã¿ã¹ã¯ããåŒã³åºããããšã³ããªãŒã®ååãParameter_List ã¯ãšã³ããªãŒã«æž¡ãããåŒæ°ã®ãªã¹ãã§ãã
ãŸããã¿ã¹ã¯éã®çžäºæé€ã«ã¯ã以äžã®ãããªæ段ããããŸãã
[Adaã§ã®ããã±ãŒãžã®äœææ¹æ³ã䜿çšæ¹æ³ãåå空éã®æ©èœã«ã€ããŠèª¬æããŸãã]
ããã±ãŒãžã¯ãAdaã®åå空éãå®çŸããããã®æ©èœã§ãé¢é£ãããµãããã°ã©ã ãå€æ°ããŸãšããããšãã§ããŸããããã±ãŒãžã«ã¯ãå
¬éãããã€ã³ã¿ãŒãã§ãŒã¹éšãšãå®è£
éšããããŸããã€ã³ã¿ãŒãã§ãŒã¹éšã«ã¯ãä»ã®ã¢ãžã¥ãŒã«ããã¢ã¯ã»ã¹å¯èœãªãµãããã°ã©ã ãå€æ°ãå®çŸ©ããå®è£
éšã«ã¯ããããã®ãµãããã°ã©ã ãå€æ°ã®å®è£
ãèšè¿°ããŸãã
ããã±ãŒãžã®å®£èšæ¹æ³ã¯ã以äžã®ããã«ãªããŸãã
[ãã¡ã€ã«ãéããŠèªã¿æžãããæ¹æ³ã«ã€ããŠèª¬æããŸãã]
Adaã«ããããã¡ã€ã«æäœã¯ãã¹ããªãŒã (Stream)ãšåŒã°ããæ©èœã䜿çšããŠè¡ããŸãããã¡ã€ã«ãéãã«ã¯ã以äžã®ããã«ããŸãã
ãã¡ã€ã«ããã®å
¥åãããã¡ã€ã«ãžã®åºåã¯ãGet_LineãPut_LineãReadãWrite ãªã©ã®ãµãããã°ã©ã ã䜿çšããŠè¡ããŸãã
[Adaã®ãããã°ããã¹ãã®æ¹æ³ã«ã€ããŠèª¬æããŸãã]
Adaã«ã¯ãã³ã³ãã€ã«æã®éçæ€æ»ãã©ã³ã¿ã€ã æã®åçæ€æ»ãªã©ãæ§ã
ãªã¬ãã«ã®æ€æ»ãåãã£ãŠããŸãã
ãŸããã³ã³ãã€ã«æã®æ€æ»ã«ã€ããŠã§ããAdaã¯ãåå®å
šæ§ãéåžžã«é«ãèšèªã§ããéçåæ€æ»æ©èœã«ãããå€æ°ãå®æ°ã®åãäžèŽããªãå ŽåããŸãã¯æªåæåã®å€æ°ã䜿çšããå Žåãªã©ãã³ã³ãã€ã«æã«ãšã©ãŒãçºçããŸããããã«ãããå€ãã®å®è¡æãšã©ãŒãæªç¶ã«é²æ¢ã§ããŸãã
ã©ã³ã¿ã€ã æã®æ€æ»ãšããŠãäŸå€åŠçããããŸããããã°ã©ã äžã§çºçããäºæãã¬ãšã©ãŒã«å¯Ÿå¿ãããããäŸå€åŠçã䜿çšããããšãã§ããŸããäŸå€ãçºçããå Žåã¯ãäŸå€ã®çš®é¡ã«å¿ããåŠçãè¡ãããšãã§ããŸãã
ãŸããAdaã«ã¯ã³ãŒãã«ãã¬ããžããŒã«ãå«ãŸããŠããŸããã³ãŒãã«ãã¬ããžããŒã«ã¯ããã¹ãäžã«å®è¡ãããã³ãŒãã®å²åã枬å®ããããã«äœ¿çšãããŸããããã«ãããã©ã®ã³ãŒãããã¹ããããŠããªãããç¹å®ãããã¹ãã®æ¹åç¹ãèŠã€ããããšãã§ããŸãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "ãã®Adaãã¥ãŒããªã¢ã«ã¯ãAdaããã°ã©ãã³ã°èšèªã«èå³ãæã£ãŠãã人ããŸãã¯æ¢ã«Adaãç¥ã£ãŠãããããæ·±ãç解ããããšæã£ãŠãã人åãã«äœæãããŠããŸãã Adaã¯ãé«ä¿¡é Œæ§ãæ±ããããã·ã¹ãã éçºãçµèŸŒã¿ã·ã¹ãã éçºã«é©ããèšèªã§ãããçŸåšã§ãå€ãã®ç£æ¥åéã§äœ¿ãããŠããŸãã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ãã®ãã¥ãŒããªã¢ã«ã§ã¯ãAdaèšèªã®åºæ¬çãªæŠå¿µããå§ããããã°ã©ãã³ã°ã®åºç€ã解説ããŠããŸããåå¿è
ã§ãç解ããããããã«ãå
·äœçãªäŸã亀ããªãããäžå¯§ã«èª¬æããŠãããŸãã",
"title": ""
},
{
"paragraph_id": 2,
"tag": "p",
"text": "ãã®ãã¥ãŒããªã¢ã«ãéããŠãAdaãããæ·±ãç解ããé«ä¿¡é Œæ§ã®é«ããœãããŠã§ã¢éçºã«åœ¹ç«ãŠãŠããã ããã°å¹žãã§ãã",
"title": ""
},
{
"paragraph_id": 3,
"tag": "p",
"text": "[Adaãã©ã®ãããªããã°ã©ãã³ã°èšèªã§ããããéçºã®èæ¯ãå©ç¹ã«ã€ããŠèª¬æããŸãã]",
"title": "Adaã®æŠèŠ"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "Adaã¯ã1980幎代ã«ã¢ã¡ãªã«åè¡åœã®åœé²ç·çãéçºããé«ä¿¡é Œæ§ãœãããŠã§ã¢ãéçºããããã®ããã°ã©ãã³ã°èšèªã§ãããã®åŸãæ°éåéã§ãå©çšãããããã«ãªããçŸåšã§ãèªç©ºå®å®ãééãå»çæ©åšãªã©ãé«ãä¿¡é Œæ§ãæ±ããããåéã§åºã䜿ãããŠããŸãã",
"title": "Adaã®æŠèŠ"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "Adaã®ç¹åŸŽãšããŠã¯ã以äžã®ãããªç¹ãæããããŸãã",
"title": "Adaã®æŠèŠ"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "Adaã®å©ç¹ãšããŠã¯ãé«ä¿¡é Œæ§ãå®å
šæ§ãä¿å®æ§ãå質ã®é«ããªã©ãæããããŸãããã ããAdaã®åŠç¿æ²ç·ãããé«ããä»ã®äžè¬çãªèšèªãšæ¯ã¹ããšã䜿ãããªãã®ã«æéããããããšããããŸãã",
"title": "Adaã®æŠèŠ"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "[Adaã®éçºã«å¿
èŠãªãœãããŠã§ã¢ãããŒã«ãã€ã³ã¹ããŒã«ããç°å¢ãæ§ç¯ããæ¹æ³ã«ã€ããŠèª¬æããŸãã]",
"title": "ç°å¢ã®èšå®"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "Adaã®éçºç°å¢ãæ§ç¯ããããã«ã¯ãGNATãšããã³ã³ãã€ã©ãã€ã³ã¹ããŒã«ããå¿
èŠããããŸããGNATã¯ãAdaèšèªã®ããªãŒã§ãªãŒãã³ãœãŒã¹ãªå®è£
ã§ãããGNU Compiler Collection (GCC) ã«å«ãŸããŠããŸãã",
"title": "ç°å¢ã®èšå®"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "MSYS2ã«GNATãã€ã³ã¹ããŒã«ããæé ã¯ä»¥äžã®éãã§ãã",
"title": "ç°å¢ã®èšå®"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "macOSã«GNATãã€ã³ã¹ããŒã«ããæé ã¯ä»¥äžã®éãã§ãã",
"title": "ç°å¢ã®èšå®"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "FreeBSDã«GNATãã€ã³ã¹ããŒã«ããæé ã¯ä»¥äžã®éãã§ãã",
"title": "ç°å¢ã®èšå®"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "Adaããã°ã©ã ã®ãããã¬ãã«ã®æ§é ã¯ã以äžã®ããã«ãªããŸãã",
"title": "ãããã¬ãã«ã®ããã°ã©ã æ§é "
},
{
"paragraph_id": 13,
"tag": "p",
"text": "withæã¯ã䜿çšããããã±ãŒãžãæå®ããããã«äœ¿çšãããŸããuseæã¯ãããã±ãŒãžã®äœ¿çšæ¹æ³ãæå®ããŸãã",
"title": "ãããã¬ãã«ã®ããã°ã©ã æ§é "
},
{
"paragraph_id": 14,
"tag": "p",
"text": "ããã°ã©ã åã¯ãããã°ã©ã ã®ååãæå®ããŸããããã°ã©ã åã®äžã«ãå®æ°ãåãå€æ°ããµãããã°ã©ã ãã¿ã¹ã¯ãªã©ã宣èšããããšãã§ããŸãã",
"title": "ãããã¬ãã«ã®ããã°ã©ã æ§é "
},
{
"paragraph_id": 15,
"tag": "p",
"text": "beginããŒã¯ãŒãã®åŸã«ã¯ãããã°ã©ã ã®å®è¡éšåãç¶ããŸãã",
"title": "ãããã¬ãã«ã®ããã°ã©ã æ§é "
},
{
"paragraph_id": 16,
"tag": "p",
"text": "ãœãŒã¹ã³ãŒãã®ãã¡ã€ã«åã®ã«ãŒã«ã¯ã以äžã®ããã«ãªããŸãã",
"title": "ãããã¬ãã«ã®ããã°ã©ã æ§é "
},
{
"paragraph_id": 17,
"tag": "p",
"text": "äŸãã°ã以äžã®ãããªãã¡ã€ã«æ§æã«ãªããŸãã",
"title": "ãããã¬ãã«ã®ããã°ã©ã æ§é "
},
{
"paragraph_id": 18,
"tag": "p",
"text": "Adaã®ã³ã¡ã³ãã¯ãããã«ãã€ãã³(--)ã§ã¯ããŸããã©ã®è¡ã«ã衚瀺ããããšãã§ããŸããã³ã¡ã³ãã¯ã³ã³ãã€ã©ã«ãã£ãŠç¡èŠãããã³ãŒããèšé²ããããã«äœ¿çšãããŸãã",
"title": "ã³ã¡ã³ã"
},
{
"paragraph_id": 19,
"tag": "p",
"text": "以äžã¯ãAdaã®ã³ã¡ã³ãã®äŸã§ã:",
"title": "ã³ã¡ã³ã"
},
{
"paragraph_id": 20,
"tag": "p",
"text": "ã³ã¡ã³ãã¯ãã³ãŒãã®äžéšã®ç®çã説æããããè¿œå æ
å ±ãæäŸããããçŸåšäœ¿çšãããŠããªãã³ãŒãã®ã»ã¯ã·ã§ã³ãããŒã¯ããããã«äœ¿çšããããšãã§ããŸãã",
"title": "ã³ã¡ã³ã"
},
{
"paragraph_id": 21,
"tag": "p",
"text": "ã³ã¡ã³ãã¯ãã³ãŒããããèªã¿ããããç解ããããããããã®è²ŽéãªããŒã«ã§ãããŸããã³ãŒãã®ä¿å®æ§ãåäžããããããã°ã容æã«ããå¹æããããŸãã",
"title": "ã³ã¡ã³ã"
},
{
"paragraph_id": 22,
"tag": "p",
"text": "",
"title": "ã³ã¡ã³ã"
},
{
"paragraph_id": 23,
"tag": "p",
"text": "Adaã«ã¯ãããŸããŸãªããŒã¿åããããŸãããã®ç« ã§ã¯ãAdaã§äœ¿çšã§ããäž»èŠãªããŒã¿åãšå€æ°ã®å®£èšæ¹æ³ãããŒã¿ã®ä»£å
¥ãæŒç®ã«ã€ããŠèª¬æããŸãã",
"title": "ããŒã¿åãšå€æ°"
},
{
"paragraph_id": 24,
"tag": "p",
"text": "Adaã«ã¯ã以äžã®ãããªäž»èŠãªããŒã¿åããããŸãã",
"title": "ããŒã¿åãšå€æ°"
},
{
"paragraph_id": 25,
"tag": "p",
"text": "ãããã®ããŒã¿åãçµã¿åãããŠãããè€éãªããŒã¿åãå®çŸ©ããããšãã§ããŸãã",
"title": "ããŒã¿åãšå€æ°"
},
{
"paragraph_id": 26,
"tag": "p",
"text": "æŽæ°å(Integer)ã¯ãAdaã§æãäžè¬çãªããŒã¿åã®äžã€ã§ããã笊å·ä»ãæŽæ°å€ãè¡šããŸããIntegerã®ç¯å²ã¯å®è£
ã«ãã£ãŠç°ãªããŸãããéåžžã¯-2^31ãã2^31-1ãŸã§ã®å€ãè¡šãããšãã§ããŸãã以äžã¯ãIntegeråã䜿çšããã³ãŒãäŸã§ãã",
"title": "ããŒã¿åãšå€æ°"
},
{
"paragraph_id": 27,
"tag": "p",
"text": "å®æ°å(Float)ã¯ãæµ®åå°æ°ç¹æ°å€ãè¡šãããã«äœ¿çšãããŸããAdaã«ã¯ãããã€ãã®ç°ãªã粟床ã®FloatåããããŸããäŸãã°ãFloatåã¯éåžžãå粟床ã®æµ®åå°æ°ç¹æ°ãè¡šããLong_Floatåã¯å粟床ã®æµ®åå°æ°ç¹æ°ãè¡šããŸãã以äžã¯ãFloatåã䜿çšããã³ãŒãäŸã§ãã",
"title": "ããŒã¿åãšå€æ°"
},
{
"paragraph_id": 28,
"tag": "p",
"text": "æåå(Character)ã¯ãåäžã®æåãè¡šããŸããAdaã®æååã¯ãUnicodeæåã»ããããµããŒãããŠããŸãã以äžã¯ãCharacteråã䜿çšããã³ãŒãäŸã§ãã",
"title": "ããŒã¿åãšå€æ°"
},
{
"paragraph_id": 29,
"tag": "p",
"text": "çåœå€å(Boolean)ã¯ãçãŸãã¯åœã®è«çå€ãè¡šããŸãã以äžã¯ãBooleanåã䜿çšããã³ãŒãäŸã§ãã",
"title": "ããŒã¿åãšå€æ°"
},
{
"paragraph_id": 30,
"tag": "p",
"text": "åæå(Enumeration)ã¯ãæå®ãããå€ã®éåãè¡šããŸããäŸãã°ã以äžã®ã³ãŒãäŸã§ã¯ãææ¥ãè¡šãããã«ãåæåã䜿çšããŠããŸãã",
"title": "ããŒã¿åãšå€æ°"
},
{
"paragraph_id": 31,
"tag": "p",
"text": "é
åå(Array)ã¯ãåãããŒã¿åã®å€ã®éåãè¡šããŸããé
åã¯ãåºå®ãµã€ãºãŸãã¯å¯å€ãµã€ãºã®å ŽåããããŸãã以äžã¯ãIntegeråã®é
åã䜿çšããã³ãŒãäŸã§ãã",
"title": "ããŒã¿åãšå€æ°"
},
{
"paragraph_id": 32,
"tag": "p",
"text": "ã¬ã³ãŒãå(Record)ã¯ãç°ãªãããŒã¿åã®å€ã®éåãè¡šããŸããã¬ã³ãŒãã«ã¯ãååä»ããã£ãŒã«ãããããŸãã以äžã¯ãPersonãšããååã®ã¬ã³ãŒãåã䜿çšããã³ãŒãäŸã§ãã",
"title": "ããŒã¿åãšå€æ°"
},
{
"paragraph_id": 33,
"tag": "p",
"text": "æ§é äœå(Access)ã¯ãåçã«ç¢ºä¿ãããããŒã¿æ§é ãè¡šããŸããæ§é äœã«ã¯ãååä»ããã£ãŒã«ãããããŸãã以äžã¯ãPersonãšããååã®Accessåã䜿çšããã³ãŒãäŸã§ãã",
"title": "ããŒã¿åãšå€æ°"
},
{
"paragraph_id": 34,
"tag": "p",
"text": "å€æ°ã宣èšããã«ã¯ã以äžã®ãããªæ§æã䜿çšããŸãã",
"title": "å€æ°ã®å®£èš"
},
{
"paragraph_id": 35,
"tag": "p",
"text": "å€æ°åã¯ãè±æ°åãšã¢ã³ããŒã¹ã³ã¢ããæ§æãããŸããããŒã¿åã¯ãåè¿°ã®ããŒã¿åã®ãããããæå®ããŸããåæå€ã¯ãªãã·ã§ã³ã§ãå€æ°ã®å®£èšæã«ä»£å
¥ãããŸãã",
"title": "å€æ°ã®å®£èš"
},
{
"paragraph_id": 36,
"tag": "p",
"text": "äŸãã°ãæŽæ°åã®å€æ°xã宣èšããåæå€ã10ã«èšå®ããå Žåã¯ã以äžã®ããã«ãªããŸãã",
"title": "å€æ°ã®å®£èš"
},
{
"paragraph_id": 37,
"tag": "p",
"text": "å€æ°ã«ããŒã¿ã代å
¥ããã«ã¯ã以äžã®ãããªæ§æã䜿çšããŸãã",
"title": "ããŒã¿ã®ä»£å
¥"
},
{
"paragraph_id": 38,
"tag": "p",
"text": "å€æ°åã¯ã代å
¥å
ã®å€æ°ãæå®ããŸããæ°ããå€ã¯ã代å
¥æŒç®å:=ã®åŸã«ç¶ããŠæå®ããŸãã",
"title": "ããŒã¿ã®ä»£å
¥"
},
{
"paragraph_id": 39,
"tag": "p",
"text": "äŸãã°ãäžèšã®äŸã§å®£èšããæŽæ°åã®å€æ°xã«ãæ°ããå€20ã代å
¥ããå Žåã¯ã以äžã®ããã«ãªããŸãã",
"title": "ããŒã¿ã®ä»£å
¥"
},
{
"paragraph_id": 40,
"tag": "p",
"text": "Adaèšèªã§ã¯ãåŒãšã¯å€æ°ãå®æ°ããªãã©ã«å€ãé¢æ°ãããã³æŒç®åãå«ãã³ãŒãã®æçã§ããåŒã¯ãåŒèªäœãå€ãè¿ãããã«è©äŸ¡ãããå€æ°ã®å€ãååŸããããé¢æ°ãåŒã³åºãããããããšãã§ããŸãã",
"title": "åŒãšæŒç®å"
},
{
"paragraph_id": 41,
"tag": "p",
"text": "äŸãã°ã以äžã®ã³ãŒãã¯ãåŒã䜿çšããŠå€æ°xãšyã®å€ãå ç®ããçµæãå€æ°zã«æ ŒçŽããŸãã",
"title": "åŒãšæŒç®å"
},
{
"paragraph_id": 42,
"tag": "p",
"text": "æŒç®åãšã¯ãç®è¡ãæ¯èŒãè«çããããæŒç®ãªã©ãããã°ã©ã ã§äœ¿çšãããæäœãè¡šãç¹æ®ãªèšå·ã§ããæŒç®åã¯ãäžè¬ã«äžã€ãŸãã¯è€æ°ã®ãªãã©ã³ãã«é©çšãããŸãã",
"title": "åŒãšæŒç®å"
},
{
"paragraph_id": 43,
"tag": "p",
"text": "Adaã«ã¯ã次ã®ãããªæŒç®åã®çš®é¡ããããŸãã",
"title": "åŒãšæŒç®å"
},
{
"paragraph_id": 44,
"tag": "p",
"text": "Adaã«ã¯ãCèšèªã®ãããªè€éãªæŒç®åããªããããæ確ã§ããããããã³ãŒããæžããŸãã",
"title": "åŒãšæŒç®å"
},
{
"paragraph_id": 45,
"tag": "p",
"text": "Adaã«ç¹æã®æŒç®åã®äžã€ã¯ãç¯å²æŒç®å(..)ã§ããããã¯ãç¯å²ãè¡šãããã«äœ¿çšãããŸããããšãã°ã1ãã10ãŸã§ã®æŽæ°ã®ç¯å²ãè¡šãã«ã¯ã1..10ãšæžããŸãã",
"title": "åŒãšæŒç®å"
},
{
"paragraph_id": 46,
"tag": "p",
"text": "ãŸããAdaã«ã¯ãå°äœæŒç®å(mod)ããããŸããããã¯ã2ã€ã®æŽæ°ã®å°äœãèšç®ããŸãã",
"title": "åŒãšæŒç®å"
},
{
"paragraph_id": 47,
"tag": "p",
"text": "以äžã¯ãAdaã§ç®è¡æŒç®åã䜿çšããäŸã§ãã",
"title": "åŒãšæŒç®å"
},
{
"paragraph_id": 48,
"tag": "p",
"text": "以äžã«ãAdaã®æŒç®åãåé¡ããšã«äžèŠ§è¡šã«ãŸãšããŸããã",
"title": "åŒãšæŒç®å"
},
{
"paragraph_id": 49,
"tag": "p",
"text": "以äžã®è¡šã«ç€ºãããæŒç®åãé©åã«äœ¿çšããããšã§ãAdaããã°ã©ã ãããå¹ççãã€ããããããèšè¿°ããããšãã§ããŸãã",
"title": "åŒãšæŒç®å"
},
{
"paragraph_id": 50,
"tag": "p",
"text": "å¶åŸ¡æ§é (Control Structures)ã¯ãããã°ã©ã ã®æµããå¶åŸ¡ããããã®æ§é ã§ãããããã°ã©ã ãããè€éãªåäœãè¡ããããã«ããŸããAdaã§ã¯ãäž»ã«æ¡ä»¶åå²(ifæ)ãšã«ãŒã(foræ)ãå©çšãããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 51,
"tag": "p",
"text": "æ¡ä»¶åå²ã¯ãæ¡ä»¶ã«ãã£ãŠåŠçãåå²ãããããã®æ§é ã§ããifæãçšããŠãæ¡ä»¶ãçã§ããå Žåãšåœã§ããå Žåã§ãããããç°ãªãåŠçãè¡ãããšãã§ããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 52,
"tag": "p",
"text": "Adaã«ãããcaseæã¯ãè€æ°ã®æ¡ä»¶åå²ãè¡ãããã«äœ¿çšãããå¶åŸ¡æ§é ã®äžã€ã§ããcaseæã¯ãå€ã«ãã£ãŠç°ãªããããã¯ãå®è¡ããããšãã§ããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 53,
"tag": "p",
"text": "caseæã¯ä»¥äžã®ãããªæ§æãæã¡ãŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 54,
"tag": "p",
"text": "expressionã«ã¯æ¡ä»¶åå²ã®å¯Ÿè±¡ãšãªãåŒãæå®ããŸããchoiceã«ã¯æ¡ä»¶åå²ã®åè£ãšãªãå€ãæå®ããŸããwhenããŒã¯ãŒãã®åŸã«ç¶ãchoiceã«è©²åœããå Žåããã®ãããã¯å
ã®åŠçãå®è¡ãããŸããæåŸã«ãwhen othersã䜿çšããŠãã©ã®æ¡ä»¶ã«ã該åœããªãå Žåã®åŠçãæå®ããããšãã§ããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 55,
"tag": "p",
"text": "Adaã«ãããã«ãŒã(ç¹°ãè¿ã)ã¯ãåãåŠçãç¹°ãè¿ãå®è¡ããããã®å¶åŸ¡æ§é ã§ããAdaã«ã¯ã以äžã®3ã€ã®ã«ãŒãããããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 56,
"tag": "p",
"text": "loopã«ãŒãã¯ãæ¡ä»¶åŒãfalseã«ãªããŸã§ãç¹°ãè¿ãåŠçãå®è¡ããŸãã以äžã¯ãloopã«ãŒãã®æ§æã§ãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 57,
"tag": "p",
"text": "以äžã¯ãloopã«ãŒãã®äŸã§ãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 58,
"tag": "p",
"text": "ãã®äŸã§ã¯ãIã5ã«ãªããŸã§ãPut_Lineã§Iã®å€ã衚瀺ããåŠçãç¹°ãè¿ããŠããŸããexit whenæã䜿çšããŠãIã5ã«ãªã£ãæç¹ã§ã«ãŒããçµäºããããã«ããŠããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 59,
"tag": "p",
"text": "whileã«ãŒãã¯ãæ¡ä»¶åŒãtrueã®éãç¹°ãè¿ãåŠçãå®è¡ããŸãã以äžã¯ãwhileã«ãŒãã®æ§æã§ãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 60,
"tag": "p",
"text": "以äžã¯ãwhileã«ãŒãã®äŸã§ãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 61,
"tag": "p",
"text": "ãã®äŸã§ã¯ãIã5以äžã§ããéããPut_Lineã§Iã®å€ã衚瀺ããåŠçãç¹°ãè¿ããŠããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 62,
"tag": "p",
"text": "forã«ãŒãã¯ãåæå€ããçµäºå€ãŸã§ãæå®ãããã¹ãããã§ç¹°ãè¿ãåŠçãå®è¡ããŸãã以äžã¯ãforã«ãŒãã®æ§æã§ãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 63,
"tag": "p",
"text": "以äžã¯ãforã«ãŒãã®äŸã§ãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 64,
"tag": "p",
"text": "ãã®äŸã§ã¯ã1ãã5ãŸã§ã®æ°å€ããIã«é çªã«ä»£å
¥ããŠPut_Lineã§Iã®å€ã衚瀺ããåŠçãç¹°ãè¿ããŠããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 65,
"tag": "p",
"text": "以äžã¯ãæ¡ä»¶åå²ãã«ãŒããªã©ã®å¶åŸ¡æ§é ããã¹ãŠäœ¿çšãã Ada ã®ããã°ã©ã äŸã§ãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 66,
"tag": "p",
"text": "ãã®ããã°ã©ã ã§ã¯ããŠãŒã¶ãŒããã®å
¥åãåãåããif-then-else æã䜿çšããŠå
¥åãããæ°å€ã®ç¬Šå·ãå€å®ããcase æã䜿çšããŠå
¥åãããæ°å€ã®å€ã«ãã£ãŠåå²ããŸãã ããã«ãfor ã«ãŒããš while ã«ãŒãã䜿çšããŠãæ°å€ãç¹°ãè¿ãåºåããexit æã䜿çšããŠã«ãŒãããæãåºãããšã瀺ããŠããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 67,
"tag": "p",
"text": "[æç¶ããé¢æ°ã®å®£èšæ¹æ³ãåŒæ°ã®æž¡ãæ¹ãæ»ãå€ã®åãæ±ããªã©ã説æããŸãã]",
"title": "ãµãããã°ã©ã "
},
{
"paragraph_id": 68,
"tag": "p",
"text": "ãµãããã°ã©ã ã¯ãã¡ã€ã³ããã°ã©ã ã®äžã§å®è¡ãããç¬ç«ããã³ãŒãã®ãããã¯ã§ãããæç¶ããšé¢æ°ã®2ã€ã®åœ¢åŒããããŸããæç¶ãã¯ãäœããå®è¡ããããã®ãµãããã°ã©ã ã§ãããæ»ãå€ãè¿ããªãã®ã«å¯ŸããŠãé¢æ°ã¯å€ãè¿ããŸãã",
"title": "ãµãããã°ã©ã "
},
{
"paragraph_id": 69,
"tag": "p",
"text": "Adaã§ã¯ãåŒæ°ãåç
§æž¡ããå€æž¡ããããã³äžå€æž¡ãã®3ã€ã®æ¹æ³ã§æž¡ãããšãã§ããŸããåç
§æž¡ãã¯ãåŒæ°ããµãããã°ã©ã å
ã§å€æŽãããå ŽåãåŒã³åºãå
ã®å€æ°ã«ãåæ ãããŸããå€æž¡ãã¯ãåŒæ°ããµãããã°ã©ã ã«ã³ããŒãããããåŒã³åºãå
ã®å€æ°ã«ã¯åœ±é¿ãäžããŸãããäžå€æž¡ãã¯ãåŒã³åºãå
ã®å€æ°ãä¿è·ããããããµãããã°ã©ã å
ã§åŒæ°ãå€æŽããããšã¯ã§ããŸããã",
"title": "ãµãããã°ã©ã "
},
{
"paragraph_id": 70,
"tag": "p",
"text": "é¢æ°ã¯åžžã«å€ãè¿ããŸãããã®ãããé¢æ°ã®æ»ãå€ãå€æ°ã«ä»£å
¥ããããšãã§ããŸãã",
"title": "ãµãããã°ã©ã "
},
{
"paragraph_id": 71,
"tag": "p",
"text": "[Adaã§ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã®åºæ¬æŠå¿µããã¯ã©ã¹ã®å®çŸ©æ¹æ³ãç¶æ¿ãããªã¢ãŒãã£ãºã ãªã©ã説æããŸãã]",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 72,
"tag": "p",
"text": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°(OOP)ã¯ãããã°ã©ã ããªããžã§ã¯ããšåŒã°ããåäœã«åå²ãããããã®çžäºäœçšã«ãã£ãŠããã°ã©ã ãæ§æããããã°ã©ãã³ã°ã®æ¹æ³è«ã§ããAdaãOOPã«å¯Ÿå¿ããŠããã以äžã«åºæ¬æŠå¿µãã¯ã©ã¹ã®å®çŸ©æ¹æ³ãªã©ã説æããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 73,
"tag": "p",
"text": "ã¯ã©ã¹ã¯ãããŒã¿åã®å®çŸ©ã«äŒŒãæ¹æ³ã§å®çŸ©ãããŸããäŸãã°ã以äžã¯ã¯ã©ã¹ Point ãå®çŸ©ããäŸã§ãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 74,
"tag": "p",
"text": "ã¯ã©ã¹ã®å®£èšã¯ãpackage(ããã±ãŒãž)æã§è¡ãããŸããtypeæã«ãã£ãŠãPoint ãšããååã®ã¯ã©ã¹ãå®çŸ©ãããtagged(ã¿ã°ä»ã)ã«èšå®ãããŸããã¿ã°ä»ãã®ã¯ã©ã¹ã¯ã掟çå(ã¯ã©ã¹)ãå®çŸ©ããéã«å¿
èŠã§ãããŸããrecordæã«ãã£ãŠãã¯ã©ã¹ã®ã¡ã³ããŒãå®çŸ©ãããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 75,
"tag": "p",
"text": "次ã«ãã¯ã©ã¹ã®ã¡ã³ããŒã«ã¢ã¯ã»ã¹ããããã®æç¶ããé¢æ°ãå®çŸ©ããŸãããã®äŸã§ã¯ãããã·ãŒãžã£ Set_Point ã§ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ P ã®ã¡ã³ã㌠X ãš Y ã«å€ãèšå®ããé¢æ° Get_X, Get_Y ã§ããããã®å€ãååŸããããšãã§ããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 76,
"tag": "p",
"text": "Adaã¯ãç¶æ¿ããµããŒãããŠããŸãã掟çå(ãµãã¯ã©ã¹)ã¯ãåºåºå(ã¹ãŒããŒã¯ã©ã¹)ãæ¡åŒµããããšãã§ããŸããäŸãã°ã以äžã¯ã¯ã©ã¹ Circle ãå®çŸ©ããäŸã§ãPoint ã¯ã©ã¹ãç¶æ¿ããŠããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 77,
"tag": "p",
"text": "typeæã® new æ§æã§ã掟çå Circle ã Point ã¯ã©ã¹ãç¶æ¿ããããšãæå®ãããŠããŸãããŸããwith record ã§ãCircle ã¯ã©ã¹ã«ç¬èªã®ãã£ãŒã«ã Radius ãè¿œå ããŠããŸããç¶æ¿å
ã®ã¯ã©ã¹(ã¹ãŒããŒã¯ã©ã¹)ã®ãã£ãŒã«ãã¯ãåŒãç¶ã Circle ã¯ã©ã¹ã§ã䜿çšããããšãã§ããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 78,
"tag": "p",
"text": "[äŸå€ãçºçããå Žåã®åŠçæ¹æ³ã«ã€ããŠèª¬æããŸãã]",
"title": "äŸå€åŠç"
},
{
"paragraph_id": 79,
"tag": "p",
"text": "Adaã«ã¯äŸå€åŠçæ©æ§ãåãã£ãŠãããäŸå€ãçºçããå Žåã«å¯ŸåŠããããšãã§ããŸããäŸå€ã¯ãå®è¡æã«çºçãããšã©ãŒã§ãããäºæããªãç¶æ³ãçºçããå Žåã«çºçããããšããããŸããäŸãã°ããŒãé€ç®ãé
åã®å¢çå€ã¢ã¯ã»ã¹ãäžæ£ãªå
¥åãã¡ã¢ãªäžè¶³ãªã©ãæããããŸãã",
"title": "äŸå€åŠç"
},
{
"paragraph_id": 80,
"tag": "p",
"text": "äŸå€åŠçã®æ§æã¯ä»¥äžã®ããã«ãªããŸãã",
"title": "äŸå€åŠç"
},
{
"paragraph_id": 81,
"tag": "p",
"text": "ããã§ãException1ãException2ã¯ãäŸå€ã®çš®é¡ã瀺ãäŸå€åã§ãããå
·äœçãªäŸå€åã¯ã¢ããªã±ãŒã·ã§ã³ã«ãã£ãŠç°ãªããŸãã",
"title": "äŸå€åŠç"
},
{
"paragraph_id": 82,
"tag": "p",
"text": "äŸå€åŠçã¯ãtry-catchæ§æã®ãããªæ§é ã§ãããããããã°ã©ã ãäŸå€ããã£ããããå Žåã該åœããäŸå€åŠçãããã¯ãå®è¡ãããŸããothersããŒã¯ãŒãã¯ãäžèšã®äŸå€ä»¥å€ã®ãã¹ãŠã®äŸå€ããã£ããããããã«äœ¿çšãããŸãã",
"title": "äŸå€åŠç"
},
{
"paragraph_id": 83,
"tag": "p",
"text": "以äžã¯ãäŸå€åŠçã®äŸã§ãã",
"title": "äŸå€åŠç"
},
{
"paragraph_id": 84,
"tag": "p",
"text": "ãã®äŸã§ã¯ãDivideé¢æ°ã§Bã0ã§ããå ŽåãProgram_ErroräŸå€ãçºçããŸããProgram_ErroräŸå€ã¯ãAdaã®æšæºäŸå€ã§ãããå®è¡æãšã©ãŒãçºçããå Žåã«èªåçã«ã¹ããŒãããŸããDivideé¢æ°ãå®è¡ããããã«ãtry-catchæ§æã䜿çšããProgram_ErroräŸå€ããã£ãããããšã©ãŒã¡ãã»ãŒãžã衚瀺ããŸãã",
"title": "äŸå€åŠç"
},
{
"paragraph_id": 85,
"tag": "p",
"text": "[ã¿ã¹ã¯ã®å®çŸ©æ¹æ³ãã¹ã±ãžã¥ãŒãªã³ã°ãçžäºæé€ãªã©ã«ã€ããŠèª¬æããŸãã]",
"title": "ã¿ã¹ã¯"
},
{
"paragraph_id": 86,
"tag": "p",
"text": "ã¿ã¹ã¯ãšã¯ã䞊è¡åŠçãå®çŸããããã«äœ¿çšãããæŠå¿µã§ããã¿ã¹ã¯ã¯ãèªå·±å®çµåã§ç¬ç«ããã¹ã¬ããã®ãããªãã®ã§ãèªåèªèº«ãå®è¡å¯èœã§ãããšåæã«ãä»ã®ã¿ã¹ã¯ããã®ã¡ãã»ãŒãžãåä¿¡ããŠåŠçãè¡ãããšãã§ããŸããã¿ã¹ã¯ã®ã¹ã±ãžã¥ãŒãªã³ã°ã¯ãAdaã©ã³ã¿ã€ã ã·ã¹ãã ã«ãã£ãŠèªåçã«å¶åŸ¡ãããŸãã",
"title": "ã¿ã¹ã¯"
},
{
"paragraph_id": 87,
"tag": "p",
"text": "ã¿ã¹ã¯ã®å®£èšæ¹æ³ã¯ã以äžã®ããã«ãªããŸãã",
"title": "ã¿ã¹ã¯"
},
{
"paragraph_id": 88,
"tag": "p",
"text": "ããã§ãTask_Name ã¯ã¿ã¹ã¯ã®ååãEntry_Name ã¯ã¿ã¹ã¯ããåŒã³åºããããšã³ããªãŒã®ååãParameter_List ã¯ãšã³ããªãŒã«æž¡ãããåŒæ°ã®ãªã¹ãã§ãã",
"title": "ã¿ã¹ã¯"
},
{
"paragraph_id": 89,
"tag": "p",
"text": "ãŸããã¿ã¹ã¯éã®çžäºæé€ã«ã¯ã以äžã®ãããªæ段ããããŸãã",
"title": "ã¿ã¹ã¯"
},
{
"paragraph_id": 90,
"tag": "p",
"text": "[Adaã§ã®ããã±ãŒãžã®äœææ¹æ³ã䜿çšæ¹æ³ãåå空éã®æ©èœã«ã€ããŠèª¬æããŸãã]",
"title": "ããã±ãŒãž"
},
{
"paragraph_id": 91,
"tag": "p",
"text": "ããã±ãŒãžã¯ãAdaã®åå空éãå®çŸããããã®æ©èœã§ãé¢é£ãããµãããã°ã©ã ãå€æ°ããŸãšããããšãã§ããŸããããã±ãŒãžã«ã¯ãå
¬éãããã€ã³ã¿ãŒãã§ãŒã¹éšãšãå®è£
éšããããŸããã€ã³ã¿ãŒãã§ãŒã¹éšã«ã¯ãä»ã®ã¢ãžã¥ãŒã«ããã¢ã¯ã»ã¹å¯èœãªãµãããã°ã©ã ãå€æ°ãå®çŸ©ããå®è£
éšã«ã¯ããããã®ãµãããã°ã©ã ãå€æ°ã®å®è£
ãèšè¿°ããŸãã",
"title": "ããã±ãŒãž"
},
{
"paragraph_id": 92,
"tag": "p",
"text": "ããã±ãŒãžã®å®£èšæ¹æ³ã¯ã以äžã®ããã«ãªããŸãã",
"title": "ããã±ãŒãž"
},
{
"paragraph_id": 93,
"tag": "p",
"text": "[ãã¡ã€ã«ãéããŠèªã¿æžãããæ¹æ³ã«ã€ããŠèª¬æããŸãã]",
"title": "ãã¡ã€ã«å
¥åºå"
},
{
"paragraph_id": 94,
"tag": "p",
"text": "Adaã«ããããã¡ã€ã«æäœã¯ãã¹ããªãŒã (Stream)ãšåŒã°ããæ©èœã䜿çšããŠè¡ããŸãããã¡ã€ã«ãéãã«ã¯ã以äžã®ããã«ããŸãã",
"title": "ãã¡ã€ã«å
¥åºå"
},
{
"paragraph_id": 95,
"tag": "p",
"text": "ãã¡ã€ã«ããã®å
¥åãããã¡ã€ã«ãžã®åºåã¯ãGet_LineãPut_LineãReadãWrite ãªã©ã®ãµãããã°ã©ã ã䜿çšããŠè¡ããŸãã",
"title": "ãã¡ã€ã«å
¥åºå"
},
{
"paragraph_id": 96,
"tag": "p",
"text": "[Adaã®ãããã°ããã¹ãã®æ¹æ³ã«ã€ããŠèª¬æããŸãã]",
"title": "ãããã°ãšãã¹ã"
},
{
"paragraph_id": 97,
"tag": "p",
"text": "Adaã«ã¯ãã³ã³ãã€ã«æã®éçæ€æ»ãã©ã³ã¿ã€ã æã®åçæ€æ»ãªã©ãæ§ã
ãªã¬ãã«ã®æ€æ»ãåãã£ãŠããŸãã",
"title": "ãããã°ãšãã¹ã"
},
{
"paragraph_id": 98,
"tag": "p",
"text": "ãŸããã³ã³ãã€ã«æã®æ€æ»ã«ã€ããŠã§ããAdaã¯ãåå®å
šæ§ãéåžžã«é«ãèšèªã§ããéçåæ€æ»æ©èœã«ãããå€æ°ãå®æ°ã®åãäžèŽããªãå ŽåããŸãã¯æªåæåã®å€æ°ã䜿çšããå Žåãªã©ãã³ã³ãã€ã«æã«ãšã©ãŒãçºçããŸããããã«ãããå€ãã®å®è¡æãšã©ãŒãæªç¶ã«é²æ¢ã§ããŸãã",
"title": "ãããã°ãšãã¹ã"
},
{
"paragraph_id": 99,
"tag": "p",
"text": "ã©ã³ã¿ã€ã æã®æ€æ»ãšããŠãäŸå€åŠçããããŸããããã°ã©ã äžã§çºçããäºæãã¬ãšã©ãŒã«å¯Ÿå¿ãããããäŸå€åŠçã䜿çšããããšãã§ããŸããäŸå€ãçºçããå Žåã¯ãäŸå€ã®çš®é¡ã«å¿ããåŠçãè¡ãããšãã§ããŸãã",
"title": "ãããã°ãšãã¹ã"
},
{
"paragraph_id": 100,
"tag": "p",
"text": "ãŸããAdaã«ã¯ã³ãŒãã«ãã¬ããžããŒã«ãå«ãŸããŠããŸããã³ãŒãã«ãã¬ããžããŒã«ã¯ããã¹ãäžã«å®è¡ãããã³ãŒãã®å²åã枬å®ããããã«äœ¿çšãããŸããããã«ãããã©ã®ã³ãŒãããã¹ããããŠããªãããç¹å®ãããã¹ãã®æ¹åç¹ãèŠã€ããããšãã§ããŸãã",
"title": "ãããã°ãšãã¹ã"
}
] | ãã®Adaãã¥ãŒããªã¢ã«ã¯ãAdaããã°ã©ãã³ã°èšèªã«èå³ãæã£ãŠãã人ããŸãã¯æ¢ã«Adaãç¥ã£ãŠãããããæ·±ãç解ããããšæã£ãŠãã人åãã«äœæãããŠããŸãã
Adaã¯ãé«ä¿¡é Œæ§ãæ±ããããã·ã¹ãã éçºãçµèŸŒã¿ã·ã¹ãã éçºã«é©ããèšèªã§ãããçŸåšã§ãå€ãã®ç£æ¥åéã§äœ¿ãããŠããŸãã ãã®ãã¥ãŒããªã¢ã«ã§ã¯ãAdaèšèªã®åºæ¬çãªæŠå¿µããå§ããããã°ã©ãã³ã°ã®åºç€ã解説ããŠããŸããåå¿è
ã§ãç解ããããããã«ãå
·äœçãªäŸã亀ããªãããäžå¯§ã«èª¬æããŠãããŸãã ãã®ãã¥ãŒããªã¢ã«ãéããŠãAdaãããæ·±ãç解ããé«ä¿¡é Œæ§ã®é«ããœãããŠã§ã¢éçºã«åœ¹ç«ãŠãŠããã ããã°å¹žãã§ãã | {{Wikipedia}}
ãã®Adaãã¥ãŒããªã¢ã«ã¯ãAdaããã°ã©ãã³ã°èšèªã«èå³ãæã£ãŠãã人ããŸãã¯æ¢ã«Adaãç¥ã£ãŠãããããæ·±ãç解ããããšæã£ãŠãã人åãã«äœæãããŠããŸãã
Adaã¯ãé«ä¿¡é Œæ§ãæ±ããããã·ã¹ãã éçºãçµèŸŒã¿ã·ã¹ãã éçºã«é©ããèšèªã§ãããçŸåšã§ãå€ãã®ç£æ¥åéã§äœ¿ãããŠããŸãã
ãã®ãã¥ãŒããªã¢ã«ã§ã¯ãAdaèšèªã®åºæ¬çãªæŠå¿µããå§ããããã°ã©ãã³ã°ã®åºç€ã解説ããŠããŸããåå¿è
ã§ãç解ããããããã«ãå
·äœçãªäŸã亀ããªãããäžå¯§ã«èª¬æããŠãããŸãã
ãã®ãã¥ãŒããªã¢ã«ãéããŠãAdaãããæ·±ãç解ããé«ä¿¡é Œæ§ã®é«ããœãããŠã§ã¢éçºã«åœ¹ç«ãŠãŠããã ããã°å¹žãã§ãã
__TOC__
== Adaã®æŠèŠ ==
[Adaãã©ã®ãããªããã°ã©ãã³ã°èšèªã§ããããéçºã®èæ¯ãå©ç¹ã«ã€ããŠèª¬æããŸãã]
Adaã¯ã1980幎代ã«ã¢ã¡ãªã«åè¡åœã®åœé²ç·çãéçºããé«ä¿¡é Œæ§ãœãããŠã§ã¢ãéçºããããã®ããã°ã©ãã³ã°èšèªã§ãããã®åŸãæ°éåéã§ãå©çšãããããã«ãªããçŸåšã§ãèªç©ºå®å®ãééãå»çæ©åšãªã©ãé«ãä¿¡é Œæ§ãæ±ããããåéã§åºã䜿ãããŠããŸãã
Adaã®ç¹åŸŽãšããŠã¯ã以äžã®ãããªç¹ãæããããŸãã
* 匷ãåä»ãïŒå€æ°ãé¢æ°ãªã©ã®ããŒã¿åãå³å¯ã«å®çŸ©ãããã³ã³ãã€ã«æã«åãšã©ãŒãæ€åºã§ããããããã°ã®çºçãé²æ¢ã§ããŸãã
* çžäºæé€æ©èœïŒã¿ã¹ã¯éã®çžäºæé€æ©èœã匷åã§ããããããã¯ãã©ã€ãããã¯ãªã©ã®åé¡ãå°ãªããå®å
šãªäžŠè¡åŠçãå®çŸã§ããŸãã
* ã¡ã¢ãªç®¡çïŒAdaã«ã¯ã¬ããŒãžã³ã¬ã¯ã·ã§ã³æ©èœããããããã¡ã¢ãªãªãŒã¯ãäºé解æŸã®ãããªåé¡ãèµ·ããã«ãããå®å
šãªã¡ã¢ãªç®¡çãå¯èœã§ãã
* 倧èŠæš¡ãªããã°ã©ã ã®éçºã«é©ããæ©èœïŒAdaã«ã¯ãããã±ãŒãžãæœè±¡åããžã§ããªãã¯ãã¿ã¹ã¯ãªã©ã倧èŠæš¡ãªããã°ã©ã ã®éçºã«å¿
èŠãªæ©èœãè±å¯ã«ãããŸãã
* ããã¥ã¡ã³ãçæïŒAdaã«ã¯ãã³ãŒãããèªåçã«ææžãçæããæ©èœãããããœãããŠã§ã¢éçºã«ãããææžäœæã®æéãçãããšãã§ããŸãã
Adaã®å©ç¹ãšããŠã¯ãé«ä¿¡é Œæ§ãå®å
šæ§ãä¿å®æ§ãå質ã®é«ããªã©ãæããããŸãããã ããAdaã®åŠç¿æ²ç·ãããé«ããä»ã®äžè¬çãªèšèªãšæ¯ã¹ããšã䜿ãããªãã®ã«æéããããããšããããŸãã
== ç°å¢ã®èšå® ==
[Adaã®éçºã«å¿
èŠãªãœãããŠã§ã¢ãããŒã«ãã€ã³ã¹ããŒã«ããç°å¢ãæ§ç¯ããæ¹æ³ã«ã€ããŠèª¬æããŸãã]
Adaã®éçºç°å¢ãæ§ç¯ããããã«ã¯ãGNATãšããã³ã³ãã€ã©ãã€ã³ã¹ããŒã«ããå¿
èŠããããŸããGNATã¯ãAdaèšèªã®ããªãŒã§ãªãŒãã³ãœãŒã¹ãªå®è£
ã§ãããGNU Compiler Collection (GCC) ã«å«ãŸããŠããŸãã
=== Debian linux ãžã®ã€ã³ã¹ããŒã« ===
# ã¿ãŒããã«ãéããŸãã
# <code>sudo apt update</code>ã³ãã³ããå®è¡ããŠãããã±ãŒãžãªã¹ããæŽæ°ããŸãã
# <code>sudo apt-get install gnat</code>ã³ãã³ããå®è¡ããŠãGNATããã±ãŒãžãã€ã³ã¹ããŒã«ããŸãã
# ã€ã³ã¹ããŒã«ãå®äºãããã<code>gnat --version</code>ã³ãã³ããå®è¡ããŠãGNATã®ããŒãžã§ã³ã確èªããŸãã
=== MSYS2/Windows ãžã®ã€ã³ã¹ããŒã« ===
MSYS2ã«GNATãã€ã³ã¹ããŒã«ããæé ã¯ä»¥äžã®éãã§ãã
# MSYS2ãã€ã³ã¹ããŒã«ããŸããå
¬åŒãµã€ãããããŠã³ããŒãããŠãæ瀺ã«åŸã£ãŠã€ã³ã¹ããŒã«ããŠãã ããã
# MSYS2ãéããŸããéããã³ã³ãœãŒã«ã§ä»¥äžã®ã³ãã³ããå®è¡ããŠãããã±ãŒãžãªã¹ããæŽæ°ããŸãã
#:<syntaxhighlight lang=bash>
pacman -Syu
</syntaxhighlight>
# GNATãã€ã³ã¹ããŒã«ããããã«ã以äžã®ã³ãã³ããå®è¡ããŠå¿
èŠãªããã±ãŒãžãã€ã³ã¹ããŒã«ããŸãã ãã®ã³ãã³ãã¯ãGNATã®ããã±ãŒãžã«å«ãŸããŠããmingw-w64-x86_64-gcc-adaããã±ãŒãžãã€ã³ã¹ããŒã«ããŸãã
#:<syntaxhighlight lang=bash>
pacman -S mingw-w64-x86_64-gcc-ada
</syntaxhighlight>
# ã€ã³ã¹ããŒã«ãå®äºãããã<code>gnat --version</code>ã³ãã³ããå®è¡ããŠãGNATã®ããŒãžã§ã³ã確èªããŸãã
=== macOS ãžã®ã€ã³ã¹ããŒã« ===
macOSã«GNATãã€ã³ã¹ããŒã«ããæé ã¯ä»¥äžã®éãã§ãã
# Homebrewãã€ã³ã¹ããŒã«ããŸããã¿ãŒããã«ãéããŠã以äžã®ã³ãã³ããå®è¡ããŸãã
#:<syntaxhighlight lang=bash>
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
</syntaxhighlight>
# GNATãã€ã³ã¹ããŒã«ããããã«ã以äžã®ã³ãã³ããå®è¡ããŸãã ãã®ã³ãã³ãã¯ãGNATã®ããã±ãŒãžãHomebrewããã€ã³ã¹ããŒã«ããŸãã
#:<syntaxhighlight lang=bash>
brew install gnat
</syntaxhighlight>
# ã€ã³ã¹ããŒã«ãå®äºãããã<code>gnat --version</code>ã³ãã³ããå®è¡ããŠãGNATã®ããŒãžã§ã³ã確èªããŸãã
=== FreeBSD ãžã®ã€ã³ã¹ããŒã« ===
FreeBSDã«GNATãã€ã³ã¹ããŒã«ããæé ã¯ä»¥äžã®éãã§ãã
# pkgãæŽæ°ããŸããã¿ãŒããã«ãéããŠã以äžã®ã³ãã³ããå®è¡ããŸãã
#:<syntaxhighlight lang=csh>
% sudo pkg update
</syntaxhighlight>
# GNATãã€ã³ã¹ããŒã«ããããã«ã以äžã®ã³ãã³ããå®è¡ããŸãã ãã®ã³ãã³ãã¯ãGNATã®ããã±ãŒãžã«å«ãŸããŠããgcc-adaããã±ãŒãžãã€ã³ã¹ããŒã«ããŸãã
#:<syntaxhighlight lang=csh>
% sudo pkg install gcc-ada
</syntaxhighlight>
# ã€ã³ã¹ããŒã«ãå®äºãããã<code>gnat --version</code>ã³ãã³ããå®è¡ããŠãGNATã®ããŒãžã§ã³ã確èªããŸãã
{{ã³ã©ã |GNATã«ã€ããŠ|2=GNATã¯ãGNU Ada CompilerãšããŠç¥ãããŠãããGNUãããžã§ã¯ãã®äžéšã§ãããããäžè¬çã«ã¯GNU AdaãšåŒã°ããŠããŸããGNATã®å称ã¯ãGNU Ada Translatorã®ç¥ç§°ã§ãããæåã®ãªãªãŒã¹ã1987幎ã«è¡ãããéã«ã¯ãAdaã®ã³ã³ãã€ã©ãšããŠã¯åããŠGNUãããžã§ã¯ãã«å«ãŸããŠããããšãããGNATãšåä»ããããŸããããã®åŸãGNATã¯GNUãããžã§ã¯ãã®äžéšãšããŠããªãŒãã³ãœãŒã¹ã®Adaã³ã³ãã€ã©ãšããŠçºå±ããŠããŸããã
ãã ããGNATã®åçšçã§ããGNAT Proã¯ãGNU Adaã§ã¯ãªããAdaCore瀟ãç¬èªã«éçºãã補åãšããŠè²©å£²ãããŠããŸããGNAT Proã¯ãGNAT GPLã«æ¯ã¹ãŠåçšå©çšã«é©ããæ©èœããµããŒããæäŸãããŠããŸãããŸããGNAT Proã®å©çã®äžéšã¯ãGNUãããžã§ã¯ãã«å¯ä»ãããŠããŸãã
}}
== ãããã¬ãã«ã®ããã°ã©ã æ§é ==
Adaããã°ã©ã ã®ãããã¬ãã«ã®æ§é ã¯ã以äžã®ããã«ãªããŸãã
:<syntaxhighlight lang=ada>
with ããã±ãŒãžå;
use ããã±ãŒãžå;
ããã°ã©ã å is
-- å®æ°ãåãå€æ°ããµãããã°ã©ã ãã¿ã¹ã¯ãªã©ã®å®£èš
begin
-- ããã°ã©ã ã®å®è¡éšå
end ããã°ã©ã å;
</syntaxhighlight>
<code>with</code>æã¯ã䜿çšããããã±ãŒãžãæå®ããããã«äœ¿çšãããŸãã<code>use</code>æã¯ãããã±ãŒãžã®äœ¿çšæ¹æ³ãæå®ããŸãã
ããã°ã©ã åã¯ãããã°ã©ã ã®ååãæå®ããŸããããã°ã©ã åã®äžã«ãå®æ°ãåãå€æ°ããµãããã°ã©ã ãã¿ã¹ã¯ãªã©ã宣èšããããšãã§ããŸãã
<code>begin</code>ããŒã¯ãŒãã®åŸã«ã¯ãããã°ã©ã ã®å®è¡éšåãç¶ããŸãã
ãœãŒã¹ã³ãŒãã®ãã¡ã€ã«åã®ã«ãŒã«ã¯ã以äžã®ããã«ãªããŸãã
* ãã¡ã€ã«åã¯ãããã°ã©ã åãšåãã«ããå¿
èŠããããŸãã
* Adaã®ãœãŒã¹ãã¡ã€ã«ã¯ã<code>.adb</code>ïŒæ¬äœïŒãš<code>.ads</code>ïŒä»æ§ïŒã®2ã€ã®æ¡åŒµåãæã€ããšãã§ããŸãã
* <code>.adb</code>ãã¡ã€ã«ãš<code>.ads</code>ãã¡ã€ã«ã®ãã¢ã¯ãåãååãæã€å¿
èŠããããŸãã
* ãã ããããã°ã©ã ãäžã€ã®<code>.adb</code>ãã¡ã€ã«ã§å®çµããŠããå Žåã<code>.ads</code>ãã¡ã€ã«ã¯äžèŠã§ãã
äŸãã°ã以äžã®ãããªãã¡ã€ã«æ§æã«ãªããŸãã
:<syntaxhighlight lang=text>
my_program.adb -- ããã°ã©ã ã®æ¬äœ
my_program.ads -- ããã°ã©ã ã®ä»æ§
</syntaxhighlight>
== ã³ã¡ã³ã ==
Adaã®ã³ã¡ã³ãã¯ãããã«ãã€ãã³ïŒ--ïŒã§ã¯ããŸããã©ã®è¡ã«ã衚瀺ããããšãã§ããŸããã³ã¡ã³ãã¯ã³ã³ãã€ã©ã«ãã£ãŠç¡èŠãããã³ãŒããèšé²ããããã«äœ¿çšãããŸãã
以äžã¯ãAdaã®ã³ã¡ã³ãã®äŸã§ãïŒ
:<syntaxhighlight lang=ada>
-- ããã¯ã³ã¡ã³ãã§ãã
</syntaxhighlight>
ã³ã¡ã³ãã¯ãã³ãŒãã®äžéšã®ç®çã説æããããè¿œå æ
å ±ãæäŸããããçŸåšäœ¿çšãããŠããªãã³ãŒãã®ã»ã¯ã·ã§ã³ãããŒã¯ããããã«äœ¿çšããããšãã§ããŸãã
ã³ã¡ã³ãã¯ãã³ãŒããããèªã¿ããããç解ããããããããã®è²ŽéãªããŒã«ã§ãããŸããã³ãŒãã®ä¿å®æ§ãåäžããããããã°ã容æã«ããå¹æããããŸãã
== ããŒã¿åãšå€æ° ==
Adaã«ã¯ãããŸããŸãªããŒã¿åããããŸãããã®ç« ã§ã¯ãAdaã§äœ¿çšã§ããäž»èŠãªããŒã¿åãšå€æ°ã®å®£èšæ¹æ³ãããŒã¿ã®ä»£å
¥ãæŒç®ã«ã€ããŠèª¬æããŸãã
=== ããŒã¿å ===
Adaã«ã¯ã以äžã®ãããªäž»èŠãªããŒã¿åããããŸãã
* æŽæ°åïŒIntegerïŒ
* å®æ°åïŒFloatïŒ
* æååïŒCharacterïŒ
* çåœå€åïŒBooleanïŒ
* åæåïŒEnumerationïŒ
* é
ååïŒArrayïŒ
* ã¬ã³ãŒãåïŒRecordïŒ
* æ§é äœåïŒAccessïŒ
ãããã®ããŒã¿åãçµã¿åãããŠãããè€éãªããŒã¿åãå®çŸ©ããããšãã§ããŸãã
==== æŽæ°åïŒIntegerïŒ ====
æŽæ°åïŒIntegerïŒã¯ãAdaã§æãäžè¬çãªããŒã¿åã®äžã€ã§ããã笊å·ä»ãæŽæ°å€ãè¡šããŸããIntegerã®ç¯å²ã¯å®è£
ã«ãã£ãŠç°ãªããŸãããéåžžã¯-2^31ãã2^31-1ãŸã§ã®å€ãè¡šãããšãã§ããŸãã以äžã¯ãIntegeråã䜿çšããã³ãŒãäŸã§ãã
;[http://tpcg.io/_8BBW94 integer_example.adb]:<syntaxhighlight lang=ada>
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
procedure Integer_Example is
age : Integer := 25;
begin
Put("I am ");
Put(age, 2);
Put(" years old.");
end Integer_Example;
</syntaxhighlight>
==== å®æ°åïŒFloatïŒ ====
å®æ°åïŒFloatïŒã¯ãæµ®åå°æ°ç¹æ°å€ãè¡šãããã«äœ¿çšãããŸããAdaã«ã¯ãããã€ãã®ç°ãªã粟床ã®FloatåããããŸããäŸãã°ãFloatåã¯éåžžãå粟床ã®æµ®åå°æ°ç¹æ°ãè¡šããLong_Floatåã¯å粟床ã®æµ®åå°æ°ç¹æ°ãè¡šããŸãã以äžã¯ãFloatåã䜿çšããã³ãŒãäŸã§ãã
;[http://tpcg.io/_8BBW94 float_example.adb]:<syntaxhighlight lang=ada>
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Float_Text_IO; use Ada.Float_Text_IO;
procedure Float_Example is
pi : Float := 3.14159;
begin
Put("The value of Pi is ");
Put(pi, 1, 5);
end Float_Example;
</syntaxhighlight>
==== æååïŒCharacterïŒ ====
æååïŒCharacterïŒã¯ãåäžã®æåãè¡šããŸããAdaã®æååã¯ãUnicodeæåã»ããããµããŒãããŠããŸãã以äžã¯ãCharacteråã䜿çšããã³ãŒãäŸã§ãã
;[http://tpcg.io/_8BBW94 character_example.adb]:<syntaxhighlight lang=ada>
with Ada.Text_IO; use Ada.Text_IO;
procedure Character_Example is
letter : Character := 'A';
begin
Put("The first letter of the alphabet is ");
Put(letter);
end Character_Example;
</syntaxhighlight>
==== çåœå€åïŒBooleanïŒ ====
çåœå€åïŒBooleanïŒã¯ãçãŸãã¯åœã®è«çå€ãè¡šããŸãã以äžã¯ãBooleanåã䜿çšããã³ãŒãäŸã§ãã
;[http://tpcg.io/_8BBW94 boolean_example.adb]:<syntaxhighlight lang=ada>
with Ada.Text_IO; use Ada.Text_IO;
procedure Boolean_Example is
is_raining : Boolean := True;
begin
if is_raining then
Put("Bring an umbrella.");
else
Put("Leave your umbrella at home.");
end if;
end Boolean_Example;
</syntaxhighlight>
==== åæåïŒEnumerationïŒ ====
åæåïŒEnumerationïŒã¯ãæå®ãããå€ã®éåãè¡šããŸããäŸãã°ã以äžã®ã³ãŒãäŸã§ã¯ãææ¥ãè¡šãããã«ãåæåã䜿çšããŠããŸãã
;[http://tpcg.io/_8BBW94 enumeration_example.adb]:<syntaxhighlight lang=ada>
with Ada.Text_IO; use Ada.Text_IO;
procedure Enumeration_Example is
type Day is (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday);
today : Day := Tuesday;
begin
Put("Today is ");
case today is
when Monday =>
Put("Monday");
when Tuesday =>
Put("Tuesday");
when Wednesday =>
Put("Wednesday");
when Thursday =>
Put("Thursday");
when Friday =>
Put("Friday");
when Saturday =>
Put("Saturday");
when Sunday =>
Put("Sunday");
end case;
end Enumeration_Example;
</syntaxhighlight>
==== é
ååïŒArrayïŒ ====
é
ååïŒArrayïŒã¯ãåãããŒã¿åã®å€ã®éåãè¡šããŸããé
åã¯ãåºå®ãµã€ãºãŸãã¯å¯å€ãµã€ãºã®å ŽåããããŸãã以äžã¯ãIntegeråã®é
åã䜿çšããã³ãŒãäŸã§ãã
;[http://tpcg.io/_4G0OF9 erray_example.adb]:<syntaxhighlight lang=ada>
with Ada.Text_IO; use Ada.Text_IO;
procedure Array_Example is
-- é
åã宣èšãã
type My_Array is array(1..5) of Integer;
A : My_Array := (1, 2, 3, 4, 5);
begin
-- é
åã®èŠçŽ ã«ã¢ã¯ã»ã¹ãã
Put_Line("A(1) = " & Integer'Image(A(1)));
Put_Line("A(2) = " & Integer'Image(A(2)));
-- é
åã®èŠçŽ ãå€æŽãã
A(1) := 10;
A(2) := 20;
-- å€æŽãããèŠçŽ ãåºåãã
Put_Line("A(1) = " & Integer'Image(A(1)));
Put_Line("A(2) = " & Integer'Image(A(2)));
-- é
åã®å
šèŠçŽ ã«ã¢ã¯ã»ã¹ãã
for I in A'range loop
Put_Line("A(" & Integer'Image(I) & ") = " & Integer'Image(A(I)));
end loop;
end Array_Example;
</syntaxhighlight>
==== ã¬ã³ãŒãåïŒRecordïŒ ====
ã¬ã³ãŒãåïŒRecordïŒã¯ãç°ãªãããŒã¿åã®å€ã®éåãè¡šããŸããã¬ã³ãŒãã«ã¯ãååä»ããã£ãŒã«ãããããŸãã以äžã¯ãPersonãšããååã®ã¬ã³ãŒãåã䜿çšããã³ãŒãäŸã§ãã
;record_example.adb:<syntaxhighlight lang=ada>
with Ada.Text_IO; use Ada.Text_IO;
procedure Record_Example is
type Person is record
Name : String(1..20);
Age : Integer;
Is_Married : Boolean;
end record;
p : Person := ("John", 30, False);
begin
Put("Name: ");
Put(p.Name);
New_Line;
Put("Age: ");
Put(p.Age, 2);
New_Line;
Put("Married: ");
if p.Is_Married then
Put("Yes");
else
Put("No");
end if;
end Record_Example;
</syntaxhighlight>
==== æ§é äœåïŒAccessïŒ ====
æ§é äœåïŒAccessïŒã¯ãåçã«ç¢ºä¿ãããããŒã¿æ§é ãè¡šããŸããæ§é äœã«ã¯ãååä»ããã£ãŒã«ãããããŸãã以äžã¯ãPersonãšããååã®Accessåã䜿çšããã³ãŒãäŸã§ãã
:<syntaxhighlight lang=ada>
with Ada.Text_IO; use Ada.Text_IO;
procedure Access_Example is
type Person is record
Name : String(1..20);
Age : Integer;
Is_Married : Boolean;
end record;
type Person_Ptr is access Person;
p : Person_Ptr :== new Person'(Name ==> "John", Age ==> 30, Is_Married ==> False);
begin
Put("Name: ");
Put(p.Name);
New_Line;
Put("Age: ");
Put(p.Age, 2);
New_Line;
Put("Married: ");
if p.Is_Married then
Put("Yes");
else
Put("No");
end if;
end Access_Example;
</syntaxhighlight>
== å€æ°ã®å®£èš ==
å€æ°ã宣èšããã«ã¯ã以äžã®ãããªæ§æã䜿çšããŸãã
:<syntaxhighlight lang=ada>
variable_name : data_type := initial_value;
</syntaxhighlight>
å€æ°åã¯ãè±æ°åãšã¢ã³ããŒã¹ã³ã¢ããæ§æãããŸããããŒã¿åã¯ãåè¿°ã®ããŒã¿åã®ãããããæå®ããŸããåæå€ã¯ãªãã·ã§ã³ã§ãå€æ°ã®å®£èšæã«ä»£å
¥ãããŸãã
äŸãã°ãæŽæ°åã®å€æ°<code>x</code>ã宣èšããåæå€ã<code>10</code>ã«èšå®ããå Žåã¯ã以äžã®ããã«ãªããŸãã
:<syntaxhighlight lang=ada>
x : Integer := 10;
</syntaxhighlight>
== ããŒã¿ã®ä»£å
¥ ==
å€æ°ã«ããŒã¿ã代å
¥ããã«ã¯ã以äžã®ãããªæ§æã䜿çšããŸãã
:<syntaxhighlight lang=ada>
variable_name := new_value;
</syntaxhighlight>
å€æ°åã¯ã代å
¥å
ã®å€æ°ãæå®ããŸããæ°ããå€ã¯ã代å
¥æŒç®å<code>:=</code>ã®åŸã«ç¶ããŠæå®ããŸãã
äŸãã°ãäžèšã®äŸã§å®£èšããæŽæ°åã®å€æ°<code>x</code>ã«ãæ°ããå€<code>20</code>ã代å
¥ããå Žåã¯ã以äžã®ããã«ãªããŸãã
:<syntaxhighlight lang=ada>
x := 20;
</syntaxhighlight>
== åŒãšæŒç®å ==
=== åŒ ===
Adaèšèªã§ã¯ãåŒãšã¯å€æ°ãå®æ°ããªãã©ã«å€ãé¢æ°ãããã³æŒç®åãå«ãã³ãŒãã®æçã§ããåŒã¯ãåŒèªäœãå€ãè¿ãããã«è©äŸ¡ãããå€æ°ã®å€ãååŸããããé¢æ°ãåŒã³åºãããããããšãã§ããŸãã
äŸãã°ã以äžã®ã³ãŒãã¯ãåŒã䜿çšããŠå€æ°xãšyã®å€ãå ç®ããçµæãå€æ°zã«æ ŒçŽããŸãã
:<syntaxhighlight lang=ada>
with Ada.Text_IO; use Ada.Text_IO;
procedure Main is
x, y, z : Integer;
begin
x := 10;
y := 20;
z := x + y;
Put_Line(z'Image);
end Main;
</syntaxhighlight>
=== æŒç®å ===
æŒç®åãšã¯ãç®è¡ãæ¯èŒãè«çããããæŒç®ãªã©ãããã°ã©ã ã§äœ¿çšãããæäœãè¡šãç¹æ®ãªèšå·ã§ããæŒç®åã¯ãäžè¬ã«äžã€ãŸãã¯è€æ°ã®ãªãã©ã³ãã«é©çšãããŸãã
Adaã«ã¯ã次ã®ãããªæŒç®åã®çš®é¡ããããŸãã
* ç®è¡æŒç®å: +ã-ã*ã/ã**ïŒã¹ãä¹ïŒ
* æ¯èŒæŒç®å: =ã/=ã<ã<=ã>ã>=
* è«çæŒç®å: andãorãnot
* ãããæŒç®å: andãorãxorãnotãshlïŒå·Šã·ããïŒãshrïŒå³ã·ããïŒ
Adaã«ã¯ãCèšèªã®ãããªè€éãªæŒç®åããªããããæ確ã§ããããããã³ãŒããæžããŸãã
Adaã«ç¹æã®æŒç®åã®äžã€ã¯ãç¯å²æŒç®å(..)ã§ããããã¯ãç¯å²ãè¡šãããã«äœ¿çšãããŸããããšãã°ã1ãã10ãŸã§ã®æŽæ°ã®ç¯å²ãè¡šãã«ã¯ã1..10ãšæžããŸãã
ãŸããAdaã«ã¯ãå°äœæŒç®å(mod)ããããŸããããã¯ã2ã€ã®æŽæ°ã®å°äœãèšç®ããŸãã
以äžã¯ãAdaã§ç®è¡æŒç®åã䜿çšããäŸã§ãã
:<syntaxhighlight lang=ada>
with Ada.Text_IO; use Ada.Text_IO;
procedure Main is
X, Y, Z : Integer;
begin
X := 10;
Y := 3;
Z := X + Y;
Put_Line("X + Y = " & Integer'Image(Z));
Z := X - Y;
Put_Line("X - Y = " & Integer'Image(Z));
Z := X * Y;
Put_Line("X * Y = " & Integer'Image(Z));
Z := X / Y;
Put_Line("X / Y = " & Float'Image(Z));
Z := X ** Y;
Put_Line("X ** Y = " & Integer'Image(Z));
end Main;
</syntaxhighlight>
;åºå
:<syntaxhighlight lang=text>
X + Y = 13
X - Y = 7
X * Y = 30
X / Y = 3.333333
X ** Y = 1000
</syntaxhighlight>
以äžã«ãAdaã®æŒç®åãåé¡ããšã«äžèŠ§è¡šã«ãŸãšããŸããã
{| class="wikitable" style="float:left"
|+ ç®è¡æŒç®å
!æŒç®å
!説æ
|-
!+
|å ç®
|-
!-
|æžç®
|-
!*
|ä¹ç®
|-
!/
|é€ç®
|-
!mod
|é€äœ
|-
!**
|ã¹ãä¹
|}
{| class="wikitable" style="float:left"
|+ æ¯èŒæŒç®å
!æŒç®å
!説æ
|-
! =
|çãã
|-
! /=
| çãããªã
|-
! <
|æªæº
|-
!<=
|以äž
|-
! >
| ãã倧ãã
|-
! >=
| 以äž
|}
{| class="wikitable" style="float:left"
|+ è«çæŒç®å
!æŒç®å
!説æ
|-
!and
|è«çç©
|-
!or
|è«çå
|-
!not
|åŠå®
|}
{| class="wikitable" style="float:left"
|+ ãããæŒç®å
!æŒç®å
!説æ
|-
!and
|ãããããšã®è«çç©
|-
!or
|ãããããšã®è«çå
|-
!xor
|ãããããšã®æä»çè«çå
|-
!not
|ãããããšã®åŠå®
|-
!shl
|å·Šã·ãã
|-
!shr
|å³ã·ãã
|}
{| class="wikitable" style="float:left"
|+ ãã®ä»ã®æŒç®å
!æŒç®å
!説æ
|-
!&
|æååã®é£çµ
|-
! :=
|代å
¥
|-
![]
|é
åã®èŠçŽ ã®åç
§
|-
!()
|æç¶ããé¢æ°ã®åŒæ°ã®æå®ãã°ã«ãŒãå
|-
!.
|ã¬ã³ãŒãã®ãã£ãŒã«ãã®åç
§
|-
!..
|ç¯å²ãè¡šã
|}
<br style="clear:both">
以äžã®è¡šã«ç€ºãããæŒç®åãé©åã«äœ¿çšããããšã§ãAdaããã°ã©ã ãããå¹ççãã€ããããããèšè¿°ããããšãã§ããŸãã
== å¶åŸ¡æ§é ==
å¶åŸ¡æ§é (Control Structures)ã¯ãããã°ã©ã ã®æµããå¶åŸ¡ããããã®æ§é ã§ãããããã°ã©ã ãããè€éãªåäœãè¡ããããã«ããŸããAdaã§ã¯ãäž»ã«æ¡ä»¶åå²(ifæ)ãšã«ãŒã(foræ)ãå©çšãããŸãã
=== æ¡ä»¶åå²(ifæ) ===
æ¡ä»¶åå²ã¯ãæ¡ä»¶ã«ãã£ãŠåŠçãåå²ãããããã®æ§é ã§ããifæãçšããŠãæ¡ä»¶ãçã§ããå Žåãšåœã§ããå Žåã§ãããããç°ãªãåŠçãè¡ãããšãã§ããŸãã
;åçŽãªifæ:<syntaxhighlight lang=ada>
if æ¡ä»¶ then
çã®å Žåã®åŠç;
end if;
</syntaxhighlight>
:äžèšã®æ§æã§ã¯ãæ¡ä»¶ãçã§ããå Žåã«çã®å Žåã®åŠçãå®è¡ãããŸããåœã§ããå Žåã¯ãäœãåŠçãããŸããã
;if-elseæ:<syntaxhighlight lang=ada>
if æ¡ä»¶ then
çã®å Žåã®åŠç;
else
åœã®å Žåã®åŠç;
end if;
</syntaxhighlight>
:äžèšã®æ§æã§ã¯ãæ¡ä»¶ãçã§ããå Žåã«çã®å Žåã®åŠçãå®è¡ãããåœã§ããå Žåã«ã¯åœã®å Žåã®åŠçãå®è¡ãããŸãã
;if-elsif-elseæ
:<syntaxhighlight lang=ada>
if æ¡ä»¶1 then
æ¡ä»¶1ãçã®å Žåã®åŠç;
elsif æ¡ä»¶2 then
æ¡ä»¶2ãçã®å Žåã®åŠç;
else
æ¡ä»¶1ãæ¡ä»¶2ãåœã®å Žåã®åŠç;
end if;
</syntaxhighlight>
:äžèšã®æ§æã§ã¯ãæ¡ä»¶1ãçã®å Žåã«ã¯æ¡ä»¶1ãçã®å Žåã®åŠçãå®è¡ãããæ¡ä»¶2ãçã®å Žåã«ã¯æ¡ä»¶2ãçã®å Žåã®åŠçãå®è¡ãããã©ã¡ããåœã®å Žåã«ã¯ãelse以äžã®åœã®å Žåã®åŠçãå®è¡ãããŸãã
==== caseæ ====
Adaã«ããã<code>case</code>æã¯ãè€æ°ã®æ¡ä»¶åå²ãè¡ãããã«äœ¿çšãããå¶åŸ¡æ§é ã®äžã€ã§ãã<code>case</code>æã¯ãå€ã«ãã£ãŠç°ãªããããã¯ãå®è¡ããããšãã§ããŸãã
<code>case</code>æã¯ä»¥äžã®ãããªæ§æãæã¡ãŸãã
:<syntaxhighlight lang=ada>
case expression is
when choice1 =>
-- choice1ã®åŠç
when choice2 =>
-- choice2ã®åŠç
...
when choiceN =>
-- choiceNã®åŠç
when others =>
-- ã©ã®æ¡ä»¶ã«ãäžèŽããªãå Žåã®åŠç
end case;
</syntaxhighlight>
<code>expression</code>ã«ã¯æ¡ä»¶åå²ã®å¯Ÿè±¡ãšãªãåŒãæå®ããŸãã<code>choice</code>ã«ã¯æ¡ä»¶åå²ã®åè£ãšãªãå€ãæå®ããŸãã<code>when</code>ããŒã¯ãŒãã®åŸã«ç¶ã<code>choice</code>ã«è©²åœããå Žåããã®ãããã¯å
ã®åŠçãå®è¡ãããŸããæåŸã«ã<code>when others</code>ã䜿çšããŠãã©ã®æ¡ä»¶ã«ã該åœããªãå Žåã®åŠçãæå®ããããšãã§ããŸãã
=== å埩 ===
Adaã«ãããã«ãŒãïŒç¹°ãè¿ãïŒã¯ãåãåŠçãç¹°ãè¿ãå®è¡ããããã®å¶åŸ¡æ§é ã§ããAdaã«ã¯ã以äžã®3ã€ã®ã«ãŒãããããŸãã
*loopã«ãŒã
*whileã«ãŒã
*forã«ãŒã
==== loopã«ãŒã ====
loopã«ãŒãã¯ãæ¡ä»¶åŒãfalseã«ãªããŸã§ãç¹°ãè¿ãåŠçãå®è¡ããŸãã以äžã¯ãloopã«ãŒãã®æ§æã§ãã
:<syntaxhighlight lang=ada>
loop
-- å®è¡ããåŠç
end loop;
</syntaxhighlight>
以äžã¯ãloopã«ãŒãã®äŸã§ãã
:<syntaxhighlight lang=ada>
with Ada.Text_IO; use Ada.Text_IO;
procedure Example is
I : Integer := 1;
begin
loop
Put_Line("I is " & Integer'Image(I));
I := I + 1;
exit when I = 5;
end loop;
end Example;
</syntaxhighlight>
ãã®äŸã§ã¯ãIã5ã«ãªããŸã§ãPut_Lineã§Iã®å€ã衚瀺ããåŠçãç¹°ãè¿ããŠããŸããexit whenæã䜿çšããŠãIã5ã«ãªã£ãæç¹ã§ã«ãŒããçµäºããããã«ããŠããŸãã
==== whileã«ãŒã ====
whileã«ãŒãã¯ãæ¡ä»¶åŒãtrueã®éãç¹°ãè¿ãåŠçãå®è¡ããŸãã以äžã¯ãwhileã«ãŒãã®æ§æã§ãã
:<syntaxhighlight lang=ada>
while condition loop
-- å®è¡ããåŠç
end loop;
</syntaxhighlight>
以äžã¯ãwhileã«ãŒãã®äŸã§ãã
:<syntaxhighlight lang=ada>
with Ada.Text_IO; use Ada.Text_IO;
procedure Example is
I : Integer := 1;
begin
while I <= 5 loop
Put_Line("I is " & Integer'Image(I));
I := I + 1;
end loop;
end Example;
</syntaxhighlight>
ãã®äŸã§ã¯ãIã5以äžã§ããéããPut_Lineã§Iã®å€ã衚瀺ããåŠçãç¹°ãè¿ããŠããŸãã
==== forã«ãŒã ====
forã«ãŒãã¯ãåæå€ããçµäºå€ãŸã§ãæå®ãããã¹ãããã§ç¹°ãè¿ãåŠçãå®è¡ããŸãã以äžã¯ãforã«ãŒãã®æ§æã§ãã
:<syntaxhighlight lang=ada>
for variable in range loop
-- å®è¡ããåŠç
end loop;
</syntaxhighlight>
以äžã¯ãforã«ãŒãã®äŸã§ãã
:<syntaxhighlight lang=ada>
with Ada.Text_IO; use Ada.Text_IO;
procedure Example is
begin
for I in 1..5 loop
Put_Line("I is " & Integer'Image(I));
end loop;
end Example;
</syntaxhighlight>
ãã®äŸã§ã¯ã1ãã5ãŸã§ã®æ°å€ããIã«é çªã«ä»£å
¥ããŠPut_Lineã§Iã®å€ã衚瀺ããåŠçãç¹°ãè¿ããŠããŸãã
=== ãŸãšã ===
以äžã¯ãæ¡ä»¶åå²ãã«ãŒããªã©ã®å¶åŸ¡æ§é ããã¹ãŠäœ¿çšãã Ada ã®ããã°ã©ã äŸã§ãã
;control_structures.adb:<syntaxhighlight lang=ada>
with Ada.Text_IO, Ada.Integer_Text_IO;
use Ada.Text_IO, Ada.Integer_Text_IO;
procedure Control_Structures is
I : Integer;
Num : Integer;
begin
-- if-then-else statement
Put("Enter a number: ");
Get(Num);
if Num > 0 then
Put_Line("The number is positive.");
elsif Num = 0 then
Put_Line("The number is zero.");
else
Put_Line("The number is negative.");
end if;
-- case statement
Put("Enter a number between 1 and 3: ");
Get(I);
case I is
when 1 =>
Put_Line("You entered 1.");
when 2 =>
Put_Line("You entered 2.");
when 3 =>
Put_Line("You entered 3.");
when others =>
Put_Line("You entered something else.");
end case;
-- for loop
Put_Line("Printing numbers from 1 to 10:");
for I in 1..10 loop
Put(I, 2);
Put(" ");
end loop;
New_Line;
-- while loop
I := 1;
Put_Line("Printing odd numbers from 1 to 10:");
while I <= 10 loop
if I mod 2 = 1 then
Put(I, 2);
Put(" ");
end if;
I := I + 1;
end loop;
New_Line;
-- exit statement
Put_Line("Printing numbers from 1 to 10 until 6 is reached:");
for I in 1..10 loop
if I = 6 then
exit;
end if;
Put(I, 2);
Put(" ");
end loop;
New_Line;
end Control_Structures;
</syntaxhighlight>
ãã®ããã°ã©ã ã§ã¯ããŠãŒã¶ãŒããã®å
¥åãåãåããif-then-else æã䜿çšããŠå
¥åãããæ°å€ã®ç¬Šå·ãå€å®ããcase æã䜿çšããŠå
¥åãããæ°å€ã®å€ã«ãã£ãŠåå²ããŸãã
ããã«ãfor ã«ãŒããš while ã«ãŒãã䜿çšããŠãæ°å€ãç¹°ãè¿ãåºåããexit æã䜿çšããŠã«ãŒãããæãåºãããšã瀺ããŠããŸãã
== ãµãããã°ã©ã ==
[æç¶ããé¢æ°ã®å®£èšæ¹æ³ãåŒæ°ã®æž¡ãæ¹ãæ»ãå€ã®åãæ±ããªã©ã説æããŸãã]
ãµãããã°ã©ã ã¯ãã¡ã€ã³ããã°ã©ã ã®äžã§å®è¡ãããç¬ç«ããã³ãŒãã®ãããã¯ã§ãããæç¶ããšé¢æ°ã®2ã€ã®åœ¢åŒããããŸããæç¶ãã¯ãäœããå®è¡ããããã®ãµãããã°ã©ã ã§ãããæ»ãå€ãè¿ããªãã®ã«å¯ŸããŠãé¢æ°ã¯å€ãè¿ããŸãã
=== æç¶ãã®å®£èš ===
:<syntaxhighlight lang=ada>
procedure Procedure_Name (parameter1, parameter2, ...) is
-- Declaration statements
begin
-- Statements
end Procedure_Name;
</syntaxhighlight>
=== é¢æ°ã®å®£èš ===
:<syntaxhighlight lang=ada>
function Function_Name (parameter1, parameter2, ...) return Return_Type is
-- Declaration statements
begin
-- Statements
return return_value;
end Function_Name;
</syntaxhighlight>
=== åŒæ°ã®æž¡ãæ¹ ===
Adaã§ã¯ãåŒæ°ãåç
§æž¡ããå€æž¡ããããã³äžå€æž¡ãã®3ã€ã®æ¹æ³ã§æž¡ãããšãã§ããŸããåç
§æž¡ãã¯ãåŒæ°ããµãããã°ã©ã å
ã§å€æŽãããå ŽåãåŒã³åºãå
ã®å€æ°ã«ãåæ ãããŸããå€æž¡ãã¯ãåŒæ°ããµãããã°ã©ã ã«ã³ããŒãããããåŒã³åºãå
ã®å€æ°ã«ã¯åœ±é¿ãäžããŸãããäžå€æž¡ãã¯ãåŒã³åºãå
ã®å€æ°ãä¿è·ããããããµãããã°ã©ã å
ã§åŒæ°ãå€æŽããããšã¯ã§ããŸããã
;äŸ
:<syntaxhighlight lang=ada>
procedure Example (A : in Integer; B : out Integer; C : in out Integer) is
begin
B := A + 1; -- å€æ°Bã«ã¯å€ã代å
¥ããã
C := C + 1; -- å€æ°Cã«ã¯å€ã代å
¥ãããåŒã³åºãå
ã®å€æ°ã«ãåæ ããã
end Example;
</syntaxhighlight>
=== æ»ãå€ã®åãæ±ã ===
é¢æ°ã¯åžžã«å€ãè¿ããŸãããã®ãããé¢æ°ã®æ»ãå€ãå€æ°ã«ä»£å
¥ããããšãã§ããŸãã
;äŸ
:<syntaxhighlight lang=ada>
function Add (A : Integer; B : Integer) return Integer is
begin
return A + B;
end Add;
-- ã¡ã€ã³ããã°ã©ã
X := Add(2, 3); -- Xã«ã¯5ã代å
¥ããã
</syntaxhighlight>
== ãªããžã§ã¯ãæåããã°ã©ãã³ã° ==
[Adaã§ã®ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã®åºæ¬æŠå¿µããã¯ã©ã¹ã®å®çŸ©æ¹æ³ãç¶æ¿ãããªã¢ãŒãã£ãºã ãªã©ã説æããŸãã]
ãªããžã§ã¯ãæåããã°ã©ãã³ã°ïŒOOPïŒã¯ãããã°ã©ã ããªããžã§ã¯ããšåŒã°ããåäœã«åå²ãããããã®çžäºäœçšã«ãã£ãŠããã°ã©ã ãæ§æããããã°ã©ãã³ã°ã®æ¹æ³è«ã§ããAdaãOOPã«å¯Ÿå¿ããŠããã以äžã«åºæ¬æŠå¿µãã¯ã©ã¹ã®å®çŸ©æ¹æ³ãªã©ã説æããŸãã
=== ã¯ã©ã¹ã®å®çŸ©æ¹æ³ ===
ã¯ã©ã¹ã¯ãããŒã¿åã®å®çŸ©ã«äŒŒãæ¹æ³ã§å®çŸ©ãããŸããäŸãã°ã以äžã¯ã¯ã©ã¹ Point ãå®çŸ©ããäŸã§ãã
:<syntaxhighlight lang=ada>
-- Pointã¯ã©ã¹ãå®çŸ©
package Point_Class is
type Point is tagged record
X, Y : Integer;
end record;
procedure Set_Point(P : in out Point; X, Y : Integer);
function Get_X(P : Point) return Integer;
function Get_Y(P : Point) return Integer;
end Point_Class;
</syntaxhighlight>
ã¯ã©ã¹ã®å®£èšã¯ãpackageïŒããã±ãŒãžïŒæã§è¡ãããŸããtypeæã«ãã£ãŠãPoint ãšããååã®ã¯ã©ã¹ãå®çŸ©ãããtaggedïŒã¿ã°ä»ãïŒã«èšå®ãããŸããã¿ã°ä»ãã®ã¯ã©ã¹ã¯ã掟çåïŒã¯ã©ã¹ïŒãå®çŸ©ããéã«å¿
èŠã§ãããŸããrecordæã«ãã£ãŠãã¯ã©ã¹ã®ã¡ã³ããŒãå®çŸ©ãããŸãã
次ã«ãã¯ã©ã¹ã®ã¡ã³ããŒã«ã¢ã¯ã»ã¹ããããã®æç¶ããé¢æ°ãå®çŸ©ããŸãããã®äŸã§ã¯ãããã·ãŒãžã£ Set_Point ã§ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ P ã®ã¡ã³ã㌠X ãš Y ã«å€ãèšå®ããé¢æ° Get_X, Get_Y ã§ããããã®å€ãååŸããããšãã§ããŸãã
=== ç¶æ¿ ===
Adaã¯ãç¶æ¿ããµããŒãããŠããŸãã掟çåïŒãµãã¯ã©ã¹ïŒã¯ãåºåºåïŒã¹ãŒããŒã¯ã©ã¹ïŒãæ¡åŒµããããšãã§ããŸããäŸãã°ã以äžã¯ã¯ã©ã¹ Circle ãå®çŸ©ããäŸã§ãPoint ã¯ã©ã¹ãç¶æ¿ããŠããŸãã
:<syntaxhighlight lang=ada>
-- Circleã¯ã©ã¹ãå®çŸ©
package Circle_Class is
type Circle is new Point with record
Radius : Integer;
end record;
procedure Set_Circle(C : in out Circle; X, Y, R : Integer);
function Get_Radius(C : Circle) return Integer;
end Circle_Class;
</syntaxhighlight>
typeæã® new æ§æã§ã掟çå Circle ã Point ã¯ã©ã¹ãç¶æ¿ããããšãæå®ãããŠããŸãããŸããwith record ã§ãCircle ã¯ã©ã¹ã«ç¬èªã®ãã£ãŒã«ã Radius ãè¿œå ããŠããŸããç¶æ¿å
ã®ã¯ã©ã¹ïŒã¹ãŒããŒã¯ã©ã¹ïŒã®ãã£ãŒã«ãã¯ãåŒãç¶ã Circle ã¯ã©ã¹ã§ã䜿çšããããšãã§ããŸãã
{{ã³ã©ã |Adaã«å€éç¶æ¿ã¯ãããŸããïŒ|2=ããããAdaã«ã¯å€éç¶æ¿ã¯ãããŸãããAdaããã°ã©ãã³ã°èšèªã¯ãåäžç¶æ¿ã®ååãæ¡çšããŠããŸããããã¯ãããã¯ã©ã¹ïŒAdaã§ã¯"å"ãšåŒã°ããïŒãä»ã®ã¯ã©ã¹ããã®ã¿ç¶æ¿ã§ããããšãæå³ããŸããããã«ãããã¯ã©ã¹ã®éå±€æ§é ãç°¡æœã«ãªããã¯ã©ã¹éã®è€éãªé¢ä¿ãæžå°ããŸãã
Adaã®éžæã«ã¯ãåäžç¶æ¿ãç解ãããããã·ã³ãã«ã§ãããšããèšèšææ³ã圱é¿ããŠããŸããå€éç¶æ¿ã¯æè»æ§ãæäŸããŸãããã¯ã©ã¹ã®éå±€æ§é ãè€éã«ãªãå¯èœæ§ããããã³ãŒãã®ç解ãã¡ã³ããã³ã¹ãé£ãããªãããšããããããAdaã¯æå³çã«ãããé¿ããŠããŸãã
代ããã«ãAdaã¯ã€ã³ã¿ãŒãã§ãŒã¹ã®å®è£
ãè€æ°ã®ã€ã³ã¿ãŒãã§ãŒã¹ã®ãµããŒããããã³ããã¯ã¹ã€ã³ïŒmix-inïŒã®ãããªæ©èœãæäŸããããã«ããæè»ãªãªããžã§ã¯ãæåããã°ã©ãã³ã°ãå¯èœã§ãã
}}
== äŸå€åŠç ==
[äŸå€ãçºçããå Žåã®åŠçæ¹æ³ã«ã€ããŠèª¬æããŸãã]
Adaã«ã¯äŸå€åŠçæ©æ§ãåãã£ãŠãããäŸå€ãçºçããå Žåã«å¯ŸåŠããããšãã§ããŸããäŸå€ã¯ãå®è¡æã«çºçãããšã©ãŒã§ãããäºæããªãç¶æ³ãçºçããå Žåã«çºçããããšããããŸããäŸãã°ããŒãé€ç®ãé
åã®å¢çå€ã¢ã¯ã»ã¹ãäžæ£ãªå
¥åãã¡ã¢ãªäžè¶³ãªã©ãæããããŸãã
äŸå€åŠçã®æ§æã¯ä»¥äžã®ããã«ãªããŸãã
:<syntaxhighlight lang=ada>
begin
-- äŸå€ãçºçããå¯èœæ§ã®ããåŠç
exception
when Exception1 =>
-- Exception1ãçºçããå Žåã®åŠç
when Exception2 =>
-- Exception2ãçºçããå Žåã®åŠç
...
when others =>
-- äžèšä»¥å€ã®äŸå€ãçºçããå Žåã®åŠç
end;
</syntaxhighlight>
ããã§ãException1ãException2ã¯ãäŸå€ã®çš®é¡ã瀺ãäŸå€åã§ãããå
·äœçãªäŸå€åã¯ã¢ããªã±ãŒã·ã§ã³ã«ãã£ãŠç°ãªããŸãã
äŸå€åŠçã¯ãtry-catchæ§æã®ãããªæ§é ã§ãããããããã°ã©ã ãäŸå€ããã£ããããå Žåã該åœããäŸå€åŠçãããã¯ãå®è¡ãããŸãã<code>others</code>ããŒã¯ãŒãã¯ãäžèšã®äŸå€ä»¥å€ã®ãã¹ãŠã®äŸå€ããã£ããããããã«äœ¿çšãããŸãã
以äžã¯ãäŸå€åŠçã®äŸã§ãã
:<syntaxhighlight lang=ada>
with Ada.Text_IO;
use Ada.Text_IO;
procedure Exception_Handling is
A : Integer := 10;
B : Integer := 0;
Result : Integer;
-- ãŒãé€ç®ãæ€åºããäŸå€åŠçé¢æ°
function Divide(A, B : Integer) return Integer is
begin
if B = 0 then
raise Program_Error;
else
return A / B;
end if;
end Divide;
begin
-- Divideé¢æ°ã§ãŒãé€ç®ãçºçããå Žåã
-- Program_ErroräŸå€ãçºçãããããäŸå€åŠçãå®è¡ããã
begin
Result := Divide(A, B);
Put_Line("Result: " & Result'Image);
exception
when Program_Error =>
Put_Line("Error: Division by zero.");
end;
Put_Line("End of program.");
end Exception_Handling;
</syntaxhighlight>
ãã®äŸã§ã¯ã<code>Divide</code>é¢æ°ã§<code>B</code>ã0ã§ããå Žåã<code>Program_Error</code>äŸå€ãçºçããŸãã<code>Program_Error</code>äŸå€ã¯ãAdaã®æšæºäŸå€ã§ãããå®è¡æãšã©ãŒãçºçããå Žåã«èªåçã«ã¹ããŒãããŸãã<code>Divide</code>é¢æ°ãå®è¡ããããã«ã<code>try-catch</code>æ§æã䜿çšãã<code>Program_Error</code>äŸå€ããã£ãããããšã©ãŒã¡ãã»ãŒãžã衚瀺ããŸãã
== ã¿ã¹ã¯ ==
[ã¿ã¹ã¯ã®å®çŸ©æ¹æ³ãã¹ã±ãžã¥ãŒãªã³ã°ãçžäºæé€ãªã©ã«ã€ããŠèª¬æããŸãã]
ã¿ã¹ã¯ãšã¯ã䞊è¡åŠçãå®çŸããããã«äœ¿çšãããæŠå¿µã§ããã¿ã¹ã¯ã¯ãèªå·±å®çµåã§ç¬ç«ããã¹ã¬ããã®ãããªãã®ã§ãèªåèªèº«ãå®è¡å¯èœã§ãããšåæã«ãä»ã®ã¿ã¹ã¯ããã®ã¡ãã»ãŒãžãåä¿¡ããŠåŠçãè¡ãããšãã§ããŸããã¿ã¹ã¯ã®ã¹ã±ãžã¥ãŒãªã³ã°ã¯ãAdaã©ã³ã¿ã€ã ã·ã¹ãã ã«ãã£ãŠèªåçã«å¶åŸ¡ãããŸãã
ã¿ã¹ã¯ã®å®£èšæ¹æ³ã¯ã以äžã®ããã«ãªããŸãã
:<syntaxhighlight lang=ada>
task Task_Name is
entry Entry_Name (Parameter_List);
end Task_Name;
</syntaxhighlight>
ããã§ãTask_Name ã¯ã¿ã¹ã¯ã®ååãEntry_Name ã¯ã¿ã¹ã¯ããåŒã³åºããããšã³ããªãŒã®ååãParameter_List ã¯ãšã³ããªãŒã«æž¡ãããåŒæ°ã®ãªã¹ãã§ãã
ãŸããã¿ã¹ã¯éã®çžäºæé€ã«ã¯ã以äžã®ãããªæ段ããããŸãã
* ã»ããã©ïŒSemaphoreïŒ
* ãã¥ãŒããã¯ã¹ïŒMutexïŒ
* ãªã¢ãŒãã»ãªãŒããããŒã«ã«ã»ãã«ããã«ã»ã©ã€ãïŒRemote_Read, Local_Multiple_WriteïŒ
== ããã±ãŒãž ==
[Adaã§ã®ããã±ãŒãžã®äœææ¹æ³ã䜿çšæ¹æ³ãåå空éã®æ©èœã«ã€ããŠèª¬æããŸãã]
ããã±ãŒãžã¯ãAdaã®åå空éãå®çŸããããã®æ©èœã§ãé¢é£ãããµãããã°ã©ã ãå€æ°ããŸãšããããšãã§ããŸããããã±ãŒãžã«ã¯ãå
¬éãããã€ã³ã¿ãŒãã§ãŒã¹éšãšãå®è£
éšããããŸããã€ã³ã¿ãŒãã§ãŒã¹éšã«ã¯ãä»ã®ã¢ãžã¥ãŒã«ããã¢ã¯ã»ã¹å¯èœãªãµãããã°ã©ã ãå€æ°ãå®çŸ©ããå®è£
éšã«ã¯ããããã®ãµãããã°ã©ã ãå€æ°ã®å®è£
ãèšè¿°ããŸãã
ããã±ãŒãžã®å®£èšæ¹æ³ã¯ã以äžã®ããã«ãªããŸãã
:<syntaxhighlight lang=ada>
package Package_Name is
-- ã€ã³ã¿ãŒãã§ãŒã¹éš
end Package_Name;
package body Package_Name is
-- å®è£
éš
end Package_Name;
</syntaxhighlight>
== ãã¡ã€ã«å
¥åºå ==
[ãã¡ã€ã«ãéããŠèªã¿æžãããæ¹æ³ã«ã€ããŠèª¬æããŸãã]
Adaã«ããããã¡ã€ã«æäœã¯ãã¹ããªãŒã ïŒStreamïŒãšåŒã°ããæ©èœã䜿çšããŠè¡ããŸãããã¡ã€ã«ãéãã«ã¯ã以äžã®ããã«ããŸãã
:<syntaxhighlight lang=ada>
with Ada.Text_IO; use Ada.Text_IO;
procedure Main is
F : File_Type;
begin
Create (F, Out_File, "output.txt");
-- åºåå
ã®ãã¡ã€ã«ã "output.txt" ã«èšå®
end Main;
</syntaxhighlight>
ãã¡ã€ã«ããã®å
¥åãããã¡ã€ã«ãžã®åºåã¯ãGet_LineãPut_LineãReadãWrite ãªã©ã®ãµãããã°ã©ã ã䜿çšããŠè¡ããŸãã
== ãããã°ãšãã¹ã ==
[Adaã®ãããã°ããã¹ãã®æ¹æ³ã«ã€ããŠèª¬æããŸãã]
Adaã«ã¯ãã³ã³ãã€ã«æã®éçæ€æ»ãã©ã³ã¿ã€ã æã®åçæ€æ»ãªã©ãæ§ã
ãªã¬ãã«ã®æ€æ»ãåãã£ãŠããŸãã
ãŸããã³ã³ãã€ã«æã®æ€æ»ã«ã€ããŠã§ããAdaã¯ãåå®å
šæ§ãéåžžã«é«ãèšèªã§ããéçåæ€æ»æ©èœã«ãããå€æ°ãå®æ°ã®åãäžèŽããªãå ŽåããŸãã¯æªåæåã®å€æ°ã䜿çšããå Žåãªã©ãã³ã³ãã€ã«æã«ãšã©ãŒãçºçããŸããããã«ãããå€ãã®å®è¡æãšã©ãŒãæªç¶ã«é²æ¢ã§ããŸãã
ã©ã³ã¿ã€ã æã®æ€æ»ãšããŠãäŸå€åŠçããããŸããããã°ã©ã äžã§çºçããäºæãã¬ãšã©ãŒã«å¯Ÿå¿ãããããäŸå€åŠçã䜿çšããããšãã§ããŸããäŸå€ãçºçããå Žåã¯ãäŸå€ã®çš®é¡ã«å¿ããåŠçãè¡ãããšãã§ããŸãã
ãŸããAdaã«ã¯ã³ãŒãã«ãã¬ããžããŒã«ãå«ãŸããŠããŸããã³ãŒãã«ãã¬ããžããŒã«ã¯ããã¹ãäžã«å®è¡ãããã³ãŒãã®å²åã枬å®ããããã«äœ¿çšãããŸããããã«ãããã©ã®ã³ãŒãããã¹ããããŠããªãããç¹å®ãããã¹ãã®æ¹åç¹ãèŠã€ããããšãã§ããŸãã
== éé² ==
=== ããŒãã·ãŒã ===
:<syntaxhighlight lang=ada>
with Ada.Text_IO; use Ada.Text_IO;
procedure Subprogram_Cheat_Sheet is
-- é¢æ°ã®å®çŸ©
function Add(a, b : Integer) return Integer is
begin
return a + b;
end Add;
-- æç¶ãã®å®çŸ©
procedure Greet(name : in String) is
begin
Put("Hello, ");
Put(name);
Put_Line("!");
end Greet;
-- åŒæ°ã®æž¡ãæ¹
procedure Pass_By_Value(x : Integer) is
begin
x := 0; -- å€ãå€æŽããŠãåŒã³åºãå
ã®å€æ°ã«åœ±é¿ã¯ãªã
end Pass_By_Value;
procedure Pass_By_Reference(x : in out Integer) is
begin
x := 0; -- å€ãå€æŽãããšåŒã³åºãå
ã®å€æ°ã«ã圱é¿ããã
end Pass_By_Reference;
-- æ»ãå€ã®åãæ±ã
function Divide(a, b : Integer) return Float is
Result : Float;
begin
if b = 0 then
raise Constraint_Error with "Division by zero";
else
Result := Float(a) / Float(b);
end if;
return Result;
end Divide;
-- äŸå€åŠç
procedure Exception_Handling is
begin
Put("Enter an integer: ");
declare
Num : Integer := Integer'Value(Get_Line);
begin
if Num < 0 then
raise Constraint_Error with "The number must be non-negative";
else
Put("The square root of ");
Put(Num, Width => 0);
Put(" is ");
Put(Float'Sqrt(Float(Num)), 2);
New_Line;
end if;
exception
when Constraint_Error =>
Put_Line("Error: " & Exception_Message);
end;
end Exception_Handling;
begin
-- ãã¹ã
Put_Line("Add(1, 2) = " & Integer'Image(Add(1, 2)));
Greet("Alice");
-- åŒæ°ã®æž¡ãæ¹
declare
x : Integer := 1;
begin
Pass_By_Value(x);
Put_Line("x = " & Integer'Image(x)); -- 1
Pass_By_Reference(x);
Put_Line("x = " & Integer'Image(x)); -- 0
end;
-- æ»ãå€ã®åãæ±ã
Put_Line("Divide(4, 2) = " & Float'Image(Divide(4, 2)));
Put_Line("Divide(4, 0) = " & Float'Image(Divide(4, 0))); -- Constraint_Error
-- äŸå€åŠç
Exception_Handling;
end Subprogram_Cheat
</syntaxhighlight>
:<syntaxhighlight lang=ada>
with Ada.Text_IO; use Ada.Text_IO;
procedure OOP_Cheat_Sheet is
-- ã¯ã©ã¹ã®å®çŸ©
type MyClass is tagged record
x: Integer;
end record;
-- ã¯ã©ã¹ã®ç¶æ¿
type MySubclass is new MyClass with record
y: Integer;
end record;
-- ããªã¢ãŒãã£ãºã
type MyClass_Access is access all MyClass'Class;
procedure MyProc (Obj : MyClass_Access'Class);
-- ã¯ã©ã¹ã¡ãœãã
function Get_X (Obj : MyClass'Class) return Integer is
begin
return Obj.x;
end Get_X;
-- ã¯ã©ã¹ã®æäœ
procedure Set_X (Obj : in out MyClass'Class; Val : Integer) is
begin
Obj.x := Val;
end Set_X;
-- ã¯ã©ã¹ã®åæå
overriding procedure Initialize (Obj : in out MyClass'Class) is
begin
Obj.x := 0;
end Initialize;
-- ã¯ã©ã¹ã®çµäºåŠç
overriding procedure Finalize (Obj : in out MyClass'Class) is
begin
null;
end Finalize;
-- ã¯ã©ã¹ã®å©çšäŸ
Obj : MyClass'Class := new MyClass;
begin
Set_X (Obj, 42);
Put_Line (Integer'Image (Get_X (Obj)));
end OOP_Cheat_Sheet;
</syntaxhighlight>
:<syntaxhighlight lang=ada>
</syntaxhighlight>
=== çšèªé ===
# ããã±ãŒãžïŒpackageïŒïŒé¢é£ãããµãããã°ã©ã ãåãå®æ°ãªã©ãã²ãšãŸãšãã«ãããç¬ç«ããã³ã³ãã€ã«åäœãããã±ãŒãžä»æ§ãšããã±ãŒãžæ¬äœã«åãããã
# ã¿ã€ãïŒtypeïŒïŒããŒã¿ã®çš®é¡ãå®çŸ©ãããæŽæ°åãæµ®åå°æ°ç¹åãæååãªã©ããããåã®å®çŸ©ã«ã¯ãã¬ã³ãŒãåãé
ååãªã©ã䜿çšã§ããã
# ã¢ãžã¥ãŒã«ïŒmoduleïŒïŒAdaããã°ã©ã ã®æ§æåäœãè€æ°ã®ããã±ãŒãžããµãããã°ã©ã ããæ§æãããåäžã®ã³ã³ãã€ã«åäœãšãªãã
# ãµãããã°ã©ã ïŒsubprogramïŒïŒç¹°ãè¿ã䜿ãããåŠçããŸãšãããé¢æ°ãæç¶ããªã©ã®éšåãé¢æ°ã¯å€ãè¿ããæç¶ãã¯å€ãè¿ããªãã
# åŒæ°ïŒparameterïŒïŒãµãããã°ã©ã ã«äžããå
¥åå€ããµãããã°ã©ã å
ã§ã®ã¿äœ¿çšã§ããå€æ°ã§ãããåŒã³åºãå
ã®å€æ°ã«åœ±é¿ãäžããªãã
# äŸå€ïŒexceptionïŒïŒããã°ã©ã ã®å®è¡äžã«çºçãããšã©ãŒãåŠçããããã®ã¡ã«ããºã ãäŸå€ãçºçããå Žåã¯ãäŸå€åŠçéšåã«å¶åŸ¡ã移ãã
# ç¶æ¿ïŒinheritanceïŒïŒãªããžã§ã¯ãæåããã°ã©ãã³ã°ã«ããããæ°ããã¯ã©ã¹ã®å®çŸ©æã«æ¢åã®ã¯ã©ã¹ãåºã«ããŠæ°ããªæ©èœãè¿œå ããä»çµã¿ã
# ããªã¢ãŒãã£ãºã ïŒpolymorphismïŒïŒãªããžã§ã¯ãæåããã°ã©ãã³ã°ã«ããããç°ãªãã¯ã©ã¹ã®ãªããžã§ã¯ããåãã€ã³ã¿ãã§ãŒã¹ã§æ±ãããšãã§ããæ§è³ªã
# ã¿ã¹ã¯ïŒtaskïŒïŒäžŠååŠçãå®çŸããããã®æ©èœãAdaã§ã¯ãã¿ã¹ã¯ã®çæãåæãéä¿¡ãªã©ãè¡ãããšãã§ããã
# ãã¡ã€ã«ïŒfileïŒïŒå€éšèšæ¶è£
眮ã«æ ŒçŽãããããŒã¿ãæ±ãããã®ããŒã¿åããã¡ã€ã«ããªãŒãã³ããããšã§ããã¡ã€ã«ããã®å
¥åããã¡ã€ã«ãžã®åºåãå¯èœã«ãªãã
# åå空éïŒnamespaceïŒïŒååã®è¡çªãåé¿ããããã®ä»çµã¿ãããã±ãŒãžã®åå空éã¯ãããã±ãŒãžå
ã§å®çŸ©ãããŸãã
[[Category:Ada|*]]
[[Category:ããã°ã©ãã³ã°èšèª]]
{{NDC|007.64}} | 2023-04-28T02:58:02Z | 2024-01-14T22:20:48Z | [
"ãã³ãã¬ãŒã:Wikipedia",
"ãã³ãã¬ãŒã:ã³ã©ã ",
"ãã³ãã¬ãŒã:NDC"
] | https://ja.wikibooks.org/wiki/Ada |
37,687 | Python/æŒç®åãªãŒããŒããŒã | Pythonã«ã¯ãã¯ã©ã¹ã«å¯ŸããŠæŒç®åãã«ã¹ã¿ãã€ãºããããã®ç¹å¥ãªã¡ãœãããæäŸãããæŒç®åãªãŒããŒããŒãããšåŒã°ããæ©èœããããŸãã
ã¯ã©ã¹ã«ã¡ãœãããå®çŸ©ããããšã§ãPythonã®æŒç®åããªãŒããŒããŒãããããšãã§ããŸããäŸãã°ã__add__ã¡ãœãããå®çŸ©ããããšã§ããªããžã§ã¯ããå ç®ã§ããããã«ããããšãã§ããŸãã
以äžã¯ã__add__ã¡ãœããã䜿ã£ãŠã2ã€ã®ãã¯ãã«ãå ç®ããäŸã§ãã
ãã®äŸã§ã¯ãVectorã¯ã©ã¹ã«__add__ã¡ãœãããå®çŸ©ãã2ã€ã®ãã¯ãã«ãå ç®ããåŠçãè¡ã£ãŠããŸããv1 + v2ã®ããã«æŒç®åã䜿ãããšã§ã__add__ã¡ãœãããåŒã³åºããã2ã€ã®ãã¯ãã«ãå ç®ãããVectorãªããžã§ã¯ããè¿ãããŸãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "Pythonã«ã¯ãã¯ã©ã¹ã«å¯ŸããŠæŒç®åãã«ã¹ã¿ãã€ãºããããã®ç¹å¥ãªã¡ãœãããæäŸãããæŒç®åãªãŒããŒããŒãããšåŒã°ããæ©èœããããŸãã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ã¯ã©ã¹ã«ã¡ãœãããå®çŸ©ããããšã§ãPythonã®æŒç®åããªãŒããŒããŒãããããšãã§ããŸããäŸãã°ã__add__ã¡ãœãããå®çŸ©ããããšã§ããªããžã§ã¯ããå ç®ã§ããããã«ããããšãã§ããŸãã",
"title": ""
},
{
"paragraph_id": 2,
"tag": "p",
"text": "以äžã¯ã__add__ã¡ãœããã䜿ã£ãŠã2ã€ã®ãã¯ãã«ãå ç®ããäŸã§ãã",
"title": ""
},
{
"paragraph_id": 3,
"tag": "p",
"text": "ãã®äŸã§ã¯ãVectorã¯ã©ã¹ã«__add__ã¡ãœãããå®çŸ©ãã2ã€ã®ãã¯ãã«ãå ç®ããåŠçãè¡ã£ãŠããŸããv1 + v2ã®ããã«æŒç®åã䜿ãããšã§ã__add__ã¡ãœãããåŒã³åºããã2ã€ã®ãã¯ãã«ãå ç®ãããVectorãªããžã§ã¯ããè¿ãããŸãã",
"title": ""
}
] | null | = æŒç®åãªãŒããŒããŒã =
Pythonã«ã¯ãã¯ã©ã¹ã«å¯ŸããŠæŒç®åãã«ã¹ã¿ãã€ãºããããã®ç¹å¥ãªã¡ãœãããæäŸãããæŒç®åãªãŒããŒããŒãããšåŒã°ããæ©èœããããŸãã
ã¯ã©ã¹ã«ã¡ãœãããå®çŸ©ããããšã§ãPythonã®æŒç®åããªãŒããŒããŒãããããšãã§ããŸããäŸãã°ã__add__ã¡ãœãããå®çŸ©ããããšã§ããªããžã§ã¯ããå ç®ã§ããããã«ããããšãã§ããŸãã
以äžã¯ã__add__ã¡ãœããã䜿ã£ãŠã2ã€ã®ãã¯ãã«ãå ç®ããäŸã§ãã
:<syntaxhighlight lang=python3>
class Vector:
def __init__(self, x, y):
self.x = x
self.y = y
def __add__(self, other):
return Vector(self.x + other.x, self.y + other.y)
v1 = Vector(1, 2)
v2 = Vector(3, 4)
v3 = v1 + v2
print(v3.x, v3.y) # 4 6
</syntaxhighlight>
ãã®äŸã§ã¯ãVectorã¯ã©ã¹ã«__add__ã¡ãœãããå®çŸ©ãã2ã€ã®ãã¯ãã«ãå ç®ããåŠçãè¡ã£ãŠããŸããv1 + v2ã®ããã«æŒç®åã䜿ãããšã§ã__add__ã¡ãœãããåŒã³åºããã2ã€ã®ãã¯ãã«ãå ç®ãããVectorãªããžã§ã¯ããè¿ãããŸãã
:{| class="wikitable"
|+ãªãŒããŒããŒãå¯èœãªæŒç®å
!æŒç®å
!ç¹æ®ã¡ãœãã
|-
| +
|<code>__add__</code>
|-
| -
|<code>__sub__</code>
|-
|*
|<code>__mul__</code>
|-
|**
|<code>__pow__</code>
|-
|/
|<code>__truediv__</code>
|-
|//
|<code>__floordiv__</code>
|-
|%
|<code>__mod__</code>
|-
|<<
|<code>__lshift__</code>
|-
|>>
|<code>__rshift__</code>
|-
|&
|<code>__and__</code>
|-
|<nowiki>|</nowiki>
|<code>__or__</code>
|-
|^
|<code>__xor__</code>
|-
|<
|<code>__lt__</code>
|-
|<=
|<code>__le__</code>
|-
|>
|<code>__gt__</code>
|-
|>=
|<code>__ge__</code>
|-
|==
|<code>__eq__</code>
|-
|!=
|<code>__ne__</code>
|-
| +=
|<code>__iadd__</code>
|-
| -=
|<code>__isub__</code>
|-
|*=
|<code>__imul__</code>
|-
|**=
|<code>__ipow__</code>
|-
|/=
|<code>__itruediv__</code>
|-
|//=
|<code>__ifloordiv__</code>
|-
|%=
|<code>__imod__</code>
|-
|<<=
|<code>__ilshift__</code>
|-
|>>=
|<code>__irshift__</code>
|-
|&=
|<code>__iand__</code>
|-
|<nowiki>|=</nowiki>
|<code>__ior__</code>
|-
|^=
|<code>__ixor__</code>
|}
[[ã«ããŽãª:Python]] | 2023-04-28T05:55:56Z | 2023-04-28T05:55:56Z | [] | https://ja.wikibooks.org/wiki/Python/%E6%BC%94%E7%AE%97%E5%AD%90%E3%82%AA%E3%83%BC%E3%83%90%E3%83%BC%E3%83%AD%E3%83%BC%E3%83%89 |
37,688 | Python/TensorFlow | TensorFlowã¯ãGoogleãéçºãããªãŒãã³ãœãŒã¹ã®æ°å€èšç®ã©ã€ãã©ãªã§ããããã¥ãŒã©ã«ãããã¯ãŒã¯ãªã©ã®æ©æ¢°åŠç¿ã¢ããªã±ãŒã·ã§ã³ã®å®è£
ã«äœ¿çšãããŸããTensorFlowã«ã¯ãã°ã©ãã«ããèšç®ã®æé©åãèªå埮åæ©èœãåæ£åŠçãªã©ã®é«åºŠãªæ©èœãå«ãŸããŠãããè€éãªæ©æ¢°åŠç¿ã¢ãã«ã®å®è£
ã«éåžžã«äŸ¿å©ã§ãããŸããPythonãC++ãJavaãGoãªã©ã®èšèªããµããŒãããŠãããéçºè
ã䜿ããããããã«èšèšãããŠããŸãã
TensorFlowãã€ã³ã¹ããŒã«ããå¿
èŠããããŸããã¿ãŒããã«ã§ä»¥äžã®ã³ãã³ããå®è¡ããŠãã ããã
TensorFlowã¯ãã®ãµã€ãã«ãã¥ãŒããªã¢ã«ãçšæããŠãããTensorFlowãåŠã¶äžã§åœ¹ç«ã€ã§ãããããã ãã翻蚳ãäžæ£ç¢ºãªããŒãžãå€ããããå¯èœãªéãè±èªçãèªãããšãããããããŸãã
次ã«ãTensorFlowã䜿ã£ãŠç·åœ¢ååž°ãè¡ãäŸãèŠãŠãããŸãããã
ãã®ã³ãŒãã§ã¯ãTensorFlowã䜿ã£ãŠç·åœ¢ååž°ã¢ãã«ãå®çŸ©ãããã¬ãŒãã³ã°ããŒã¿ã䜿ã£ãŠæé©åããŸããæé©åã«ã¯åŸé
éäžæ³ã䜿ãããŸãããŸããã¢ãã«ãã©ã¡ãŒã¿ã«ã¯TensorFlowã®å€æ°ã䜿ããŸãã
æåŸã«ãçµæãããããããŠããŸãããã¬ãŒãã³ã°ããŒã¿ã«ããããåèŽããç·åœ¢ã¢ãã«ãåŸãããã¯ãã§ãã
TensorFlowã«ã¯å€ãã®æ©èœãããã深局åŠç¿ã®ãã¬ãŒã ã¯ãŒã¯ãšããŠåºã䜿ãããŠããŸãããã®ç°¡åãªäŸã§ããããæ¬æ Œçã«æ·±å±€åŠç¿ãè¡ãã«ããã£ãŠã®åºç€çãªç¥èãåŸãããšãã§ããŸããã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "TensorFlowã¯ãGoogleãéçºãããªãŒãã³ãœãŒã¹ã®æ°å€èšç®ã©ã€ãã©ãªã§ããããã¥ãŒã©ã«ãããã¯ãŒã¯ãªã©ã®æ©æ¢°åŠç¿ã¢ããªã±ãŒã·ã§ã³ã®å®è£
ã«äœ¿çšãããŸããTensorFlowã«ã¯ãã°ã©ãã«ããèšç®ã®æé©åãèªå埮åæ©èœãåæ£åŠçãªã©ã®é«åºŠãªæ©èœãå«ãŸããŠãããè€éãªæ©æ¢°åŠç¿ã¢ãã«ã®å®è£
ã«éåžžã«äŸ¿å©ã§ãããŸããPythonãC++ãJavaãGoãªã©ã®èšèªããµããŒãããŠãããéçºè
ã䜿ããããããã«èšèšãããŠããŸãã",
"title": "ã€ã³ã¹ããŒã«"
},
{
"paragraph_id": 1,
"tag": "p",
"text": "TensorFlowãã€ã³ã¹ããŒã«ããå¿
èŠããããŸããã¿ãŒããã«ã§ä»¥äžã®ã³ãã³ããå®è¡ããŠãã ããã",
"title": "ã€ã³ã¹ããŒã«"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "TensorFlowã¯ãã®ãµã€ãã«ãã¥ãŒããªã¢ã«ãçšæããŠãããTensorFlowãåŠã¶äžã§åœ¹ç«ã€ã§ãããããã ãã翻蚳ãäžæ£ç¢ºãªããŒãžãå€ããããå¯èœãªéãè±èªçãèªãããšãããããããŸãã",
"title": "ã€ã³ã¹ããŒã«"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "次ã«ãTensorFlowã䜿ã£ãŠç·åœ¢ååž°ãè¡ãäŸãèŠãŠãããŸãããã",
"title": "ã€ã³ã¹ããŒã«"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãTensorFlowã䜿ã£ãŠç·åœ¢ååž°ã¢ãã«ãå®çŸ©ãããã¬ãŒãã³ã°ããŒã¿ã䜿ã£ãŠæé©åããŸããæé©åã«ã¯åŸé
éäžæ³ã䜿ãããŸãããŸããã¢ãã«ãã©ã¡ãŒã¿ã«ã¯TensorFlowã®å€æ°ã䜿ããŸãã",
"title": "ã€ã³ã¹ããŒã«"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "æåŸã«ãçµæãããããããŠããŸãããã¬ãŒãã³ã°ããŒã¿ã«ããããåèŽããç·åœ¢ã¢ãã«ãåŸãããã¯ãã§ãã",
"title": "ã€ã³ã¹ããŒã«"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "TensorFlowã«ã¯å€ãã®æ©èœãããã深局åŠç¿ã®ãã¬ãŒã ã¯ãŒã¯ãšããŠåºã䜿ãããŠããŸãããã®ç°¡åãªäŸã§ããããæ¬æ Œçã«æ·±å±€åŠç¿ãè¡ãã«ããã£ãŠã®åºç€çãªç¥èãåŸãããšãã§ããŸããã",
"title": "ã€ã³ã¹ããŒã«"
}
] | null | = TensorFlow =
TensorFlowã¯ãGoogleãéçºãããªãŒãã³ãœãŒã¹ã®æ°å€èšç®ã©ã€ãã©ãªã§ããããã¥ãŒã©ã«ãããã¯ãŒã¯ãªã©ã®æ©æ¢°åŠç¿ã¢ããªã±ãŒã·ã§ã³ã®å®è£
ã«äœ¿çšãããŸããTensorFlowã«ã¯ãã°ã©ãã«ããèšç®ã®æé©åãèªå埮åæ©èœãåæ£åŠçãªã©ã®é«åºŠãªæ©èœãå«ãŸããŠãããè€éãªæ©æ¢°åŠç¿ã¢ãã«ã®å®è£
ã«éåžžã«äŸ¿å©ã§ãããŸããPythonãC++ãJavaãGoãªã©ã®èšèªããµããŒãããŠãããéçºè
ã䜿ããããããã«èšèšãããŠããŸãã
== ã€ã³ã¹ããŒã« ==
TensorFlowãã€ã³ã¹ããŒã«ããå¿
èŠããããŸããã¿ãŒããã«ã§ä»¥äžã®ã³ãã³ããå®è¡ããŠãã ããã
:<syntaxhighlight lang=bash>
$ sudo pip install tensorflow
</syntaxhighlight>
== äŸ ==
TensorFlowã¯ãã®ãµã€ãã«[https://www.tensorflow.org/tutorials?hl=ja ãã¥ãŒããªã¢ã«]ãçšæããŠãããTensorFlowãåŠã¶äžã§åœ¹ç«ã€ã§ãããããã ãã翻蚳ãäžæ£ç¢ºãªããŒãžãå€ããããå¯èœãªéãè±èªçãèªãããšãããããããŸãã
次ã«ãTensorFlowã䜿ã£ãŠç·åœ¢ååž°ãè¡ãäŸãèŠãŠãããŸãããã
:<syntaxhighlight lang=bash>
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
# ãã¬ãŒãã³ã°ããŒã¿ãçæ
X_train = np.linspace(0, 10, 100)
Y_train = X_train * 2 + np.random.randn(*X_train.shape) * 0.33
# å
¥åã®ãã¬ã€ã¹ãã«ããŒãèšå®
X = tf.placeholder("float")
Y = tf.placeholder("float")
# ã¢ãã«ã®ãã©ã¡ãŒã¿ãèšå®
w = tf.Variable(0.0, name="weights")
b = tf.Variable(0.0, name="bias")
# ã¢ãã«ãå®çŸ©
Y_pred = tf.add(tf.multiply(X, w), b)
# ã³ã¹ãé¢æ°ãå®çŸ©
cost = tf.reduce_mean(tf.square(Y_pred - Y))
# æé©åã¢ã«ãŽãªãºã ãèšå®
learning_rate = 0.01
optimizer = tf.train.GradientDescentOptimizer(learning_rate).minimize(cost)
# ãã¬ãŒãã³ã°ãéå§
init = tf.global_variables_initializer()
with tf.Session() as sess:
sess.run(init)
for epoch in range(100):
for x, y in zip(X_train, Y_train):
sess.run(optimizer, feed_dict={X: x, Y: y})
print(sess.run(w))
print(sess.run(b))
# çµæããããã
plt.plot(X_train, Y_train, "ro", label="Training data")
plt.plot(X_train, X_train * sess.run(w) + sess.run(b), label="Fitted line")
plt.legend()
plt.show()
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ãTensorFlowã䜿ã£ãŠç·åœ¢ååž°ã¢ãã«ãå®çŸ©ãããã¬ãŒãã³ã°ããŒã¿ã䜿ã£ãŠæé©åããŸããæé©åã«ã¯åŸé
éäžæ³ã䜿ãããŸãããŸããã¢ãã«ãã©ã¡ãŒã¿ã«ã¯TensorFlowã®å€æ°ã䜿ããŸãã
æåŸã«ãçµæãããããããŠããŸãããã¬ãŒãã³ã°ããŒã¿ã«ããããåèŽããç·åœ¢ã¢ãã«ãåŸãããã¯ãã§ãã
TensorFlowã«ã¯å€ãã®æ©èœãããã深局åŠç¿ã®ãã¬ãŒã ã¯ãŒã¯ãšããŠåºã䜿ãããŠããŸãããã®ç°¡åãªäŸã§ããããæ¬æ Œçã«æ·±å±€åŠç¿ãè¡ãã«ããã£ãŠã®åºç€çãªç¥èãåŸãããšãã§ããŸããã
[[ã«ããŽãª:Python]] | 2023-04-28T06:05:58Z | 2023-08-07T09:19:46Z | [] | https://ja.wikibooks.org/wiki/Python/TensorFlow |
37,714 | Pike | Pikeã¯ãCèšèªã«äŒŒãææ³ãæã€é«æ°Žæºããã°ã©ãã³ã°èšèªã§ããè±å¯ãªã©ã€ãã©ãªãšãªããžã§ã¯ãæåããã°ã©ãã³ã°æ©èœãåããŠããŸãããŸããé«éãªå®è¡é床ãç¹åŸŽã§ãWebã¢ããªã±ãŒã·ã§ã³ããããã¯ãŒã¯ããã°ã©ãã³ã°ãããŒã¿ããŒã¹åŠçãªã©ãå¹
åºãçšéã§äœ¿çšãããŠããŸãã
æ¬ãã¥ãŒããªã¢ã«ã§ã¯ãPikeã®åºæ¬çãªææ³ãšæ©èœãåå¿è
åãã«ãããããã解説ããŸããPikeãåŠã¶ããšã§ãããã°ã©ãã³ã°ã®åºç€ã身ã«ã€ããå®è·µçãªéçºã«å¿çšã§ããããã«ãªãããšãç®çãšããŠããŸããæ¬ãã¥ãŒããªã¢ã«ãéããŠãPikeã®é
åã掻çšæ¹æ³ãç解ãããã®å¯èœæ§ãåºããããšãã§ããã§ãããã
Pikeã¯ãCèšèªã«äŒŒãææ³ãæã€é«æ°Žæºããã°ã©ãã³ã°èšèªã§ããè±å¯ãªã©ã€ãã©ãªãšãªããžã§ã¯ãæåããã°ã©ãã³ã°æ©èœãåããŠããŸãããŸããé«éãªå®è¡é床ãç¹åŸŽã§ãWebã¢ããªã±ãŒã·ã§ã³ããããã¯ãŒã¯ããã°ã©ãã³ã°ãããŒã¿ããŒã¹åŠçãªã©ãå¹
åºãçšéã§äœ¿çšãããŠããŸãã
Pikeã¯ã以äžã®ãããªç¹åŸŽãæã£ãŠããŸãã
Pikeã¯ãå°ããã·ã³ãã«ãªã¹ã¯ãªãããèšè¿°ããããã«äœ¿çšããããšãã§ããããã«ã¯éåžžã«å€§èŠæš¡ãªããã°ã©ã ã«ã䜿çšã§ããŸãã äžçäžã®WebãµãŒããŒã§ããRoxen WebServerãšCaudiumã¯ãã©ã¡ããPikeã§èšè¿°ãããŠããŸãã Pikeã®é«åºŠãªããŒã¿åãšãœã±ããã®çµã¿èŸŒã¿ãµããŒãã«ãããã€ã³ã¿ãŒãããã¢ããªã±ãŒã·ã§ã³ã§ã®äœ¿çšã«çæ³çã§ãã
Pikeã¯ãGNU General Public License(GPL)ãGNU Lesser General Public License(LGPL)ãããã³Mozilla Public License(MPL)ã«åºã¥ãããªãŒãœãããŠã§ã¢ã§ãã UNIXãLinuxãSolarisãmacOS XãMicrosoft Windowsãªã©ãå€ãã®ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§å©çšå¯èœã§ãã
Pikeã¯ãWebã¢ããªã±ãŒã·ã§ã³ããããã¯ãŒã¯ããã°ã©ãã³ã°ãããŒã¿ããŒã¹åŠçãã²ãŒã éçºãªã©ãå€å²ã«ãããçšéã«å©çšãããŠããŸãã
å
·äœçã«ã¯ã以äžã®ãããªå Žé¢ã§æŽ»çšãããŠããŸãã
Pikeã¯ãUNIXãLinuxãWindowsãmacOSãªã©ã®å€ãã®ãã©ãããã©ãŒã ã§å©çšå¯èœã§ãã Pikeã®ææ°ããŒãžã§ã³ãããŠã³ããŒãããã«ã¯ãPikeã®å
¬åŒãŠã§ããµã€ã( http://pike.lysator.liu.se/ )ã蚪åããŠãã ããã
LinuxãŠãŒã¶ãŒã®å ŽåãPikeã¯å€ãã®ãã£ã¹ããªãã¥ãŒã·ã§ã³ã®ããã±ãŒãžãªããžããªã«å«ãŸããŠããŸããäŸãã°ãDebianãUbuntuã®å Žåã以äžã®ã³ãã³ãã䜿çšããŠPikeãã€ã³ã¹ããŒã«ããããšãã§ããŸãã
WindowsãŠãŒã¶ãŒã®å ŽåãPikeã®WindowsããŒãžã§ã³ãããŠã³ããŒãããŠã€ã³ã¹ããŒã«ããå¿
èŠããããŸãã ããŠã³ããŒããããã¡ã€ã«ãå®è¡ããŠããŠã£ã¶ãŒãã«åŸã£ãŠã€ã³ã¹ããŒã«ããŠãã ããã
macOSãŠãŒã¶ãŒã®å ŽåãHomebrewãªã©ã®ããã±ãŒãžãããŒãžã£ãŒã䜿çšããŠPikeãã€ã³ã¹ããŒã«ããããšãã§ããŸãã
Pikeã¯ããã«ãæžã¿ãã€ããªã®ä»ã«ãœãŒã¹ã³ãŒããå
¬éãããŠããã®ã§ããœãŒã¹ã³ãŒããããã«ãããŠã€ã³ã¹ããŒã«ããããšãå¯èœã§ãã
ããã§åé¡ã«ãªãã®ããçŸåšé
åžãããŠãããœãŒã¹ã³ãŒããããã«ãããéçšã§ pike èªèº«ã䜿ãããŠããç¹ã§ãã
ãã®ãããFreeBSDã®æ§ãªãã«ãæžã¿ãã€ããªãé
åžãããŠããªããã©ããããŒã ã§ã¯ããã«ããã®ãã®ãåºæ¥ãŸããã
ããã解決ããã«ã¯ããã«ãã«pike èªèº«ã䜿ãããŠããªãã£ãé ã®éå»ã®ããŒãžã§ã³(äŸãã°ã0.6)ããã«ããã€ã³ã¹ããŒã«ãããã®åŸãéå»ã®ããŒãžã§ã³ã®pikeã䜿ã£ãŠæ°ããããŒãžã§ã³(äŸãã°ã8.0)ãã€ã³ã¹ããŒã«ããäºæ®µéã®ãã«ãããã»ã¹ãæå¹ã§ãã
ãã®æ¹æ³ã§ãFreeBSD 13.1/amd64 ã« Pike v8.0 release 1738 ãã€ã³ã¹ããŒã«ã§ããŸããã
Pikeãã€ã³ã¹ããŒã«ããåŸã¯ããŸãããŒãžã§ã³ã確èªããŸãã以äžã®ã³ãã³ãã䜿çšããŠPikeã®ããŒãžã§ã³ç¢ºèªããŠãã ããã
ã³ãã³ãã©ã€ã³ããPikeãèµ·åããããšãã§ããŸãã以äžã®ã³ãã³ãã䜿çšããŠPikeãèµ·åããŠãã ããã
Pikeã®å¯Ÿè©±åã·ã§ã«ãèµ·åããã³ãŒããå®è¡ããããšãã§ããŸãã
ãŸããPikeã§æžãããã¹ã¯ãªãããã¡ã€ã«ãå®è¡ããå Žåã¯ã以äžã®ããã«ãã¡ã€ã«åãæå®ããŠå®è¡ããŠãã ããã
以äžã®ããã«ãPikeãããŠã³ããŒãããŠã€ã³ã¹ããŒã«ããã³ãã³ãã©ã€ã³ããèµ·åããããšãã§ããŸãã
åã®ç¯ã§å®è¡ããããã°ã©ã ã解説ããŸãããã
ãããã£ãŠããã®ããã°ã©ã ã®åºåã¯ã"Hello world!" ãšããæååã«æ¹è¡æåãç¶ãããã®ã«ãªããŸãã
Pikeã¯ã€ã³ã¿ãŒããªã¿èšèªã§ãããããå€æ°ã«å®£èšãå¿
èŠãªããšæããããããããŸããã ããããPikeã§ã¯å€æ°å®£èšãå¿
é ã§ãããå€æ°ã®åãã³ã³ãã€ã«æã«æ±ºå®ããããããåå®å®æ§ãé«ããªããŸãã
å€æ°ã宣èšããå Žåã以äžã®ããã«å®£èšããŸãã
ããšãã°ãæŽæ°åã®å€æ°xã宣èšããåæå€ã«42ã代å
¥ããå Žåã次ã®ããã«ãªããŸãã
Pikeã®å€æ°å®£èšã§ã¯ãååãçç¥ã§ããŸããããåæå€ã代å
¥ããªãå Žåã«ã¯ã次ã®ããã«å€æ°å®£èšãããããšãã§ããŸãã
Pikeã«ã¯ããã€ãã®åºæ¬çãªããŒã¿åããããŸãã以äžã«ãããã説æããŸãã
ãããã®åºæ¬çãªããŒã¿åã¯ãPikeããã°ã©ã ã§å€æ°ã宣èšããéã«äœ¿çšãããŸããäŸãã°ãint number_of_monkeys;ã¯æŽæ°åã®å€æ°number_of_monkeysã宣èšããŠããŸãã
ãŸããåºæ¬çãªããŒã¿åã®ä»ã«ãã³ã³ããåãšåŒã°ããããŒã¿åããããŸããã³ã³ããåã¯ä»ã®ããŒã¿ãæ ŒçŽããããã®ããŒã¿åã§ãããé
å(array)ãããã(mapping)ããã«ãã»ãã(multiset)ãªã©ããããŸãããããã®ã³ã³ããåã¯è€éãªããŒã¿æ§é ãæ±ãããã«äœ¿çšãããŸãããåºæ¬çãªããŒã¿åãšåæ§ã«å€æ°ã宣èšããŠäœ¿çšããããšãã§ããŸãã
ãŸããåºæ¬åã®å€æ°ã宣èšãããŠããŸãã以äžã®ãããªå€æ°ããããŸã:
次ã«ãã³ã³ããåã®äœ¿çšäŸã瀺ãããŠããŸãã
Pikeã§ã¯å€æ°ã¯å¿
ã宣èšãå¿
èŠãªããšã¯æ¢ã«è¿°ã¹ãŸããããåæåã¯å¿
é ã§ã¯ãããŸããã§ããã
ã§ã¯æªåæåã®å€ãåç
§ãããšã©ããªãã§ããã?
æŽæ°åå€æ°iã®æªåæåã®å€ã0ã§ããç¹ã¯ãšããããä»ã®åã®å€æ°ãå
šãŠæŽæ°åã®0ãå
¥ã£ãŠããŸãã æªåæåã®å Žåãã§ããããªå€ãå
¥ãããšã¯åé¡ã§ãããããã£ãœãå€ãå
¥ã£ãŠãããšåæåå¿ããçºèŠããããšãé
ããŸãã æŽæ°ã®0ã¯æ¯èŒç容æã«æ€æ»ã§ãããããåæåã®äžåãç°¡åã«çºèŠã§ããŸãã ããããªãããåæåãå¿
ãè¡ãç¿æ
£ã身ã«ã€ããããšãæãéèŠã§ãã
ãŸãpike-9.x(éçºããŒãžã§ã³)ã§ã¯ãæ°ããåå auto ã®å°å
¥ãäºå®ãããåæšè«ãè¡ãããšãå¯èœã«ãªããŸãã åæšè«ã«ã¯åæåãå¿
é ãªã®ã§ãåæåå¿ããæžãäºãæåŸ
ã§ããŸãã
Pikeã«ãããåæåã¯enumãšããããŒã¯ãŒããçšããŠå®çŸ©ãããŸãã以äžã¯ãç°¡åãªè²ã®åæåãå®çŸ©ããããã䜿çšããŠæååãåºåããããã°ã©ã ã®äŸã§ãã
äžèšã®ããã°ã©ã ã§ã¯ãColorãšããåæåãå®çŸ©ãã3ã€ã®å®æ° REDãBLUEãGREEN ãå®çŸ©ããŠããŸãããã®åŸãmain()é¢æ°å
ã§Coloråã®å€æ°colorã宣èšããBLUEã§åæåããŠããŸããswitchæã䜿ã£ãŠcolorã®å€ã«ãã£ãŠåå²ãã該åœããæååãåºåããŠããŸãã
enum ã¯ãPike 7.2.30 ã§è¿œå ãããŸããã
Pikeã«ãããŠãããã€ãã®é¢æ°ã¯ã³ãŒãäžã§1æåãŸãã¯2æåã§åŒã³åºãããšãã§ããã³ãŒããçãããããšãã§ããŸãã ãããã®é¢æ°ã¯æŒç®åãšåŒã°ããæ¢ã«ããããã®äŸã§ãã®åäœãèŠãŠããŸããã
æŒç®åã¯æ©èœã«åºã¥ããŠã«ããŽãªãŒã«åé¡ãããŸããã泚æãå¿
èŠã§ãããªããªããäžéšã®æŒç®åã«ã¯ãããããå±ããã«ããŽãªãŒã®ç¯å²ãè¶
ããæå³ãããããã§ãã
以äžã¯æŽæ°ã«é¢ããæŒç®åã®äŸã§ãã
以äžã¯æååã«é¢ããæŒç®åã®äŸã§ãã
Pikeã®æŒç®åã®äžã«ã¯ãæ°åŠçãªæå³ããé¢ããå®çŸ©ã®ãã®ããããŸãã
ãã®ããã°ã©ã ã§ã¯ãPikeã®æååã®/æŒç®åãšãé
åã®*æŒç®åã䜿ã£ãŠããŸãã
ãŸããæåå str ã "/" (ã¹ããŒã¹) ã§åå²ããŠãarray(string) åã®å€æ° ary ã«ä»£å
¥ããŠããŸãã ãã®æŒç®ã«ãããary ã«ã¯ str ãåèªããšã«åå²ããæååã®é
åãæ ŒçŽãããŸãã äŸãã°ãary[0] ã«ã¯ "The" ãæ ŒçŽãããŸãã ãã®åäœã¯ãå€ãã®ã¹ã¯ãªããã£ã³ã°èšèªã®split()é¢æ°ã«çžåœããŸãã
次ã«ãary ã®åèŠçŽ ã ", " ã§çµåããŠãæ°ããæåå s2 ãäœæããŠããŸãã ãã®æŒç®ã«ãããs2 ã«ã¯ ary ã®åèŠçŽ ã ", " ã§çµåãããæååãæ ŒçŽãããŸãã äŸãã°ãs2 ã«ã¯ "The, quick, brown, fox, jumps, over, the, lazy, dog" ãæ ŒçŽãããŸãã ãã®åäœã¯ãå€ãã®ã¹ã¯ãªããã£ã³ã°èšèªã®join()é¢æ°ã«çžåœããŸãã
æåŸã«ãswrite é¢æ°ã䜿ã£ãŠãs2 ã®å
容ã衚瀺ããŠããŸãã write é¢æ°ã¯sprintf é¢æ°ã®æ©èœãå«ãã§ãããæå®ãããã©ãŒãããã«åŸã£ãŠãæååãçæããé¢æ°ã§ãã "%O\n" ã¯ãæååãåºåãããã©ãŒãããæååã§ããã%O ã¯ãPike ã®ãªããžã§ã¯ããæååã«å€æããããã®å€æã¿ã€ãã§ãã
ãPikeã§ã¯æŒç®åãé¢æ°ããšã¯ãPikeã«ãããŠæŒç®å (ããšãã° +, -, *, / ãªã©) ãåãªãèšå·ã§ã¯ãªããããããã察å¿ããé¢æ°ãšããŠå®çŸ©ãããŠãããšããããšãæããŸãã
äŸãã°ã+ æŒç®åã¯ã2ã€ã®æ°å€ã足ãåãããããã«äœ¿ãããŸãããå®éã«ã¯ `+ é¢æ°ãšããŠå®çŸ©ãããŠããŸãã
以äžã®ããã« `+ é¢æ°ã䜿ã£ãŠè¶³ãç®ãè¡ãããšãã§ããŸãã
ãŸãã* æŒç®åãåæ§ã« `* é¢æ°ãšããŠå®çŸ©ãããŠããŸãã以äžã®ããã«ãæååã«å¯Ÿã㊠* é¢æ°ã䜿ã£ãŠãæå®ããåæ°ã ãç¹°ãè¿ããæ°ããæååãäœãããšãã§ããŸãã
ãã®ããã«ãPikeã§ã¯æŒç®åãåãªãèšå·ã§ã¯ãªããããããã察å¿ããé¢æ°ãšããŠå®çŸ©ãããŠããŸãã
ãã®ãããªé¢æ°ã®æ§è³ªããã€æŒç®åã®åã調ã¹ãŠã¿ãŸãããã
ãã®ã³ãŒãã¯ãPikeã§é¢æ°ãå®çŸ©ããŠåŒã³åºãæ¹æ³ã瀺ããŠããŸãã
æåã«ã`+ é¢æ°ã f ãšããå€æ°ã«ä»£å
¥ããŠããŸãããã㧠+ ã¯ãå ç®æŒç®å "+" ã«å¯Ÿå¿ããé¢æ°ã§ãããã®åŸãf ã«æž¡ãåŒæ°ãæå®ããŠãf é¢æ°ãåŒã³åºããŠããŸãã
次ã«ãf ã«å¥ã®é¢æ°ã代å
¥ããŠããŸããããã§ã¯ãã©ã ãåŒã䜿ã£ãŠãäžãããã2ã€ã®åŒæ°ãæãåãããé¢æ°ãå®çŸ©ããŠããŸãããã®åŸãf é¢æ°ãå床åŒã³åºããŠãæ°ããé¢æ°ãæ£ããåäœããŠããããšã確èªããŠããŸãã
Pikeã§ã¯ãé¢æ°ãå€æ°ã«ä»£å
¥ããããšãã§ãããããåçã«é¢æ°ãåãæ¿ããããšãã§ããŸãããã®æ©èœã䜿ãããšã§ãããã°ã©ã ã®æè»æ§ãé«ããããšãã§ããŸãã
Pikeã«ãããã©ã ãé¢æ°ãšã¯ãç¡åã®é¢æ°ãå®çŸ©ããããã®æ¹æ³ã®äžã€ã§ããã©ã ãé¢æ°ãå®çŸ©ããã«ã¯ãlambda ããŒã¯ãŒãã䜿ããŸãã
äŸãã°ã以äžã®ãã㪠lambda é¢æ°ãå®çŸ©ããŠã¿ãŸãããã
ãã®ã³ãŒãã§ã¯ãlambda ããŒã¯ãŒãã䜿ã£ãŠãåŒæ°ãšããŠæŽæ° x ãåãåããx * x ãè¿ã square é¢æ°ãå®çŸ©ããŠããŸãã ãã®åŸãsquare(3) ã®ããã«ããŠãåŒæ°ãšããŠæŽæ° 3 ãæž¡ã㊠square é¢æ°ãåŒã³åºããŠããŸãã ãã®åŒã³åºãã«ãã£ãŠã9 ãè¿ãããŸãã
é
åã®èŠçŽ ããšã«æäœãè¡ãããã«ãmap()ã«ã¯äŸ¿å©ãªæ§æããããŸãããã®æ§æã䜿çšããããšã§ãã³ãŒããããèªã¿ãããããããšãã§ããŸãã
å®æ°ã¯ãããã°ã©ãã³ã°ã«ãããŠç¹å®ã®å€ã«ååãä»ããããã«äœ¿ããããã®ã§ãäžåºŠå®çŸ©ãããããã®å€ãå€æŽããããšãã§ããŸããã
æ§æã¯ä»¥äžã®ããã§ãã
Pikeèšèªã§ã¯ãå®æ°ã¯åæå€ããã®åæšè«ãè¡ããŸããã€ãŸããå®æ°ã®åã¯åæå€ã«åºã¥ããŠèªåçã«æ±ºå®ãããŸããå€æ°ãšã¯ç°ãªããæ瀺çãªå宣èšã¯å¿
èŠãããŸããã
Pikeã®sprintf()ã¯ãæååããã©ãŒãããããããã®é¢æ°ã§ãã write()ãsprintf()ãšåãæžåŒæååã䜿ã£ãŠãã©ãŒãããåºæ¥ãŸãã
ãã®ããã°ã©ã ã¯ãPikeã§writeé¢æ°ã䜿çšããŠãæ°å€ãæååãããã³æŽæ°ã®ãã©ãŒããããè¡ãæ¹æ³ã瀺ããŠããŸãã
æåã®äŸã§ã¯ã%dãš%fã䜿çšããŠãæŽæ°ãšæµ®åå°æ°ç¹æ°ããã©ãŒãããããŠããŸãã %fã§ã¯ãå°æ°ç¹ä»¥äž4æ¡ãŸã§è¡šç€ºããããã«æå®ãããŠããŸãã
次ã®äŸã§ã¯ã%sã䜿çšããŠãæååããã©ãŒãããããŠããŸãã writeé¢æ°ã䜿çšããããšã§ãåã蟌ãæååãåçã«å€æŽããããšãã§ããŸãã
次ã«ãæåå¹
ã®æå®ã«ã€ããŠèª¬æããŸããæåå¹
ãæå®ããã«ã¯ã%sã®åã«%10sã®ããã«æ°åãå
¥ããŸãã ããã¯ã衚瀺ããæååãå ããå¹
ãæå®ãããã®ã§ãã ãŸãã%-10sã®ããã«-ãä»ãããšãå·Šæãã«ãªããŸãã %10sã§ã¯å³æãã«ãªããŸãããæå®ããæååãå ããå¹
ãããé·ãå Žåã¯ãæååã®å³ç«¯ããåãæšãŠãããŸãã %|10sã§ã¯äžå€®æãã«ãªããŸãã
æåŸã«ã笊å·ãšä¿®é£Ÿåã®äœ¿çšã«ã€ããŠèª¬æããŸãã%+dã䜿çšãããšã笊å·ãä»ããŠæŽæ°ããã©ãŒãããããããšãã§ããŸãã %0*dã䜿çšãããšãæŽæ°ãæå®ããæ¡æ°ã«ãªãããã«0ã§ããã£ã³ã°ããŠè¡šç€ºããããšãã§ããŸãã
ããããã®writeé¢æ°ã®äœ¿çšäŸãå®è¡ããéã«åŸãããåºåã¯ãã³ã¡ã³ãã®åŸã«ç€ºãããŠããŸãã
sprintf()é¢æ°ã¯ãæžåŒæååãšããç¹æ®ãªæååãåãåããããã解éããŠæååãäœæããŸãã
æžåŒæååã¯ãåºåããæååå
ã§ç¹å®ã®å€ã眮ãæããããã«äœ¿çšãããŸããæžåŒæååã¯ã%ã«ç¶ãæåã§å§ãŸããç¹å®ã®åœ¢åŒã§åŒæ°ãåãåãããšãã§ããŸããããšãã°ã%dã¯æŽæ°ã®æžåŒæååã§ããã%sã¯æååã®æžåŒæååã§ãã
æžåŒæååã«ã¯ãå€æã¿ã€ã( conversion type )ã«ä¿®é£Ÿå( params )ãè¿œå ããããšãã§ããŸãã修食åã¯ãæžåŒæååã«å¯ŸããŠåäœãå€æŽããããã«äœ¿çšãããå€æã¿ã€ãã¯ãåºåã®åœ¢åŒãå¶åŸ¡ããããã«äœ¿çšãããŸããå€æã¿ã€ããšä¿®é£Ÿåã¯ã%ã®åŸã«ç¶ããŠæå®ããããšãã§ããŸãã
å€æã¿ã€ãã¯ãçç¥ã§ããå¿
ã1ã€ã ãæå®ããŸãã
修食åã¯çç¥ã§ããŸãã
ãã®ç« ã§ã¯ãPikeã®ãã¹ãŠã®å¶åŸ¡æ§é ã«ã€ããŠèª¬æããŸããå¶åŸ¡æ§é ã¯ãããã°ã©ã ã®å®è¡ãããŒãå¶åŸ¡ããããã«äœ¿çšãããŸãã ãã ããããã°ã©ã ãäžæåæ¢ãããé¢æ°ãåçŽãªé¢æ°åŒã³åºãã¯ãããã§ã¯å¶åŸ¡æ§é ãšã¯èŠãªãããŸããã
æ¡ä»¶åå²ã¯ããã¹ãæ¡ä»¶ãäžããããå®è¡ããã³ãŒããéžæããå¶åŸ¡æ§é ã§ãã ãããã¯ããã€ããªã®ãå®è¡ãããããªããããããå
¥åãã©ã¡ãŒã¿ã«åºã¥ããŠå®è¡ããã³ãŒããéžæãã倧èŠæš¡ãªã³ãŒãè¡šãŸã§ãããŸããŸã§ãã
æãåçŽãªæ¡ä»¶åå²ã¯ãifæã§ããifæã¯ãæãæåŸ
ãããã©ãã«ã§ãæžãããšãã§ãã次ã®ããã«èŠããŸãã
ã«ãã³ã®åŸããelseã®åŸãã«ã¯ã»ãã³ãã³ããªãããšã«æ³šæããŠãã ãããifæã®åŠçã¯æ¬¡ã®ããã«è¡ãããŸãã
èŠããã«ãæ¡ä»¶åŒãtrueã®å Žåã¯æ1ãå®è¡ããããã以å€ã®å Žåã¯æ2ãå®è¡ãããŸãã æ¡ä»¶åŒãfalseã®å Žåã«äœããå®è¡ããå¿
èŠããªãå Žåã¯ãelseéšåãå
šãŠçç¥ããããšãã§ããŸãã
éã«ãæ¡ä»¶åŒãfalseã®å Žåã«äœããè©äŸ¡ããå¿
èŠããªãå Žåã¯ãnotæŒç®åã䜿çšããŠåŒã®true/falseå€ãå転ããå¿
èŠããããŸãã
ããã«ããæã¯ããã®ç« ã®æ®ãã®æãšåæ§ã«ãæã®ãããã¯ã§ããå ŽåããããŸãããããã¯ãšã¯ãã»ãã³ãã³ã§åºåãããæã®ãªã¹ãã§ãäžæ¬åŒ§ { } ã§å²ãŸããŠããŸãã泚æç¹ãšããŠããããã¯ã®åŸãã«ã¯ã»ãã³ãã³ãã€ããªãã§ãã ãããäžèšã®äŸã¯æ¬¡ã®ããã«ãªããŸãã
ãŸããè€æ°ã®ifæãé çªã«é
眮ããŠãæåã®åŒãfalseã§ããå Žåã¯ã次ã®åŒã次ã®åŒãªã©ãç¶ããŠãæåã®trueåŒãèŠã€ãããŸã§ç¶ããããšãã§ããŸãã
äžèšã®äŸã®ç¹æ®ãªå Žåã¯ãååŒã§1ã€ã®å€æ°ãç°ãªãå€ãšæ¯èŒããå Žåã§ãã ãã®ãããªã¢ããªã±ãŒã·ã§ã³ã§ã¯ãäžèšã§èª¬æããswitchæã䜿çšããŠããã©ãŒãã³ã¹ãåäžãããã³ãŒããç°¡çŽ åããããšãã§ããŸãã
switchæã¯ãæ¡ä»¶ã«å¿ããŠè€æ°ã®éžæè¢ã®äžãã1ã€ãéžæããããã®ãããé«åºŠãªå¶åŸ¡æ§é ã§ãã以äžã®ãããªåœ¢åŒã«ãªããŸãã
switchæã¯ãifæãããå°ãè€éãªæ§é ãããŠããŸããããŸã ããªãåçŽã§ãã ãŸããåŒãè©äŸ¡ãã次ã®ãããã¯å
ã®å
šãŠã®caseæãæ€çŽ¢ããŸãã åŒã«ãã£ãŠè¿ãããå€ãšçãããã®ãèŠã€ããã°ãPikeã¯ãã®caseæã®çŽåŸã«ç¶ãã³ãŒããå®è¡ãç¶ããŸãã breakãåºçŸãããšãPikeã¯ã¹ã€ãããããã¯ã®æ®ãã®ã³ãŒããã¹ããããããããã¯ã®åŸã«ç¶ãã³ãŒããå®è¡ããŸãã 次ã®caseæã®åã«breakããªããŠããå¿
ãããå³å¯ã«å¿
èŠã§ã¯ãããŸããã 次ã®caseæã®åã«breakããªãå ŽåãPikeã¯åã«å®è¡ãç¶ãããã®caseæã®çŽåŸã®ã³ãŒããå®è¡ããŸãã
äžèšã®äŸã®caseæã®1ã€ã¯ãç¯å²ã§ãããšããç¹ã§ç°ãªããŸãã ãã®å Žåãå®æ°3ãšå®æ°4ã®éã®ä»»æã®å€ãæ3ã«ãžã£ã³ãããããã«ãªããŸãã ç¯å²ã¯ãå®æ°3ãšå®æ°4ã®å€ãå«ãããšã«æ³šæããŠãã ããã
å埩ã¯ãã³ãŒãã0å以äžå®è¡ããããã«äœ¿çšãããŸããããã¯ãããªãç°ãªãæ¹æ³ã§å®è¡ã§ããããã4ã€ã®ç°ãªãå埩å¶åŸ¡æ§é ããããŸãããããã¯ãã¹ãŠéåžžã«äŒŒãŠããããã«èŠãããããããŸããããé©åãªæã«é©åãªãã®ã䜿çšãããšãã³ãŒãã¯çããã·ã³ãã«ã«ãªããŸãã
whileã¯ãã«ãŒãå¶åŸ¡æ§é ã®äžã§æãã·ã³ãã«ãªãã®ã§ããelseã®éšåãé€ããifæã®ããã«èŠããŸãã
åäœæ¹æ³ã®éãã¯å€§ãããªããããåŒãçã®å Žåã«æãå®è¡ãããŸãã ãã®åŸãåŒãåè©äŸ¡ãããçã§ããã°æãå床å®è¡ãããŸãã ããããåŒãå床è©äŸ¡ããç¹°ãè¿ããŸã... 以äžã¯äœ¿çšäŸã§ãã
ããã«ãããshow_recordã1ã2ã3ã4ã®å€ã§åŒã³åºãããŸãã
forã¯ãåã«whileã®æ¡åŒµã§ããã«ãŒããããçããã³ã³ãã¯ãã«æžãããã®æ¹æ³ãæäŸããŸããæ§æã¯ä»¥äžã®ããã«ãªããŸãã
forã¯ã以äžã®æé ãå®è¡ããŸãã
ããã«ãããwhileã»ã¯ã·ã§ã³ã®äŸã¯æ¬¡ã®ããã«æžãããšãã§ããŸãã
do-whileã¯ãwhileãšäŒŒãŠããŸãããå¿
ãäžåºŠã¯æãå®è¡ããããšãç°ãªããŸãã
åäœæ¹æ³ã®éãã¯å€§ãããªããããåŒãçã®å Žåã«æãå®è¡ãããŸãã ãã®åŸãåŒãåè©äŸ¡ãããçã§ããã°æãå床å®è¡ãããŸãã ããããåŒãå床è©äŸ¡ããç¹°ãè¿ããŸã... 以äžã¯äœ¿çšäŸã§ãã
ããã«ãããshow_recordã100ã§åŒã³åºãããŸãã
foreachã¯ãã«ãŒãå
ã®åå埩ã«å¯ŸããŠæ瀺çãªãã¹ãåŒãè©äŸ¡ããªãç¹ã§ãŠããŒã¯ã§ãã 代ããã«ãforeachã¯ã»ããå
ã®åèŠçŽ ã«ã€ããŠ1åã ãæãå®è¡ããŸããforeachã«ã¯2ã€ã®æ§æããããæåã®æ§æã¯æ¬¡ã®ããã«ãªããŸãã
foreachãè¡ãããšã¯ä»¥äžã®éãã§ãã
Pike-7.4.10 ãã foreach ã«æ°ããæ§æãè¿œå ãããŸããã
äžèšã®ã«ãŒãå¶åŸ¡æ§æã¯ããã¹ãŠã®åé¡ã解決ããã®ã«ååã§ããããã¹ãŠã®åé¡ã«ç°¡åãªè§£æ±ºçãæäŸããã«ã¯äžååã§ãã ã«ãŒãã®éäžã§æãåºãããšãã§ããæ©èœãäžè¶³ããŠããŸãããããè¡ãæ¹æ³ã¯3ã€ãããŸãã
breakæã¯ãã«ãŒããswitchæã®äžã§äœ¿çšããããã®ãããã¯ããæãåºããŸãã以äžã¯ãbreakæã®æ§æãšäŸã§ãã
æ¡ä»¶åŒãçã§ããéããã«ãŒãåŠçãç¹°ãè¿ããŸããããããifæã®æ¡ä»¶åŒãçã«ãªã£ãå Žåãbreakæãå®è¡ãããwhileã«ãŒãããæãåºããŸãã
continueæã¯ãã«ãŒãå
ã§äœ¿çšããããã®æç¹ã§ã®åŠçãäžæãã次ã®ã«ãŒãåŠçãéå§ããŸãã以äžã¯ãcontinueæã®æ§æãšäŸã§ãã
æ¡ä»¶åŒãçã§ããéããã«ãŒãåŠçãç¹°ãè¿ããŸããããããifæã®æ¡ä»¶åŒãçã«ãªã£ãå Žåãcontinueæãå®è¡ãããã«ãŒãã®å
é ã«æ»ã£ãŠã次ã®ã«ãŒãåŠçãéå§ããŸãã
returnæã¯ãé¢æ°å
ã§äœ¿çšããããã®æç¹ã§ã®åŠçãçµäºããé¢æ°ããå€ãè¿ããŸãã以äžã¯ãreturnæã®æ§æãšäŸã§ãã
my_funcé¢æ°å
ã§ãxãšyãåãåããŸããifæã®æ¡ä»¶åŒãçã®å Žåã0ãè¿ããŸãããã以å€ã®å Žåã¯ãxãšyã®åèšå€ãè¿ããŸããreturnæãå®è¡ããããšãé¢æ°å
ã®åŠçã¯çµäºããé¢æ°ããå€ãè¿ãããŸãã
é¢æ°ã¯ãPikeããã°ã©ã ã®äž»èŠãªæ§æèŠçŽ ã®1ã€ã§ãããè€æ°ã®æäœããŸãšããŠå®è¡ããããã«äœ¿çšãããŸããPikeã§ã®é¢æ°ã®åºæ¬çãªæŠå¿µã¯ãä»ã®å€ãã®ããã°ã©ãã³ã°èšèªãšåæ§ã«ãåŒæ°ãåãåããå®è¡å¯èœãªã³ãŒããããã¯ãå®çŸ©ããæ»ãå€ãè¿ãããšã§ãã
Pikeã§ã¯ãé¢æ°ã®å®çŸ©ã®æ§æã¯ä»¥äžã®ããã«ãªããŸãã
åŒæ°ãªã¹ãã¯ããä»®åŒæ°å ä»®åŒæ°åãã®ãã¢ãã,ãã§åºåã£ã0å以äžã®ãªã¹ãã§ãã
é¢æ°ã®åŒã³åºãã®æ§æã¯ä»¥äžã®ããã«ãªããŸãã
åŒæ°ãªã¹ãã¯ãå®åŒæ°ã¢ãã,ãã§åºåã£ã0å以äžã®ãªã¹ãã§ãã
ããã§ã¯ãå€æ°ã«æ»å€ãä¿æããŠããŸãããåŒã®äžã®é
ã«é¢æ°ã䜿ã£ããããã®ãŸãŸä»ã®é¢æ°ã®å®åŒæ°ã«ãããããããšãå¯èœã§ãã
äžèšã®ã³ãŒãã¯ãadd2ãšããé¢æ°ãå®çŸ©ãããã®é¢æ°ãmainé¢æ°ããåŒã³åºããŠããŸãã
add2é¢æ°ã¯ã2ã€ã®æŽæ° a ãš b ãåãåãããããã®å€ã足ããŠçµæãè¿ãé¢æ°ã§ãã
mainé¢æ°ã§ã¯ãadd2(2, 3)ãåŒã³åºããŠããã®çµæãå€æ° n ã«æ ŒçŽããŠããŸãããã®å ŽåãåŒæ°ãšã㊠2 ãš 3 ãæž¡ããŠããã®ã§ãé¢æ°å
ã® a ã«ã¯ 2ãb ã«ã¯ 3 ãæž¡ãããŸããçµæãšããŠãadd2(2, 3) ã®è¿ãå€ã§ãã 5 ãå€æ° n ã«æ ŒçŽãããŸãã
æåŸã«ãwriteé¢æ°ã䜿ã£ãŠå€æ° n ã®å€ã衚瀺ããŠããŸããåºåçµæ㯠n = 5 ãšãªããŸãã
ãã®äŸã§ã¯ãé¢æ° add2 ãå®çŸ©ããŠåå©çšæ§ãé«ããmainé¢æ°ãããã®é¢æ°ãåŒã³åºããŠããŸããé¢æ°ã䜿ãããšã§ãåãåŠçãç¹°ãè¿ãæžãå¿
èŠããªããªããã³ãŒãã®ä¿å®æ§ãšå¯èªæ§ãåäžãããããšãã§ããŸãã
Pikeããã°ã©ãã³ã°ã§ã¯ãåŒæ°ã®é
åå±éãè¡ãããšãã§ããŸãã é
åå±éã¯ãf( @({ 2, 3 }) )ã®ããã«é
åã«ã@ããå眮ãããã®å Žåã¯f( 2, 3 )ãšåãæå³ã«ãªããŸãã é
åå±éã䜿ããšãé
åãåã
ã®åŒæ°ãšããŠé¢æ°ã«æž¡ãããšãã§ããŸãã以äžã«äŸã瀺ããŸãã
äžèšã®ã³ãŒãã¯ãadd2ãšããé¢æ°ã«é
åå±éã䜿çšããŠåŒæ°ãæž¡ãããã®çµæãå€æ°nã«æ ŒçŽããŠããŸãã pairãšããarray(int)åã®é
åã«ã¯2ã€ã®èŠçŽ ãå«ãŸããŠããããããã2ãš3ã§ãã
add2(@pair)ã®éšåã§ã@æŒç®åã䜿çšããŠpairã®é
åå±éãè¡ã£ãŠããŸãã ããã«ãããadd2é¢æ°ã«ã¯2ãš3ã®2ã€ã®åŒæ°ãåå¥ã«æž¡ãããŸãã
add2é¢æ°ã§ã¯ãåŒæ°aãšbãåãåãããããã足ããçµæãè¿ããŠããŸãã ãã®çµæãå€æ°nã«æ ŒçŽãããŸãã
æåŸã«ãwriteé¢æ°ã䜿çšããŠå€æ°nã®å€ã衚瀺ããŠããŸããåºåçµæã¯n = 5ãšãªããŸãã
é
åå±éã䜿ãããšã§ãé
åã®èŠçŽ ãåå¥ã®åŒæ°ãšããŠé¢æ°ã«æž¡ãããšãã§ããŸããããã«ãããã³ãŒãã®èšè¿°ãç°¡æœã«ããæè»æ§ãé«ããããšãã§ããŸãã
éåžžã®é¢æ°ã¯ãåŒæ°ã®æ°ã¯äžå®ã§ãããåŒæ°ã®æ°ãå¯å€ã«ããããšãåºæ¥ãŸãã
ä»®åŒæ°é
åã¯ãé
åã§åŒæ°ãªã¹ããšåãå
容ãå
¥ããŸãã
ãªããé
åå±éã¯å¯å€é·åŒæ°ãåãåãé¢æ°ã«å¯ŸããŠã䜿çšããããšãã§ããŸãã å¯å€é·åŒæ°ãæã€é¢æ°ã«é
åãæž¡ãå Žåããé
åå±éãè¡ã£ãŠå¯å€é·åŒæ°ãšããŠæž¡ãããšãã§ããŸãã
äžèšã®ã³ãŒãã¯ãå¯å€é·åŒæ°ãæã€sumé¢æ°ã«é
åå±éã䜿çšããŠåŒæ°ãæž¡ãããã®çµæãå€æ°nã«æ ŒçŽããŠããŸããaryãšããarray(int)åã®é
åã«ã¯1ãã10ãŸã§ã®æŽæ°ãå«ãŸããŠããŸãã
sum(@ary)ã®éšåã§ã@æŒç®åã䜿çšããŠaryã®é
åå±éãè¡ã£ãŠããŸããããã«ãããsumé¢æ°ã«ã¯1ãã10ãŸã§ã®10åã®åŒæ°ãåå¥ã«æž¡ãããŸãã
sumé¢æ°ã§ã¯ãå¯å€é·åŒæ°restãåãåãããããã®åŒæ°ãåèšããŠããŸããforeachã«ãŒãã䜿çšããŠãå¯å€é·åŒæ°restã®åèŠçŽ nã«ã¢ã¯ã»ã¹ãããããå€æ°xã«å ç®ããŠããŸãã
æåŸã«ãå€æ°xã®å€ãå€æ°nã«æ ŒçŽãããwriteé¢æ°ã䜿çšããŠè¡šç€ºããŠããŸããåºåçµæã¯n = 55ãšãªããŸãã
ãã®äŸã§ã¯ãå¯å€é·åŒæ°ãæã€é¢æ°ã«é
åå±éã䜿çšããããšã§ãé
åã®èŠçŽ ãåå¥ã®åŒæ°ãšããŠé¢æ°ã«æž¡ãããšãã§ããŸããå¯å€é·åŒæ°ã䜿çšããããšã§ãåŒæ°ã®æ°ãå¯å€çã§ããå Žåã§ãæè»ã«å¯Ÿå¿ããããšãã§ããŸãã
Pikeã§ã¯ãé¢æ°å
ã§èªå·±ãåŒã³åºãååž°çãªé¢æ°ãå®çŸ©ããããšãã§ããŸããããã«ãããå埩åŠçã䜿çšããã«åé¡ã解決ã§ããå ŽåããããŸãã
ããšãã°ã次ã®ãããªååž°çãªé¢æ°ãå®çŸ©ã§ããŸãã
ãã®é¢æ°ã¯ãäžããããæŽæ°nã®éä¹ãèšç®ããŸããååž°çåŒã³åºãã䜿çšããŠãnã0ã«ãªããŸã§ãnãã1ãã€åŒããŠãããŸãã
ããšãã°ã次ã®ããã«ãã®é¢æ°ãåŒã³åºãããšãã§ããŸãã
ãã®å Žåãresultã«ã¯120ãæ ŒçŽãããŸãã
ãæé»ã®ã©ã ããã¯ååŠçããã³/ãŸãã¯åŸåŠçãå¿
èŠãªã³ãŒããåã蟌ã䟿å©ãªæ¹æ³ã§ãã é¢æ°åŒã³åºãã§å§ãŸããçŽåŸã«ãã¬ãŒã¹ãããã¯ãç¶ãæã§ã¯ããããã¯ãã©ã ãé¢æ°ã«å€æãããåŒã³åºãããé¢æ°ã®æåŸã®åŒæ°ãšããŠæž¡ãããŸãã
timesãšããé¢æ°ãå®çŸ©ããŠããã®é¢æ°ã«åŒæ°ãšããŠå®è¡åæ°ãšãããã¯ãæž¡ãããããã¯ãæå®ãããåæ°åå®è¡ãããšããæ©èœãæã£ãŠããŸãã
mainé¢æ°ã§ã¯ãtimesé¢æ°ãåŒã³åºãã第1åŒæ°ã«3ãã第2åŒæ°ã«{ write("Hello world! <%d>\n", x++); }ãšããæé»ã®ã©ã ããæž¡ããŠããŸãããã®æé»ã®ã©ã ãã¯ãtimesé¢æ°å
ã§block()ãšãã圢åŒã§åŒã³åºãããŸããblock()ã®äžã§ã¯ãwriteé¢æ°ãçšããŠã"Hello world! <x>"ãšããã¡ãã»ãŒãžã衚瀺ããxã®å€ãã€ã³ã¯ãªã¡ã³ãããŠããŸãããããã£ãŠããã®ããã°ã©ã ã¯ã"Hello world!"ãšããã¡ãã»ãŒãžãšãããã«ç¶ãxã®å€ã瀺ãã¡ãã»ãŒãžã3å衚瀺ããŸãã
timesé¢æ°ããå¶åŸ¡ãæ»ã£ãåŸãmainé¢æ°ã¯ãwrite("Hello world! <%d>\n", x++);ã«ãã£ãŠã"Hello world! <3>"ãšããã¡ãã»ãŒãžã衚瀺ããxãã€ã³ã¯ãªã¡ã³ãããŸãããããã£ãŠããã®ããã°ã©ã ã¯ãåèšã§4åã®"Hello world!"ã¡ãã»ãŒãžã衚瀺ããxã®å€ã¯4ã«ãªããŸãã
ãã®ããã«ãé¢æ°åŒã³åºãã«ç¶ããããã¯ãåŒã³åºãå
ã®é¢æ°ã®é ããæåŸã®é¢æ°åŒæ°ãšãªãäŸã¯ãRubyãGroovyãKotlinãªã©ã«èŠãããšãåºæ¥ãŸãã
éçºäžã® Pike-9.0 ã§ã¯ã__ARGS__ã䜿ã£ãŠæé»ã®ã©ã ããžåŒæ°ãæž¡ãããšãåºæ¥ãããã«ãªããŸãã
ã©ã ãåŒã¯å€éšã®å€æ° x ããã£ããã£ããã¯ããŒãžã£ãŒãšããŠæ©èœããŸããããã«ãããã©ã ãåŒå
㧠x ã®å€ãå€æŽããããšãã§ããŸãã ã¯ããŒãžã£ãŒã¯ãé¢æ°å
ã§å®çŸ©ãããå€æ°ãå«ãé¢æ°ãªããžã§ã¯ãã§ãããé¢æ°ãçµäºããŠããã®å€æ°ã®ã¹ã³ãŒããç¶æãããŸãã ãã®äŸã§ã¯ãtimes é¢æ°å
ã§å®çŸ©ããã i ãš main é¢æ°å
ã§å®çŸ©ããã x ã®2ã€ã®å€æ°ãååšããã©ã ãåŒã x ããã£ããã£ããŠå€æŽããŠããŸãã ããã«ãããã©ã ãåŒãçµäºããåŸã§ã x ã®å€ãä¿æã§ããŸãã
Pikeã§ã¯ãåã¯2ã€ã®ç°ãªãã³ã³ããã¹ãã§äœ¿çšãããŸããã³ã³ãã€ã«æãšå®è¡æã§ããäžéšã®åã¯ã³ã³ãã€ã«æã®ã¿äœ¿çšãããŸã(voidãmixedãããã³ãã¹ãŠã®æ§é å)ããã®ä»ã®ãã¹ãŠã®åã¯å®è¡æã«ã䜿çšãããŸãã
Pikeã«ã¯ãåºæ¬åãšãã€ã³ã¿åã®2ã€ã®çš®é¡ã®å®è¡æããŒã¿åããããŸããåºæ¬åã¯å€æ°ã«å²ãåœãŠããããšãã«ã³ããŒãããŸããããã€ã³ã¿åã¯åã«ãã€ã³ã¿ãã³ããŒããããããåããã®ãæã2ã€ã®å€æ°ãåŸãããŸãããã€ã³ã¿åã¯ãarrayãmappingãmultisetãprogramãobjectãããã³functionã®6ã€ããããŸãããããã¯ãã¹ãŠãã€ã³ã¿åã§ãããã¡ã¢ãªäžã®äœããæããŸãããã®ãäœããã¯ãããã«å¯Ÿãããã€ã³ã¿ããããªãå Žåã«è§£æŸãããŸããå€æ°ã«ãã€ã³ã¿åã®å€ãå²ãåœãŠãå Žåããã®ãäœããã¯ã³ããŒãããŸããã代ããã«ãããã«å¯Ÿããæ°ããåç
§ãçæãããŸãããããã®åã®ãããããé¢æ°ã®åŒæ°ãšããŠæž¡ãå Žåãé¢æ°ããäœãããå€æŽããå¯èœæ§ããããããç¹å¥ãªæ³šæãå¿
èŠã§ãããã®å¹æãæãŸãªãå Žåã¯ãå€ãæ瀺çã«ã³ããŒããå¿
èŠããããŸããåŸè¿°ããŸãã
æŽæ°ã䜿çšããå Žåã¯ãããŒã¯ãŒãintã䜿çšããŸãã
æµ®åå°æ°ç¹æ°ã䜿çšããå Žåã¯ãããŒã¯ãŒãfloatã䜿çšããŸãã
æååã䜿çšããå Žåã¯ãããŒã¯ãŒãstringã䜿çšããŸãã æååã¯ãäºéåŒçšç¬Šã§å²ãŸããæååãªãã©ã«ã䜿çšããŠè¡šããŸãã
ãã®ç¯ã§ã¯ããã€ã³ã¿åã«ã€ããŠèª¬æãããŠããŸããåºæ¬åã¯éåžžã«åºæ¬çãªåã§ãããã»ãšãã©ã®ãã€ã³ã¿åã¯ãåºæ¬åãæ ŒçŽããèå³æ·±ãæ¹æ³ã§ãã ãã€ã³ã¿åã«ã¯ãé
åãé£æ³é
åããã«ãã»ãããããã°ã©ã ããªããžã§ã¯ããé¢æ°ããããŸãã ãããã¯ãã¹ãŠãã¡ã¢ãªå
ã®äœããæããã€ã³ã¿ã§ããããã€ã³ã¿ããªããªããšããã®ãäœããã¯è§£æŸãããŸãã ãã€ã³ã¿åã®å€ãå€æ°ã«ä»£å
¥ãããšããã®ãäœãããã³ããŒãããã®ã§ã¯ãªããããã«å¯Ÿããæ°ããåç
§ãçæãããŸãã é¢æ°ã«ãããã®åã®å€ãåŒæ°ãšããŠæž¡ãå Žåã«ã¯ãç¹å¥ãªæ³šæãå¿
èŠã§ãããé¢æ°ããäœãããå€æŽããå¯èœæ§ãããããããã®å¹æãæãŸãããªãå Žåã«ã¯ãæ瀺çã«å€ãã³ããŒããå¿
èŠããããŸãã
Pikeã§ã¯ãé
åã¯è€æ°ã®èŠçŽ ãæ ŒçŽããããã®ããŒã¿æ§é ã§ããé
åã¯ãã³ã³ãã§åºåãããèŠçŽ ã®ãªã¹ãã§åæåããããšãã§ããŸãã
ãã®ã³ãŒãã§ã¯ãaãšããé
åãåæåãããèŠçŽ ãšããŠ2, 3, 7ãæ ŒçŽãããŸãã
é
åã®èŠçŽ ã«ã¢ã¯ã»ã¹ããã«ã¯ãé
ååã«è§æ¬åŒ§ã䜿çšããŠãã€ã³ããã¯ã¹ãæå®ããŸããäŸãã°ãa[0]ã¯é
åaã®æåã®èŠçŽ ãè¡šããŸããa[1]ã¯2çªç®ã®èŠçŽ ãa[2]ã¯3çªç®ã®èŠçŽ ãè¡šããŸãã
é
åã®èŠçŽ ã«å€ã代å
¥ããã«ã¯ãåæ§ã«è§æ¬åŒ§ã䜿çšããŠãã€ã³ããã¯ã¹ãæå®ãã代å
¥ããå€ãæå®ããŸãã
é
åã«èŠçŽ ãè¿œå ããã«ã¯ãé
åã®æåŸã«æ°ããèŠçŽ ãè¿œå ãã += æŒç®åã䜿çšããŸãã
foreach æã䜿ããšé
åèŠçŽ ãé ã«åŠçãè¡ãããšãåºæ¥ãŸãã
foreachæã¯ãæå®ãããé
åã®åèŠçŽ ãé çªã«åãåºããã«ãŒããå®è¡ããããã®å¶åŸ¡æ§æã§ãããã®ããã°ã©ã ã§ã¯ãforeach(a, mixed e)ãšããæã§ãé
åaã®åèŠçŽ ãåãåºããŠããããeã«ä»£å
¥ããŠããŸããmixedã¯ãPikeã®ããŒã¿åã§ãä»»æã®åã®å€ãåãå
¥ããããšãã§ããŸãã
ifæã¯ãeã®åã«å¿ããŠãé©åãªåœ¢åŒã§è¡šç€ºããããã«ãæ¡ä»¶åå²ãè¡ããŸããintp(e)ãfloatp(e)ãstringp(e)ã¯ãããããeãæŽæ°ãæµ®åå°æ°ç¹æ°ãæååã§ãããã©ãããå€å®ããé¢æ°ã§ããeãæŽæ°ã§ããã°ã"%d "ãšãããã©ãŒãããæååã䜿çšããŠããã®æŽæ°ã衚瀺ããŸããeãæµ®åå°æ°ç¹æ°ã§ããã°ã"%f "ãšãããã©ãŒãããæååã䜿çšããŠããã®æµ®åå°æ°ç¹æ°ã衚瀺ããŸããeãæååã§ããã°ã"\"%s\" "ãšãããã©ãŒãããæååã䜿çšããŠããã®æååãããã«ã¯ã©ãŒããŒã·ã§ã³ã§å²ãã§è¡šç€ºããŸãã
æåŸã®elseç¯ã¯ãeãã©ã®åã«ã該åœããªãå Žåã«å®è¡ããã"Unknown type"ãšããæååã衚瀺ããŸãã
[TODO:ãã®ã³ãŒãã¯èŠçŽ ã«é
åãå«ãé
åã«å¯Ÿå¿ããŠããŸããã]
Pikeã«ãããé£æ³é
åã¯ãããŒãšå€ã®ãã¢ã®éåãè¡šçŸããããŒã¿åã§ãããmappingãšããååã§å®çŸ©ãããŠããŸãã
é£æ³é
åã¯ãããŒãšå€ã®ãã¢ãè¿œå ããããšãã§ããŸããããŒã«ã¯æååãæŽæ°ãæµ®åå°æ°ç¹æ°ããªããžã§ã¯ããªã©ã䜿çšããããšãã§ããå€ã«ã¯ä»»æã®ããŒã¿åãæ ŒçŽããããšãã§ããŸãã
以äžã¯ãmappingã䜿çšãããµã³ãã«ã³ãŒãã§ãã
ãã®ã³ãŒãã§ã¯ãmappingã䜿çšããŠãããŒãšå€ã®ãã¢ãæ ŒçŽããmã宣èšããããŒã«æååãæŽæ°ãé
åãªã©ã䜿çšããŠããŸãããŸããmã«æ°ããããŒãšå€ã®ãã¢ãè¿œå ããããã«ãm["key2"] = "value2";ã®ããã«æžããŠããŸãã
foreachæã§ã¯ãmã®åèŠçŽ ãkãšvã«ä»£å
¥ããŠãwriteé¢æ°ãçšããŠãkãšvãé©åãªãã©ãŒãããã§æååã«å€æããwriteé¢æ°ã§åºåããŠããŸãã
äžèšã®ããã°ã©ã ã¯ã以äžã®ãããªåºåãçæããŸãã
mappingã¯ãé£æ³é
åãå®è£
ããããã®äž»èŠãªããŒã¿åã§ãããPikeã®æ§ã
ãªæ©èœã«äœ¿çšãããŸãã
Pikeã«ããããã«ãã»ããã¯ãèŠçŽ ã®éè€ãèš±ãããèŠçŽ ã®éåãè¡šçŸããããŒã¿åã§ãããmultisetãšããååã§å®çŸ©ãããŠããŸãã
ãã«ãã»ããã¯ãèŠçŽ ãè¿œå ããããšãã§ããåãèŠçŽ ãè€æ°åè¿œå ããããšãã§ããŸãã
Pikeã«ãããŠãããã°ã©ã ãšã¯C++ã«ãããã¯ã©ã¹ã«çžåœããŸãã ããã°ã©ã ã¯ããã®ããã°ã©ã ã«å®çŸ©ãããé¢æ°ãå€æ°ãã©ã®ããã«å®çŸ©ãããŠãããã®è¡šãä¿æããŸãã ãŸããã³ãŒãèªäœããããã°æ
å ±ãç¶æ¿ãããä»ã®ããã°ã©ã ãžã®åç
§ãä¿æããŸãã ãã ããããã°ã©ã èªäœã«ããŒã¿ãæ ŒçŽããã¹ããŒã¹ã¯ãããŸããã ããã°ã©ã å
ã®æ
å ±ã¯ããã¡ã€ã«ãŸãã¯æååãPikeã³ã³ãã€ã©ãééãããšãã«åéãããŸãã
次ã«è°è«ãããªããžã§ã¯ãã«æ ŒçŽããããã«å¿
èŠãªå€æ°ã¹ããŒã¹ã¯ããªããžã§ã¯ãã«æ ŒçŽãããŸãã
ããã°ã©ã ãæžãããšã¯ç°¡åã§ãããã°ã©ã ãã¡ã¢ãªã«ããŒãããã«ã¯ãcompile_fileããã£ã¹ãæŒç®åã䜿ãããšãã§ããŸãã ãã£ã¹ãæŒç®åã䜿çšããå Žåãããã°ã©ã ã¯ãã£ãã·ã¥ããã次å以éã¯åãããã°ã©ã ãè¿ãããŸãã ãŸããclassããŒã¯ãŒãã䜿çšãããšãããã°ã©ã ã®äžã«å¥ã®ããã°ã©ã ãæžãããšãã§ããŸãã
ããŒã¿é åãäœæããã«ã¯ãããã°ã©ã ãã€ã³ã¹ã¿ã³ã¹åããå¿
èŠãããããã€ã³ã¿ã䜿çšããŠãæ°ãããªããžã§ã¯ããäœæãããã®ãªããžã§ã¯ãå
ã®createé¢æ°ãåŒã³åºãããšã§å®çŸãããŸãã ãã¹ãŠã®ããã°ã©ã ã¯æååãã³ã³ãã€ã«ããŠçæãããŸãã ãã®ããã«ãcompileãcompile_fileãcompile_stringãšãã3ã€ã®é¢æ°ããããŸãã ãŸãããã£ã¹ãæŒç®åã䜿çšããããšãã§ããŸãã
==ã!=ã䜿çšããããšã§ã2ã€ã®ããã°ã©ã ãåããã©ããã確èªã§ããŸãã ãŸããp[args]ãp->identifierã®ãããªæŒç®åãé¢æ°ãéèŠã§ãã
ããã°ã©ã ã¯ããŒã¿ãä¿åããå Žæãæãããã©ã®ããã«ããŒã¿ãä¿åãããã瀺ããŠããã ãã§ãããããããŒã¿ãä¿åããã«ã¯ãªããžã§ã¯ããå¿
èŠã§ãã ãªããžã§ã¯ãã¯ãããã°ã©ã ããè€è£œãããã¡ã¢ãªã®ãã£ã³ã¯ã§ãããè€æ°ã®ãªããžã§ã¯ãã1ã€ã®ããã°ã©ã ããäœæã§ããŸãã åãªããžã§ã¯ãã«ã¯ãç¬èªã®å€æ°ãããããã®ãªããžã§ã¯ãå
ã®é¢æ°ããããã®å€æ°ã§æäœãå®è¡ããŸãã ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã¯éåžžã«æè»ã§ãããŒã¿ã®ä¿åæ¹æ³ãå€æŽããŠãããªããžã§ã¯ãã®å€éšã«å€æŽãå ããå¿
èŠã¯ãããŸããã
ãªããžã§ã¯ãã®æååã«ããã€ã³ããã¯ã¹åã§ãæååããªããžã§ã¯ãå
ã®é¢æ°åã§ããå Žåãé¢æ°ãè¿ãããŸãã ãããããã®ååã«ãããããããé¢æ°ã¯å®éã«ã¯é¢æ°ãã€ã³ã¿ãŒã§ããé¢æ°ãã€ã³ã¿ãŒã¯ãä»ã®ããŒã¿åãšåãããã«æž¡ãããšãã§ããŸãã é¢æ°ãã€ã³ã¿ãŒã¯ãé¢æ°åãåŒæ°ãšããŠåãåãããã®é¢æ°ãæã瀺ããªããžã§ã¯ããšããã®é¢æ°ãå®è¡ããããã®é¢æ°ãã€ã³ã¿ãŒãè¿ãé¢æ°ãååšããŸãã ãŸããé¢æ°å
ã§å¥ã®é¢æ°ãå®çŸ©ããããã« lambda ããŒã¯ãŒãã䜿çšããããšãã§ããŸãã Pike ã§ã¯é¢æ°ã®ãªãŒããŒããŒãã¯ã§ããŸãããé¢æ°ãã€ã³ã¿ãŒã«ã¯ãé¢æ°ã®åŒã³åºããé¢æ°åã®ååŸãé¢æ°ãå®çŸ©ããããªããžã§ã¯ãã®ååŸãªã©ã®æ©èœããããŸãã
ã³ã³ãã€ã«æã®åã«ã¯ããvoidããšãmixedãã®2ã€ã®åããããŸãã
ãvoidãã¯ãå€ã®ååšãŸãã¯ãªãã·ã§ã³æ§ã瀺ãããã«äœ¿çšãããŸããé¢æ°ã®æ»ãå€ãšããŠäœ¿çšãããããšãå€ããé¢æ°ãå€ãè¿ããªãããšã瀺ããŸãããŸããé¢æ°ãã©ã¡ãŒã¿ã®åã»ããã®1ã€ãšããŠäœ¿çšãããããšãããããã®å Žåã¯ãåŒã³åºãå
ããã®ãã©ã¡ãŒã¿ãçç¥ããããšãã§ãããã®å Žåã¯ç¹æ®ãªå€UNDEFINEDã«ããã©ã«ãã§èšå®ãããŸãã
ãmixedãã¯ãä»»æã®åã®å€ãæž¡ãããšãã§ããå®éã®ã©ã³ã¿ã€ã ã§äœ¿çšãããå€ã®åãå®å
šã«äžæã§ããããšã瀺ãããã«äœ¿çšãããŸãããã®åã¯ãã³ã³ããã¯ã©ã¹ãå®è£
ããå Žå(ã¯ã©ã¹å
ã®ã³ãŒãã§å®éã®å€ãæäœãããªãå Žå)ããŸãã¯å®éã®ã³ã³ãã€ã«æã®åãè€éã«ãªããããå Žåã®äŸ¿å®çãªãã©ãŒã«ããã¯ãšããŠäœ¿çšãããŸãã
ãŸããåºæ¬åããã©ã¡ãŒã¿ãŒã§æå®ããŠåºæ¬åããµãã¿ã€ãåããããã¿ã€ããŠããªã³æŒç®å(|)ã䜿çšããŠè€æ°ã®ä»£æ¿åãæå®ããããšã§ãããç¹å®ã®ã³ã³ãã€ã«æã®åãæ§ç¯ããããšãã§ããŸãããã ããå®è¡æã®åã¯å®£èšãããã³ã³ãã€ã«æã®åãšç°ãªãå Žåãããããã泚æãå¿
èŠã§ãã
å€æ°ã宣èšããéã«ã¯ãå€æ°ãã©ã®çš®é¡ã®å€æ°ã§ããããæå®ããå¿
èŠããããŸããintãstringãªã©ã®å€ãã®ã¿ã€ãã«å¯ŸããŠã¯ãéåžžã«ç°¡åã«æå®ã§ããŸããããããããèå³æ·±ãå€æ°ã®å®£èšæ¹æ³ããããŸãã
ããã€ãã®äŸãèŠãŠã¿ãŸãããã
ãããã®äŸãèŠããšãåãæå®ããèå³æ·±ãæ¹æ³ãããããšãããããŸãã
以äžã¯å¯èœãªãã®ã®ãªã¹ãã§ãã
Pikeã³ãŒãã¯ã³ã³ãã€ã©ã«éä¿¡ãããåã«ãããªããã»ããµãçµç±ããŸãã ããªããã»ããµã¯ããœãŒã¹ã³ãŒããPikeå
éšè¡šçŸã«å€æããããã€ãã®ã·ã³ãã«ãªæ£èŠåãšæŽåæ§ãã§ãã¯ãå®è¡ããããã°ã©ãããã¡ã€ã«ã«å
¥åãããããªããã»ããµãã£ã¬ã¯ãã£ãããå®è¡ããŸãã ããªããã»ããµãã£ã¬ã¯ãã£ãã¯ãåçŽãªã³ãŒãçæãšæäœã蚱容ããéåžžã«åçŽãªããã°ã©ãã³ã°èšèªã®ãããªãã®ã§ãã ã³ãŒãããªããã»ããµã¯ãPikeå
ã§cppåŒã³åºãã«ãã£ãŠåŒã³åºãããšãã§ããŸãã
ããªããã»ããµã¯ããã¡ã€ã«ã®æåãšã³ã³ãŒãã£ã³ã°ã決å®ããå¿
èŠããããããæåã«2ã€ã®ãã€ãã調ã¹ããã®è¡šã«åŸã£ãŠè§£éããŸãã ãã€ã0ãšãã€ã1ã®çµã¿åããã«å¯ŸããŠããã®ä»ã®ãã€ãã«ã€ããŠã¯ã#charsetãã£ã¬ã¯ãã£ããèŠã€ãããŸã§iso-8859-1ãšã³ã³ãŒãã£ã³ã°ãšããŠæ±ãããŸãã EBCDICã§æžãããããã°ã©ã ã§#charsetãã£ã¬ã¯ãã£ããçç¥ãããŠããå Žåã¯ãšã©ãŒã«ãªããŸãã#charsetãã£ã¬ã¯ãã£ãããšã³ã³ãŒãããããšãå¯èœã§ãã
ããªããã»ããµã¯ãæåå以å€ã®é£ç¶ãã空çœæåãæ¹è¡ä»¥å€ã¯åäžã®ç©ºçœæåã«å€æãããã¹ãŠã®//ã/***/ã³ã¡ã³ãã#!è¡ãåé€ããŸãã Pikeã¯ANSI/DECãšã¹ã±ãŒãã·ãŒã±ã³ã¹ã空çœãšããŠæ±ããŸãã
å®çŸ©ã«ç¹å®ã®å€ãèšå®ããããšãã§ãããã®å€ã¯ãœãŒã¹ã³ãŒãå
ã®å®çŸ©ã眮ãããå Žæã«æ¿å
¥ãããŸãã ãã¯ãã«ã¯æ倧254åã®åŒæ°ããããŸãã
Pikeã¯ãªããžã§ã¯ãæåããã°ã©ãã³ã°(OOP)ããµããŒãããŠãããPikeã®OOPæ©èœã䜿ãããšã§ããã°ã©ã ã®ã¢ãžã¥ãŒã«åãåå©çšæ§ã®åäžãå¯èœã«ãªããŸãã
ã¯ã©ã¹ã¯ãªããžã§ã¯ãã®èšèšå³ã§ããããªããžã§ã¯ãã¯ãã®ã¯ã©ã¹ã®å®äœã§ããã¯ã©ã¹ã¯ããã®ã¯ã©ã¹ãæã€å±æ§(ãã£ãŒã«ã)ãšæäœ(ã¡ãœãã)ãå®çŸ©ããŸãããªããžã§ã¯ãã¯ããã®ã¯ã©ã¹ãæã€å±æ§ã®å€ãšããã®ã¯ã©ã¹ãå®çŸ©ããæäœãå®è¡ããããšãã§ããŸãã
ãã®äŸã§ã¯ãã¯ã©ã¹å®çŸ©ã®äŸãšããŠã人ç©ã®ã¯ã©ã¹ãäœæãããŠããŸããã¯ã©ã¹å®çŸ©ã¯ãclassããŒã¯ãŒãã§å§ãŸããæ³¢æ¬åŒ§ { } ã§å²ãŸããã¡ã³ãå€æ°ãšã¡ãœããã®å®çŸ©ãå«ã¿ãŸãã
ã¯ã©ã¹ã®ã¡ã³ãå€æ°ã¯ãåãªããžã§ã¯ãã«1ã€ãã€ååšããŸãããã®äŸã§ã¯ã人ç©ã®ååãè¡šãæåååã®å€æ°nameãšå¹Žéœ¢ãè¡šãæŽæ°åã®å€æ°ageãå®çŸ©ãããŠããŸãã
ã¡ãœããã¯ãã¯ã©ã¹ã®ãªããžã§ã¯ãã«é©çšã§ããæ©èœãèšè¿°ããŸãããã®äŸã§ã¯ãsay_helloãšããã¡ãœãããå®çŸ©ãããŠããŸãããã®ã¡ãœããã¯ã"Hello, I'm åå."ãšããã¡ãã»ãŒãžã衚瀺ããŸãã
ã¯ã©ã¹ã®ãªããžã§ã¯ãã¯ãã¯ã©ã¹åãåŒã³åºãå¯èœãªé¢æ°ã®ããã«äœ¿çšãããŸããäŸãã°ãjohn->say_hello();ã¯ãjohnãªããžã§ã¯ãã®say_helloã¡ãœãããåŒã³åºããŸãã
ãã®äŸã§ã¯ãcreateãšããç¹å¥ãªã¡ãœãããå®çŸ©ãããŠããŸãããã®ã¡ãœããã¯ããªããžã§ã¯ããã¯ããŒã³ããéã«æå®ããåŒæ°ãåŠçããŸãã ãã®ã¡ãœããã¯ãC++ããã°ã©ããŒãã³ã³ã¹ãã©ã¯ã¿ãšåŒã¶ãã®ã«çžåœããŸãã
ãã®äŸã§ã¯ãã¯ã©ã¹ã«destroyãšããã¡ãœãããå®çŸ©ãããŠããŸãããããã®ã¡ãœãããå®çŸ©ããããšãã§ããŸãã ãã®ã¡ãœããã¯ããªããžã§ã¯ããæ¶ããçŽåã«å®è¡ããããã®ã§ãC++ããã°ã©ããŒããã¹ãã©ã¯ã¿ãšåŒã¶ãã®ã«çžåœããŸãã ãã ããPikeã¯èªåã¬ããŒãžã³ã¬ã¯ã·ã§ã³ãåããŠãããããC++ã»ã©ã¯é »ç¹ã«ãã¹ãã©ã¯ã¿ãå¿
èŠã«ãªãããšã¯ãããŸããã
Pikeã®ã¯ã©ã¹ã¯ãåãªãæ§é äœãšããŠã䜿çšã§ããŸããäŸãã°ãäžèšã®ã³ãŒãã®
john->name, john->ageã®ããã«ã€ã³ã¹ã¿ã³ã¹->ã¡ã³ãå€æ°ã®æ§æã§ã€ã³ã¹ã¿ã³ã¹ã®ã¡ã³ãå€æ°ãåç
§ã§ããŸãã
次ã®äŸã§ã¯ãã¯ã©ã¹ã®é
åãäœãã¡ã³ãå€æ°ãããªãŒãã³ãã«æ±ã£ãŠããŸãã
ãã®ã³ãŒãã¯ãäœæé²ã®é
ç®ãè¡šãããã® address_book_entry ãšããã¯ã©ã¹ãå®çŸ©ãããã®ã¯ã©ã¹ã䜿çšããŠäœæé²ãäœæããŠããŸãã
ãŸããaddress_book_entry ã¯ã©ã¹ã¯ãååãäœæãé»è©±çªå·ã®3ã€ã®ã¡ã³ãå€æ°ãæã£ãŠããŸãã
ãããŠãmain é¢æ°ã§ã¯ããŸã空ã®äœæé²ãè¡šãé
å address_book ãäœæããŸãã
次ã«ãaddress_book_entry ã¯ã©ã¹ãã2ã€ã®ãšã³ããªãŒ alice ãš bob ãäœæããããããã®ååãäœæãé»è©±çªå·ãèšå®ããŸãã
ãããŠããããã®ãšã³ããªãŒã address_book é
åã«è¿œå ããŸãã
æåŸã«ãforeach ã«ãŒãã䜿çšããŠãaddress_book é
åã«å«ãŸãããã¹ãŠã®ãšã³ããªãŒãåºåããŸãã åãšã³ããªãŒã®æ
å ±ã¯ãwrite é¢æ°ã䜿çšããŠæŽåœ¢ããåºåãããŸãã
ãã®ã³ãŒããå®è¡ãããšã以äžã®ãããªåºåãåŸãããŸã:
ããã¯ã2ã€ã®ãšã³ããªãŒãæ£åžžã«äœæãããäœæé²ã«è¿œå ãããæ£åžžã«åºåãããŠããããšã瀺ããŠããŸãã
Pikeã«ãããŠãããã°ã©ã ãšã¯ã©ã¹ã¯åãã§ããããšãé©ããããããŸãããã€ãŸããPikeã§ã¯ããã°ã©ã ãšã¯ã©ã¹ã¯å矩èªãšããŠäœ¿çšãããããšããããŸãã
ãã¡ã€ã«å
ã®Pikeããã°ã©ã ã¯ã¯ã©ã¹å®çŸ©ã§ããããã¡ã€ã«ã§å®çŸ©ãããã¡ãœããã¯ãã®ã¯ã©ã¹ã®ã¡ãœããã§ãããã°ããŒãã«å€æ°(ã€ãŸããã¡ãœããã®å€ã§å®çŸ©ãããå€æ°)ã¯ã¡ã³ãå€æ°ã§ããå¿
èŠã§ããã°ããã¡ã€ã«å
ã®ã³ãŒãã«æé»çã«ãclass {}ãããããšæ³åã§ããŸãã
ãã ãã现ããã¯ã©ã¹ããšã«ããããã®ãã¡ã€ã«ãçšæããªããã°ãªããªããšãªããšé¢åã«ãªãã®ã§ããclass {}ãã®è¡šèšãçšæãããŠããŸãã
èŠèŠããããã³ãŒãã§ãããclass { } ã§å²ãŸããŠããŸãããã
Pikeã®ã¯ã©ã¹ãšããã°ã©ã ã®é¢ä¿ã¯ç¹ç°çã§ãããé¡äŸãšããŠã¯Zigã®æ§é äœãšããã°ã©ã ã®é¢ä¿ããããŸãã
è€çŽ æ°ã¯å®æ°éšãšèæ°éšããæãæ°ã®åœ¢åŒã§ãããPikeã«ã¯çµã¿èŸŒã¿ã®è€çŽ æ°åããªããããç¬èªã®ã¯ã©ã¹ãäœæããŸããã
complex ã¯ã©ã¹ã¯ãå®æ°éšãšèæ°éšãã¡ã³ãå€æ°ãšããŠæã¡ãå ç®ãæžç®ãä¹ç®ãªã©ã®æäœãè¡ãæŒç®åãæäŸããŠããŸãããŸãã絶察å€ãæåååãå®è£
ãããŠããŸãã
ãã®Pikeã®ã³ãŒãã¯ãcomplex(è€çŽ æ°)ã¯ã©ã¹ãå®çŸ©ããè€çŽ æ°ã®æŒç®ãæ©èœãå®è£
ããŠããŸãã以äžã«åéšåã®è§£èª¬ãããŸãã
ãŸããcomplexã¯ã©ã¹ã®å®çŸ©ã§ããã¯ã©ã¹å
ã§äœ¿çšããããã©ã€ããŒããªå€æ° _real ãš _imag ãå®çŸ©ãããŠããŸãã ãŸãã`real() ã¡ãœãããš `imag() ã¡ãœãããå®çŸ©ããããããã _real ãš _imag ã®å€ãè¿ããŸãã
次ã«ãcreate() ã¡ãœãããå®çŸ©ãããŠããŸãããã®ã¡ãœããã¯ãã³ã³ã¹ãã©ã¯ã¿ã®åœ¹å²ãæãããŸãã å¯å€é·åŒæ°ãåãåããæåã®åŒæ°ãå®éš _real ã«ãæ®ãã®åŒæ°(ããååšããå Žå)ãèéš _imag ã«ä»£å
¥ããŸãã
å ç®ãæžç®ãä¹ç®ã®æŒç®åã¡ãœãããå®çŸ©ãããŠããŸããäŸãã°ã+æŒç®åã«å¯Ÿã㊠complex ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãšã®å ç®ãè¡ããšãå®éšãšèéšããããã足ããçµæã®æ°ãã complex ã€ã³ã¹ã¿ã³ã¹ãè¿ãããŸãããŸãã+æŒç®åã«å¯Ÿã㊠mixed å(ç°ãªãåã®å ç®ã蚱容ãã)ã®åŒæ°ãåãåãå Žåã¯ãåŒæ°ãå®éšãšããŠè¶³ãåãããæ°ãã complex ã€ã³ã¹ã¿ã³ã¹ãè¿ãããŸãã
`absã¡ãœããã¯ãè€çŽ æ°ã®çµ¶å¯Ÿå€ãè¿ãããã®ã¡ãœããã§ãã絶察å€ã¯å®éšã®äºä¹ãšèéšã®äºä¹ã®åã®å¹³æ¹æ ¹ãšããŠèšç®ãããŸãã
_sprintf ã¡ãœããã¯ãè€çŽ æ°ãæååãšããŠè¡šç€ºããããã®ãã©ãŒããããæäŸããŸãã
æåŸã«ãmain é¢æ°ã§ã¯ãcomplexã¯ã©ã¹ã®ãªããžã§ã¯ããäœæãããããã®åã¡ãœãããåŒã³åºããŠããŸãã ãŸããforeachã«ãŒãã䜿ã£ãŠãé
åã®åèŠçŽ ã«ã€ã㊠complex ãªããžã§ã¯ããäœæãããããã®å ç®ãæžç®ãä¹ç®ãèšç®ããŠããŸãã
ç¶æ¿ã¯ãæ¢åã®ã¯ã©ã¹ãåºç€ãšããŠãæ°ããã¯ã©ã¹ãäœæããããšãã§ããä»çµã¿ã§ããç¶æ¿ã«ãããæ¢åã®ã¯ã©ã¹ã®ãã¹ãŠã®ãã£ãŒã«ããšã¡ãœãããæ°ããã¯ã©ã¹ã«åŒãç¶ãããšãã§ããŸãããŸããæ°ããã¯ã©ã¹ã«ã¯ãç¶æ¿å
ã®ã¯ã©ã¹ã«ã¯ååšããªããã£ãŒã«ããã¡ãœãããè¿œå ããããšãã§ããŸããããã«ãããããç¹åããã¯ã©ã¹ãäœæããããšãã§ããŸãã
Pikeã§ã¯ãã¯ã©ã¹ç¶æ¿ã¯inheritããŒã¯ãŒãã䜿çšããŠå®£èšãããŸããç¶æ¿å
ã®ã¯ã©ã¹ã¯ãinheritããŒã¯ãŒãã®åŸã«æå®ãããŸãã å³åœ¢ãäŸã«ã¯ã©ã¹ã®ç¶æ¿ã解説ããŸãã
ãŸããpointã¯ã©ã¹ãå®çŸ©ãããŠããŸãããã®ã¯ã©ã¹ã¯2次å
ã®åº§æšãè¡šããŸããã³ã³ã¹ãã©ã¯ã¿ã§x座æšãšy座æšãåãåãããã®å€ãä¿æããŸããmoveã¡ãœããã¯ã座æšãæå®ããéã ã移åãããããã®ã¡ãœããã§ããå
éšã§x座æšãšy座æšãæŽæ°ãã移åããããšã衚瀺ããŸãããŸãã_sprintfã¡ãœããã¯ããªããžã§ã¯ãã®æååè¡šçŸãè¿ãããã®ç¹æ®ãªã¡ãœããã§ãã
次ã«ãshapeã¯ã©ã¹ãå®çŸ©ãããŠããŸãããã®ã¯ã©ã¹ã¯å³åœ¢ãè¡šãããã®åºæ¬ã¯ã©ã¹ã§ããshapeã¯ã©ã¹ã¯pointãªããžã§ã¯ããä¿æããŠããããã®äœçœ®ãè¡šããŸããcreateã¡ãœããã¯ãæå®ããã座æšã«æ°ããpointãªããžã§ã¯ããäœæããlocationã«ä»£å
¥ããŸããmoveã¡ãœããã¯ãlocationã®åº§æšãæå®ããéã ã移åãããããã®ã¡ãœããã§ããå
éšã§pointãªããžã§ã¯ãã®moveã¡ãœãããåŒã³åºããŠããŸãããŸãã_sprintfã¡ãœããã¯ããªããžã§ã¯ãã®æååè¡šçŸãè¿ãããã®ç¹æ®ãªã¡ãœããã§ãã
æåŸã®ãrectangleã¯ã©ã¹ãå®çŸ©ãããŠããŸãããã®ã¯ã©ã¹ã¯shapeã¯ã©ã¹ãç¶æ¿ããŠãããç©åœ¢ãè¡šããŸããcreateã¡ãœããã§ã¯ã芪ã¯ã©ã¹ã®createã¡ãœãããåŒã³åºããŠäœçœ®ãèšå®ããããã«å¹
ãšé«ããèšå®ããŸãã_sprintfã¡ãœããã§ã¯ã芪ã¯ã©ã¹ã®_sprintfã¡ãœãããåŒã³åºããŠèŠªã¯ã©ã¹ã®æ
å ±ã衚瀺ããããã«ç¶ããŠç©åœ¢åºæã®æ
å ±ã§ããå¹
ãšé«ãã衚瀺ããŸãã
mainé¢æ°ã§ã¯ãå®éã«rectangleãªããžã§ã¯ããäœæããæäœçµæã衚瀺ããŠããŸããæåã«rctãšããååã®ç©åœ¢ãªããžã§ã¯ããäœæãããã®æ¬¡ã«rct2ãšããå¥ã®ç©åœ¢ãªããžã§ã¯ããäœæããŠããŸããåãªããžã§ã¯ãã®æ
å ±ã衚瀺ããŠããŸãã
æã«ã¯ã2ã€ãŸãã¯ãã以äžã®ã¯ã©ã¹ããç¶æ¿ãããå ŽåããããŸããããã¯Pike(ããã³C++)ã§åäœããŸãããJavaã§ã¯åäœããŸããããã ãè€æ°ã®ç¶æ¿ãèšè¿°ããã°è¯ãã§ãã
ã®äŸã§ã¯ããã¹ãŠã®ãªããžã§ã¯ãã®ãã¹ãŠã®ã¡ãœãããšã¡ã³ãå€æ°ã«èª°ã§ãã¢ã¯ã»ã¹ã§ããŸããã äŸãã°ã次ã®ããã«å¹Žéœ¢ãæžããããšãéåžžã«ç°¡åã§ããã
ãã?ãã®johnã®å¹Žéœ¢ã¯30æ³ã§ãä»ã¯ãã€ãã¹20æ³ã«ãªã£ãŠãã?
ä»ã®ã¯ã©ã¹ãããã®å€æ°ã«è§Šããªãããã«ãã¡ã³ãå€æ° age ãžã®ã¢ã¯ã»ã¹ãå¶åŸ¡ããããšæããŸãã ãã®ãããªçšéã®ããã«ãã¡ãœãããŸãã¯ã¡ã³ãå€æ°ã®å®çŸ©ã§ãããŒã¿åã®åã«æžãããããã€ãã®ã¢ã¯ã»ã¹ä¿®é£ŸåããããŸãã äŸãã°ã人ç©ã®å¹Žéœ¢ã¯ã¡ã³ãå€æ° age ã«ãã£ãŠè¡šãããŸãã
ãããå€æŽããŠã
ãšãããšãåãã¯ã©ã¹å
ã®ã¡ãœããã®ã¿ããã®å€æ°ã«ã¢ã¯ã»ã¹ã§ããããã«ãªããŸãã
次ã®ã¢ã¯ã»ã¹ä¿®é£ŸåãååšããŸãã
ã¯ã©ã¹ã«ã³ã³ã¹ãã©ã¯ã¿(ã€ãŸããcreate ãšããååã®ã¡ãœãã)ãããå Žåãããã static ã«å®£èšããããšãè¯ãã¢ã€ãã¢ã§ãã ããã¯ãªããžã§ã¯ãã®æ§ç¯äžã«ã®ã¿åŒã³åºãããã¹ãã§ãããstatic ã§ãªãå Žåãç¶æ¿ã«é¢é£ããããã€ãã®åã®äžæŽåãçããå¯èœæ§ããããŸãã
Pikeã§ã¯ããã¡ã€ã«I/Oã« Stdio ãªããžã§ã¯ãã䜿ããŸãã
ãã®Pikeã®ã³ãŒãã¯ããã¡ã€ã« "/etc/hosts" ãèªã¿èŸŒã¿ããã®äžèº«ãæšæºåºåã«åºåããããã°ã©ã ã§ãã
ãŸããstringåã®å€æ° fname ã« "/etc/hosts" ãšãããã¡ã€ã«ã®ãã¹ã代å
¥ããŠããŸãã次ã«ãStdio ã¢ãžã¥ãŒã«ã® read_file() é¢æ°ã䜿ã£ãŠãfname ã«æå®ããããã¡ã€ã«ãèªã¿èŸŒãã§ããŸããèªã¿èŸŒãã çµæã¯ãstring|intåã®å€æ° buff ã«ä»£å
¥ãããŸãã
string|int åãšã¯ãstring åãŸã㯠int åã®ããããã®å€ã代å
¥å¯èœãªåã§ãããã㯠read_file() é¢æ°ãããã¡ã€ã«ã®èªã¿èŸŒã¿ã«æåããå Žåã¯ãã¡ã€ã«ã®å
容ã string åã§è¿ãã倱æããå Žå㯠0 ãè¿ãããã§ãããšã©ãŒãçºçããå Žåãintp() é¢æ°ã䜿ã£ãŠ buff ã®åã int åã§ããããšã確èªããStdio.perror() é¢æ°ã䜿ã£ãŠãšã©ãŒã®è©³çŽ°ãæšæºãšã©ãŒåºåã«åºåããåŸãããã°ã©ã ã¯çµäºããŸãã
èªã¿èŸŒã¿ã«æåããå Žåãwrite() é¢æ°ã䜿ã£ãŠãbuff ã®å
容ãæšæºåºåã«åºåããŸããæåŸã«ãããã°ã©ã ã¯çµäºããŸãã
ãã®ã³ãŒãã¯ãã·ã¹ãã ãã¡ã€ã« "/etc/hosts" ã®äžèº«ã衚瀺ããããã«äœ¿çšãããŸãããã ããrootæš©éãå¿
èŠãªå Žåãããããã泚æãå¿
èŠã§ãã
ãã®ããã°ã©ã ã¯ããã¡ã€ã«ã®æžã蟌ã¿ãšèªã¿èŸŒã¿ãè¡ãããããæ£åžžã«ã§ãããã©ããããã§ãã¯ããŸãã
ãŸããmain()é¢æ°ãå®çŸ©ãããŠããŸãã 次ã«ãstring fname = "sample.txt";ã§ãã¡ã€ã«åãæå®ããint cnt;ã§æžã蟌ãã ãã€ãæ°ãæ ŒçŽããå€æ°ã宣èšããŸãã ãŸãããšã©ãŒãçºçããå Žåã®ãšã©ãŒã¡ãã»ãŒãžãæ ŒçŽããå€æ°int|array errã宣èšããŠããŸãã ãã®å€æ°ã¯ãcatchã«ãã£ãŠäŸå€ãçºçããå Žåã«ãçç±ãšã¹ã¿ãã¯ãã¬ãŒã¹ãæ ŒçŽãããŸãã
catchã®ãããã¯å
ã§ã¯ãStdio.write_fileé¢æ°ã䜿çšããŠãæå®ããããã¡ã€ã«ã«ããã¹ããæžã蟌ã¿ãŸãã catchãããã¯ã®å€åŽã§ãarraypé¢æ°ã䜿çšããŠãerrå€æ°ã®åãé
åã§ãããã©ããããã§ãã¯ããŸãã ããé
åã§ããã°ããšã©ãŒã¡ãã»ãŒãžãåºåããreturn 2;ã§ããã°ã©ã ãçµäºããŸãã
次ã«ãstring|int buff = Stdio.read_file(fname);ã§ãæå®ããããã¡ã€ã«ããããã¹ããèªã¿èŸŒãã§ãèªã¿èŸŒãã ããã¹ããstringåã®å€æ°buffã«æ ŒçŽããŸãã ããèªã¿èŸŒã¿ã«å€±æããå Žåã¯ãintpé¢æ°ã䜿çšããŠãbuffå€æ°ã®åãæŽæ°åã§ãããã©ããããã§ãã¯ããŸãã æŽæ°åã§ããã°ãStdio.perror(fname);ã§ãšã©ãŒã¡ãã»ãŒãžãåºåããreturn 1;ã§ããã°ã©ã ãçµäºããŸãã
æåŸã«ãèªã¿èŸŒãã ããã¹ããwrite(buff);ã§åºåããreturn 0;ã§ããã°ã©ã ãæ£åžžã«çµäºããŸãã
ãšã©ãã¹ããã¹ã®ç¯©ããè¥å¹² Pike ãããæžããŠã¿ãŸããã
æ倧å
¬çŽæ°ãšæå°å
¬åæ°ããè¥å¹² Pike ãããæžããŠã¿ãŸããã
äºåæ³ããè¥å¹² Pike ãããæžããŠã¿ãŸããã
| [
{
"paragraph_id": 0,
"tag": "p",
"text": "Pikeã¯ãCèšèªã«äŒŒãææ³ãæã€é«æ°Žæºããã°ã©ãã³ã°èšèªã§ããè±å¯ãªã©ã€ãã©ãªãšãªããžã§ã¯ãæåããã°ã©ãã³ã°æ©èœãåããŠããŸãããŸããé«éãªå®è¡é床ãç¹åŸŽã§ãWebã¢ããªã±ãŒã·ã§ã³ããããã¯ãŒã¯ããã°ã©ãã³ã°ãããŒã¿ããŒã¹åŠçãªã©ãå¹
åºãçšéã§äœ¿çšãããŠããŸãã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "æ¬ãã¥ãŒããªã¢ã«ã§ã¯ãPikeã®åºæ¬çãªææ³ãšæ©èœãåå¿è
åãã«ãããããã解説ããŸããPikeãåŠã¶ããšã§ãããã°ã©ãã³ã°ã®åºç€ã身ã«ã€ããå®è·µçãªéçºã«å¿çšã§ããããã«ãªãããšãç®çãšããŠããŸããæ¬ãã¥ãŒããªã¢ã«ãéããŠãPikeã®é
åã掻çšæ¹æ³ãç解ãããã®å¯èœæ§ãåºããããšãã§ããã§ãããã",
"title": ""
},
{
"paragraph_id": 2,
"tag": "p",
"text": "Pikeã¯ãCèšèªã«äŒŒãææ³ãæã€é«æ°Žæºããã°ã©ãã³ã°èšèªã§ããè±å¯ãªã©ã€ãã©ãªãšãªããžã§ã¯ãæåããã°ã©ãã³ã°æ©èœãåããŠããŸãããŸããé«éãªå®è¡é床ãç¹åŸŽã§ãWebã¢ããªã±ãŒã·ã§ã³ããããã¯ãŒã¯ããã°ã©ãã³ã°ãããŒã¿ããŒã¹åŠçãªã©ãå¹
åºãçšéã§äœ¿çšãããŠããŸãã",
"title": "ã€ã³ãããã¯ã·ã§ã³"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "Pikeã¯ã以äžã®ãããªç¹åŸŽãæã£ãŠããŸãã",
"title": "ã€ã³ãããã¯ã·ã§ã³"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "Pikeã¯ãå°ããã·ã³ãã«ãªã¹ã¯ãªãããèšè¿°ããããã«äœ¿çšããããšãã§ããããã«ã¯éåžžã«å€§èŠæš¡ãªããã°ã©ã ã«ã䜿çšã§ããŸãã äžçäžã®WebãµãŒããŒã§ããRoxen WebServerãšCaudiumã¯ãã©ã¡ããPikeã§èšè¿°ãããŠããŸãã Pikeã®é«åºŠãªããŒã¿åãšãœã±ããã®çµã¿èŸŒã¿ãµããŒãã«ãããã€ã³ã¿ãŒãããã¢ããªã±ãŒã·ã§ã³ã§ã®äœ¿çšã«çæ³çã§ãã",
"title": "ã€ã³ãããã¯ã·ã§ã³"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "Pikeã¯ãGNU General Public License(GPL)ãGNU Lesser General Public License(LGPL)ãããã³Mozilla Public License(MPL)ã«åºã¥ãããªãŒãœãããŠã§ã¢ã§ãã UNIXãLinuxãSolarisãmacOS XãMicrosoft Windowsãªã©ãå€ãã®ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§å©çšå¯èœã§ãã",
"title": "ã€ã³ãããã¯ã·ã§ã³"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "Pikeã¯ãWebã¢ããªã±ãŒã·ã§ã³ããããã¯ãŒã¯ããã°ã©ãã³ã°ãããŒã¿ããŒã¹åŠçãã²ãŒã éçºãªã©ãå€å²ã«ãããçšéã«å©çšãããŠããŸãã",
"title": "ã€ã³ãããã¯ã·ã§ã³"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "å
·äœçã«ã¯ã以äžã®ãããªå Žé¢ã§æŽ»çšãããŠããŸãã",
"title": "ã€ã³ãããã¯ã·ã§ã³"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "Pikeã¯ãUNIXãLinuxãWindowsãmacOSãªã©ã®å€ãã®ãã©ãããã©ãŒã ã§å©çšå¯èœã§ãã Pikeã®ææ°ããŒãžã§ã³ãããŠã³ããŒãããã«ã¯ãPikeã®å
¬åŒãŠã§ããµã€ã( http://pike.lysator.liu.se/ )ã蚪åããŠãã ããã",
"title": "ã€ã³ã¹ããŒã«"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "LinuxãŠãŒã¶ãŒã®å ŽåãPikeã¯å€ãã®ãã£ã¹ããªãã¥ãŒã·ã§ã³ã®ããã±ãŒãžãªããžããªã«å«ãŸããŠããŸããäŸãã°ãDebianãUbuntuã®å Žåã以äžã®ã³ãã³ãã䜿çšããŠPikeãã€ã³ã¹ããŒã«ããããšãã§ããŸãã",
"title": "ã€ã³ã¹ããŒã«"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "WindowsãŠãŒã¶ãŒã®å ŽåãPikeã®WindowsããŒãžã§ã³ãããŠã³ããŒãããŠã€ã³ã¹ããŒã«ããå¿
èŠããããŸãã ããŠã³ããŒããããã¡ã€ã«ãå®è¡ããŠããŠã£ã¶ãŒãã«åŸã£ãŠã€ã³ã¹ããŒã«ããŠãã ããã",
"title": "ã€ã³ã¹ããŒã«"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "macOSãŠãŒã¶ãŒã®å ŽåãHomebrewãªã©ã®ããã±ãŒãžãããŒãžã£ãŒã䜿çšããŠPikeãã€ã³ã¹ããŒã«ããããšãã§ããŸãã",
"title": "ã€ã³ã¹ããŒã«"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "Pikeã¯ããã«ãæžã¿ãã€ããªã®ä»ã«ãœãŒã¹ã³ãŒããå
¬éãããŠããã®ã§ããœãŒã¹ã³ãŒããããã«ãããŠã€ã³ã¹ããŒã«ããããšãå¯èœã§ãã",
"title": "ã€ã³ã¹ããŒã«"
},
{
"paragraph_id": 13,
"tag": "p",
"text": "ããã§åé¡ã«ãªãã®ããçŸåšé
åžãããŠãããœãŒã¹ã³ãŒããããã«ãããéçšã§ pike èªèº«ã䜿ãããŠããç¹ã§ãã",
"title": "ã€ã³ã¹ããŒã«"
},
{
"paragraph_id": 14,
"tag": "p",
"text": "ãã®ãããFreeBSDã®æ§ãªãã«ãæžã¿ãã€ããªãé
åžãããŠããªããã©ããããŒã ã§ã¯ããã«ããã®ãã®ãåºæ¥ãŸããã",
"title": "ã€ã³ã¹ããŒã«"
},
{
"paragraph_id": 15,
"tag": "p",
"text": "ããã解決ããã«ã¯ããã«ãã«pike èªèº«ã䜿ãããŠããªãã£ãé ã®éå»ã®ããŒãžã§ã³(äŸãã°ã0.6)ããã«ããã€ã³ã¹ããŒã«ãããã®åŸãéå»ã®ããŒãžã§ã³ã®pikeã䜿ã£ãŠæ°ããããŒãžã§ã³(äŸãã°ã8.0)ãã€ã³ã¹ããŒã«ããäºæ®µéã®ãã«ãããã»ã¹ãæå¹ã§ãã",
"title": "ã€ã³ã¹ããŒã«"
},
{
"paragraph_id": 16,
"tag": "p",
"text": "ãã®æ¹æ³ã§ãFreeBSD 13.1/amd64 ã« Pike v8.0 release 1738 ãã€ã³ã¹ããŒã«ã§ããŸããã",
"title": "ã€ã³ã¹ããŒã«"
},
{
"paragraph_id": 17,
"tag": "p",
"text": "Pikeãã€ã³ã¹ããŒã«ããåŸã¯ããŸãããŒãžã§ã³ã確èªããŸãã以äžã®ã³ãã³ãã䜿çšããŠPikeã®ããŒãžã§ã³ç¢ºèªããŠãã ããã",
"title": "ã€ã³ã¹ããŒã«"
},
{
"paragraph_id": 18,
"tag": "p",
"text": "ã³ãã³ãã©ã€ã³ããPikeãèµ·åããããšãã§ããŸãã以äžã®ã³ãã³ãã䜿çšããŠPikeãèµ·åããŠãã ããã",
"title": "ã€ã³ã¹ããŒã«"
},
{
"paragraph_id": 19,
"tag": "p",
"text": "Pikeã®å¯Ÿè©±åã·ã§ã«ãèµ·åããã³ãŒããå®è¡ããããšãã§ããŸãã",
"title": "ã€ã³ã¹ããŒã«"
},
{
"paragraph_id": 20,
"tag": "p",
"text": "ãŸããPikeã§æžãããã¹ã¯ãªãããã¡ã€ã«ãå®è¡ããå Žåã¯ã以äžã®ããã«ãã¡ã€ã«åãæå®ããŠå®è¡ããŠãã ããã",
"title": "ã€ã³ã¹ããŒã«"
},
{
"paragraph_id": 21,
"tag": "p",
"text": "以äžã®ããã«ãPikeãããŠã³ããŒãããŠã€ã³ã¹ããŒã«ããã³ãã³ãã©ã€ã³ããèµ·åããããšãã§ããŸãã",
"title": "ã€ã³ã¹ããŒã«"
},
{
"paragraph_id": 22,
"tag": "p",
"text": "åã®ç¯ã§å®è¡ããããã°ã©ã ã解説ããŸãããã",
"title": "ã€ã³ã¹ããŒã«"
},
{
"paragraph_id": 23,
"tag": "p",
"text": "ãããã£ãŠããã®ããã°ã©ã ã®åºåã¯ã\"Hello world!\" ãšããæååã«æ¹è¡æåãç¶ãããã®ã«ãªããŸãã",
"title": "ã€ã³ã¹ããŒã«"
},
{
"paragraph_id": 24,
"tag": "p",
"text": "Pikeã¯ã€ã³ã¿ãŒããªã¿èšèªã§ãããããå€æ°ã«å®£èšãå¿
èŠãªããšæããããããããŸããã ããããPikeã§ã¯å€æ°å®£èšãå¿
é ã§ãããå€æ°ã®åãã³ã³ãã€ã«æã«æ±ºå®ããããããåå®å®æ§ãé«ããªããŸãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 25,
"tag": "p",
"text": "å€æ°ã宣èšããå Žåã以äžã®ããã«å®£èšããŸãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 26,
"tag": "p",
"text": "ããšãã°ãæŽæ°åã®å€æ°xã宣èšããåæå€ã«42ã代å
¥ããå Žåã次ã®ããã«ãªããŸãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 27,
"tag": "p",
"text": "Pikeã®å€æ°å®£èšã§ã¯ãååãçç¥ã§ããŸããããåæå€ã代å
¥ããªãå Žåã«ã¯ã次ã®ããã«å€æ°å®£èšãããããšãã§ããŸãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 28,
"tag": "p",
"text": "Pikeã«ã¯ããã€ãã®åºæ¬çãªããŒã¿åããããŸãã以äžã«ãããã説æããŸãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 29,
"tag": "p",
"text": "ãããã®åºæ¬çãªããŒã¿åã¯ãPikeããã°ã©ã ã§å€æ°ã宣èšããéã«äœ¿çšãããŸããäŸãã°ãint number_of_monkeys;ã¯æŽæ°åã®å€æ°number_of_monkeysã宣èšããŠããŸãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 30,
"tag": "p",
"text": "ãŸããåºæ¬çãªããŒã¿åã®ä»ã«ãã³ã³ããåãšåŒã°ããããŒã¿åããããŸããã³ã³ããåã¯ä»ã®ããŒã¿ãæ ŒçŽããããã®ããŒã¿åã§ãããé
å(array)ãããã(mapping)ããã«ãã»ãã(multiset)ãªã©ããããŸãããããã®ã³ã³ããåã¯è€éãªããŒã¿æ§é ãæ±ãããã«äœ¿çšãããŸãããåºæ¬çãªããŒã¿åãšåæ§ã«å€æ°ã宣èšããŠäœ¿çšããããšãã§ããŸãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 31,
"tag": "p",
"text": "ãŸããåºæ¬åã®å€æ°ã宣èšãããŠããŸãã以äžã®ãããªå€æ°ããããŸã:",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 32,
"tag": "p",
"text": "次ã«ãã³ã³ããåã®äœ¿çšäŸã瀺ãããŠããŸãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 33,
"tag": "p",
"text": "Pikeã§ã¯å€æ°ã¯å¿
ã宣èšãå¿
èŠãªããšã¯æ¢ã«è¿°ã¹ãŸããããåæåã¯å¿
é ã§ã¯ãããŸããã§ããã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 34,
"tag": "p",
"text": "ã§ã¯æªåæåã®å€ãåç
§ãããšã©ããªãã§ããã?",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 35,
"tag": "p",
"text": "æŽæ°åå€æ°iã®æªåæåã®å€ã0ã§ããç¹ã¯ãšããããä»ã®åã®å€æ°ãå
šãŠæŽæ°åã®0ãå
¥ã£ãŠããŸãã æªåæåã®å Žåãã§ããããªå€ãå
¥ãããšã¯åé¡ã§ãããããã£ãœãå€ãå
¥ã£ãŠãããšåæåå¿ããçºèŠããããšãé
ããŸãã æŽæ°ã®0ã¯æ¯èŒç容æã«æ€æ»ã§ãããããåæåã®äžåãç°¡åã«çºèŠã§ããŸãã ããããªãããåæåãå¿
ãè¡ãç¿æ
£ã身ã«ã€ããããšãæãéèŠã§ãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 36,
"tag": "p",
"text": "ãŸãpike-9.x(éçºããŒãžã§ã³)ã§ã¯ãæ°ããåå auto ã®å°å
¥ãäºå®ãããåæšè«ãè¡ãããšãå¯èœã«ãªããŸãã åæšè«ã«ã¯åæåãå¿
é ãªã®ã§ãåæåå¿ããæžãäºãæåŸ
ã§ããŸãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 37,
"tag": "p",
"text": "Pikeã«ãããåæåã¯enumãšããããŒã¯ãŒããçšããŠå®çŸ©ãããŸãã以äžã¯ãç°¡åãªè²ã®åæåãå®çŸ©ããããã䜿çšããŠæååãåºåããããã°ã©ã ã®äŸã§ãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 38,
"tag": "p",
"text": "äžèšã®ããã°ã©ã ã§ã¯ãColorãšããåæåãå®çŸ©ãã3ã€ã®å®æ° REDãBLUEãGREEN ãå®çŸ©ããŠããŸãããã®åŸãmain()é¢æ°å
ã§Coloråã®å€æ°colorã宣èšããBLUEã§åæåããŠããŸããswitchæã䜿ã£ãŠcolorã®å€ã«ãã£ãŠåå²ãã該åœããæååãåºåããŠããŸãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 39,
"tag": "p",
"text": "enum ã¯ãPike 7.2.30 ã§è¿œå ãããŸããã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 40,
"tag": "p",
"text": "Pikeã«ãããŠãããã€ãã®é¢æ°ã¯ã³ãŒãäžã§1æåãŸãã¯2æåã§åŒã³åºãããšãã§ããã³ãŒããçãããããšãã§ããŸãã ãããã®é¢æ°ã¯æŒç®åãšåŒã°ããæ¢ã«ããããã®äŸã§ãã®åäœãèŠãŠããŸããã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 41,
"tag": "p",
"text": "æŒç®åã¯æ©èœã«åºã¥ããŠã«ããŽãªãŒã«åé¡ãããŸããã泚æãå¿
èŠã§ãããªããªããäžéšã®æŒç®åã«ã¯ãããããå±ããã«ããŽãªãŒã®ç¯å²ãè¶
ããæå³ãããããã§ãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 42,
"tag": "p",
"text": "以äžã¯æŽæ°ã«é¢ããæŒç®åã®äŸã§ãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 43,
"tag": "p",
"text": "以äžã¯æååã«é¢ããæŒç®åã®äŸã§ãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 44,
"tag": "p",
"text": "Pikeã®æŒç®åã®äžã«ã¯ãæ°åŠçãªæå³ããé¢ããå®çŸ©ã®ãã®ããããŸãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 45,
"tag": "p",
"text": "ãã®ããã°ã©ã ã§ã¯ãPikeã®æååã®/æŒç®åãšãé
åã®*æŒç®åã䜿ã£ãŠããŸãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 46,
"tag": "p",
"text": "ãŸããæåå str ã \"/\" (ã¹ããŒã¹) ã§åå²ããŠãarray(string) åã®å€æ° ary ã«ä»£å
¥ããŠããŸãã ãã®æŒç®ã«ãããary ã«ã¯ str ãåèªããšã«åå²ããæååã®é
åãæ ŒçŽãããŸãã äŸãã°ãary[0] ã«ã¯ \"The\" ãæ ŒçŽãããŸãã ãã®åäœã¯ãå€ãã®ã¹ã¯ãªããã£ã³ã°èšèªã®split()é¢æ°ã«çžåœããŸãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 47,
"tag": "p",
"text": "次ã«ãary ã®åèŠçŽ ã \", \" ã§çµåããŠãæ°ããæåå s2 ãäœæããŠããŸãã ãã®æŒç®ã«ãããs2 ã«ã¯ ary ã®åèŠçŽ ã \", \" ã§çµåãããæååãæ ŒçŽãããŸãã äŸãã°ãs2 ã«ã¯ \"The, quick, brown, fox, jumps, over, the, lazy, dog\" ãæ ŒçŽãããŸãã ãã®åäœã¯ãå€ãã®ã¹ã¯ãªããã£ã³ã°èšèªã®join()é¢æ°ã«çžåœããŸãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 48,
"tag": "p",
"text": "æåŸã«ãswrite é¢æ°ã䜿ã£ãŠãs2 ã®å
容ã衚瀺ããŠããŸãã write é¢æ°ã¯sprintf é¢æ°ã®æ©èœãå«ãã§ãããæå®ãããã©ãŒãããã«åŸã£ãŠãæååãçæããé¢æ°ã§ãã \"%O\\n\" ã¯ãæååãåºåãããã©ãŒãããæååã§ããã%O ã¯ãPike ã®ãªããžã§ã¯ããæååã«å€æããããã®å€æã¿ã€ãã§ãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 49,
"tag": "p",
"text": "ãPikeã§ã¯æŒç®åãé¢æ°ããšã¯ãPikeã«ãããŠæŒç®å (ããšãã° +, -, *, / ãªã©) ãåãªãèšå·ã§ã¯ãªããããããã察å¿ããé¢æ°ãšããŠå®çŸ©ãããŠãããšããããšãæããŸãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 50,
"tag": "p",
"text": "äŸãã°ã+ æŒç®åã¯ã2ã€ã®æ°å€ã足ãåãããããã«äœ¿ãããŸãããå®éã«ã¯ `+ é¢æ°ãšããŠå®çŸ©ãããŠããŸãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 51,
"tag": "p",
"text": "以äžã®ããã« `+ é¢æ°ã䜿ã£ãŠè¶³ãç®ãè¡ãããšãã§ããŸãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 52,
"tag": "p",
"text": "ãŸãã* æŒç®åãåæ§ã« `* é¢æ°ãšããŠå®çŸ©ãããŠããŸãã以äžã®ããã«ãæååã«å¯Ÿã㊠* é¢æ°ã䜿ã£ãŠãæå®ããåæ°ã ãç¹°ãè¿ããæ°ããæååãäœãããšãã§ããŸãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 53,
"tag": "p",
"text": "ãã®ããã«ãPikeã§ã¯æŒç®åãåãªãèšå·ã§ã¯ãªããããããã察å¿ããé¢æ°ãšããŠå®çŸ©ãããŠããŸãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 54,
"tag": "p",
"text": "ãã®ãããªé¢æ°ã®æ§è³ªããã€æŒç®åã®åã調ã¹ãŠã¿ãŸãããã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 55,
"tag": "p",
"text": "ãã®ã³ãŒãã¯ãPikeã§é¢æ°ãå®çŸ©ããŠåŒã³åºãæ¹æ³ã瀺ããŠããŸãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 56,
"tag": "p",
"text": "æåã«ã`+ é¢æ°ã f ãšããå€æ°ã«ä»£å
¥ããŠããŸãããã㧠+ ã¯ãå ç®æŒç®å \"+\" ã«å¯Ÿå¿ããé¢æ°ã§ãããã®åŸãf ã«æž¡ãåŒæ°ãæå®ããŠãf é¢æ°ãåŒã³åºããŠããŸãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 57,
"tag": "p",
"text": "次ã«ãf ã«å¥ã®é¢æ°ã代å
¥ããŠããŸããããã§ã¯ãã©ã ãåŒã䜿ã£ãŠãäžãããã2ã€ã®åŒæ°ãæãåãããé¢æ°ãå®çŸ©ããŠããŸãããã®åŸãf é¢æ°ãå床åŒã³åºããŠãæ°ããé¢æ°ãæ£ããåäœããŠããããšã確èªããŠããŸãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 58,
"tag": "p",
"text": "Pikeã§ã¯ãé¢æ°ãå€æ°ã«ä»£å
¥ããããšãã§ãããããåçã«é¢æ°ãåãæ¿ããããšãã§ããŸãããã®æ©èœã䜿ãããšã§ãããã°ã©ã ã®æè»æ§ãé«ããããšãã§ããŸãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 59,
"tag": "p",
"text": "Pikeã«ãããã©ã ãé¢æ°ãšã¯ãç¡åã®é¢æ°ãå®çŸ©ããããã®æ¹æ³ã®äžã€ã§ããã©ã ãé¢æ°ãå®çŸ©ããã«ã¯ãlambda ããŒã¯ãŒãã䜿ããŸãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 60,
"tag": "p",
"text": "äŸãã°ã以äžã®ãã㪠lambda é¢æ°ãå®çŸ©ããŠã¿ãŸãããã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 61,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãlambda ããŒã¯ãŒãã䜿ã£ãŠãåŒæ°ãšããŠæŽæ° x ãåãåããx * x ãè¿ã square é¢æ°ãå®çŸ©ããŠããŸãã ãã®åŸãsquare(3) ã®ããã«ããŠãåŒæ°ãšããŠæŽæ° 3 ãæž¡ã㊠square é¢æ°ãåŒã³åºããŠããŸãã ãã®åŒã³åºãã«ãã£ãŠã9 ãè¿ãããŸãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 62,
"tag": "p",
"text": "é
åã®èŠçŽ ããšã«æäœãè¡ãããã«ãmap()ã«ã¯äŸ¿å©ãªæ§æããããŸãããã®æ§æã䜿çšããããšã§ãã³ãŒããããèªã¿ãããããããšãã§ããŸãã",
"title": "å€æ°ãšå"
},
{
"paragraph_id": 63,
"tag": "p",
"text": "å®æ°ã¯ãããã°ã©ãã³ã°ã«ãããŠç¹å®ã®å€ã«ååãä»ããããã«äœ¿ããããã®ã§ãäžåºŠå®çŸ©ãããããã®å€ãå€æŽããããšãã§ããŸããã",
"title": "å®æ°"
},
{
"paragraph_id": 64,
"tag": "p",
"text": "æ§æã¯ä»¥äžã®ããã§ãã",
"title": "å®æ°"
},
{
"paragraph_id": 65,
"tag": "p",
"text": "Pikeèšèªã§ã¯ãå®æ°ã¯åæå€ããã®åæšè«ãè¡ããŸããã€ãŸããå®æ°ã®åã¯åæå€ã«åºã¥ããŠèªåçã«æ±ºå®ãããŸããå€æ°ãšã¯ç°ãªããæ瀺çãªå宣èšã¯å¿
èŠãããŸããã",
"title": "å®æ°"
},
{
"paragraph_id": 66,
"tag": "p",
"text": "Pikeã®sprintf()ã¯ãæååããã©ãŒãããããããã®é¢æ°ã§ãã write()ãsprintf()ãšåãæžåŒæååã䜿ã£ãŠãã©ãŒãããåºæ¥ãŸãã",
"title": "sprinf() ã®æžåŒæåå"
},
{
"paragraph_id": 67,
"tag": "p",
"text": "ãã®ããã°ã©ã ã¯ãPikeã§writeé¢æ°ã䜿çšããŠãæ°å€ãæååãããã³æŽæ°ã®ãã©ãŒããããè¡ãæ¹æ³ã瀺ããŠããŸãã",
"title": "sprinf() ã®æžåŒæåå"
},
{
"paragraph_id": 68,
"tag": "p",
"text": "æåã®äŸã§ã¯ã%dãš%fã䜿çšããŠãæŽæ°ãšæµ®åå°æ°ç¹æ°ããã©ãŒãããããŠããŸãã %fã§ã¯ãå°æ°ç¹ä»¥äž4æ¡ãŸã§è¡šç€ºããããã«æå®ãããŠããŸãã",
"title": "sprinf() ã®æžåŒæåå"
},
{
"paragraph_id": 69,
"tag": "p",
"text": "次ã®äŸã§ã¯ã%sã䜿çšããŠãæååããã©ãŒãããããŠããŸãã writeé¢æ°ã䜿çšããããšã§ãåã蟌ãæååãåçã«å€æŽããããšãã§ããŸãã",
"title": "sprinf() ã®æžåŒæåå"
},
{
"paragraph_id": 70,
"tag": "p",
"text": "次ã«ãæåå¹
ã®æå®ã«ã€ããŠèª¬æããŸããæåå¹
ãæå®ããã«ã¯ã%sã®åã«%10sã®ããã«æ°åãå
¥ããŸãã ããã¯ã衚瀺ããæååãå ããå¹
ãæå®ãããã®ã§ãã ãŸãã%-10sã®ããã«-ãä»ãããšãå·Šæãã«ãªããŸãã %10sã§ã¯å³æãã«ãªããŸãããæå®ããæååãå ããå¹
ãããé·ãå Žåã¯ãæååã®å³ç«¯ããåãæšãŠãããŸãã %|10sã§ã¯äžå€®æãã«ãªããŸãã",
"title": "sprinf() ã®æžåŒæåå"
},
{
"paragraph_id": 71,
"tag": "p",
"text": "æåŸã«ã笊å·ãšä¿®é£Ÿåã®äœ¿çšã«ã€ããŠèª¬æããŸãã%+dã䜿çšãããšã笊å·ãä»ããŠæŽæ°ããã©ãŒãããããããšãã§ããŸãã %0*dã䜿çšãããšãæŽæ°ãæå®ããæ¡æ°ã«ãªãããã«0ã§ããã£ã³ã°ããŠè¡šç€ºããããšãã§ããŸãã",
"title": "sprinf() ã®æžåŒæåå"
},
{
"paragraph_id": 72,
"tag": "p",
"text": "ããããã®writeé¢æ°ã®äœ¿çšäŸãå®è¡ããéã«åŸãããåºåã¯ãã³ã¡ã³ãã®åŸã«ç€ºãããŠããŸãã",
"title": "sprinf() ã®æžåŒæåå"
},
{
"paragraph_id": 73,
"tag": "p",
"text": "sprintf()é¢æ°ã¯ãæžåŒæååãšããç¹æ®ãªæååãåãåããããã解éããŠæååãäœæããŸãã",
"title": "sprinf() ã®æžåŒæåå"
},
{
"paragraph_id": 74,
"tag": "p",
"text": "æžåŒæååã¯ãåºåããæååå
ã§ç¹å®ã®å€ã眮ãæããããã«äœ¿çšãããŸããæžåŒæååã¯ã%ã«ç¶ãæåã§å§ãŸããç¹å®ã®åœ¢åŒã§åŒæ°ãåãåãããšãã§ããŸããããšãã°ã%dã¯æŽæ°ã®æžåŒæååã§ããã%sã¯æååã®æžåŒæååã§ãã",
"title": "sprinf() ã®æžåŒæåå"
},
{
"paragraph_id": 75,
"tag": "p",
"text": "æžåŒæååã«ã¯ãå€æã¿ã€ã( conversion type )ã«ä¿®é£Ÿå( params )ãè¿œå ããããšãã§ããŸãã修食åã¯ãæžåŒæååã«å¯ŸããŠåäœãå€æŽããããã«äœ¿çšãããå€æã¿ã€ãã¯ãåºåã®åœ¢åŒãå¶åŸ¡ããããã«äœ¿çšãããŸããå€æã¿ã€ããšä¿®é£Ÿåã¯ã%ã®åŸã«ç¶ããŠæå®ããããšãã§ããŸãã",
"title": "sprinf() ã®æžåŒæåå"
},
{
"paragraph_id": 76,
"tag": "p",
"text": "å€æã¿ã€ãã¯ãçç¥ã§ããå¿
ã1ã€ã ãæå®ããŸãã",
"title": "sprinf() ã®æžåŒæåå"
},
{
"paragraph_id": 77,
"tag": "p",
"text": "修食åã¯çç¥ã§ããŸãã",
"title": "sprinf() ã®æžåŒæåå"
},
{
"paragraph_id": 78,
"tag": "p",
"text": "ãã®ç« ã§ã¯ãPikeã®ãã¹ãŠã®å¶åŸ¡æ§é ã«ã€ããŠèª¬æããŸããå¶åŸ¡æ§é ã¯ãããã°ã©ã ã®å®è¡ãããŒãå¶åŸ¡ããããã«äœ¿çšãããŸãã ãã ããããã°ã©ã ãäžæåæ¢ãããé¢æ°ãåçŽãªé¢æ°åŒã³åºãã¯ãããã§ã¯å¶åŸ¡æ§é ãšã¯èŠãªãããŸããã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 79,
"tag": "p",
"text": "æ¡ä»¶åå²ã¯ããã¹ãæ¡ä»¶ãäžããããå®è¡ããã³ãŒããéžæããå¶åŸ¡æ§é ã§ãã ãããã¯ããã€ããªã®ãå®è¡ãããããªããããããå
¥åãã©ã¡ãŒã¿ã«åºã¥ããŠå®è¡ããã³ãŒããéžæãã倧èŠæš¡ãªã³ãŒãè¡šãŸã§ãããŸããŸã§ãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 80,
"tag": "p",
"text": "æãåçŽãªæ¡ä»¶åå²ã¯ãifæã§ããifæã¯ãæãæåŸ
ãããã©ãã«ã§ãæžãããšãã§ãã次ã®ããã«èŠããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 81,
"tag": "p",
"text": "ã«ãã³ã®åŸããelseã®åŸãã«ã¯ã»ãã³ãã³ããªãããšã«æ³šæããŠãã ãããifæã®åŠçã¯æ¬¡ã®ããã«è¡ãããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 82,
"tag": "p",
"text": "èŠããã«ãæ¡ä»¶åŒãtrueã®å Žåã¯æ1ãå®è¡ããããã以å€ã®å Žåã¯æ2ãå®è¡ãããŸãã æ¡ä»¶åŒãfalseã®å Žåã«äœããå®è¡ããå¿
èŠããªãå Žåã¯ãelseéšåãå
šãŠçç¥ããããšãã§ããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 83,
"tag": "p",
"text": "éã«ãæ¡ä»¶åŒãfalseã®å Žåã«äœããè©äŸ¡ããå¿
èŠããªãå Žåã¯ãnotæŒç®åã䜿çšããŠåŒã®true/falseå€ãå転ããå¿
èŠããããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 84,
"tag": "p",
"text": "ããã«ããæã¯ããã®ç« ã®æ®ãã®æãšåæ§ã«ãæã®ãããã¯ã§ããå ŽåããããŸãããããã¯ãšã¯ãã»ãã³ãã³ã§åºåãããæã®ãªã¹ãã§ãäžæ¬åŒ§ { } ã§å²ãŸããŠããŸãã泚æç¹ãšããŠããããã¯ã®åŸãã«ã¯ã»ãã³ãã³ãã€ããªãã§ãã ãããäžèšã®äŸã¯æ¬¡ã®ããã«ãªããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 85,
"tag": "p",
"text": "ãŸããè€æ°ã®ifæãé çªã«é
眮ããŠãæåã®åŒãfalseã§ããå Žåã¯ã次ã®åŒã次ã®åŒãªã©ãç¶ããŠãæåã®trueåŒãèŠã€ãããŸã§ç¶ããããšãã§ããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 86,
"tag": "p",
"text": "äžèšã®äŸã®ç¹æ®ãªå Žåã¯ãååŒã§1ã€ã®å€æ°ãç°ãªãå€ãšæ¯èŒããå Žåã§ãã ãã®ãããªã¢ããªã±ãŒã·ã§ã³ã§ã¯ãäžèšã§èª¬æããswitchæã䜿çšããŠããã©ãŒãã³ã¹ãåäžãããã³ãŒããç°¡çŽ åããããšãã§ããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 87,
"tag": "p",
"text": "switchæã¯ãæ¡ä»¶ã«å¿ããŠè€æ°ã®éžæè¢ã®äžãã1ã€ãéžæããããã®ãããé«åºŠãªå¶åŸ¡æ§é ã§ãã以äžã®ãããªåœ¢åŒã«ãªããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 88,
"tag": "p",
"text": "switchæã¯ãifæãããå°ãè€éãªæ§é ãããŠããŸããããŸã ããªãåçŽã§ãã ãŸããåŒãè©äŸ¡ãã次ã®ãããã¯å
ã®å
šãŠã®caseæãæ€çŽ¢ããŸãã åŒã«ãã£ãŠè¿ãããå€ãšçãããã®ãèŠã€ããã°ãPikeã¯ãã®caseæã®çŽåŸã«ç¶ãã³ãŒããå®è¡ãç¶ããŸãã breakãåºçŸãããšãPikeã¯ã¹ã€ãããããã¯ã®æ®ãã®ã³ãŒããã¹ããããããããã¯ã®åŸã«ç¶ãã³ãŒããå®è¡ããŸãã 次ã®caseæã®åã«breakããªããŠããå¿
ãããå³å¯ã«å¿
èŠã§ã¯ãããŸããã 次ã®caseæã®åã«breakããªãå ŽåãPikeã¯åã«å®è¡ãç¶ãããã®caseæã®çŽåŸã®ã³ãŒããå®è¡ããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 89,
"tag": "p",
"text": "äžèšã®äŸã®caseæã®1ã€ã¯ãç¯å²ã§ãããšããç¹ã§ç°ãªããŸãã ãã®å Žåãå®æ°3ãšå®æ°4ã®éã®ä»»æã®å€ãæ3ã«ãžã£ã³ãããããã«ãªããŸãã ç¯å²ã¯ãå®æ°3ãšå®æ°4ã®å€ãå«ãããšã«æ³šæããŠãã ããã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 90,
"tag": "p",
"text": "å埩ã¯ãã³ãŒãã0å以äžå®è¡ããããã«äœ¿çšãããŸããããã¯ãããªãç°ãªãæ¹æ³ã§å®è¡ã§ããããã4ã€ã®ç°ãªãå埩å¶åŸ¡æ§é ããããŸãããããã¯ãã¹ãŠéåžžã«äŒŒãŠããããã«èŠãããããããŸããããé©åãªæã«é©åãªãã®ã䜿çšãããšãã³ãŒãã¯çããã·ã³ãã«ã«ãªããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 91,
"tag": "p",
"text": "whileã¯ãã«ãŒãå¶åŸ¡æ§é ã®äžã§æãã·ã³ãã«ãªãã®ã§ããelseã®éšåãé€ããifæã®ããã«èŠããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 92,
"tag": "p",
"text": "åäœæ¹æ³ã®éãã¯å€§ãããªããããåŒãçã®å Žåã«æãå®è¡ãããŸãã ãã®åŸãåŒãåè©äŸ¡ãããçã§ããã°æãå床å®è¡ãããŸãã ããããåŒãå床è©äŸ¡ããç¹°ãè¿ããŸã... 以äžã¯äœ¿çšäŸã§ãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 93,
"tag": "p",
"text": "ããã«ãããshow_recordã1ã2ã3ã4ã®å€ã§åŒã³åºãããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 94,
"tag": "p",
"text": "forã¯ãåã«whileã®æ¡åŒµã§ããã«ãŒããããçããã³ã³ãã¯ãã«æžãããã®æ¹æ³ãæäŸããŸããæ§æã¯ä»¥äžã®ããã«ãªããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 95,
"tag": "p",
"text": "forã¯ã以äžã®æé ãå®è¡ããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 96,
"tag": "p",
"text": "ããã«ãããwhileã»ã¯ã·ã§ã³ã®äŸã¯æ¬¡ã®ããã«æžãããšãã§ããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 97,
"tag": "p",
"text": "do-whileã¯ãwhileãšäŒŒãŠããŸãããå¿
ãäžåºŠã¯æãå®è¡ããããšãç°ãªããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 98,
"tag": "p",
"text": "åäœæ¹æ³ã®éãã¯å€§ãããªããããåŒãçã®å Žåã«æãå®è¡ãããŸãã ãã®åŸãåŒãåè©äŸ¡ãããçã§ããã°æãå床å®è¡ãããŸãã ããããåŒãå床è©äŸ¡ããç¹°ãè¿ããŸã... 以äžã¯äœ¿çšäŸã§ãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 99,
"tag": "p",
"text": "ããã«ãããshow_recordã100ã§åŒã³åºãããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 100,
"tag": "p",
"text": "foreachã¯ãã«ãŒãå
ã®åå埩ã«å¯ŸããŠæ瀺çãªãã¹ãåŒãè©äŸ¡ããªãç¹ã§ãŠããŒã¯ã§ãã 代ããã«ãforeachã¯ã»ããå
ã®åèŠçŽ ã«ã€ããŠ1åã ãæãå®è¡ããŸããforeachã«ã¯2ã€ã®æ§æããããæåã®æ§æã¯æ¬¡ã®ããã«ãªããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 101,
"tag": "p",
"text": "foreachãè¡ãããšã¯ä»¥äžã®éãã§ãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 102,
"tag": "p",
"text": "Pike-7.4.10 ãã foreach ã«æ°ããæ§æãè¿œå ãããŸããã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 103,
"tag": "p",
"text": "äžèšã®ã«ãŒãå¶åŸ¡æ§æã¯ããã¹ãŠã®åé¡ã解決ããã®ã«ååã§ããããã¹ãŠã®åé¡ã«ç°¡åãªè§£æ±ºçãæäŸããã«ã¯äžååã§ãã ã«ãŒãã®éäžã§æãåºãããšãã§ããæ©èœãäžè¶³ããŠããŸãããããè¡ãæ¹æ³ã¯3ã€ãããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 104,
"tag": "p",
"text": "breakæã¯ãã«ãŒããswitchæã®äžã§äœ¿çšããããã®ãããã¯ããæãåºããŸãã以äžã¯ãbreakæã®æ§æãšäŸã§ãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 105,
"tag": "p",
"text": "æ¡ä»¶åŒãçã§ããéããã«ãŒãåŠçãç¹°ãè¿ããŸããããããifæã®æ¡ä»¶åŒãçã«ãªã£ãå Žåãbreakæãå®è¡ãããwhileã«ãŒãããæãåºããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 106,
"tag": "p",
"text": "continueæã¯ãã«ãŒãå
ã§äœ¿çšããããã®æç¹ã§ã®åŠçãäžæãã次ã®ã«ãŒãåŠçãéå§ããŸãã以äžã¯ãcontinueæã®æ§æãšäŸã§ãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 107,
"tag": "p",
"text": "æ¡ä»¶åŒãçã§ããéããã«ãŒãåŠçãç¹°ãè¿ããŸããããããifæã®æ¡ä»¶åŒãçã«ãªã£ãå Žåãcontinueæãå®è¡ãããã«ãŒãã®å
é ã«æ»ã£ãŠã次ã®ã«ãŒãåŠçãéå§ããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 108,
"tag": "p",
"text": "returnæã¯ãé¢æ°å
ã§äœ¿çšããããã®æç¹ã§ã®åŠçãçµäºããé¢æ°ããå€ãè¿ããŸãã以äžã¯ãreturnæã®æ§æãšäŸã§ãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 109,
"tag": "p",
"text": "my_funcé¢æ°å
ã§ãxãšyãåãåããŸããifæã®æ¡ä»¶åŒãçã®å Žåã0ãè¿ããŸãããã以å€ã®å Žåã¯ãxãšyã®åèšå€ãè¿ããŸããreturnæãå®è¡ããããšãé¢æ°å
ã®åŠçã¯çµäºããé¢æ°ããå€ãè¿ãããŸãã",
"title": "å¶åŸ¡æ§é "
},
{
"paragraph_id": 110,
"tag": "p",
"text": "é¢æ°ã¯ãPikeããã°ã©ã ã®äž»èŠãªæ§æèŠçŽ ã®1ã€ã§ãããè€æ°ã®æäœããŸãšããŠå®è¡ããããã«äœ¿çšãããŸããPikeã§ã®é¢æ°ã®åºæ¬çãªæŠå¿µã¯ãä»ã®å€ãã®ããã°ã©ãã³ã°èšèªãšåæ§ã«ãåŒæ°ãåãåããå®è¡å¯èœãªã³ãŒããããã¯ãå®çŸ©ããæ»ãå€ãè¿ãããšã§ãã",
"title": "é¢æ°"
},
{
"paragraph_id": 111,
"tag": "p",
"text": "",
"title": "é¢æ°"
},
{
"paragraph_id": 112,
"tag": "p",
"text": "Pikeã§ã¯ãé¢æ°ã®å®çŸ©ã®æ§æã¯ä»¥äžã®ããã«ãªããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 113,
"tag": "p",
"text": "åŒæ°ãªã¹ãã¯ããä»®åŒæ°å ä»®åŒæ°åãã®ãã¢ãã,ãã§åºåã£ã0å以äžã®ãªã¹ãã§ãã",
"title": "é¢æ°"
},
{
"paragraph_id": 114,
"tag": "p",
"text": "é¢æ°ã®åŒã³åºãã®æ§æã¯ä»¥äžã®ããã«ãªããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 115,
"tag": "p",
"text": "åŒæ°ãªã¹ãã¯ãå®åŒæ°ã¢ãã,ãã§åºåã£ã0å以äžã®ãªã¹ãã§ãã",
"title": "é¢æ°"
},
{
"paragraph_id": 116,
"tag": "p",
"text": "ããã§ã¯ãå€æ°ã«æ»å€ãä¿æããŠããŸãããåŒã®äžã®é
ã«é¢æ°ã䜿ã£ããããã®ãŸãŸä»ã®é¢æ°ã®å®åŒæ°ã«ãããããããšãå¯èœã§ãã",
"title": "é¢æ°"
},
{
"paragraph_id": 117,
"tag": "p",
"text": "äžèšã®ã³ãŒãã¯ãadd2ãšããé¢æ°ãå®çŸ©ãããã®é¢æ°ãmainé¢æ°ããåŒã³åºããŠããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 118,
"tag": "p",
"text": "add2é¢æ°ã¯ã2ã€ã®æŽæ° a ãš b ãåãåãããããã®å€ã足ããŠçµæãè¿ãé¢æ°ã§ãã",
"title": "é¢æ°"
},
{
"paragraph_id": 119,
"tag": "p",
"text": "mainé¢æ°ã§ã¯ãadd2(2, 3)ãåŒã³åºããŠããã®çµæãå€æ° n ã«æ ŒçŽããŠããŸãããã®å ŽåãåŒæ°ãšã㊠2 ãš 3 ãæž¡ããŠããã®ã§ãé¢æ°å
ã® a ã«ã¯ 2ãb ã«ã¯ 3 ãæž¡ãããŸããçµæãšããŠãadd2(2, 3) ã®è¿ãå€ã§ãã 5 ãå€æ° n ã«æ ŒçŽãããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 120,
"tag": "p",
"text": "æåŸã«ãwriteé¢æ°ã䜿ã£ãŠå€æ° n ã®å€ã衚瀺ããŠããŸããåºåçµæ㯠n = 5 ãšãªããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 121,
"tag": "p",
"text": "ãã®äŸã§ã¯ãé¢æ° add2 ãå®çŸ©ããŠåå©çšæ§ãé«ããmainé¢æ°ãããã®é¢æ°ãåŒã³åºããŠããŸããé¢æ°ã䜿ãããšã§ãåãåŠçãç¹°ãè¿ãæžãå¿
èŠããªããªããã³ãŒãã®ä¿å®æ§ãšå¯èªæ§ãåäžãããããšãã§ããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 122,
"tag": "p",
"text": "Pikeããã°ã©ãã³ã°ã§ã¯ãåŒæ°ã®é
åå±éãè¡ãããšãã§ããŸãã é
åå±éã¯ãf( @({ 2, 3 }) )ã®ããã«é
åã«ã@ããå眮ãããã®å Žåã¯f( 2, 3 )ãšåãæå³ã«ãªããŸãã é
åå±éã䜿ããšãé
åãåã
ã®åŒæ°ãšããŠé¢æ°ã«æž¡ãããšãã§ããŸãã以äžã«äŸã瀺ããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 123,
"tag": "p",
"text": "äžèšã®ã³ãŒãã¯ãadd2ãšããé¢æ°ã«é
åå±éã䜿çšããŠåŒæ°ãæž¡ãããã®çµæãå€æ°nã«æ ŒçŽããŠããŸãã pairãšããarray(int)åã®é
åã«ã¯2ã€ã®èŠçŽ ãå«ãŸããŠããããããã2ãš3ã§ãã",
"title": "é¢æ°"
},
{
"paragraph_id": 124,
"tag": "p",
"text": "add2(@pair)ã®éšåã§ã@æŒç®åã䜿çšããŠpairã®é
åå±éãè¡ã£ãŠããŸãã ããã«ãããadd2é¢æ°ã«ã¯2ãš3ã®2ã€ã®åŒæ°ãåå¥ã«æž¡ãããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 125,
"tag": "p",
"text": "add2é¢æ°ã§ã¯ãåŒæ°aãšbãåãåãããããã足ããçµæãè¿ããŠããŸãã ãã®çµæãå€æ°nã«æ ŒçŽãããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 126,
"tag": "p",
"text": "æåŸã«ãwriteé¢æ°ã䜿çšããŠå€æ°nã®å€ã衚瀺ããŠããŸããåºåçµæã¯n = 5ãšãªããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 127,
"tag": "p",
"text": "é
åå±éã䜿ãããšã§ãé
åã®èŠçŽ ãåå¥ã®åŒæ°ãšããŠé¢æ°ã«æž¡ãããšãã§ããŸããããã«ãããã³ãŒãã®èšè¿°ãç°¡æœã«ããæè»æ§ãé«ããããšãã§ããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 128,
"tag": "p",
"text": "éåžžã®é¢æ°ã¯ãåŒæ°ã®æ°ã¯äžå®ã§ãããåŒæ°ã®æ°ãå¯å€ã«ããããšãåºæ¥ãŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 129,
"tag": "p",
"text": "ä»®åŒæ°é
åã¯ãé
åã§åŒæ°ãªã¹ããšåãå
容ãå
¥ããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 130,
"tag": "p",
"text": "ãªããé
åå±éã¯å¯å€é·åŒæ°ãåãåãé¢æ°ã«å¯ŸããŠã䜿çšããããšãã§ããŸãã å¯å€é·åŒæ°ãæã€é¢æ°ã«é
åãæž¡ãå Žåããé
åå±éãè¡ã£ãŠå¯å€é·åŒæ°ãšããŠæž¡ãããšãã§ããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 131,
"tag": "p",
"text": "äžèšã®ã³ãŒãã¯ãå¯å€é·åŒæ°ãæã€sumé¢æ°ã«é
åå±éã䜿çšããŠåŒæ°ãæž¡ãããã®çµæãå€æ°nã«æ ŒçŽããŠããŸããaryãšããarray(int)åã®é
åã«ã¯1ãã10ãŸã§ã®æŽæ°ãå«ãŸããŠããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 132,
"tag": "p",
"text": "sum(@ary)ã®éšåã§ã@æŒç®åã䜿çšããŠaryã®é
åå±éãè¡ã£ãŠããŸããããã«ãããsumé¢æ°ã«ã¯1ãã10ãŸã§ã®10åã®åŒæ°ãåå¥ã«æž¡ãããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 133,
"tag": "p",
"text": "sumé¢æ°ã§ã¯ãå¯å€é·åŒæ°restãåãåãããããã®åŒæ°ãåèšããŠããŸããforeachã«ãŒãã䜿çšããŠãå¯å€é·åŒæ°restã®åèŠçŽ nã«ã¢ã¯ã»ã¹ãããããå€æ°xã«å ç®ããŠããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 134,
"tag": "p",
"text": "æåŸã«ãå€æ°xã®å€ãå€æ°nã«æ ŒçŽãããwriteé¢æ°ã䜿çšããŠè¡šç€ºããŠããŸããåºåçµæã¯n = 55ãšãªããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 135,
"tag": "p",
"text": "ãã®äŸã§ã¯ãå¯å€é·åŒæ°ãæã€é¢æ°ã«é
åå±éã䜿çšããããšã§ãé
åã®èŠçŽ ãåå¥ã®åŒæ°ãšããŠé¢æ°ã«æž¡ãããšãã§ããŸããå¯å€é·åŒæ°ã䜿çšããããšã§ãåŒæ°ã®æ°ãå¯å€çã§ããå Žåã§ãæè»ã«å¯Ÿå¿ããããšãã§ããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 136,
"tag": "p",
"text": "Pikeã§ã¯ãé¢æ°å
ã§èªå·±ãåŒã³åºãååž°çãªé¢æ°ãå®çŸ©ããããšãã§ããŸããããã«ãããå埩åŠçã䜿çšããã«åé¡ã解決ã§ããå ŽåããããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 137,
"tag": "p",
"text": "ããšãã°ã次ã®ãããªååž°çãªé¢æ°ãå®çŸ©ã§ããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 138,
"tag": "p",
"text": "ãã®é¢æ°ã¯ãäžããããæŽæ°nã®éä¹ãèšç®ããŸããååž°çåŒã³åºãã䜿çšããŠãnã0ã«ãªããŸã§ãnãã1ãã€åŒããŠãããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 139,
"tag": "p",
"text": "ããšãã°ã次ã®ããã«ãã®é¢æ°ãåŒã³åºãããšãã§ããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 140,
"tag": "p",
"text": "ãã®å Žåãresultã«ã¯120ãæ ŒçŽãããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 141,
"tag": "p",
"text": "ãæé»ã®ã©ã ããã¯ååŠçããã³/ãŸãã¯åŸåŠçãå¿
èŠãªã³ãŒããåã蟌ã䟿å©ãªæ¹æ³ã§ãã é¢æ°åŒã³åºãã§å§ãŸããçŽåŸã«ãã¬ãŒã¹ãããã¯ãç¶ãæã§ã¯ããããã¯ãã©ã ãé¢æ°ã«å€æãããåŒã³åºãããé¢æ°ã®æåŸã®åŒæ°ãšããŠæž¡ãããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 142,
"tag": "p",
"text": "timesãšããé¢æ°ãå®çŸ©ããŠããã®é¢æ°ã«åŒæ°ãšããŠå®è¡åæ°ãšãããã¯ãæž¡ãããããã¯ãæå®ãããåæ°åå®è¡ãããšããæ©èœãæã£ãŠããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 143,
"tag": "p",
"text": "mainé¢æ°ã§ã¯ãtimesé¢æ°ãåŒã³åºãã第1åŒæ°ã«3ãã第2åŒæ°ã«{ write(\"Hello world! <%d>\\n\", x++); }ãšããæé»ã®ã©ã ããæž¡ããŠããŸãããã®æé»ã®ã©ã ãã¯ãtimesé¢æ°å
ã§block()ãšãã圢åŒã§åŒã³åºãããŸããblock()ã®äžã§ã¯ãwriteé¢æ°ãçšããŠã\"Hello world! <x>\"ãšããã¡ãã»ãŒãžã衚瀺ããxã®å€ãã€ã³ã¯ãªã¡ã³ãããŠããŸãããããã£ãŠããã®ããã°ã©ã ã¯ã\"Hello world!\"ãšããã¡ãã»ãŒãžãšãããã«ç¶ãxã®å€ã瀺ãã¡ãã»ãŒãžã3å衚瀺ããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 144,
"tag": "p",
"text": "timesé¢æ°ããå¶åŸ¡ãæ»ã£ãåŸãmainé¢æ°ã¯ãwrite(\"Hello world! <%d>\\n\", x++);ã«ãã£ãŠã\"Hello world! <3>\"ãšããã¡ãã»ãŒãžã衚瀺ããxãã€ã³ã¯ãªã¡ã³ãããŸãããããã£ãŠããã®ããã°ã©ã ã¯ãåèšã§4åã®\"Hello world!\"ã¡ãã»ãŒãžã衚瀺ããxã®å€ã¯4ã«ãªããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 145,
"tag": "p",
"text": "ãã®ããã«ãé¢æ°åŒã³åºãã«ç¶ããããã¯ãåŒã³åºãå
ã®é¢æ°ã®é ããæåŸã®é¢æ°åŒæ°ãšãªãäŸã¯ãRubyãGroovyãKotlinãªã©ã«èŠãããšãåºæ¥ãŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 146,
"tag": "p",
"text": "éçºäžã® Pike-9.0 ã§ã¯ã__ARGS__ã䜿ã£ãŠæé»ã®ã©ã ããžåŒæ°ãæž¡ãããšãåºæ¥ãããã«ãªããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 147,
"tag": "p",
"text": "ã©ã ãåŒã¯å€éšã®å€æ° x ããã£ããã£ããã¯ããŒãžã£ãŒãšããŠæ©èœããŸããããã«ãããã©ã ãåŒå
㧠x ã®å€ãå€æŽããããšãã§ããŸãã ã¯ããŒãžã£ãŒã¯ãé¢æ°å
ã§å®çŸ©ãããå€æ°ãå«ãé¢æ°ãªããžã§ã¯ãã§ãããé¢æ°ãçµäºããŠããã®å€æ°ã®ã¹ã³ãŒããç¶æãããŸãã ãã®äŸã§ã¯ãtimes é¢æ°å
ã§å®çŸ©ããã i ãš main é¢æ°å
ã§å®çŸ©ããã x ã®2ã€ã®å€æ°ãååšããã©ã ãåŒã x ããã£ããã£ããŠå€æŽããŠããŸãã ããã«ãããã©ã ãåŒãçµäºããåŸã§ã x ã®å€ãä¿æã§ããŸãã",
"title": "é¢æ°"
},
{
"paragraph_id": 148,
"tag": "p",
"text": "Pikeã§ã¯ãåã¯2ã€ã®ç°ãªãã³ã³ããã¹ãã§äœ¿çšãããŸããã³ã³ãã€ã«æãšå®è¡æã§ããäžéšã®åã¯ã³ã³ãã€ã«æã®ã¿äœ¿çšãããŸã(voidãmixedãããã³ãã¹ãŠã®æ§é å)ããã®ä»ã®ãã¹ãŠã®åã¯å®è¡æã«ã䜿çšãããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 149,
"tag": "p",
"text": "Pikeã«ã¯ãåºæ¬åãšãã€ã³ã¿åã®2ã€ã®çš®é¡ã®å®è¡æããŒã¿åããããŸããåºæ¬åã¯å€æ°ã«å²ãåœãŠããããšãã«ã³ããŒãããŸããããã€ã³ã¿åã¯åã«ãã€ã³ã¿ãã³ããŒããããããåããã®ãæã2ã€ã®å€æ°ãåŸãããŸãããã€ã³ã¿åã¯ãarrayãmappingãmultisetãprogramãobjectãããã³functionã®6ã€ããããŸãããããã¯ãã¹ãŠãã€ã³ã¿åã§ãããã¡ã¢ãªäžã®äœããæããŸãããã®ãäœããã¯ãããã«å¯Ÿãããã€ã³ã¿ããããªãå Žåã«è§£æŸãããŸããå€æ°ã«ãã€ã³ã¿åã®å€ãå²ãåœãŠãå Žåããã®ãäœããã¯ã³ããŒãããŸããã代ããã«ãããã«å¯Ÿããæ°ããåç
§ãçæãããŸãããããã®åã®ãããããé¢æ°ã®åŒæ°ãšããŠæž¡ãå Žåãé¢æ°ããäœãããå€æŽããå¯èœæ§ããããããç¹å¥ãªæ³šæãå¿
èŠã§ãããã®å¹æãæãŸãªãå Žåã¯ãå€ãæ瀺çã«ã³ããŒããå¿
èŠããããŸããåŸè¿°ããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 150,
"tag": "p",
"text": "æŽæ°ã䜿çšããå Žåã¯ãããŒã¯ãŒãintã䜿çšããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 151,
"tag": "p",
"text": "æµ®åå°æ°ç¹æ°ã䜿çšããå Žåã¯ãããŒã¯ãŒãfloatã䜿çšããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 152,
"tag": "p",
"text": "æååã䜿çšããå Žåã¯ãããŒã¯ãŒãstringã䜿çšããŸãã æååã¯ãäºéåŒçšç¬Šã§å²ãŸããæååãªãã©ã«ã䜿çšããŠè¡šããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 153,
"tag": "p",
"text": "ãã®ç¯ã§ã¯ããã€ã³ã¿åã«ã€ããŠèª¬æãããŠããŸããåºæ¬åã¯éåžžã«åºæ¬çãªåã§ãããã»ãšãã©ã®ãã€ã³ã¿åã¯ãåºæ¬åãæ ŒçŽããèå³æ·±ãæ¹æ³ã§ãã ãã€ã³ã¿åã«ã¯ãé
åãé£æ³é
åããã«ãã»ãããããã°ã©ã ããªããžã§ã¯ããé¢æ°ããããŸãã ãããã¯ãã¹ãŠãã¡ã¢ãªå
ã®äœããæããã€ã³ã¿ã§ããããã€ã³ã¿ããªããªããšããã®ãäœããã¯è§£æŸãããŸãã ãã€ã³ã¿åã®å€ãå€æ°ã«ä»£å
¥ãããšããã®ãäœãããã³ããŒãããã®ã§ã¯ãªããããã«å¯Ÿããæ°ããåç
§ãçæãããŸãã é¢æ°ã«ãããã®åã®å€ãåŒæ°ãšããŠæž¡ãå Žåã«ã¯ãç¹å¥ãªæ³šæãå¿
èŠã§ãããé¢æ°ããäœãããå€æŽããå¯èœæ§ãããããããã®å¹æãæãŸãããªãå Žåã«ã¯ãæ瀺çã«å€ãã³ããŒããå¿
èŠããããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 154,
"tag": "p",
"text": "Pikeã§ã¯ãé
åã¯è€æ°ã®èŠçŽ ãæ ŒçŽããããã®ããŒã¿æ§é ã§ããé
åã¯ãã³ã³ãã§åºåãããèŠçŽ ã®ãªã¹ãã§åæåããããšãã§ããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 155,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãaãšããé
åãåæåãããèŠçŽ ãšããŠ2, 3, 7ãæ ŒçŽãããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 156,
"tag": "p",
"text": "é
åã®èŠçŽ ã«ã¢ã¯ã»ã¹ããã«ã¯ãé
ååã«è§æ¬åŒ§ã䜿çšããŠãã€ã³ããã¯ã¹ãæå®ããŸããäŸãã°ãa[0]ã¯é
åaã®æåã®èŠçŽ ãè¡šããŸããa[1]ã¯2çªç®ã®èŠçŽ ãa[2]ã¯3çªç®ã®èŠçŽ ãè¡šããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 157,
"tag": "p",
"text": "é
åã®èŠçŽ ã«å€ã代å
¥ããã«ã¯ãåæ§ã«è§æ¬åŒ§ã䜿çšããŠãã€ã³ããã¯ã¹ãæå®ãã代å
¥ããå€ãæå®ããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 158,
"tag": "p",
"text": "é
åã«èŠçŽ ãè¿œå ããã«ã¯ãé
åã®æåŸã«æ°ããèŠçŽ ãè¿œå ãã += æŒç®åã䜿çšããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 159,
"tag": "p",
"text": "foreach æã䜿ããšé
åèŠçŽ ãé ã«åŠçãè¡ãããšãåºæ¥ãŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 160,
"tag": "p",
"text": "foreachæã¯ãæå®ãããé
åã®åèŠçŽ ãé çªã«åãåºããã«ãŒããå®è¡ããããã®å¶åŸ¡æ§æã§ãããã®ããã°ã©ã ã§ã¯ãforeach(a, mixed e)ãšããæã§ãé
åaã®åèŠçŽ ãåãåºããŠããããeã«ä»£å
¥ããŠããŸããmixedã¯ãPikeã®ããŒã¿åã§ãä»»æã®åã®å€ãåãå
¥ããããšãã§ããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 161,
"tag": "p",
"text": "ifæã¯ãeã®åã«å¿ããŠãé©åãªåœ¢åŒã§è¡šç€ºããããã«ãæ¡ä»¶åå²ãè¡ããŸããintp(e)ãfloatp(e)ãstringp(e)ã¯ãããããeãæŽæ°ãæµ®åå°æ°ç¹æ°ãæååã§ãããã©ãããå€å®ããé¢æ°ã§ããeãæŽæ°ã§ããã°ã\"%d \"ãšãããã©ãŒãããæååã䜿çšããŠããã®æŽæ°ã衚瀺ããŸããeãæµ®åå°æ°ç¹æ°ã§ããã°ã\"%f \"ãšãããã©ãŒãããæååã䜿çšããŠããã®æµ®åå°æ°ç¹æ°ã衚瀺ããŸããeãæååã§ããã°ã\"\\\"%s\\\" \"ãšãããã©ãŒãããæååã䜿çšããŠããã®æååãããã«ã¯ã©ãŒããŒã·ã§ã³ã§å²ãã§è¡šç€ºããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 162,
"tag": "p",
"text": "æåŸã®elseç¯ã¯ãeãã©ã®åã«ã該åœããªãå Žåã«å®è¡ããã\"Unknown type\"ãšããæååã衚瀺ããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 163,
"tag": "p",
"text": "[TODO:ãã®ã³ãŒãã¯èŠçŽ ã«é
åãå«ãé
åã«å¯Ÿå¿ããŠããŸããã]",
"title": "ããŒã¿å"
},
{
"paragraph_id": 164,
"tag": "p",
"text": "Pikeã«ãããé£æ³é
åã¯ãããŒãšå€ã®ãã¢ã®éåãè¡šçŸããããŒã¿åã§ãããmappingãšããååã§å®çŸ©ãããŠããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 165,
"tag": "p",
"text": "é£æ³é
åã¯ãããŒãšå€ã®ãã¢ãè¿œå ããããšãã§ããŸããããŒã«ã¯æååãæŽæ°ãæµ®åå°æ°ç¹æ°ããªããžã§ã¯ããªã©ã䜿çšããããšãã§ããå€ã«ã¯ä»»æã®ããŒã¿åãæ ŒçŽããããšãã§ããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 166,
"tag": "p",
"text": "以äžã¯ãmappingã䜿çšãããµã³ãã«ã³ãŒãã§ãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 167,
"tag": "p",
"text": "ãã®ã³ãŒãã§ã¯ãmappingã䜿çšããŠãããŒãšå€ã®ãã¢ãæ ŒçŽããmã宣èšããããŒã«æååãæŽæ°ãé
åãªã©ã䜿çšããŠããŸãããŸããmã«æ°ããããŒãšå€ã®ãã¢ãè¿œå ããããã«ãm[\"key2\"] = \"value2\";ã®ããã«æžããŠããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 168,
"tag": "p",
"text": "foreachæã§ã¯ãmã®åèŠçŽ ãkãšvã«ä»£å
¥ããŠãwriteé¢æ°ãçšããŠãkãšvãé©åãªãã©ãŒãããã§æååã«å€æããwriteé¢æ°ã§åºåããŠããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 169,
"tag": "p",
"text": "äžèšã®ããã°ã©ã ã¯ã以äžã®ãããªåºåãçæããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 170,
"tag": "p",
"text": "mappingã¯ãé£æ³é
åãå®è£
ããããã®äž»èŠãªããŒã¿åã§ãããPikeã®æ§ã
ãªæ©èœã«äœ¿çšãããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 171,
"tag": "p",
"text": "Pikeã«ããããã«ãã»ããã¯ãèŠçŽ ã®éè€ãèš±ãããèŠçŽ ã®éåãè¡šçŸããããŒã¿åã§ãããmultisetãšããååã§å®çŸ©ãããŠããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 172,
"tag": "p",
"text": "ãã«ãã»ããã¯ãèŠçŽ ãè¿œå ããããšãã§ããåãèŠçŽ ãè€æ°åè¿œå ããããšãã§ããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 173,
"tag": "p",
"text": "Pikeã«ãããŠãããã°ã©ã ãšã¯C++ã«ãããã¯ã©ã¹ã«çžåœããŸãã ããã°ã©ã ã¯ããã®ããã°ã©ã ã«å®çŸ©ãããé¢æ°ãå€æ°ãã©ã®ããã«å®çŸ©ãããŠãããã®è¡šãä¿æããŸãã ãŸããã³ãŒãèªäœããããã°æ
å ±ãç¶æ¿ãããä»ã®ããã°ã©ã ãžã®åç
§ãä¿æããŸãã ãã ããããã°ã©ã èªäœã«ããŒã¿ãæ ŒçŽããã¹ããŒã¹ã¯ãããŸããã ããã°ã©ã å
ã®æ
å ±ã¯ããã¡ã€ã«ãŸãã¯æååãPikeã³ã³ãã€ã©ãééãããšãã«åéãããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 174,
"tag": "p",
"text": "次ã«è°è«ãããªããžã§ã¯ãã«æ ŒçŽããããã«å¿
èŠãªå€æ°ã¹ããŒã¹ã¯ããªããžã§ã¯ãã«æ ŒçŽãããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 175,
"tag": "p",
"text": "ããã°ã©ã ãæžãããšã¯ç°¡åã§ãããã°ã©ã ãã¡ã¢ãªã«ããŒãããã«ã¯ãcompile_fileããã£ã¹ãæŒç®åã䜿ãããšãã§ããŸãã ãã£ã¹ãæŒç®åã䜿çšããå Žåãããã°ã©ã ã¯ãã£ãã·ã¥ããã次å以éã¯åãããã°ã©ã ãè¿ãããŸãã ãŸããclassããŒã¯ãŒãã䜿çšãããšãããã°ã©ã ã®äžã«å¥ã®ããã°ã©ã ãæžãããšãã§ããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 176,
"tag": "p",
"text": "ããŒã¿é åãäœæããã«ã¯ãããã°ã©ã ãã€ã³ã¹ã¿ã³ã¹åããå¿
èŠãããããã€ã³ã¿ã䜿çšããŠãæ°ãããªããžã§ã¯ããäœæãããã®ãªããžã§ã¯ãå
ã®createé¢æ°ãåŒã³åºãããšã§å®çŸãããŸãã ãã¹ãŠã®ããã°ã©ã ã¯æååãã³ã³ãã€ã«ããŠçæãããŸãã ãã®ããã«ãcompileãcompile_fileãcompile_stringãšãã3ã€ã®é¢æ°ããããŸãã ãŸãããã£ã¹ãæŒç®åã䜿çšããããšãã§ããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 177,
"tag": "p",
"text": "==ã!=ã䜿çšããããšã§ã2ã€ã®ããã°ã©ã ãåããã©ããã確èªã§ããŸãã ãŸããp[args]ãp->identifierã®ãããªæŒç®åãé¢æ°ãéèŠã§ãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 178,
"tag": "p",
"text": "ããã°ã©ã ã¯ããŒã¿ãä¿åããå Žæãæãããã©ã®ããã«ããŒã¿ãä¿åãããã瀺ããŠããã ãã§ãããããããŒã¿ãä¿åããã«ã¯ãªããžã§ã¯ããå¿
èŠã§ãã ãªããžã§ã¯ãã¯ãããã°ã©ã ããè€è£œãããã¡ã¢ãªã®ãã£ã³ã¯ã§ãããè€æ°ã®ãªããžã§ã¯ãã1ã€ã®ããã°ã©ã ããäœæã§ããŸãã åãªããžã§ã¯ãã«ã¯ãç¬èªã®å€æ°ãããããã®ãªããžã§ã¯ãå
ã®é¢æ°ããããã®å€æ°ã§æäœãå®è¡ããŸãã ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã¯éåžžã«æè»ã§ãããŒã¿ã®ä¿åæ¹æ³ãå€æŽããŠãããªããžã§ã¯ãã®å€éšã«å€æŽãå ããå¿
èŠã¯ãããŸããã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 179,
"tag": "p",
"text": "ãªããžã§ã¯ãã®æååã«ããã€ã³ããã¯ã¹åã§ãæååããªããžã§ã¯ãå
ã®é¢æ°åã§ããå Žåãé¢æ°ãè¿ãããŸãã ãããããã®ååã«ãããããããé¢æ°ã¯å®éã«ã¯é¢æ°ãã€ã³ã¿ãŒã§ããé¢æ°ãã€ã³ã¿ãŒã¯ãä»ã®ããŒã¿åãšåãããã«æž¡ãããšãã§ããŸãã é¢æ°ãã€ã³ã¿ãŒã¯ãé¢æ°åãåŒæ°ãšããŠåãåãããã®é¢æ°ãæã瀺ããªããžã§ã¯ããšããã®é¢æ°ãå®è¡ããããã®é¢æ°ãã€ã³ã¿ãŒãè¿ãé¢æ°ãååšããŸãã ãŸããé¢æ°å
ã§å¥ã®é¢æ°ãå®çŸ©ããããã« lambda ããŒã¯ãŒãã䜿çšããããšãã§ããŸãã Pike ã§ã¯é¢æ°ã®ãªãŒããŒããŒãã¯ã§ããŸãããé¢æ°ãã€ã³ã¿ãŒã«ã¯ãé¢æ°ã®åŒã³åºããé¢æ°åã®ååŸãé¢æ°ãå®çŸ©ããããªããžã§ã¯ãã®ååŸãªã©ã®æ©èœããããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 180,
"tag": "p",
"text": "ã³ã³ãã€ã«æã®åã«ã¯ããvoidããšãmixedãã®2ã€ã®åããããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 181,
"tag": "p",
"text": "ãvoidãã¯ãå€ã®ååšãŸãã¯ãªãã·ã§ã³æ§ã瀺ãããã«äœ¿çšãããŸããé¢æ°ã®æ»ãå€ãšããŠäœ¿çšãããããšãå€ããé¢æ°ãå€ãè¿ããªãããšã瀺ããŸãããŸããé¢æ°ãã©ã¡ãŒã¿ã®åã»ããã®1ã€ãšããŠäœ¿çšãããããšãããããã®å Žåã¯ãåŒã³åºãå
ããã®ãã©ã¡ãŒã¿ãçç¥ããããšãã§ãããã®å Žåã¯ç¹æ®ãªå€UNDEFINEDã«ããã©ã«ãã§èšå®ãããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 182,
"tag": "p",
"text": "ãmixedãã¯ãä»»æã®åã®å€ãæž¡ãããšãã§ããå®éã®ã©ã³ã¿ã€ã ã§äœ¿çšãããå€ã®åãå®å
šã«äžæã§ããããšã瀺ãããã«äœ¿çšãããŸãããã®åã¯ãã³ã³ããã¯ã©ã¹ãå®è£
ããå Žå(ã¯ã©ã¹å
ã®ã³ãŒãã§å®éã®å€ãæäœãããªãå Žå)ããŸãã¯å®éã®ã³ã³ãã€ã«æã®åãè€éã«ãªããããå Žåã®äŸ¿å®çãªãã©ãŒã«ããã¯ãšããŠäœ¿çšãããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 183,
"tag": "p",
"text": "ãŸããåºæ¬åããã©ã¡ãŒã¿ãŒã§æå®ããŠåºæ¬åããµãã¿ã€ãåããããã¿ã€ããŠããªã³æŒç®å(|)ã䜿çšããŠè€æ°ã®ä»£æ¿åãæå®ããããšã§ãããç¹å®ã®ã³ã³ãã€ã«æã®åãæ§ç¯ããããšãã§ããŸãããã ããå®è¡æã®åã¯å®£èšãããã³ã³ãã€ã«æã®åãšç°ãªãå Žåãããããã泚æãå¿
èŠã§ãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 184,
"tag": "p",
"text": "å€æ°ã宣èšããéã«ã¯ãå€æ°ãã©ã®çš®é¡ã®å€æ°ã§ããããæå®ããå¿
èŠããããŸããintãstringãªã©ã®å€ãã®ã¿ã€ãã«å¯ŸããŠã¯ãéåžžã«ç°¡åã«æå®ã§ããŸããããããããèå³æ·±ãå€æ°ã®å®£èšæ¹æ³ããããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 185,
"tag": "p",
"text": "ããã€ãã®äŸãèŠãŠã¿ãŸãããã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 186,
"tag": "p",
"text": "ãããã®äŸãèŠããšãåãæå®ããèå³æ·±ãæ¹æ³ãããããšãããããŸãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 187,
"tag": "p",
"text": "以äžã¯å¯èœãªãã®ã®ãªã¹ãã§ãã",
"title": "ããŒã¿å"
},
{
"paragraph_id": 188,
"tag": "p",
"text": "Pikeã³ãŒãã¯ã³ã³ãã€ã©ã«éä¿¡ãããåã«ãããªããã»ããµãçµç±ããŸãã ããªããã»ããµã¯ããœãŒã¹ã³ãŒããPikeå
éšè¡šçŸã«å€æããããã€ãã®ã·ã³ãã«ãªæ£èŠåãšæŽåæ§ãã§ãã¯ãå®è¡ããããã°ã©ãããã¡ã€ã«ã«å
¥åãããããªããã»ããµãã£ã¬ã¯ãã£ãããå®è¡ããŸãã ããªããã»ããµãã£ã¬ã¯ãã£ãã¯ãåçŽãªã³ãŒãçæãšæäœã蚱容ããéåžžã«åçŽãªããã°ã©ãã³ã°èšèªã®ãããªãã®ã§ãã ã³ãŒãããªããã»ããµã¯ãPikeå
ã§cppåŒã³åºãã«ãã£ãŠåŒã³åºãããšãã§ããŸãã",
"title": "ããªããã»ããµ"
},
{
"paragraph_id": 189,
"tag": "p",
"text": "ããªããã»ããµã¯ããã¡ã€ã«ã®æåãšã³ã³ãŒãã£ã³ã°ã決å®ããå¿
èŠããããããæåã«2ã€ã®ãã€ãã調ã¹ããã®è¡šã«åŸã£ãŠè§£éããŸãã ãã€ã0ãšãã€ã1ã®çµã¿åããã«å¯ŸããŠããã®ä»ã®ãã€ãã«ã€ããŠã¯ã#charsetãã£ã¬ã¯ãã£ããèŠã€ãããŸã§iso-8859-1ãšã³ã³ãŒãã£ã³ã°ãšããŠæ±ãããŸãã EBCDICã§æžãããããã°ã©ã ã§#charsetãã£ã¬ã¯ãã£ããçç¥ãããŠããå Žåã¯ãšã©ãŒã«ãªããŸãã#charsetãã£ã¬ã¯ãã£ãããšã³ã³ãŒãããããšãå¯èœã§ãã",
"title": "ããªããã»ããµ"
},
{
"paragraph_id": 190,
"tag": "p",
"text": "ããªããã»ããµã¯ãæåå以å€ã®é£ç¶ãã空çœæåãæ¹è¡ä»¥å€ã¯åäžã®ç©ºçœæåã«å€æãããã¹ãŠã®//ã/***/ã³ã¡ã³ãã#!è¡ãåé€ããŸãã Pikeã¯ANSI/DECãšã¹ã±ãŒãã·ãŒã±ã³ã¹ã空çœãšããŠæ±ããŸãã",
"title": "ããªããã»ããµ"
},
{
"paragraph_id": 191,
"tag": "p",
"text": "å®çŸ©ã«ç¹å®ã®å€ãèšå®ããããšãã§ãããã®å€ã¯ãœãŒã¹ã³ãŒãå
ã®å®çŸ©ã眮ãããå Žæã«æ¿å
¥ãããŸãã ãã¯ãã«ã¯æ倧254åã®åŒæ°ããããŸãã",
"title": "ããªããã»ããµ"
},
{
"paragraph_id": 192,
"tag": "p",
"text": "",
"title": "ããªããã»ããµ"
},
{
"paragraph_id": 193,
"tag": "p",
"text": "Pikeã¯ãªããžã§ã¯ãæåããã°ã©ãã³ã°(OOP)ããµããŒãããŠãããPikeã®OOPæ©èœã䜿ãããšã§ããã°ã©ã ã®ã¢ãžã¥ãŒã«åãåå©çšæ§ã®åäžãå¯èœã«ãªããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 194,
"tag": "p",
"text": "ã¯ã©ã¹ã¯ãªããžã§ã¯ãã®èšèšå³ã§ããããªããžã§ã¯ãã¯ãã®ã¯ã©ã¹ã®å®äœã§ããã¯ã©ã¹ã¯ããã®ã¯ã©ã¹ãæã€å±æ§(ãã£ãŒã«ã)ãšæäœ(ã¡ãœãã)ãå®çŸ©ããŸãããªããžã§ã¯ãã¯ããã®ã¯ã©ã¹ãæã€å±æ§ã®å€ãšããã®ã¯ã©ã¹ãå®çŸ©ããæäœãå®è¡ããããšãã§ããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 195,
"tag": "p",
"text": "ãã®äŸã§ã¯ãã¯ã©ã¹å®çŸ©ã®äŸãšããŠã人ç©ã®ã¯ã©ã¹ãäœæãããŠããŸããã¯ã©ã¹å®çŸ©ã¯ãclassããŒã¯ãŒãã§å§ãŸããæ³¢æ¬åŒ§ { } ã§å²ãŸããã¡ã³ãå€æ°ãšã¡ãœããã®å®çŸ©ãå«ã¿ãŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 196,
"tag": "p",
"text": "ã¯ã©ã¹ã®ã¡ã³ãå€æ°ã¯ãåãªããžã§ã¯ãã«1ã€ãã€ååšããŸãããã®äŸã§ã¯ã人ç©ã®ååãè¡šãæåååã®å€æ°nameãšå¹Žéœ¢ãè¡šãæŽæ°åã®å€æ°ageãå®çŸ©ãããŠããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 197,
"tag": "p",
"text": "ã¡ãœããã¯ãã¯ã©ã¹ã®ãªããžã§ã¯ãã«é©çšã§ããæ©èœãèšè¿°ããŸãããã®äŸã§ã¯ãsay_helloãšããã¡ãœãããå®çŸ©ãããŠããŸãããã®ã¡ãœããã¯ã\"Hello, I'm åå.\"ãšããã¡ãã»ãŒãžã衚瀺ããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 198,
"tag": "p",
"text": "ã¯ã©ã¹ã®ãªããžã§ã¯ãã¯ãã¯ã©ã¹åãåŒã³åºãå¯èœãªé¢æ°ã®ããã«äœ¿çšãããŸããäŸãã°ãjohn->say_hello();ã¯ãjohnãªããžã§ã¯ãã®say_helloã¡ãœãããåŒã³åºããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 199,
"tag": "p",
"text": "ãã®äŸã§ã¯ãcreateãšããç¹å¥ãªã¡ãœãããå®çŸ©ãããŠããŸãããã®ã¡ãœããã¯ããªããžã§ã¯ããã¯ããŒã³ããéã«æå®ããåŒæ°ãåŠçããŸãã ãã®ã¡ãœããã¯ãC++ããã°ã©ããŒãã³ã³ã¹ãã©ã¯ã¿ãšåŒã¶ãã®ã«çžåœããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 200,
"tag": "p",
"text": "ãã®äŸã§ã¯ãã¯ã©ã¹ã«destroyãšããã¡ãœãããå®çŸ©ãããŠããŸãããããã®ã¡ãœãããå®çŸ©ããããšãã§ããŸãã ãã®ã¡ãœããã¯ããªããžã§ã¯ããæ¶ããçŽåã«å®è¡ããããã®ã§ãC++ããã°ã©ããŒããã¹ãã©ã¯ã¿ãšåŒã¶ãã®ã«çžåœããŸãã ãã ããPikeã¯èªåã¬ããŒãžã³ã¬ã¯ã·ã§ã³ãåããŠãããããC++ã»ã©ã¯é »ç¹ã«ãã¹ãã©ã¯ã¿ãå¿
èŠã«ãªãããšã¯ãããŸããã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 201,
"tag": "p",
"text": "Pikeã®ã¯ã©ã¹ã¯ãåãªãæ§é äœãšããŠã䜿çšã§ããŸããäŸãã°ãäžèšã®ã³ãŒãã®",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 202,
"tag": "p",
"text": "john->name, john->ageã®ããã«ã€ã³ã¹ã¿ã³ã¹->ã¡ã³ãå€æ°ã®æ§æã§ã€ã³ã¹ã¿ã³ã¹ã®ã¡ã³ãå€æ°ãåç
§ã§ããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 203,
"tag": "p",
"text": "次ã®äŸã§ã¯ãã¯ã©ã¹ã®é
åãäœãã¡ã³ãå€æ°ãããªãŒãã³ãã«æ±ã£ãŠããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 204,
"tag": "p",
"text": "ãã®ã³ãŒãã¯ãäœæé²ã®é
ç®ãè¡šãããã® address_book_entry ãšããã¯ã©ã¹ãå®çŸ©ãããã®ã¯ã©ã¹ã䜿çšããŠäœæé²ãäœæããŠããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 205,
"tag": "p",
"text": "ãŸããaddress_book_entry ã¯ã©ã¹ã¯ãååãäœæãé»è©±çªå·ã®3ã€ã®ã¡ã³ãå€æ°ãæã£ãŠããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 206,
"tag": "p",
"text": "ãããŠãmain é¢æ°ã§ã¯ããŸã空ã®äœæé²ãè¡šãé
å address_book ãäœæããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 207,
"tag": "p",
"text": "次ã«ãaddress_book_entry ã¯ã©ã¹ãã2ã€ã®ãšã³ããªãŒ alice ãš bob ãäœæããããããã®ååãäœæãé»è©±çªå·ãèšå®ããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 208,
"tag": "p",
"text": "ãããŠããããã®ãšã³ããªãŒã address_book é
åã«è¿œå ããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 209,
"tag": "p",
"text": "æåŸã«ãforeach ã«ãŒãã䜿çšããŠãaddress_book é
åã«å«ãŸãããã¹ãŠã®ãšã³ããªãŒãåºåããŸãã åãšã³ããªãŒã®æ
å ±ã¯ãwrite é¢æ°ã䜿çšããŠæŽåœ¢ããåºåãããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 210,
"tag": "p",
"text": "ãã®ã³ãŒããå®è¡ãããšã以äžã®ãããªåºåãåŸãããŸã:",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 211,
"tag": "p",
"text": "ããã¯ã2ã€ã®ãšã³ããªãŒãæ£åžžã«äœæãããäœæé²ã«è¿œå ãããæ£åžžã«åºåãããŠããããšã瀺ããŠããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 212,
"tag": "p",
"text": "Pikeã«ãããŠãããã°ã©ã ãšã¯ã©ã¹ã¯åãã§ããããšãé©ããããããŸãããã€ãŸããPikeã§ã¯ããã°ã©ã ãšã¯ã©ã¹ã¯å矩èªãšããŠäœ¿çšãããããšããããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 213,
"tag": "p",
"text": "ãã¡ã€ã«å
ã®Pikeããã°ã©ã ã¯ã¯ã©ã¹å®çŸ©ã§ããããã¡ã€ã«ã§å®çŸ©ãããã¡ãœããã¯ãã®ã¯ã©ã¹ã®ã¡ãœããã§ãããã°ããŒãã«å€æ°(ã€ãŸããã¡ãœããã®å€ã§å®çŸ©ãããå€æ°)ã¯ã¡ã³ãå€æ°ã§ããå¿
èŠã§ããã°ããã¡ã€ã«å
ã®ã³ãŒãã«æé»çã«ãclass {}ãããããšæ³åã§ããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 214,
"tag": "p",
"text": "ãã ãã现ããã¯ã©ã¹ããšã«ããããã®ãã¡ã€ã«ãçšæããªããã°ãªããªããšãªããšé¢åã«ãªãã®ã§ããclass {}ãã®è¡šèšãçšæãããŠããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 215,
"tag": "p",
"text": "èŠèŠããããã³ãŒãã§ãããclass { } ã§å²ãŸããŠããŸãããã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 216,
"tag": "p",
"text": "Pikeã®ã¯ã©ã¹ãšããã°ã©ã ã®é¢ä¿ã¯ç¹ç°çã§ãããé¡äŸãšããŠã¯Zigã®æ§é äœãšããã°ã©ã ã®é¢ä¿ããããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 217,
"tag": "p",
"text": "è€çŽ æ°ã¯å®æ°éšãšèæ°éšããæãæ°ã®åœ¢åŒã§ãããPikeã«ã¯çµã¿èŸŒã¿ã®è€çŽ æ°åããªããããç¬èªã®ã¯ã©ã¹ãäœæããŸããã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 218,
"tag": "p",
"text": "complex ã¯ã©ã¹ã¯ãå®æ°éšãšèæ°éšãã¡ã³ãå€æ°ãšããŠæã¡ãå ç®ãæžç®ãä¹ç®ãªã©ã®æäœãè¡ãæŒç®åãæäŸããŠããŸãããŸãã絶察å€ãæåååãå®è£
ãããŠããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 219,
"tag": "p",
"text": "ãã®Pikeã®ã³ãŒãã¯ãcomplex(è€çŽ æ°)ã¯ã©ã¹ãå®çŸ©ããè€çŽ æ°ã®æŒç®ãæ©èœãå®è£
ããŠããŸãã以äžã«åéšåã®è§£èª¬ãããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 220,
"tag": "p",
"text": "ãŸããcomplexã¯ã©ã¹ã®å®çŸ©ã§ããã¯ã©ã¹å
ã§äœ¿çšããããã©ã€ããŒããªå€æ° _real ãš _imag ãå®çŸ©ãããŠããŸãã ãŸãã`real() ã¡ãœãããš `imag() ã¡ãœãããå®çŸ©ããããããã _real ãš _imag ã®å€ãè¿ããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 221,
"tag": "p",
"text": "次ã«ãcreate() ã¡ãœãããå®çŸ©ãããŠããŸãããã®ã¡ãœããã¯ãã³ã³ã¹ãã©ã¯ã¿ã®åœ¹å²ãæãããŸãã å¯å€é·åŒæ°ãåãåããæåã®åŒæ°ãå®éš _real ã«ãæ®ãã®åŒæ°(ããååšããå Žå)ãèéš _imag ã«ä»£å
¥ããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 222,
"tag": "p",
"text": "å ç®ãæžç®ãä¹ç®ã®æŒç®åã¡ãœãããå®çŸ©ãããŠããŸããäŸãã°ã+æŒç®åã«å¯Ÿã㊠complex ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãšã®å ç®ãè¡ããšãå®éšãšèéšããããã足ããçµæã®æ°ãã complex ã€ã³ã¹ã¿ã³ã¹ãè¿ãããŸãããŸãã+æŒç®åã«å¯Ÿã㊠mixed å(ç°ãªãåã®å ç®ã蚱容ãã)ã®åŒæ°ãåãåãå Žåã¯ãåŒæ°ãå®éšãšããŠè¶³ãåãããæ°ãã complex ã€ã³ã¹ã¿ã³ã¹ãè¿ãããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 223,
"tag": "p",
"text": "`absã¡ãœããã¯ãè€çŽ æ°ã®çµ¶å¯Ÿå€ãè¿ãããã®ã¡ãœããã§ãã絶察å€ã¯å®éšã®äºä¹ãšèéšã®äºä¹ã®åã®å¹³æ¹æ ¹ãšããŠèšç®ãããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 224,
"tag": "p",
"text": "_sprintf ã¡ãœããã¯ãè€çŽ æ°ãæååãšããŠè¡šç€ºããããã®ãã©ãŒããããæäŸããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 225,
"tag": "p",
"text": "æåŸã«ãmain é¢æ°ã§ã¯ãcomplexã¯ã©ã¹ã®ãªããžã§ã¯ããäœæãããããã®åã¡ãœãããåŒã³åºããŠããŸãã ãŸããforeachã«ãŒãã䜿ã£ãŠãé
åã®åèŠçŽ ã«ã€ã㊠complex ãªããžã§ã¯ããäœæãããããã®å ç®ãæžç®ãä¹ç®ãèšç®ããŠããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 226,
"tag": "p",
"text": "ç¶æ¿ã¯ãæ¢åã®ã¯ã©ã¹ãåºç€ãšããŠãæ°ããã¯ã©ã¹ãäœæããããšãã§ããä»çµã¿ã§ããç¶æ¿ã«ãããæ¢åã®ã¯ã©ã¹ã®ãã¹ãŠã®ãã£ãŒã«ããšã¡ãœãããæ°ããã¯ã©ã¹ã«åŒãç¶ãããšãã§ããŸãããŸããæ°ããã¯ã©ã¹ã«ã¯ãç¶æ¿å
ã®ã¯ã©ã¹ã«ã¯ååšããªããã£ãŒã«ããã¡ãœãããè¿œå ããããšãã§ããŸããããã«ãããããç¹åããã¯ã©ã¹ãäœæããããšãã§ããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 227,
"tag": "p",
"text": "Pikeã§ã¯ãã¯ã©ã¹ç¶æ¿ã¯inheritããŒã¯ãŒãã䜿çšããŠå®£èšãããŸããç¶æ¿å
ã®ã¯ã©ã¹ã¯ãinheritããŒã¯ãŒãã®åŸã«æå®ãããŸãã å³åœ¢ãäŸã«ã¯ã©ã¹ã®ç¶æ¿ã解説ããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 228,
"tag": "p",
"text": "ãŸããpointã¯ã©ã¹ãå®çŸ©ãããŠããŸãããã®ã¯ã©ã¹ã¯2次å
ã®åº§æšãè¡šããŸããã³ã³ã¹ãã©ã¯ã¿ã§x座æšãšy座æšãåãåãããã®å€ãä¿æããŸããmoveã¡ãœããã¯ã座æšãæå®ããéã ã移åãããããã®ã¡ãœããã§ããå
éšã§x座æšãšy座æšãæŽæ°ãã移åããããšã衚瀺ããŸãããŸãã_sprintfã¡ãœããã¯ããªããžã§ã¯ãã®æååè¡šçŸãè¿ãããã®ç¹æ®ãªã¡ãœããã§ãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 229,
"tag": "p",
"text": "次ã«ãshapeã¯ã©ã¹ãå®çŸ©ãããŠããŸãããã®ã¯ã©ã¹ã¯å³åœ¢ãè¡šãããã®åºæ¬ã¯ã©ã¹ã§ããshapeã¯ã©ã¹ã¯pointãªããžã§ã¯ããä¿æããŠããããã®äœçœ®ãè¡šããŸããcreateã¡ãœããã¯ãæå®ããã座æšã«æ°ããpointãªããžã§ã¯ããäœæããlocationã«ä»£å
¥ããŸããmoveã¡ãœããã¯ãlocationã®åº§æšãæå®ããéã ã移åãããããã®ã¡ãœããã§ããå
éšã§pointãªããžã§ã¯ãã®moveã¡ãœãããåŒã³åºããŠããŸãããŸãã_sprintfã¡ãœããã¯ããªããžã§ã¯ãã®æååè¡šçŸãè¿ãããã®ç¹æ®ãªã¡ãœããã§ãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 230,
"tag": "p",
"text": "æåŸã®ãrectangleã¯ã©ã¹ãå®çŸ©ãããŠããŸãããã®ã¯ã©ã¹ã¯shapeã¯ã©ã¹ãç¶æ¿ããŠãããç©åœ¢ãè¡šããŸããcreateã¡ãœããã§ã¯ã芪ã¯ã©ã¹ã®createã¡ãœãããåŒã³åºããŠäœçœ®ãèšå®ããããã«å¹
ãšé«ããèšå®ããŸãã_sprintfã¡ãœããã§ã¯ã芪ã¯ã©ã¹ã®_sprintfã¡ãœãããåŒã³åºããŠèŠªã¯ã©ã¹ã®æ
å ±ã衚瀺ããããã«ç¶ããŠç©åœ¢åºæã®æ
å ±ã§ããå¹
ãšé«ãã衚瀺ããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 231,
"tag": "p",
"text": "mainé¢æ°ã§ã¯ãå®éã«rectangleãªããžã§ã¯ããäœæããæäœçµæã衚瀺ããŠããŸããæåã«rctãšããååã®ç©åœ¢ãªããžã§ã¯ããäœæãããã®æ¬¡ã«rct2ãšããå¥ã®ç©åœ¢ãªããžã§ã¯ããäœæããŠããŸããåãªããžã§ã¯ãã®æ
å ±ã衚瀺ããŠããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 232,
"tag": "p",
"text": "æã«ã¯ã2ã€ãŸãã¯ãã以äžã®ã¯ã©ã¹ããç¶æ¿ãããå ŽåããããŸããããã¯Pike(ããã³C++)ã§åäœããŸãããJavaã§ã¯åäœããŸããããã ãè€æ°ã®ç¶æ¿ãèšè¿°ããã°è¯ãã§ãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 233,
"tag": "p",
"text": "ã®äŸã§ã¯ããã¹ãŠã®ãªããžã§ã¯ãã®ãã¹ãŠã®ã¡ãœãããšã¡ã³ãå€æ°ã«èª°ã§ãã¢ã¯ã»ã¹ã§ããŸããã äŸãã°ã次ã®ããã«å¹Žéœ¢ãæžããããšãéåžžã«ç°¡åã§ããã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 234,
"tag": "p",
"text": "ãã?ãã®johnã®å¹Žéœ¢ã¯30æ³ã§ãä»ã¯ãã€ãã¹20æ³ã«ãªã£ãŠãã?",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 235,
"tag": "p",
"text": "ä»ã®ã¯ã©ã¹ãããã®å€æ°ã«è§Šããªãããã«ãã¡ã³ãå€æ° age ãžã®ã¢ã¯ã»ã¹ãå¶åŸ¡ããããšæããŸãã ãã®ãããªçšéã®ããã«ãã¡ãœãããŸãã¯ã¡ã³ãå€æ°ã®å®çŸ©ã§ãããŒã¿åã®åã«æžãããããã€ãã®ã¢ã¯ã»ã¹ä¿®é£ŸåããããŸãã äŸãã°ã人ç©ã®å¹Žéœ¢ã¯ã¡ã³ãå€æ° age ã«ãã£ãŠè¡šãããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 236,
"tag": "p",
"text": "ãããå€æŽããŠã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 237,
"tag": "p",
"text": "ãšãããšãåãã¯ã©ã¹å
ã®ã¡ãœããã®ã¿ããã®å€æ°ã«ã¢ã¯ã»ã¹ã§ããããã«ãªããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 238,
"tag": "p",
"text": "次ã®ã¢ã¯ã»ã¹ä¿®é£ŸåãååšããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 239,
"tag": "p",
"text": "ã¯ã©ã¹ã«ã³ã³ã¹ãã©ã¯ã¿(ã€ãŸããcreate ãšããååã®ã¡ãœãã)ãããå Žåãããã static ã«å®£èšããããšãè¯ãã¢ã€ãã¢ã§ãã ããã¯ãªããžã§ã¯ãã®æ§ç¯äžã«ã®ã¿åŒã³åºãããã¹ãã§ãããstatic ã§ãªãå Žåãç¶æ¿ã«é¢é£ããããã€ãã®åã®äžæŽåãçããå¯èœæ§ããããŸãã",
"title": "ãªããžã§ã¯ãæåããã°ã©ãã³ã°"
},
{
"paragraph_id": 240,
"tag": "p",
"text": "Pikeã§ã¯ããã¡ã€ã«I/Oã« Stdio ãªããžã§ã¯ãã䜿ããŸãã",
"title": "ãã¡ã€ã«æäœ"
},
{
"paragraph_id": 241,
"tag": "p",
"text": "ãã®Pikeã®ã³ãŒãã¯ããã¡ã€ã« \"/etc/hosts\" ãèªã¿èŸŒã¿ããã®äžèº«ãæšæºåºåã«åºåããããã°ã©ã ã§ãã",
"title": "ãã¡ã€ã«æäœ"
},
{
"paragraph_id": 242,
"tag": "p",
"text": "ãŸããstringåã®å€æ° fname ã« \"/etc/hosts\" ãšãããã¡ã€ã«ã®ãã¹ã代å
¥ããŠããŸãã次ã«ãStdio ã¢ãžã¥ãŒã«ã® read_file() é¢æ°ã䜿ã£ãŠãfname ã«æå®ããããã¡ã€ã«ãèªã¿èŸŒãã§ããŸããèªã¿èŸŒãã çµæã¯ãstring|intåã®å€æ° buff ã«ä»£å
¥ãããŸãã",
"title": "ãã¡ã€ã«æäœ"
},
{
"paragraph_id": 243,
"tag": "p",
"text": "string|int åãšã¯ãstring åãŸã㯠int åã®ããããã®å€ã代å
¥å¯èœãªåã§ãããã㯠read_file() é¢æ°ãããã¡ã€ã«ã®èªã¿èŸŒã¿ã«æåããå Žåã¯ãã¡ã€ã«ã®å
容ã string åã§è¿ãã倱æããå Žå㯠0 ãè¿ãããã§ãããšã©ãŒãçºçããå Žåãintp() é¢æ°ã䜿ã£ãŠ buff ã®åã int åã§ããããšã確èªããStdio.perror() é¢æ°ã䜿ã£ãŠãšã©ãŒã®è©³çŽ°ãæšæºãšã©ãŒåºåã«åºåããåŸãããã°ã©ã ã¯çµäºããŸãã",
"title": "ãã¡ã€ã«æäœ"
},
{
"paragraph_id": 244,
"tag": "p",
"text": "èªã¿èŸŒã¿ã«æåããå Žåãwrite() é¢æ°ã䜿ã£ãŠãbuff ã®å
容ãæšæºåºåã«åºåããŸããæåŸã«ãããã°ã©ã ã¯çµäºããŸãã",
"title": "ãã¡ã€ã«æäœ"
},
{
"paragraph_id": 245,
"tag": "p",
"text": "ãã®ã³ãŒãã¯ãã·ã¹ãã ãã¡ã€ã« \"/etc/hosts\" ã®äžèº«ã衚瀺ããããã«äœ¿çšãããŸãããã ããrootæš©éãå¿
èŠãªå Žåãããããã泚æãå¿
èŠã§ãã",
"title": "ãã¡ã€ã«æäœ"
},
{
"paragraph_id": 246,
"tag": "p",
"text": "ãã®ããã°ã©ã ã¯ããã¡ã€ã«ã®æžã蟌ã¿ãšèªã¿èŸŒã¿ãè¡ãããããæ£åžžã«ã§ãããã©ããããã§ãã¯ããŸãã",
"title": "ãã¡ã€ã«æäœ"
},
{
"paragraph_id": 247,
"tag": "p",
"text": "ãŸããmain()é¢æ°ãå®çŸ©ãããŠããŸãã 次ã«ãstring fname = \"sample.txt\";ã§ãã¡ã€ã«åãæå®ããint cnt;ã§æžã蟌ãã ãã€ãæ°ãæ ŒçŽããå€æ°ã宣èšããŸãã ãŸãããšã©ãŒãçºçããå Žåã®ãšã©ãŒã¡ãã»ãŒãžãæ ŒçŽããå€æ°int|array errã宣èšããŠããŸãã ãã®å€æ°ã¯ãcatchã«ãã£ãŠäŸå€ãçºçããå Žåã«ãçç±ãšã¹ã¿ãã¯ãã¬ãŒã¹ãæ ŒçŽãããŸãã",
"title": "ãã¡ã€ã«æäœ"
},
{
"paragraph_id": 248,
"tag": "p",
"text": "catchã®ãããã¯å
ã§ã¯ãStdio.write_fileé¢æ°ã䜿çšããŠãæå®ããããã¡ã€ã«ã«ããã¹ããæžã蟌ã¿ãŸãã catchãããã¯ã®å€åŽã§ãarraypé¢æ°ã䜿çšããŠãerrå€æ°ã®åãé
åã§ãããã©ããããã§ãã¯ããŸãã ããé
åã§ããã°ããšã©ãŒã¡ãã»ãŒãžãåºåããreturn 2;ã§ããã°ã©ã ãçµäºããŸãã",
"title": "ãã¡ã€ã«æäœ"
},
{
"paragraph_id": 249,
"tag": "p",
"text": "次ã«ãstring|int buff = Stdio.read_file(fname);ã§ãæå®ããããã¡ã€ã«ããããã¹ããèªã¿èŸŒãã§ãèªã¿èŸŒãã ããã¹ããstringåã®å€æ°buffã«æ ŒçŽããŸãã ããèªã¿èŸŒã¿ã«å€±æããå Žåã¯ãintpé¢æ°ã䜿çšããŠãbuffå€æ°ã®åãæŽæ°åã§ãããã©ããããã§ãã¯ããŸãã æŽæ°åã§ããã°ãStdio.perror(fname);ã§ãšã©ãŒã¡ãã»ãŒãžãåºåããreturn 1;ã§ããã°ã©ã ãçµäºããŸãã",
"title": "ãã¡ã€ã«æäœ"
},
{
"paragraph_id": 250,
"tag": "p",
"text": "æåŸã«ãèªã¿èŸŒãã ããã¹ããwrite(buff);ã§åºåããreturn 0;ã§ããã°ã©ã ãæ£åžžã«çµäºããŸãã",
"title": "ãã¡ã€ã«æäœ"
},
{
"paragraph_id": 251,
"tag": "p",
"text": "",
"title": "éé²"
},
{
"paragraph_id": 252,
"tag": "p",
"text": "ãšã©ãã¹ããã¹ã®ç¯©ããè¥å¹² Pike ãããæžããŠã¿ãŸããã",
"title": "éé²"
},
{
"paragraph_id": 253,
"tag": "p",
"text": "æ倧å
¬çŽæ°ãšæå°å
¬åæ°ããè¥å¹² Pike ãããæžããŠã¿ãŸããã",
"title": "éé²"
},
{
"paragraph_id": 254,
"tag": "p",
"text": "äºåæ³ããè¥å¹² Pike ãããæžããŠã¿ãŸããã",
"title": "éé²"
},
{
"paragraph_id": 255,
"tag": "p",
"text": "",
"title": "éé²"
}
] | Pikeã¯ãCèšèªã«äŒŒãææ³ãæã€é«æ°Žæºããã°ã©ãã³ã°èšèªã§ããè±å¯ãªã©ã€ãã©ãªãšãªããžã§ã¯ãæåããã°ã©ãã³ã°æ©èœãåããŠããŸãããŸããé«éãªå®è¡é床ãç¹åŸŽã§ãWebã¢ããªã±ãŒã·ã§ã³ããããã¯ãŒã¯ããã°ã©ãã³ã°ãããŒã¿ããŒã¹åŠçãªã©ãå¹
åºãçšéã§äœ¿çšãããŠããŸãã æ¬ãã¥ãŒããªã¢ã«ã§ã¯ãPikeã®åºæ¬çãªææ³ãšæ©èœãåå¿è
åãã«ãããããã解説ããŸããPikeãåŠã¶ããšã§ãããã°ã©ãã³ã°ã®åºç€ã身ã«ã€ããå®è·µçãªéçºã«å¿çšã§ããããã«ãªãããšãç®çãšããŠããŸããæ¬ãã¥ãŒããªã¢ã«ãéããŠãPikeã®é
åã掻çšæ¹æ³ãç解ãããã®å¯èœæ§ãåºããããšãã§ããã§ãããã | {{Wikipedia}}
Pikeã¯ãCèšèªã«äŒŒãææ³ãæã€é«æ°Žæºããã°ã©ãã³ã°èšèªã§ããè±å¯ãªã©ã€ãã©ãªãšãªããžã§ã¯ãæåããã°ã©ãã³ã°æ©èœãåããŠããŸãããŸããé«éãªå®è¡é床ãç¹åŸŽã§ãWebã¢ããªã±ãŒã·ã§ã³ããããã¯ãŒã¯ããã°ã©ãã³ã°ãããŒã¿ããŒã¹åŠçãªã©ãå¹
åºãçšéã§äœ¿çšãããŠããŸãã
æ¬ãã¥ãŒããªã¢ã«ã§ã¯ãPikeã®åºæ¬çãªææ³ãšæ©èœãåå¿è
åãã«ãããããã解説ããŸããPikeãåŠã¶ããšã§ãããã°ã©ãã³ã°ã®åºç€ã身ã«ã€ããå®è·µçãªéçºã«å¿çšã§ããããã«ãªãããšãç®çãšããŠããŸããæ¬ãã¥ãŒããªã¢ã«ãéããŠãPikeã®é
åã掻çšæ¹æ³ãç解ãããã®å¯èœæ§ãåºããããšãã§ããã§ãããã
__TOC__
== ã€ã³ãããã¯ã·ã§ã³ ==
{{å
é ã«æ»ã}}
Pikeã¯ãCèšèªã«äŒŒãææ³ãæã€é«æ°Žæºããã°ã©ãã³ã°èšèªã§ããè±å¯ãªã©ã€ãã©ãªãšãªããžã§ã¯ãæåããã°ã©ãã³ã°æ©èœãåããŠããŸãããŸããé«éãªå®è¡é床ãç¹åŸŽã§ãWebã¢ããªã±ãŒã·ã§ã³ããããã¯ãŒã¯ããã°ã©ãã³ã°ãããŒã¿ããŒã¹åŠçãªã©ãå¹
åºãçšéã§äœ¿çšãããŠããŸãã
=== Pikeã®ç¹åŸŽ ===
Pikeã¯ã以äžã®ãããªç¹åŸŽãæã£ãŠããŸãã
* é«æ°Žæºãã€åŒ·åã§ãããããéåžžã«è€éãªããšã§ãPikeã§ã¯ç°¡åã«å®çŸã§ããŸãã
* ãªããžã§ã¯ãæåã§ããã倧èŠæš¡ãªããã°ã©ã ãå°ããªéšåã«åå²ããŠèšè¿°ã§ãããããããã°ã©ã å
šäœãäžåºŠã«èšè¿°ãããããã¯ããã«ç°¡åã§ãã
* ã€ã³ã¿ããªã¿ãŒåã§ãããããããã°ã©ã ãã³ã³ãã€ã«ããŠãªã³ã¯ããå¿
èŠããªããå®è¡ãããšãã«åŸ
ã€å¿
èŠããããŸããã
* æéã®ã¹ã¯ãªããèšèªã®1ã€ã§ãã
* ã¬ããŒãžã³ã¬ã¯ã·ã§ã³ããããããã°ã©ãã³ã°ãç°¡åã«ãªãã ãã§ãªããã¡ã¢ãªãªãŒã¯ããã®ä»ã®ã¡ã¢ãªé¢é£ã®ãã°ã®ãªã¹ã¯ãé€å»ãããŸãã
* æ¡åŒµæ§ã«åªããŠãããPikeã ãã§ãªãCãC++ã§æžããããã©ã°ã€ã³ãäœæããPikeã®æ®ããšçµ±åããããšãã§ããŸãã
* ã³ã³ãã€ã©ïŒã€ã³ã¿ãŒããªã¿ã®ããã³ããšã³ãïŒã« 2-pass ãæ¡çšããŠãããã°ããŒãã«ãªå€æ°ã»é¢æ°ã»ã¯ã©ã¹ã®åæ¹åç
§ãèªåçã«è§£æ±ºããŸãã
Pikeã¯ãå°ããã·ã³ãã«ãªã¹ã¯ãªãããèšè¿°ããããã«äœ¿çšããããšãã§ããããã«ã¯éåžžã«å€§èŠæš¡ãªããã°ã©ã ã«ã䜿çšã§ããŸãã
äžçäžã®WebãµãŒããŒã§ããRoxen WebServerãšCaudiumã¯ãã©ã¡ããPikeã§èšè¿°ãããŠããŸãã
Pikeã®é«åºŠãªããŒã¿åãšãœã±ããã®çµã¿èŸŒã¿ãµããŒãã«ãããã€ã³ã¿ãŒãããã¢ããªã±ãŒã·ã§ã³ã§ã®äœ¿çšã«çæ³çã§ãã
Pikeã¯ãGNU General Public LicenseïŒGPLïŒãGNU Lesser General Public LicenseïŒLGPLïŒãããã³Mozilla Public LicenseïŒMPLïŒã«åºã¥ãããªãŒãœãããŠã§ã¢ã§ãã
UNIXãLinuxãSolarisãmacOS XãMicrosoft Windowsãªã©ãå€ãã®ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§å©çšå¯èœã§ãã
=== Pikeã®çšé ===
Pikeã¯ãWebã¢ããªã±ãŒã·ã§ã³ããããã¯ãŒã¯ããã°ã©ãã³ã°ãããŒã¿ããŒã¹åŠçãã²ãŒã éçºãªã©ãå€å²ã«ãããçšéã«å©çšãããŠããŸãã
å
·äœçã«ã¯ã以äžã®ãããªå Žé¢ã§æŽ»çšãããŠããŸãã
* Webãµã€ããWebã¢ããªã±ãŒã·ã§ã³ã®ããã¯ãšã³ãåŠç
* ãããã¯ãŒã¯ããã°ã©ãã³ã°ã«ãããµãŒããŒãã¯ã©ã€ã¢ã³ãã®å®è£
* ããŒã¿ããŒã¹åŠçã«ããããŒã¿ã®ååŸãå å·¥ãåæ
* ã²ãŒã éçºã«ãããAIããã°ã©ã ã®å®è£
* æå·åãã»ãã¥ãªãã£é¢é£ã®ããã°ã©ã ã®å®è£
=== Pikeãšä»ã®ããã°ã©ãã³ã°èšèª ===
;[[Cèšèª|C]]/[[C++]]
:Pikeã¯C/C++ã«äŒŒãææ³ãæã€é«æ°Žæºããã°ã©ãã³ã°èšèªã§ããC++ãããç°¡åã§å®å
šã«äœ¿çšã§ããŸãããŸããC++ãããæè»æ§ããããæè»ãªããã°ã©ãã³ã°ã¹ã¿ã€ã«ã蚱容ããŸãããã ããã€ã³ã¿ããªã¿åã§ãããC/C++ãããé«éã§ã¯ãããŸããããŸããå€ãã®ç°ãªãCããã³C++ã³ã³ãã€ã©ãååšããäžæ¹ã§ãPikeã®å®è£
ã¯1ã€ãããããŸããã
;[[C Sharp|C#]]
:Pikeã¯C#ã«éåžžã«äŒŒãŠããŸããå®éã«ã¯ãPikeã¯C#ã®èšèšã«åœ±é¿ãäžããèšèªã®1ã€ã§ãããšèããããŠããŸãã2ã€ã®èšèªã®äž»ãªéãã¯ãPikeã«ã¯C#ãããåªããæšæºåã·ã¹ãã ããããåå€æãªã©ã®åŠçã«ã©ã€ãã©ãªãå¿
èŠãšããªãããšã§ããC#ã«æ
£ããŠããå ŽåãPikeã¯éåžžã«äœ¿ãããããšæããŸãã
;[[Java]]
:è¡šé¢çã«ã¯ Java ã«äŒŒãŠããŸãããJava ãšåæ§ã«ãPikeã¯äžé圢åŒã«å€æããããããã€ã³ã¿ããªã¿ã«ãã£ãŠå®è¡ãããŸããJava ããã°ã©ã ã¯éåžžããã®äžé圢åŒã§ãŠãŒã¶ãŒã«é
ä¿¡ãããŸãããPikeã§ã¯ãœãŒã¹ã³ãŒãã䜿çšããŸããããã¯ãPikeã«ãããŠã³ã³ãã€ã«æéãã€ãŸãããã°ã©ã ãäžé圢åŒã«å€æããã®ã«ãããæéãäºå®äžãŒãã§ããããã§ãã
;[[Perl]]
:Perlã¯Unixã·ã¹ãã äžã§ã·ã¹ãã 管çããŒã«ãšããŠéå§ãããŸãããPikeãšPerlã¯ã©ã¡ããæååãæ±ãã®ã«é©ããŠãããã©ã¡ãããŠã§ããµãŒããŒã®æ©èœãè¿œå ããããã«äœ¿çšã§ããŸããPerlã¯Pikeãããã¯ããã«åºã䜿çšãããŠããŸããäžéšã®ããã°ã©ããŒã¯ãPerlã®æ§æããããã«ãããšæããŠããŸãã
;[[Python]]
:Pythonã§æžãããããã°ã©ã ã¯ãPikeããã°ã©ã ãšã¯éåžžã«ç°ãªã£ãŠèŠããŸãããPythonãšPikeã¯ã¢ã€ãã¢ã䜿çšæ¹æ³ã«ãããŠäŒŒãŠããŸããPythonã¯ããåºã䜿çšãããŠãããããå€ãã®ã©ã€ãã©ãªãå©çšå¯èœã§ããäžæ¹ãPikeã¯ããé«éã§ãããé«åºŠãªåã·ã¹ãã ãæã¡ããªããžã§ã¯ãæåããã°ã©ãã³ã°ã«å¯ŸãããµããŒããããè¯å¥œã§ããPikeã®ããC++ã«è¿ãæ§æã¯ãC++ãCããŸãã¯Javaãç¥ã£ãŠããããã°ã©ããŒã«ãšã£ãŠã¯å§ãããããªã£ãŠããŸãã
;[[JavaScript]]
:JavaScriptãšPikeã¯ã©ã¡ãããªããžã§ã¯ãæåèšèªã§ãããã ããããã€ãã®éèŠãªéãããããŸããJavaScriptã¯ãããã¿ã€ãããŒã¹ã§ãããPikeã¯ã¯ã©ã¹ããŒã¹ã§ãã
;[[Ruby]]
:RubyãšPikeã¯ãã©ã¡ããã¹ã¯ãªããã£ã³ã°èšèªã§ããããªããžã§ã¯ãæåã«åºã¥ããŠããŸããããããããã€ãã®éèŠãªéãããããŸããRubyã¯åçåä»ãèšèªã§å
šãŠã®ã€ã³ã¹ã¿ã³ã¹ããªããžã§ã¯ãã§ãããPikeã¯éçåä»ãèšèªã§äžéšã®ã€ã³ã¹ã¿ã³ã¹ã¯ããªããã£ãã§ãã
==== æŽå² ====
;1994幎: Fredrik HÃŒbinetteãšPer Hedborãå«ãLysatorã®ããã°ã©ããŒãã¡ããMUDåãã«éçºãããèšèªã§ããLPCããPikeã®å身ã§ããLPC4ãåé¢ãããããããŸããŸãªã¢ããªã±ãŒã·ã§ã³ã®ããã®è¿
éãªãããã¿ã€ãã³ã°èšèªãšããŠäœ¿çšããŸãã
;1994幎: LPCã®ã©ã€ã»ã³ã¹ãåæ¥ç®çã§ã®äœ¿çšãèš±å¯ããŠããªããããæ°ãã«GPLå®è£
ã®ÂµLPCïŒãã€ã¯ãLPCïŒãéçºãããŸãã
;1996幎: µLPCã¯åæ¥çã«ææãªååãæäŸããããã«Pikeã«æ¹åãããŸãã
;1996幎: Pikeã®éçºã¯Roxen Internet Softwareã«åŒãç¶ãããå瀟ã®ãªãœãŒã¹ãæäŸãããŸããå瀟ã¯Pikeã§éçºãããWebãµãŒããŒã§ããRoxenãæäŸããŸãã
;2002幎: ãªã³ã·ã§ãŒãã³ã°å€§åŠã®ããã°ã©ãã³ã°ç°å¢ç 究宀ããRoxenããPikeã®ã¡ã³ããã³ã¹ãåŒãç¶ããŸããOpera Softwareã®ãªã³ã·ã§ãŒãã³ã°ãªãã£ã¹ã§ã¯ãPikeããã°ã©ããŒãOpera Miniã¢ããªã±ãŒã·ã§ã³ã®ãµãŒããŒ/ã²ãŒããŠã§ã€éšåã§äžå¿çãªåœ¹å²ãæããããã«ãæ°åãéçšãããŸããã
== ã€ã³ã¹ããŒã« ==
{{å
é ã«æ»ã}}
=== Pikeã®ããŠã³ããŒããšã€ã³ã¹ããŒã« ===
Pikeã¯ãUNIXãLinuxãWindowsãmacOSãªã©ã®å€ãã®ãã©ãããã©ãŒã ã§å©çšå¯èœã§ãã
Pikeã®ææ°ããŒãžã§ã³ãããŠã³ããŒãããã«ã¯ãPikeã®å
¬åŒãŠã§ããµã€ã( http://pike.lysator.liu.se/ )ã蚪åããŠãã ããã
{{See also|[http://pike.lysator.liu.se/download/ Pike Download page]}}
LinuxãŠãŒã¶ãŒã®å ŽåãPikeã¯å€ãã®ãã£ã¹ããªãã¥ãŒã·ã§ã³ã®ããã±ãŒãžãªããžããªã«å«ãŸããŠããŸããäŸãã°ãDebianãUbuntuã®å Žåã以äžã®ã³ãã³ãã䜿çšããŠPikeãã€ã³ã¹ããŒã«ããããšãã§ããŸãã
:<syntaxhighlight lang=bash>
$ sudo apt-get update
$ sudo apt-get install pike8.0
</syntaxhighlight>
WindowsãŠãŒã¶ãŒã®å ŽåãPikeã®WindowsããŒãžã§ã³ãããŠã³ããŒãããŠã€ã³ã¹ããŒã«ããå¿
èŠããããŸãã
ããŠã³ããŒããããã¡ã€ã«ãå®è¡ããŠããŠã£ã¶ãŒãã«åŸã£ãŠã€ã³ã¹ããŒã«ããŠãã ããã
macOSãŠãŒã¶ãŒã®å ŽåãHomebrewãªã©ã®ããã±ãŒãžãããŒãžã£ãŒã䜿çšããŠPikeãã€ã³ã¹ããŒã«ããããšãã§ããŸãã
=== ãœãŒã¹ã³ãŒãããã®ãã«ã ===
Pikeã¯ããã«ãæžã¿ãã€ããªã®ä»ã«ãœãŒã¹ã³ãŒããå
¬éãããŠããã®ã§ããœãŒã¹ã³ãŒããããã«ãããŠã€ã³ã¹ããŒã«ããããšãå¯èœã§ãã
ããã§åé¡ã«ãªãã®ããçŸåšé
åžãããŠãããœãŒã¹ã³ãŒããããã«ãããéçšã§ <code>pike</code> èªèº«ã䜿ãããŠããç¹ã§ãã
ãã®ãããFreeBSDã®æ§ãªãã«ãæžã¿ãã€ããªãé
åžãããŠããªããã©ããããŒã ã§ã¯ããã«ããã®ãã®ãåºæ¥ãŸããã
ããã解決ããã«ã¯ããã«ãã«<code>pike</code> èªèº«ã䜿ãããŠããªãã£ãé ã®éå»ã®ããŒãžã§ã³ïŒäŸãã°ã0.6ïŒããã«ããã€ã³ã¹ããŒã«ãããã®åŸãéå»ã®ããŒãžã§ã³ã®<code>pike</code>ã䜿ã£ãŠæ°ããããŒãžã§ã³ïŒäŸãã°ã8.0ïŒãã€ã³ã¹ããŒã«ããäºæ®µéã®ãã«ãããã»ã¹ãæå¹ã§ãã
ãã®æ¹æ³ã§ãFreeBSD 13.1/amd64 ã« Pike v8.0 release 1738 ãã€ã³ã¹ããŒã«ã§ããŸããã
=== Pikeã®å®è¡ ===
Pikeãã€ã³ã¹ããŒã«ããåŸã¯ããŸãããŒãžã§ã³ã確èªããŸãã以äžã®ã³ãã³ãã䜿çšããŠPikeã®ããŒãžã§ã³ç¢ºèªããŠãã ããã
:<syntaxhighlight lang=bash>
$ pike --dumpversion
8.0.1738
</syntaxhighlight>
ã³ãã³ãã©ã€ã³ããPikeãèµ·åããããšãã§ããŸãã以äžã®ã³ãã³ãã䜿çšããŠPikeãèµ·åããŠãã ããã
:<syntaxhighlight lang=bash>
$ pike
Pike v8.0 release 1738 running Hilfe v3.5 (Incremental Pike Frontend)
> write("Hello world!);
Hilfe Error: Unterminated string "\"Hello world!);\n" at line 1
> write("Hello world!");
Hello world!(1) Result: 12
> quit
Exiting.
$ _
</syntaxhighlight>
Pikeã®å¯Ÿè©±åã·ã§ã«ãèµ·åããã³ãŒããå®è¡ããããšãã§ããŸãã
:quit ã³ãã³ãã§çµäºããã³ãã³ãã©ã€ã³ã«æ»ããŸãã
ãŸããPikeã§æžãããã¹ã¯ãªãããã¡ã€ã«ãå®è¡ããå Žåã¯ã以äžã®ããã«ãã¡ã€ã«åãæå®ããŠå®è¡ããŠãã ããã
:<syntaxhighlight lang=bash>
$ cat hello.pike
int main() {
write("Hello world!\n");
return 0;
}
$ pike hello.pike
Hello world!
</syntaxhighlight>
以äžã®ããã«ãPikeãããŠã³ããŒãããŠã€ã³ã¹ããŒã«ããã³ãã³ãã©ã€ã³ããèµ·åããããšãã§ããŸãã
=== Pikeã®ãªã³ã©ã€ã³å®è¡ç°å¢ ===
Pikeã®ãªã³ã©ã€ã³å®è¡ç°å¢ã¯ããŠã§ãäžã§Pikeããã°ã©ãã³ã°èšèªã®ã³ãŒããæžããå®è¡ã§ãããªã³ã©ã€ã³ããŒã«ã§ããããã«ããããŠãŒã¶ãŒã¯Pikeã®æ§æãæ©èœãè©Šããããå°èŠæš¡ãªããã°ã©ã ãäœæãããããããšãã§ããŸãã
;代衚çãªPikeã®ãªã³ã©ã€ã³å®è¡ç°å¢:[http://tpcg.io/_YV8Y79 tutorialspoint.com]
äžè¬çã«ããªã³ã©ã€ã³å®è¡ç°å¢ã¯ä»¥äžã®æ©èœãæäŸããŸã:
;ã³ãŒãã®å
¥åãšãã£ã¿: ãŠãŒã¶ãŒã¯Pikeã®ã³ãŒããçŽæ¥å
¥åã§ããããã¹ããšãã£ã¿ãæäŸãããŸãã
;å®è¡ãã¿ã³: ãŠãŒã¶ãŒã¯å
¥åããã³ãŒããå®è¡ããããã®ãã¿ã³ãæäŸãããŸãã
;å®è¡çµæã®è¡šç€º: ã³ãŒãã®å®è¡çµæãåºåãããŠã§ãããŒãžäžã§è¡šç€ºãããŸãã
;ãšã©ãŒã¡ãã»ãŒãžã®è¡šç€º: ããã³ãŒãã«ãšã©ãŒãããå Žåããšã©ãŒã¡ãã»ãŒãžã衚瀺ãããŠãåé¡ç¹ãç¹å®ã§ããŸãã
ããã«ãããPikeãã€ã³ã¹ããŒã«ããå¿
èŠãªãããŠã§ããã©ãŠã¶ãä»ããŠPikeã®ã³ãŒããè©ŠãããåŠç¿ãããããããšãã§ããŸãã
=== Hello world ===
åã®ç¯ã§å®è¡ããããã°ã©ã ã解説ããŸãããã
;[http://tpcg.io/_YV8Y79 hello.pike]:<syntaxhighlight lang=pike>
int main() {
write("Hello world!\n");
return 0;
}
</syntaxhighlight>
* <code>int main()</code>: ãã®è¡ã¯ã<code>main</code> é¢æ°ã宣èšããŠããŸããCèšèªãšåæ§ã«ãPikeã®ããã°ã©ã ã¯ã <code>main</code> é¢æ°ããå®è¡ãéå§ãããŸãã<code>int</code> ã¯ã<code>main</code> é¢æ°ãæŽæ°ãè¿ãããšã瀺ããŸãã
* <code>{</code> ãš <code>}</code>: ãããã¯ã<code>main</code> é¢æ°ã®æ¬äœãå®çŸ©ããããã«äœ¿çšãããŸãã
* <code>write("Hello world!\n");</code>: ãã®è¡ã¯ãæšæºåºåã« "Hello world!" ãšããæååãåºåãã <code>write</code> é¢æ°ãåŒã³åºããŠããŸãã<code>\n</code> ã¯æ¹è¡æåãè¡šããŸãã
* <code>return 0;</code>: ãã®è¡ã¯ã <code>main</code> é¢æ°ããããã°ã©ã ãçµäºããããã«ãæŽæ°å€ <code>0</code> ãè¿ããŠããŸãã
ãããã£ãŠããã®ããã°ã©ã ã®åºåã¯ã"Hello world!" ãšããæååã«æ¹è¡æåãç¶ãããã®ã«ãªããŸãã
== å€æ°ãšå ==
{{å
é ã«æ»ã}}
Pikeã¯ã€ã³ã¿ãŒããªã¿èšèªã§ãããããå€æ°ã«å®£èšãå¿
èŠãªããšæããããããããŸããã
ããããPikeã§ã¯å€æ°å®£èšãå¿
é ã§ãããå€æ°ã®åãã³ã³ãã€ã«æã«æ±ºå®ããããããåå®å®æ§ãé«ããªããŸãã
=== å€æ°ã®å®£èš ===
å€æ°ã宣èšããå Žåã以äžã®ããã«å®£èšããŸãã
:<syntaxhighlight lang=pike>
åå å€æ°å = åæå€;
</syntaxhighlight>
ããšãã°ãæŽæ°åã®å€æ°xã宣èšããåæå€ã«42ã代å
¥ããå Žåã次ã®ããã«ãªããŸãã
:<syntaxhighlight lang=pike>
int x = 42;
</syntaxhighlight>
Pikeã®å€æ°å®£èšã§ã¯ãååãçç¥ã§ããŸããããåæå€ã代å
¥ããªãå Žåã«ã¯ã次ã®ããã«å€æ°å®£èšãããããšãã§ããŸãã
:<syntaxhighlight lang=pike>
int x;
</syntaxhighlight>
=== ããŒã¿åã®åºæ¬ ===
Pikeã«ã¯ããã€ãã®åºæ¬çãªããŒã¿åããããŸãã以äžã«ãããã説æããŸãã
# æŽæ°åïŒintïŒ: æŽæ°ãè¡šçŸããããã®ããŒã¿åã§ããäŸãã°ã<code>17</code>ã<code>-42</code>ãªã©ã®æŽæ°å€ãè¡šçŸããããšãã§ããŸãã
# æµ®åå°æ°ç¹åïŒfloatïŒ: å®æ°ãè¡šçŸããããã®ããŒã¿åã§ããæŽæ°åãšã¯ç°ãªããå°æ°ç¹ä»¥äžã®éšåãæã€æ°å€ãè¡šçŸããããšãã§ããŸããäŸãã°ã<code>3.14</code>ã<code>-0.5</code>ãªã©ã®å®æ°å€ãè¡šçŸããããšãã§ããŸãã
# æåååïŒstringïŒ: æååãè¡šçŸããããã®ããŒã¿åã§ããæååã¯æåã®é£ç¶ããåã§ããäŸãã°ã<code>"Hello"</code>ã<code>"Pike programming"</code>ãªã©ã®æååãè¡šçŸããããšãã§ããŸããæååã¯ããã«ã¯ã©ãŒããŒã·ã§ã³ã§å²ã¿ãŸãã
# ä»»æã®åïŒmixedïŒ: ä»»æã®ããŒã¿åãè¡šçŸããããã®ç¹æ®ãªããŒã¿åã§ãã<code>mixed</code>åã®å€æ°ã¯ã©ã®ãããªåã®å€ã§ãæ ŒçŽããããšãã§ããŸããç°ãªãåã®å€ãçµã¿åãããããæè»ãªããŒã¿æ§é ãè¡šçŸããããã«äœ¿çšãããŸãã
ãããã®åºæ¬çãªããŒã¿åã¯ãPikeããã°ã©ã ã§å€æ°ã宣èšããéã«äœ¿çšãããŸããäŸãã°ã<code>int number_of_monkeys;</code>ã¯æŽæ°åã®å€æ°<code>number_of_monkeys</code>ã宣èšããŠããŸãã
ãŸããåºæ¬çãªããŒã¿åã®ä»ã«ãã³ã³ããåãšåŒã°ããããŒã¿åããããŸããã³ã³ããåã¯ä»ã®ããŒã¿ãæ ŒçŽããããã®ããŒã¿åã§ãããé
åïŒarrayïŒããããïŒmappingïŒããã«ãã»ããïŒmultisetïŒãªã©ããããŸãããããã®ã³ã³ããåã¯è€éãªããŒã¿æ§é ãæ±ãããã«äœ¿çšãããŸãããåºæ¬çãªããŒã¿åãšåæ§ã«å€æ°ã宣èšããŠäœ¿çšããããšãã§ããŸãã
{{See also|[[#ããŒã¿å]]}}
;[http://tpcg.io/_9ME17V types.pike]:<syntaxhighlight lang=pike>
int main() {
// åºæ¬å //
int i = 42; // æŽæ°åã®å€æ°
float f = -16.2; // æµ®åå°æ°ç¹åã®å€æ°
string s = "Hello"; // æåååã®å€æ°
mixed x = 100; // ä»»æã®åã®å€æ°ïŒmixedåïŒ
int | float n = 0; // æŽæ°åãæµ®åå°æ°ç¹åã®å€æ°
write("i = %O, f = %O, s = %O, x = %O, n = %O\n", i, f, s, x, n);
// ã³ã³ããå //
// é
åïŒArrayïŒ
array(string) fruits = ({ "apple", "banana", "orange" });
write("%O\n", fruits);
// ãããã³ã°(mapping)
mapping map = ([ "key1": "value1", "key2": "value2", "key3": "value3" ]);
write("%O\n", map);
// ãã«ãã»ãã(multiset)
multiset mset = (< 3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 6 >);
write("%O\n", mset);
return 0;
}
</syntaxhighlight>
;å®è¡çµæ:<syntaxhighlight lang=text>
i = 42, f = -16.2, s = "Hello", x = 100, n = 0
({ /* 3 elements */
"apple",
"banana",
"orange"
})
([ /* 3 elements */
"key1": "value1",
"key2": "value2",
"key3": "value3"
])
(< /* 11 elements */
1,
1,
2,
3,
3,
4,
5,
5,
6,
6,
9
>)
</syntaxhighlight>
ãŸããåºæ¬åã®å€æ°ã宣èšãããŠããŸãã以äžã®ãããªå€æ°ããããŸã:
* <code>int</code>: æŽæ°åã®å€æ°ã§ã<code>i</code>ãšããååã§å®£èšãããŠãããå€ã¯42ã§ãã
* <code>float</code>: æµ®åå°æ°ç¹åã®å€æ°ã§ã<code>f</code>ãšããååã§å®£èšãããŠãããå€ã¯-16.2ã§ãã
* <code>string</code>: æåååã®å€æ°ã§ã<code>s</code>ãšããååã§å®£èšãããŠããããHelloããšããæååãæ ŒçŽãããŠããŸãã
* <code>mixed</code>: ä»»æã®åã®å€ãæ ŒçŽã§ããå€æ°ã§ã<code>x</code>ãšããååã§å®£èšãããŠãããå€ã¯100ã§ããPikeã§ã¯ã<code>mixed</code>åã¯ç°ãªãåã®å€ãæ ŒçŽã§ããç¹æ®ãªåã§ãã
* <code>int | float</code>: æŽæ°åãŸãã¯æµ®åå°æ°ç¹åã®å€ãæ ŒçŽã§ããå€æ°ã§ã<code>n</code>ãšããååã§å®£èšãããŠãããåæå€ã¯0ã§ãããã®ãããªå€æ°ã¯ãPikeã®åãŠããªã³ã䜿çšããŠå®£èšãããŠããŸãã
次ã«ãã³ã³ããåã®äœ¿çšäŸã瀺ãããŠããŸãã
* <code>array(string)</code>: æååã®é
åãè¡šãå€æ°ã§ã<code>fruits</code>ãšããååã§å®£èšãããŠããŸãããã®é
åã«ã¯ã"apple"ã"banana"ã"orange"ãšãã3ã€ã®æååãæ ŒçŽãããŠããŸãã
* <code>mapping</code>: ããŒãšå€ã®ãã¢ã®ãããã³ã°ïŒé£æ³é
åïŒãè¡šãå€æ°ã§ã<code>map</code>ãšããååã§å®£èšãããŠããŸãããã®ãããã³ã°ã«ã¯ã"key1"ã"key2"ã"key3"ãšãã3ã€ã®ããŒãšãããããã«å¯Ÿå¿ãã"value1"ã"value2"ã"value3"ãšããå€ãå«ãŸããŠããŸãã
* <code>multiset</code>: è€æ°ã®èŠçŽ ãä¿æãããã«ãã»ãããè¡šãå€æ°ã§ã<code>mset</code>ãšããååã§å®£èšãããŠããŸãããã®ãã«ãã»ããã«ã¯ã3ã1ã4ã1ã5ã9ã2ã6ã5ã3ã6ãšãã11åã®èŠçŽ ãæ ŒçŽãããŠããŸãããã«ãã»ããã¯ãé åºãæããã«èŠçŽ ãæ ŒçŽããããŒã¿æ§é ã§ãã
==== æªåæåã®å€æ°ã®å€ ====
Pikeã§ã¯å€æ°ã¯å¿
ã宣èšãå¿
èŠãªããšã¯æ¢ã«è¿°ã¹ãŸããããåæåã¯å¿
é ã§ã¯ãããŸããã§ããã
ã§ã¯æªåæåã®å€ãåç
§ãããšã©ããªãã§ãããïŒ
:{{---}} çãã¯ãæŽæ°ã®0ãè¿ãã§ãã
;[http://tpcg.io/_F7E1IC uninitialized.pike]:<syntaxhighlight lang=pike>
int main() {
int i;
write("Variable i has type %t and value %O\n", i, i);
// => Variable i has type int and value 0
float f;
write("Variable f has type %t and value %O\n", f, f);
// => Variable f has type int and value 0
string s;
write("Variable s has type %t and value %O\n", s, s);
// => Variable s has type int and value 0
array a;
write("Variable a has type %t and value %O\n", a, a);
// => Variable a has type int and value 0
return 0;
}
</syntaxhighlight>
;å®è¡çµæ:<syntaxhighlight lang=text>
Variable i has type int and value 0
Variable f has type int and value 0
Variable s has type int and value 0
Variable a has type int and value 0
</syntaxhighlight>
æŽæ°åå€æ°iã®æªåæåã®å€ã0ã§ããç¹ã¯ãšããããä»ã®åã®å€æ°ãå
šãŠæŽæ°åã®0ãå
¥ã£ãŠããŸãã
æªåæåã®å Žåãã§ããããªå€ãå
¥ãããšã¯åé¡ã§ãããããã£ãœãå€ãå
¥ã£ãŠãããšåæåå¿ããçºèŠããããšãé
ããŸãã
æŽæ°ã®0ã¯æ¯èŒç容æã«æ€æ»ã§ãããããåæåã®äžåãç°¡åã«çºèŠã§ããŸãã
ããããªãããåæåãå¿
ãè¡ãç¿æ
£ã身ã«ã€ããããšãæãéèŠã§ãã
ãŸãpike-9.xïŒéçºããŒãžã§ã³ïŒã§ã¯ãæ°ããåå auto ã®å°å
¥ãäºå®ãããåæšè«ãè¡ãããšãå¯èœã«ãªããŸãã
åæšè«ã«ã¯åæåãå¿
é ãªã®ã§ãåæåå¿ããæžãäºãæåŸ
ã§ããŸãã
=== åæå ===
Pikeã«ãããåæåã¯<code>enum</code>ãšããããŒã¯ãŒããçšããŠå®çŸ©ãããŸãã以äžã¯ãç°¡åãªè²ã®åæåãå®çŸ©ããããã䜿çšããŠæååãåºåããããã°ã©ã ã®äŸã§ãã
;[http://tpcg.io/_7U3VUM enum.pike]:<syntaxhighlight lang=pike>
enum Color {
RED,
BLUE,
GREEN
}
int main() {
Color color = BLUE;
switch(color) {
case RED:
write("The color is red.\n");
break;
case BLUE:
write("The color is blue.\n");
break;
case GREEN:
write("The color is green.\n");
break;
default:
write("Unknown color.\n");
break;
}
return 0;
}
</syntaxhighlight>
;å®è¡çµæ:<syntaxhighlight lang=text>
The color is blue.
</syntaxhighlight>
äžèšã®ããã°ã©ã ã§ã¯ã<code>Color</code>ãšããåæåãå®çŸ©ãã3ã€ã®å®æ° <code>RED</code>ã<code>BLUE</code>ã<code>GREEN</code> ãå®çŸ©ããŠããŸãããã®åŸã<code>main()</code>é¢æ°å
ã§<code>Color</code>åã®å€æ°<code>color</code>ã宣èšãã<code>BLUE</code>ã§åæåããŠããŸãã<code>switch</code>æã䜿ã£ãŠ<code>color</code>ã®å€ã«ãã£ãŠåå²ãã該åœããæååãåºåããŠããŸãã
enum ã¯ãPike 7.2.30 ã§è¿œå ãããŸããã
=== æŒç®å ===
Pikeã«ãããŠãããã€ãã®é¢æ°ã¯ã³ãŒãäžã§1æåãŸãã¯2æåã§åŒã³åºãããšãã§ããã³ãŒããçãããããšãã§ããŸãã
ãããã®é¢æ°ã¯æŒç®åãšåŒã°ããæ¢ã«ããããã®äŸã§ãã®åäœãèŠãŠããŸããã
æŒç®åã¯æ©èœã«åºã¥ããŠã«ããŽãªãŒã«åé¡ãããŸããã泚æãå¿
èŠã§ãããªããªããäžéšã®æŒç®åã«ã¯ãããããå±ããã«ããŽãªãŒã®ç¯å²ãè¶
ããæå³ãããããã§ãã
以äžã¯æŽæ°ã«é¢ããæŒç®åã®äŸã§ãã
:<syntaxhighlight lang=pike>
int main() {
// ç®è¡æŒç®å
int a = 10, b = 5;
int c = a + b; // å ç®
int d = a - b; // æžç®
int e = a * b; // ä¹ç®
int f = a / b; // é€ç®
int g = a % b; // å°äœ
// æ¯èŒæŒç®å
int h = 5, i = 10;
bool j = (h == i); // çãã
bool k = (h != i); // çãããªã
bool l = (h < i); // ããå°ãã
bool m = (h > i); // ãã倧ãã
bool n = (h <= i); // 以äž
bool o = (h >= i); // 以äž
// è«çæŒç®å
bool p = 1, q = 0;
bool r = (p && q); // è«çç©ïŒANDïŒ
bool s = (p || q); // è«çåïŒORïŒ
bool t = (!q); // åŠå®ïŒNOTïŒ
// 代å
¥æŒç®å
int u = 5;
u += 10; // å ç®ããŠä»£å
¥
u -= 5; // æžç®ããŠä»£å
¥
u *= 2; // ä¹ç®ããŠä»£å
¥
u /= 4; // é€ç®ããŠä»£å
¥
u %= 3; // å°äœããŠä»£å
¥
// ãããæŒç®å
int v = 0b101010, w = 0b110011;
int x = (v & w); // è«çç©ïŒANDïŒ
int y = (v | w); // è«çåïŒORïŒ
int z = (v ^ w); // æä»çè«çåïŒXORïŒ
int aa = (~v); // å転ïŒNOTïŒ
// ã·ããæŒç®å
int bb = 0b101010;
int cc = (bb << 2); // å·Šã·ãã
int dd = (bb >> 2); // å³ã·ãã
// æ¡ä»¶æŒç®åïŒäžé
æŒç®åïŒ
int ee = (h > 5) ? 10 : 20;
// ãã®ä»ã®æŒç®å
int ii = 5;
ii++; // ã€ã³ã¯ãªã¡ã³ã
ii--; // ãã¯ãªã¡ã³ã
int jj = (ii > 5) ? 10 : 20; // æ¡ä»¶æŒç®åïŒäžé
æŒç®åïŒ
return 0;
}
</syntaxhighlight>
:ãããã®æŒç®åã¯ãæ¡ä»¶åŒãã«ãŒãå¶åŸ¡ãªã©ã§ãã䜿çšãããŸãã
:boolã¯intã®å¥åã§ã0ãåœã»0以å€ãçã«ãªããŸãã
以äžã¯æååã«é¢ããæŒç®åã®äŸã§ãã
:<syntaxhighlight lang=pike>
int main() {
string s1 = "Hello";
string s2 = "World";
// æååçµåæŒç®å
write("%O + %O => %O\n", s1, s2, s1 + s2); // => "HelloWorld"
// éšåæååæŒç®å
write("%O[0..2] => %O\n", s1, s1[0..2]); // => "Hello"[0..2] => "Hel"
// == (çãã)
write("%O == %O is %d\n", s1, s2, s1 == s2); // => "Hello == World is 0"
// != (çãããªã)
write("%O != %O is %d\n", s1, s2, s1 != s2); // => "Hello != World is 1"
// > (ãã倧ãã)
write("%O > %O is %d\n", s1, s2, s1 > s2); // => "Hello > World is 0"
// >= (以äž)
write("%O >= %O is %d\n", s1, s2, s1 >= s2); // => "Hello >= World is 0"
// <
write("%O < %O is %d\n", s1, s2, s1 < s2); // => "Hello < World is 1"
// <= (以äž)
write("%O <= %O is %d\n", s1, s2, s1 <= s2); // => "Hello <= World is 1"
return 0;
}
</syntaxhighlight>
Pikeã®æŒç®åã®äžã«ã¯ãæ°åŠçãªæå³ããé¢ããå®çŸ©ã®ãã®ããããŸãã
:<syntaxhighlight lang=pike>
int main() {
string str = "The quick brown fox jumps over the lazy dog";
array(string) ary = str / " ";
// => ({ "The", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog" })
string s2 = ary * ", ";
write("%O\n", s2);
// => "The, quick, brown, fox, jumps, over, the, lazy, dog"
return 0;
}
</syntaxhighlight>
ãã®ããã°ã©ã ã§ã¯ãPikeã®æååã®<code>/</code>æŒç®åãšãé
åã®<code>*</code>æŒç®åã䜿ã£ãŠããŸãã
ãŸããæåå <code>str</code> ã <code>"/"</code> (ã¹ããŒã¹) ã§åå²ããŠã<code>array(string)</code> åã®å€æ° <code>ary</code> ã«ä»£å
¥ããŠããŸãã
ãã®æŒç®ã«ããã<code>ary</code> ã«ã¯ <code>str</code> ãåèªããšã«åå²ããæååã®é
åãæ ŒçŽãããŸãã
äŸãã°ã<code>ary[0]</code> ã«ã¯ <code>"The"</code> ãæ ŒçŽãããŸãã
ãã®åäœã¯ãå€ãã®ã¹ã¯ãªããã£ã³ã°èšèªã®<code>split()</code>é¢æ°ã«çžåœããŸãã
次ã«ã<code>ary</code> ã®åèŠçŽ ã <code>", "</code> ã§çµåããŠãæ°ããæåå <code>s2</code> ãäœæããŠããŸãã
ãã®æŒç®ã«ããã<code>s2</code> ã«ã¯ <code>ary</code> ã®åèŠçŽ ã <code>", "</code> ã§çµåãããæååãæ ŒçŽãããŸãã
äŸãã°ã<code>s2</code> ã«ã¯ <code>"The, quick, brown, fox, jumps, over, the, lazy, dog"</code> ãæ ŒçŽãããŸãã
ãã®åäœã¯ãå€ãã®ã¹ã¯ãªããã£ã³ã°èšèªã®<code>join()</code>é¢æ°ã«çžåœããŸãã
æåŸã«ã<code>swrite</code> é¢æ°ã䜿ã£ãŠã<code>s2</code> ã®å
容ã衚瀺ããŠããŸãã
<code>write</code> é¢æ°ã¯<code>sprintf</code> é¢æ°ã®æ©èœãå«ãã§ãããæå®ãããã©ãŒãããã«åŸã£ãŠãæååãçæããé¢æ°ã§ãã
<code>"%O\n"</code> ã¯ãæååãåºåãããã©ãŒãããæååã§ããã<code>%O</code> ã¯ãPike ã®ãªããžã§ã¯ããæååã«å€æããããã®å€æã¿ã€ãã§ãã
==== Pikeã§ã¯æŒç®åãé¢æ° ====
ãPikeã§ã¯æŒç®åãé¢æ°ããšã¯ãPikeã«ãããŠæŒç®å (ããšãã° <code>+</code>, <code>-</code>, <code>*</code>, <code>/</code> ãªã©) ãåãªãèšå·ã§ã¯ãªããããããã察å¿ããé¢æ°ãšããŠå®çŸ©ãããŠãããšããããšãæããŸãã
äŸãã°ã<code>+</code> æŒç®åã¯ã2ã€ã®æ°å€ã足ãåãããããã«äœ¿ãããŸãããå®éã«ã¯ <code>`+</code> é¢æ°ãšããŠå®çŸ©ãããŠããŸãã
以äžã®ããã« <code>`+</code> é¢æ°ã䜿ã£ãŠè¶³ãç®ãè¡ãããšãã§ããŸãã
:<syntaxhighlight lang=pike>
int main() {
int a = 1;
int b = 2;
int c = `+(a, b); // a + b ãšåã
write("`+(%d, %d) -> %d\n", a, b, c);
// => `+(1, 2) -> 3
return 0;
}
</syntaxhighlight>
ãŸãã<code>*</code> æŒç®åãåæ§ã« <code>`*</code> é¢æ°ãšããŠå®çŸ©ãããŠããŸãã以äžã®ããã«ãæååã«å¯Ÿã㊠<code>*</code> é¢æ°ã䜿ã£ãŠãæå®ããåæ°ã ãç¹°ãè¿ããæ°ããæååãäœãããšãã§ããŸãã
:<syntaxhighlight lang=pike>
int main() {
string str = "hello";
string new_str = `*(str,3); // str * 3 ãšåã
write("%O\n", new_str);
// => "hellohellohello"
return 0;
}
</syntaxhighlight>
ãã®ããã«ãPikeã§ã¯æŒç®åãåãªãèšå·ã§ã¯ãªããããããã察å¿ããé¢æ°ãšããŠå®çŸ©ãããŠããŸãã
ãã®ãããªé¢æ°ã®æ§è³ªããã€æŒç®åã®åã調ã¹ãŠã¿ãŸãããã
:<syntaxhighlight lang=pike>
int main() {
write("%t\n", `+);
// => function
write("%t\n", main);
// => function
return 0;
}
</syntaxhighlight>
:* `+ ã®åã¯ãmain ãšåã function ã ãšããããŸãã
:* write ã® %t ã¯ãPikeåºæã®å€æã¿ã€ãã§ãåŒæ°ã®åã衚瀺ããŸãã
:<syntaxhighlight lang=pike>
int main() {
function f = `+;
write("f = `+\n");
write("f(%d, %d) -> %d\n", 3, 4, f(3, 4));
// => f(3, 4) -> 7
f = lambda(int x, int y) {
int result = 1;
for (int i = 0; i < y; i++)
result *= x;
return result;
};
write("f(%d, %d) -> %d\n", 3, 4, f(3, 4));
// => f(3, 4) -> 81
return 0;
}
</syntaxhighlight>
ãã®ã³ãŒãã¯ãPikeã§é¢æ°ãå®çŸ©ããŠåŒã³åºãæ¹æ³ã瀺ããŠããŸãã
æåã«ã<code>`+</code> é¢æ°ã f ãšããå€æ°ã«ä»£å
¥ããŠããŸãããã㧠+ ã¯ãå ç®æŒç®å "+" ã«å¯Ÿå¿ããé¢æ°ã§ãããã®åŸãf ã«æž¡ãåŒæ°ãæå®ããŠãf é¢æ°ãåŒã³åºããŠããŸãã
次ã«ãf ã«å¥ã®é¢æ°ã代å
¥ããŠããŸããããã§ã¯ãã©ã ãåŒã䜿ã£ãŠãäžãããã2ã€ã®åŒæ°ãæãåãããé¢æ°ãå®çŸ©ããŠããŸãããã®åŸãf é¢æ°ãå床åŒã³åºããŠãæ°ããé¢æ°ãæ£ããåäœããŠããããšã確èªããŠããŸãã
Pikeã§ã¯ãé¢æ°ãå€æ°ã«ä»£å
¥ããããšãã§ãããããåçã«é¢æ°ãåãæ¿ããããšãã§ããŸãããã®æ©èœã䜿ãããšã§ãããã°ã©ã ã®æè»æ§ãé«ããããšãã§ããŸãã
==== ã©ã ãé¢æ° ====
Pikeã«ãããã©ã ãé¢æ°ãšã¯ãç¡åã®é¢æ°ãå®çŸ©ããããã®æ¹æ³ã®äžã€ã§ããã©ã ãé¢æ°ãå®çŸ©ããã«ã¯ã<code>lambda</code> ããŒã¯ãŒãã䜿ããŸãã
äŸãã°ã以äžã®ãã㪠<code>lambda</code> é¢æ°ãå®çŸ©ããŠã¿ãŸãããã
:<syntaxhighlight lang=pike>
function square = lambda(int x) { return x * x; };
write("square(%d) -> %d\n", 3, square(3));
// => square(3) -> 9
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ã<code>lambda</code> ããŒã¯ãŒãã䜿ã£ãŠãåŒæ°ãšããŠæŽæ° <code>x</code> ãåãåãã<code>x * x</code> ãè¿ã <code>square</code> é¢æ°ãå®çŸ©ããŠããŸãã
ãã®åŸã<code>square(3)</code> ã®ããã«ããŠãåŒæ°ãšããŠæŽæ° <code>3</code> ãæž¡ã㊠<code>square</code> é¢æ°ãåŒã³åºããŠããŸãã
ãã®åŒã³åºãã«ãã£ãŠã<code>9</code> ãè¿ãããŸãã
==== Automap ====
é
åã®èŠçŽ ããšã«æäœãè¡ãããã«ãmap()ã«ã¯äŸ¿å©ãªæ§æããããŸãããã®æ§æã䜿çšããããšã§ãã³ãŒããããèªã¿ãããããããšãã§ããŸãã
:<syntaxhighlight lang=pike>
int main() {
array a = ({1,3,5,7,9}), b = ({2,4,6,8,10}), c;
c = a[*] + b[*];
write("c ->\n");
write("\t%O\n", c[*]);
//=> c ->
//=> 3
//=> 7
//=> 11
//=> 15
//=> 19
c[*] += 10;
write("\nc = %O\n", c);
//=> c = ({ /* 5 elements */
//=> 13,
//=> 17,
//=> 21,
//=> 25,
//=> 29
//=> })
return 0;
}
</syntaxhighlight>
:ãã®ããã°ã©ã ã§ã¯ã3ã€ã®é
åaãbãcã䜿çšããŠããŸãã
:é
åaã«ã¯1ã3ã5ã7ã9ã®èŠçŽ ãæ ŒçŽãããŠããŸãã
:é
åbã«ã¯2ã4ã6ã8ã10ã®èŠçŽ ãæ ŒçŽãããŠããŸãã
:é
åcã¯äžæçãªé
åã§ãçµæãæ ŒçŽããããã«äœ¿çšãããŸãã
:次ã®è¡ã§ã¯ãautomapãšããæ§æã䜿çšããŠãé
åaãšé
åbã®èŠçŽ ããšã®åãèšç®ããçµæãé
åcã«ä»£å
¥ããŠããŸãã
::<syntaxhighlight lang=pike>
c = a[*] + b[*];
</syntaxhighlight>
:é
åcã®èŠçŽ æ°å
šãŠã«å¯Ÿãé ã«é¢æ°ãé©çšããŸãã
::<syntaxhighlight lang=pike>
write("\t%O\n", c[*]);
</syntaxhighlight>
:次ã«ãé
åcã®å
šãŠã®èŠçŽ ã«10ãå ç®ããŠããŸãã
:æåŸã«ãæŽæ°ãããé
åcãïŒ
Oæ§æã§è¡šç€ºããŠããŸãã
== å®æ° ==
{{å
é ã«æ»ã}}
å®æ°ã¯ãããã°ã©ãã³ã°ã«ãããŠç¹å®ã®å€ã«ååãä»ããããã«äœ¿ããããã®ã§ãäžåºŠå®çŸ©ãããããã®å€ãå€æŽããããšãã§ããŸããã
æ§æã¯ä»¥äžã®ããã§ãã
:<syntaxhighlight lang=pike>
constant èå¥å = åæå€ ;
</syntaxhighlight>
Pikeèšèªã§ã¯ãå®æ°ã¯åæå€ããã®åæšè«ãè¡ããŸããã€ãŸããå®æ°ã®åã¯åæå€ã«åºã¥ããŠèªåçã«æ±ºå®ãããŸããå€æ°ãšã¯ç°ãªããæ瀺çãªå宣èšã¯å¿
èŠãããŸããã
== sprinf() ã®æžåŒæåå ==
{{å
é ã«æ»ã}}
Pikeã®<code>sprintf()</code>ã¯ãæååããã©ãŒãããããããã®é¢æ°ã§ãã
<code>write()</code>ã<code>sprintf()</code>ãšåãæžåŒæååã䜿ã£ãŠãã©ãŒãããåºæ¥ãŸãã
{{See also|[[#å€æã¿ã€ããšä¿®é£Ÿå]]}}
:<syntaxhighlight lang=pike>
int main() {
// æ°å€ã®ãã©ãŒããã
write("%d, %f\n", 123, 3.1415926536); //=> 123, 3.142
// æååã®ãã©ãŒããã
write("Hello, %s!\n", "Alice"); //=> Hello, Alice!
// æåå¹
ã®æå®(å·Šè©°ã)
write("|%-10sWorld|\n", "Hello"); //=> |Hello World|
// æåå¹
ã®æå®(äžå€®æã)
write("|%|10sWorld|\n", "Hello"); //=> | Hello World|
// æåå¹
ã®æå®(å³è©°ã)
write("|%10sWorld|\n", "Hello"); //=> | HelloWorld|
// 笊å·ãšä¿®é£Ÿåã®äœ¿çš
int n = 123456;
write("%+d, %0*d\n", n, 8, n); //=> +123456, 00123456
// é
å
write("%O\n", ({2,3,5,7,11}));
// ({ /* 5 elements */
// 2,
// 3,
// 5,
// 7,
// 11
// })
return 0;
}
</syntaxhighlight>
ãã®ããã°ã©ã ã¯ãPikeã§<code>write</code>é¢æ°ã䜿çšããŠãæ°å€ãæååãããã³æŽæ°ã®ãã©ãŒããããè¡ãæ¹æ³ã瀺ããŠããŸãã
æåã®äŸã§ã¯ã<code>%d</code>ãš<code>%f</code>ã䜿çšããŠãæŽæ°ãšæµ®åå°æ°ç¹æ°ããã©ãŒãããããŠããŸãã
<code>%f</code>ã§ã¯ãå°æ°ç¹ä»¥äž4æ¡ãŸã§è¡šç€ºããããã«æå®ãããŠããŸãã
次ã®äŸã§ã¯ã<code>%s</code>ã䜿çšããŠãæååããã©ãŒãããããŠããŸãã
<code>write</code>é¢æ°ã䜿çšããããšã§ãåã蟌ãæååãåçã«å€æŽããããšãã§ããŸãã
次ã«ãæåå¹
ã®æå®ã«ã€ããŠèª¬æããŸããæåå¹
ãæå®ããã«ã¯ã<code>%s</code>ã®åã«<code>%10s</code>ã®ããã«æ°åãå
¥ããŸãã
ããã¯ã衚瀺ããæååãå ããå¹
ãæå®ãããã®ã§ãã
ãŸãã<code>%-10s</code>ã®ããã«<code>-</code>ãä»ãããšãå·Šæãã«ãªããŸãã
<code>%10s</code>ã§ã¯å³æãã«ãªããŸãããæå®ããæååãå ããå¹
ãããé·ãå Žåã¯ãæååã®å³ç«¯ããåãæšãŠãããŸãã
<code>%|10s</code>ã§ã¯äžå€®æãã«ãªããŸãã
æåŸã«ã笊å·ãšä¿®é£Ÿåã®äœ¿çšã«ã€ããŠèª¬æããŸãã<code>%+d</code>ã䜿çšãããšã笊å·ãä»ããŠæŽæ°ããã©ãŒãããããããšãã§ããŸãã
<code>%0*d</code>ã䜿çšãããšãæŽæ°ãæå®ããæ¡æ°ã«ãªãããã«0ã§ããã£ã³ã°ããŠè¡šç€ºããããšãã§ããŸãã
ããããã®<code>write</code>é¢æ°ã®äœ¿çšäŸãå®è¡ããéã«åŸãããåºåã¯ãã³ã¡ã³ãã®åŸã«ç€ºãããŠããŸãã
=== å€æã¿ã€ããšä¿®é£Ÿå ===
<code>sprintf()</code>é¢æ°ã¯ãæžåŒæååãšããç¹æ®ãªæååãåãåããããã解éããŠæååãäœæããŸãã
æžåŒæååã¯ãåºåããæååå
ã§ç¹å®ã®å€ã眮ãæããããã«äœ¿çšãããŸããæžåŒæååã¯ã<code>%</code>ã«ç¶ãæåã§å§ãŸããç¹å®ã®åœ¢åŒã§åŒæ°ãåãåãããšãã§ããŸããããšãã°ã<code>%d</code>ã¯æŽæ°ã®æžåŒæååã§ããã<code>%s</code>ã¯æååã®æžåŒæååã§ãã
æžåŒæååã«ã¯ãå€æã¿ã€ã( conversion type )ã«ä¿®é£Ÿå( params )ãè¿œå ããããšãã§ããŸãã修食åã¯ãæžåŒæååã«å¯ŸããŠåäœãå€æŽããããã«äœ¿çšãããå€æã¿ã€ãã¯ãåºåã®åœ¢åŒãå¶åŸ¡ããããã«äœ¿çšãããŸããå€æã¿ã€ããšä¿®é£Ÿåã¯ã<code>%</code>ã®åŸã«ç¶ããŠæå®ããããšãã§ããŸãã
:{| class=wikitable
|+å€æã¿ã€ã
!å€æã¿ã€ã
!説æ
|-
!'%'
|ããŒã»ã³ã
|-
!'b'
|笊å·ä»ãã®2é²æ°æŽæ°
|-
!'d'
|笊å·ä»ãã®10é²æ°æŽæ°
|-
!'u'
|笊å·ãªãã®10é²æ°æŽæ°
|-
!'o'
|笊å·ä»ãã®8é²æ°æŽæ°
|-
!'x'
|å°æåã®ç¬Šå·ä»ã16é²æ°æŽæ°
|-
!'X'
|倧æåã®ç¬Šå·ä»ã16é²æ°æŽæ°
|-
!'c'
|æåããã£ãŒã«ããµã€ãºãæå®ãããŠããå Žåããããã¯ãŒã¯ïŒããã°ãšã³ãã£ã¢ã³ïŒãã€ããªãŒããŒã®æŽæ°ã®äžäœãã€ããåºåããŸãããªãã«ãšã³ãã£ã¢ã³ãã€ããªãŒããŒãåŸãã«ã¯ããã£ãŒã«ããµã€ãºãåŠå®ããŠãã ããã
|-
!'f'
|æµ®åå°æ°ç¹æ°ïŒãã±ãŒã«äŸåã®ãã©ãŒãããïŒ
|-
!'g'
|æµ®åå°æ°ç¹æ°ã®èªåéžæè¡šçŸïŒãã±ãŒã«äŸåã®ãã©ãŒãããïŒ
|-
!'G'
|%gãšåæ§ã§ãããææ°éšåã倧æåã®'E'ã§åºåããŸãã
|-
!'e'
|ææ°è¡šèšã®æµ®åå°æ°ç¹æ°ïŒãã±ãŒã«äŸåã®ãã©ãŒãããïŒ
|-
!'E'
|%eãšåæ§ã§ãããææ°éšåã倧æåã®'E'ã§åºåããŸãã
|-
!'F'
|ãã€ããªIEEEè¡šçŸã®æµ®åå°æ°ç¹æ°ïŒ%4Fã¯å粟床浮åå°æ°ç¹æ°ã%8Fã¯å粟床浮åå°æ°ç¹æ°ãåºåããŸãïŒããããã¯ãŒã¯ïŒããã°ãšã³ãã£ã¢ã³ïŒãã€ããªãŒããŒã§åºåãããŸãããªãã«ãšã³ãã£ã¢ã³ãã€ããªãŒããŒãåŸãã«ã¯ããã£ãŒã«ããµã€ãºãåŠå®ããŠãã ããã
|-
!'s'
|æåå
|-
!'q'
|ã¯ã©ãŒããããæååãå¶åŸ¡æåã8ããããè¶
ããæåãããã³åŒçšç¬Šæå'\'ããã³'"'ããšã¹ã±ãŒãããŸãã
|-
!'O'
|ä»»æã®å€ããããã°ã¹ã¿ã€ã«ã§ããæ£ç¢ºãªãã©ãŒãããã«äŸåããªãã§ãã ãããlfun::_sprintfïŒïŒã¡ãœããã®å®è£
è
ããããã°ã«å¿
èŠãšããä»»æã®åºå圢åŒãæå®ã§ããŸãã
|-
!'p'
|ãªããžã§ã¯ãã®ã¡ã¢ãªã¢ãã¬ã¹ã®16é²æ°è¡šçŸãæŽæ°ãšæµ®åå°æ°ç¹æ°ã«ã¯ã¢ãã¬ã¹ããªããèªèº«ãåºåãããŸãã
|-
!'H'
|ãã€ããªã®ãã¬ãªã¹æååã sprintf("%c%s", strlen(str), str) ãšç䟡ã§ããåŒæ°ïŒå¹
ãªã©ïŒã¯ãã©ãŒãããã®é·ãéšåã調æŽããŸãã8ãããã®æååãå¿
èŠã§ãã
|-
!'n'
|åŒæ°ãªãã空ã®æååãåŒæ°ãšã㊠"%s" ãšåãã§ãã泚æïŒä¿®é£Ÿå '@' ãã¢ã¯ãã£ããªå Žåã¯åŒæ°é
åãåãåããŸããããã®å
容ã¯ç¡èŠãããŸãã
|-
!'t'
|åŒæ°ã®åã
|-
!'{'<hr>'}'
|åŒæ°é
åã®åèŠçŽ ã«å¯ŸããŠãå²ãŸãããã©ãŒããããå®è¡ããŸãã
|}
å€æã¿ã€ãã¯ãçç¥ã§ããå¿
ãïŒã€ã ãæå®ããŸãã
:{| class=wikitable
|+修食å
!修食å
!説æ
|-
! '0'
|æ°å€ã®åã«0ãä»ããŸãïŒå³æããæå³ããŸãïŒã
|-
! '!'
|åãæšãŠãåãæ¿ããŸãã
|-
! ' '
|æ£ã®æŽæ°ã®åã«ã¹ããŒã¹ãä»ããŸãã
|-
! '+'
|æ£ã®æŽæ°ã®åã«ãã©ã¹èšå·ãä»ããŸãã
|-
! '-'
|ãã£ãŒã«ãå¹
å
ã§å·ŠæãïŒããã©ã«ãã¯å³æãïŒã
|-
! <nowiki>'|'</nowiki>
|ãã£ãŒã«ãå¹
å
ã«äžå€®æããŸãã
|-
! '='
|æååããã£ãŒã«ãå¹
ãã倧ããå Žåãåã¢ãŒãïŒåèªã®éã«æ¹è¡ãæ¿å
¥ããã¹ããŒã¹ãã¹ããããŸãã¯è¿œå ããããšããããŸãïŒã '/'ãšäžç·ã«äœ¿çšã§ããŸããã
|-
! '/'
|åèªã®éã§ã¯ãªããã£ãŒã«ãå¹
ã§æ¹è¡ããåã¢ãŒãã«ããŸãã '='ãšäžç·ã«äœ¿çšã§ããŸããã
|-
! '#'
| '\n'ã§åºåãããåèªã®ãªã¹ãã衚瀺ããããŒãã«ã¢ãŒããäžããäžãžã®é åºã§ãã
|-
! '$'
|å転ããŒãã«ã¢ãŒãïŒå·Šããå³ãžã®é åºïŒã
|-
! 'n'
|ïŒnã¯æ°åãŸãã¯*ã§ãïŒãã£ãŒã«ãå¹
å€æã¿ã€ãã
|-
! ':n'
|å°æ°ç¹ä»¥äžã®æ¡æ°å€æã¿ã€ãã
|-
! '.n'
|å°æ°ç¹ä»¥äžã®æ¡æ°å€æã¿ã€ãã
|-
! ';n'
|åå¹
å€æã¿ã€ãã
|-
! '*'
|nã*ã®å Žåã次ã®åŒæ°ã¯ç²ŸåºŠ/ãã£ãŒã«ããµã€ãºã«äœ¿çšãããŸããåŒæ°ã¯æŽæ°ãŸãã¯lfun::_sprintfïŒïŒãåä¿¡ãã修食ãããã§ããå ŽåããããŸãã
|-
!"precision"
|int
|-
!"width"
|intïŒ0..ïŒ
|-
!"flag_left"
|bool
|-
!"indent"
|intïŒ0..ïŒ
|-
!"'"
|ãããæååãèšå®ããŸãã 'ã¯ïŒãŸã ïŒãããæååã®äžéšã«ããããšã¯ã§ããŸããã
|-
! '~'
|åŒæ°ãªã¹ããããããæååãååŸããŸãã
|-
! '<'
|åãåŒæ°ãå床䜿çšããŸãã
|-
! '^'
|çæãããåè¡ã§ãããç¹°ãè¿ããŸãã
|-
! '@'
|åŒæ°é
åã®åèŠçŽ ã«å¯ŸããŠãã®ãã©ãŒããããç¹°ãè¿ããŸãã
|-
! '>'
|æååãåã®äžç«¯ã«çœ®ããŸãïŒäžç«¯ã§ã¯ãªãïŒã
|-
! '_'
|å¹
ãããŒã¿ã®é·ãã«èšå®ããŸã
|}
修食åã¯çç¥ã§ããŸãã
== å¶åŸ¡æ§é ==
{{å
é ã«æ»ã}}
Pikeã®å¶åŸ¡æ§é ã¯ãããã°ã©ã ã®å®è¡ãããŒãå¶åŸ¡ããããã®æ§æãæ§é ã®ããšãæããŸãããããã®å¶åŸ¡æ§é ã«ã¯ãæ¡ä»¶åå²ãã«ãŒããå埩ãªã©ãå«ãŸããŸããPikeã§ã¯ã以äžã®ãããªäž»èŠãªå¶åŸ¡æ§é ããããŸãïŒ
;æ¡ä»¶åå²
:; if: æ¡ä»¶ã«å¿ããŠå®è¡ããã³ãŒããéžæããŸããæ¡ä»¶ãçã®å Žåã«ã¯ifãããã¯ãå®è¡ãããåœã®å Žåã«ã¯elseãããã¯ãå®è¡ãããŸãã
:;switch: æ¡ä»¶ã«ãã£ãŠè€æ°ã®éžæè¢ã®äžãã1ã€ãéžæããŸããåŒã®çµæã«å¿ããŠã察å¿ããcaseæãå®è¡ãããŸãã
;ã«ãŒã: æ¡ä»¶ãæºããããŠããéããããã¯ç¹å®ã®åæ°ç¹°ãè¿ãåŠçãè¡ããŸãã
:;while:ã«ãŒãã®åã«æ¡ä»¶ããã¹ãããŸãã
:;do-while: ã«ãŒãã®åŸã«æ¡ä»¶ããã¹ãããŸãã
:;for:ã«ãŒãã®éå§åã«åæåãè¡ããã«ãŒãããšã«æ¡ä»¶ããã¹ãããå¢å ã»æžå°ãªã©ãè¡ããŸãã
:;foreach: foreachæã¯ãé
åããªã¹ãã®åèŠçŽ ã«å¯ŸããŠäžé£ã®æäœãå®è¡ããŸããforeachæ§æã䜿çšããããšã§ãå埩åŠçãç°¡æœã«èšè¿°ã§ããŸãã
ãããã®å¶åŸ¡æ§é ãçµã¿åãããŠãè€éãªããã°ã©ã ã®å¶åŸ¡ãããŒãæ§ç¯ããããšãã§ããŸãã
ããã«ãããæ¡ä»¶ã«åºã¥ããåŠçãç¹°ãè¿ãåŠçãå¹ççã«å®è£
ããããšãã§ããŸãã
=== æ¡ä»¶åå² ===
æ¡ä»¶åå²ã¯ããã¹ãæ¡ä»¶ãäžããããå®è¡ããã³ãŒããéžæããå¶åŸ¡æ§é ã§ãã
ãããã¯ããã€ããªã®ãå®è¡ãããããªããããããå
¥åãã©ã¡ãŒã¿ã«åºã¥ããŠå®è¡ããã³ãŒããéžæãã倧èŠæš¡ãªã³ãŒãè¡šãŸã§ãããŸããŸã§ãã
==== if ====
æãåçŽãªæ¡ä»¶åå²ã¯ãifæã§ããifæã¯ãæãæåŸ
ãããã©ãã«ã§ãæžãããšãã§ãã次ã®ããã«èŠããŸãã
:<syntaxhighlight lang=pike line>
if (æ¡ä»¶åŒ)
æ1;
else
æ2;
;
</syntaxhighlight>
ã«ãã³ã®åŸããelseã®åŸãã«ã¯ã»ãã³ãã³ããªãããšã«æ³šæããŠãã ãããifæã®åŠçã¯æ¬¡ã®ããã«è¡ãããŸãã
#æåã«æ¡ä»¶åŒãè©äŸ¡ããŸãã
#:è©äŸ¡çµæãfalseã®å Žåã4ã«ãžã£ã³ãããŸãã
#æ1ãå®è¡ããŸãã
#:5ã«ãžã£ã³ãããŸãã
#ã
#æ2ãå®è¡ããŸãã
#åŠçãå®äºããŸãã
èŠããã«ãæ¡ä»¶åŒãtrueã®å Žåã¯æ1ãå®è¡ããããã以å€ã®å Žåã¯æ2ãå®è¡ãããŸãã
æ¡ä»¶åŒãfalseã®å Žåã«äœããå®è¡ããå¿
èŠããªãå Žåã¯ãelseéšåãå
šãŠçç¥ããããšãã§ããŸãã
:<syntaxhighlight lang=pike>
if ( æ¡ä»¶åŒ )
æ1;
</syntaxhighlight>
éã«ãæ¡ä»¶åŒãfalseã®å Žåã«äœããè©äŸ¡ããå¿
èŠããªãå Žåã¯ãnotæŒç®åã䜿çšããŠåŒã®true/falseå€ãå転ããå¿
èŠããããŸãã
:<syntaxhighlight lang=pike>
if ( ! æ¡ä»¶åŒ )
æ2;
</syntaxhighlight>
ããã«ããæã¯ããã®ç« ã®æ®ãã®æãšåæ§ã«ãæã®ãããã¯ã§ããå ŽåããããŸãããããã¯ãšã¯ãã»ãã³ãã³ã§åºåãããæã®ãªã¹ãã§ãäžæ¬åŒ§ { } ã§å²ãŸããŠããŸãã泚æç¹ãšããŠããããã¯ã®åŸãã«ã¯ã»ãã³ãã³ãã€ããªãã§ãã ãããäžèšã®äŸã¯æ¬¡ã®ããã«ãªããŸãã
:<syntaxhighlight lang=pike>
if ( ! æ¡ä»¶åŒ ) {
æA;
æB;
æC;
}
</syntaxhighlight>
ãŸããè€æ°ã®ifæãé çªã«é
眮ããŠãæåã®åŒãfalseã§ããå Žåã¯ã次ã®åŒã次ã®åŒãªã©ãç¶ããŠãæåã®trueåŒãèŠã€ãããŸã§ç¶ããããšãã§ããŸãã
:<syntaxhighlight lang=pike>
if ( åŒ1 )
æ1;
else if ( åŒ2 )
æ2;
else if ( åŒ3 )
æ3;
else
æ4;
</syntaxhighlight>
äžèšã®äŸã®ç¹æ®ãªå Žåã¯ãååŒã§1ã€ã®å€æ°ãç°ãªãå€ãšæ¯èŒããå Žåã§ãã
ãã®ãããªã¢ããªã±ãŒã·ã§ã³ã§ã¯ãäžèšã§èª¬æããswitchæã䜿çšããŠããã©ãŒãã³ã¹ãåäžãããã³ãŒããç°¡çŽ åããããšãã§ããŸãã
==== switch ====
switchæã¯ãæ¡ä»¶ã«å¿ããŠè€æ°ã®éžæè¢ã®äžãã1ã€ãéžæããããã®ãããé«åºŠãªå¶åŸ¡æ§é ã§ãã以äžã®ãããªåœ¢åŒã«ãªããŸãã
:<syntaxhighlight lang=pike>
switch (åŒ) {
case å®æ°1:
æ1;
break;
case å®æ°2:
æ2;
break;
case å®æ°3 .. å®æ°4:
æ3;
break;
case å®æ°5:
case å®æ°6:
æ4;
// Fallthrough
default:
æ5;
}
</syntaxhighlight>
switchæã¯ãifæãããå°ãè€éãªæ§é ãããŠããŸããããŸã ããªãåçŽã§ãã
ãŸããåŒãè©äŸ¡ãã次ã®ãããã¯å
ã®å
šãŠã®caseæãæ€çŽ¢ããŸãã
åŒã«ãã£ãŠè¿ãããå€ãšçãããã®ãèŠã€ããã°ãPikeã¯ãã®caseæã®çŽåŸã«ç¶ãã³ãŒããå®è¡ãç¶ããŸãã
breakãåºçŸãããšãPikeã¯ã¹ã€ãããããã¯ã®æ®ãã®ã³ãŒããã¹ããããããããã¯ã®åŸã«ç¶ãã³ãŒããå®è¡ããŸãã
次ã®caseæã®åã«breakããªããŠããå¿
ãããå³å¯ã«å¿
èŠã§ã¯ãããŸããã
次ã®caseæã®åã«breakããªãå ŽåãPikeã¯åã«å®è¡ãç¶ãããã®caseæã®çŽåŸã®ã³ãŒããå®è¡ããŸãã
äžèšã®äŸã®caseæã®1ã€ã¯ãç¯å²ã§ãããšããç¹ã§ç°ãªããŸãã
ãã®å Žåãå®æ°3ãšå®æ°4ã®éã®ä»»æã®å€ãæ3ã«ãžã£ã³ãããããã«ãªããŸãã
ç¯å²ã¯ãå®æ°3ãšå®æ°4ã®å€ãå«ãããšã«æ³šæããŠãã ããã
;ãŸãšã
:<syntaxhighlight lang=pike>
int main()
{
int x = 3;
int y = 5;
// ifæ
if (x < y) {
write("x is less than y\n");
}
else if (x > y) {
write("x is greater than y\n");
}
else {
write("x and y are equal\n");
}
// switchæ
switch (x) {
case 1:
write("x is 1\n");
break;
case 2:
write("x is 2\n");
break;
case 3:
write("x is 3\n");
break;
default:
write("x is not 1, 2, or 3\n");
break;
}
return 0;
}
</syntaxhighlight>
=== å埩 ===
å埩ã¯ãã³ãŒãã0å以äžå®è¡ããããã«äœ¿çšãããŸããããã¯ãããªãç°ãªãæ¹æ³ã§å®è¡ã§ããããã4ã€ã®ç°ãªãå埩å¶åŸ¡æ§é ããããŸãããããã¯ãã¹ãŠéåžžã«äŒŒãŠããããã«èŠãããããããŸããããé©åãªæã«é©åãªãã®ã䜿çšãããšãã³ãŒãã¯çããã·ã³ãã«ã«ãªããŸãã
==== while ====
whileã¯ãã«ãŒãå¶åŸ¡æ§é ã®äžã§æãã·ã³ãã«ãªãã®ã§ããelseã®éšåãé€ããifæã®ããã«èŠããŸãã
<!-- Pikeã®whileã¯ãpythonãzigãšéãelseãšã¯çµåããŸããã -->
:<syntaxhighlight lang=pike>
while ( åŒ )
æ;
</syntaxhighlight>
åäœæ¹æ³ã®éãã¯å€§ãããªããããåŒãçã®å Žåã«æãå®è¡ãããŸãã
ãã®åŸãåŒãåè©äŸ¡ãããçã§ããã°æãå床å®è¡ãããŸãã
ããããåŒãå床è©äŸ¡ããç¹°ãè¿ããŸã... 以äžã¯äœ¿çšäŸã§ãã
:<syntaxhighlight lang=pike>
int e = 1;
while (e < 10) {
show_record(e);
e = e + 1;
}
</syntaxhighlight>
ããã«ãããshow_recordã1ã2ã3ã4ã®å€ã§åŒã³åºãããŸãã
==== for ====
forã¯ãåã«whileã®æ¡åŒµã§ããã«ãŒããããçããã³ã³ãã¯ãã«æžãããã®æ¹æ³ãæäŸããŸããæ§æã¯ä»¥äžã®ããã«ãªããŸãã
:<syntaxhighlight lang=pike>
for ( åæåæ ; æ¡ä»¶åŒ ; å ç®åŒ )
æ ;
</syntaxhighlight>
forã¯ã以äžã®æé ãå®è¡ããŸãã
# åæåæãå®è¡ããŸããåæåæã¯ãã«ãŒãå€æ°ãåæåããããã«äžåºŠã ãå®è¡ãããŸãã
# æ¡ä»¶åŒãè©äŸ¡ããŸã
#: çµæãfalseã®å Žåãã«ãŒããçµäºããã«ãŒãåŸã«ããã°ã©ã ãç¶è¡ããŸãã
# æãå®è¡ããŸãã
# å ç®åŒãå®è¡ããŸãã
# 2ããåéããŸãã
ããã«ãããwhileã»ã¯ã·ã§ã³ã®äŸã¯æ¬¡ã®ããã«æžãããšãã§ããŸãã
:<syntaxhighlight lang=pike>
for (int e = 1; e < 10; e = e + 1)
show_record(e);
</syntaxhighlight>
==== do-while ====
do-whileã¯ãwhileãšäŒŒãŠããŸãããå¿
ãäžåºŠã¯æãå®è¡ããããšãç°ãªããŸãã
:<syntaxhighlight lang=pike>
do
æ;
while ( åŒ ) ;
</syntaxhighlight>
åäœæ¹æ³ã®éãã¯å€§ãããªããããåŒãçã®å Žåã«æãå®è¡ãããŸãã
ãã®åŸãåŒãåè©äŸ¡ãããçã§ããã°æãå床å®è¡ãããŸãã
ããããåŒãå床è©äŸ¡ããç¹°ãè¿ããŸã... 以äžã¯äœ¿çšäŸã§ãã
:<syntaxhighlight lang=pike>
int e = 100;
do {
show_record(e);
e = e + 1;
} while (e < 10);
</syntaxhighlight>
ããã«ãããshow_recordã100ã§åŒã³åºãããŸãã
==== foreach(,) ====
foreachã¯ãã«ãŒãå
ã®åå埩ã«å¯ŸããŠæ瀺çãªãã¹ãåŒãè©äŸ¡ããªãç¹ã§ãŠããŒã¯ã§ãã
代ããã«ãforeachã¯ã»ããå
ã®åèŠçŽ ã«ã€ããŠ1åã ãæãå®è¡ããŸããforeachã«ã¯2ã€ã®æ§æããããæåã®æ§æã¯æ¬¡ã®ããã«ãªããŸãã
:<syntaxhighlight lang=pike>
foreach ( é
ååŒ, ã«ãŒãå€æ° )
æ;
</syntaxhighlight>
foreachãè¡ãããšã¯ä»¥äžã®éãã§ãã
#é
ååŒãè©äŸ¡ããŸããããã¯é
åãè¿ããªããã°ãªããŸããã
#é
åã空ã§ããã°ãã«ãŒããçµäºããŸãã
#次ã«ãé
åã®æåã®èŠçŽ ãã«ãŒãå€æ°ã«å²ãåœãŠãŸãã
#ãã®åŸãæãå®è¡ããŸãã
#é
åã«ããã«èŠçŽ ãããã°ã次ã®èŠçŽ ãå€æ°ã«å²ãåœãŠããããã以å€ã®å Žåã¯ã«ãŒããçµäºããŸãã
#4ã«ç§»åããŸãã
==== foreach(;;) ====
Pike-7.4.10 ãã foreach ã«æ°ããæ§æãè¿œå ãããŸããã
:<syntaxhighlight lang=pike>
foreach ( é
ååŒ; ã€ã³ããã¯ã¹å€æ°; ã«ãŒãå€æ° )
æ;
</syntaxhighlight>
:<syntaxhighlight lang=pike>
// foreachã«ãŒãã§é
åãå埩åŠçããã€ã³ããã¯ã¹ãšå€ã衚瀺ãã
void example_foreach() {
array numbers = ({2, 3, 5, 7, 11});
foreach (numbers; int index; int number) {
write("Index: %d, Value: %d\n", index, number);
}
}
// Array.Iteratorã䜿çšããŠé
åãå埩åŠçããã€ã³ããã¯ã¹ãšå€ã衚瀺ãã
void example_iterator() {
array numbers = ({2, 3, 5, 7, 11});
Array.Iterator iterator = Array.Iterator(numbers);
while (iterator) {
int index = iterator->index();
int value = iterator->value();
write("Index: %d, Value: %d\n", index, value);
iterator += 1;
}
}
// Mapping.Iteratorã䜿çšããŠããããå埩åŠçããããŒãšå€ã衚瀺ãã
void example_mapping_iterator() {
mapping data = ([ "a": 1, "b": 2, "c": 3 ]);
Mapping.Iterator iterator = Mapping.Iterator(data);
while (iterator) {
mixed index = iterator->index();
mixed value = iterator->value();
write("Index: %O, Value: %O\n", index, value);
iterator += 1;
}
}
// foreachãArray.IteratorãMapping.Iteratorã䜿çšããŠé
åãšããããå埩åŠçãã
int main() {
write("Using foreach:\n");
example_foreach();
write("\nUsing iterator on array:\n");
example_iterator();
write("\nUsing mapping iterator on mapping:\n");
example_mapping_iterator();
return 0;
}
</syntaxhighlight>
* <code>example_foreach</code>é¢æ°ã§ã¯ã<code>foreach</code>æã䜿çšããŠé
å <code>numbers</code> ã®èŠçŽ ãå埩åŠçããŠããŸããã«ãŒãããšã«ã<code>index</code> ã«çŸåšã®ã€ã³ããã¯ã¹ãã<code>number</code> ã«å¯Ÿå¿ããèŠçŽ ãå²ãåœãŠãããŸãããã®åŸã<code>index</code> ãš <code>number</code> ã®å€ã衚瀺ããŸãã
* <code>example_iterator</code>é¢æ°ã§ã¯ã<code>Array.Iterator</code>ã䜿çšããŠé
å <code>numbers</code> ã®ã€ãã¬ãŒã¿ãäœæãã<code>while</code>ã«ãŒãã䜿çšããŠã€ãã¬ãŒã¿ãå埩åŠçããŠããŸããã€ãã¬ãŒã¿ãæå¹ãªéãçŸåšã®ã€ã³ããã¯ã¹ã <code>index</code> ã«ååŸãã察å¿ããèŠçŽ ã <code>value</code> ã«ååŸããŸãããã®åŸã<code>index</code> ãš <code>value</code> ã®å€ã衚瀺ããŸãã
* <code>example_mapping_iterator</code>é¢æ°ã§ã¯ããããã³ã° <code>data</code> ã®ã€ãã¬ãŒã¿ãäœæãã<code>while</code>ã«ãŒãã䜿çšããŠã€ãã¬ãŒã¿ãå埩åŠçããŠããŸããã€ãã¬ãŒã¿ãæå¹ãªéãçŸåšã®ã€ã³ããã¯ã¹ã <code>index</code> ã«ååŸãã察å¿ããå€ã <code>value</code> ã«ååŸããŸãããã®åŸã<code>index</code> ãš <code>value</code> ã®å€ã衚瀺ããŸãã
* <code>main</code>é¢æ°ã§ã¯ãäžèšã®é¢æ°ã䜿çšããŠã<code>foreach</code>æãšã€ãã¬ãŒã¿ã®åäœããã¢ã³ã¹ãã¬ãŒã·ã§ã³ããŠããŸããããããã®ãã¢ã³ã¹ãã¬ãŒã·ã§ã³ã®çµæã衚瀺ãããŸãã
=== ã«ãŒãããã®è±åº ===
äžèšã®ã«ãŒãå¶åŸ¡æ§æã¯ããã¹ãŠã®åé¡ã解決ããã®ã«ååã§ããããã¹ãŠã®åé¡ã«ç°¡åãªè§£æ±ºçãæäŸããã«ã¯äžååã§ãã
ã«ãŒãã®éäžã§æãåºãããšãã§ããæ©èœãäžè¶³ããŠããŸãããããè¡ãæ¹æ³ã¯3ã€ãããŸãã
==== break ====
breakæã¯ãã«ãŒããswitchæã®äžã§äœ¿çšããããã®ãããã¯ããæãåºããŸãã以äžã¯ãbreakæã®æ§æãšäŸã§ãã
:<syntaxhighlight lang=pike>
while (æ¡ä»¶åŒ) {
// ã«ãŒãåŠç
if (æ¡ä»¶åŒ) {
break;
}
// ã«ãŒãåŠç
}
</syntaxhighlight>
æ¡ä»¶åŒãçã§ããéããã«ãŒãåŠçãç¹°ãè¿ããŸããããããifæã®æ¡ä»¶åŒãçã«ãªã£ãå Žåãbreakæãå®è¡ãããwhileã«ãŒãããæãåºããŸãã
==== continue ====
continueæã¯ãã«ãŒãå
ã§äœ¿çšããããã®æç¹ã§ã®åŠçãäžæãã次ã®ã«ãŒãåŠçãéå§ããŸãã以äžã¯ãcontinueæã®æ§æãšäŸã§ãã
:<syntaxhighlight lang=pike>
while (æ¡ä»¶åŒ) {
// ã«ãŒãåŠçåå
if (æ¡ä»¶åŒ) {
continue;
}
// ã«ãŒãåŠçåŸå
}
</syntaxhighlight>
æ¡ä»¶åŒãçã§ããéããã«ãŒãåŠçãç¹°ãè¿ããŸããããããifæã®æ¡ä»¶åŒãçã«ãªã£ãå Žåãcontinueæãå®è¡ãããã«ãŒãã®å
é ã«æ»ã£ãŠã次ã®ã«ãŒãåŠçãéå§ããŸãã
==== return ====
returnæã¯ãé¢æ°å
ã§äœ¿çšããããã®æç¹ã§ã®åŠçãçµäºããé¢æ°ããå€ãè¿ããŸãã以äžã¯ãreturnæã®æ§æãšäŸã§ãã
:<syntaxhighlight lang=pike>
int my_func(int x, int y) {
if (x == y) {
return 0;
}
// é¢æ°åŠç
return x + y;
}
</syntaxhighlight>
my_funcé¢æ°å
ã§ãxãšyãåãåããŸããifæã®æ¡ä»¶åŒãçã®å Žåã0ãè¿ããŸãããã以å€ã®å Žåã¯ãxãšyã®åèšå€ãè¿ããŸããreturnæãå®è¡ããããšãé¢æ°å
ã®åŠçã¯çµäºããé¢æ°ããå€ãè¿ãããŸãã
;[http://tpcg.io/_DALWWW ãŸãšã]
:<syntaxhighlight lang=pike>
int main() {
// whileã«ãŒã
int i = 0;
while (i < 10) {
write(i + "\n");
i++;
}
// do-whileã«ãŒã
int j = 0;
do {
write(j + "\n");
j++;
} while (j < 10);
// for(;;)ã«ãŒã
for (int k = 0; k < 10; k++) {
write(k + "\n");
}
// foreach(,)ã«ãŒã
array fruits = ({ "apple", "banana", "cherry" });
foreach (fruits, string fruit) {
write(fruit + "\n");
}
// foreach(;;)ã«ãŒã
array numbers = ({2, 3, 5, 7, 11});
foreach (numbers; int index; int number) {
write("Index: %d, Value: %d\n", index, number);
}
// breakæ
int l = 0;
while (l < 10) {
write(l + "\n");
l++;
if (l == 5) {
break;
}
}
// continueæ
int m = 0;
while (m < 10) {
m++;
if (m == 5) {
continue;
}
write(m + "\n");
}
// returnæ
int n = my_func(3, 5);
write(n + "\n");
return 0;
}
int my_func(int x, int y) {
if (x == y) {
return 0;
}
// é¢æ°åŠç
return x + y;
}
</syntaxhighlight>
== é¢æ° ==
{{å
é ã«æ»ã}}
é¢æ°ã¯ãPikeããã°ã©ã ã®äž»èŠãªæ§æèŠçŽ ã®1ã€ã§ãããè€æ°ã®æäœããŸãšããŠå®è¡ããããã«äœ¿çšãããŸããPikeã§ã®é¢æ°ã®åºæ¬çãªæŠå¿µã¯ãä»ã®å€ãã®ããã°ã©ãã³ã°èšèªãšåæ§ã«ãåŒæ°ãåãåããå®è¡å¯èœãªã³ãŒããããã¯ãå®çŸ©ããæ»ãå€ãè¿ãããšã§ãã
=== é¢æ°ã®å®çŸ©ãšåŒã³åºã ===
Pikeã§ã¯ãé¢æ°ã®å®çŸ©ã®æ§æã¯ä»¥äžã®ããã«ãªããŸãã
;é¢æ°ã®å®çŸ©:<syntaxhighlight lang=pike>
æ»å€å é¢æ°å(åŒæ°ãªã¹ã) {
// é¢æ°ã®åŠç
// returnæã§å€ãè¿ãïŒå¿
èŠãªå ŽåïŒ
}
</syntaxhighlight>
åŒæ°ãªã¹ãã¯ããä»®åŒæ°å ä»®åŒæ°åãã®ãã¢ãã,ãã§åºåã£ãïŒå以äžã®ãªã¹ãã§ãã
é¢æ°ã®åŒã³åºãã®æ§æã¯ä»¥äžã®ããã«ãªããŸãã
;é¢æ°ã®åŒã³åºã:<syntaxhighlight lang=pike>
æ»å€å å€æ° = é¢æ°å(åŒæ°ãªã¹ã);
</syntaxhighlight>
åŒæ°ãªã¹ãã¯ãå®åŒæ°ã¢ãã,ãã§åºåã£ãïŒå以äžã®ãªã¹ãã§ãã
ããã§ã¯ãå€æ°ã«æ»å€ãä¿æããŠããŸãããåŒã®äžã®é
ã«é¢æ°ã䜿ã£ããããã®ãŸãŸä»ã®é¢æ°ã®å®åŒæ°ã«ãããããããšãå¯èœã§ãã
:<syntaxhighlight lang=pike>
int add2(int a, int b) {
return a + b;
}
int main() {
int n = add2(2, 3);
write("n = %d\n", n); // => n = 5
return 0;
}
</syntaxhighlight>
äžèšã®ã³ãŒãã¯ã<code>add2</code>ãšããé¢æ°ãå®çŸ©ãããã®é¢æ°ã<code>main</code>é¢æ°ããåŒã³åºããŠããŸãã
<code>add2</code>é¢æ°ã¯ã2ã€ã®æŽæ° <code>a</code> ãš <code>b</code> ãåãåãããããã®å€ã足ããŠçµæãè¿ãé¢æ°ã§ãã
<code>main</code>é¢æ°ã§ã¯ã<code>add2(2, 3)</code>ãåŒã³åºããŠããã®çµæãå€æ° <code>n</code> ã«æ ŒçŽããŠããŸãããã®å ŽåãåŒæ°ãšã㊠<code>2</code> ãš <code>3</code> ãæž¡ããŠããã®ã§ãé¢æ°å
ã® <code>a</code> ã«ã¯ <code>2</code>ã<code>b</code> ã«ã¯ <code>3</code> ãæž¡ãããŸããçµæãšããŠã<code>add2(2, 3)</code> ã®è¿ãå€ã§ãã <code>5</code> ãå€æ° <code>n</code> ã«æ ŒçŽãããŸãã
æåŸã«ã<code>write</code>é¢æ°ã䜿ã£ãŠå€æ° <code>n</code> ã®å€ã衚瀺ããŠããŸããåºåçµæ㯠<code>n = 5</code> ãšãªããŸãã
ãã®äŸã§ã¯ãé¢æ° <code>add2</code> ãå®çŸ©ããŠåå©çšæ§ãé«ãã<code>main</code>é¢æ°ãããã®é¢æ°ãåŒã³åºããŠããŸããé¢æ°ã䜿ãããšã§ãåãåŠçãç¹°ãè¿ãæžãå¿
èŠããªããªããã³ãŒãã®ä¿å®æ§ãšå¯èªæ§ãåäžãããããšãã§ããŸãã
=== åŒæ°ã®é
åå±é ===
Pikeããã°ã©ãã³ã°ã§ã¯ãåŒæ°ã®é
åå±éãè¡ãããšãã§ããŸãã
é
åå±éã¯ã<code>f( @({ 2, 3 }) )</code>ã®ããã«é
åã«ã@ããå眮ãããã®å Žåã¯<code>f( 2, 3 )</code>ãšåãæå³ã«ãªããŸãã
é
åå±éã䜿ããšãé
åãåã
ã®åŒæ°ãšããŠé¢æ°ã«æž¡ãããšãã§ããŸãã以äžã«äŸã瀺ããŸãã
:<syntaxhighlight lang=pike>
int add2(int a, int b) {
return a + b;
}
int main() {
array(int) pair = ({ 2, 3 });
// é
åå±éã䜿ã£ãŠé¢æ°ã«åŒæ°ãæž¡ã
int n = add2(@pair);
write("n = %d\n", n); // => n = 5
return 0;
}
</syntaxhighlight>
äžèšã®ã³ãŒãã¯ã<code>add2</code>ãšããé¢æ°ã«é
åå±éã䜿çšããŠåŒæ°ãæž¡ãããã®çµæãå€æ°<code>n</code>ã«æ ŒçŽããŠããŸãã
<code>pair</code>ãšãã<code>array(int)</code>åã®é
åã«ã¯2ã€ã®èŠçŽ ãå«ãŸããŠããããããã2ãš3ã§ãã
<code>add2(@pair)</code>ã®éšåã§ã<code>@</code>æŒç®åã䜿çšããŠ<code>pair</code>ã®é
åå±éãè¡ã£ãŠããŸãã
ããã«ããã<code>add2</code>é¢æ°ã«ã¯2ãš3ã®2ã€ã®åŒæ°ãåå¥ã«æž¡ãããŸãã
<code>add2</code>é¢æ°ã§ã¯ãåŒæ°<code>a</code>ãš<code>b</code>ãåãåãããããã足ããçµæãè¿ããŠããŸãã
ãã®çµæãå€æ°<code>n</code>ã«æ ŒçŽãããŸãã
æåŸã«ã<code>write</code>é¢æ°ã䜿çšããŠå€æ°<code>n</code>ã®å€ã衚瀺ããŠããŸããåºåçµæã¯<code>n = 5</code>ãšãªããŸãã
é
åå±éã䜿ãããšã§ãé
åã®èŠçŽ ãåå¥ã®åŒæ°ãšããŠé¢æ°ã«æž¡ãããšãã§ããŸããããã«ãããã³ãŒãã®èšè¿°ãç°¡æœã«ããæè»æ§ãé«ããããšãã§ããŸãã
=== å¯å€é·åŒæ° ===
éåžžã®é¢æ°ã¯ãåŒæ°ã®æ°ã¯äžå®ã§ãããåŒæ°ã®æ°ãå¯å€ã«ããããšãåºæ¥ãŸãã
;å¯å€é·åŒæ°ãæã€é¢æ°ã®å®çŸ©:<syntaxhighlight lang=pike>
æ»å€å é¢æ°å(ä»®åŒæ°å ... ä»®åŒæ°é
å) {
// é¢æ°ã®åŠç
// returnæã§å€ãè¿ãïŒå¿
èŠãªå ŽåïŒ
}
</syntaxhighlight>
ä»®åŒæ°é
åã¯ãé
åã§åŒæ°ãªã¹ããšåãå
容ãå
¥ããŸãã
ãªããé
åå±éã¯å¯å€é·åŒæ°ãåãåãé¢æ°ã«å¯ŸããŠã䜿çšããããšãã§ããŸãã
å¯å€é·åŒæ°ãæã€é¢æ°ã«é
åãæž¡ãå Žåããé
åå±éãè¡ã£ãŠå¯å€é·åŒæ°ãšããŠæž¡ãããšãã§ããŸãã
:<syntaxhighlight lang=pike>
int sum(int ... rest) {
int x = 0;
foreach (rest, int n) {
x+= n;
}
return x;
}
int main() {
array(int) ary = ({ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 });
// é
åå±éã䜿ã£ãŠå¯å€é·åŒæ°ãæž¡ã
int n = sum(@ary);
write("n = %d\n", n); // => n = 55
return 0;
}
</syntaxhighlight>
äžèšã®ã³ãŒãã¯ãå¯å€é·åŒæ°ãæã€<code>sum</code>é¢æ°ã«é
åå±éã䜿çšããŠåŒæ°ãæž¡ãããã®çµæãå€æ°<code>n</code>ã«æ ŒçŽããŠããŸãã<code>ary</code>ãšãã<code>array(int)</code>åã®é
åã«ã¯1ãã10ãŸã§ã®æŽæ°ãå«ãŸããŠããŸãã
<code>sum(@ary)</code>ã®éšåã§ã<code>@</code>æŒç®åã䜿çšããŠ<code>ary</code>ã®é
åå±éãè¡ã£ãŠããŸããããã«ããã<code>sum</code>é¢æ°ã«ã¯1ãã10ãŸã§ã®10åã®åŒæ°ãåå¥ã«æž¡ãããŸãã
<code>sum</code>é¢æ°ã§ã¯ãå¯å€é·åŒæ°<code>rest</code>ãåãåãããããã®åŒæ°ãåèšããŠããŸãã<code>foreach</code>ã«ãŒãã䜿çšããŠãå¯å€é·åŒæ°<code>rest</code>ã®åèŠçŽ <code>n</code>ã«ã¢ã¯ã»ã¹ãããããå€æ°<code>x</code>ã«å ç®ããŠããŸãã
æåŸã«ãå€æ°<code>x</code>ã®å€ãå€æ°<code>n</code>ã«æ ŒçŽããã<code>write</code>é¢æ°ã䜿çšããŠè¡šç€ºããŠããŸããåºåçµæã¯<code>n = 55</code>ãšãªããŸãã
ãã®äŸã§ã¯ãå¯å€é·åŒæ°ãæã€é¢æ°ã«é
åå±éã䜿çšããããšã§ãé
åã®èŠçŽ ãåå¥ã®åŒæ°ãšããŠé¢æ°ã«æž¡ãããšãã§ããŸããå¯å€é·åŒæ°ã䜿çšããããšã§ãåŒæ°ã®æ°ãå¯å€çã§ããå Žåã§ãæè»ã«å¯Ÿå¿ããããšãã§ããŸãã
=== ååž°çåŒã³åºã ===
Pikeã§ã¯ãé¢æ°å
ã§èªå·±ãåŒã³åºãååž°çãªé¢æ°ãå®çŸ©ããããšãã§ããŸããããã«ãããå埩åŠçã䜿çšããã«åé¡ã解決ã§ããå ŽåããããŸãã
ããšãã°ã次ã®ãããªååž°çãªé¢æ°ãå®çŸ©ã§ããŸãã
:<syntaxhighlight lang=pike>
int factorial(int n) {
if (n == 0) {
return 1;
} else {
return n * factorial(n - 1);
}
}
</syntaxhighlight>
ãã®é¢æ°ã¯ãäžããããæŽæ°nã®éä¹ãèšç®ããŸããååž°çåŒã³åºãã䜿çšããŠãnã0ã«ãªããŸã§ãnãã1ãã€åŒããŠãããŸãã
ããšãã°ã次ã®ããã«ãã®é¢æ°ãåŒã³åºãããšãã§ããŸãã
:<syntaxhighlight lang=pike>
int result = factorial(5);
</syntaxhighlight>
ãã®å Žåãresultã«ã¯120ãæ ŒçŽãããŸãã
=== æé»ã®ã©ã ã ===
ãæé»ã®ã©ã ããã¯ååŠçããã³/ãŸãã¯åŸåŠçãå¿
èŠãªã³ãŒããåã蟌ã䟿å©ãªæ¹æ³ã§ãã
é¢æ°åŒã³åºãã§å§ãŸããçŽåŸã«ãã¬ãŒã¹ãããã¯ãç¶ãæã§ã¯ããããã¯ãã©ã ãé¢æ°ã«å€æãããåŒã³åºãããé¢æ°ã®æåŸã®åŒæ°ãšããŠæž¡ãããŸãã
:<syntaxhighlight lang=pike>
int times(int n, function block) {
for (int i = 0; i < n; i++)
block();
return n;
}
int main() {
int x = 0;
times(3) {
write("Hello world! <%d>\n", x++);
} ;
// => Hello world! <0>
// => Hello world! <1>
// => Hello world! <2>
return 0;
}
</syntaxhighlight>
<code>times</code>ãšããé¢æ°ãå®çŸ©ããŠããã®é¢æ°ã«åŒæ°ãšããŠå®è¡åæ°ãšãããã¯ãæž¡ãããããã¯ãæå®ãããåæ°åå®è¡ãããšããæ©èœãæã£ãŠããŸãã
<code>main</code>é¢æ°ã§ã¯ã<code>times</code>é¢æ°ãåŒã³åºãã第1åŒæ°ã«<code>3</code>ãã第2åŒæ°ã«<code>{ write("Hello world! <%d>\n", x++); }</code>ãšããæé»ã®ã©ã ããæž¡ããŠããŸãããã®æé»ã®ã©ã ãã¯ã<code>times</code>é¢æ°å
ã§<code>block()</code>ãšãã圢åŒã§åŒã³åºãããŸãã<code>block()</code>ã®äžã§ã¯ã<code>write</code>é¢æ°ãçšããŠã"Hello world! <x>"ãšããã¡ãã»ãŒãžã衚瀺ãã<code>x</code>ã®å€ãã€ã³ã¯ãªã¡ã³ãããŠããŸãããããã£ãŠããã®ããã°ã©ã ã¯ã"Hello world!"ãšããã¡ãã»ãŒãžãšãããã«ç¶ã<code>x</code>ã®å€ã瀺ãã¡ãã»ãŒãžã3å衚瀺ããŸãã
<code>times</code>é¢æ°ããå¶åŸ¡ãæ»ã£ãåŸã<code>main</code>é¢æ°ã¯ã<code>write("Hello world! <%d>\n", x++);</code>ã«ãã£ãŠã"Hello world! <3>"ãšããã¡ãã»ãŒãžã衚瀺ãã<code>x</code>ãã€ã³ã¯ãªã¡ã³ãããŸãããããã£ãŠããã®ããã°ã©ã ã¯ãåèšã§4åã®"Hello world!"ã¡ãã»ãŒãžã衚瀺ãã<code>x</code>ã®å€ã¯4ã«ãªããŸãã
ãã®ããã«ãé¢æ°åŒã³åºãã«ç¶ããããã¯ãåŒã³åºãå
ã®é¢æ°ã®é ããæåŸã®é¢æ°åŒæ°ãšãªãäŸã¯ã[[Ruby]]ã[[Groovy]]ã[[Kotlin]]ãªã©ã«èŠãããšãåºæ¥ãŸãã
==== __ARGS__ ====
éçºäžã® Pike-9.0 ã§ã¯ã__ARGS__ã䜿ã£ãŠæé»ã®ã©ã ããžåŒæ°ãæž¡ãããšãåºæ¥ãããã«ãªããŸãã
:<syntaxhighlight lang=pike>
void times(int n, function block) {
for (int i = 0; i < n; i++) {
block(i);
}
}
int main() {
times(3) {
[mixed x] = __ARGS__;
write("Hello world! <%d>\n", x);
};
// => Hello world! <0>
// => Hello world! <1>
// => Hello world! <2>
return 0;
}
</syntaxhighlight>
# <code>void times(int n, function block)</code>: ãã®é¢æ°ã¯ãåŒæ°ãšããŠæŽæ° <code>n</code> ãšé¢æ° <code>block</code> ãåãåããŸãã<code>block</code> é¢æ°ã¯æŽæ°ãåŒæ°ãšããŠåãåããäœããã®åŠçãè¡ããŸãã<code>times</code> é¢æ°ã¯ã<code>block</code> é¢æ°ã <code>n</code> åç¹°ãè¿ãå®è¡ããŸãã
# <code>int main()</code>: ãã®é¢æ°ã¯ããã°ã©ã ã®ãšã³ããªãŒãã€ã³ãã§ãã<code>main()</code> é¢æ°ã®äžã«ããã°ã©ã ã®ã¡ã€ã³ã®åŠçãèšè¿°ãããŸãã
#* <code>times(3) {...};</code>: <code>times()</code> é¢æ°ãåŒã³åºããŠããŸããåŒæ°ãšã㊠<code>3</code> ãæž¡ããŠããã<code>block</code> é¢æ°ã®äžèº«ãèšè¿°ããŠããŸãã
#* <code>[mixed x] = __ARGS__;</code>: <code>__ARGS__</code> ã¯Pikeã®çµã¿èŸŒã¿å€æ°ã§ãããé¢æ°ã®åŒæ°ãè¡šããŸãããã®è¡ã§ã¯ãåŒæ°ã®å€ãå€æ° <code>x</code> ã«ä»£å
¥ããŠããŸãã<code>mixed</code> ã¯å€æ°ã®åãè¡šãã<code>x</code> ã¯å€æ°åã§ãã
#* <code>write("Hello world! <%d>\n", x);</code>: <code>write()</code> é¢æ°ã¯ãåŒæ°ãšããŠäžããããæååãæšæºåºåã«æžãåºããŸãã<code>"Hello world! <%d>\n"</code> ã¯æžåŒä»ãã®æååã§ããã<code>%d</code> ã¯æŽæ°ã衚瀺ããããã®æžåŒæå®åã§ãã<code>x</code> ã®å€ã¯ <code>%d</code> ã®äœçœ®ã«æ¿å
¥ãããŸãã
#* <code>return 0;</code>: <code>main()</code> é¢æ°ã®æåŸã«ã¯ãéåžžã¯çµäºã³ãŒããè¿ãããã® <code>return</code> æããããŸããããã§ã¯ <code>0</code> ãè¿ããŠããŸãã
=== ã¯ããŒãžã£ãŒ ===
ã©ã ãåŒã¯å€éšã®å€æ° <code>x</code> ããã£ããã£ããã¯ããŒãžã£ãŒãšããŠæ©èœããŸããããã«ãããã©ã ãåŒå
㧠<code>x</code> ã®å€ãå€æŽããããšãã§ããŸãã
ã¯ããŒãžã£ãŒã¯ãé¢æ°å
ã§å®çŸ©ãããå€æ°ãå«ãé¢æ°ãªããžã§ã¯ãã§ãããé¢æ°ãçµäºããŠããã®å€æ°ã®ã¹ã³ãŒããç¶æãããŸãã
ãã®äŸã§ã¯ã<code>times</code> é¢æ°å
ã§å®çŸ©ããã <code>i</code> ãš <code>main</code> é¢æ°å
ã§å®çŸ©ããã <code>x</code> ã®2ã€ã®å€æ°ãååšããã©ã ãåŒã <code>x</code> ããã£ããã£ããŠå€æŽããŠããŸãã
ããã«ãããã©ã ãåŒãçµäºããåŸã§ã <code>x</code> ã®å€ãä¿æã§ããŸãã
;ãŸãšã
:<syntaxhighlight lang=pike>
// é¢æ°å®çŸ©
int add2(int a, int b) {
return a + b;
}
// å¯å€é·åŒæ°ãæã€é¢æ°å®çŸ©
int sum(int ... rest) {
int x = 0;
foreach (rest, int n) {
x+= n;
}
return x;
}
// ååž°çåŒã³åºã
int factorial(int n) {
if (n == 0) {
return 1;
} else {
return n * factorial(n - 1);
}
}
// æé»ã®ã©ã ã
int times(int n, function block) {
for (int i = 0; i < n; i++)
block();
return n;
}
int main() {
// é¢æ°ã®åŒã³åºã
int result = add2(2, 3);
//=> å®è¡çµæ: result = 5
array(int) ary = ({32, 16});
result = add2(@ary);
//=> å®è¡çµæ: result = 48
result = sum(1, 2, 3);
//=> å®è¡çµæ: result = 6
ary = ({ 1, 2, 4, 8 });
result = sum(@ary);
//=> å®è¡çµæ: result = 15
result = factorial(5);
//=> å®è¡çµæ: result = 120
int x = 0;
times(3) {
write("Hello world! <%d>\n", x++);
};
//=> å®è¡çµæ:
//=> Hello world! <0>
//=> Hello world! <1>
//=> Hello world! <2>
return 0;
}
</syntaxhighlight>
== ããŒã¿å ==
Pikeã§ã¯ãåã¯2ã€ã®ç°ãªãã³ã³ããã¹ãã§äœ¿çšãããŸããã³ã³ãã€ã«æãšå®è¡æã§ããäžéšã®åã¯ã³ã³ãã€ã«æã®ã¿äœ¿çšãããŸãïŒvoidãmixedãããã³ãã¹ãŠã®æ§é åïŒããã®ä»ã®ãã¹ãŠã®åã¯å®è¡æã«ã䜿çšãããŸãã
Pikeã«ã¯ãåºæ¬åãšãã€ã³ã¿åã®2ã€ã®çš®é¡ã®å®è¡æããŒã¿åããããŸããåºæ¬åã¯å€æ°ã«å²ãåœãŠããããšãã«ã³ããŒãããŸããããã€ã³ã¿åã¯åã«ãã€ã³ã¿ãã³ããŒããããããåããã®ãæã2ã€ã®å€æ°ãåŸãããŸãããã€ã³ã¿åã¯ãarrayãmappingãmultisetãprogramãobjectãããã³functionã®6ã€ããããŸãããããã¯ãã¹ãŠãã€ã³ã¿åã§ãããã¡ã¢ãªäžã®äœããæããŸãããã®ãäœããã¯ãããã«å¯Ÿãããã€ã³ã¿ããããªãå Žåã«è§£æŸãããŸããå€æ°ã«ãã€ã³ã¿åã®å€ãå²ãåœãŠãå Žåããã®ãäœããã¯ã³ããŒãããŸããã代ããã«ãããã«å¯Ÿããæ°ããåç
§ãçæãããŸãããããã®åã®ãããããé¢æ°ã®åŒæ°ãšããŠæž¡ãå Žåãé¢æ°ããäœãããå€æŽããå¯èœæ§ããããããç¹å¥ãªæ³šæãå¿
èŠã§ãããã®å¹æãæãŸãªãå Žåã¯ãå€ãæ瀺çã«ã³ããŒããå¿
èŠããããŸããåŸè¿°ããŸãã
=== åºæ¬å ===
==== æŽæ°(int) ====
æŽæ°ã䜿çšããå Žåã¯ãããŒã¯ãŒãintã䜿çšããŸãã
:<syntaxhighlight lang=pike>
int i = 42;
</syntaxhighlight>
:{| class="wikitable"
|+ æŽæ°ãªãã©ã«
!æ£èŠè¡šçŸ
!äŸ
!説æ
|-
| /-?[1-9][0-9]*/
|42
|åé²æ°
|-
| /-?0[0-9]*/
|0116
|å
«é²æ°
|-
| /-?0[xX][0-9a-fA-F]+/
|0x4e
|åå
é²æ°
|-
| /-?0[bB][01]+/
|0b1001110
|äºé²æ°
|-
| /-?'\\?.'/
|'N'
|ASCII æå
|}
==== æµ®åå°æ°ç¹æ°(float) ====
æµ®åå°æ°ç¹æ°ã䜿çšããå Žåã¯ãããŒã¯ãŒãfloatã䜿çšããŸãã
:<syntaxhighlight lang=pike>
float f = 3.1415926536;
</syntaxhighlight>
:{| class="wikitable"
|+ æµ®åå°æ°ç¹ãªãã©ã«
!æ£èŠè¡šçŸ
!äŸ
!çå€ãªè¡šçŸ
|-
|/-?[0-9]*\.[0-9]+/
|3.1415926
|3.1415926
|-
|/-?[0-9]+e-?[0-9]+/
| -5e3
| -5000.0
|-
|/-?[0-9]*\.[0-9]+e-?[0-9]+/
|.22e-2
|0.0022
|}
==== æåå(string) ====
æååã䜿çšããå Žåã¯ãããŒã¯ãŒãstringã䜿çšããŸãã
æååã¯ãäºéåŒçšç¬Šã§å²ãŸããæååãªãã©ã«ã䜿çšããŠè¡šããŸãã
:<syntaxhighlight lang=pike>
string s = "Hello, world!";
</syntaxhighlight>
=== ãã€ã³ã¿å ===
ãã®ç¯ã§ã¯ããã€ã³ã¿åã«ã€ããŠèª¬æãããŠããŸããåºæ¬åã¯éåžžã«åºæ¬çãªåã§ãããã»ãšãã©ã®ãã€ã³ã¿åã¯ãåºæ¬åãæ ŒçŽããèå³æ·±ãæ¹æ³ã§ãã
ãã€ã³ã¿åã«ã¯ãé
åãé£æ³é
åããã«ãã»ãããããã°ã©ã ããªããžã§ã¯ããé¢æ°ããããŸãã
ãããã¯ãã¹ãŠãã¡ã¢ãªå
ã®äœããæããã€ã³ã¿ã§ããããã€ã³ã¿ããªããªããšããã®ãäœããã¯è§£æŸãããŸãã
ãã€ã³ã¿åã®å€ãå€æ°ã«ä»£å
¥ãããšããã®ãäœãããã³ããŒãããã®ã§ã¯ãªããããã«å¯Ÿããæ°ããåç
§ãçæãããŸãã
é¢æ°ã«ãããã®åã®å€ãåŒæ°ãšããŠæž¡ãå Žåã«ã¯ãç¹å¥ãªæ³šæãå¿
èŠã§ãããé¢æ°ããäœãããå€æŽããå¯èœæ§ãããããããã®å¹æãæãŸãããªãå Žåã«ã¯ãæ瀺çã«å€ãã³ããŒããå¿
èŠããããŸãã
*é
å (array): è€æ°ã®å€ãæ ŒçŽããããã®ããŒã¿æ§é ã§ãæ·»åãçšããŠèŠçŽ ã«ã¢ã¯ã»ã¹ãããæ·»åã¯æŽæ°ã§ãªããã°ãªããªããäŸãã°ãa[0]ãa[1]ãa[2] ãªã©ãšè¡šèšãããã
*é£æ³é
å (mapping): ããŒãšå€ã®ãã¢ãæ ŒçŽããããã®ããŒã¿æ§é ãæ·»åã«ä»»æã®åã䜿ãããšãã§ãããäŸãã°ãm["key"] = value ã®ããã«è¡šèšãããã
*ãã«ãã»ãã (multiset): å€ã®éåãæ ŒçŽããããã®ããŒã¿æ§é ã§ãåãå€ãè€æ°æ ŒçŽããããšãã§ãããéåã«å«ãŸããå€ã¯é åºé¢ä¿ããªããäžæã§ããå¿
èŠã¯ãªããäŸãã°ãs += ({ 1, 2, 3 }) ã®ããã«è¡šèšãããã
*ããã°ã©ã (program): Pikeã®ããã°ã©ã ãè¡šãããã®åããã¡ã€ã«ããèªã¿èŸŒãŸããããã€ã³ã¿ãŒãããäžããããŠã³ããŒããããããããäŸãã°ãp = read_file("program.pike") ã®ããã«è¡šèšãããã
*ãªããžã§ã¯ã (object): Pikeã®ãªããžã§ã¯ããè¡šãããã®åãã¡ãœãããå€æ°ãå«ã¿ãè€æ°ã®ãªããžã§ã¯ããäœæããããšãã§ãããäŸãã°ão = create_object("MyObject") ã®ããã«è¡šèšãããã
*é¢æ° (function): Pikeã®é¢æ°ãè¡šãããã®åãããã°ã©ã ããªããžã§ã¯ãã«å±ããããšãã§ããå€æ°ã«ä»£å
¥ããããšãã§ãããäŸãã°ãf = lambda( int x ) { return x * x; } ã®ããã«è¡šèšãããã
==== é
å(array) ====
Pikeã§ã¯ãé
åã¯è€æ°ã®èŠçŽ ãæ ŒçŽããããã®ããŒã¿æ§é ã§ããé
åã¯ãã³ã³ãã§åºåãããèŠçŽ ã®ãªã¹ãã§åæåããããšãã§ããŸãã
:<syntaxhighlight lang=pike>
array a = ({2, 3, 7});
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ãaãšããé
åãåæåãããèŠçŽ ãšããŠ2, 3, 7ãæ ŒçŽãããŸãã
é
åã®èŠçŽ ã«ã¢ã¯ã»ã¹ããã«ã¯ãé
ååã«è§æ¬åŒ§ã䜿çšããŠãã€ã³ããã¯ã¹ãæå®ããŸããäŸãã°ãa[0]ã¯é
åaã®æåã®èŠçŽ ãè¡šããŸããa[1]ã¯2çªç®ã®èŠçŽ ãa[2]ã¯3çªç®ã®èŠçŽ ãè¡šããŸãã
:<syntaxhighlight lang=pike>
int first_element = a[0]; // 2ãååŸ
int second_element = a[1]; // 3ãååŸ
int third_element = a[2]; // 7ãååŸ
</syntaxhighlight>
é
åã®èŠçŽ ã«å€ã代å
¥ããã«ã¯ãåæ§ã«è§æ¬åŒ§ã䜿çšããŠãã€ã³ããã¯ã¹ãæå®ãã代å
¥ããå€ãæå®ããŸãã
:<syntaxhighlight lang=pike>
a[0] = 4; // a[0]ã«4ã代å
¥
</syntaxhighlight>
é
åã«èŠçŽ ãè¿œå ããã«ã¯ãé
åã®æåŸã«æ°ããèŠçŽ ãè¿œå ãã += æŒç®åã䜿çšããŸãã
:<syntaxhighlight lang=pike>
a += ({ 3.14159 }); // aã®æ«å°Ÿã« 3.14159 ãè¿œå
a += ({ "abc" }); // aã®æ«å°Ÿã« "abc" ãè¿œå
</syntaxhighlight>
foreach æã䜿ããšé
åèŠçŽ ãé ã«åŠçãè¡ãããšãåºæ¥ãŸãã
:<syntaxhighlight lang=pike>
foreach(a, mixed e) {
if (intp(e))
write("%d ", e);
else if (floatp(e))
write("%f ", e);
else if (stringp(e))
write("\"%s\" ", e);
else
write("Unknown type");
}
write("\n");
</syntaxhighlight>
<code>foreach</code>æã¯ãæå®ãããé
åã®åèŠçŽ ãé çªã«åãåºããã«ãŒããå®è¡ããããã®å¶åŸ¡æ§æã§ãããã®ããã°ã©ã ã§ã¯ã<code>foreach(a, mixed e)</code>ãšããæã§ãé
åaã®åèŠçŽ ãåãåºããŠããããeã«ä»£å
¥ããŠããŸãã<code>mixed</code>ã¯ãPikeã®ããŒã¿åã§ãä»»æã®åã®å€ãåãå
¥ããããšãã§ããŸãã
<code>if</code>æã¯ãeã®åã«å¿ããŠãé©åãªåœ¢åŒã§è¡šç€ºããããã«ãæ¡ä»¶åå²ãè¡ããŸãã<code>intp(e)</code>ã<code>floatp(e)</code>ã<code>stringp(e)</code>ã¯ãããããeãæŽæ°ãæµ®åå°æ°ç¹æ°ãæååã§ãããã©ãããå€å®ããé¢æ°ã§ããeãæŽæ°ã§ããã°ã<code>"%d "</code>ãšãããã©ãŒãããæååã䜿çšããŠããã®æŽæ°ã衚瀺ããŸããeãæµ®åå°æ°ç¹æ°ã§ããã°ã<code>"%f "</code>ãšãããã©ãŒãããæååã䜿çšããŠããã®æµ®åå°æ°ç¹æ°ã衚瀺ããŸããeãæååã§ããã°ã<code>"\"%s\" "</code>ãšãããã©ãŒãããæååã䜿çšããŠããã®æååãããã«ã¯ã©ãŒããŒã·ã§ã³ã§å²ãã§è¡šç€ºããŸãã
æåŸã®<code>else</code>ç¯ã¯ãeãã©ã®åã«ã該åœããªãå Žåã«å®è¡ããã"Unknown type"ãšããæååã衚瀺ããŸãã
[TODO:ãã®ã³ãŒãã¯èŠçŽ ã«é
åãå«ãé
åã«å¯Ÿå¿ããŠããŸããã]
==== é£æ³é
å(mapping) ====
Pikeã«ãããé£æ³é
åã¯ãããŒãšå€ã®ãã¢ã®éåãè¡šçŸããããŒã¿åã§ããã<code>mapping</code>ãšããååã§å®çŸ©ãããŠããŸãã
é£æ³é
åã¯ãããŒãšå€ã®ãã¢ãè¿œå ããããšãã§ããŸããããŒã«ã¯æååãæŽæ°ãæµ®åå°æ°ç¹æ°ããªããžã§ã¯ããªã©ã䜿çšããããšãã§ããå€ã«ã¯ä»»æã®ããŒã¿åãæ ŒçŽããããšãã§ããŸãã
以äžã¯ã<code>mapping</code>ã䜿çšãããµã³ãã«ã³ãŒãã§ãã
:<syntaxhighlight lang=pike>
mapping m = ([ "key1": "value1", 2: 3.14, ({1,2}): "value3"]);
m["key2"] = "value2";
foreach ( m; mixed k; mixed v)
write("%O: %O\n", k, v);
</syntaxhighlight>
ãã®ã³ãŒãã§ã¯ã<code>mapping</code>ã䜿çšããŠãããŒãšå€ã®ãã¢ãæ ŒçŽãã<code>m</code>ã宣èšããããŒã«æååãæŽæ°ãé
åãªã©ã䜿çšããŠããŸãããŸãã<code>m</code>ã«æ°ããããŒãšå€ã®ãã¢ãè¿œå ããããã«ã<code>m["key2"] = "value2";</code>ã®ããã«æžããŠããŸãã
<code>foreach</code>æã§ã¯ã<code>m</code>ã®åèŠçŽ ã<code>k</code>ãš<code>v</code>ã«ä»£å
¥ããŠã<code>write</code>é¢æ°ãçšããŠã<code>k</code>ãš<code>v</code>ãé©åãªãã©ãŒãããã§æååã«å€æãã<code>write</code>é¢æ°ã§åºåããŠããŸãã
äžèšã®ããã°ã©ã ã¯ã以äžã®ãããªåºåãçæããŸãã
:<syntaxhighlight lang=text>
"key2": "value2"
2: 3.14
({ /* 2 elements */
1,
2
}): "value3"
"key1": "value1"
</syntaxhighlight>
<code>mapping</code>ã¯ãé£æ³é
åãå®è£
ããããã®äž»èŠãªããŒã¿åã§ãããPikeã®æ§ã
ãªæ©èœã«äœ¿çšãããŸãã
==== ãã«ãã»ãã(multiset) ====
Pikeã«ããããã«ãã»ããã¯ãèŠçŽ ã®éè€ãèš±ãããèŠçŽ ã®éåãè¡šçŸããããŒã¿åã§ããã<code>multiset</code>ãšããååã§å®çŸ©ãããŠããŸãã
ãã«ãã»ããã¯ãèŠçŽ ãè¿œå ããããšãã§ããåãèŠçŽ ãè€æ°åè¿œå ããããšãã§ããŸãã
:<syntaxhighlight lang=pike>
multiset m = (< 1, 2, 3, 3, "a", "b", "b" >);
m["c"] = 55;
m[3] = false;
foreach (m; mixed k; mixed n) {
write("%O: %O\n", k, m[n]);
}</syntaxhighlight>
;å®è¡çµæ:<syntaxhighlight lang=text>
1: 1
2: 1
3: 1
"c": 1
"a": 1
"b": 1
"b": 1
</syntaxhighlight>
:*ãã®ã³ãŒãã¯ããã«ãã»ããã䜿ã£ãäŸã§ããæåã«ã< 1, 2, 3, 3, "a", "b", "b" >ãšãããã«ãã»ãããäœæããå€æ°mã«ä»£å
¥ããŠããŸãã
:*ãã®ãã«ãã»ããã«ã¯ãæŽæ°1ã2ãããã³3ãæåå"a"ãš"b"ãããããã1åãã€ç»é²ãããŠããŸããããã«å ããŠãã€ã³ããã¯ã¹"c"ãšå€55ãè¿œå ãããŠããŸãããŸããã€ã³ããã¯ã¹3ã«å¯Ÿå¿ããå€ã¯ãfalseã«å€æŽãããŠããŸãã
:*次ã«ãforeachã«ãŒãã䜿çšããŠãã«ãã»ãããå埩åŠçããåã€ã³ããã¯ã¹ãšãã®å€ãåºåããŠããŸãããã®ã«ãŒãã§ã¯ãå€æ°kã«çŸåšã®ã€ã³ããã¯ã¹ããå€æ°nã«çŸåšã®ã€ã³ããã¯ã¹ã®å€ãèšå®ãããŸãããã«ãã»ããã«ã¯ãåãã€ã³ããã¯ã¹ãè€æ°æãããããšãã§ãããããåºåçµæã«ã¯ãã€ã³ããã¯ã¹"b"ã2å衚瀺ãããŠããŸãã
:*writeé¢æ°ã䜿çšããŠãåã€ã³ããã¯ã¹ãšãã®å€ãåºåããŠããŸãã%Oãã©ãŒãããæ瀺åã¯ãå€ã®åã«å¿ããŠãã®å€ãåºåããŸãããã®å Žåãã€ã³ããã¯ã¹ã«å¯Ÿå¿ããå€ã¯ã1ã«ãªããŸãã
==== ããã°ã©ã (program) ====
Pikeã«ãããŠãããã°ã©ã ãšã¯C++ã«ãããã¯ã©ã¹ã«çžåœããŸãã
ããã°ã©ã ã¯ããã®ããã°ã©ã ã«å®çŸ©ãããé¢æ°ãå€æ°ãã©ã®ããã«å®çŸ©ãããŠãããã®è¡šãä¿æããŸãã
ãŸããã³ãŒãèªäœããããã°æ
å ±ãç¶æ¿ãããä»ã®ããã°ã©ã ãžã®åç
§ãä¿æããŸãã
ãã ããããã°ã©ã èªäœã«ããŒã¿ãæ ŒçŽããã¹ããŒã¹ã¯ãããŸããã
ããã°ã©ã å
ã®æ
å ±ã¯ããã¡ã€ã«ãŸãã¯æååãPikeã³ã³ãã€ã©ãééãããšãã«åéãããŸãã
次ã«è°è«ãããªããžã§ã¯ãã«æ ŒçŽããããã«å¿
èŠãªå€æ°ã¹ããŒã¹ã¯ããªããžã§ã¯ãã«æ ŒçŽãããŸãã
ããã°ã©ã ãæžãããšã¯ç°¡åã§ãããã°ã©ã ãã¡ã¢ãªã«ããŒãããã«ã¯ãcompile_fileããã£ã¹ãæŒç®åã䜿ãããšãã§ããŸãã
ãã£ã¹ãæŒç®åã䜿çšããå Žåãããã°ã©ã ã¯ãã£ãã·ã¥ããã次å以éã¯åãããã°ã©ã ãè¿ãããŸãã
ãŸããclassããŒã¯ãŒãã䜿çšãããšãããã°ã©ã ã®äžã«å¥ã®ããã°ã©ã ãæžãããšãã§ããŸãã
ããŒã¿é åãäœæããã«ã¯ãããã°ã©ã ãã€ã³ã¹ã¿ã³ã¹åããå¿
èŠãããããã€ã³ã¿ã䜿çšããŠãæ°ãããªããžã§ã¯ããäœæãããã®ãªããžã§ã¯ãå
ã®createé¢æ°ãåŒã³åºãããšã§å®çŸãããŸãã
ãã¹ãŠã®ããã°ã©ã ã¯æååãã³ã³ãã€ã«ããŠçæãããŸãã
ãã®ããã«ãcompileãcompile_fileãcompile_stringãšãã3ã€ã®é¢æ°ããããŸãã
ãŸãããã£ã¹ãæŒç®åã䜿çšããããšãã§ããŸãã
==ãïŒ=ã䜿çšããããšã§ã2ã€ã®ããã°ã©ã ãåããã©ããã確èªã§ããŸãã
ãŸããp[args]ãp->identifierã®ãããªæŒç®åãé¢æ°ãéèŠã§ãã
==== ãªããžã§ã¯ã(object) ====
ããã°ã©ã ã¯ããŒã¿ãä¿åããå Žæãæãããã©ã®ããã«ããŒã¿ãä¿åãããã瀺ããŠããã ãã§ãããããããŒã¿ãä¿åããã«ã¯ãªããžã§ã¯ããå¿
èŠã§ãã
ãªããžã§ã¯ãã¯ãããã°ã©ã ããè€è£œãããã¡ã¢ãªã®ãã£ã³ã¯ã§ãããè€æ°ã®ãªããžã§ã¯ãã1ã€ã®ããã°ã©ã ããäœæã§ããŸãã
åãªããžã§ã¯ãã«ã¯ãç¬èªã®å€æ°ãããããã®ãªããžã§ã¯ãå
ã®é¢æ°ããããã®å€æ°ã§æäœãå®è¡ããŸãã
ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã¯éåžžã«æè»ã§ãããŒã¿ã®ä¿åæ¹æ³ãå€æŽããŠãããªããžã§ã¯ãã®å€éšã«å€æŽãå ããå¿
èŠã¯ãããŸããã
==== é¢æ°(function) ====
ãªããžã§ã¯ãã®æååã«ããã€ã³ããã¯ã¹åã§ãæååããªããžã§ã¯ãå
ã®é¢æ°åã§ããå Žåãé¢æ°ãè¿ãããŸãã
ãããããã®ååã«ãããããããé¢æ°ã¯å®éã«ã¯é¢æ°ãã€ã³ã¿ãŒã§ããé¢æ°ãã€ã³ã¿ãŒã¯ãä»ã®ããŒã¿åãšåãããã«æž¡ãããšãã§ããŸãã
é¢æ°ãã€ã³ã¿ãŒã¯ãé¢æ°åãåŒæ°ãšããŠåãåãããã®é¢æ°ãæã瀺ããªããžã§ã¯ããšããã®é¢æ°ãå®è¡ããããã®é¢æ°ãã€ã³ã¿ãŒãè¿ãé¢æ°ãååšããŸãã
ãŸããé¢æ°å
ã§å¥ã®é¢æ°ãå®çŸ©ããããã« lambda ããŒã¯ãŒãã䜿çšããããšãã§ããŸãã
Pike ã§ã¯é¢æ°ã®ãªãŒããŒããŒãã¯ã§ããŸãããé¢æ°ãã€ã³ã¿ãŒã«ã¯ãé¢æ°ã®åŒã³åºããé¢æ°åã®ååŸãé¢æ°ãå®çŸ©ããããªããžã§ã¯ãã®ååŸãªã©ã®æ©èœããããŸãã
=== ã³ã³ãã€ã«æã®å ===
ã³ã³ãã€ã«æã®åã«ã¯ããvoidããšãmixedãã®2ã€ã®åããããŸãã
ãvoidãã¯ãå€ã®ååšãŸãã¯ãªãã·ã§ã³æ§ã瀺ãããã«äœ¿çšãããŸããé¢æ°ã®æ»ãå€ãšããŠäœ¿çšãããããšãå€ããé¢æ°ãå€ãè¿ããªãããšã瀺ããŸãããŸããé¢æ°ãã©ã¡ãŒã¿ã®åã»ããã®1ã€ãšããŠäœ¿çšãããããšãããããã®å Žåã¯ãåŒã³åºãå
ããã®ãã©ã¡ãŒã¿ãçç¥ããããšãã§ãããã®å Žåã¯ç¹æ®ãªå€UNDEFINEDã«ããã©ã«ãã§èšå®ãããŸãã
ãmixedãã¯ãä»»æã®åã®å€ãæž¡ãããšãã§ããå®éã®ã©ã³ã¿ã€ã ã§äœ¿çšãããå€ã®åãå®å
šã«äžæã§ããããšã瀺ãããã«äœ¿çšãããŸãããã®åã¯ãã³ã³ããã¯ã©ã¹ãå®è£
ããå ŽåïŒã¯ã©ã¹å
ã®ã³ãŒãã§å®éã®å€ãæäœãããªãå ŽåïŒããŸãã¯å®éã®ã³ã³ãã€ã«æã®åãè€éã«ãªããããå Žåã®äŸ¿å®çãªãã©ãŒã«ããã¯ãšããŠäœ¿çšãããŸãã
ãŸããåºæ¬åããã©ã¡ãŒã¿ãŒã§æå®ããŠåºæ¬åããµãã¿ã€ãåããããã¿ã€ããŠããªã³æŒç®åïŒ|ïŒã䜿çšããŠè€æ°ã®ä»£æ¿åãæå®ããããšã§ãããç¹å®ã®ã³ã³ãã€ã«æã®åãæ§ç¯ããããšãã§ããŸãããã ããå®è¡æã®åã¯å®£èšãããã³ã³ãã€ã«æã®åãšç°ãªãå Žåãããããã泚æãå¿
èŠã§ãã
=== å€æ° ===
å€æ°ã宣èšããéã«ã¯ãå€æ°ãã©ã®çš®é¡ã®å€æ°ã§ããããæå®ããå¿
èŠããããŸããintãstringãªã©ã®å€ãã®ã¿ã€ãã«å¯ŸããŠã¯ãéåžžã«ç°¡åã«æå®ã§ããŸããããããããèå³æ·±ãå€æ°ã®å®£èšæ¹æ³ããããŸãã
ããã€ãã®äŸãèŠãŠã¿ãŸãããã
:<syntaxhighlight lang=pike>
int x; // xã¯æŽæ°ã§ã
int|string x; // xã¯æååãŸãã¯æŽæ°ã§ã
array(string) x; // xã¯æååã®é
åã§ã
array x; // xã¯mixedã®é
åã§ã
mixed x; // xã¯ã©ã®ã¿ã€ãã§ãããŸããŸãã
string *x; // xã¯æååã®é
åã§ã
// xã¯intããstringãžã®ãããã³ã°ã§ã
mapping(string:int) x;
// xã¯Stdio.Fileãå®è£
ããŠããŸã
Stdio.File x;
// xã¯Stdio.Fileãå®è£
ããŠããŸã
object(Stdio.File) x;
// xã¯2ã€ã®æŽæ°åŒæ°ãåããæååãè¿ãé¢æ°ã§ã
function(int,int:string) x;
// xã¯äœåã§ãã®æŽæ°åŒæ°ãåããäœãè¿ããªãé¢æ°ã§ãã
function(int...:void) x;
// xã¯...è€éã§ã
mapping(string:function(string|int...:mapping(string:array(string)))) x;
</syntaxhighlight>
ãããã®äŸãèŠããšãåãæå®ããèå³æ·±ãæ¹æ³ãããããšãããããŸãã
以äžã¯å¯èœãªãã®ã®ãªã¹ãã§ãã
;mixed
:ããã¯ãå€æ°ãä»»æã®ã¿ã€ããå«ãã§ããããšããŸãã¯é¢æ°ãä»»æã®å€ãè¿ãããšãæå³ããŸãã
;array(type)
:ããã¯ãã¿ã€ãtypeã®èŠçŽ ã®é
åãæå³ããŸãã
;mapping(key type: value type)
:ããã¯ãããŒãkey typeã§å€ãvalue typeã§ãããããã³ã°ã§ãã
;multiset(type)
:ããã¯ãã¿ã€ãtypeã®å€ãå«ããã«ãã»ãããæå³ããŸãã
;object(program)
:ããã¯ãæå®ãããããã°ã©ã ããå®è£
ããããªããžã§ã¯ããæå³ããŸããããã°ã©ã ã¯ã¯ã©ã¹ãå®æ°ããŸãã¯æååã§ããããšãã§ããŸããããã°ã©ã ãæååã§ããå Žåãæåã«ããã°ã©ã ã«ãã£ã¹ããããŸãããã®ãã£ã¹ãã«ã€ããŠã®è©³çŽ°ã«ã€ããŠã¯ãinheritã®ããã¥ã¡ã³ããåç
§ããŠãã ãããã³ã³ãã€ã©ã¯ããã®ãªããžã§ã¯ãã§ã¢ã¯ã»ã¹ããããã¹ãŠã®é¢æ°ãŸãã¯å€æ°ã«ã€ããŠããã®é¢æ°ãŸãã¯å€æ°ãããã°ã©ã ã§æã€åæ
å ±ãšåãã§ãããšä»®å®ããŸãã
;program
:ããããprogramãå®è£
ãããªããžã§ã¯ãããæå³ããŸããprogramã¯ã¯ã©ã¹ãŸãã¯å®æ°ã§ããããšãã§ããŸãã
== ããªããã»ããµ ==
{{å
é ã«æ»ã}}
Pikeã³ãŒãã¯ã³ã³ãã€ã©ã«éä¿¡ãããåã«ãããªããã»ããµãçµç±ããŸãã
ããªããã»ããµã¯ããœãŒã¹ã³ãŒããPikeå
éšè¡šçŸã«å€æããããã€ãã®ã·ã³ãã«ãªæ£èŠåãšæŽåæ§ãã§ãã¯ãå®è¡ããããã°ã©ãããã¡ã€ã«ã«å
¥åãããããªããã»ããµãã£ã¬ã¯ãã£ãããå®è¡ããŸãã
ããªããã»ããµãã£ã¬ã¯ãã£ãã¯ãåçŽãªã³ãŒãçæãšæäœã蚱容ããéåžžã«åçŽãªããã°ã©ãã³ã°èšèªã®ãããªãã®ã§ãã
ã³ãŒãããªããã»ããµã¯ãPikeå
ã§cppåŒã³åºãã«ãã£ãŠåŒã³åºãããšãã§ããŸãã
ããªããã»ããµã¯ããã¡ã€ã«ã®æåãšã³ã³ãŒãã£ã³ã°ã決å®ããå¿
èŠããããããæåã«2ã€ã®ãã€ãã調ã¹ããã®è¡šã«åŸã£ãŠè§£éããŸãã
ãã€ã0ãšãã€ã1ã®çµã¿åããã«å¯ŸããŠããã®ä»ã®ãã€ãã«ã€ããŠã¯ã#charsetãã£ã¬ã¯ãã£ããèŠã€ãããŸã§iso-8859-1ãšã³ã³ãŒãã£ã³ã°ãšããŠæ±ãããŸãã
EBCDICã§æžãããããã°ã©ã ã§#charsetãã£ã¬ã¯ãã£ããçç¥ãããŠããå Žåã¯ãšã©ãŒã«ãªããŸãã#charsetãã£ã¬ã¯ãã£ãããšã³ã³ãŒãããããšãå¯èœã§ãã
:{| class="wikitable"
!Byte 0
!Byte 1
!解é
|-
|0
|0
|32bit ã¯ã€ãæåå
|-
|0
|>0
|16bit Unicode æåå
|-
|>0
|0
|16bit Unicode æååïŒéãã€ããªãŒãïŒ
|-
|0xfe
|0xff
|16bit Unicode æåå
|-
|0xff
|0xfe
|16bit Unicode æååïŒéãã€ããªãŒãïŒ
|-
|0x7b
|0x83
|EBCDIC-US ("#c").
|-
|0x7b
|0x40
|EBCDIC-US ("# ").
|-
|0x7b
|0x09
|EBCDIC-US ("#\t").
|}
ããªããã»ããµã¯ãæåå以å€ã®é£ç¶ãã空çœæåãæ¹è¡ä»¥å€ã¯åäžã®ç©ºçœæåã«å€æãããã¹ãŠã®//ã/***/ã³ã¡ã³ãã#!è¡ãåé€ããŸãã
Pikeã¯ANSI/DECãšã¹ã±ãŒãã·ãŒã±ã³ã¹ã空çœãšããŠæ±ããŸãã
#defineãã£ã¬ã¯ãã£ãã¯ããã¯ããå®æ°ãå®çŸ©ããããã«æã䜿çšãããããªããã»ããµã®æ©èœã®1ã€ã§ãã
#ifdefããã³#ifndefã§äœ¿çšã§ããå®çŸ©ãååšããããšã瀺ãããšãã§ããŸãã
å®çŸ©ã«ç¹å®ã®å€ãèšå®ããããšãã§ãããã®å€ã¯ãœãŒã¹ã³ãŒãå
ã®å®çŸ©ã眮ãããå Žæã«æ¿å
¥ãããŸãã
ãã¯ãã«ã¯æ倧254åã®åŒæ°ããããŸãã
:{| class=wikitable
|+ ããªããã»ããµã»ãã£ã¬ã¯ãã£ã
!ãã£ã¬ã¯ãã£ã
!æå³
|-
!#!
|ã·ã§ã«ã®çµ±åãå¯èœã«ããã³ã¡ã³ãïŒPikeã¢ããªã±ãŒã·ã§ã³ã¯ãå¯èœãªéãã¯ãã¹ãã©ãããã©ãŒã äºææ§ã®ããã«ã#! /usr/bin/env pikeããšããè¡ã§å§ããããšãæšå¥šãããŠããïŒ
|-
!#line
|ãã®ãã£ã¬ã¯ãã£ãã®åŸã®è¡ã®è¡çªå·ãæå®ããŸãããŸãããšã©ãŒã¡ãã»ãŒãžã«ãããŠããæå®ãããè¡çªå·ã䜿çšãããŸãã
|-
!#""
|#" ã§å§ãŸãæååãªãã©ã«ã®äžã§æ¹è¡ãããå Žåããããæååãªãã©ã«ã«å«ãŸããŸãã
|-
!#( )ã#[ ]ã#{ }
|#( ã§å§ãŸãæååãªãã©ã«ãäœæããŸãããã®ãªãã©ã«äžã«ããå
šãŠã®æåã¯ãæåãšããŠæ±ãããŸãã
|-
!#string
|次ã«ç¶ããã¡ã€ã«ãèªã¿èŸŒã¿ããã®å
容ãæååãšããŠæ¿å
¥ããŸãã
|-
!#include
|次ã«ç¶ããã¡ã€ã«ã®å
容ãããã®å Žæã«æ¿å
¥ããŸãã
|-
!#if åŒ
|åŒã true ã§ããã°ãç¶ãã³ãŒããããã¯ãæå¹ã«ãªããŸãã#endifã#elseã#elseifã#elif ã®ãããããåããã¹ãã¬ãã«ã§åºçŸãããšãã³ãŒããããã¯ã¯çµäºããŸãã
|-
!#ifdef èå¥å
|èå¥åããã¯ãã§ãããã©ããã確èªããŸãã
|-
!#ifndef
|èå¥åããã¯ãã§ãªãããšã確èªããŸãã
|-
!#endif
|#ifã#ifdefã#ifndefã#elseã#elseifã#elif ã§éå§ããããããã¯ãçµäºããŸãã
|-
!#else
|çŸåšã®ã³ãŒããããã¯ãå転ãããããäžã€ã®ã³ãŒããããã¯ã«åå²ããŸãã
|-
!#elifã#elseif
|#else ãš #if ãçµã¿åããããã®ã§ãäœåãªãã¹ãã¬ãã«ãè¿œå ããŸããã
|-
!#define
|<identifier>ã<replacement string>ã«çœ®æãããåŒæ°ãçšããããšãã§ããã
|-
!#undef
|æå®ããããã¯ãå®çŸ©ãåé€ããã
|-
!#charset
|ãã¡ã€ã«ããšã³ã³ãŒããããŠããæåã»ãããæå®ããã
|-
!#pike
|Pikeã³ã³ãã€ã©ã®åŸæ¹äºææ§ã¬ãã«ãèšå®ããã
|-
!#pragma
|ã³ã³ãã€ã©ã®ããã®æ±çšãã£ã¬ã¯ãã£ãã
|-
!#require
|äŸåé¢ä¿ã®å€±æãæ€åºããã
|-
!#warning
|ããªããã»ããµäžã«èŠåãçæããã
|-
!#error
|ããªããã»ããµäžã«ãšã©ãŒãçæããã
|}
:{| class="wikitable"
|+ pragma ã®ãã©ãã°ïŒäžéšïŒ
! all_inline
|ãã®ãªãã·ã§ã³ã¯ãåŸã«ç¶ããã¹ãŠã®é¢æ°ã«<code>inline</code>修食åãè¿œå ããããšãšåãã§ãã
|-
! all_final
|ã³ã³ãã€ã©ã«ããã¹ãŠã®ã·ã³ãã«ã<code>final</code>ãšããŠããŒã¯ããããæ瀺ããŸãã
|-
! deprecation_warnings
|éæšå¥šã®ã·ã³ãã«ã®äœ¿çšã«å¯ŸããèŠåãæå¹ã«ããŸãïŒããã©ã«ãïŒã
|-
! no_deprecation_warnings
|éæšå¥šã®ã·ã³ãã«ã®äœ¿çšã«å¯ŸããèŠåãç¡å¹ã«ããŸããããã¯éåžžãéæšå¥šã®ã·ã³ãã«ãå®è£
ããã³ãŒãã§äœ¿çšãããŸãã
|-
! save_parent
| å¿
èŠãªãå Žåã§ãããã¹ããããã¯ã©ã¹ããã®åšå²ã®ã¯ã©ã¹ãžã®åç
§ãä¿åããããã«ããŸãã
|-
! dont_save_parent
|<code>"save_parent"</code>ã®å察ã§ããã°ããŒãã«ã·ã³ãã«<code>predef::pragma_save_parent</code>ãèšå®ãããŠããå ŽåãããããªãŒããŒã©ã€ãããå¿
èŠããããŸãã
|-
! strict_types
| ã³ã³ãã€ã©ãåãæ£ãããã©ããã確信ã§ããªããã¹ãŠã®å Žåã«èŠåãæå¹ã«ããŸãã
|-
! disassemble
|ã³ã³ãã€ã«ãããã³ãŒãã®éã¢ã»ã³ãã«åºåãæå¹ã«ããŸãããã®ãªãã·ã§ã³ã¯ãåºæ¬çã«ã¯é¢æ°ã¬ãã«ã®ã¹ã³ãŒããæã€ãããæ°è¡ã ãæå¹ã«ãããšéåžžã¯ç¡å¹ã§ããããã¯ã<code>Debug.assembler_debug()</code>ã®ã¬ãã«<code>3</code>ã«é¡äŒŒããŠããŸãã
|-
! no_disassemble
|éã¢ã»ã³ãã«åºåãç¡å¹ã«ããŸãïŒããã©ã«ãïŒã
|}
:{| class=wikitable
|+ å®çŸ©æžãã¯ã
!å®çŸ©æžãã¯ã
!æå³
|-
!__VERSION__
|floatåãšããŠè¡šãããçŸåšã®PikeããŒãžã§ã³ãå«ã¿ãŸããå¥ã®PikeããŒãžã§ã³ããšãã¥ã¬ãŒããããå Žåããã®å®çŸ©ã¯ããã«å¿ããŠæŽæ°ãããŸãã
|-
!__MAJOR__
|çŸåšã®PikeããŒãžã§ã³ã®ã¡ãžã£ãŒããŒããæŽæ°ãšããŠè¡šããŸããå¥ã®PikeããŒãžã§ã³ããšãã¥ã¬ãŒããããå Žåããã®å®çŸ©ã¯ããã«å¿ããŠæŽæ°ãããŸãã
|-
!__MINOR__
|çŸåšã®PikeããŒãžã§ã³ã®ãã€ããŒããŒããæŽæ°ãšããŠè¡šããŸããå¥ã®PikeããŒãžã§ã³ããšãã¥ã¬ãŒããããå Žåããã®å®çŸ©ã¯ããã«å¿ããŠæŽæ°ãããŸãã
|-
!__BUILD__
|çŸåšã®PikeããŒãžã§ã³ã®ãã«ãçªå·ãæŽæ°ãšããŠè¡šããŸããå¥ã®PikeããŒãžã§ã³ããšãã¥ã¬ãŒããããå Žåããã®å®æ°ã¯å€æŽãããŸããã
|-
!__REAL_VERSION__
|åžžã«ãfloatåã§è¡šãããçŸåšã®PikeããŒãžã§ã³ãå«ã¿ãŸãã
|-
!__REAL_MAJOR__
|åžžã«ãçŸåšã®PikeããŒãžã§ã³ã®ã¡ãžã£ãŒããŒããæŽæ°ãšããŠè¡šããŸãã
|-
!__REAL_MINOR__
|åžžã«ãçŸåšã®PikeããŒãžã§ã³ã®ãã€ããŒããŒããæŽæ°ãšããŠè¡šããŸãã
|-
!__REAL_BUILD__
|åžžã«ãçŸåšã®PikeããŒãžã§ã³ã®ãã«ãçªå·ãæŽæ°ãšããŠè¡šããŸãã
|-
!__DATE__
|ã³ã³ãã€ã«æã®çŸåšã®æ¥ä»ãäŸãã° "Jul 28 2001"ãå«ã¿ãŸãã
|-
!__TIME__
|ã³ã³ãã€ã«æã®çŸåšã®æå»ãäŸãã° "12:20:51"ãå«ã¿ãŸãã
|-
!__FILE__
|ãœãŒã¹ãã¡ã€ã«ã®ãã¡ã€ã«ãã¹ãšååãå«ã¿ãŸãã
|-
!__DIR__
|ãœãŒã¹ãã¡ã€ã«ã®ãã£ã¬ã¯ããªãã¹ãå«ã¿ãŸãã
|-
!__LINE__
|ãœãŒã¹ãã¡ã€ã«å
ã®çŸåšã®è¡çªå·ãæŽæ°ãšããŠè¡šããŸãã
|-
!__COUNTER__
|ç¬èªã®ã«ãŠã³ã¿ãå«ã¿ãŸããæŽæ°ã§è¡šãããäžæã§ããïŒå±éãããå ŽåïŒã
|-
!__AUTO_BIGNUM__
|èªåbignumå€æãæå¹ã«ãªã£ãŠãããšãã«å®çŸ©ãããŸããæå¹ã«ãªã£ãŠãããšãæŽæ°ãæŽæ°ã§è¡šçŸã§ããªãã»ã©å€§ãããªã£ããšãã«èªåçã«bignumã«å€æãããŸããããã«ãããããã°ã©ã ãã¯ã©ãã·ã¥ãã代ããã«æ§èœããããã«äœäžããŸããPike 8.0以éããã®å®çŸ©ã¯åžžã«èšå®ãããŠããŸãã
|-
!__NT__
|PikeãMicrosoft Windows OSã§åäœããŠããå Žåã«å®çŸ©ãããŸããMicrosoft Windows NTãšããååã§ãããMicrosoft Windows NTã ãã§ã¯ãããŸããã
|-
!__PIKE__
|ãã®å®çŸ©ã¯åžžã«trueã§ãã
|-
!__amigaos__
|ãã®å®çŸ©ã¯ãPikeãAmiga OSã§å®è¡ãããŠããå Žåã«å®çŸ©ãããŸãã
|-
!ã¡ãœãã Pragma
|ãã®ãã¯ãã¯ã察å¿ããïŒpragmadirectiveããœãŒã¹ã«æ¿å
¥ããŸããäŸãã°ã_Pragma("strict_types")ã¯ãïŒpragma strict_typesãšåãã§ãã
|-
!static_assert
|ãã®å®çŸ©ã¯ãã·ã³ãã«_Static_assertã«å±éãããŸããããã¯ãéçïŒã€ãŸãã³ã³ãã€ã«æïŒã¢ãµãŒã·ã§ã³ãå®è¡ããããã®æšå¥šæ¹æ³ã§ãã泚æïŒãã®ãã¯ãã¯ãéçã¢ãµãŒã·ã§ã³ããµããŒããããŠãããã©ããããã§ãã¯ããããã«ã䜿çšã§ããŸãã
|}
== ãªããžã§ã¯ãæåããã°ã©ãã³ã° ==
{{å
é ã«æ»ã}}
Pikeã¯ãªããžã§ã¯ãæåããã°ã©ãã³ã°ïŒOOPïŒããµããŒãããŠãããPikeã®OOPæ©èœã䜿ãããšã§ããã°ã©ã ã®ã¢ãžã¥ãŒã«åãåå©çšæ§ã®åäžãå¯èœã«ãªããŸãã
=== ã¯ã©ã¹ãšãªããžã§ã¯ãã®æŠå¿µ ===
ã¯ã©ã¹ã¯ãªããžã§ã¯ãã®èšèšå³ã§ããããªããžã§ã¯ãã¯ãã®ã¯ã©ã¹ã®å®äœã§ããã¯ã©ã¹ã¯ããã®ã¯ã©ã¹ãæã€å±æ§ïŒãã£ãŒã«ãïŒãšæäœïŒã¡ãœããïŒãå®çŸ©ããŸãããªããžã§ã¯ãã¯ããã®ã¯ã©ã¹ãæã€å±æ§ã®å€ãšããã®ã¯ã©ã¹ãå®çŸ©ããæäœãå®è¡ããããšãã§ããŸãã
=== ã¯ã©ã¹ã®å®çŸ©ãšã€ã³ã¹ã¿ã³ã¹å ===
ãã®äŸã§ã¯ãã¯ã©ã¹å®çŸ©ã®äŸãšããŠã人ç©ã®ã¯ã©ã¹ãäœæãããŠããŸããã¯ã©ã¹å®çŸ©ã¯ãclassããŒã¯ãŒãã§å§ãŸããæ³¢æ¬åŒ§ { } ã§å²ãŸããã¡ã³ãå€æ°ãšã¡ãœããã®å®çŸ©ãå«ã¿ãŸãã
;[http://tpcg.io/_12ZTNX person.pike]:<syntaxhighlight lang=pike>
class person {
string name;
int age;
void create(string n, int a) {
name = n;
age = a;
}
void say_hello() { write("Hello, I'm " + name + ".\n"); }
}
int main() {
person john = person("John", 30);
john->say_hello();
write("%s is %d year(s) old.\n", john->name, john->age);
return 0;
}
</syntaxhighlight>
ã¯ã©ã¹ã®ã¡ã³ãå€æ°ã¯ãåãªããžã§ã¯ãã«1ã€ãã€ååšããŸãããã®äŸã§ã¯ã人ç©ã®ååãè¡šãæåååã®å€æ°nameãšå¹Žéœ¢ãè¡šãæŽæ°åã®å€æ°ageãå®çŸ©ãããŠããŸãã
ã¡ãœããã¯ãã¯ã©ã¹ã®ãªããžã§ã¯ãã«é©çšã§ããæ©èœãèšè¿°ããŸãããã®äŸã§ã¯ãsay_helloãšããã¡ãœãããå®çŸ©ãããŠããŸãããã®ã¡ãœããã¯ã"Hello, I'm åå."ãšããã¡ãã»ãŒãžã衚瀺ããŸãã
ã¯ã©ã¹ã®ãªããžã§ã¯ãã¯ãã¯ã©ã¹åãåŒã³åºãå¯èœãªé¢æ°ã®ããã«äœ¿çšãããŸããäŸãã°ãjohn->say_hello();ã¯ãjohnãªããžã§ã¯ãã®say_helloã¡ãœãããåŒã³åºããŸãã
ãã®äŸã§ã¯ãcreateãšããç¹å¥ãªã¡ãœãããå®çŸ©ãããŠããŸãããã®ã¡ãœããã¯ããªããžã§ã¯ããã¯ããŒã³ããéã«æå®ããåŒæ°ãåŠçããŸãã
ãã®ã¡ãœããã¯ãC++ããã°ã©ããŒãã³ã³ã¹ãã©ã¯ã¿ãšåŒã¶ãã®ã«çžåœããŸãã
ãã®äŸã§ã¯ãã¯ã©ã¹ã«destroyãšããã¡ãœãããå®çŸ©ãããŠããŸãããããã®ã¡ãœãããå®çŸ©ããããšãã§ããŸãã
ãã®ã¡ãœããã¯ããªããžã§ã¯ããæ¶ããçŽåã«å®è¡ããããã®ã§ãC++ããã°ã©ããŒããã¹ãã©ã¯ã¿ãšåŒã¶ãã®ã«çžåœããŸãã
ãã ããPikeã¯èªåã¬ããŒãžã³ã¬ã¯ã·ã§ã³ãåããŠãããããC++ã»ã©ã¯é »ç¹ã«ãã¹ãã©ã¯ã¿ãå¿
èŠã«ãªãããšã¯ãããŸããã
=== æ§é äœãšããŠã®ã¯ã©ã¹ ===
Pikeã®ã¯ã©ã¹ã¯ãåãªãæ§é äœãšããŠã䜿çšã§ããŸããäŸãã°ãäžèšã®ã³ãŒãã®
:<syntaxhighlight lang=pike>
write("%s is %d year(s) old.\n", john->name, john->age);
</syntaxhighlight>
<code>john->name</code>, <code>john->age</code>ã®ããã«<code>ã€ã³ã¹ã¿ã³ã¹->ã¡ã³ãå€æ°</code>ã®æ§æã§ã€ã³ã¹ã¿ã³ã¹ã®ã¡ã³ãå€æ°ãåç
§ã§ããŸãã
次ã®äŸã§ã¯ãã¯ã©ã¹ã®é
åãäœãã¡ã³ãå€æ°ãããªãŒãã³ãã«æ±ã£ãŠããŸãã
;address_book.pike:<syntaxhighlight lang=pike>
class address_book_entry {
string name;
string address;
string phone_number;
}
int main() {
array(address_book_entry) address_book = ({ });
address_book_entry alice = address_book_entry();
alice->name = "Alice";
alice->address = "123 Main St, Anytown USA";
alice->phone_number = "555-1234";
address_book_entry bob = address_book_entry();
bob->name = "Bob";
bob->address = "456 Elm St, Anytown USA";
bob->phone_number = "555-5678";
address_book += ({ alice, bob });
foreach(address_book, address_book_entry entry) {
write("Name: %s,\tAddress: %s,\tPhone Number: %s\n",
entry->name,
entry->address,
entry->phone_number);
}
return 0;
}
</syntaxhighlight>
ãã®ã³ãŒãã¯ãäœæé²ã®é
ç®ãè¡šãããã® <code>address_book_entry</code> ãšããã¯ã©ã¹ãå®çŸ©ãããã®ã¯ã©ã¹ã䜿çšããŠäœæé²ãäœæããŠããŸãã
ãŸãã<code>address_book_entry</code> ã¯ã©ã¹ã¯ãååãäœæãé»è©±çªå·ã®3ã€ã®ã¡ã³ãå€æ°ãæã£ãŠããŸãã
ãããŠã<code>main</code> é¢æ°ã§ã¯ããŸã空ã®äœæé²ãè¡šãé
å <code>address_book</code> ãäœæããŸãã
次ã«ã<code>address_book_entry</code> ã¯ã©ã¹ãã2ã€ã®ãšã³ããªãŒ <code>alice</code> ãš <code>bob</code> ãäœæããããããã®ååãäœæãé»è©±çªå·ãèšå®ããŸãã
ãããŠããããã®ãšã³ããªãŒã <code>address_book</code> é
åã«è¿œå ããŸãã
æåŸã«ã<code>foreach</code> ã«ãŒãã䜿çšããŠã<code>address_book</code> é
åã«å«ãŸãããã¹ãŠã®ãšã³ããªãŒãåºåããŸãã
åãšã³ããªãŒã®æ
å ±ã¯ã<code>write</code> é¢æ°ã䜿çšããŠæŽåœ¢ããåºåãããŸãã
ãã®ã³ãŒããå®è¡ãããšã以äžã®ãããªåºåãåŸãããŸãïŒ
:<syntaxhighlight lang=text>
Name: Alice, Address: 123 Main St, Anytown USA, Phone Number: 555-1234
Name: Bob, Address: 456 Elm St, Anytown USA, Phone Number: 555-5678
</syntaxhighlight>
ããã¯ã2ã€ã®ãšã³ããªãŒãæ£åžžã«äœæãããäœæé²ã«è¿œå ãããæ£åžžã«åºåãããŠããããšã瀺ããŠããŸãã
=== ããã°ã©ã ã¯ã¯ã©ã¹ã§ã¯ã©ã¹ã¯ããã°ã©ã ===
Pikeã«ãããŠãããã°ã©ã ãšã¯ã©ã¹ã¯åãã§ããããšãé©ããããããŸãããã€ãŸããPikeã§ã¯ããã°ã©ã ãšã¯ã©ã¹ã¯å矩èªãšããŠäœ¿çšãããããšããããŸãã
ãã¡ã€ã«å
ã®Pikeããã°ã©ã ã¯ã¯ã©ã¹å®çŸ©ã§ããããã¡ã€ã«ã§å®çŸ©ãããã¡ãœããã¯ãã®ã¯ã©ã¹ã®ã¡ãœããã§ãããã°ããŒãã«å€æ°ïŒã€ãŸããã¡ãœããã®å€ã§å®çŸ©ãããå€æ°ïŒã¯ã¡ã³ãå€æ°ã§ããå¿
èŠã§ããã°ããã¡ã€ã«å
ã®ã³ãŒãã«æé»çã«ãclass {}ãããããšæ³åã§ããŸãã
ãã ãã现ããã¯ã©ã¹ããšã«ããããã®ãã¡ã€ã«ãçšæããªããã°ãªããªããšãªããšé¢åã«ãªãã®ã§ããclass {}ãã®è¡šèšãçšæãããŠããŸãã
;person.pike:<syntaxhighlight lang=pike>
string name;
int age;
void create(string n, int a) {
name = n;
age = a;
}
void say_hello() { write("Hello, I'm " + name + ".\n"); }
</syntaxhighlight>
èŠèŠããããã³ãŒãã§ãããclass { } ã§å²ãŸããŠããŸãããã
Pikeã®ã¯ã©ã¹ãšããã°ã©ã ã®é¢ä¿ã¯ç¹ç°çã§ãããé¡äŸãšããŠã¯[[Zig]]ã®æ§é äœãšããã°ã©ã ã®é¢ä¿ããããŸãã
=== è€çŽ æ°åãå®è£
ããŠã¿ã ===
è€çŽ æ°ã¯å®æ°éšãšèæ°éšããæãæ°ã®åœ¢åŒã§ãããPikeã«ã¯çµã¿èŸŒã¿ã®è€çŽ æ°åããªããããç¬èªã®ã¯ã©ã¹ãäœæããŸããã
<code>complex</code> ã¯ã©ã¹ã¯ãå®æ°éšãšèæ°éšãã¡ã³ãå€æ°ãšããŠæã¡ãå ç®ãæžç®ãä¹ç®ãªã©ã®æäœãè¡ãæŒç®åãæäŸããŠããŸãããŸãã絶察å€ãæåååãå®è£
ãããŠããŸãã
;[http://tpcg.io/_O0WQDM complex.pike]:<syntaxhighlight lang=pike>
class complex {
private float _real = 0.0;
private float _imag = 0.0;
float `real() { return _real; }
float `imag() { return _imag; }
void create(mixed real, mixed ... rest) {
this::_real = (float) real;
this::_imag = sizeof(rest) ? (float)rest[0] : 0.0;
}
// å ç®ã¡ãœãã
complex `+(complex other) {
return complex(real + other.real, imag + other.imag);
}
mixed ``+(mixed arg) { return complex((float)arg + real, imag); }
// æžç®ã¡ãœãã
complex `-(complex other) {
return complex(real - other.real, imag - other.imag);
}
mixed ``-(mixed arg) { return complex((float)arg - real, -imag); }
// ä¹ç®ã¡ãœãã
complex `*(complex other) {
float r = real * other.real - imag * other.imag;
float i = real * other.imag + imag * other.real;
return complex(r, i);
}
mixed ``*(mixed arg) {
arg = (float)arg;
return complex(arg * real, arg * imag);
}
// 絶察å€
float `abs() {
return sqrt(real * real + imag * imag);
}
// æååå
string _sprintf() {
if (imag == 0.0)
return sprintf("%O", real);
if (real == 0.0)
return sprintf("%Oi", imag);
if (imag < 0.0)
return sprintf("(%O - %Oi)", real, -imag);
return sprintf("(%O + %Oi)", real, imag);
}
}
int main() {
complex c1 = complex(3.0, 4.0);
complex c2 = complex(1.5, -1.0);
write("complex(999.0, 0.0) = %O\n", complex(999.0, 0.0));
write("complex(0.0, 999.0) = %O\n", complex(0.0, 999.0));
write("complex(0.0, 0.0) = %O\n", complex(0.0, 0.0));
write("%O->real = %O\n", c1, c1->real);
write("%O->imag = %O\n", c1, c1->imag);
write("%O + %O = %O\n", c1, c2, c1 + c2);
write("%O - %O = %O\n", c1, c2, c1 - c2);
write("%O * %O = %O\n", c1, c2, c1 * c2);
write("%O.abs = %O\n", c1, c1->abs);
complex i = complex(0.0, 1.0);
foreach (({ 3.0, 1, -2, "123" }), mixed x) {
write("\ncomplex(%O) = %O\n", x, complex(x));
write("\t%O + %O = %O\n", x, i, x + i);
write("\t%O - %O = %O\n", x, i, x - i);
write("\t%O * %O = %O\n", x, i, x * i);
}
return 0;
}
</syntaxhighlight>
;å®è¡çµæ:<syntaxhighlight lang=text>
complex(999.0, 0.0) = 999.0
complex(0.0, 999.0) = 999.0i
complex(0.0, 0.0) = 0.0
(3.0 + 4.0i)->real = 3.0
(3.0 + 4.0i)->imag = 4.0
(3.0 + 4.0i) + (1.5 - 1.0i) = (4.5 + 3.0i)
(3.0 + 4.0i) - (1.5 - 1.0i) = (1.5 + 5.0i)
(3.0 + 4.0i) * (1.5 - 1.0i) = (8.5 + 3.0i)
(3.0 + 4.0i).abs = 5.0
complex(3.0) = 3.0
3.0 + 1.0i = (3.0 + 1.0i)
3.0 - 1.0i = (3.0 - 1.0i)
3.0 * 1.0i = 3.0i
complex(1) = 1.0
1 + 1.0i = (1.0 + 1.0i)
1 - 1.0i = (1.0 - 1.0i)
1 * 1.0i = 1.0i
complex(-2) = -2.0
-2 + 1.0i = (-2.0 + 1.0i)
-2 - 1.0i = (-2.0 - 1.0i)
-2 * 1.0i = -2.0i
complex("123") = 123.0
"123" + 1.0i = (123.0 + 1.0i)
"123" - 1.0i = (123.0 - 1.0i)
"123" * 1.0i = 123.0i
</syntaxhighlight>
ãã®Pikeã®ã³ãŒãã¯ã<code>complex</code>ïŒè€çŽ æ°ïŒã¯ã©ã¹ãå®çŸ©ããè€çŽ æ°ã®æŒç®ãæ©èœãå®è£
ããŠããŸãã以äžã«åéšåã®è§£èª¬ãããŸãã
ãŸãã<code>complex</code>ã¯ã©ã¹ã®å®çŸ©ã§ããã¯ã©ã¹å
ã§äœ¿çšããããã©ã€ããŒããªå€æ° <code>_real</code> ãš <code>_imag</code> ãå®çŸ©ãããŠããŸãã
ãŸãã<code>`real()</code> ã¡ãœãããš <code>`imag()</code> ã¡ãœãããå®çŸ©ããããããã <code>_real</code> ãš <code>_imag</code> ã®å€ãè¿ããŸãã
次ã«ã<code>create()</code> ã¡ãœãããå®çŸ©ãããŠããŸãããã®ã¡ãœããã¯ãã³ã³ã¹ãã©ã¯ã¿ã®åœ¹å²ãæãããŸãã
å¯å€é·åŒæ°ãåãåããæåã®åŒæ°ãå®éš <code>_real</code> ã«ãæ®ãã®åŒæ°ïŒããååšããå ŽåïŒãèéš <code>_imag</code> ã«ä»£å
¥ããŸãã
å ç®ãæžç®ãä¹ç®ã®æŒç®åã¡ãœãããå®çŸ©ãããŠããŸããäŸãã°ã<code>+</code>æŒç®åã«å¯Ÿã㊠<code>complex</code> ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãšã®å ç®ãè¡ããšãå®éšãšèéšããããã足ããçµæã®æ°ãã <code>complex</code> ã€ã³ã¹ã¿ã³ã¹ãè¿ãããŸãããŸãã<code>+</code>æŒç®åã«å¯Ÿã㊠<code>mixed</code> åïŒç°ãªãåã®å ç®ã蚱容ããïŒã®åŒæ°ãåãåãå Žåã¯ãåŒæ°ãå®éšãšããŠè¶³ãåãããæ°ãã <code>complex</code> ã€ã³ã¹ã¿ã³ã¹ãè¿ãããŸãã
<code>`abs</code>ã¡ãœããã¯ãè€çŽ æ°ã®çµ¶å¯Ÿå€ãè¿ãããã®ã¡ãœããã§ãã絶察å€ã¯å®éšã®äºä¹ãšèéšã®äºä¹ã®åã®å¹³æ¹æ ¹ãšããŠèšç®ãããŸãã
<code>_sprintf</code> ã¡ãœããã¯ãè€çŽ æ°ãæååãšããŠè¡šç€ºããããã®ãã©ãŒããããæäŸããŸãã
æåŸã«ã<code>main</code> é¢æ°ã§ã¯ã<code>complex</code>ã¯ã©ã¹ã®ãªããžã§ã¯ããäœæãããããã®åã¡ãœãããåŒã³åºããŠããŸãã
ãŸãã<code>foreach</code>ã«ãŒãã䜿ã£ãŠãé
åã®åèŠçŽ ã«ã€ã㊠<code>complex</code> ãªããžã§ã¯ããäœæãããããã®å ç®ãæžç®ãä¹ç®ãèšç®ããŠããŸãã
=== ç¶æ¿ãšå
å« ===
ç¶æ¿ã¯ãæ¢åã®ã¯ã©ã¹ãåºç€ãšããŠãæ°ããã¯ã©ã¹ãäœæããããšãã§ããä»çµã¿ã§ããç¶æ¿ã«ãããæ¢åã®ã¯ã©ã¹ã®ãã¹ãŠã®ãã£ãŒã«ããšã¡ãœãããæ°ããã¯ã©ã¹ã«åŒãç¶ãããšãã§ããŸãããŸããæ°ããã¯ã©ã¹ã«ã¯ãç¶æ¿å
ã®ã¯ã©ã¹ã«ã¯ååšããªããã£ãŒã«ããã¡ãœãããè¿œå ããããšãã§ããŸããããã«ãããããç¹åããã¯ã©ã¹ãäœæããããšãã§ããŸãã
Pikeã§ã¯ãã¯ã©ã¹ç¶æ¿ã¯<code>inherit</code>ããŒã¯ãŒãã䜿çšããŠå®£èšãããŸããç¶æ¿å
ã®ã¯ã©ã¹ã¯ã<code>inherit</code>ããŒã¯ãŒãã®åŸã«æå®ãããŸãã
å³åœ¢ãäŸã«ã¯ã©ã¹ã®ç¶æ¿ã解説ããŸãã
;[http://tpcg.io/_QJLFP5 inherit.pike]:<syntaxhighlight lang=pike>
class point(int x, int y) {
point move(int dx, int dy) {
x += dx;
y += dy;
write("point::move\n");
return this;
}
string _sprintf() {
return sprintf("point(%d, %d)", x, y);
}
}
class shape {
point location;
void create(int x, int y) {
location = point(x, y);
write("shape::constructor\n");
}
shape move(int x, int y) {
location.move(x, y);
write("shape::move\n");
return this;
}
string _sprintf() {
return sprintf("location: %s", location->_sprintf());
}
}
class rectangle {
inherit shape;
int width;
int height;
void create(int x, int y, int width, int height) {
::create(x, y);
this.width = width;
this.height = height;
write("rectangle::constructor\n");
}
string _sprintf() {
return sprintf("rectangle { %s, width: %d, height: %d }",
::_sprintf(), width, height);
}
}
int main() {
write("Create a rectangle!\n");
rectangle rct = rectangle(12, 32, 100, 50);
write("rct = %O\n", rct);
rectangle rct2 = rectangle(1, 2, 10, 150);
write("rct = %O\n", rct);
write("rct2 = %O\n", rct2);
return 0;
}
</syntaxhighlight>
ãŸãã<code>point</code>ã¯ã©ã¹ãå®çŸ©ãããŠããŸãããã®ã¯ã©ã¹ã¯2次å
ã®åº§æšãè¡šããŸããã³ã³ã¹ãã©ã¯ã¿ã§x座æšãšy座æšãåãåãããã®å€ãä¿æããŸãã<code>move</code>ã¡ãœããã¯ã座æšãæå®ããéã ã移åãããããã®ã¡ãœããã§ããå
éšã§x座æšãšy座æšãæŽæ°ãã移åããããšã衚瀺ããŸãããŸãã<code>_sprintf</code>ã¡ãœããã¯ããªããžã§ã¯ãã®æååè¡šçŸãè¿ãããã®ç¹æ®ãªã¡ãœããã§ãã
次ã«ã<code>shape</code>ã¯ã©ã¹ãå®çŸ©ãããŠããŸãããã®ã¯ã©ã¹ã¯å³åœ¢ãè¡šãããã®åºæ¬ã¯ã©ã¹ã§ãã<code>shape</code>ã¯ã©ã¹ã¯<code>point</code>ãªããžã§ã¯ããä¿æããŠããããã®äœçœ®ãè¡šããŸãã<code>create</code>ã¡ãœããã¯ãæå®ããã座æšã«æ°ãã<code>point</code>ãªããžã§ã¯ããäœæãã<code>location</code>ã«ä»£å
¥ããŸãã<code>move</code>ã¡ãœããã¯ã<code>location</code>ã®åº§æšãæå®ããéã ã移åãããããã®ã¡ãœããã§ããå
éšã§<code>point</code>ãªããžã§ã¯ãã®<code>move</code>ã¡ãœãããåŒã³åºããŠããŸãããŸãã<code>_sprintf</code>ã¡ãœããã¯ããªããžã§ã¯ãã®æååè¡šçŸãè¿ãããã®ç¹æ®ãªã¡ãœããã§ãã
æåŸã®ã<code>rectangle</code>ã¯ã©ã¹ãå®çŸ©ãããŠããŸãããã®ã¯ã©ã¹ã¯<code>shape</code>ã¯ã©ã¹ãç¶æ¿ããŠãããç©åœ¢ãè¡šããŸãã<code>create</code>ã¡ãœããã§ã¯ã芪ã¯ã©ã¹ã®<code>create</code>ã¡ãœãããåŒã³åºããŠäœçœ®ãèšå®ããããã«å¹
ãšé«ããèšå®ããŸãã<code>_sprintf</code>ã¡ãœããã§ã¯ã芪ã¯ã©ã¹ã®<code>_sprintf</code>ã¡ãœãããåŒã³åºããŠèŠªã¯ã©ã¹ã®æ
å ±ã衚瀺ããããã«ç¶ããŠç©åœ¢åºæã®æ
å ±ã§ããå¹
ãšé«ãã衚瀺ããŸãã
<code>main</code>é¢æ°ã§ã¯ãå®éã«<code>rectangle</code>ãªããžã§ã¯ããäœæããæäœçµæã衚瀺ããŠããŸããæåã«<code>rct</code>ãšããååã®ç©åœ¢ãªããžã§ã¯ããäœæãããã®æ¬¡ã«<code>rct2</code>ãšããå¥ã®ç©åœ¢ãªããžã§ã¯ããäœæããŠããŸããåãªããžã§ã¯ãã®æ
å ±ã衚瀺ããŠããŸãã
=== å€éç¶æ¿ ===
æã«ã¯ã2ã€ãŸãã¯ãã以äžã®ã¯ã©ã¹ããç¶æ¿ãããå ŽåããããŸããããã¯PikeïŒããã³C++ïŒã§åäœããŸãããJavaã§ã¯åäœããŸããããã ãè€æ°ã®ç¶æ¿ãèšè¿°ããã°è¯ãã§ãã
:<syntaxhighlight lang=pike>
class B {
...
}
class C {
...
}
class D {
inherit B;
inherit E;
}
</syntaxhighlight>
=== ã¢ã¯ã»ã¹ä¿®é£Ÿå ===
ã®äŸã§ã¯ããã¹ãŠã®ãªããžã§ã¯ãã®ãã¹ãŠã®ã¡ãœãããšã¡ã³ãå€æ°ã«èª°ã§ãã¢ã¯ã»ã¹ã§ããŸããã
äŸãã°ã次ã®ããã«å¹Žéœ¢ãæžããããšãéåžžã«ç°¡åã§ããã
:<syntaxhighlight lang=pike>
john->age -= 50;
</syntaxhighlight>
ããïŒãã®johnã®å¹Žéœ¢ã¯30æ³ã§ãä»ã¯ãã€ãã¹20æ³ã«ãªã£ãŠããïŒ
ä»ã®ã¯ã©ã¹ãããã®å€æ°ã«è§Šããªãããã«ãã¡ã³ãå€æ° age ãžã®ã¢ã¯ã»ã¹ãå¶åŸ¡ããããšæããŸãã
ãã®ãããªçšéã®ããã«ãã¡ãœãããŸãã¯ã¡ã³ãå€æ°ã®å®çŸ©ã§ãããŒã¿åã®åã«æžãããããã€ãã®ã¢ã¯ã»ã¹ä¿®é£ŸåããããŸãã
äŸãã°ã人ç©ã®å¹Žéœ¢ã¯ã¡ã³ãå€æ° age ã«ãã£ãŠè¡šãããŸãã
:<syntaxhighlight lang=pike>
int age;
</syntaxhighlight>
ãããå€æŽããŠã
:<syntaxhighlight lang=pike>
private int age;
</syntaxhighlight>
ãšãããšãåãã¯ã©ã¹å
ã®ã¡ãœããã®ã¿ããã®å€æ°ã«ã¢ã¯ã»ã¹ã§ããããã«ãªããŸãã
次ã®ã¢ã¯ã»ã¹ä¿®é£ŸåãååšããŸãã
;public:ãããããã©ã«ãã§ãä»»æã®ã¡ãœãããã¡ã³ãå€æ°ã«ã¢ã¯ã»ã¹ããããã¡ãœãããåŒã³åºãããã§ããŸãã
;private:ã¡ã³ãå€æ°ãŸãã¯ã¡ãœããããåãã¯ã©ã¹å
ã®ã¡ãœããã®ã¿ã§å©çšå¯èœã§ããããšãæå³ããŸãã
;static:ãã®ã¡ã³ãå€æ°ãŸãã¯ã¡ãœããã¯ãåãã¯ã©ã¹å
ã®ã¡ãœããããã³ãµãã¯ã©ã¹ã®ã¡ãœããã®ã¿ã䜿çšã§ããŸãïŒPikeã® static ã¯ãC++ã® static ãšãŸã£ããåãæå³ã§ã¯ãªãã代ããã« C++ã® protected ã«äŒŒãŠããŸãïŒã
;local:ãã®ã¡ãœããããµãã¯ã©ã¹ã®ã¡ãœããã«ãã£ãŠãªãŒããŒã©ã€ããããŠããŠãããã®ã¯ã©ã¹ã®ã¡ãœããã¯ãã®ã¡ãœããã䜿çšãç¶ããŸãã
;final:ãµãã¯ã©ã¹ããã®ã¡ãœãããåå®çŸ©ã§ããªãããã«ããŸãã
ã¯ã©ã¹ã«ã³ã³ã¹ãã©ã¯ã¿ïŒã€ãŸããcreate ãšããååã®ã¡ãœããïŒãããå Žåãããã static ã«å®£èšããããšãè¯ãã¢ã€ãã¢ã§ãã
ããã¯ãªããžã§ã¯ãã®æ§ç¯äžã«ã®ã¿åŒã³åºãããã¹ãã§ãããstatic ã§ãªãå Žåãç¶æ¿ã«é¢é£ããããã€ãã®åã®äžæŽåãçããå¯èœæ§ããããŸãã
== ãã¡ã€ã«æäœ ==
{{å
é ã«æ»ã}}
Pikeã§ã¯ããã¡ã€ã«I/Oã« Stdio ãªããžã§ã¯ãã䜿ããŸãã
=== ãã¡ã€ã«ã®èªã¿åºã ===
:<syntaxhighlight lang=pike>
int main() {
constant fname = "/etc/hosts";
string|int buff = Stdio.read_file(fname);
if (intp(buff)) {
Stdio.perror(fname);
return 1;
}
write(buff);
return 0;
}
</syntaxhighlight>
ãã®Pikeã®ã³ãŒãã¯ããã¡ã€ã« "/etc/hosts" ãèªã¿èŸŒã¿ããã®äžèº«ãæšæºåºåã«åºåããããã°ã©ã ã§ãã
ãŸãã<code>string</code>åã®å€æ° <code>fname</code> ã« "/etc/hosts" ãšãããã¡ã€ã«ã®ãã¹ã代å
¥ããŠããŸãã次ã«ã<code>Stdio</code> ã¢ãžã¥ãŒã«ã® <code>read_file()</code> é¢æ°ã䜿ã£ãŠã<code>fname</code> ã«æå®ããããã¡ã€ã«ãèªã¿èŸŒãã§ããŸããèªã¿èŸŒãã çµæã¯ã<code>string|int</code>åã®å€æ° <code>buff</code> ã«ä»£å
¥ãããŸãã
<code>string|int</code> åãšã¯ã<code>string</code> åãŸã㯠<code>int</code> åã®ããããã®å€ã代å
¥å¯èœãªåã§ãããã㯠<code>read_file()</code> é¢æ°ãããã¡ã€ã«ã®èªã¿èŸŒã¿ã«æåããå Žåã¯ãã¡ã€ã«ã®å
容ã <code>string</code> åã§è¿ãã倱æããå Žå㯠<code>0</code> ãè¿ãããã§ãããšã©ãŒãçºçããå Žåã<code>intp()</code> é¢æ°ã䜿ã£ãŠ <code>buff</code> ã®åã <code>int</code> åã§ããããšã確èªãã<code>Stdio.perror()</code> é¢æ°ã䜿ã£ãŠãšã©ãŒã®è©³çŽ°ãæšæºãšã©ãŒåºåã«åºåããåŸãããã°ã©ã ã¯çµäºããŸãã
èªã¿èŸŒã¿ã«æåããå Žåã<code>write()</code> é¢æ°ã䜿ã£ãŠã<code>buff</code> ã®å
容ãæšæºåºåã«åºåããŸããæåŸã«ãããã°ã©ã ã¯çµäºããŸãã
ãã®ã³ãŒãã¯ãã·ã¹ãã ãã¡ã€ã« "/etc/hosts" ã®äžèº«ã衚瀺ããããã«äœ¿çšãããŸãããã ããrootæš©éãå¿
èŠãªå Žåãããããã泚æãå¿
èŠã§ãã
=== ãã¡ã€ã«ã®æžã蟌㿠===
:<syntaxhighlight lang=pike>
int main() {
constant fname = "sample.txt";
int cnt;
int|array err = catch {
cnt = Stdio.write_file(fname, "TEST TEXT");
};
if (arrayp(err)) {
write(err[0]);
return 2;
}
string|int buff = Stdio.read_file(fname);
if (intp(buff)) {
Stdio.perror(fname);
return 1;
}
write(buff);
return 0;
}
</syntaxhighlight>
ãã®ããã°ã©ã ã¯ããã¡ã€ã«ã®æžã蟌ã¿ãšèªã¿èŸŒã¿ãè¡ãããããæ£åžžã«ã§ãããã©ããããã§ãã¯ããŸãã
ãŸãã<code>main()</code>é¢æ°ãå®çŸ©ãããŠããŸãã
次ã«ã<code>string fname = "sample.txt";</code>ã§ãã¡ã€ã«åãæå®ãã<code>int cnt;</code>ã§æžã蟌ãã ãã€ãæ°ãæ ŒçŽããå€æ°ã宣èšããŸãã
ãŸãããšã©ãŒãçºçããå Žåã®ãšã©ãŒã¡ãã»ãŒãžãæ ŒçŽããå€æ°<code>int|array err</code>ã宣èšããŠããŸãã
ãã®å€æ°ã¯ã<code>catch</code>ã«ãã£ãŠäŸå€ãçºçããå Žåã«ãçç±ãšã¹ã¿ãã¯ãã¬ãŒã¹ãæ ŒçŽãããŸãã
<code>catch</code>ã®ãããã¯å
ã§ã¯ã<code>Stdio.write_file</code>é¢æ°ã䜿çšããŠãæå®ããããã¡ã€ã«ã«ããã¹ããæžã蟌ã¿ãŸãã
<code>catch</code>ãããã¯ã®å€åŽã§ã<code>arrayp</code>é¢æ°ã䜿çšããŠã<code>err</code>å€æ°ã®åãé
åã§ãããã©ããããã§ãã¯ããŸãã
ããé
åã§ããã°ããšã©ãŒã¡ãã»ãŒãžãåºåãã<code>return 2;</code>ã§ããã°ã©ã ãçµäºããŸãã
次ã«ã<code>string|int buff = Stdio.read_file(fname);</code>ã§ãæå®ããããã¡ã€ã«ããããã¹ããèªã¿èŸŒãã§ãèªã¿èŸŒãã ããã¹ãã<code>string</code>åã®å€æ°<code>buff</code>ã«æ ŒçŽããŸãã
ããèªã¿èŸŒã¿ã«å€±æããå Žåã¯ã<code>intp</code>é¢æ°ã䜿çšããŠã<code>buff</code>å€æ°ã®åãæŽæ°åã§ãããã©ããããã§ãã¯ããŸãã
æŽæ°åã§ããã°ã<code>Stdio.perror(fname);</code>ã§ãšã©ãŒã¡ãã»ãŒãžãåºåãã<code>return 1;</code>ã§ããã°ã©ã ãçµäºããŸãã
æåŸã«ãèªã¿èŸŒãã ããã¹ãã<code>write(buff);</code>ã§åºåãã<code>return 0;</code>ã§ããã°ã©ã ãæ£åžžã«çµäºããŸãã
== ãããã¯ãŒã¯ããã°ã©ãã³ã° ==
=== ãœã±ããã®æŠå¿µ ===
=== ãœã±ããéä¿¡ã®åºæ¬ ===
=== ã¯ã©ã€ã¢ã³ãã»ãµãŒããŒã®äœæ ===
== éé² ==
{{å
é ã«æ»ã}}
=== ããŒã¯ãŒã ===
:<syntaxhighlight lang=pike>
array __attribute__ auto break case catch class constant continue default __deprecated__ do else enum extern final float for foreach __func__ function gauge global if import inherit inline int lambda local mapping mixed multiset object optional predef private program protected public return sscanf static _Static_assert string switch typedef typeof __unknown__ __unused__ variant void __weak__ while
</syntaxhighlight>
<!--
:{| class="sortable wikitable"
!ããŒã¯ãŒã
!åé¡
!説æ
|-
!array
|ããŒã¿å
|è€æ°ã®èŠçŽ ãæ ŒçŽããããã®ããŒã¿åã§ãã€ã³ããã¯ã¹ã«ãã£ãŠã¢ã¯ã»ã¹ã§ããŸãã
|-
!break
|å¶åŸ¡æ§æ
|ç¹°ãè¿ãæïŒ<code>for</code>ã<code>while</code>ãªã©ïŒãswitchæããéäžã§æããããã«äœ¿çšããŸãã
|-
!case
|å¶åŸ¡æ§æ
|<code>switch</code>æã§ã®åå²åŠçã«ãããŠãæ¡ä»¶ãšäžèŽããå Žåã«å®è¡ãããã³ãŒããããã¯ãå®çŸ©ããŸãã
|-
!catch
|å¶åŸ¡æ§æ
|<code>try</code>ãããã¯å
ã§çºçããäŸå€ãææãã察å¿ããäŸå€åŠçãå®è¡ããŸãã
|-
!constant
|宣èš
|å€ãå€æŽäžå¯ãªå®æ°ïŒå®æ°åŒïŒã宣èšããŸãã
|-
!continue
|å¶åŸ¡æ§æ
|ç¹°ãè¿ãæïŒ<code>for</code>ã<code>while</code>ãªã©ïŒã®çŸåšã®ã€ãã¬ãŒã·ã§ã³ãã¹ããããã次ã®ã€ãã¬ãŒã·ã§ã³ã«é²ãããã«äœ¿çšããŸãã
|-
!default
|å¶åŸ¡æ§æ
|<code>switch</code>æã§ã®åå²åŠçã«ãããŠãæ¡ä»¶ãšäžèŽããã±ãŒã¹ããªãå Žåã«å®è¡ãããã³ãŒããããã¯ãå®çŸ©ããŸãã
|-
!do
|å¶åŸ¡æ§æ
|æ¡ä»¶åŒã®å€å®ãè¡ãåã«ããŸãå®è¡ãã¹ãã³ãŒããããã¯ãæå®ããŸãã
|-
!else
|å¶åŸ¡æ§æ
|<code>if</code>æã<code>elseif</code>æã§æ¡ä»¶åŒã®çµæãåœïŒfalseïŒã®å Žåã«å®è¡ãããã³ãŒããããã¯ãæå®ããŸãã
|-
!final
|宣èš
|ã¯ã©ã¹å®çŸ©å
ã®ã¡ãœããã«å¯ŸããŠäœ¿çšããããã®ã¡ãœããããªãŒããŒã©ã€ãäžå¯èœã§ããããšã瀺ããŸãã
|-
!float
|ããŒã¿å
|æµ®åå°æ°ç¹æ°ãè¡šãããŒã¿åã§ãã
|-
!for
|å¶åŸ¡æ§æ
|ã«ãŒãåŠçãè¡ãããã®å¶åŸ¡æ§æã§ãæå®ããåæ°ã ãã³ãŒããããã¯ãç¹°ãè¿ãå®è¡ããŸãã
|-
!foreach
|å¶åŸ¡æ§æ
|ã³ã¬ã¯ã·ã§ã³ïŒé
åãããããªã©ïŒã®èŠçŽ ãé çªã«åãåºããŠãããããã«å¯ŸããŠã³ãŒããããã¯ãå®è¡ããŸãã
|-
!function
|ããŒã¿å
|åŒã³åºãå¯èœãªããŒã¿ïŒé¢æ°ãè¡šãããŒã¿åœ¢ã§ãã
|-
!gauge
|å¶åŸ¡æ§é
|äŸå€ãææããŸãã
|-
!if
|å¶åŸ¡æ§æ
|æ¡ä»¶åŒãè©äŸ¡ããçµæã«å¿ããŠå®è¡ãã¹ãã³ãŒããããã¯ãéžæããŸããæ¡ä»¶ãçïŒtrueïŒã®å Žåã¯<code>if</code>ãããã¯ãå®è¡ãããåœïŒfalseïŒã®å Žåã¯<code>else</code>ãããã¯ãå®è¡ãããå ŽåããããŸãã
|-
!import
|宣èš
|å€éšã®ã¢ãžã¥ãŒã«ããã¡ã€ã«ããé¢æ°ãå€æ°ãåã蟌ãããã«äœ¿çšãããŸããä»ã®ã¢ãžã¥ãŒã«ã®æ©èœãå©çšããããã«ã¯ãäºåã«<code>import</code>æã䜿çšããŠå¿
èŠãªèŠçŽ ãã€ã³ããŒãããå¿
èŠããããŸãã
|-
!inherit
|宣èš
|ã¯ã©ã¹ã®ç¶æ¿ã«äœ¿çšãããããŒã¯ãŒãã§ãããå¥ã®ã¯ã©ã¹ããã¡ã³ããæ¯ãèããç¶æ¿ããããšãã§ããŸããç¶æ¿ã«ãã£ãŠæ¢åã®ã¯ã©ã¹ãæ¡åŒµããããå
±éã®æ©èœãè€æ°ã®ã¯ã©ã¹ã§å
±æããããšãã§ããŸãã
|-
!inline
|宣èš
|ã€ã³ã©ã€ã³é¢æ°ãšããŠå®çŸ©ãããé¢æ°ã¯ãé¢æ°åŒã³åºãã®ãªãŒããŒããããæžããããã«ãã³ã³ãã€ã«æã«é¢æ°ã®æ¬äœãå±éãããããšããããŸããé«é »åºŠã§åŒã³åºãããçãåŠçãå¹ççã«å®è¡ããå Žåã«äœ¿çšãããŸãã
|-
!int
|ããŒã¿å
|æŽæ°ãè¡šãããŒã¿åã§ããæ£ã®æŽæ°ãè² ã®æŽæ°ãããã³ãŒããæ±ãããšãã§ããŸãã
|-
!lambda
|宣èš
|ç¡åé¢æ°ïŒã©ã ãé¢æ°ïŒãäœæããããã®ããŒã¯ãŒãã§ããé¢æ°ãªããžã§ã¯ããçŽæ¥å®çŸ©ããå€æ°ã«ä»£å
¥ãããä»ã®é¢æ°ã«æž¡ãããšãã§ããŸããé¢æ°ãäžæçã«å®çŸ©ãããå Žåããã³ãŒã«ããã¯é¢æ°ãšããŠäœ¿çšããå Žåã«äŸ¿å©ã§ãã
|-
!local
|宣èš
|é¢æ°å
ã§ã®ã¿æå¹ãªããŒã«ã«å€æ°ã宣èšããããã«äœ¿çšãããŸããããŒã«ã«å€æ°ã¯ãé¢æ°å
ã§ã®ã¿åç
§ããã³å€æŽããããšãã§ããŸããä»ã®éšåããã¯çŽæ¥ã¢ã¯ã»ã¹ããããšã¯ã§ããŸãããããŒã«ã«å€æ°ã¯ãé¢æ°ã®å®è¡æã«äœæãããé¢æ°ã®å®è¡ãçµäºãããšç Žæ£ãããŸãã
|-
!mapping
|ããŒã¿å
|ããŒãšå€ã®ãã¢ãæ ŒçŽããããã®ããŒã¿åã§ãããé£æ³é
åãããã·ã¥ããããšããŠç¥ãããŠããŸããããŒã䜿çšããŠå€ã«ã¢ã¯ã»ã¹ããããšãã§ããŸãã
|-
!multiset
|ããŒã¿å
|è€æ°ã®èŠçŽ ãæ ŒçŽããããã®ããŒã¿åã§ãããèŠçŽ ã®éè€ãèš±å¯ãããŸããé åºã¯ä¿æããããèŠçŽ ã®æ°ãæ°ããããšãã§ããŸããéè€ããèŠçŽ ãå«ããªã¹ããã»ããã®ãããªããŒã¿æ§é ãè¡šçŸããããã«äœ¿çšãããŸãã
|-
!object
|ããŒã¿å
|ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãè¡šãããã®ããŒã¿åã§ãããã¡ã³ãå€æ°ãã¡ãœãããæã€ãªããžã§ã¯ããäœæããããšãã§ããŸãããªããžã§ã¯ãæåããã°ã©ãã³ã°ã®æŠå¿µããµããŒãããããŒã¿ãšããã«é¢é£ããæäœãã«ãã»ã«åããŸãã
|-
!predef
|宣èš
|Pikeã®çµã¿èŸŒã¿é¢æ°ãå€æ°ãåç
§ããããã®ããªãã£ãïŒpredefinedïŒãªããžã§ã¯ãã§ããçµã¿èŸŒã¿é¢æ°ãå€æ°ã®äžèŠ§ãããã¥ã¡ã³ããååŸããããã«äœ¿çšãããŸãã
|-
!private
|宣èš
|ã¯ã©ã¹å
ã®ã¡ã³ãå€æ°ãã¡ãœããããã©ã€ããŒããšããŠå®£èšããŸãããã©ã€ããŒããªã¡ã³ãã¯ãåãã¯ã©ã¹å
ã®ä»ã®ã¡ã³ãããã®ã¿ã¢ã¯ã»ã¹å¯èœã§ãããå€éšããã®çŽæ¥çãªã¢ã¯ã»ã¹ã¯å¶éãããŸããæ
å ±é èœãããŒã¿ã®ä¿è·ãç®çãšããŠäœ¿çšãããŸãã
|-
!protected
|宣èš
|ã¯ã©ã¹å
ã®ã¡ã³ãå€æ°ãã¡ãœããããããã¯ããããšããŠå®£èšããŸãããããã¯ããããªã¡ã³ãã¯ãåãã¯ã©ã¹å
ããã³æŽŸçã¯ã©ã¹å
ããã¢ã¯ã»ã¹å¯èœã§ãããå€éšããã®çŽæ¥çãªã¢ã¯ã»ã¹ã¯å¶éãããŸããæ
å ±ã®ã«ãã»ã«åãšæŽŸçã¯ã©ã¹ã§ã®åå©çšæ§ãåäžãããããã«äœ¿çšãããŸãã
|-
!public
|宣èš
|ã¯ã©ã¹å
ã®ã¡ã³ãå€æ°ãã¡ãœããããããªãã¯ãšããŠå®£èšããŸãããããªãã¯ãªã¡ã³ãã¯ãã©ã®ã¯ã©ã¹ããã§ãã¢ã¯ã»ã¹å¯èœã§ããå€éšããã®çŽæ¥çãªã¢ã¯ã»ã¹ãèš±å¯ããããããã¡ã³ãå€æ°ãžã®èªã¿æžããã¡ãœããã®åŒã³åºããå¯èœã§ããã¯ã©ã¹ã®å
¬éã€ã³ã¿ãŒãã§ãŒã¹ãå®çŸ©ããããã«äœ¿çšãããŸãã
|-
!return
|å¶åŸ¡æ§æ
|é¢æ°ããå€ãè¿ãããã«äœ¿çšãããããŒã¯ãŒãã§ããé¢æ°å
ã§<code>return</code>æãå®è¡ããããšããã以éã®ã³ãŒãã¯å®è¡ããã«é¢æ°ããæãåºããŸãã<code>return</code>æã«ãã£ãŠæå®ãããå€ãé¢æ°ã®åŒã³åºãå
ã«è¿ãããŸãã
|-
!sscanf
|é¢æ°
|æååã®æžåŒåãããããŒã¿ã解æããå€æ°ã«æ ŒçŽããããã«äœ¿çšãããé¢æ°ã§ããæå®ãããæžåŒã«åŸã£ãŠæååã解éããå€æãããããŒã¿ãæå®ãããå€æ°ã«æ ŒçŽããŸããäž»ã«ããã¹ãããŒã¿ã®è§£æããã©ãŒãããå€æã«äœ¿çšãããŸãã
|-
!static
|宣èš
|éçã¡ã³ãå€æ°ãéçã¡ãœããã宣èšããããã«äœ¿çšãããŸããéçã¡ã³ãã¯ã¯ã©ã¹èªäœã«é¢é£ä»ããããã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹åãªãã«ã¢ã¯ã»ã¹ã§ããŸãããŸããéçã¡ãœããã¯ã€ã³ã¹ã¿ã³ã¹ã«äŸåããã«åŒã³åºããŸããã¯ã©ã¹ã¬ãã«ã§å
±æãããããŒã¿ããã«ããŒã¡ãœãããå®çŸ©ããããã«äœ¿çšãããŸãã
|-
!string
|ããŒã¿å
|æååãè¡šãããŒã¿åã§ããæååã¯ããã¹ãããŒã¿ãæ±ãããã«äœ¿çšãããæåã®ã·ãŒã±ã³ã¹ãæ ŒçŽããŸããæååã¯äžåºŠäœæããããšå€æŽã§ãããæ°ããæååãäœæããå¿
èŠããããŸããPikeã§ã¯æååãæäœããããã®å€ãã®çµã¿èŸŒã¿é¢æ°ãã¡ãœãããæäŸãããŠãããæååã®çµåãæ€çŽ¢ã眮æãåå²ãªã©ã®æäœãè¡ããŸãã
|-
!switch
|å¶åŸ¡æ§æ
|æ¡ä»¶åŒã«åºã¥ããŠè€æ°ã®åå²ãåŠçããããã«äœ¿çšãããå¶åŸ¡æ§æã§ãã<code>switch</code>æã§ã¯ãäžããããåŒã®å€ãè©äŸ¡ããããã«å¿ããŠé©åãªåå²ãå®è¡ããŸããäžèŽããã±ãŒã¹ãèŠã€ãã£ãå Žåããã®ã±ãŒã¹ã®ã³ãŒããããã¯ãå®è¡ãããŸããäžèŽããã±ãŒã¹ãèŠã€ãããªãå Žåããªãã·ã§ã³ãšããŠæå®ããã<code>default</code>ãããã¯ãå®è¡ãããŸãã<code>switch</code>æã¯è€æ°ã®æ¡ä»¶ã«åºã¥ãåå²ãã·ã³ãã«ã«è¡šçŸããããã«äœ¿çšãããŸãã
|-
!typeof
|æŒç®å
|åŒã®ããŒã¿åãè¿ãæŒç®åã§ãã<code>typeof</code>æŒç®åã¯ãäžããããåŒã®ããŒã¿åãå€å®ãããã®ããŒã¿åãè¿ããŸããããŒã¿åã«ã¯æŽæ°ãæµ®åå°æ°ç¹æ°ãæååãé
åããªããžã§ã¯ããªã©ãå«ãŸããŸãã
|-
!void
|ããŒã¿å
|å€ã®ãªãããšãè¡šãç¹æ®ãªããŒã¿åã§ããé¢æ°ãå€ãè¿ããªãããšã瀺ãããã«äœ¿çšãããŸãã<code>void</code>åã®é¢æ°ã¯å¯äœçšãç¶æ
ã®å€æŽã®ã¿ãè¡ããæ瀺çãªæ»ãå€ãè¿ããªãå Žåã«äœ¿çšãããŸãã<code>void</code>åã®åŒæ°ã¯çç¥å¯èœã§ããããšã瀺ããŸããPikeã§ã¯ãé¢æ°ã®æ»ãå€ã®åãšããŠ<code>void</code>ãæå®ããããšãã§ããŸãã
|-
|while
|å¶åŸ¡æ§æ
|æ¡ä»¶åŒãçïŒtrueïŒã§ããéããç¹°ãè¿ãåŠçãå®è¡ããããã«äœ¿çšãããå¶åŸ¡æ§æã§ãã<code>while</code>æã¯ãäžããããæ¡ä»¶åŒãè©äŸ¡ãããçã§ãããã©ããã確èªãããŸããæ¡ä»¶åŒãçã®å Žåãã«ãŒãå
ã®ã³ãŒããããã¯ãå®è¡ãããŸããã«ãŒãã®å®è¡åŸãåã³æ¡ä»¶åŒãè©äŸ¡ãããçã§ããå Žåã¯ã«ãŒããç¶è¡ãããŸããæ¡ä»¶åŒãåœïŒfalseïŒã«ãªããšãã«ãŒãããæãåºããŸãã<code>while</code>æã¯ãç¹å®ã®æ¡ä»¶ãæºãããããŸã§ç¹°ãè¿ãåŠçãè¡ãããã«äœ¿çšãããŸãã
|}
泚æïŒè¡šäžã®è§£èª¬ã¯ç°¡æœãªãã®ã§ãããåããŒã¯ãŒãã®è©³çŽ°ãªäœ¿çšæ¹æ³ãæèã«ã€ããŠã¯Pikeã®å
¬åŒããã¥ã¡ã³ããåç
§ããŠãã ããã
;調æ»äž
:{| class="sortable wikitable"
!ããŒã¯ãŒã
!åé¡
!説æ
|-
!aggregate
|ããŒã¿å
|é
åã®èŠçŽ ãéçŽããããã®æ§é äœã宣èšããããŒã¯ãŒãã§ãã
|-
!class
|å®çŸ©
|ã¯ã©ã¹ãå®çŸ©ããããã®ããŒã¯ãŒãã§ããã¯ã©ã¹ã¯ãªããžã§ã¯ãæåããã°ã©ãã³ã°ã«ãããŠäœ¿çšãããŸãã
|-
!create
|æäœ
|ãªããžã§ã¯ããäœæããããã®ããŒã¯ãŒãã§ããã¯ã©ã¹å
ã®ã³ã³ã¹ãã©ã¯ã¿ã¡ãœãããšããŠäœ¿çšãããŸãã
|-
!deprecated
|泚é
|éæšå¥šã®èŠçŽ ã瀺ãããã®æ³šéããŒã¯ãŒãã§ããå€ãããŒãžã§ã³ã®Pikeããå»æ¢äºå®ãšãªã£ãèŠçŽ ã«å¯ŸããŠäœ¿çšãããŸãã
|-
!enum
|å®çŸ©
|åæåãå®çŸ©ããããã®ããŒã¯ãŒãã§ããåæåã¯åºå®ã®å€ã®éåãè¡šçŸããããã«äœ¿çšãããŸãã
|-
!extern
|å®çŸ©
|å€éšã¢ãžã¥ãŒã«ãšã®ã€ã³ã¿ãŒãã§ãŒã¹ãå®çŸ©ããããã®ããŒã¯ãŒãã§ããå€éšã¢ãžã¥ãŒã«ããã®é¢æ°ãå€æ°ã®åç
§ã宣èšããŸãã
|-
!gethrvtime
|æäœ
|ããŒããŠã§ã¢ã¯ããã¯ã®æéãååŸããããã®é¢æ°ã§ããé«å解èœã®æéèšæž¬ã«äœ¿çšãããŸãã
|-
!global
|宣èš
|ã°ããŒãã«å€æ°ã宣èšããããã®ããŒã¯ãŒãã§ããããã°ã©ã ã®ã©ã®äœçœ®ã§ãåç
§å¯èœãªå€æ°ãå®çŸ©ããŸãã
|-
!mixed
|ããŒã¿å
|è€æ°ã®ç°ãªãåãæã€å€æ°ã宣èšããããã®åããŒã¯ãŒãã§ããæ§ã
ãªåã®å€ãæ ŒçŽã§ããŸãã
|-
!name
|å®çŸ©
|åå空éãå®çŸ©ããããã®ããŒã¯ãŒãã§ããåå空éã¯å€æ°ãé¢æ°ã®ã¹ã³ãŒããå¶åŸ¡ããããã«äœ¿çšãããŸãã
|-
!optional
|宣èš
|ãªãã·ã§ã³ã®åŒæ°ãå®çŸ©ããããã®ããŒã¯ãŒãã§ããé¢æ°ã®åŒæ°ã®ãã¡ãçç¥å¯èœãªåŒæ°ãæå®ããŸãã
|-
!program
|ããŒã¿å
|ããã°ã©ã ã瀺ãããŒã¿åã
|-
!typedef
|å®çŸ©
|ããŒã¿åã«å¥åãä»ããããã®ããŒã¯ãŒãã§ããè€éãªåãç°¡æœã«è¡šçŸããããã«äœ¿çšãããŸãã
|-
!variant
|ããŒã¿å
|ç°ãªãåã®å€ãä¿æã§ããå€æ°ã宣èšããããã®åããŒã¯ãŒãã§ããå®è¡æã«åãå€åããå€æ°ãæ±ãããšãã§ããŸãã
|}
-->
=== ã³ãŒãã®ã£ã©ãªãŒ ===
{{å
é ã«æ»ã|title=éé²ã«æ»ã|label=éé²|style=border-top:1px solid gray;}}
:<syntaxhighlight lang=pike highlight=18>
</syntaxhighlight>
:<syntaxhighlight lang=text>
</syntaxhighlight>
==== ãšã©ãã¹ããã¹ã®ç¯© ====
{{å
é ã«æ»ã|title=ã³ãŒãã»ã®ã£ã©ãªãŒã«æ»ã|label=ã³ãŒãã®ã£ã©ãªãŒ|style=border-top:1px solid gray;}}
ãšã©ãã¹ããã¹ã®ç¯©ããè¥å¹² Pike ãããæžããŠã¿ãŸããã
;ãšã©ãã¹ããã¹ã®ç¯©:<syntaxhighlight lang=pike line>
// eratosthenesé¢æ°ã¯ãšã©ãã¹ããã¹ã®ç¯©ã䜿ã£ãŠnãŸã§ã®çŽ æ°ãèŠã€ããŸãã
array(int) eratosthenes(int n) {
// sieveé
åãåæåããå
šãŠã®æ°ãçŽ æ°ãšä»®å®ããŸãã
array sieve = allocate(n + 1, true);
sieve[0] = false; // 0ã¯çŽ æ°ã§ã¯ãªã
sieve[1] = false; // 1ã¯çŽ æ°ã§ã¯ãªã
// ãšã©ãã¹ããã¹ã®ç¯©ãå®è¡ããŸãã
foreach (sieve; int i; int prime) {
if (prime) {
// çŽ æ°iã®åæ°ã篩ãèœãšããŸãã
for (int j = i * i; j < sizeof(sieve); j += i) {
sieve[j] = false;
}
}
}
// çŽ æ°ãæœåºããŸãã
array(int) primes = ({});
foreach (sieve; int i; mixed prime) {
if (prime) {
primes += ({ i });
}
}
return primes;
}
int main() {
// eratosthenesé¢æ°ã䜿ã£ãŠ100ãŸã§ã®çŽ æ°ãæ±ããŸãã
array(int) primes = eratosthenes(100);
// çµæãåºåããŸãã
foreach (primes, int prime)
write(prime + " ");
write("\n");
}
</syntaxhighlight>
;å®è¡çµæ:<syntaxhighlight lang=text>
2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97
</syntaxhighlight>
==== æ倧å
¬çŽæ°ãšæå°å
¬åæ° ====
{{å
é ã«æ»ã|title=ã³ãŒãã»ã®ã£ã©ãªãŒã«æ»ã|label=ã³ãŒãã®ã£ã©ãªãŒ|style=border-top:1px solid gray;}}
æ倧å
¬çŽæ°ãšæå°å
¬åæ°ããè¥å¹² Pike ãããæžããŠã¿ãŸããã
:<syntaxhighlight lang=pike>
int gcd2(int m, int n) { return n == 0 ? m : gcd2(n, m % n); }
int gcd(int ... ints) {
return Array.reduce(lambda(int x, int y){ return gcd2(x, y); }, ints);
}
int lcm2(int m, int n) { return m * n / gcd2(m, n); }
int lcm(int ... ints) {
return Array.reduce(lambda(int x, int y){ return lcm2(x, y); }, ints);
}
int main() {
write("gcd2(30, 45) => %O\n", gcd2(30, 45));
write("gcd(30, 72, 12) => %O\n", gcd(30, 72, 12));
write("lcm2(30, 72) => %O\n", lcm2(30, 72));
write("lcm(30, 42, 72) => %O\n", lcm(30, 42, 72));
return 0;
}
</syntaxhighlight>
;å®è¡çµæ:<syntaxhighlight lang=text>
gcd2(30, 45) => 15
gcd(30, 72, 12) => 6
lcm2(30, 72) => 360
lcm(30, 42, 72) => 2520
</syntaxhighlight>
==== äºåæ³ ====
{{å
é ã«æ»ã|title=ã³ãŒãã»ã®ã£ã©ãªãŒã«æ»ã|label=ã³ãŒãã®ã£ã©ãªãŒ|style=border-top:1px solid gray;}}
{{Wikipedia|äºåæ³}}
äºåæ³ããè¥å¹² Pike ãããæžããŠã¿ãŸããã
;äºåæ³:<syntaxhighlight lang=pike line>
// bisectionã¯é¢æ°fã0ã«çãããªãå®æ°xãäºåæ³ã§æ€çŽ¢ããŸãã
// lowãšhighã¯é¢æ°fã®å€ã0ããå°ããç¯å²ã®äžéãšäžéã§ãã
// xã¯çŸåšã®äžç¹ã§ãã
// fxã¯é¢æ°fã®xã®å€ã§ãã
float bisection(float low, float high, function(float:float) f) {
float x = (low + high) / 2.0;
float fx = f(x);
if (abs(fx) < 1.0e-10)
return x;
if (fx < 0.0)
low = x;
else
high = x;
return bisection(low, high, f);
}
int main(){
write("%.16f\n", bisection(0.0, 3.0, lambda(float x) { return x - 1.0; }));
write("%.16f\n", bisection(0.0, 3.0, lambda(float x) { return x*x - 1.0; }));
}
</syntaxhighlight>
;å®è¡çµæ:<syntaxhighlight lang=text>
0.9999999999417923
1.0000000000291038
</syntaxhighlight>
: [[æ§èª²çš(-2012幎床)é«çåŠæ ¡æ°åŠB/æ°å€èšç®ãšã³ã³ãã¥ãŒã¿ãŒ#2åæ³]]ã®äŸã Pike ã«ç§»æ€ããŸããã
== ãªãœãŒã¹ ==
Pikeã«é¢ããæ
å ±ããªãœãŒã¹ãèŠã€ããããšã¯ãä»ã®äžè¬çãªããã°ã©ãã³ã°èšèªãšæ¯èŒããŠå°ãªããããããŸããããããã€ãã®æçšãªãªãœãŒã¹ããããŸãã
以äžã¯ãPikeã«é¢ããæ
å ±ãèŠã€ããããã®ããã€ãã®ãªãœãŒã¹ã§ãïŒ
;Pike å
¬åŒãŠã§ããµã€ã:
: http://pike.lysator.liu.se/
:Pikeèšèªã®å
¬åŒãŠã§ããµã€ãã«ã¯ãèšèªã®ããã¥ã¡ã³ãããã¥ãŒããªã¢ã«ããªãã¡ã¬ã³ã¹ãæäŸãããŠããŸãããŸããææ°ã®ãªãªãŒã¹ãã³ãã¥ããã£ã«é¢ããæ
å ±ãå
¥æã§ããŸãã
;Pikeããã¥ã¡ã³ã:
: http://pike.lysator.liu.se/docs/
:Pikeã®å
¬åŒãŠã§ããµã€ãã«ã¯ãèšèªã®ããã¥ã¡ã³ããæäŸãããŠãããèšèªã®æ©èœãæ§æã«é¢ãã詳现ãªæ
å ±ãåŸãããšãã§ããŸãã
;PikeãœãŒã¹ã³ãŒãã®ãªããžããª:
: https://github.com/pikelang/Pike
:Pikeã®ãœãŒã¹ã³ãŒãã¯ãªãŒãã³ãœãŒã¹ã§ãGitHubã®ãªããžããªã§å©çšå¯èœã§ãããœãŒã¹ã³ãŒãã調æ»ããããšã§ãèšèªã®å®è£
ãææ°ã®éçºã«ã€ããŠåŠã¶ããšãã§ããŸãã
=== ã³ãŒãã®ã£ã©ãªãŒ ===
[[Category:Pike|*]]
[[Category:ããã°ã©ãã³ã°èšèª]]
{{NDC|007.64}} | 2023-05-03T07:35:33Z | 2024-01-31T04:18:47Z | [
"ãã³ãã¬ãŒã:Wikipedia",
"ãã³ãã¬ãŒã:å
é ã«æ»ã",
"ãã³ãã¬ãŒã:See also",
"ãã³ãã¬ãŒã:---",
"ãã³ãã¬ãŒã:NDC"
] | https://ja.wikibooks.org/wiki/Pike |
37,815 | äžåŠæ ¡å®¶åº/ãã©ã³ã¹è¯ãèšç»çãªééã®ç®¡ç | æ¬ç¯ã¯ãéé管çãããªããã°ãªããªãçç±ãšéé管çãã©ããã£ãŠè¡ãã®ãã«ã€ããŠè©³ããèŠãŠãããŸãããã
æ®éãçããŠããããã«ã¯ãåå
¥(æåŸ)ãäœããªããã°ãªããŸããããªããªããããããéããªãå Žåãç©ã
亀æ以å€æãç«ããªãããã§ãããããŠããã®åå
¥ãæ§ã
ãªç®çã«ãéãæ¯æããŸãããããæ¯åºãšèšããæ¯åºã®äžã§ãç¹ã«ç掻ã«å¿
èŠãªååããµãŒãã¹ã®ããã«äœ¿ããéãæ¶è²»æ¯åºãšãããŸãã
ç§éã¯ãŸã äžåŠçãªã®ã§ããéã皌ãç®çã§ãäŒç€Ÿ(ã¢ã«ãã€ãã»ããŒãã»å°±è·)ã«å
¥ããŠãããŸããããéã皌ãã«ã¯ãçžåœã®åªåãå¿
èŠãªã®ã§ãæ®éã®äžåŠçã«åºæ¥ãŸããããã®ããã家æã皌ãã ãéã ãã§ç§éã®ç掻ãæãç«ã£ãŠããŸãã家æã®äžã§ãèšç»çãªéé管çãè¡ããåå
¥ãšæ¯åºã®ãã©ã³ã¹ããšããæ¶è²»ç掻ãéããããã«å¿æããŸããããããŸããéãæã£ãŠãããããéã䜿ããããããªå Žåã¯ãæ¬åœã«å¿
èŠãã©ãããèããå¿
èŠãªåç©ã«åªå
é äœãã€ããŠã賌å
¥ããããã«ããŸãããã
ã¬ã·ãŒãã«ã¯ãåºåãäŒç€Ÿåã»æ¥ä»ã»ååããµãŒãã¹ã®æ
å ±ã»éé¡ã®4é
ç®ãå°åãããŠããŸããé åæžãšã¬ã·ãŒãã«åœ¢åŒäžã®éãã¯ãããŸããããã®ãããå°å£²åºã§è²·ã£ãŠã飲é£åºã§é£äºãããŠãã¬ã·ãŒããé åæžã®ã©ã¡ããããå°åãããŸããã
2022幎4æããæ幎幎霢ã18æ³ã«åŒãäžããããŸãããããã«ããã18æ³ããä¿è·è
ã®åæãªãã§ã¯ã¬ãžããã«ãŒããå©çšã§ããããã«ãªããŸãããã¯ã¬ãžããã«ãŒãã䜿ãã°ãéè¡ã®ååŒæ®é«ãç¡ããŠãè²·ãç©ãã§ããããã«ãªããŸãããŸããæ¯æããç°¡ç¥åãããã®ã䟿å©ã§ããããããååŒææãšåå賌å
¥ææãéãã®ã§ãééã®æµããæ¶è²»è
ã®ç®ã«èŠãã¥ãããªããŸããç¹ã«ã¯ã¬ãžããã«ãŒãã®æ¯æãã¯ãæ¶è²»è
ã»è²©å£²è
ã»ã¯ã¬ãžããã«ãŒãçºè¡äŒç€Ÿã®äžè
éå¥çŽãšãªãã®ã§ã泚æããŠãã ãããåæ¯ã®ãã©ã³ã¹ããšããããèªåã¯äœã賌å
¥ããã®ãã賌å
¥ä»£éã®æ¯æãææã確ãããªããã°ãªããŸããã
(â» ç¯å²å€:ããŸã) é«æ ¡3幎çã§ã18æ³ã«ãªãã°ãæ³çã«ã¯æªæ幎ãšããŠã®ä¿è·ã®å¯Ÿè±¡ã§ã¯ããªããªããŸãã
ã¬ã·ãŒããªã©æ现ãæŽçããŠä¿åããããèšé²ãæ®ããããããªã©ãæ§ã
ãªæ¹æ³ã§æ¯åºã確ãããããŸããè¿å¹Žã§ã¯ãéé管çã®æ¹æ³ã身ã«ã€ããå¿
èŠæ§ãé«ãŸã£ãŠããŸãããã®çç±ã¯ãã¯ã¬ãžããã«ãŒããããªãã€ãåé»åãããŒã§ã®è³Œå
¥ãªã©ãé ãããéã®åãã確ãããããã§ããèªåã«åã£ãéé管çã®æ¹æ³ãèããŠãããã«ã€ããŠãããããã«ããŸãããã
â»äžã®çµ±èšã«ã€ããŠã¯ãç·åççµ±èšå±ã2019幎å
šåœå®¶èšæ§é èª¿æ» å®¶èšåæ¯ã«é¢ããçµæãããæç²ããŠããŸãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "æ¬ç¯ã¯ãéé管çãããªããã°ãªããªãçç±ãšéé管çãã©ããã£ãŠè¡ãã®ãã«ã€ããŠè©³ããèŠãŠãããŸãããã",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "æ®éãçããŠããããã«ã¯ãåå
¥(æåŸ)ãäœããªããã°ãªããŸããããªããªããããããéããªãå Žåãç©ã
亀æ以å€æãç«ããªãããã§ãããããŠããã®åå
¥ãæ§ã
ãªç®çã«ãéãæ¯æããŸãããããæ¯åºãšèšããæ¯åºã®äžã§ãç¹ã«ç掻ã«å¿
èŠãªååããµãŒãã¹ã®ããã«äœ¿ããéãæ¶è²»æ¯åºãšãããŸãã",
"title": "åå
¥ãšæ¯åº"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "ç§éã¯ãŸã äžåŠçãªã®ã§ããéã皌ãç®çã§ãäŒç€Ÿ(ã¢ã«ãã€ãã»ããŒãã»å°±è·)ã«å
¥ããŠãããŸããããéã皌ãã«ã¯ãçžåœã®åªåãå¿
èŠãªã®ã§ãæ®éã®äžåŠçã«åºæ¥ãŸããããã®ããã家æã皌ãã ãéã ãã§ç§éã®ç掻ãæãç«ã£ãŠããŸãã家æã®äžã§ãèšç»çãªéé管çãè¡ããåå
¥ãšæ¯åºã®ãã©ã³ã¹ããšããæ¶è²»ç掻ãéããããã«å¿æããŸããããããŸããéãæã£ãŠãããããéã䜿ããããããªå Žåã¯ãæ¬åœã«å¿
èŠãã©ãããèããå¿
èŠãªåç©ã«åªå
é äœãã€ããŠã賌å
¥ããããã«ããŸãããã",
"title": "åå
¥ãšæ¯åº"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "ã¬ã·ãŒãã«ã¯ãåºåãäŒç€Ÿåã»æ¥ä»ã»ååããµãŒãã¹ã®æ
å ±ã»éé¡ã®4é
ç®ãå°åãããŠããŸããé åæžãšã¬ã·ãŒãã«åœ¢åŒäžã®éãã¯ãããŸããããã®ãããå°å£²åºã§è²·ã£ãŠã飲é£åºã§é£äºãããŠãã¬ã·ãŒããé åæžã®ã©ã¡ããããå°åãããŸããã",
"title": "åå
¥ãšæ¯åº"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "2022幎4æããæ幎幎霢ã18æ³ã«åŒãäžããããŸãããããã«ããã18æ³ããä¿è·è
ã®åæãªãã§ã¯ã¬ãžããã«ãŒããå©çšã§ããããã«ãªããŸãããã¯ã¬ãžããã«ãŒãã䜿ãã°ãéè¡ã®ååŒæ®é«ãç¡ããŠãè²·ãç©ãã§ããããã«ãªããŸãããŸããæ¯æããç°¡ç¥åãããã®ã䟿å©ã§ããããããååŒææãšåå賌å
¥ææãéãã®ã§ãééã®æµããæ¶è²»è
ã®ç®ã«èŠãã¥ãããªããŸããç¹ã«ã¯ã¬ãžããã«ãŒãã®æ¯æãã¯ãæ¶è²»è
ã»è²©å£²è
ã»ã¯ã¬ãžããã«ãŒãçºè¡äŒç€Ÿã®äžè
éå¥çŽãšãªãã®ã§ã泚æããŠãã ãããåæ¯ã®ãã©ã³ã¹ããšããããèªåã¯äœã賌å
¥ããã®ãã賌å
¥ä»£éã®æ¯æãææã確ãããªããã°ãªããŸããã",
"title": "ã¯ã¬ãžããã«ãŒããšäžè
éå¥çŽ"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "(â» ç¯å²å€:ããŸã) é«æ ¡3幎çã§ã18æ³ã«ãªãã°ãæ³çã«ã¯æªæ幎ãšããŠã®ä¿è·ã®å¯Ÿè±¡ã§ã¯ããªããªããŸãã",
"title": "ã¯ã¬ãžããã«ãŒããšäžè
éå¥çŽ"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "ã¬ã·ãŒããªã©æ现ãæŽçããŠä¿åããããèšé²ãæ®ããããããªã©ãæ§ã
ãªæ¹æ³ã§æ¯åºã確ãããããŸããè¿å¹Žã§ã¯ãéé管çã®æ¹æ³ã身ã«ã€ããå¿
èŠæ§ãé«ãŸã£ãŠããŸãããã®çç±ã¯ãã¯ã¬ãžããã«ãŒããããªãã€ãåé»åãããŒã§ã®è³Œå
¥ãªã©ãé ãããéã®åãã確ãããããã§ããèªåã«åã£ãéé管çã®æ¹æ³ãèããŠãããã«ã€ããŠãããããã«ããŸãããã",
"title": "éé管çã®æ¹æ³"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "â»äžã®çµ±èšã«ã€ããŠã¯ãç·åççµ±èšå±ã2019幎å
šåœå®¶èšæ§é èª¿æ» å®¶èšåæ¯ã«é¢ããçµæãããæç²ããŠããŸãã",
"title": "éé管çã®æ¹æ³"
}
] | æ¬ç¯ã¯ãéé管çãããªããã°ãªããªãçç±ãšéé管çãã©ããã£ãŠè¡ãã®ãã«ã€ããŠè©³ããèŠãŠãããŸãããã | [[å°åŠæ ¡ã»äžåŠæ ¡ã»é«çåŠæ ¡ã®åŠç¿]]>[[äžåŠæ ¡ã®åŠç¿]]>[[äžåŠæ ¡å®¶åº]]>ãã©ã³ã¹è¯ãèšç»çãªééã®ç®¡ç
æ¬ç¯ã¯ãéé管çãããªããã°ãªããªãçç±ãšéé管çãã©ããã£ãŠè¡ãã®ãã«ã€ããŠè©³ããèŠãŠãããŸãããã
== åå
¥ãšæ¯åº ==
æ®éãçããŠããããã«ã¯ã'''åå
¥'''ïŒæåŸïŒãäœããªããã°ãªããŸããããªããªããããããéããªãå Žåãç©ã
亀æ以å€æãç«ããªãããã§ãããããŠããã®åå
¥ãæ§ã
ãªç®çã«ãéãæ¯æããŸããããã'''æ¯åº'''ãšèšããæ¯åºã®äžã§ãç¹ã«ç掻ã«å¿
èŠãªååããµãŒãã¹ã®ããã«äœ¿ããéãæ¶è²»æ¯åºãšãããŸãã
ç§éã¯ãŸã äžåŠçãªã®ã§ããéã皌ãç®çã§ãäŒç€ŸïŒã¢ã«ãã€ãã»ããŒãã»å°±è·ïŒã«å
¥ããŠãããŸããããéã皌ãã«ã¯ãçžåœã®åªåãå¿
èŠãªã®ã§ãæ®éã®äžåŠçã«åºæ¥ãŸããããã®ããã家æã皌ãã ãéã ãã§ç§éã®ç掻ãæãç«ã£ãŠããŸãã家æã®äžã§ãèšç»çãª'''éé管ç'''ãè¡ããåå
¥ãšæ¯åºã®ãã©ã³ã¹ããšããæ¶è²»ç掻ãéããããã«å¿æããŸããããããŸããéãæã£ãŠãããããéã䜿ããããããªå Žåã¯ãæ¬åœã«å¿
èŠãã©ãããèããå¿
èŠãªåç©ã«åªå
é äœãã€ããŠã賌å
¥ããããã«ããŸãããã
ã¬ã·ãŒãã«ã¯ãåºåãäŒç€Ÿåã»æ¥ä»ã»ååããµãŒãã¹ã®æ
å ±ã»éé¡ã®ïŒé
ç®ãå°åãããŠããŸããé åæžãšã¬ã·ãŒãã«åœ¢åŒäžã®éãã¯ãããŸããããã®ãããå°å£²åºã§è²·ã£ãŠã飲é£åºã§é£äºãããŠãã¬ã·ãŒããé åæžã®ã©ã¡ããããå°åãããŸããã
== ã¯ã¬ãžããã«ãŒããšäžè
éå¥çŽ ==
2022幎ïŒæããæ幎幎霢ã18æ³ã«åŒãäžããããŸãããããã«ããã18æ³ããä¿è·è
ã®åæãªãã§ã¯ã¬ãžããã«ãŒããå©çšã§ããããã«ãªããŸãã<ref>[https://www.tokyo-shoseki.co.jp/img/text/information-j/shakai-koumin/r4-5_j_koumin.pdf æ±äº¬æžç±]</ref>ãã¯ã¬ãžããã«ãŒãã䜿ãã°ãéè¡ã®ååŒæ®é«ãç¡ããŠãè²·ãç©ãã§ããããã«ãªããŸãããŸããæ¯æããç°¡ç¥åãããã®ã䟿å©ã§ã<ref>[https://www.tokyo-shoseki.co.jp/img/text/information-j/katei/r4-5_j_katei.pdf æ±äº¬æžç±]</ref>ãããããååŒææãšåå賌å
¥ææãéãã®ã§ãééã®æµããæ¶è²»è
ã®ç®ã«èŠãã¥ãããªããŸããç¹ã«ã¯ã¬ãžããã«ãŒãã®æ¯æãã¯ãæ¶è²»è
ã»è²©å£²è
ã»ã¯ã¬ãžããã«ãŒãçºè¡äŒç€Ÿã®'''äžè
éå¥çŽ'''ãšãªãã®ã§ã泚æããŠãã ãããåæ¯ã®ãã©ã³ã¹ããšããããèªåã¯äœã賌å
¥ããã®ãã賌å
¥ä»£éã®æ¯æãææã確ãããªããã°ãªããŸããã
(â» ç¯å²å€ïŒããŸãïŒãé«æ ¡3幎çã§ã18æ³ã«ãªãã°ãæ³çã«ã¯æªæ幎ãšããŠã®ä¿è·ã®å¯Ÿè±¡ã§ã¯ããªããªããŸã<ref>[https://www.jikkyo.co.jp/correction/pdf_r04/chireki/chirekiR4_704_04.pdf å®æåºç]</ref>ã
== éé管çã®æ¹æ³ ==
ã¬ã·ãŒããªã©æ现ãæŽçããŠä¿åããããèšé²ãæ®ããããããªã©ãæ§ã
ãªæ¹æ³ã§æ¯åºã確ãããããŸããè¿å¹Žã§ã¯ãéé管çã®æ¹æ³ã身ã«ã€ããå¿
èŠæ§ãé«ãŸã£ãŠããŸãããã®çç±ã¯ãã¯ã¬ãžããã«ãŒããããªãã€ãåé»åãããŒã§ã®è³Œå
¥ãªã©ãé ãããéã®åãã確ãããããã§ããèªåã«åã£ãéé管çã®æ¹æ³ãèããŠãããã«ã€ããŠãããããã«ããŸãããã
{| class="wikitable"
!ã¬ã·ãŒãã®ä¿ç®¡ã»ç®¡ç
|ç¹åŸŽ
* ç°¡åã«åºæ¥ãŸãã
* åå
¥ãåãããŸããã
|-
!å°é£ãåž³
|ç¹åŸŽ
* å°ãªãéé¡ãªãåæ¯ã®ç®¡çãè¡ãããããªããŸãã
* èšç®ãå¿
èŠã§ãã
|-
!ã³ã³ãã¥ãŒã¿ç®¡ç
|ç¹åŸŽ
* ããŒã¿ãå
¥åããã°ãèªåçã«åèšéé¡ãèšç®ããããã°ã©ãåãåºæ¥ãŸãã
* ã³ã³ãã¥ãŒã¿ãå¿
èŠã§ãã
|}
=== æ¶è²»æ¯åºã®å²å ===
[[ãã¡ã€ã«:æ¶è²»æ¯åºã®å²å.png|ãªã|ãµã ãã€ã«|671x671ãã¯ã»ã«|é£æã®æ§æå²åãéåžžã«é«ããªã£ãŠããŸãã]]
â»äžã®çµ±èšã«ã€ããŠã¯ãç·åççµ±èšå±ã[https://www.stat.go.jp/data/zenkokukakei/2019/pdf/gaiyou0305.pdf 2019幎å
šåœå®¶èšæ§é 調æ»ã家èšåæ¯ã«é¢ããçµæ]ãããæç²ããŠããŸãã
== è泚 ==
[[ã«ããŽãª:äžåŠæ ¡å®¶åºç§]]
[[ã«ããŽãª:çµæžç掻]]
<references /> | 2023-05-06T12:41:11Z | 2023-09-23T15:56:30Z | [] | https://ja.wikibooks.org/wiki/%E4%B8%AD%E5%AD%A6%E6%A0%A1%E5%AE%B6%E5%BA%AD/%E3%83%90%E3%83%A9%E3%83%B3%E3%82%B9%E8%89%AF%E3%81%8F%E8%A8%88%E7%94%BB%E7%9A%84%E3%81%AA%E9%87%91%E9%8A%AD%E3%81%AE%E7%AE%A1%E7%90%86 |
37,830 | ã¢ã€ãèª | ã¡ã€ã³ããŒãž > èªåŠ > ã¢ã€ãèª
ã¢ã€ãèªã¯ãåæµ·éãäžå¿ã«æšºå€ªãå島å島ãæ±åå°æ¹åéšãªã©ã§è©±ãããŠããèšèªã§ããæ¥æ¬èªãšåãããä»ã®èšèªãšã®ç³»çµ±é¢ä¿ã®åãã£ãŠããªããå€ç«ããèšèªãã«åé¡ãããŸããæ¥æ¬èªã«ãšã£ãŠã¯å¯äžã®éžç¶ãã®èšèªã§ãå€ãããäºãã«èšèãåçšãåããªã©ã®å€§ããªé¢ããããããŸãããæ¥åžžã®èªåœãç¹ã«å瀌çšèªã«ã¯ãæ¥æ¬èªãšã¢ã€ãèªãšã§å
±éãããã®ã䌌ãŠãããã®ãæ°å€ããããŸããèªæ³ã®é¢ã§ããããããã£ãŠã¿ãããªã©ã®è¡šçŸã¯æ¥æ¬èªãšå
šãåããããªèšãæ¹ã§ãé£ãåã£ãŠè©±ãããŠããè¿ããæããŸãã
ã¢ã€ãèªã®åºæ¬çãªèªé ã¯æ¥æ¬èªãšåãäž»èª-ç®çèª-è¿°èªã§ããæ¯é³ã¯äºçš®é¡ã§ãåé³ãæ¥æ¬èªãšåããã®ãå€ããäžè¿°ã®ããã«åãçºæ³ã®è¡šçŸããããããæ¥æ¬èªè©±è
ã«ãšã£ãŠã¯æ¯èŒçç¿åŸããããèšèªãšãããŸãã
ãã®äžæ¹ãéåžžã«åŒ·åãªé èªåãæã¡ãå€ãã®èŠçŽ ãç¹ããŠäžã€ã®é·ãåèªã§æã®ãããªåœ¹å²ãè¡šãããšãã§ããŸãã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "ã¡ã€ã³ããŒãž > èªåŠ > ã¢ã€ãèª",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ã¢ã€ãèªã¯ãåæµ·éãäžå¿ã«æšºå€ªãå島å島ãæ±åå°æ¹åéšãªã©ã§è©±ãããŠããèšèªã§ããæ¥æ¬èªãšåãããä»ã®èšèªãšã®ç³»çµ±é¢ä¿ã®åãã£ãŠããªããå€ç«ããèšèªãã«åé¡ãããŸããæ¥æ¬èªã«ãšã£ãŠã¯å¯äžã®éžç¶ãã®èšèªã§ãå€ãããäºãã«èšèãåçšãåããªã©ã®å€§ããªé¢ããããããŸãããæ¥åžžã®èªåœãç¹ã«å瀌çšèªã«ã¯ãæ¥æ¬èªãšã¢ã€ãèªãšã§å
±éãããã®ã䌌ãŠãããã®ãæ°å€ããããŸããèªæ³ã®é¢ã§ããããããã£ãŠã¿ãããªã©ã®è¡šçŸã¯æ¥æ¬èªãšå
šãåããããªèšãæ¹ã§ãé£ãåã£ãŠè©±ãããŠããè¿ããæããŸãã",
"title": ""
},
{
"paragraph_id": 2,
"tag": "p",
"text": "ã¢ã€ãèªã®åºæ¬çãªèªé ã¯æ¥æ¬èªãšåãäž»èª-ç®çèª-è¿°èªã§ããæ¯é³ã¯äºçš®é¡ã§ãåé³ãæ¥æ¬èªãšåããã®ãå€ããäžè¿°ã®ããã«åãçºæ³ã®è¡šçŸããããããæ¥æ¬èªè©±è
ã«ãšã£ãŠã¯æ¯èŒçç¿åŸããããèšèªãšãããŸãã",
"title": ""
},
{
"paragraph_id": 3,
"tag": "p",
"text": "ãã®äžæ¹ãéåžžã«åŒ·åãªé èªåãæã¡ãå€ãã®èŠçŽ ãç¹ããŠäžã€ã®é·ãåèªã§æã®ãããªåœ¹å²ãè¡šãããšãã§ããŸãã",
"title": ""
}
] | ã¡ã€ã³ããŒãž > èªåŠ > ã¢ã€ãèª ã¢ã€ãèªã¯ãåæµ·éãäžå¿ã«æšºå€ªãå島å島ãæ±åå°æ¹åéšãªã©ã§è©±ãããŠããèšèªã§ããæ¥æ¬èªãšåãããä»ã®èšèªãšã®ç³»çµ±é¢ä¿ã®åãã£ãŠããªããå€ç«ããèšèªãã«åé¡ãããŸããæ¥æ¬èªã«ãšã£ãŠã¯å¯äžã®éžç¶ãã®èšèªã§ãå€ãããäºãã«èšèãåçšãåããªã©ã®å€§ããªé¢ããããããŸãããæ¥åžžã®èªåœãç¹ã«å瀌çšèªã«ã¯ãæ¥æ¬èªãšã¢ã€ãèªãšã§å
±éãããã®ã䌌ãŠãããã®ãæ°å€ããããŸããèªæ³ã®é¢ã§ããããããã£ãŠã¿ãããªã©ã®è¡šçŸã¯æ¥æ¬èªãšå
šãåããããªèšãæ¹ã§ãé£ãåã£ãŠè©±ãããŠããè¿ããæããŸãã ã¢ã€ãèªã®åºæ¬çãªèªé ã¯æ¥æ¬èªãšåãäž»èª-ç®çèª-è¿°èªã§ããæ¯é³ã¯äºçš®é¡ã§ãåé³ãæ¥æ¬èªãšåããã®ãå€ããäžè¿°ã®ããã«åãçºæ³ã®è¡šçŸããããããæ¥æ¬èªè©±è
ã«ãšã£ãŠã¯æ¯èŒçç¿åŸããããèšèªãšãããŸãã ãã®äžæ¹ãéåžžã«åŒ·åãªé èªåãæã¡ãå€ãã®èŠçŽ ãç¹ããŠäžã€ã®é·ãåèªã§æã®ãããªåœ¹å²ãè¡šãããšãã§ããŸãã | [[ã¡ã€ã³ããŒãž]] > [[èªåŠ]] > '''ã¢ã€ãèª'''
{{Wikipedia|ã¢ã€ãèª}}
{{Wiktionary|ã«ããŽãª:ã¢ã€ãèª}}
'''ã¢ã€ãèª'''ã¯ãåæµ·éãäžå¿ã«æšºå€ªãå島å島ãæ±åå°æ¹åéšãªã©ã§è©±ãããŠããèšèªã§ããæ¥æ¬èªãšåãããä»ã®èšèªãšã®ç³»çµ±é¢ä¿ã®åãã£ãŠããªããå€ç«ããèšèªãã«åé¡ãããŸããæ¥æ¬èªã«ãšã£ãŠã¯å¯äžã®éžç¶ãã®èšèªã§ãå€ãããäºãã«èšèãåçšãåããªã©ã®å€§ããªé¢ããããããŸãããæ¥åžžã®èªåœãç¹ã«å瀌çšèªã«ã¯ãæ¥æ¬èªãšã¢ã€ãèªãšã§å
±éãããã®ã䌌ãŠãããã®ãæ°å€ããããŸããèªæ³ã®é¢ã§ããããããã£ãŠã¿ãããªã©ã®è¡šçŸã¯æ¥æ¬èªãšå
šãåããããªèšãæ¹ã§ãé£ãåã£ãŠè©±ãããŠããè¿ããæããŸãã
ã¢ã€ãèªã®åºæ¬çãªèªé ã¯æ¥æ¬èªãšåãäž»èª-ç®çèª-è¿°èªã§ããæ¯é³ã¯äºçš®é¡ã§ãåé³ãæ¥æ¬èªãšåããã®ãå€ããäžè¿°ã®ããã«åãçºæ³ã®è¡šçŸããããããæ¥æ¬èªè©±è
ã«ãšã£ãŠã¯æ¯èŒçç¿åŸããããèšèªãšãããŸãã
ãã®äžæ¹ãéåžžã«åŒ·åãªé èªåãæã¡ãå€ãã®èŠçŽ ãç¹ããŠäžã€ã®é·ãåèªã§æã®ãããªåœ¹å²ãè¡šãããšãã§ããŸãã
==[[ã¢ã€ãèª å
¥éç·š|å
¥éç·š]]==
*[[ã¢ã€ãèªã®äžçãžãããã]]
*[[ã¢ã€ãèª æåãšçºé³|æåãšçºé³]]
*[[ã¢ã€ãèª ã¢ã¯ã»ã³ã|ã¢ã¯ã»ã³ã]]
*[[ã¢ã€ãèª é³ã®å€å|é³ã®å€å]]
*[[ã¢ã€ãèª è¡šèšã®æºãã«ã€ããŠ|è¡šèšã®æºãã«ã€ããŠ]]
*[[ã¢ã€ãèª æ¹èšã«ã€ããŠ|ã¢ã€ãèªã®æ¹èšã«ã€ããŠ]]
==話ããèã==
=== äŒè©±ç·Žç¿ ===
#[[ã¢ã€ãèªå®åæç·Žç¿ ã¿ã³ã ãžãã³ã¿ ã¢ã³?|ããã¯äœïŒ]]
#[[ã¢ã€ãèª èªå·±çŽ¹ä»|èªå·±çŽ¹ä»]]
=== äŸæéïŒæ
£çšå¥ããã䜿ãæïŒ ===
* æšæ¶
*
== [[ã¢ã€ãèª ææ³|ææ³]] ==
*ãïœã¯ïœã ãã®åœ¢ã®æ
*åŠå®
*åè©ã®çš®é¡
*人称æ¥èŸ
*äœçœ®åè©
==[[ã¢ã€ãèª ããŒãå¥éèŠèªåœ|ããŒãå¥ éèŠèªåœ]]ïŒçµµä»ãïŒ==
*[[ã¢ã€ãèª æ°ã®æ°ãæ¹|æ°ã®æ°ãæ¹]]
*[[ã¢ã€ãèª æŠ|æŠ]]
*åæ€ç©
== åŠç¿ã«åœ¹ç«ã€æ¬ã»ãŠã§ããµã€ã<!-- èŸæžæ¬ãé€ããŠã¯ãæ
å ±ã溢ããªãããã«ããå
¥éè
ã«ã䜿ããããä¿¡é Œã®çœ®ãããã®ãéç¹çã«èŒããŠãã ããã -->==
=== ç·å ===
* [https://www.ff-ainu.or.jp/web/potal_site/index.html ã¢ã€ãæ°ææå財å£ãã¢ã€ãèªããŒã¿ã«ãµã€ã]
* [https://www.bunka.go.jp/seisaku/kokugo_nihongo/kokugo_shisaku/kikigengo/ainu/index.html æååºãã¢ã€ãèªã«é¢ãããªã³ã¯é]
=== é³å£°ãèã ===
* [https://ainugo.nam.go.jp/search/media?typeCont=on&typeAudio=on&typeVideo=on åœç«ã¢ã€ãæ°æåç©é€šã¢ã€ãèªã¢ãŒã«ã€ããè³ææ€çŽ¢]
* [https://ainugo.hm.pref.hokkaido.lg.jp/generalSearchResult.aspx ã»ã£ããã©ããã¢ã€ãèªã¢ãŒã«ã€ãïœåæµ·éåç©é€š]
* [https://www.youtube.com/@user-jr8bk2iy1n YouTube å
¬ç財å£æ³äººã¢ã€ãæ°ææå財å£ã®ãã£ã³ãã«]
=== ç¬ç¿æž ===
* ããã¥ãŒãšã¯ã¹ãã¬ã¹ãã©ã¹ãã¢ã€ãèªãïŒISBN 978-4-560-08868-5ïŒäžå·è£ïŒ2021ïŒ
::ãäŒè©±ããææ³ãäžåã§åŠã¹ãå
¥éæžã«ããšããèšèã®éããåããŠã¢ã€ãèªãåŠã¶äººã«ã¯ããããã®äžåãCDãã¢ããªã§é³å£°ãèãäºãã§ããã
=== ææ³ãåŠã¶ ===
* ãèšèªåŠå€§èŸå
žã第äžå·»ïŒISBN 978-4-385-15213-4ïŒäºäºå ä»ç·šãæåãã¢ã€ãèªãç°æããåïŒ1997ïŒ
:: ååçã®ãèšèªåŠå€§èŸå
žã»ã¬ã¯ã·ã§ã³ æ¥æ¬å島ã®èšèªãïŒISBN 4-385-15207-1ïŒã«ãåãå
容ãæžãããŠããã
=== èŸæž ===
*ãã¢ã€ãèªåæ³æ¹èšèŸå
žãäžå·è£ïŒ1995ïŒ
*ãã¢ã€ãèªæ²æµæ¹èšèŸå
žãç°æããåïŒ1996ïŒ
*ãè±éèã®ã¢ã€ãèªèŸå
žãè±éèïŒ1996ïŒ
*[https://ainugo.nam.go.jp/ åœç«ã¢ã€ãæ°æåç©é€šã¢ã€ãèªã¢ãŒã«ã€ã]
*[http://tommy1949.world.coocan.jp/aynudictionary.htm ã¢ã€ãèªé»åèŸæž]
::èŸæžä»¥å€ã®è³æãããæ€çŽ¢ã§ãããèŸæžã¯ãç°æããåãã¢ã€ãèªæ²æµæ¹èšèŸå
žãïŒ1996ïŒãè±éèèãè±éèã®ã¢ã€ãèªèŸå
žãïŒ1996ïŒãç¥éçå¿ä¿ãåé¡ã¢ã€ãèªèŸå
žãæ€ç©ç·šã»åç©ç·šãïŒ1953ïŒã®3åãåºã«ããŠããã
=== ç©èª ===
*ãã¢ã€ãç¥è¬¡éãç¥é幞æ
=== ãã®ä»ïŒã¢ã€ãèªã«çãŸããªããæ§ã
ãªæåãåºæ¥äºã«ã€ããŠïŒ ===
*
[[ã«ããŽãª:èªåŠ]]
[[ã«ããŽãª:ã¢ã€ãèª|*]] | 2023-05-10T15:15:36Z | 2024-03-23T17:16:38Z | [
"ãã³ãã¬ãŒã:Wikipedia",
"ãã³ãã¬ãŒã:Wiktionary"
] | https://ja.wikibooks.org/wiki/%E3%82%A2%E3%82%A4%E3%83%8C%E8%AA%9E |
37,831 | ã¢ã€ãèª æ°ã®æ°ãæ¹ | ã¢ã€ãèª > ããŒãå¥éèŠèªåœ > æ°ã®æ°ãæ¹
ã¢ã€ãèªã®æ°è©ã¯ãå
šäœãšããŠã¯äºåé²æ³ã§ãããäžã«åé²æ³ãå«ãŸããŠããŸãããŸããå®å
šã«åé²æ³ã®å°åãã100ãŸã§ã¯äºåé²æ³ã§ãçŸã®äœããã¯åé²æ³ã«ãªãå°åããããŸããæ¥æ¬èªãªã©ã®åšèŸºã®èšèªãšç°ãªããç¬èªã®æ°äœç³»ãæã£ãŠããŸãã
å°åãå Žåã«ãã£ãŠã¯ãããã«ç€ºãããã®ãšã¯ç°ãªãèšãæ¹ãããå ŽåããããŸããå°ååã瀺ãããã®ã§ãã瀺ããå°åãã¹ãŠã«ã¯åœãŠã¯ãŸããªãããšããããŸãããŸããä»ã®ãšãããåå°ã®æ¹èšã網çŸ
ã§ããŠããªãä»ã誀ããå€ãã¯èšæ£ã§ããŠããŸãã(ç¹ã«90以é)ã
åºæ¬ã«ãªãæ°ã§ãããã£ããèŠããŸãããã
äœããæ°ãããšãã«ã¯ããã®æ°è©ã®ããšã«æ°ããç©ã®ååã眮ããŸããããšãã°ãäºå¹ã®ç«(ãã£ã/ãµãã cápe ÑаÌпÑ)ã¯ãã ãµãããäžäººã®äºº(ã¢ã£ã ajnu айМÑ)ã¯ã¬ ã¢ã£ããšèšããŸããäœãæ°ãããšããããã¯å€ãããŸããã
å ã¿ã«ãæ¥æ¬èªã§ã®ç¥èæ°ã¯4[ã]ãš8[ã]ã§ãããã¢ã€ãèªã«ãããç¥èæ°ã¯ã€ã¯ã³ iwan ОÑаМ(6)ã§ãããã°ãã°æ¥æ¬èªã§ã®8ãšåãããã«ããã®ãããããããããšãè¡šããŸãã(äŸ:iwan sike ã€ã¯ã³ ã·ã±/ã€ã¯ã€ ã·ã± å
åã®è·ç©ã ããããã®è·ç©ã ããkokutkor kane, iwan kosonte opannere 垯ããããå
æã®çç©ã矜ç¹ã£ãŠã)
åæ°ãæ°ãããšãã1ãã5ãŸã§ã®æ°(e,u,e,e,eãšãå
šãŠæ¯é³ã§çµãã£ãŠãã)ã«ã¯ã·ã p пãä»ãã6ãã10ãŸã§(å
šãŠåé³(ã³ n)ã§çµãã£ãŠãã)ã«ã¯ãpe пÑãä»ããŸããããã¯è¿°è©ãåè©åãããšãã«ã€ããæ¥å°ŸèŸp(e)ã®å€åãšå
šãåãã§ãããã¥ã ã¬ã·ã<ãæ€3æ¯>ãã€ã㥠ã€ã¯ã³ã<埡幣6ã€>ãªã©ã®ããã«æ°ããŸãã
人æ°ãæ°ãããšãã¯ã1ãã5ãŸã§ã«ã¯ð
§ n Ðœãä»ãã6ãã10ãŸã§ã«ã¯[ã€]㥠iw ОÑãä»ããŸããã·ãµãºãŠã¿ã» ã¢ã·ã°ãã³<å人5人>ã®ããã«æ°ããŸãã
ã€ã«ã±ããšã¯ããäœãããæå³ããäžé
è¿°è©(èªåè©)ã§ããæ¥æ¬èªã®ããšããŸãã²ãšã€(11)ããšåããããªèãæ¹ã§ãããã¢ã€ãèªã§ã¯1~9ãè¡šãéšåãå
ã«æ¥ãŸãã
ç©ãæ°ãããšããã©ã¡ãã®æ°åã®åŸã«ãæ°ããç©ã®ååãä»ããŸããäŸãã°ã14å¹ã®ç¬(ã»ã¿ seta ÑÑÑа)ã¯ã€ã ã»ã¿ ã€ã«ã±ã ã¯ã³ ã»ã¿ã®ããã«èšããŸãã
æ¯è¿èŠãŠããã·ãã1ã®ããã¯ã³ã10ã®ãã¯å
šãŠãåè©ã®åã«ä»ãããšã§ç©ã®æ°ãæ°ãããæ°é£äœè©ããšåŒã°ããåè©ã§ãããããã20ãã¯åè©ãªã®ã§ãç©ã®æ°ãæ°ããããšãã§ããŸããã(äŸãã°ãè± ãã³ããæ°ãããšãããã·ã ãã³ã<1æ¬ã®è±>ããããã³ã ã¢ã»ã¯ã³ã<è±6æ¬>ããšã¯èšããŠãããã ãã³ãããããã³ã ãããããªã©ãšã¯èšããªãã)ããã§ãç©ã®æ°ãæ°ããããã«ããããšããèŸãã€ããããããããšãã圢ã«ããŸããããããããšã§ãããŸã§èŠãŠããæ°ãšåãããã«ãããã ãšãœã ã20å¹ã®ããºããããšã ã± ãããã·ããå20æ¬ããã«ãã±ãã ãããã³ãæ·å¥³20人ãã®ããã«è¡šãããšãã§ããŸãã
ãŸãã20ãè¡šãæ°è©ã«ã¯å°åã«ãã£ãŠããããããããããã®ä»ã«ãã€ã°ããããã¯ããããã·ãããããããã¹ããªã©ããããŸãã
人æ°ãåæ°ãæ°ããå Žåã§ãåæ§ã«ãåæ°è©ã®ããšã«p/peãn/iwãä»ããŸãã
(ããã§ã¯ãã·ã ã€ã«ã±ãããšãã¯ã³ ãšããããããã§åã£ãŠããŸããããã·ã ã€ã«ã±ã ã¯ã³ããšããšããããããã§åãããã11ã40ã«åããããã40ã«å±ãã¬11ãããªã©ãšãã解éããããŸãã)
ããšãã¯ããããž(åãã)ããšããæå³ããããšèããããããããµã³ã»ãšããããã(8ã2Ã20ãžåãã)ãã§ã32ããè¡šããäŸããããŸãããŸãããã·ã ã€ã«ã±ã ã¯ã³ ã€ã«ã±ã ããããã§ã32ããè¡šããäŸããããŸãã
åãããã«ããŠãããšããã®ããã«ãªããŸãã
ãš ã¯ã~ã«åããããšããæå³ããããšèããããŠããŸãã
ãããŸã§ããŸãšãããšããã®ããã«ãªããŸãã
æå·ã»å®è°·ã»æšºå€ªãªã©ã§ã¯ã20é²æ³ãæ¶ãã10é²æ³ã«ãªã£ãŠããŸãã
90以éã¯ãå°åã«ãã£ãŠåŒã³åãããªãå€ãããŸãã
ããã¯ãã®ãŸãŸ20é²æ³ãç¶ããŠãããã®ã§ãã
ããã¯100ã§äžåºåããã€ããããã«å ç®ããŠãããã®ã§ãã
ããã¯100ã§æ°ããªåäœãå°å
¥ãããã®ã§ãã
åé²æ³ã§ããããŸããŸãªè¡šãæ¹ããããŸãã
ãããã¢ã€ãèªã®åºæ¬çãª(äºåé²æ³ã䜿ãç¶ãããšãã®)æ°äœç³»ã§ãããšèããããŸãããã®è¡šã§ã¯ã0ã3999(4000ã¯20Ã20Ã20)ãŸã§è¡šããŸãããŸãããã®ã»ãã«å€§ããªæ°ã®è¡šãæ¹ãããå°åããããŸãã
æ°ãæ°ãããšãã¯ããããã®æ°è©ããã·ã ã¡ãã³(1人ã®å¥³)ããããã ãªã°ã«ãš(2人ã®ç·)ããã㬠ã»ã¿(äžå¹ã®ç¬)ãã®ããã«ãæ°ããããåè©ã®åã«çœ®ããŸããäœãæ°ãããšãã§ã圢ã¯å€ãããŸããã
ãŸããåæ°ãè¡šããã·ãã·ããããã·ãã...ã¢ã·ã°ãã·ããã€ã¯ã³ãºãã¢ã»ã¯ã³ã...ããã人æ°ãè¡šããã·ãã³ãããã³ã...ã¢ã·ã°ãã³ãã€ã¯ãã¥ãã¢ã»ã¯ãã¥...ãã䜿ã£ãŠæ°ããããšãã§ããŸãããã®å Žåãããã³ ãã» ã€ãã·ã(å°ããªå®¶äžæ£)ããããšãŠãã ã¢ã·ã°ãã³(ããªãã®ãå
ãã5人)ããªã©ã®ããã«ãæ°åè©ãåŸã«çœ®ããŸãã
11以äžã®æ°ã§ãæ°è©ãäºã€åºãŠãããšãã¯ããã·ãã·ã ã€ã«ã±ã ã¯ã³ãºsinep ikasma wanpe(11å)ããããã³ ã€ã«ã±ã ãããã³tun ikasma hotnen(22人)ããã¬ã·ã ã€ã«ã±ã ã¯ã³ãºã»ãšãããããã·ã rep ikasma wanpe-etuhotnep(33å)ããã€ã¯ã㥠ã€ã«ã±ã ã¯ãã¥ã»ãšã¬ãããã³iwaniw ikasma waniw-erehotnen(56人)ãã®ããã«ã1ã2ã-10ã®éšåããã¯ã³ãããããæ°åè©ã«ãªããŸããåæ§ã«ãã11å¹ã®ã¬ã(ãã£ã/ãµããcape:ç«)ããªã©ãšããå Žåã¯ããã·ã ãã£ã ã€ã«ã±ã ã¯ã³ ãµãããã®ããã«ãããããã®éšåãç¹°ãè¿ããŠèšããŸãã
ãŸããæ¯èŒçå°ãªã人æ°ãæ°ããå Žåãåºæã®åŒã³æ¹ã§åŒã°ããããšããããŸããäžã«ç€ºãããã®ã¯æ²æµæ¹èšã®ãã®ã§ãã
åºæ°(é çª)ã¯ããã€ã€ã§ãš~/iye-e-ããæ°è©ã®åã«ä»ããŠè¡šããŸãã(åœç«ã¢ã€ãæ°æåç©é€šã¢ã€ãèªã¢ãŒã«ã€ããã)
ãæ¥é ã[i-y-e-e ãã®ã»(æ¿å
¥é³)ã»(ãšäžç·)ã§ã»ã§]...çªç®ã(ãäºã以äžã®æ°è©ãšå
±ã«çšããããã) iye-einen ã€ã€ã§ãšã€ãã³ å人ç®ã iye-einep ne ã€ã€ã§ãšã€ãã ã åçªç®ã®ã iye-einep ne ku=poho ã€ã€ã§ãšã€ãã ã ã¯ãã åçªç®ã®æ¯åã iye-eiwan to ã€ã€ã§ãšã€ã¯ã³ ã å
æ¥ç®ã(Wç¥è¬¡) iye-ere pa ã€ã€ã§ãšã¬ ã äžå¹Žç®ã(Wæ°è©±) iye-erep ã€ã€ã§ãšã¬ã äžçªç®ã iye-erep ne ã€ã€ã§ãšã¬ãã äžçªç®ã®ã iye-ererko ã€ã€ã§ãšã¬ã¬ã³[å][i-e-e-rerko ãã®ã»ã§ã»ããã§ã»äžæ¥] äžæ¥ç®ã iye-etup ã€ã€ã§ãšãã¥ã äºçªç®ã a=o uske oro wa iye-erep oro ta ráp=an ã¢ãª ãŠã·ã± ãªã 㯠ã€ã€ã§ãšã¬ã ãªã ã¿ ã©ãã³ ä¹ã£ãæããäžã€ç®ã§éããŸãããã(S) âåè é»è»ã«ä¹ã£ãŠãã次ã®æ¬¡ã®é§
ã§éããããšãèšã£ãŠããã ä¹ã£ãé§
ãäžã€ç®ãšããŠæ°ããŠããã âçºé³ äºèªã®ã¢ã¯ã»ã³ãã§çºé³ãããã iyé-etúã iyé-eréã âåè ãã®ããã« iye-e- ã€ã€ã§ ãš ã䜿ã£ãŠèšãã...çªç®ãã®èšãæ¹ã¯ãµãã¢ããã®ã¿ããèããã ã¯ãã±ããã«ããã°ã...çªç®ããšããèšãæ¹ã¯ãªãã hoski a=ye p, iyos a=ye p, na iyos a=ye p ãã·ã ã¢ã€ã§ãã ã€ãšã· ã¢ã€ã§ãã ã ã€ãšã· ã¢ã€ã§ããæåã«èšã£ãããšã ãã®åŸã«èšã£ãããšã ããã«åŸã«èšã£ãããšãã®ããã«èšãã ãããã¯ãã±ãããã ç¥è¬¡ã®äžã§ã¯ iye-eiwan to ã€ã€ã§ãšã€ã¯ã³ ããå
æ¥ç®ã®æ¥ãã®ããã«ãã®åœ¢ã䜿ã£ãŠæã£ãŠããã (åºå
ž:ç°æãæ¹èš:æ²æµ)(åœç«ã¢ã€ãæ°æåç©é€šã¢ã€ãèªã¢ãŒã«ã€ããã)
ããã ãçš®é¡ããããŸããæ°ãäœãèŠåã¯ç¢ºåºãšããŠãããã©ã®æ°è©ã§äœãè¡šãããæç« ã®åé ãªã©ã§æ±ºããŠããã°ãåãè¡šèšã§äºéãã«åããããšãã£ãããšã¯æ±ºããŠèµ·ãããªãããã«ãªã£ãŠããã®ã§èª€è§£ã¯ãªããªããŸãã
ã¢ã€ãèªã®æ°è©åè : äºåé²æ³ã«ãããäžæ¹ç®æ³ããäžæ¹ç®æ³ãžã®åãæ¿ã
ãã¥ãŒãšã¯ã¹ãã¬ã¹ ã¢ã€ãèª(äžå·è£ èãçœæ°Žç€Ÿ) | [
{
"paragraph_id": 0,
"tag": "p",
"text": "ã¢ã€ãèª > ããŒãå¥éèŠèªåœ > æ°ã®æ°ãæ¹",
"title": ""
},
{
"paragraph_id": 1,
"tag": "p",
"text": "ã¢ã€ãèªã®æ°è©ã¯ãå
šäœãšããŠã¯äºåé²æ³ã§ãããäžã«åé²æ³ãå«ãŸããŠããŸãããŸããå®å
šã«åé²æ³ã®å°åãã100ãŸã§ã¯äºåé²æ³ã§ãçŸã®äœããã¯åé²æ³ã«ãªãå°åããããŸããæ¥æ¬èªãªã©ã®åšèŸºã®èšèªãšç°ãªããç¬èªã®æ°äœç³»ãæã£ãŠããŸãã",
"title": ""
},
{
"paragraph_id": 2,
"tag": "p",
"text": "å°åãå Žåã«ãã£ãŠã¯ãããã«ç€ºãããã®ãšã¯ç°ãªãèšãæ¹ãããå ŽåããããŸããå°ååã瀺ãããã®ã§ãã瀺ããå°åãã¹ãŠã«ã¯åœãŠã¯ãŸããªãããšããããŸãããŸããä»ã®ãšãããåå°ã®æ¹èšã網çŸ
ã§ããŠããªãä»ã誀ããå€ãã¯èšæ£ã§ããŠããŸãã(ç¹ã«90以é)ã",
"title": ""
},
{
"paragraph_id": 3,
"tag": "p",
"text": "åºæ¬ã«ãªãæ°ã§ãããã£ããèŠããŸãããã",
"title": "0ïœ10"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "äœããæ°ãããšãã«ã¯ããã®æ°è©ã®ããšã«æ°ããç©ã®ååã眮ããŸããããšãã°ãäºå¹ã®ç«(ãã£ã/ãµãã cápe ÑаÌпÑ)ã¯ãã ãµãããäžäººã®äºº(ã¢ã£ã ajnu айМÑ)ã¯ã¬ ã¢ã£ããšèšããŸããäœãæ°ãããšããããã¯å€ãããŸããã",
"title": "0ïœ10"
},
{
"paragraph_id": 5,
"tag": "p",
"text": "å ã¿ã«ãæ¥æ¬èªã§ã®ç¥èæ°ã¯4[ã]ãš8[ã]ã§ãããã¢ã€ãèªã«ãããç¥èæ°ã¯ã€ã¯ã³ iwan ОÑаМ(6)ã§ãããã°ãã°æ¥æ¬èªã§ã®8ãšåãããã«ããã®ãããããããããšãè¡šããŸãã(äŸ:iwan sike ã€ã¯ã³ ã·ã±/ã€ã¯ã€ ã·ã± å
åã®è·ç©ã ããããã®è·ç©ã ããkokutkor kane, iwan kosonte opannere 垯ããããå
æã®çç©ã矜ç¹ã£ãŠã)",
"title": "0ïœ10"
},
{
"paragraph_id": 6,
"tag": "p",
"text": "åæ°ãæ°ãããšãã1ãã5ãŸã§ã®æ°(e,u,e,e,eãšãå
šãŠæ¯é³ã§çµãã£ãŠãã)ã«ã¯ã·ã p пãä»ãã6ãã10ãŸã§(å
šãŠåé³(ã³ n)ã§çµãã£ãŠãã)ã«ã¯ãpe пÑãä»ããŸããããã¯è¿°è©ãåè©åãããšãã«ã€ããæ¥å°ŸèŸp(e)ã®å€åãšå
šãåãã§ãããã¥ã ã¬ã·ã<ãæ€3æ¯>ãã€ã㥠ã€ã¯ã³ã<埡幣6ã€>ãªã©ã®ããã«æ°ããŸãã",
"title": "0ïœ10"
},
{
"paragraph_id": 7,
"tag": "p",
"text": "人æ°ãæ°ãããšãã¯ã1ãã5ãŸã§ã«ã¯ð
§ n Ðœãä»ãã6ãã10ãŸã§ã«ã¯[ã€]㥠iw ОÑãä»ããŸããã·ãµãºãŠã¿ã» ã¢ã·ã°ãã³<å人5人>ã®ããã«æ°ããŸãã",
"title": "0ïœ10"
},
{
"paragraph_id": 8,
"tag": "p",
"text": "ã€ã«ã±ããšã¯ããäœãããæå³ããäžé
è¿°è©(èªåè©)ã§ããæ¥æ¬èªã®ããšããŸãã²ãšã€(11)ããšåããããªèãæ¹ã§ãããã¢ã€ãèªã§ã¯1~9ãè¡šãéšåãå
ã«æ¥ãŸãã",
"title": "10ã20"
},
{
"paragraph_id": 9,
"tag": "p",
"text": "ç©ãæ°ãããšããã©ã¡ãã®æ°åã®åŸã«ãæ°ããç©ã®ååãä»ããŸããäŸãã°ã14å¹ã®ç¬(ã»ã¿ seta ÑÑÑа)ã¯ã€ã ã»ã¿ ã€ã«ã±ã ã¯ã³ ã»ã¿ã®ããã«èšããŸãã",
"title": "10ã20"
},
{
"paragraph_id": 10,
"tag": "p",
"text": "æ¯è¿èŠãŠããã·ãã1ã®ããã¯ã³ã10ã®ãã¯å
šãŠãåè©ã®åã«ä»ãããšã§ç©ã®æ°ãæ°ãããæ°é£äœè©ããšåŒã°ããåè©ã§ãããããã20ãã¯åè©ãªã®ã§ãç©ã®æ°ãæ°ããããšãã§ããŸããã(äŸãã°ãè± ãã³ããæ°ãããšãããã·ã ãã³ã<1æ¬ã®è±>ããããã³ã ã¢ã»ã¯ã³ã<è±6æ¬>ããšã¯èšããŠãããã ãã³ãããããã³ã ãããããªã©ãšã¯èšããªãã)ããã§ãç©ã®æ°ãæ°ããããã«ããããšããèŸãã€ããããããããšãã圢ã«ããŸããããããããšã§ãããŸã§èŠãŠããæ°ãšåãããã«ãããã ãšãœã ã20å¹ã®ããºããããšã ã± ãããã·ããå20æ¬ããã«ãã±ãã ãããã³ãæ·å¥³20人ãã®ããã«è¡šãããšãã§ããŸãã",
"title": "10ã20"
},
{
"paragraph_id": 11,
"tag": "p",
"text": "ãŸãã20ãè¡šãæ°è©ã«ã¯å°åã«ãã£ãŠããããããããããã®ä»ã«ãã€ã°ããããã¯ããããã·ãããããããã¹ããªã©ããããŸãã",
"title": "10ã20"
},
{
"paragraph_id": 12,
"tag": "p",
"text": "人æ°ãåæ°ãæ°ããå Žåã§ãåæ§ã«ãåæ°è©ã®ããšã«p/peãn/iwãä»ããŸãã",
"title": "10ã20"
},
{
"paragraph_id": 13,
"tag": "p",
"text": "(ããã§ã¯ãã·ã ã€ã«ã±ãããšãã¯ã³ ãšããããããã§åã£ãŠããŸããããã·ã ã€ã«ã±ã ã¯ã³ããšããšããããããã§åãããã11ã40ã«åããããã40ã«å±ãã¬11ãããªã©ãšãã解éããããŸãã)",
"title": "20ïœ40"
},
{
"paragraph_id": 14,
"tag": "p",
"text": "ããšãã¯ããããž(åãã)ããšããæå³ããããšèããããããããµã³ã»ãšããããã(8ã2Ã20ãžåãã)ãã§ã32ããè¡šããäŸããããŸãããŸãããã·ã ã€ã«ã±ã ã¯ã³ ã€ã«ã±ã ããããã§ã32ããè¡šããäŸããããŸãã",
"title": "20ïœ40"
},
{
"paragraph_id": 15,
"tag": "p",
"text": "åãããã«ããŠãããšããã®ããã«ãªããŸãã",
"title": "80ãŸã§"
},
{
"paragraph_id": 16,
"tag": "p",
"text": "ãš ã¯ã~ã«åããããšããæå³ããããšèããããŠããŸãã",
"title": "80ãŸã§"
},
{
"paragraph_id": 17,
"tag": "p",
"text": "ãããŸã§ããŸãšãããšããã®ããã«ãªããŸãã",
"title": "80ãŸã§"
},
{
"paragraph_id": 18,
"tag": "p",
"text": "æå·ã»å®è°·ã»æšºå€ªãªã©ã§ã¯ã20é²æ³ãæ¶ãã10é²æ³ã«ãªã£ãŠããŸãã",
"title": "80ãŸã§"
},
{
"paragraph_id": 19,
"tag": "p",
"text": "90以éã¯ãå°åã«ãã£ãŠåŒã³åãããªãå€ãããŸãã",
"title": "90以é"
},
{
"paragraph_id": 20,
"tag": "p",
"text": "ããã¯ãã®ãŸãŸ20é²æ³ãç¶ããŠãããã®ã§ãã",
"title": "90以é"
},
{
"paragraph_id": 21,
"tag": "p",
"text": "ããã¯100ã§äžåºåããã€ããããã«å ç®ããŠãããã®ã§ãã",
"title": "90以é"
},
{
"paragraph_id": 22,
"tag": "p",
"text": "ããã¯100ã§æ°ããªåäœãå°å
¥ãããã®ã§ãã",
"title": "90以é"
},
{
"paragraph_id": 23,
"tag": "p",
"text": "åé²æ³ã§ããããŸããŸãªè¡šãæ¹ããããŸãã",
"title": "90以é"
},
{
"paragraph_id": 24,
"tag": "p",
"text": "ãããã¢ã€ãèªã®åºæ¬çãª(äºåé²æ³ã䜿ãç¶ãããšãã®)æ°äœç³»ã§ãããšèããããŸãããã®è¡šã§ã¯ã0ã3999(4000ã¯20Ã20Ã20)ãŸã§è¡šããŸãããŸãããã®ã»ãã«å€§ããªæ°ã®è¡šãæ¹ãããå°åããããŸãã",
"title": "倧ããªæ°"
},
{
"paragraph_id": 25,
"tag": "p",
"text": "æ°ãæ°ãããšãã¯ããããã®æ°è©ããã·ã ã¡ãã³(1人ã®å¥³)ããããã ãªã°ã«ãš(2人ã®ç·)ããã㬠ã»ã¿(äžå¹ã®ç¬)ãã®ããã«ãæ°ããããåè©ã®åã«çœ®ããŸããäœãæ°ãããšãã§ã圢ã¯å€ãããŸããã",
"title": "åæ°ã»äººæ°"
},
{
"paragraph_id": 26,
"tag": "p",
"text": "ãŸããåæ°ãè¡šããã·ãã·ããããã·ãã...ã¢ã·ã°ãã·ããã€ã¯ã³ãºãã¢ã»ã¯ã³ã...ããã人æ°ãè¡šããã·ãã³ãããã³ã...ã¢ã·ã°ãã³ãã€ã¯ãã¥ãã¢ã»ã¯ãã¥...ãã䜿ã£ãŠæ°ããããšãã§ããŸãããã®å Žåãããã³ ãã» ã€ãã·ã(å°ããªå®¶äžæ£)ããããšãŠãã ã¢ã·ã°ãã³(ããªãã®ãå
ãã5人)ããªã©ã®ããã«ãæ°åè©ãåŸã«çœ®ããŸãã",
"title": "åæ°ã»äººæ°"
},
{
"paragraph_id": 27,
"tag": "p",
"text": "11以äžã®æ°ã§ãæ°è©ãäºã€åºãŠãããšãã¯ããã·ãã·ã ã€ã«ã±ã ã¯ã³ãºsinep ikasma wanpe(11å)ããããã³ ã€ã«ã±ã ãããã³tun ikasma hotnen(22人)ããã¬ã·ã ã€ã«ã±ã ã¯ã³ãºã»ãšãããããã·ã rep ikasma wanpe-etuhotnep(33å)ããã€ã¯ã㥠ã€ã«ã±ã ã¯ãã¥ã»ãšã¬ãããã³iwaniw ikasma waniw-erehotnen(56人)ãã®ããã«ã1ã2ã-10ã®éšåããã¯ã³ãããããæ°åè©ã«ãªããŸããåæ§ã«ãã11å¹ã®ã¬ã(ãã£ã/ãµããcape:ç«)ããªã©ãšããå Žåã¯ããã·ã ãã£ã ã€ã«ã±ã ã¯ã³ ãµãããã®ããã«ãããããã®éšåãç¹°ãè¿ããŠèšããŸãã",
"title": "åæ°ã»äººæ°"
},
{
"paragraph_id": 28,
"tag": "p",
"text": "ãŸããæ¯èŒçå°ãªã人æ°ãæ°ããå Žåãåºæã®åŒã³æ¹ã§åŒã°ããããšããããŸããäžã«ç€ºãããã®ã¯æ²æµæ¹èšã®ãã®ã§ãã",
"title": "åæ°ã»äººæ°"
},
{
"paragraph_id": 29,
"tag": "p",
"text": "åºæ°(é çª)ã¯ããã€ã€ã§ãš~/iye-e-ããæ°è©ã®åã«ä»ããŠè¡šããŸãã(åœç«ã¢ã€ãæ°æåç©é€šã¢ã€ãèªã¢ãŒã«ã€ããã)",
"title": "åæ°ã»äººæ°"
},
{
"paragraph_id": 30,
"tag": "p",
"text": "ãæ¥é ã[i-y-e-e ãã®ã»(æ¿å
¥é³)ã»(ãšäžç·)ã§ã»ã§]...çªç®ã(ãäºã以äžã®æ°è©ãšå
±ã«çšããããã) iye-einen ã€ã€ã§ãšã€ãã³ å人ç®ã iye-einep ne ã€ã€ã§ãšã€ãã ã åçªç®ã®ã iye-einep ne ku=poho ã€ã€ã§ãšã€ãã ã ã¯ãã åçªç®ã®æ¯åã iye-eiwan to ã€ã€ã§ãšã€ã¯ã³ ã å
æ¥ç®ã(Wç¥è¬¡) iye-ere pa ã€ã€ã§ãšã¬ ã äžå¹Žç®ã(Wæ°è©±) iye-erep ã€ã€ã§ãšã¬ã äžçªç®ã iye-erep ne ã€ã€ã§ãšã¬ãã äžçªç®ã®ã iye-ererko ã€ã€ã§ãšã¬ã¬ã³[å][i-e-e-rerko ãã®ã»ã§ã»ããã§ã»äžæ¥] äžæ¥ç®ã iye-etup ã€ã€ã§ãšãã¥ã äºçªç®ã a=o uske oro wa iye-erep oro ta ráp=an ã¢ãª ãŠã·ã± ãªã 㯠ã€ã€ã§ãšã¬ã ãªã ã¿ ã©ãã³ ä¹ã£ãæããäžã€ç®ã§éããŸãããã(S) âåè é»è»ã«ä¹ã£ãŠãã次ã®æ¬¡ã®é§
ã§éããããšãèšã£ãŠããã ä¹ã£ãé§
ãäžã€ç®ãšããŠæ°ããŠããã âçºé³ äºèªã®ã¢ã¯ã»ã³ãã§çºé³ãããã iyé-etúã iyé-eréã âåè ãã®ããã« iye-e- ã€ã€ã§ ãš ã䜿ã£ãŠèšãã...çªç®ãã®èšãæ¹ã¯ãµãã¢ããã®ã¿ããèããã ã¯ãã±ããã«ããã°ã...çªç®ããšããèšãæ¹ã¯ãªãã hoski a=ye p, iyos a=ye p, na iyos a=ye p ãã·ã ã¢ã€ã§ãã ã€ãšã· ã¢ã€ã§ãã ã ã€ãšã· ã¢ã€ã§ããæåã«èšã£ãããšã ãã®åŸã«èšã£ãããšã ããã«åŸã«èšã£ãããšãã®ããã«èšãã ãããã¯ãã±ãããã ç¥è¬¡ã®äžã§ã¯ iye-eiwan to ã€ã€ã§ãšã€ã¯ã³ ããå
æ¥ç®ã®æ¥ãã®ããã«ãã®åœ¢ã䜿ã£ãŠæã£ãŠããã (åºå
ž:ç°æãæ¹èš:æ²æµ)(åœç«ã¢ã€ãæ°æåç©é€šã¢ã€ãèªã¢ãŒã«ã€ããã)",
"title": "åæ°ã»äººæ°"
},
{
"paragraph_id": 31,
"tag": "p",
"text": "ããã ãçš®é¡ããããŸããæ°ãäœãèŠåã¯ç¢ºåºãšããŠãããã©ã®æ°è©ã§äœãè¡šãããæç« ã®åé ãªã©ã§æ±ºããŠããã°ãåãè¡šèšã§äºéãã«åããããšãã£ãããšã¯æ±ºããŠèµ·ãããªãããã«ãªã£ãŠããã®ã§èª€è§£ã¯ãªããªããŸãã",
"title": "倧ããªæ°è©äžèŠ§[12]"
},
{
"paragraph_id": 32,
"tag": "p",
"text": "ã¢ã€ãèªã®æ°è©åè : äºåé²æ³ã«ãããäžæ¹ç®æ³ããäžæ¹ç®æ³ãžã®åãæ¿ã",
"title": "ãªã³ã¯ã»åèæç®"
},
{
"paragraph_id": 33,
"tag": "p",
"text": "ãã¥ãŒãšã¯ã¹ãã¬ã¹ ã¢ã€ãèª(äžå·è£ èãçœæ°Žç€Ÿ)",
"title": "ãªã³ã¯ã»åèæç®"
}
] | ã¢ã€ãèª > ããŒãå¥éèŠèªåœ > æ°ã®æ°ãæ¹ ã¢ã€ãèªã®æ°è©ã¯ãå
šäœãšããŠã¯äºåé²æ³ã§ãããäžã«åé²æ³ãå«ãŸããŠããŸãããŸããå®å
šã«åé²æ³ã®å°åãã100ãŸã§ã¯äºåé²æ³ã§ãçŸã®äœããã¯åé²æ³ã«ãªãå°åããããŸããæ¥æ¬èªãªã©ã®åšèŸºã®èšèªãšç°ãªããç¬èªã®æ°äœç³»ãæã£ãŠããŸãã å°åãå Žåã«ãã£ãŠã¯ãããã«ç€ºãããã®ãšã¯ç°ãªãèšãæ¹ãããå ŽåããããŸããå°ååã瀺ãããã®ã§ãã瀺ããå°åãã¹ãŠã«ã¯åœãŠã¯ãŸããªãããšããããŸãããŸããä»ã®ãšãããåå°ã®æ¹èšã網çŸ
ã§ããŠããªãä»ã誀ããå€ãã¯èšæ£ã§ããŠããŸãã(ç¹ã«90以é)ã | [[ã¢ã€ãèª]] > [[ã¢ã€ãèª ããŒãå¥éèŠèªåœ|ããŒãå¥éèŠèªåœ]] > '''æ°ã®æ°ãæ¹'''
ã¢ã€ãèªã®æ°è©ã¯ãå
šäœãšããŠã¯äºåé²æ³ã§ãããäžã«åé²æ³ãå«ãŸããŠããŸãããŸããå®å
šã«åé²æ³ã®å°åãã100ãŸã§ã¯äºåé²æ³ã§ãçŸã®äœããã¯åé²æ³ã«ãªãå°åããããŸããæ¥æ¬èªãªã©ã®åšèŸºã®èšèªãšç°ãªããç¬èªã®æ°äœç³»ãæã£ãŠããŸãã
å°åãå Žåã«ãã£ãŠã¯ãããã«ç€ºãããã®ãšã¯ç°ãªãèšãæ¹ãããå ŽåããããŸããå°ååã瀺ãããã®ã§ãã瀺ããå°åãã¹ãŠã«ã¯åœãŠã¯ãŸããªãããšããããŸãããŸããä»ã®ãšãããåå°ã®æ¹èšã網çŸ
ã§ããŠããªãä»ã誀ããå€ãã¯èšæ£ã§ããŠããŸãã(ç¹ã«90以é)ã
== 0ïœ10 ==
{| class="wikitable"
|+1ïœ10ïŒæ°é£äœè©ïŒ
!æ°
!ã«ã
!ã©ãã³æå
!ããªã«æå
|-
!0<ref>ããã (å¯è©)ãã ã®(é£äœè©)空ã§ãã(äžé
è¿°è©)ããšããæå³ã®èªãæ°è©ã®0ãšããŠäœ¿ããããšãã説æã»çšäŸã¯ã[https://wikitravel.org/ja/%E3%82%A2%E3%82%A4%E3%83%8C%E8%AA%9E%E4%BC%9A%E8%A9%B1%E9%9B%86 ãã]ã§ãã確èªã§ããªãã£ããäœããã¢ã€ãèªã®äžé
è¿°è©ã¯äžè¬çã«åè©ãšããŠã䜿ããããããã空ã§ãããã®ããšããæå³ã®èšèãšããŠè§£éããããšã¯ã§ããã</ref>
|ãª<span style="text-emphasis-style: sesame;">ã</span>
|ohá
|ПÑ
а
|-
!1
|ã·<span style="text-emphasis-style: sesame;">ã</span>
|siné
|ÑОМÑ
|-
!2
|<span style="text-emphasis-style: sesame;">ãã</span>
|tu
|ÑÑ
|-
!3
|<span style="text-emphasis-style: sesame;">ã¬</span>ã<span style="text-emphasis-style: sesame;">ãŠ</span>ãŒã
|re, jûpi
|ÑÑ, йÑÑпО
|-
!4
|<span style="text-emphasis-style: sesame;">ã€</span>ã<ref name=":0">äŸå€ã¢ã¯ã»ã³ãã®ããã暺倪ã§ã¯ãã€ãŒã îneããšãªããå«ãŸããèªãåæ§ïŒã€ãŒãããã:40 çïŒã</ref>
|Ãne
|ОМÑ
|-
!5
|ã¢<span style="text-emphasis-style: sesame;">ã·</span>ã°ã
|asÃkne
|аÑОкМÑ
|-
!6
|ã€<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>
|iwán
|ОÑаМ
|-
!7
|<span style="text-emphasis-style: sesame;">ã¢</span>ã»ã¯<small>ã³</small>
|árwan
|аÑÑаМ
|-
!8
|ãã<span style="text-emphasis-style: sesame;">ã</span>ãµ<small>ã³</small>
|tupésan
|ÑÑпÑÑаМ
|-
!9
|ã·<span style="text-emphasis-style: sesame;">ã</span>ããµ<small>ã³</small>
|sinépesan
|ÑОМÑпÑÑаМ
|-
!10
|<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>
|wan
|ÑаМ
|}
åºæ¬ã«ãªãæ°ã§ãããã£ããèŠããŸãããã
äœããæ°ãããšãã«ã¯ããã®æ°è©ã®ããšã«æ°ããç©ã®ååã眮ããŸããããšãã°ãäºå¹ã®ç«ïŒãã£ã/ãµãã cápe ÑаÌпÑïŒã¯ãã ãµãããäžäººã®äººïŒã¢ã£ã ajnu айМÑïŒã¯ã¬ ã¢ã£ããšèšããŸããäœãæ°ãããšããããã¯å€ãããŸããã
å ã¿ã«ãæ¥æ¬èªã§ã®ç¥èæ°ã¯4[ã]ãš8[ã]ã§ãããã¢ã€ãèªã«ãããç¥èæ°ã¯ã€ã¯<small>ã³</small> iwan ОÑаМïŒ6ïŒã§ãããã°ãã°æ¥æ¬èªã§ã®8ãšåãããã«ããã®ãããããããããšãè¡šããŸããïŒäŸïŒiwan sike ã€ã¯ã³ ã·ã±/ã€ã¯ã€ ã·ã± å
åã®è·ç©ïœ€ ããããã®è·ç©ïœ¡ <ref group="åŒçšå
">[https://ainugo.nam.go.jp/search/ åœç«ã¢ã€ãæ°æåç©é€šã¢ã€ãèªã¢ãŒã«ã€ã]</ref>ããkokutkor kane, iwan kosonte opannereã垯ããããå
æã®çç©ã矜ç¹ã£ãŠ<ref group="åŒçšå
">ã¢ã€ãç¥è¬¡ép78ãNitatorunpe yaieyukar, âHarit kunnaâ</ref>ãïŒ
{| class="wikitable"
|+1ã10ã®åæ°ã人æ°
!
! colspan="3" |åæ°
! colspan="3" |人æ°
|-
!æ°
!ã«ã
!ã©ãã³æå
!ããªã«æå
!ã«ã
!ã©ãã³æå
!ããªã«æå
|-
!1
|ã·<span style="text-emphasis-style: sesame;">ã</span>ã·ã
|sinép
|ÑОМÑп
|ã·ã<small>ã³</small>
|sinen
|ÑОМÑÐœ
|-
!2
|<span style="text-emphasis-style: sesame;">ãã</span>ã·ã
|tup
|ÑÑп
|ãã<small>ã³</small>
|tun
|ÑÑÐœ
|-
!3
|<span style="text-emphasis-style: sesame;">ã¬</span>ã·ãã<span style="text-emphasis-style: sesame;">ãŠ</span>ãŒãã
|rep, jûpihi
|ÑÑп, йÑÑпОÑ
О
|ã¬<small>ã³</small>
|ren
|ÑÑÐœ
|-
!4
|<span style="text-emphasis-style: sesame;">ã€</span>ãã·ã<ref name=":0" />
|Ãnep
|ОМÑп
|ã€ã<small>ã³</small>
|Ãnen
|ОМÑÐœ
|-
!5
|ã¢<span style="text-emphasis-style: sesame;">ã·</span>ã°ãã·ã
|asÃknep
|аÑОкМÑп
|ã¢ã·ã°ã<small>ã³</small>
|asiknen
|аÑОкМÑÐœ
|-
!6
|ã€<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã
|iwánpe
|ОÑаМпÑ
|ã€ã¯ãã¥
|iwaniw
|ОÑаМОÑ
|-
!7
|<span style="text-emphasis-style: sesame;">ã¢</span>ã»ã¯<small>ã³</small>ã
|árwanpe
|аÑÑаМпÑ
|ã¢ã»ã¯ãã¥
|arwaniw
|аÑÑаМОÑ
|-
!8
|ãã<span style="text-emphasis-style: sesame;">ã</span>ãµ<small>ã³</small>ã
|tupésanpe
|ÑÑпÑÑаМпÑ
|ããããµãã¥
|tupesaniw
|ÑÑпÑÑаМОÑ
|-
!9
|ã·<span style="text-emphasis-style: sesame;">ã</span>ããµ<small>ã³</small>ã
|sinépesanpe
|ÑОМÑпÑÑаМпÑ
|ã·ãããµãã¥
|sinepesaniw
|ÑОМÑпÑÑаМОÑ
|-
!10
|<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã
|wanpe
|ÑаМпÑ
|ã¯ãã¥
|waniw
|ÑаМОÑ
|}
åæ°ãæ°ãããšãã1ãã5ãŸã§ã®æ°ïŒe,u,e,e,eãšãå
šãŠæ¯é³ã§çµãã£ãŠããïŒã«ã¯ã·ã p пãä»ãã6ãã10ãŸã§ïŒå
šãŠåé³(<small>ã³</small> n)ã§çµãã£ãŠããïŒã«ã¯ãpe пÑãä»ããŸããããã¯è¿°è©ãåè©åãããšãã«ã€ããæ¥å°ŸèŸ<ref>è¿°è©ã䌎ã圢åŒåè©ã ãšããèãæ¹ãããããããã§ã¯è§Šããªãã</ref>p(e)ã®å€åãšå
šãåãã§ãããã¥ããã¬ã·ãïŒãæ€3æ¯ïŒãã€ãã¥ãã€ã¯<small>ã³</small>ãïŒåŸ¡å¹£6ã€ïŒãªã©ã®ããã«æ°ããŸãã
人æ°ãæ°ãããšãã¯ã1ãã5ãŸã§ã«ã¯ð
§ n Ðœãä»ãã6ãã10ãŸã§ã«ã¯[ã€]㥠iw ОÑãä»ããŸããã·ãµãºãŠã¿ã»ãã¢ã·ã°ã<small>ã³</small>ïŒå人5人ïŒã®ããã«æ°ããŸãã
== 10ã20 ==
{| class="wikitable"
|+10ïœ20
!æ°
!ã«ã
!ã©ãã³æå
!ããªã«æå
|-
!10
|<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>
|wán
|ÑаМ
|-
!11
|ã·<span style="text-emphasis-style: sesame;">ã</span>ãã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>
|siné ikásma wán
|ÑÐžÐœÑ ÐžÐºÐ°ÑЌа ÑаМ
|-
!12
|<span style="text-emphasis-style: sesame;">ãã</span>ãã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>
|tú ikásma wán
|ÑÑ ÐžÐºÐ°ÑЌа ÑаМ
|-
!13
|<span style="text-emphasis-style: sesame;">ã¬</span>ãã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>
|ré ikásma wán
|ÑÑ ÐžÐºÐ°ÑЌа ÑаМ
|-
!14
|<span style="text-emphasis-style: sesame;">ã€</span>ããã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>
|Ãne ikásma wán
|ÐžÐœÑ ÐžÐºÐ°ÑЌа ÑаМ
|-
!15
|ã¢<span style="text-emphasis-style: sesame;">ã·</span>ã°ããã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>
|asÃkne ikásma wán
|аÑÐžÐºÐœÑ ÐžÐºÐ°ÑЌа ÑаМ
|-
!16
|ã€<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ãã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>
|iwán ikasma wan
|ОÑаМ ОкаÑЌа ÑаМ
|-
!17
|<span style="text-emphasis-style: sesame;">ã¢</span>ã»ã¯<small>ã³</small>ãã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>
|arwan ikasma wan
|аÑÑаМ ОкаÑЌа ÑаМ
|-
!18
|ãã<span style="text-emphasis-style: sesame;">ã</span>ãµ<small>ã³</small>ãã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>
|tupesan ikasma wan
|ÑÑпÑÑаМ ОкаÑЌа ÑаМ
|-
!19
|ã·<span style="text-emphasis-style: sesame;">ã</span>ããµ<small>ã³</small>ãã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>
|sinepesan ikasma wan
|ÑОМÑпÑÑаМ ОкаÑЌа ÑаМ
|-
!20
|<span style="text-emphasis-style: sesame;">ã</span>ãã<ref name=":1">ãã®ä»ã«ããããããã¯ããã·ããã¯ãããªã©ã®åœ¢ãããã</ref>ããªã©
|hótne
|Ñ
ПÑÐœÑ
|}
ã€ã«ã±ããšã¯ããäœãããæå³ããäžé
è¿°è©ïŒèªåè©ïŒã§ããæ¥æ¬èªã®ããšããŸãã²ãšã€(11)ããšåããããªèãæ¹ã§ãããã¢ã€ãèªã§ã¯1ïœ9ãè¡šãéšåãå
ã«æ¥ãŸãã
ç©ãæ°ãããšããã©ã¡ãã®æ°åã®åŸã«ãæ°ããç©ã®ååãä»ããŸããäŸãã°ã14å¹ã®ç¬ïŒã»ã¿ seta ÑÑÑаïŒã¯ã€ã ã»ã¿ ã€ã«ã±ã ã¯<small>ã³</small> ã»ã¿ã®ããã«èšããŸãã
æ¯è¿èŠãŠããã·ãã1ã®ããã¯<small>ã³</small>ã10ã®ãã¯å
šãŠãåè©ã®åã«ä»ãããšã§ç©ã®æ°ãæ°ãããæ°é£äœè©ããšåŒã°ããåè©ã§ãããããã20ãã¯åè©ãªã®ã§ãç©ã®æ°ãæ°ããããšãã§ããŸãããïŒäŸãã°ãè± ãã³ããæ°ãããšãããã·ãããã³ãïŒ1æ¬ã®è±ïŒããããã³ããã¢ã»ã¯ã³ãïŒè±6æ¬ïŒããšã¯èšããŠããããããã³ãããããã³ãããããããªã©ãšã¯èšããªããïŒããã§ãç©ã®æ°ãæ°ããããã«ããããšããèŸãã€ããããããããšãã圢ã«ããŸããããããããšã§ãããŸã§èŠãŠããæ°ãšåãããã«ããããããšãœã ã20å¹ã®ããºããããšã ã±ããããã·ããå20æ¬ããã«ãã±ãã<ref>ká'''t'''kemat</ref> ããã<small>ã³</small>ãæ·å¥³20人ãã®ããã«è¡šãããšãã§ããŸãã
ãŸãã20ãè¡šãæ°è©ã«ã¯å°åã«ãã£ãŠããããããããããã®ä»ã«ãã€ã°ããããã¯ããããã·ãããããããã¹ããªã©ããããŸãã
{| class="wikitable"
|+10ã20ã®åæ°
!æ°
!ã«ã
!ã©ãã³æå
!ããªã«æå
|-
!10
|<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã
|wánpe
|ÑаМпÑ
|-
!11
|ã·<span style="text-emphasis-style: sesame;">ã</span>ã·ããã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã
|sinép ikásma wánpe
|ÑОМÑп ОкаÑЌа ÑаМпÑ
|-
!12
|<span style="text-emphasis-style: sesame;">ãã</span>ã·ããã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã
|túp ikásma wánpe
|ÑÑп ОкаÑЌа ÑаМпÑ
|-
!13
|<span style="text-emphasis-style: sesame;">ã¬</span>ã·ããã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã
|rép ikásma wánpe
|ÑÑп ОкаÑЌа ÑаМпÑ
|-
!14
|<span style="text-emphasis-style: sesame;">ã€</span>ãã·ããã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã
|Ãnep ikásma wánpe
|ОМÑп ОкаÑЌа ÑаМпÑ
|-
!15
|ã¢<span style="text-emphasis-style: sesame;">ã·</span>ã°ãã·ããã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã
|asÃknep ikásma wánpe
|аÑОкМÑп ОкаÑЌа ÑаМпÑ
|-
!16
|ã€<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ããã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã
|iwánpe ikasma wanpe
|ОÑÐ°ÐœÐ¿Ñ ÐžÐºÐ°ÑЌа ÑаМпÑ
|-
!17
|<span style="text-emphasis-style: sesame;">ã¢</span>ã»ã¯<small>ã³</small>ããã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã
|arwanpe ikasma wanpe
|аÑÑÐ°ÐœÐ¿Ñ ÐžÐºÐ°ÑЌа ÑаМпÑ
|-
!18
|ãã<span style="text-emphasis-style: sesame;">ã</span>ãµ<small>ã³</small>ããã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã
|tupesanpe ikasma wanpe
|ÑÑпÑÑÐ°ÐœÐ¿Ñ ÐžÐºÐ°ÑЌа ÑаМпÑ
|-
!19
|ã·<span style="text-emphasis-style: sesame;">ã</span>ããµ<small>ã³</small>ããã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã
|sinepesanpe ikasma wanpe
|ÑОМÑпÑÑÐ°ÐœÐ¿Ñ ÐžÐºÐ°ÑЌа ÑаМпÑ
|-
!20
|<span style="text-emphasis-style: sesame;">ã</span>ããã·ã<ref name=":1" />ã
|hótnep
|Ñ
ПÑÐœÑп
|}
{| class="wikitable"
|+10ã20ã®äººæ°
!æ°
!ã«ã
!ã©ãã³æå
!ããªã«æå
|-
!10
|<span style="text-emphasis-style: sesame;">ã¯</span>ãã¥
|wániw
|ÑаМОÑ
|-
!11
|ã·<span style="text-emphasis-style: sesame;">ã</span>ã³ãã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã¯</span>ãã¥
|sinén ikásma wániw
|ÑОМÑÐœ ОкаÑЌа ÑаМОÑ
|-
!12
|<span style="text-emphasis-style: sesame;">ãã</span>ã³ãã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã¯</span>ãã¥
|tún ikásma wániw
|ÑÑÐœ ОкаÑЌа ÑаМОÑ
|-
!13
|<span style="text-emphasis-style: sesame;">ã¬</span>ã³ãã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã¯</span>ãã¥
|rén ikásma wániw
|ÑÑÐœ ОкаÑЌа ÑаМОÑ
|-
!14
|<span style="text-emphasis-style: sesame;">ã€</span>ãã³ãã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã¯</span>ãã¥
|Ãnen ikásma wániw
|ОМÑÐœ ОкаÑЌа ÑаМОÑ
|-
!15
|ã¢<span style="text-emphasis-style: sesame;">ã·</span>ã°ãã³ãã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã¯</span>ãã¥
|asÃknen ikásma wániw
|аÑОкМÑÐœ ОкаÑЌа ÑаМОÑ
|-
!16
|ã€<span style="text-emphasis-style: sesame;">ã¯</span>ãã¥ãã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã¯</span>ãã¥
|iwániw ikasma waniw
|ОÑÐ°ÐœÐžÑ ÐžÐºÐ°ÑЌа ÑаМОÑ
|-
!17
|<span style="text-emphasis-style: sesame;">ã¢</span>ã»ã¯ãã¥ãã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã¯</span>ãã¥
|arwaniw ikasma waniw
|аÑÑÐ°ÐœÐžÑ ÐžÐºÐ°ÑЌа ÑаМОÑ
|-
!18
|ãã<span style="text-emphasis-style: sesame;">ã</span>ãµãã¥ãã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã¯</span>ãã¥
|tupesaniw ikasma waniw
|ÑÑпÑÑÐ°ÐœÐžÑ ÐžÐºÐ°ÑЌа ÑаМОÑ
|-
!19
|ã·<span style="text-emphasis-style: sesame;">ã</span>ããµãã¥ãã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã¯</span>ãã¥
|sinepesaniw ikasma waniw
|ÑОМÑпÑÑÐ°ÐœÐžÑ ÐžÐºÐ°ÑЌа ÑаМОÑ
|-
!20
|<span style="text-emphasis-style: sesame;">ã</span>ããã³<ref name=":1" />ã
|hótnen
|Ñ
ПÑÐœÑÐœ
|}
人æ°ãåæ°ãæ°ããå Žåã§ãåæ§ã«ãåæ°è©ã®ããšã«p/peãn/iwãä»ããŸãã
== 20ïœ40 ==
{| class="wikitable"
|+20ïœ40(20é²æ³)
!æ°
!ã«ã
!ã©ãã³æå
!ããªã«æå
|-
!20
|<span style="text-emphasis-style: sesame;">ã</span>ãã<ref>[ããã]ã®éšåã¯æ¹èšã«ãã£ãŠç°ãªãããããããã¯åæµ·éã®äžéšã»åéšãªã©ã§äœ¿ãããã</ref>
|hotne
|Ñ
ПÑÐœÑ
|-
!21
|ã·<span style="text-emphasis-style: sesame;">ã</span>ãã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã(<span style="text-emphasis-style: sesame;">ã</span>ãã)
|sine ikasma hotne
|ÑÐžÐœÑ ÐžÐºÐ°ÑЌа Ñ
ПÑÐœÑ
|-
!22
|ãããã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã(<span style="text-emphasis-style: sesame;">ã</span>ãã)
|tu ikasma hotne
|ÑÑ ÐžÐºÐ°ÑЌа Ñ
ПÑÐœÑ
|-
!ïž
|ïž
|ïž
|ïž
|-
!29
|ã·<span style="text-emphasis-style: sesame;">ã</span>ããµ<small>ã³</small>ãã€ã«ã±ãã(<span style="text-emphasis-style: sesame;">ã</span>ãã)
|sinepesan ikasma hotne
|ÑОМÑпÑÑаМ ОкаÑЌа Ñ
ПÑÐœÑ
|-
!
!
!
!
|-
!30
|(<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã»ãš<span style="text-emphasis-style: sesame;">ãã</span>ããã)ããŸãã¯ã
(<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ãã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã</span>ãã)
|wan-etuhotne
|ÑаМ-ÑÑÑÑ
ПÑÐœÑ
|-
!31
|ã·<span style="text-emphasis-style: sesame;">ã</span>ãã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã(<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã»ãš<span style="text-emphasis-style: sesame;">ãã</span>ããã)
|sine ikasma wan-etuhotne
|ÑÐžÐœÑ ÐžÐºÐ°ÑЌа ÑаМ-ÑÑÑÑ
ПÑÐœÑ
|-
!32
|ãããã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã(<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã»ãš<span style="text-emphasis-style: sesame;">ãã</span>ããã)
|tu ikasma wan-etuhotne
|ÑÑ ÐžÐºÐ°ÑЌа ÑаМ-ÑÑÑÑ
ПÑÐœÑ
|-
!ïž
|ïž
|ïž
|ïž
|-
!39
|ã·<span style="text-emphasis-style: sesame;">ã</span>ããµ<small>ã³</small>ãã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã(ã¯<small>ã³</small>ã»ãš<span style="text-emphasis-style: sesame;">ãã</span>ããã)
|sinepesan ikasma wan-etuhotne
|ÑОМÑпÑÑаМ ОкаÑЌа ÑаМ-ÑÑÑÑ
ПÑÐœÑ
|-
!40
|ãã(<span style="text-emphasis-style: sesame;">ã</span>ãã)
|tuhotne
|ÑÑÑ
ПÑÐœÑ
|}
ïŒããã§ã¯ãã·ããã€ã«ã±ãããšãã¯<small>ã³</small>ããšããããããã§åã£ãŠããŸããããã·ããã€ã«ã±ããã¯ã³ããšããšããããããã§åãããã11ã40ã«åããããã40ã«å±ãã¬11ãããªã©ãšãã解éããããŸããïŒ
ããšãã¯ããããž(åãã)ããšããæå³ããããšèããããããããµ<small>ã³</small>ã»ãšããããã(8ã2Ã20ãžåãã)ãã§ã32ããè¡šããäŸããããŸãããŸãããã·ããã€ã«ã±ããã¯<small>ã³</small>ãã€ã«ã±ããããããã§ã32ããè¡šããäŸããããŸãã
{| class="wikitable"
|+20ïœ40(10é²æ³)
!
!
!
!
|-
|
|
|
|
|-
|
|
|
|
|-
|
|
|
|
|}
== 80ãŸã§ ==
åãããã«ããŠãããšããã®ããã«ãªããŸãã
{| class="wikitable"
|+10ïœ80ã®åã®äœ
!æ°
!ã«ã
!ã©ãã³æå
!ããªã«æå
|-
!10
|<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>
|wan
|
|-
!20
|<span style="text-emphasis-style: sesame;">ã</span>ãã
|hotne
|
|-
!30
|<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã»ãš<span style="text-emphasis-style: sesame;">ãã</span>ããã / <span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ãã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãã<span style="text-emphasis-style: sesame;">ã</span>ãã
|wan-etuhotne
|
|-
!40
|ãã<span style="text-emphasis-style: sesame;">ã</span>ãã
|tuhotne
|
|-
!50
|<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã»ãš<span style="text-emphasis-style: sesame;">ã¬</span>ããã / <span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ãã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ãããã<span style="text-emphasis-style: sesame;">ã</span>ãã
|wan-erehotne
|
|-
!60
|ã¬<span style="text-emphasis-style: sesame;">ã</span>ãã
|rehotne
|
|-
!70
|<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã»ãš<span style="text-emphasis-style: sesame;">ã€</span>ãããã / <span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ãã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ããã¬<span style="text-emphasis-style: sesame;">ã</span>ãã
|wan-einehotne
|
|-
!80
|<span style="text-emphasis-style: sesame;">ã€</span>ãããã
|inehotne
|
|}
ãšãã¯ãïœã«åããããšããæå³ããããšèããããŠããŸãã
ãããŸã§ããŸãšãããšããã®ããã«ãªããŸãã
{| class="wikitable"
|+è¡šãæ¹(1ïœ89)
!äžã®äœ
!
!åã®äœ
|-
|
{| class="wikitable"
|-
!1
|ã·<span style="text-emphasis-style: sesame;">ã</span>
|-
!2
|<span style="text-emphasis-style: sesame;">ãã</span>
|-
!3
|<span style="text-emphasis-style: sesame;">ã¬</span>
|-
!4
|<span style="text-emphasis-style: sesame;">ã€</span>ã
|-
!5
|ã¢<span style="text-emphasis-style: sesame;">ã·</span>ã°ã
|-
!6
|ã€<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>
|-
!7
|<span style="text-emphasis-style: sesame;">ã¢</span>ã»ã¯<small>ã³</small>
|-
!8
|ãã<span style="text-emphasis-style: sesame;">ã</span>ãµ<small>ã³</small>
|-
!9
|ã·<span style="text-emphasis-style: sesame;">ã</span>ããµ<small>ã³</small>
|}
|
{| class="wikitable"
|+
!+
|ã€ã«ã±ã
|}
|
{| class="wikitable"
|-
!10
|<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>
|-
!20
|<span style="text-emphasis-style: sesame;">ã</span>ãã
|-
!30
|<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã»ãš<span style="text-emphasis-style: sesame;">ãã</span>ããã
|-
!40
|ãã<span style="text-emphasis-style: sesame;">ã</span>ãã
|-
!50
|<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã»ãš<span style="text-emphasis-style: sesame;">ã¬</span>ããã
|-
!60
|ã¬<span style="text-emphasis-style: sesame;">ã</span>ãã
|-
!70
|<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã»ãš<span style="text-emphasis-style: sesame;">ã€</span>ãããã
|-
!80
|<span style="text-emphasis-style: sesame;">ã€</span>ãããã
|}
|}
=== åé²æ³ã䜿ãå°åããã ===
æå·ã»å®è°·ã»æšºå€ªãªã©ã§ã¯ã20é²æ³ãæ¶ãã10é²æ³ã«ãªã£ãŠããŸãã
{| class="wikitable"
|+10é²æ³ã®å(1ïœ80)
!æ°
!ã«ã
!ã©ãã³æå
!ããªã«æå
|-
!10
|ããã³ã¯ããããã
|
|
|-
!20
|ãã(ãã)
|
|
|-
!30
|ã¬(ãã)
|
|
|}
== 90以é ==
90以éã¯ãå°åã«ãã£ãŠåŒã³åãããªãå€ãããŸãã
{| class="wikitable"
|+å¹å¥ã»åå¯ã»æ²æµãªã©
!æ°
!ã«ã
!ã©ãã³æå
!ããªã«æå
|-
!90
|ã¯<small>ã³</small>ã»ãšã¢ã·ã°ãããã
|
|
|-
!100
|ã¢ã·ã°ãããã
|
|
|-
!110
|ã¯<small>ã³</small>ã»ãšã€ã¯<small>ã³</small>ããã
|
|
|-
!120
|ã€ã¯<small>ã³</small>ããã
|
|
|}
ããã¯ãã®ãŸãŸ20é²æ³ãç¶ããŠãããã®ã§ãã
{| class="wikitable"
|+æ²æµã暺倪ãªã©
!æ°
!ã«ã
!ã©ãã³æå
!ããªã«æå
|-
!90
|ã¯<small>ã³</small>ã»ãšã¢ã·ã°ãããã
|
|
|-
!100
|'''ã¢ã·ã°ãããã'''
|
|
|-
!110
|ã¯<small>ã³</small>ãã€ã«ã±ããã¢ã·ã°ãããã
|
|
|-
!120
|ããããã€ã«ã±ããã¢ã·ã°ãããã
|
|
|}
ããã¯100ã§äžåºåããã€ããããã«å ç®ããŠãããã®ã§ãã
{| class="wikitable"
|+å
«é²ã»åž¯åºãªã©
!æ°
!ã«ã
!ã©ãã³æå
!ããªã«æå
|-
!90
|ã¯<small>ã³</small>ã»ãšã¢ã·ã°ãããã / ã¯<small>ã³</small>ã»ãš(ã€ã°)
|
|
|-
!100
|'''(ã·ã)ãã€ã°ããã¢ããã£ã¿ããã·ããã¿<small>ã³</small>ããããã¿<small>ã³</small>ã¯ãçæ§ã
'''
|
|
|-
!110
|ã¯<small>ã³</small>ãã€ã«ã±ãã(ã€ã°)
|
|
|-
!120
|ããããã€ã«ã±ãã(ã€ã°)
|
|
|}
ããã¯100ã§æ°ããªåäœãå°å
¥ãããã®ã§ãã
{| class="wikitable"
|+暺倪ã»æå·ãªã©
!æ°
!ã«ã
!ã©ãã³æå
!ããªã«æå
|-
!90
|
|
|
|-
!100
|
|
|
|-
!110
|
|
|
|-
!120
|
|
|
|}
{| class="wikitable"
|+å®è°·ãªã©
!æ°
!ã«ã
!ã©ãã³æå
!ããªã«æå
|-
!90
|
|
|
|-
!100
|
|
|
|-
!110
|
|
|
|-
!120
|
|
|
|}
åé²æ³ã§ããããŸããŸãªè¡šãæ¹ããããŸãã
== 倧ããªæ° ==
ãããã¢ã€ãèªã®åºæ¬çãª(äºåé²æ³ã䜿ãç¶ãããšãã®)æ°äœç³»ã§ãããšèããããŸãããã®è¡šã§ã¯ã0ã3999ïŒ4000ã¯20Ã20Ã20ïŒãŸã§è¡šããŸãããŸãããã®ã»ãã«å€§ããªæ°ã®è¡šãæ¹ãããå°åããããŸãã
{| class="wikitable"
|+
!
!äžã®äœ
!+
!å(äºå廿)ã®äœ
!+
!äºçŸ(åçŸ)ã®äœ
|-
|
{| class="wikitable"
!0
|ãª<span style="text-emphasis-style: sesame;">ã</span>
|}
|
{| class="wikitable"
!1
|ã·<span style="text-emphasis-style: sesame;">ã</span>
|-
!2
|<span style="text-emphasis-style: sesame;">ãã</span>
|-
!3
|<span style="text-emphasis-style: sesame;">ã¬</span>
|-
!4
|<span style="text-emphasis-style: sesame;">ã€</span>ã
|-
!5
|ã¢<span style="text-emphasis-style: sesame;">ã·</span>ã°ã
|-
!6
|ã€<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>
|-
!7
|<span style="text-emphasis-style: sesame;">ã¢</span>ã»ã¯<small>ã³</small>
|-
!8
|ãã<span style="text-emphasis-style: sesame;">ã</span>ãµ<small>ã³</small>
|-
!9
|ã·<span style="text-emphasis-style: sesame;">ã</span>ããµ<small>ã³</small>
|}
|ã€<span style="text-emphasis-style: sesame;">ã«</span>ã±ã
|
{| class="wikitable"
!10
|<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>
|-
!20
|<span style="text-emphasis-style: sesame;">ã</span>ãã
|-
!30
|<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã»ãš<span style="text-emphasis-style: sesame;">ãã</span>ããã
|-
!40
|ãã<span style="text-emphasis-style: sesame;">ã</span>ãã
|-
!50
|<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã»ãš<span style="text-emphasis-style: sesame;">ã¬</span>ããã
|-
!60
|ã¬<span style="text-emphasis-style: sesame;">ã</span>ãã
|-
!70
|<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã»ãš<span style="text-emphasis-style: sesame;">ã€</span>ãããã
|-
!80
|<span style="text-emphasis-style: sesame;">ã€</span>ãããã
|-
!90
|<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã»ãš<span style="text-emphasis-style: sesame;">ã¢</span>ã·ã°ãããã
|-
!100
|ã¢<span style="text-emphasis-style: sesame;">ã·</span>ã°ãããã
|-
!110
|<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã»ãš<span style="text-emphasis-style: sesame;">ã€</span>ã¯<small>ã³</small>ããã<ref><span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã»<span style="text-emphasis-style: sesame;">ãš</span>ã£ã¯ã³ãããã«ãªãå¯èœæ§ãããã</ref>
|-
!120
|ã€<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ããã
|-
!130
|<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã»ãš<span style="text-emphasis-style: sesame;">ã¢</span>ã»ã¯<small>ã³</small>ããã
|-
!140
|<span style="text-emphasis-style: sesame;">ã¢</span>ã»ã¯<small>ã³</small>ããã
|-
!150
|<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã»ãš<span style="text-emphasis-style: sesame;">ãã</span>ããµ<small>ã³</small>ããã
|-
!160
|ãã<span style="text-emphasis-style: sesame;">ã</span>ãµ<small>ã³</small>ããã
|-
!170
|<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã»ãš<span style="text-emphasis-style: sesame;">ã·</span>ãããµ<small>ã³</small>ããã
|-
!180
|ã·<span style="text-emphasis-style: sesame;">ã</span>ããµ<small>ã³</small>ããã
|-
!190
|<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ã»ãš<span style="text-emphasis-style: sesame;">ã¯</span><small>ã³</small>ããã
|}
|ã€ã«ã±ã
|
{| class="wikitable"
!200
|ã¯<small>ã³</small>ããã
|-
!400
|ã¢ããã£ã¿<ref>ããã§ã¯ãããããããäžïœ€äºæ®µéçšåºŠå€§ããªæ°è©ã§ãããã¢ããã£ã¿ãïŒç€ºãæ°ã¯å°åã«ãã£ãŠç°ãªãïŒã䜿ããŸããããå®éã«400ãšããŠäœ¿ãããŠããããšã確ããããšããããã§ã¯ãããŸããã</ref>
|-
!600
|ã¯<small>ã³</small>ãããã»ãšããã¢ããã£ã¿
|-
!800
|ããã¢ããã£ã¿
|-
!1000
|ã¯<small>ã³</small>ãããã»ãšã¬ã¢ããã£ã¿
|-
!1200
|ã¬ã¢ããã£ã¿
|-
!1400
|ã¯<small>ã³</small>ãããã»ãšã€ãã¢ããã£ã¿
|-
!1600
|ã€ãã¢ããã£ã¿
|-
!1800
|ã¯<small>ã³</small>ãããã»ãšã¢ã·ã°ãã¢ããã£ã¿
|-
!2000
|ã¢ã·ã°ãã¢ããã£ã¿
|-
!2200
|ã¯<small>ã³</small>ãããã»ãšã€ã¯<small>ã³</small>ã¢ããã£ã¿
|-
!2400
|ã€ã¯<small>ã³</small>ã¢ããã£ã¿
|-
!2600
|ã¯<small>ã³</small>ãããã»ãšã¢ã»ã¯<small>ã³</small>ã¢ããã£ã¿
|-
!2800
|ã¢ã»ã¯<small>ã³</small>ã¢ããã£ã¿
|-
!3000
|ã¯<small>ã³</small>ãããã»ãšãããºãµ<small>ã³</small>ã¢ããã£ã¿
|-
!3200
|ãããºãµ<small>ã³</small>ã¢ããã£ã¿
|-
!3400
|ã¯<small>ã³</small>ãããã»ãšã·ãããµ<small>ã³</small>ã¢ããã£ã¿
|-
!3600
|ã·ãããµ<small>ã³</small>ã¢ããã£ã¿
|-
!3800
|ã¯<small>ã³</small>ãããã»ãšã¯<small>ã³</small>ã¢ããã£ã¿ãããã
|}
|}
== åæ°ã»äººæ° ==
æ°ãæ°ãããšãã¯ããããã®æ°è©ããã·ããã¡ãã³(1人ã®å¥³)ãããããããªã°ã«ãš(2人ã®ç·)ãããã¬ãã»ã¿(äžå¹ã®ç¬)ãã®ããã«ãæ°ããããåè©ã®åã«çœ®ããŸããäœãæ°ãããšãã§ã圢ã¯å€ãããŸããã
ãŸããåæ°ãè¡šããã·ãã·ããããã·ããâŠã¢ã·ã°ãã·ããã€ã¯<small>ã³</small>ãºãã¢ã»ã¯<small>ã³</small>ãâŠ<ref>æ¯é³çµãããªãпã·ãp,åé³çµãããªãpeãпÑãä»ãããïŒããã®ããè¡šãèšèãšåããã®ãïŒæšºå€ªæ¹èšã§ã¯ã·ãpã¯ãµã¶ã·ãžã¹xã«å€åããŠããã</ref>ããã人æ°ãè¡šããã·ã<small>ã³</small>ããã<small>ã³</small>ãâŠã¢ã·ã°ã<small>ã³</small>ãã€ã¯ãã¥ãã¢ã»ã¯ãã¥âŠ<ref>æ¯é³çµãããªãnã³Ðœ,åé³çµãããªãiwã€ã¥ÐžÑãä»ããã</ref>ãã䜿ã£ãŠæ°ããããšãã§ããŸãããã®å Žåããã<small>ã³</small>ããã»ãã€ãã·ã(å°ããªå®¶äžæ£)ããããšãŠãããã¢ã·ã°ã<small>ã³</small>(ããªãã®ãå
ãã5人)ããªã©ã®ããã«ãæ°åè©ãåŸã«çœ®ããŸãã
11以äžã®æ°ã§ãæ°è©ãäºã€åºãŠãããšãã¯ããã·ãã·ããã€ã«ã±ããã¯<small>ã³</small>ãºsine''<u>p</u>'' ikasma wan''<u>pe</u>''(11å)ãããã<small>ã³</small>ãã€ã«ã±ããããã<small>ã³</small>tu<u>''n''</u> ikasma hotne<u>''n''</u>(22人)ããã¬ã·ããã€ã«ã±ããã¯ã³ãºã»ãšãããããã·ã re<u>''p''</u> ikasma wan<u>''pe''</u>-etuhotne<u>''p''</u>(33å)ããã€ã¯ãã¥ãã€ã«ã±ããã¯ãã¥ã»ãšã¬ããã<small>ã³</small>iwan<u>''iw''</u> ikasma wan<u>''iw''</u>-erehotne<u>''n''</u>(56人)ãã®ããã«ã1ã2ã-10ã®éšåããã¯<small>ã³</small>ãããããæ°åè©ã«ãªããŸããåæ§ã«ãã11å¹ã®ã¬ãïŒãã£ã/ãµãã<ref>è¡šèšæ³ãéãã ãã§å
šãåããã®ã</ref>capeïŒç«ïŒããªã©ãšããå Žåã¯ããã·ãããã£ããã€ã«ã±ããã¯<small>ã³</small>ããµãããã®ããã«ãããããã®éšåãç¹°ãè¿ããŠèšããŸãã
ãŸããæ¯èŒçå°ãªã人æ°ãæ°ããå Žåãåºæã®åŒã³æ¹ã§åŒã°ããããšããããŸããäžã«ç€ºãããã®ã¯æ²æµæ¹èšã®ãã®ã§ãã
{| class="wikitable"
|+
!人æ°
!ã«ã
!ããªã«
!ã©ãã³
|-
|5
|ã¢ã·ã°
|аÑОк
|asik
|-
|8
|ããã±
|ÑÑпÑÑ
|tupes
|-
|9
|ã·ããã±
|ÑОМÑпÑÑ
|sinepes
|-
|5人
|ãã£ã
|һайМа
|hayna
|-
|8人
|ã<small>ã³</small>ãã€
|һаМпОйа
|hanpiya
|-
|9人
|ã<small>ã³</small>ãã
|һаМÑОкО
|hanciki
|}
åºæ°ïŒé çªïŒã¯ããã€ïœ²ïœªãšïœ/iye-e-ããæ°è©ã®åã«ä»ããŠè¡šããŸããïŒåœç«ã¢ã€ãæ°æåç©é€šã¢ã€ãèªã¢ãŒã«ã€ãããïŒ<blockquote>ãæ¥é ã[i-y-e-e ãã®ã»(æ¿å
¥é³)ã»(ãšäžç·)ã§ã»ã§]âŠçªç®ïœ¡(äºïœ£ä»¥äžã®æ°è©ãšå
±ã«çšãããã) iye-einen ã€ã€ã§ãšã€ãã³ å人ç®ã iye-einep ne ã€ã€ã§ãšã€ãïŸïŸ ã åçªç®ã®ã iye-einep ne ku=poho ã€ã€ã§ãšã€ãïŸïŸ ã ã¯ãã åçªç®ã®æ¯åã iye-eiwan to ã€ã€ã§ãšã€ã¯ã³ ã å
æ¥ç®ïœ¡(ç¥è¬¡) iye-ere pa ã€ã€ã§ãšã¬ ã äžå¹Žç®ïœ¡(æ°è©±) iye-erep ã€ã€ã§ãšã¬ïŸïŸ äžçªç®ã iye-erep ne ã€ã€ã§ãšã¬ïŸïŸã äžçªç®ã®ã iye-ererko ã€ã€ã§ãšã¬ïŸã³[å][i-e-e-rerko ãã®ã»ã§ã»ããã§ã»äžæ¥] äžæ¥ç®ã iye-etup ã€ã€ã§ãšãã¥ïŸïŸ äºçªç®ã a=o uske oro wa iye-erep oro ta ráp=an ã¢ãª ãŠïœŒã± ãªã 㯠ã€ã€ã§ãšã¬ïŸïŸ ãªã ã¿ ã©ãã³ ä¹ã£ãæããäžã€ç®ã§éããŸããã() âåè é»è»ã«ä¹ã£ãŠãã次ã®æ¬¡ã®é§
ã§éããããšãèšã£ãŠããã ä¹ã£ãé§
ãäžã€ç®ãšããŠæ°ããŠããã âçºé³ äºèªã®ã¢ã¯ã»ã³ãã§çºé³ãããã iyé-etú iyé-eréã âåè ãã®ããã« iye-e- ã€ã€ã§ ãš ã䜿ã£ãŠèšãâŠçªç®ïœ£ã®èšãæ¹ã¯ãµãã¢ããã®ã¿ããèããã ã¯ãã±ããã«ããã°ïœ¢âŠçªç®ïœ£ãšããèšãæ¹ã¯ãªã hoski a=ye p, iyos a=ye p, na iyos a=ye p ãã ã¢ã€ã§ïŸïŸïœ€ ã€ãšïœŒ ã¢ã€ã§ïŸïŸïœ€ ã ã€ãšïœŒ ã¢ã€ã§ïŸïŸãæåã«èšã£ãããšïœ€ ãã®åŸã«èšã£ãããšïœ€ ããã«åŸã«èšã£ãããšãã®ããã«èšãã ãããã¯ãã±ããã ç¥è¬¡ã®äžã§ã¯ iye-eiwan to ã€ã€ã§ãšã€ã¯ã³ ããå
æ¥ç®ã®æ¥ãã®ããã«ãã®åœ¢ã䜿ã£ãŠæã£ãŠããã ïŒåºå
žïŒç°æãæ¹èšïŒæ²æµïŒïŒåœç«ã¢ã€ãæ°æåç©é€šã¢ã€ãèªã¢ãŒã«ã€ãããïŒ</blockquote>
== 倧ããªæ°è©äžèŠ§<ref>æ°é£äœè©ã®åœ¢ããåæ°ã»äººæ°ãªã©ãã§ããããããªäœ¿ãæ¹ããã¡ããããã</ref> ==
{| class="wikitable"
|+
!ã«ã
!ããªã«
!ã©ãã³
!ã¢ã©ãã¢æ°å10é²æ³
|-
|ã<small>ã³</small>ãã°
|Ò»ÑМпак
|henpak
|幟ã€ã®ïŒçåè©ïŒ<ref>ãã³ãã°ãºïŒå¹Ÿã€ïŒããã³ããã¥ïŒäœäººïŒã®ã»ãããã³ãã°ãïŒäœå¹ŽïŒãªã©ãšããŠã䜿ãã</ref>
|-
|ã¯ã³ã¯ãã
|кÑМкÑÑÑ
|kunkutu
|10
|-
|ãã
|һПÑ
|hot
|20, 10ïŒåè©ïŒ
|-
|ããã
|һПÑÐœÑ
|hotne
|20, 10
|-
|ã¢ããã£ã¿
|аÑÑйÑа
|atuyta
|10, 40, 100, 200, 1000
|-
|ã€ã°
|Ок
|ik
|20, 100, 1000
|-
|ã¿<small>ã³</small>ã¯
|ÑаМкÑ
|tanku
|100
|}
ããã ãçš®é¡ããããŸããæ°ãäœãèŠåã¯ç¢ºåºãšããŠãããã©ã®æ°è©ã§äœãè¡šãããæç« ã®åé ãªã©ã§æ±ºããŠããã°ãåãè¡šèšã§äºéãã«åããããšãã£ãããšã¯æ±ºããŠèµ·ãããªãããã«ãªã£ãŠããã®ã§èª€è§£ã¯ãªããªããŸãã
== ãªã³ã¯ã»åèæç® ==
[https://eprints.lib.hokudai.ac.jp/dspace/bitstream/2115/80943/1/NoLS11_03_099_IzumiOCHIAI.pdf ã¢ã€ãèªã®æ°è©åè : äºåé²æ³ã«ãããäžæ¹ç®æ³ããäžæ¹ç®æ³ãžã®åãæ¿ã]
ãã¥ãŒãšã¯ã¹ãã¬ã¹ãã¢ã€ãèªïŒäžå·è£ èãçœæ°Žç€ŸïŒ
<references group="åŒçšå
" />
== èš»é ==
<references />
[[ã«ããŽãª:ã¢ã€ãèª|ããã®ããããã]]
[[ã«ããŽãª:æ°]] | 2023-05-10T15:33:59Z | 2024-03-03T08:32:08Z | [] | https://ja.wikibooks.org/wiki/%E3%82%A2%E3%82%A4%E3%83%8C%E8%AA%9E_%E6%95%B0%E3%81%AE%E6%95%B0%E3%81%88%E6%96%B9 |
37,838 | é
çšæ³ç¬¬1æ¡ | (課çšç©ä»¶)
æ¬æ¡ã¯ãé
é¡ã«å¯ŸããŠé
çšã課ããããšãèŠå®ããŠããã
é
çšã«ã¯ä»¥äžã®æ§æ Œãæããã
é
çšã«ã¯ä»¥äžã®ç¹è²ãæããããã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "(課çšç©ä»¶)",
"title": "æ¡æ"
},
{
"paragraph_id": 1,
"tag": "p",
"text": "æ¬æ¡ã¯ãé
é¡ã«å¯ŸããŠé
çšã課ããããšãèŠå®ããŠããã",
"title": "解説"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "é
çšã«ã¯ä»¥äžã®æ§æ Œãæããã",
"title": "解説"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "é
çšã«ã¯ä»¥äžã®ç¹è²ãæããããã",
"title": "解説"
}
] | null | {{Pathnav|æ³åŠ|ç§çšæ³|ã³ã³ã¡ã³ã¿ãŒã«é
çšæ³|frame=1}}
== æ¡æ ==
ïŒèª²çšç©ä»¶ïŒ
; 第1æ¡
: é
é¡ã«ã¯ããã®æ³åŸã«ãããé
çšã課ããã
=== æ§é
çšæ³ ===
; 第1æ¡
: é
é¡ããæ¬æ³ãäŸãªé
çšã²èª²ã¹
== 解説 ==
æ¬æ¡ã¯ã[[w:é
é¡|é
é¡]]ã«å¯ŸããŠ[[w:é
çš|é
çš]]ã課ããããšãèŠå®ããŠããã
=== é
çšã®æ§æ Œ ===
é
çšã«ã¯ä»¥äžã®æ§æ Œãæããã
* [[w:ç§çš#çŽæ¥çšãšéæ¥çš|éæ¥çš]]
* [[w:æ¶è²»çš|æ¶è²»çš]]
* ç©çšïŒå®¢äœçšïŒ
=== é
çšã®ç¹è² ===
é
çšã«ã¯ä»¥äžã®ç¹è²ãæããããã
; 補é å Žç§»åºèª²çšã®åå
: é
çšã¯ãååãšããŠã補é å Žããé
é¡ã移åºããæã«çŽçšçŸ©åãæç«ããã
; å
èš±å¶åºŠ
: é
é¡çã®è£œé ã»è²©å£²æ¥ãè¡ãããšããè
ã¯ãæèœçšå眲é·ã®å
èš±ãäºåã«åããªããã°ãªããªãã
; åŸé課çš
: é
çšæ³ã«ã¯ãé
é¡ããšã«åºæ¬çšçãèšå®ããŠããã補é å Žãã移åºããæ°éããã®èª²çšæšæºãšããŠããã
; è£å®æ³ã®ååš
: é
çšæ³ã®è£å®æ³ãšããŠãé
çšã®ç¢ºä¿ããã³é
é¡ã®ååŒã®å®å®ãå³ãããšãç®çãšããã[[w:é
çšã®ä¿å
šåã³é
é¡æ¥çµåçã«é¢ããæ³åŸ|é
çšã®ä¿å
šåã³é
é¡æ¥çµåçã«é¢ããæ³åŸ]]ãïŒæå28幎2æ28æ¥æ³åŸç¬¬7å·ïŒãååšããã
== è泚 ==
{{reflist}}
== åèæç® ==
* {{Cite book|åæž|author=å¯å·æ³°æ¬|date=2023-08-29|title=å³è§£ é
çš|edition=什å5幎ç|publisher=倧èµè²¡ååäŒ|isbn=9784754731311}}
{{stub}}
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«é
çšæ³|é
çšæ³]]
|第1ç« ç·å
|-
|[[é
çšæ³ç¬¬2æ¡]]<br />ïŒé
é¡ã®å®çŸ©åã³çš®é¡ïŒ
}}
[[category:é
çšæ³|01]] | 2023-05-11T13:25:50Z | 2023-10-14T10:57:00Z | [
"ãã³ãã¬ãŒã:Stub",
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Pathnav",
"ãã³ãã¬ãŒã:Reflist",
"ãã³ãã¬ãŒã:Cite book"
] | https://ja.wikibooks.org/wiki/%E9%85%92%E7%A8%8E%E6%B3%95%E7%AC%AC1%E6%9D%A1 |
37,839 | é
çšæ³ç¬¬2æ¡ | (é
é¡ã®å®çŸ©åã³çš®é¡)
(é
é¡ã®å®çŸ©åã³çš®é¡)
æ¬æ¡ã¯ãé
é¡ã®å®çŸ©ã«ã€ããŠèŠå®ããŠããã
ãé
é¡ããšã¯ãã¢ã«ã³ãŒã«å1床(ã¢ã«ã³ãŒã«åºŠæ°1%)以äžã®é£²æãããããã¢ã«ã³ãŒã«å1床以äžã®é£²æãã«ã¯ãèããŠã¢ã«ã³ãŒã«å1床以äžã®é£²æãšããããšãã§ãããã®ã溶解ããŠã¢ã«ã³ãŒã«å1床ç°åžžã®é£²æãšããããšãã§ããç²æ«ç¶ã®ãã®ãå«ãã
ã飲æãã«è©²åœãããã©ããã®å€æåºæºãšããŠãäžèšã®ãããªè£å€äŸãããã | [
{
"paragraph_id": 0,
"tag": "p",
"text": "(é
é¡ã®å®çŸ©åã³çš®é¡)",
"title": "æ¡æ"
},
{
"paragraph_id": 1,
"tag": "p",
"text": "(é
é¡ã®å®çŸ©åã³çš®é¡)",
"title": "æ¡æ"
},
{
"paragraph_id": 2,
"tag": "p",
"text": "æ¬æ¡ã¯ãé
é¡ã®å®çŸ©ã«ã€ããŠèŠå®ããŠããã",
"title": "解説"
},
{
"paragraph_id": 3,
"tag": "p",
"text": "ãé
é¡ããšã¯ãã¢ã«ã³ãŒã«å1床(ã¢ã«ã³ãŒã«åºŠæ°1%)以äžã®é£²æãããããã¢ã«ã³ãŒã«å1床以äžã®é£²æãã«ã¯ãèããŠã¢ã«ã³ãŒã«å1床以äžã®é£²æãšããããšãã§ãããã®ã溶解ããŠã¢ã«ã³ãŒã«å1床ç°åžžã®é£²æãšããããšãã§ããç²æ«ç¶ã®ãã®ãå«ãã",
"title": "解説"
},
{
"paragraph_id": 4,
"tag": "p",
"text": "ã飲æãã«è©²åœãããã©ããã®å€æåºæºãšããŠãäžèšã®ãããªè£å€äŸãããã",
"title": "解説"
}
] | null | {{Pathnav|æ³åŠ|ç§çšæ³|ã³ã³ã¡ã³ã¿ãŒã«é
çšæ³|frame=1}}
== æ¡æ ==
ïŒé
é¡ã®å®çŸ©åã³çš®é¡ïŒ
; 第2æ¡
# ãã®æ³åŸã«ãããŠãé
é¡ããšã¯ãã¢ã«ã³ãŒã«å1床以äžã®é£²æïŒèããŠã¢ã«ã³ãŒã«å1床以äžã®é£²æãšããããšãã§ãããã®ïŒã¢ã«ã³ãŒã«åã90床以äžã®ã¢ã«ã³ãŒã«ã®ãã¡ã第7æ¡ç¬¬1é
ã®èŠå®ã«ããé
é¡ã®è£œé å
èš±ãåããè
ãé
é¡ã®åæãšããŠåœè©²è£œé å
èš±ãåãã補é å Žã«ãããŠè£œé ãããã®ä»¥å€ã®ãã®ãé€ããïŒåã¯æº¶è§£ããŠã¢ã«ã³ãŒã«å1床以äžã®é£²æãšããããšãã§ããç²æ«ç¶ã®ãã®ãå«ããïŒãããã
# é
é¡ã¯ãçºæ³¡æ§é
é¡ãéžé é
é¡ãèžçé
é¡åã³æ··æé
é¡ã®4çš®é¡ã«åé¡ããã
: <small>ïŒæå34幎3ææ³åŸç¬¬54å·æ¹æ£<ref>{{Cite web|url=https://www.shugiin.go.jp/internet/itdb_housei.nsf/html/houritsu/03119590328054.htm|title=æ³åŸç¬¬äºååå·ïŒæäžåã»äžã»äºå
«ïŒ|publisher=è¡è°é¢|accessdate=2023-10-14}}</ref>ãæå37幎3ææ³åŸç¬¬47å·æ¹æ£<ref>{{Cite web|url=https://www.shugiin.go.jp/internet/itdb_housei.nsf/html/houritsu/04019620331047.htm|title=æ³åŸç¬¬ååäžå·ïŒæäžäžã»äžã»äžäžïŒ|publisher=è¡è°é¢|accessdate=2023-10-14}}</ref>ãæå56幎3ææ³åŸç¬¬5å·æ¹æ£<ref>{{Cite web|url=https://www.shugiin.go.jp/internet/itdb_housei.nsf/html/houritsu/09419810331005.htm|title=æ³åŸç¬¬äºå·ïŒæäºå
ã»äžã»äžäžïŒ|publisher=è¡è°é¢|accessdate=2023-10-14}}</ref>ãå¹³æ18幎3æ第10å·å
šéšæ¹æ£<ref>{{Cite web|url=https://www.shugiin.go.jp/internet/itdb_housei.nsf/html/housei/16420060331010.htm|title=æ³åŸç¬¬åå·ïŒå¹³äžå
«ã»äžã»äžäžïŒ|publisher=è¡è°é¢|accessdate=2023-10-14}}</ref>ïŒ</small>
=== æ¹æ£å ===
==== æå28幎2æ28æ¥æ³åŸç¬¬6å· ====
ïŒé
é¡ã®å®çŸ©åã³çš®é¡ïŒ
; 第2æ¡
# ãã®æ³åŸã«ãããŠãé
é¡ããšã¯ãã¢ã«ã³ãŒã«å1床以äžã®é£²æïŒããããŠé£²æãšããããšãã§ãããã®ãå«ã¿ãã¢ã«ã³ãŒã«å°å£²æ³ïŒæå12幎æ³åŸç¬¬32å·ïŒã®èŠå®ã®é©çšãåããã¢ã«ã³ãŒã«ãé€ããïŒãããã
# é
é¡ã¯ãæž
é
ãåææž
é
ãæ¿é
ãçŒã¡ãããå³ãããçœé
ãããŒã«ãæå®é
åã³éé
ã®9çš®é¡ã«åé¡ããã
=== æ§é
çšæ³ ===
; 第2æ¡
: æ¬æ³ãæŒãé
é¡ããã¢ã«ã³ãŒã«å1床以äžã飲æã²è¬ããäœã·ã¢ã«ã³ãŒã«å°å£²æ³ãé©çšã²åã¯ã«ã¢ã«ã³ãŒã«ã²é€ã¯
: æ¬æ³ãæŒãã¢ã«ã³ãŒã«åããææ°15床ãæãæŒãå容é100åäžãå«æã¹ã«0.7947ãæ¯éã²æã¹ã«ã¢ã«ã³ãŒã«ã容éã²è¬ã
; 第3æ¡
: é
é¡ã²åããæž
é
ãåææž
é
ãçšé
ãçœé
ãå³æ·ãçŒé
ã麊é
ãæå®é
åéé
ãã¹
== 解説 ==
æ¬æ¡ã¯ã[[w:é
é¡|é
é¡]]ã®å®çŸ©ã«ã€ããŠèŠå®ããŠããã
ãé
é¡ããšã¯ã[[w:ã¢ã«ã³ãŒã«åºŠæ°|ã¢ã«ã³ãŒã«å]]1床ïŒã¢ã«ã³ãŒã«åºŠæ°1%ïŒä»¥äžã®é£²æãããããã¢ã«ã³ãŒã«å1床以äžã®é£²æãã«ã¯ãèããŠã¢ã«ã³ãŒã«å1床以äžã®é£²æãšããããšãã§ãããã®ã溶解ããŠã¢ã«ã³ãŒã«å1床ç°åžžã®é£²æãšããããšãã§ããç²æ«ç¶ã®ãã®ãå«ãã
ã飲æãã«è©²åœãããã©ããã®å€æåºæºãšããŠãäžèšã®ãããªè£å€äŸãããã
* ãâŠâŠé£²çšã«äŸããããšãäž»ããç®çãšãããã®ã§ã¯ãªãããã©ãã人ãããã飲ãã§æ¯ã§ãªãããã€ãäžå¿«æãã䌎ããã飲çšã«äŸãåŸããã液äœã§ããããšãèªãåŸãããã®ã§ãããããé
çšæ³ç¬¬2æ¡ç¬¬1é
ã«ããããã飲æãã«è©²åœãããã®ãšãããªããã°ãªããªãã<ref>æ±äº¬é«çè£å€æ第äžãåäºéšãæå32幎2æ23æ¥ãæå31幎ïŒãïŒç¬¬2453å·ãã[https://www.courts.go.jp/app/hanrei_jp/detail3?id=21496 é
çšæ³éå被åäºä»¶]ããé«è£å€äŸé10å·»1å·94é ã</ref>ã
* ãâŠâŠé
é¡ãšã¯ã¢ã«ã³ãŒã«å1床以äžãå«æãã飲æã§ããããâŠâŠé
é¡ãå€å³åã¯è
æã®èãããå Žåããããé²ãããå³ã¡é
é¡ä¿åã®ããã«çŒé
ã¢ã«ã³ãŒã«å氎以å€ã®ç©åãæ··åããããšãããã®ã¯é
çšæ³âŠâŠã®èŠå®ã«åŸŽããŠçªºããããšããã§ããæ¯æ§ãªç°ç©ãæ··åãããã®ã¯çŽã¡ã«é£²æã«ã¯äŸãé£ããã®ãããããã©ãå°æ¥è©²ç°ç©ã®é€å»ãã®ä»ã®åŠçã«ããªé£²æã«äŸããããšã®ã§ããå¯èœæ§ãããããé
çšæ³äžã«ãããŠã¯ç¶ãé
é¡ãšããŠæ±ããã®ãšè§£ããªããã°ãªããªãã®ã§ããã<ref>é«æŸé«çè£å€æ第äžéšãæå27幎5æ2æ¥ãæå26幎ïŒãïŒç¬¬917å·ãã[https://www.courts.go.jp/app/hanrei_jp/detail3?id=24640 é
çšæ³éåéå被åäºä»¶]ããé«è£å€äŸé5å·»6å·920é ã</ref>ã
== åç
§æ¡æ ==
* [[é
çšæ³ç¬¬3æ¡]]ïŒãã®ä»ã®çšèªã®å®çŸ©ïŒ
* [[é
çšæ³ç¬¬7æ¡]]ïŒé
é¡ã®è£œé å
èš±ïŒ
== å€äŸ ==
* æé«è£å€æ第äžå°æ³å»·æ±ºå®ãæå26幎8æ9æ¥ãæå25幎ïŒãïŒç¬¬2976å·ãã[https://www.courts.go.jp/app/hanrei_jp/detail2?id=67452 é
çšæ³éå]ããæé«è£å€æè£å€éåäº51å·811é ã
* æé«è£å€æ第äžå°æ³å»·å€æ±ºãæå27幎12æ9æ¥ãæå26幎ïŒãïŒç¬¬3449å·ãã[https://www.courts.go.jp/app/hanrei_jp/detail2?id=75157 é
çšæ³éå]ããæé«è£å€æè£å€éåäº70å·297é ã
* æé«è£å€æ第äºå°æ³å»·æ±ºå®ãæå32幎4æ12æ¥ãæå29幎ïŒãïŒç¬¬1806å·ãã[https://www.courts.go.jp/app/hanrei_jp/detail2?id=58560 é
çšæ³éå]ããæé«è£å€æè£å€éåäº118å·857é ã
* æé«è£å€æ第äžå°æ³å»·æ±ºå®ãæå35幎4æ12æ¥ãæå32幎ïŒãïŒç¬¬799å·ãã[https://www.courts.go.jp/app/hanrei_jp/detail2?id=51587 é
çšæ³éå]ããæé«è£å€æåäºå€äŸé14å·»5å·574é ã
== è泚 ==
{{reflist}}
== åèæç® ==
* {{Cite book|åæž|author=å¯å·æ³°æ¬|date=2023-08-29|title=å³è§£ é
çš|edition=什å5幎ç|publisher=倧èµè²¡ååäŒ|isbn=9784754731311}}
{{stub}}
{{ååŸ
|[[ã³ã³ã¡ã³ã¿ãŒã«é
çšæ³|é
çšæ³]]
|第1ç« ç·å
|[[é
çšæ³ç¬¬1æ¡]]<br />ïŒèª²çšç©ä»¶ïŒ
|[[é
çšæ³ç¬¬3æ¡]]<br />ïŒãã®ä»ã®çšèªã®å®çŸ©ïŒ
}}
[[category:é
çšæ³|02]] | 2023-05-11T13:25:55Z | 2023-10-14T14:16:52Z | [
"ãã³ãã¬ãŒã:Reflist",
"ãã³ãã¬ãŒã:Cite book",
"ãã³ãã¬ãŒã:Stub",
"ãã³ãã¬ãŒã:ååŸ",
"ãã³ãã¬ãŒã:Pathnav"
] | https://ja.wikibooks.org/wiki/%E9%85%92%E7%A8%8E%E6%B3%95%E7%AC%AC2%E6%9D%A1 |
Subsets and Splits