program abstract for
-----------------------------------------------------------------
* Program  : Boolean.prg
* Author   : Colin R. Keeler
*            colink@doh.state.sd.us
*            71034.1256@compuserve.com
*            http://www.state.sd.us/people/colink/colink.htm
* Date     : 11/03/94
* Updated  : 01/23/95
* Copyright: none (Public Domain)
* Purpose  : Provides some Boolean algebra functions for FoxPro.
-----------------------------------------------------------------
This program, depending upon the first parameter supplied,
performs integer to binary conversion, binary to integer
conversion, or Boolean AND, OR, NOT and EQV functions to 
the second (and third) parameters passed.
-----------------------------------------------------------------
USAGE:

     =BOOLEAN( <expC> , <expN1> | <expC1> [ , <expN2> ] )

WHERE:

     <expC> is one of "AND", "OR", "NOT", "EQV", "BIN2INT", "INT2BIN"

     <expN1> is first integer argument
       - or -
     <expC1> is only character argument

     <expn2> is second integer argument
-----------------------------------------------------------------

1st parm   2nd parm   3rd parm   return value
========   ========   ========   ==============================
'AND'      int1       int2       int1 AND int2
'OR'       int1       int2       int1 OR int2
'NOT'      int1                  NOT int1
'EQV'      int1       int2       int1 EQV int2
'INT2BIN'  int1                  'binary representation of int1'
'BIN2INT'  'binary1'             integer representation of 'binary1'

-----------------------------------------------------------------
RESULTS RETURNED BY LOGICAL OPERATIONS

Operation   Value   Value   Result

NOT         X               NOT X
            1               0
            0               1

AND         X       Y       X AND Y
            1       1       1
            1       0       0
            0       1       0
            0       0       0

OR          X       Y       X OR Y
            1       1       1
            1       0       1
            0       1       1
            0       0       0

EQV         X       Y       X EQV Y
            1       1       1
            1       0       0
            0       1       0
            0       0       1

XOR         X       Y       X XOR Y
            1       1       0
            1       0       1
            0       1       1
            0       0       0
