Numeric.isUnnamedZero
check if the value stored in the Numeric is equal to zero
Calling Sequence
Description
Examples
boolean isUnnamedZero() throws MapleException
The isUnnamedZero function returns true if the value represented by the current Numeric object is zero and false otherwise.
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:" );
n = (Numeric)engine.evaluate( "0.:" );
n = (Numeric)engine.evaluate( "1.:" );
}
Executing this code produces the following output.
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