プログラム言語

6c291f80 anonymous 2011-03-10 14:27
>>82e0b2fa

が、連想配列のクローンはその方法では出来なかった。

PS H:\> function test($o){return $o}
PS H:\> $a=@{}
PS H:\> $a["hello"] = "world"
PS H:\> $a

Name                           Value
----                           -----
hello                          world


PS D:\path> $b=test($a)
PS D:\path> $b

Name                           Value
----                           -----
hello                          world


PS D:\path> $a["hi"] = "universe"
PS D:\path> $a

Name                           Value
----                           -----
hi                             universe
hello                          world


PS D:\path> $b

Name                           Value
----                           -----
hi                             universe
hello                          world


どういう仕様なのだろうか?

Top of this page. | <<last 0 1 2

limit: 15360KB

(プログラム言語/244/0.1MB)

Powered by shinGETsu.