Table.clear
clear the table
Calling Sequence
Description
Examples
boolean clear( )
The clear function removes all elements from the Table.
import com.maplesoft.openmaple.*;
import com.maplesoft.externalcall.MapleException;
class Example
{
public static void main( String notused[] ) throws MapleException
String[] mapleArgs = { "java" };
Engine engine = new Engine( mapleArgs, new EngineCallBacksDefault(), null, null );
Table t = (Table)engine.evaluate( "table([1=100,2=200,3=300,4=400]):" );
System.out.println( "Size of table: " + t.numElements() );
t.clear();
}
Executing this code produces the following output.
Size of table: 4
Size of table: 0
See Also
ExternalCalling/Java/MapleException
OpenMaple
OpenMaple/Java/Algebraic
OpenMaple/Java/API
OpenMaple/Java/Table
OpenMaple/Java/Table/assign
OpenMaple/Java/Table/remove
OpenMaple/Java/Table/select
Download Help Document