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><> != # not equal -- binary (relational)</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
<> != #        Not equal -- binary                        (Relational)


Syntax:        <expC1> <> <expC2>

Type:          All

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

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

               Character: The comparison is based on the underlying
               ASCII code and is the inverse of the equal operator (=).
               This means that the comparison is sensitive to the
               current EXACT SETting.  See the examples below.

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

               Logical: False (.F.) is not equal to true (.T.).

               Memo: Treated the same as character.

               Numeric: Compared based on magnitude.


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

   * Character.
   SET EXACT ON
   ? "123"   <> "12345"                 && Result: .T.
   ? "12345" <> "123"                   && Result: .T.
   ? "123"   <> ""                      && Result: .T.
   ? ""      <> "123"                   && Result: .T.

   SET EXACT OFF
   ? "123"   <> "12345"                 && Result: .T.
   ? "12345" <> "123"                   && Result: .F.
   ? "123"   <> ""                      && Result: .F.
   ? ""      <> "123"                   && Result: .T.

   * Date.
   ? CTOD("12/12/88") <>;
      CTOD("12/12/88")                  && Result: .F.

   * Logical.
   ? .T. <> .T.                         && Result: .F.
   ? .T. <> .F.                         && Result: .T.

   * Numeric.
   ? 2 <> 1                             && Result: .T.
   ? 1 <> 1                             && Result: .F.


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

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