Please enable JavaScript to view this site.

Validity: Rule, Task

These operators operate on numerical quantities. Use on quantities of logical type should be avoided while comparing strings requires the use of the appropriate functions.

Minor operator

Syntax

valueA < valueB

valueA

First value

valueB

Second value

Result

True if valueA less than valueB, false otherwise

Examples:

Operator less than or equal to

Syntax

valueA <= valueB

valueA

First value

valueB

Second value

Result

True if valueA less than or equal to valueB, false otherwise

Examples:

Major operator

Syntax

valueA > valueB

valueA

First value

valueB

Second value

Result

True if valueA greater than valueB, false otherwise

Examples:

Operator greater than or equal to

Syntax

valueA >= valueB

valueA

First value

valueB

Second value

Result

True if valueA greater than or equal to valueB, false otherwise

Examples:

; If the variable "value1" is greater than or equal to 3.1415

; then the following "if" statements will be executed

if (value1 >= 3.1415)

 ...

endif

 

; If the condition is false (that is, the contents of register nvr(1)

; is not greater than or equal to the contents of register nvr(2))

; then "return" will be assigned the value 0 (return = 0).

; If the condition is true (that is, the contents of register nvr(1)

; is greater than or equal to the contents of register nvr(2))

; then "return" will be assigned the value 1 (return = 1)

return =(nvr(1) >= nvr(2))

Equality operator

Syntax

valueA = valueB

valueA

First value

valueB

Second value

Result

True if valueA equals valueB, false otherwise

Examples:

NOTE: We do not recommend using the = operator to compare real quantities (or a real with an integer): instead, we recommend using the appropriate similar() function.

Not equality operator

Syntax

valueA <> valueB

valueA

First value

valueB

Second value

Result

True if valueA different from valueB, false otherwise

Examples:

 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC