Difference between revisions of "Relational Operators"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
Line 25: | Line 25: | ||
|$||Substring is Contained In | |$||Substring is Contained In | ||
|- | |- | ||
− | | | + | ||||Contains Substring |
|- | |- | ||
|} | |} | ||
+ | |||
The Relational Operators are always evaluated from left to right. | The Relational Operators are always evaluated from left to right. |
Revision as of 14:35, 24 March 2009
The following Relational Operators are supported in the Recital/4GL:
Operator | Operation |
---|---|
= | Equal To |
== | Exactly Equal To / Matches Pattern |
<> | Not Equal To |
!= | Not Equal To |
# | Not Equal To |
> | Greater Than |
>= | Greater Than or Equal To |
< | Less Than |
<= | Less Than or Equal To |
$ | Substring is Contained In |
| | Contains Substring |
The Relational Operators are always evaluated from left to right.
The following ’wildcard’ characters can be used for == pattern matching:
Character | Action |
---|---|
? | Matches any one character |
% | Matches any one character |
* | Matches zero or more characters |
In SQL mode (SET SQL ON or embedded EXEC SQL statements), the following wildcard characters are available:
Characters | Description |
---|---|
_ | Matches any one character |
% | Matches zero or more characters |
Note: For FoxPro compatibility reasons, wildcard pattern matching is not available when SET COMPATIBLE is set to FOXPRO/FOXBASE/FOXPLUS/VFP.
Example
cSTR1 = [Welcome to the Recital/4GL] ? "Recital" $ cSTR1 .T. cSTR2 = [Welcome] // Compares to the end of cSTR2 ? cSTR1 = cSTR2 .T. // Compare contents & size ? cSTR1 == cSTR2 .F.