table create, table create if not existing
These function create new tables without any contents (0 rows, 0 columns).
table create creates new table if they do not yet exist, or initializes existing tables
table create if not existing will not touch the tables which are already existing.
Indirect parameter passing is enabled
Min. 1
No. | Type | Description |
---|---|---|
Min. 1 input |
string | Name of new table Both existing and non-existing table names are allowed. |
Type | Description |
---|---|
numeral | Number of tables created or initialized With the function table create if not existing, tables already existing will not be counted. -1 is returned in case of memory allocation exceptions (very rare cases, if at all). |
r1[] = table create( table 1, table 2 );
r2[] = table create if not existing( { table 2, table 4 } ); // Indirect parameter passing
echo("count 1: ", r1[], " count 2: ", r2[] );
for all ( {table 0 .. table 5}, t[] )
{
print( table existing( t[] ), ", " );
}
echo; // new line
count 1: 2 count 2: 2
false, true, true, false, true, false,