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 - .and. logical and operator (binary) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 .and.               Logical AND operator (binary)
------------------------------------------------------------------------------
 Syntax
   <expr> .and. <expr>

 Arguments
   <expr> is a logical expression.

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

 Example
   #define EXAMPLE_OPERATOR
   #include example.hdr

   proc Test_913
   vardef
      int nCounter1, nCounter2
   enddef
   ? .t. .and. .t.            // prints .T.
   ? .t. .and. .f.            // prints .F.
   ? .f. .and. .t.            // prints .F.
   ? .f. .and. .f.            // prints .F.
   nCounter1 := 10
   nCounter2 := -5
   do while nCounter1 > 0 .and. nCounter2 < 0
      ? nCounter1, nCounter2
      nCounter1--
      nCounter2++
   enddo
   endproc

   proc main
   Test_913()
   endproc

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

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