éçºè ã¢ã«ã¦ã³ãã«éãåºããªã貧ä¹äººã®æ¹ã ãã次㮠Apple ã® Swift ã®ã³ã¼ãã®æåãããããªããã¨ããã®ã§çãä¸ãã£ã¦ããã¾ã: let a = [1,2] // a = [1,2] var b = a; // b = [1,2] b[1] = 3; // a = [1,3] b = [1,3] b.append(5); // a = [1,3] b = [1,3,5] b[1] = 4; // a = [1,3] b = [1,4,5]ãã¡ãããããã貧ä¹ã§ãããããããããçä¸æ¡ä»¶ãå¾ ã£ã¦ããããã§ããããã¯ããããããããããªããæ¥ããã ã ããã b[1] = 3 ã¨ãã㨠a[1] ãå¤åããããããããããªãã¨ãã人 b[1] = 4 ã¨ãã㨠a[1] ãå¤åããªãããããããããªãã¨ãã人 äºç¨®é¡ããããã§ããç§ã¯ã¾ãã b[1] ã«ä»£å ¥ã§ãããã¨ããããã¾ãã
{{#tags}}- {{label}}
{{/tags}}