Tutorial by Examples

Progress supports + / - * as operators. They cannot be overloaded. Division always returns a decimal. If any of the numbers in a calculation is a decimal a decimal will be returned. Otherwise an INTEGER or INT64. There's no += or ++ operator. To increase or decrease a variable you have to assign it...
EXP - Returns the result of raising a number to a power. EXP( base, exponent) MESSAGE EXP(10, 2) VIEW-AS ALERT-BOX. // Messages 100 SQRT - Returns the square root of a number. SQRT( number) MESSAGE "The square root of 256 is " SQRT(256) VIEW-AS ALERT-BOX. // Messages 16 M...
There are standard functions built in for comparing equality, inequality etc. NameSymbolAlternativeExampleEqual=EQi = jNot equal<>NEi <> jLess than<LTi < jless than or equal<=LEi <= jGreater than>=GTi > jGreater than or equal≥=GEi >= j The symbol can be exchanged w...
RANDOM - generates a random number RANDOM(low, high) Generates a pseudo random integer between low and high // Example that generates 20 random numbers between 1 and 20 (1 and 20 included) DEFINE VARIABLE i AS INTEGER NO-UNDO. DO i = 1 TO 20. DISPLAY i RANDOM(1, 20). PAUSE. ...

Page 1 of 1