FORMULA LANGUAGE
Examples: @Sign
1. This formula sets the result field to "Profit!" if the earnings field is greater than the expenses field, "Loss!" if expenses are greater than earnings, and "Break even" if they are equal.
field result:=result;
difference:=earnings - expenses;
r:=@If( ( @Sign( difference ) = 1); "Profit!"; ( @Sign( difference ) = -1 ); "Loss!"; "Break even" ); @SetField( "result"; r )
2. This formula allows division by a positive number but returns -1 if the divisor is negative and 0 if the divisor is 0. If number1 and number2 are lists, the result is a list.
@If(@Sign(number2) = 1; number1 / number2; @Sign(number2) = -1; -1; 0)
See Also
@Sign
Glossary
Feedback on
Help
or
Product Usability
?
Help on Help
All Help Contents
Glossary