clear - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


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

 


Download Help Document