Difference between revisions of "STRCOMPARE()"

From Recital Documentation Wiki
Jump to: navigation, search
 
(Class)
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
=STRCOMPARE()=
 
 
 
==Class==
 
Expressions And Type Conversion
 
  
  
Line 15: Line 10:
  
 
==See Also==
 
==See Also==
[[STREXTRACT()]], [[SUBSTR()]], [[CHROVERLAP()]], [[GETUID()]], [[GETGID()]], [[AT()]]
+
[[AT()]], [[CHROVERLAP()]], [[GETGID()]], [[GETUID()]], [[STRCMP()]], [[STREXTRACT()]], [[SUBSTR()]]  
  
  
Line 28: Line 23:
 
cUSERPRIVS = [YYYNNYNN]
 
cUSERPRIVS = [YYYNNYNN]
 
if strcompare(cUSERPRIVS,'NNNNNNNYN')
 
if strcompare(cUSERPRIVS,'NNNNNNNYN')
SysMaint()
+
    SysMaint()
 
else
 
else
return
+
    return
 
endif
 
endif
 
</code>
 
</code>
Line 36: Line 31:
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital Server, Recital
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]

Latest revision as of 16:33, 28 October 2009


Purpose

Function to compare two strings


Syntax

STRCOMPARE(<expC1>,<expC2>)


See Also

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


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 Server, Recital