NC.FPMATH Statement  
Previous  Top  Next

Description  
 
This routine will perform "floating point" arithmetic on Variable1 and Variable2 depending upon the value passed in OpType.  

Syntax  

NC.FPMATH (OpType, Variable1, Variable2, Return)  
 
OpType values can be:  

OpType
Description
XADD
Perform Variable 1 plus Variable 2 using "floating point" math.
XSUB
Perform Variable 1 minus Variable 2 using "floating point" math.
XMUL
Perform Variable 1 multiplied by Variable 2 using "floating point" math.
XDIV
Perform Variable 1 divided by Variable 2 using "floating point" math.
XCMP
Perform a compare of Variable 1 against Variable 2.
 

XCMP returns the following:  
 
·Variable1 < Variable 2 returns -1  
·Variable1 = Variable 2 returns 0  
·Variable 2 > Variable 1 returns 1  
 
The result is returned in the variable Return.