Go to Post Our coolant system consists of a freshman with a squirt bottle. - Holtzman [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Spotlight this post!  
Unread 13-02-2003, 01:00
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,604
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
assuming you want to use pbasic 2.0 syntax, the easiest way (that I have found) to keep everything straight is to do something like this:
Code:
if condition1 then do_condition1
if condition2 then do_condition2
if condition3 then do_condition3
'add else condtion here if necessary
goto end_conditions

do_condition1:
   'condition1 code here
goto end_conditions

do_condition2:
   'condition2 code here
goto end_conditions

do_condition3:
   'condition 3 code here
goto end_conditions

end_conditions:
'increment counter or whatever else you want to do.
doing this allows you to add as many conditions as you want very easily.

this would be equivilent to a nested if...else if...else if...else statement in C.
 


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
Victor problem Andy Baker Electrical 15 24-06-2003 09:49
The problem with scouting... archiver 2001 10 23-06-2002 23:49
joystick problem archiver 2000 12 23-06-2002 23:08
Major problem with chipphua motors aka Scott White Motors 18 19-03-2002 19:44
Heres a big problem that I think Discreet does not know what they are talking about. wes16zeus 3D Animation and Competition 9 09-01-2002 23:31


All times are GMT -5. The time now is 02:34.

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