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: 30ms

DB GetPage 3
Generate Html 8
SaveChanges (1) 10
Render Body 0
Render Sidebar 6