Go to Post know what else would be great? with each new rep point you get 10 airline miles on your Visa or MasterCard - KenWittlief [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
  #1   Spotlight this post!  
Unread 08-04-2004, 03:30
PBoss PBoss is offline
Registered User
#1212
 
Join Date: Jan 2003
Location: Nowhere
Posts: 9
PBoss is an unknown quantity at this point
PBasic Probelm

Hi,
I have 3 push buttons that I am using as a switches. I am using last year's robot controller. What I want to do is when I press a button once, I want it to be like a toggle button. When I press a button, I want the controller to run a sub routine. That is simple, I know, but here is the catch:
If while running the sub-routine, a second button is pressed, I want the RC to ignore the second button. When the RC is done executing the subroutine, then I want it to be able to recieve a signal from any other button, but not until it is done executing the first sub routine.
Also, I forgot, in PBasic, is this how you used to do sub routines?

IF condition THEN
gosub FIRST
ENDIF

FIRST:
'code


Is that all there is to it or do I have to declare the sub routine in a different way or end the sub routine in a different way. I'll appreciate any help.
 


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
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
Output voltage in PBASIC diego25 Programming 7 31-01-2002 22:50
Another PBASIC Question Ian W. Programming 4 31-01-2002 21:36


All times are GMT -5. The time now is 22:25.

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