check if the name is assigned a value - Maple Help

Online Help

All Products    Maple    MapleSim

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

Name.isAssigned - check if the name is assigned a value

Calling Sequence

boolean isAssigned( ) throws MapleException



The isAssigned function returns true if the Name has been assigned a value, and false otherwise.


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( "a:" );

    System.out.println( name.isAssigned() );

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

    name.assign( e );

    System.out.println( name.isAssigned() );

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

    System.out.println( name.isAssigned() );



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/assign

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