Table.clear - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : OpenMaple : Java Application Programming Interface : Table Class : OpenMaple/Java/Table/clear

Table.clear

clear the table

 

Calling Sequence

Description

Examples

Calling Sequence

boolean clear( )

Description

• 

The clear function removes all elements from the Table.

Examples

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();

        System.out.println( "Size of table: " + t.numElements() );

    }

}

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