MAINSAIL Language Manual, Section 34.5

previous   next   top   contents   index   framed top   this page unframed


34.5. equ

Figure 34–5. equ
COMPILETIME
BOOLEAN
PROCEDURE   equ         (STRING r,s;
                         
OPTIONAL BITS ctrlBits);

equ checks the equality of its two STRING arguments.

equ(r,s) is equivalent to r = s; i.e., it returns TRUE if the STRINGs have the same value and FALSE if not.

A single valid BITS constant, upperCase, is defined for use with ctrlBits. If present, it means ignore upper/lower case distinctions when checking the arguments for equality. The effect is as if both arguments were converted to upper case before the check. This option is more efficient than first converting to upper case with cvu or scan and then checking for equality. See Example 34–6.

Example 34–6. Use of equ
IF equ(r,s,upperCaseTHEN ...

has the same effect as (but is more efficient than):

IF cvu(r) = cvu(sTHEN ...

A garbage collection cannot occur during a call to equ.


previous   next   top   contents   index   framed top   this page unframed

MAINSAIL Language Manual, Section 34.5