Complex formulas

From TempusServa wiki
Revision as of 10:44, 22 May 2013 by old>Admin (→‎IF statement)
Jump to navigation Jump to search

Common operators

  • Add: +
  • Subtract: -
  • Division: /
  • Multiply: *
  • Modulus: %

Mathematical functions

  • Minimum
  • Maximum

Support for statements

IF statement

Syntax

 ( Value1 Operator Value2 ? ValueIfTrue : ValueIfFalse )

Parts explained

  • Test
    • First value or expression
    • Operator
      • Equal: =
      • Unequal: !=
      • Greater: > (>=)
      • Lesser: < (<=)
    • Second value or expression
  • True/False values
    • Value
    • Expression
Examples

Script code

 -

Expression

 -