[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 <
 Less than--binary                               (Relational)
------------------------------------------------------------------------------
 Syntax

     <exp1> < <exp2>

 Type

     Character, date, logical, memo, numeric

 Operands

     <exp1> and <exp2> are expressions of the same data type to be
     compared.

 Description

     The less than (<) operator is a binary operator that compares two values
     of the same data type and returns true (.T.) if <exp1> is less than
     <exp2>.

     .  Character: The comparison is based on the underlying ASCII
        code.  ASCII codes for alphabetic characters are ascending (e.g., the
        code for "A" is 65 and the code for "Z" is 90).

     .  Date: Dates are compared according to the underlying date
        value.

     .  Logical: False (.F.) is less than true (.T.).

     .  Memo: Treated the same as character.

     .  Numeric: Compared based on magnitude.

 Examples

     .  These examples illustrate how the less than operator (<)
        behaves with different data types:

        // Character
        ? "Z" < "A"                 // Result: .F.
        ? "ZA" < "A"                // Result: .F.
        ? "A" < "AZ"                // Result: .T.

        // Date
        ? CTOD("12/12/88") < ;
           CTOD("12/11/88")         // Result: .F.

        // Logical
        ? .F. < .T.                 // Result: .T.


        // Numeric
        ? 2 < 1                     // Result: .F.
        ? 1 < 2                     // Result: .T.


See Also: $ > <= <> = (equality) == >=
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson