^iiEcoo'x_) Posted February 1, 2018 Share Posted February 1, 2018 سلام عليكم كيف أجيب القيم الموجودة في الجدول ؟ Table = { [ 1 ] = { [ 1 ] = { x } } , [ 2 ] = { [ 1 ] = { x } } } مثلا بجيب عدد الفيم الموجودة في Table #Table [ 1 ] وذا ابي اجيب القيم الموجودة في ذا Table [ 1 ] [ 1 ] كذا ؟ #Table [ 1 ] [ 1 ] ولا م يزبط ؟ Link to comment
Rockyz Posted February 2, 2018 Share Posted February 2, 2018 local k = { {1, 3, 4}, {9, 59, 1, 4, 6}, {0, 1, 0, 4, 3}, {{2, 4}, {1, 2, 3, 4}}, {}, 'HI', } print(#k) -- 6 print(#k[1]) -- 3 print(#k[2]) -- 5 print(#k[3]) -- 5 print(#k[4]) -- 2 print(#k[4][1]) -- 2 print(#k[4][2]) -- 4 print(#k[5]) -- 0 print(#k[6]) -- 2 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now