check if the current Algebraic represents the Maple NULL expression - Maple Help

Online Help

All Products    Maple    MapleSim


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

Algebraic.isNULL - check if the current Algebraic represents the Maple NULL expression

Calling Sequence

boolean isNULL() throws MapleException

Description

• 

The isNULL function returns true if the current Algebraic object represents the Maple NULL expression (an expression sequence of length 1) 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[];

        Engine engine;

        Algebraic a1, a2;

        mapleArgs = new String[1];

        mapleArgs[0] = "java";

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

                null, null );

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

        if ( a1.isNULL() )

        {

            System.out.println( "NULL" );

        }

        else

        {

            System.out.println( "Not NULL" );

        }

        a1 = engine.evaluate( "NULL:" );

        if ( a1.isNULL() )

        {

            System.out.println( "NULL" );

        }

        else

        {

            System.out.println( "Not NULL" );

        }

    }

}

Executing this code should produce the following output.

Not NULL

NULL

See Also

ExternalCalling/Java/MapleException, NULL, OpenMaple, OpenMaple/Java/Algebraic, OpenMaple/Java/API


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