STRCOMPARE()

From Recital Documentation Wiki
Revision as of 15:23, 20 March 2009 by Yvonnemilne (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

STRCOMPARE()

Class

Expressions And Type Conversion


Purpose

Function to compare two strings


Syntax

STRCOMPARE(<expC1>,<expC2>)


See Also

STREXTRACT(), SUBSTR(), CHROVERLAP(), GETUID(), GETGID(), AT()


Description

The STRCOMPARE() function compares two strings, character by character, and returns true (.T.) if the characters in the first string <expC1>, are always greater than or equal to the equivalent characters in the second string <expC2>. The test continues up to the length of the shorter string.

This function is particularly useful in validation routines for controlling access to menu options.


Example

cUSERPRIVS = [YYYNNYNN]
if strcompare(cUSERPRIVS,'NNNNNNNYN')
SysMaint()
else
return
endif


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer