Feedback

  • Contents
 

Type Conversions

The following operators convert values from one type to another.

toR

toR (Integer or String)

Converts an Integer or String value into a Numeric value.

Example: toR (4) results in a value of 4.0.

Round

Round (Numeric)

Converts a Numeric value to an Integer value by rounding to the nearest whole number.

Example: Round(4.32) results in a value of 4.

Round(4.50) results in a value of 5.

Round(4.73) results in a value of 5.

toS

toS (Integer or Numeric)

Converts an Integer or Numeric value into a String value.

Example: toS (123) results in a string with a value of "123".

toI

toI (String or Numeric)

Converts s String or Numeric value into an Integer value.

Example: toI ("456") results in an Integer with a value of 456.

Note: This operation will fail if the string contains information that cannot be converted to an integer. This includes letters or decimal information.

Test (?, ?, ?)

Test (Boolean, [string or integer or numeric or datetime], [string or integer or numeric or datetime])

Tests a Boolean condition and returns the value of either the second or third parameter. If the value of the first parameter is true, the value of the second parameter is returned. If the value of the first parameter is false, the value of the third parameter is returned. This is similar to an If...Then statement.

Example: Test (6>5, "yes", "no") returns a value of the second parameter or "yes".

Test (6>7, "yes", "no") returns a value of the third parameter or "no".