isAssigned - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


Name.isAssigned

check if the name is assigned a value

 

Calling Sequence

Description

Examples

Calling Sequence

boolean isAssigned( ) throws MapleException

Description

• 

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

Examples

import com.maplesoft.openmaple.*;

import com.maplesoft.externalcall.MapleException;

class Example

{

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

    {

        String[] mapleArgs = { "java" };

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

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

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

        Algebraic 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.

false

true

true

See Also

ExternalCalling/Java/MapleException

OpenMaple

OpenMaple/Java/Algebraic

OpenMaple/Java/API

OpenMaple/Java/Name

OpenMaple/Java/Name/assign

 


Download Help Document