[ create a new paste ] login | about

Link: http://codepad.org/oDmVZ209    [ raw code | output | fork ]

Lua, pasted on Oct 13:
1
2
3
4
5
6
7
8
9
10
11
12
function Call( ... )
    -- All passed arguments are stored in a default table named arg
    table.foreach( arg, print )
end

Call( "hey" )
print( "Call ended" )
Call( 1 )
print( "Call ended" )
Call()
print( "Call ended" )
Call( "sth", 1, 2, 6, "yo", "test" )


Output:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
1	hey
n	1
Call ended
1	1
n	1
Call ended
n	0
Call ended
1	sth
2	1
3	2
4	6
5	yo
6	test
n	6


Create a new paste based on this one


Comments: