Hi Mike,
If most of your conditional return values are floats/doubles then this float macro should be very efficient. It will work for integers too:
iff ( comparator_expr, true_return_expr, false_return_expr )
deff iff
or eax,eax
(
jnz exit
fxch st1
)
fstp st0
end deff
'TEST:
sys aa=1,bb=2,cc=3,dd=4,ee
ee = iff((aa>bb),cc,dd)
print ee '4
float aa=1,bb=2,cc=3,dd=4,ee
ee = iff((aa<bb),cc,dd)
print ee '3
So I suggest using a macro like this one, wherever it fits your coding pattern. It can be adjusted later, if necessary. Macros and functions both use the same syntax when you call them.