check if the value stored in the Numeric is equal to zero - Maple 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

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[];

    Engine engine;

    Numeric n;

    short s;

    mapleArgs = new String[1];

    mapleArgs[0] = "java";

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

        null, null );

    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


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