table clear ...

Prev Next

Function Names

table clear

Description

This function clears existing tables so they contain 0 rows and 0 coluns.

Call as: procedure

Restrictions

Indirect parameter passing is enabled

Parameter count

Min. 1

Parameters

No.TypeDescription
Min. 1
input
string name of existing table

Both existing and non-existing table names are allowed.

Examples

      table initialize( t1, { { Name, Street, Nr }, { Alex, Main St., 231 }} );
      echo("Initialized table:");
      table list( t1 );
      table clear( t1 );
      echo("Cleared table:");
      table list ( t1 ); // Nothing to list

Output

Initialized table:
    0 : Name | Street   | Nr
    1 : Alex | Main St. | 231

Cleared table:
Try it yourself: Open LIB_Function_table_clear.b4p in B4P_Examples.zip. Decompress before use.

See also

table create
table delete