table.Add

From GMod Wiki

Jump to: navigation, search
Function
Syntax table.Add( Table destination table, Table source table )
Where is this used?
Description:
Inserts the contents of a table into another table.
Returns: Table destination table
Part of Library: Table
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Table.Add]Table.Add [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionAdd a table into another table.
Used onNewerShared.png
Code
test_table = {"this","that","and the other"} // Define the destination table.
test_table_2 = {"alpha","beta","gamma"} // Define the source table.
table.Add(test_table,test_table_2)
print(table.concat(test_table," ")) // Prints "this that and the other alpha beta gamma" to the console.
OutputPrints a string to the console.


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox