Garry's Mod Wiki

unpack

vararg unpack( table tbl, number startIndex = 1, number endIndex = #tbl )

Description

This function takes a numeric indexed table and return all the members as a vararg. If specified, it will start at the given index and end at end index.

Arguments

1 table tbl
The table to generate the vararg from.
2 number startIndex = 1
Which index to start from. Optional.
3 number endIndex = #tbl
Which index to end at. Optional, even if you set StartIndex.

Returns

1 vararg
Output values

Example

Prints a vararg

print( unpack({"a", "b", "c"}) )
Output: a b c

Page Links


Special Pages


Wikis

?

Render Time: 36ms

Session 0
DB GetPage 3
Generate Html 12
SaveChanges 13
Render Body 0
Render Sidebar 7