Maple für Professional
Maple für Akademiker
Maple für Studenten
Maple Personal Edition
Maple Player
Maple Player für iPad
MapleSim für Professional
MapleSim für Akademiker
Maple T.A. - Testen & beurteilen
Maple T.A. MAA Placement Test Suite
Möbius - Online-Courseware
Machine Design / Industrial Automation
Luft- und Raumfahrt
Fahrzeugtechnik
Robotics
Energiebranche
System Simulation and Analysis
Model development for HIL
Anlagenmodelle für den Regelungsentwurf
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematikausbildung
Technik
Allgemein- und berufsbildende Schulen
Testen und beurteilen
Studierende
Finanzmodelle
Betriebsforschung
Hochleistungsrechnen
Physik
Live-Webinare
Aufgezeichnete Webinare
Geplante Veranstaltungen
MaplePrimes
Maplesoft-Blog
Maplesoft-Mitgliedschaft
Maple Ambassador Program
MapleCloud
Technische Whitepapers
E-Mail Newsletters
Maple-Bücher
Math Matters
Anwendungs-Center
MapleSim Modell-Galerie
Anwenderberichte
Exploring Engineering Fundamentals
Lehrkonzepte mit Maple
Maplesoft Welcome-Center
Resource-Center für Lehrer
Help-Center für Studierende
Procedure.execute - execute a Maple procedure
Calling Sequence
Algebraic execute( ) throws MapleException
Algebraic execute( Expseq eArgs ) throws MapleException
Algebraic execute( Algebraic aArgs[] ) throws MapleException
Parameters
eArgs
-
expression sequence of arguments to the procedure
aArgs
array of Algebraic objects to be used as arguments to the procedure
Description
The execute function executes the procedure represented by the Procedure object with the given arguments.
The result of the procedure call is returned as an Algebraic object.
Examples
import com.maplesoft.openmaple.*;
import com.maplesoft.externalcall.MapleException;
class Example
{
public static void main( String notused[] ) throws MapleException
String mapleArgs[];
Engine engine;
Procedure p;
Algebraic args[];
Expseq e;
mapleArgs = new String[1];
mapleArgs[0] = "java";
engine = new Engine( mapleArgs, new EngineCallBacksDefault(),
null, null );
p = (Procedure)engine.evaluate( "proc( ) return Pi; end proc:" );
System.out.println( p.execute() );
System.out.println( p.executehf() );
p = (Procedure)engine.evaluate( "proc( x,y,z ) return (x+y)/z; end proc:" );
args = new Algebraic[3];
args[0] = engine.newNumeric( 100 );
args[1] = engine.newNumeric( 900 );
args[2] = engine.newNumeric( 15 );
System.out.println( p.execute( args ) );
p = (Procedure)engine.evaluate( "proc( x ) return sin(Pi*x); end proc:" );
e = engine.newExpseq( 1 );
e.assign( 1, engine.newNumeric( 1000 ) );
e = (Expseq)e.unique();
}
Executing this code produces the following output.
Pi
3.141592653589793
200/3
0
See Also
ExternalCalling/Java/MapleException, OpenMaple, OpenMaple/Java/Algebraic, OpenMaple/Java/API, OpenMaple/Java/Procedure, OpenMaple/Java/Procedure/executehf
Download Help Document