美文网首页
Two dimensional matrices

Two dimensional matrices

作者: 余绕 | 来源:发表于2020-04-21 15:54 被阅读0次
@probes=(   #array with Anonymous array @开头,用()括起来
[1,3,2,9],
[2,0,8,1],
[5,4,6,7],
[1,9,2,8],
);

print "the probe at row 1,column 2 has value ",$probes[1][2],"\n";



$pro=[        #Anonymous array with anonymous arrays 必须$开头,用[]括起来
[1,3,2,9],
[2,0,8,1],
[5,4,6,7],
[1,9,2,8],
];

print "the probe at row 3,column 2 has value ",$$pro[3][2],"\n"; #引用要用$$或者下面方式$pro->[$i][$j]


print "the probe at row 3,column 2 has value ",$pro->[3][2],"\n";

相关文章

网友评论

      本文标题:Two dimensional matrices

      本文链接:https://www.haomeiwen.com/subject/gjzuihtx.html