Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>== exactly equal -- binary (relational)</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
==                Exactly equal -- binary                 (Relational)


Syntax:        <exp1> == <exp2>

Type:          All

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

Description:   The == (exactly equal) is a binary operator that compares
               two values of the same data type and returns true (.T.)
               if <expC1> is exactly equal to <expC2> according to the
               following rules:

               Character: The comparison is based on the underlying
               ASCII code.  Remember that ASCII codes for alphabetic
               characters are ascending, i.e. the code for "A" is 65 and
               the code for "Z" is 90.  The length of the two character
               strings must be the same.  Trailing blanks are
               significant.

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

               Logical: True (.T.) is exactly equal to true (.T.)
               and false (.F.) exactly equal to false (.F.).

               Memo: Treated the same as character.

               Numeric: Compared based on magnitude using the first
               12 significant digits.


----------------------------------- Examples -------------------------------

   * Character.
   ? "Z" == "A"                         && Result: .F.
   ? "A" == "A "                        && Result: .F.
   ? "AA" == "A"                        && Result: .F.

   * Date.
   ? CTOD("12/12/88") ==;
      CTOD("12/12/88")                  && Result: .T.

   * Logical.
   ? .T. == .T.                         && Result: .T.

   * Numeric.
   ? 1 == 1                             && Result: .T.


See Also: $ < > = >= <= <> Expr_error()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson