Previous Next

GT or > operator
Returns a TRUE value if the first of two expressions is greater than the second expression.
Syntax 
 
expression { GT | > } expression 
expression
A constant, field name, variable name, or any combination of these. The expressions on either side of the GT or > must be of the same data type, although one might be integer and the other decimal.
Example 
This procedure lists all items that have a negative OnHand quantity or more than 90% of the OnHand inventory currently allocated:
 
FOR EACH Item NO-LOCK:
  IF Item.Allocated > 0 THEN IF (Item.OnHand <= 0) OR
    (Item.Allocated / Item.OnHand > .9) THEN
    DISPLAY Item.ItemNum Item.ItemName Item.OnHand Item.Allocated.
END.
Notes 
*
By default, the AVM uses the collation rules you specify to compare characters and sort records. The collation rules specified with the Collation Table (-cpcoll) startup parameter take precedence over a collation specified for any database the AVM accesses during the session, except when the AVM uses or modifies pre-existing indexes. If you do not specify a collation with the -cpcoll startup parameter, the AVM uses the language collation rules defined for the first database on the command line. If you do not specify a database on the command line, the AVM uses the collation rules with the default name "basic" (which might or might not exist in the convmap.cp file).
*
If either of the expressions is the Unknown value (?), then the result is the Unknown value (?); if both of the expressions are the Unknown value (?), then the result is FALSE.
*
*
*
*
You can use GT to compare a LONGCHAR variable to another LONGCHAR or CHARACTER variable. The variable values are converted to -cpinternal for comparison and must convert without error, or the AVM raises a run-time error.
*

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.