Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - .or. logical or operator (binary) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 .or.                Logical OR operator (binary)
------------------------------------------------------------------------------
 Syntax
   <expr> .or. <expr>

 Arguments
   <expr> is a logical expression.

 Description
   The .or. operator performs a logical OR on the two operands.
   .or. evaluates to .t. if either or both logical expressions
   evaluate to .t.; and .f. otherwise. Both expressions are always evaluated,
   regardless the result from the first operand.

   Force does not support a .xor. (exclusive or) logical operator. An
   exclusive or operation evaluates to .t. if one, not both, of the logical
   expressions is .t.. In order to implement exclusive or expressions, the
   following format can be used:

   ( <expr1> .and. .not. <expr2> ) .or. ;
   ( <expr2> .and. .not. <expr1> )

 Example
   #define EXAMPLE_OPERATOR
   #include example.hdr

   proc Test_915
   ? .t. .or. .t.            // prints .T.
   ? .t. .or. .f.            // prints .T.
   ? .f. .or. .t.            // prints .T.
   ? .f. .or. .f.            // prints .F.
   endproc

   proc main
   Test_915()
   endproc

See Also: .and. .not. or()

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