Numeric.isUnnamedZero - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : OpenMaple : Java Application Programming Interface : Numeric Class : OpenMaple/Java/Numeric/isUnnamedZero

Numeric.isUnnamedZero

check if the value stored in the Numeric is equal to zero

 

Calling Sequence

Description

Examples

Calling Sequence

boolean isUnnamedZero() throws MapleException

Description

• 

The isUnnamedZero function returns true if the value represented by the current Numeric object is zero 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 );

        Numeric n;

        n = (Numeric)engine.evaluate( "0:" );

        System.out.println( n.isUnnamedZero() );

        n = (Numeric)engine.evaluate( "1:" );

        System.out.println( n.isUnnamedZero() );

        n = (Numeric)engine.evaluate( "0.:" );

        System.out.println( n.isUnnamedZero() );

        n = (Numeric)engine.evaluate( "1.:" );

        System.out.println( n.isUnnamedZero() );

    }

}

Executing this code produces the following output.

true

false

true

false

See Also

ExternalCalling/Java/MapleException

OpenMaple

OpenMaple/Java/API

OpenMaple/Java/Numeric

OpenMaple/Java/Numeric/isByte

OpenMaple/Java/Numeric/isInt

OpenMaple/Java/Numeric/isInteger

OpenMaple/Java/Numeric/isLong

OpenMaple/Java/Numeric/isShort