Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
Table.remove - remove the element associated with a key
Calling Sequence
void remove( Algebraic key ) throws MapleException
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.
Examples
import com.maplesoft.openmaple.*;
import com.maplesoft.externalcall.MapleException;
class Example
{
public static void main( String notused[] ) throws MapleException
String mapleArgs[];
Engine engine;
Table t;
Numeric n;
mapleArgs = new String[1];
mapleArgs[0] = "java";
engine = new Engine( mapleArgs, new EngineCallBacksDefault(),
null, null );
t = (Table)engine.evaluate( "table([(1)=100,(2)=200,(3)=300,(4)=400]):" );
n = engine.newNumeric( 1 );
System.out.println( t.has( n ) );
t.remove( n );
n = engine.newNumeric( 2 );
n = engine.newNumeric( 3 );
t.remove( engine.newNumeric( 10 ) );
}
Executing this code produces the following output.
true
false
See Also
ExternalCalling/Java/MapleException, OpenMaple, OpenMaple/Java/Algebraic, OpenMaple/Java/API, OpenMaple/Java/Table, OpenMaple/Java/Table/assign, OpenMaple/Java/Table/has, OpenMaple/Java/Table/select
Download Help Document