mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-08 15:34:09 +00:00
Updated file to display table contents
This commit is contained in:
parent
206c650689
commit
3da26860b7
@ -212,13 +212,14 @@ print("********************************************")
|
||||
|
||||
print("****************OS Functions *******")
|
||||
fruits = {"banana","orange","apple"}
|
||||
print("Table contents are ",fruits)
|
||||
print("Table contents are ")
|
||||
for key,value in ipairs(fruits) do print(value) end
|
||||
print("Concatenated string ",table.concat(fruits))
|
||||
print("Concatenated string ",table.concat(fruits,", "))
|
||||
print("Concatenated string ",table.concat(fruits,", ", 2,3))
|
||||
print("Inserting new fruit Mango")
|
||||
table.insert(fruits,"mango")
|
||||
print("Fruit table now is",fruits)
|
||||
for key,value in ipairs(fruits) do print(value) end
|
||||
print("Concatenated string ",table.concat(fruits,", "))
|
||||
print("The maximum elements in table is",table.maxn(fruits))
|
||||
print("The maximum elements in table is",table.remove(fruits))
|
||||
|
Loading…
Reference in New Issue
Block a user