Go to Post Chit Chat is frivilous but CD would be a colder place without it. - Koko Ed [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 03-02-2003, 18:09
powercat powercat is offline
Registered User
no team
 
Join Date: Jan 2003
Location: Kansas
Posts: 14
powercat is an unknown quantity at this point
Logical AND

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.
  #2   Spotlight this post!  
Unread 03-02-2003, 18:39
Greg Ross's Avatar
Greg Ross Greg Ross is offline
Grammar Curmudgeon
AKA: gwross
FRC #0330 (Beach 'Bots)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Hermosa Beach, CA
Posts: 2,245
Greg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond repute
Send a message via AIM to Greg Ross Send a message via Yahoo to Greg Ross
Re: Logical AND

Quote:
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
__________________
Greg Ross (The Grammar Curmudgeon formerly known as gwross)
S/W Engineer, Team 330, the Beach 'Bots
<--The Grammar Curmudgeon loves this cartoon.
“Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" Hunter S. Thompson
"Playing a practical joke means doing something mean and calling it funny." Me

Last edited by Greg Ross : 03-02-2003 at 18:41.
  #3   Spotlight this post!  
Unread 03-02-2003, 20:08
Adam Collet Adam Collet is offline
Registered User
#0159 (Alpine Robotics)
 
Join Date: Nov 2002
Location: Ft. Collins, Colorado
Posts: 25
Adam Collet is an unknown quantity at this point
nm

sry
__________________
"Without the wind, the grass does not move. Without software, hardware is useless.''

Thus spake the Master Programmer

The Tao of Programming
Translated by: Geoffrey James

Last edited by Adam Collet : 03-02-2003 at 20:10.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Logical statements or math formulas Manoel Programming 1 16-02-2002 23:29


All times are GMT -5. The time now is 04:29.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi