Goè¨èªã®Arrayã¨Sliceã«ã¤ã㦠調ã¹ããã³ã«å¿ããã®ã§ã¡ã¢ãã¦ããã¾ãã åºæ¬çã«Go Slices: usage and internals ã«åºãã¦ãã¾ãããã¨ãããã»ã¨ãã©ç´è¨³ã§ãã Introduction Sliceã¯ä»ã®è¨èªã®Arrayã«ä¼¼ã¦ããããéãé¨åãããã Arrays Sliceåã¯Goè¨èªã«ãããArrayåã®æ½è±¡çãªãã®ã§ããã Arrayåã¯é·ã(length)ã¨è¦ç´ (element)ã®åãæããã«ãããã®ã§ããã ä¸ã®ä¾ã§ã[4]intã¯4ã¤ã®intåãããªãArrayåã§ããã é·ãã¯åã®ä¸é¨åã§ãã([4]int != [5]int)ã var a [4]int a[0] = 1 i := a[0] // i == 1 Goè¨èªã§ã¯ãArrayåã¯zero valueã§åæåããã¦ãã¦ãããã«ä½¿ããã a[2] == 0 Goè¨èªã®Arrayã¯
{{#tags}}- {{label}}
{{/tags}}