Comparison operators – Echelon Neuron C User Manual
Page 75
Neuron C Reference Guide
55
Short
Name Function
neg
void s32_neg(const s32_type *arg1, s32_type *arg2);
Returns the negative of a signed 32-bit integer. (arg2 = - arg1).
Comparison Operators
Table 15 lists the comparison operator functions.
Table 15. Comparison Operators
Short
Name Function
eq
boolean s32_eq(const s32_type *arg1,
const s32_type *arg2);
Returns TRUE if the first argument is equal to the second argument,
otherwise FALSE. (arg1 == arg2).
ne
boolean s32_ne(const s32_type *arg1,
const s32_type *arg2);
Returns TRUE if the first argument is not equal to the second
argument, otherwise FALSE. (arg1 != arg2).
gt
boolean s32_gt(const s32_type *arg1,
const s32_type *arg2);
Returns TRUE if the first argument is greater than the second
argument, otherwise FALSE. (arg1 > arg2).
lt
boolean s32_lt(const s32_type *arg1,
const s32_type *arg2);
Returns TRUE if the first argument is less than the second argument,
otherwise FALSE. (arg1 < arg2).
ge
boolean s32_ge(const s32_type *arg1,
const s32_type *arg2);
Returns TRUE if the first argument is greater than or equal to the
second argument, otherwise FALSE. (arg1 >= arg2).
le
boolean s32_le(const s32_type *arg1,
const s32_type *arg2);
Returns TRUE if the first argument is less than or equal to the second
argument, otherwise FALSE. (arg1 <= arg2).
cmp
int s32_cmp(const s32_type *arg1, const s32_type *arg2);
Returns +1 if the first argument is greater than the second argument, -1
if it is less, and 0 if it is equal.