table copy table
This function makes one or more copies of the specified table with all contents. If the specified new tables are already existing, then they will be cleared first.
Indirect parameter passing is disabled
Min 2
No. | Type | Description |
---|---|---|
1. input |
string | Name of existing table |
2 ... input |
string | Name of new table |
table initialize( t, {{ Name, Age }, { Ann, 45 }, { Dan, 35 }} );
table copy table ( t, u, v );
echo("Listing tables u and v");
table list ( u );
table list ( v );
// Do the same with multiple table names in parameters
table copy table( t, {a, b}, c, {d, e} );
echo("List one table: e");
table list ( e );
echo("Checkif tables a...f are existing");
echo( table existing( {a..f} ) );
Listing tables u and v
0 : Name | Age
1 : Ann | 45
2 : Dan | 35
0 : Name | Age
1 : Ann | 45
2 : Dan | 35
List one table: e
0 : Name | Age
1 : Ann | 45
2 : Dan | 35
Checkif tables a...f are existing
{true,true,true,true,true,false}