CRE Programmer's Guide
Math Functions
Common Run-Time Environment (CRE) Programmer’s Guide—528146-004
7-14
Positive_Diff
x
is the minuend, the number from which the subtrahend is subtracted.
y
is the subtrahend, the number to subtract from the minuend.
Return Value
The Positive_Diff functions return:
x - y if x > y
0 if x is less than or equal to y
Example
INT i, j, k;
i := 17;
j := -18;
k := RTL_Positive_Diff_Int16_(i, j); ! k gets 35
k := RTL_Positive_Diff_Int16_(j, i); ! k gets 0