assign a value to a Maple name - Maple Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Programming : OpenMaple : Java Application Programming Interface : Name Class : OpenMaple/Java/Name/assign

Name.assign - assign a value to a Maple name

Calling Sequence

void assign( Algebraic val ) throws MapleException




value to assign to the list



The assign function assigns the Name object the value val.


Any existing value assigned to the Name is discarded.


import com.maplesoft.openmaple.*;

import com.maplesoft.externalcall.MapleException;

class Example


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


    String mapleArgs[];

    Engine engine;

    Name name;

    Algebraic e;

    mapleArgs = new String[1];

    mapleArgs[0] = "java";

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

        null, null );

    name = (Name)engine.evaluate( "abcde:" );

    System.out.println( name );

    e = engine.evaluate( "expand( (x+y)^5 ):" );

    name.assign( e );

    e = engine.evaluate( "abcde:" );

    System.out.println( e );



Executing this code produces the following output.



See Also

ExternalCalling/Java/MapleException, OpenMaple, OpenMaple/Java/Algebraic, OpenMaple/Java/API, OpenMaple/Java/Name, OpenMaple/Java/Name/isAssigned

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