lua中 table.getn(t) 、#t、 table.maxn(t) 这三个什么区别?求高人指导.RTlocal t = {1,888,x= 999,b=2,5,nil,6,7,[10]=1,8,{z = 1,y = 1},nil,nil}print(table.getn(t))print(#t)print(table.maxn(t))输出:8 8 8------------如果把[10] =1 改
来源:学生作业帮助网 编辑:作业帮 时间:2024/08/17 15:57:01
![lua中 table.getn(t) 、#t、 table.maxn(t) 这三个什么区别?求高人指导.RTlocal t = {1,888,x= 999,b=2,5,nil,6,7,[10]=1,8,{z = 1,y = 1},nil,nil}print(table.getn(t))print(#t)print(table.maxn(t))输出:8 8 8------------如果把[10] =1 改](/uploads/image/z/13747928-32-8.jpg?t=lua%E4%B8%AD+table.getn%28t%29+%E3%80%81%23t%E3%80%81+table.maxn%28t%29+%E8%BF%99%E4%B8%89%E4%B8%AA%E4%BB%80%E4%B9%88%E5%8C%BA%E5%88%AB%3F%E6%B1%82%E9%AB%98%E4%BA%BA%E6%8C%87%E5%AF%BC.RTlocal+t+%3D+%7B1%2C888%2Cx%3D+999%2Cb%3D2%2C5%2Cnil%2C6%2C7%2C%5B10%5D%3D1%2C8%2C%7Bz+%3D+1%2Cy+%3D+1%7D%2Cnil%2Cnil%7Dprint%28table.getn%28t%29%29print%28%23t%29print%28table.maxn%28t%29%29%E8%BE%93%E5%87%BA%EF%BC%9A8+8+8------------%E5%A6%82%E6%9E%9C%E6%8A%8A%5B10%5D+%3D1+%E6%94%B9)
xSNA~I@bwƘ!)m5&((?VPQ@ әWnv3s79;g|荂:R@((
!Յ~V*zye6[]vMNR/Zuf%NL^TBHE2Z+,h||\naLυ\Feo) Kb[D@^.ns~g/;uE}kϋ}5Z-LDhmډI7dҢ{PvJcMmNIAHRx5q
G|dYed/
? jp{4$84;^4Y"ޓ:}WUfQ7 ސY,ab &ˏ I:;QhTY 9FՌX !@烪b`33
I
85FZNDo`cNk( 4Ize6"[bO^0*(3<ӲsanVNi 5vˣ ) .2IqBEHNt(H#7ƶ=}<