Log in

View Full Version : Logical AND


powercat
03-02-2003, 18:09
Greetings,
Searched this site, and looked for the PBasic Syntax Manual. I came up short.

What is the symbol for performing a Logical AND ?

if rc_sw1 = 1 AND rc_sw2 = 1 then

thanks.

Greg Ross
03-02-2003, 18:39
Originally posted by powercat
What is the symbol for performing a Logical AND ?

if rc_sw1 = 1 AND rc_sw2 = 1 then

The AND operator is correct, but you will need to use parentheses:
if (rc_sw1 = 1) AND (rc_sw2 = 1) then

Adam Collet
03-02-2003, 20:08
sry