floatsub()
Description
Subtract two floating point numbers.
Syntax
floatsub(oper1, oper2);
Parameters
Variable | Input |
|---|---|
| The value to be subtracted together. |
| The value to be subtracted together. |
Returns
The result: the oper1 minus oper2.
Function call example
Float type numbers subtraction example
new Float: data1 = 10.54;
new Float: data2 = 20.23;
new Float: sub;
main(){
sub = floatsub(data2, data1); //the result will be: sub = 9.69;
while(1){
Delay(100);
}
}Notes and Warnings
The user-defined - operator forwards to this function.