 remove - Maple Help

Table.remove

remove the element associated with a key Calling Sequence void remove( Algebraic key ) Parameters

 key - index of the element to access Description

 • The remove function removes the Algebraic object associated with key from the Table. If no element is associated with key, no error is raised.
 • This function is identical to unassign except that it does not throw a MapleException. 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]):" ); Numeric n = engine.newNumeric( 1 ); System.out.println( t.has( n ) ); t.remove( n ); System.out.println( t.has( n ) ); n = engine.newNumeric( 2 ); System.out.println( t.has( n ) ); t.remove( n ); System.out.println( t.has( n ) ); n = engine.newNumeric( 3 ); System.out.println( t.has( n ) ); t.remove( n ); System.out.println( t.has( n ) ); t.remove( engine.newNumeric( 10 ) ); } }

Executing this code produces the following output.

 true false true false true false