trying to use return function to return a table
returning a table
Started by SpencerBeige, Dec 30 2014 12:27 AM
4 replies to this topic
#1
Posted 30 December 2014 - 12:27 AM
#2
Posted 30 December 2014 - 12:33 AM
slow-coder, on 30 December 2014 - 12:27 AM, said:
-snip
A few examples of returning a table from a function
function func1()
return {"entry1","entry2"}
end
func1table = func1()
tbl = {"entry1","entry2"}
function func2()
return tbl
end
func2table = func2()
I know my variable names are extremely descriptive.
Edited by valithor, 30 December 2014 - 12:47 AM.
#3
Posted 30 December 2014 - 12:37 AM
thx
#4
Posted 30 December 2014 - 12:51 AM
wuht about reading a table from an api?
#5
Posted 30 December 2014 - 02:59 AM
What do you mean by "reading a table"? If you mean returning a table, exactly the same way. Just make a function in your api that returns the table.
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users











