Go to Post With a one-on-one-on-one-on-one-on-one game it would be really easy. - dlavery [more]
Home
Go Back   Chief Delphi > Old Forum Archives > 2001
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #11   Spotlight this post!  
Unread 24-06-2002, 00:53
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
Re: PBASIC HELP, ASAP!!

Posted by Joe Ross at 2/14/2001 6:18 PM EST


Engineer on team #330, Beach Bot, from Hope Chapel Academy and NASA/JPL , J&F Machine, and Raytheon.


In Reply to: PBASIC HELP, ASAP!!
Posted by bill whitley on 2/14/2001 5:39 PM EST:



: Can anyone double check this code? Tell me if it will work.

: if p3_wheel > 240 then relay5_fwd = 1

: if p3_wheel 240 then JUMP2
: relay5_fwd = 0
: relay5_rev = 0

: JUMP2:

: if p4_wheel > 240 then relay6_fwd = 1

: if p4_wheel 240 then JUMP3
: relay6_fwd = 0
: relay6_rev = 0

: JUMP3:

: I am concerned about ending the IF THEN statements.

The code should tokenize, but it may not do what you want ;-)

The if-then statements look ok, except that I'm not sure that you want to use an "and". The way the code is written now, all the relays will always be set to 0 because p3_wheel and p4_wheel can never be less than 15 AND more than 240. It looks like you want an OR which says if p3_wheel is either less than 15 OR greater than 240, goto the code for p4_wheel.

The symbol for OR in PBASIC is "|". If you replace the "&" with "|" you should be OK.


__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
 


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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PBASIC ARCTAN function Greg Ross Programming 14 11-05-2003 12:28
Need to learn PBASIC...Where Should I Go? IMDWalrus Programming 5 29-04-2003 16:43
Obscure PBASIC for RoboEmu rbayer Programming 1 28-03-2003 23:57
PBasic 2.5 vs. 2.0 Anthony Kesich Programming 6 09-02-2003 22:06
PBasic Question Melissa H. Programming 28 17-11-2002 18:53


All times are GMT -5. The time now is 12: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