You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Expressions

You can use numeric variables, functions and values in regular math expressions:

x = 100
a = a + 14 * 5 / (1 + x) + ("0.3" as double)

Equations (returning boolean values):

b = a == 15

You can use boolean variables, functions and values in boolean logic expressions:

a = isBlank("")
b = isBlank("not blank string")
c = b && a || false

Is the same as:

c = isBlank("") && isBlank("not a blank string")
Boolean operators

 

the OR operator

& the AND operator

^ the XOR operator

! the NOT operator

 

the short-circuit OR operator

&& the short-circuit AND operator

== the EQUAL TO operator

!= the NOT EQUAL TO operator

String can be concated together by a + oeprator:

a = "first part" + "second part" + "third part"

Math funtions

abs\(n)

Returns the absolute value of a double value.

ceil\(n)

Returns the smallest (closest to negative infinity) double value that is not less than the argument and is equal to a mathematical integer.

cos\(n)

Returns the trigonometric cosine of an angle.

exp\(n)

Returns Euler's number e raised to the power of a value.

floor\(n)

Returns the largest (closest to positive infinity) value that is not greater than the argument and is equal to a mathematical integer.

log\(n)

Returns the natural logarithm (base e) of a value.

max(a, b)

Returns the greater of two values.

min(a, b)

Returns the smaller of two values.

pow(a, b)

Returns the value of the first argument raised to the power of the second argument.

random()

Returns a value with a positive sign, greater than or equal to 0.0 and less than 1.0.

round\(n)

Returns the closest long to the argument.

sqrt\(n)

Returns the correctly rounded positive square root of a value.

Samples

Simple computation

return (((value() as double) / 3600000) * 60)

Rounding

number = replace(value(), ',', '.') as double
return round(number)

Notice we must normalize input to be valid number by normalizing the decimal separator.

  • No labels