unpack

From Garry's Mod
Jump to: navigation, search
 unpack( )

Contents

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

table tbl

The table to generate the vararg from.

Arguments

number startIndex=1

Which index to start from. Optional.

Arguments

number endIndex=#tbl

Which index to end at. Optional, even if you set StartIndex.

Returns

vararg

Output values

Examples

Example

Prints a vararg

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

Output:

a b c
Personal tools
Navigation