evaluate an Algebraic expression - Maple Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Programming : OpenMaple : Java Application Programming Interface : Algebraic Class : OpenMaple/Java/Algebraic/eval

Algebraic.eval - evaluate an Algebraic expression

Calling Sequence

Algebraic eval() throws MapleException



The eval function evaluates the Maple expression represented by the current Algebraic object and returns the result as a new Algebraic.


The current Algebraic object is unchanged by this call.


import com.maplesoft.openmaple.*;

import com.maplesoft.externalcall.MapleException;

class Example


    public static void main( String notused[] ) throws MapleException


        String mapleArgs[];

        Engine engine;

        Algebraic a1, a2;

        mapleArgs = new String[1];

        mapleArgs[0] = "java";

        engine = new Engine( mapleArgs, new EngineCallBacksDefault(),

                null, null );

        a1 = engine.evaluate( "''int''(x,x):" );

        a2 = a1.eval( );

        System.out.println( "a1 = "+a1 );

        System.out.println( "a2 = "+a2 );



Executing this code should produce the following output.

a1 = int(x,x)

a2 = 1/2*x^2

See Also

eval, ExternalCalling/Java/MapleException, OpenMaple, OpenMaple/Java/Algebraic, OpenMaple/Java/API, OpenMaple/Java/Engine/evaluate

Download Help Document

Was this information helpful?

Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam