November 22, 2024, 03:03:35 AM

News:

You can now use Vixen to program your Prop-1 and Prop-2 controllers!  Get started quickly and easily, without having to learn PBASIC.  Details in the Library forum.


PAUSE

Started by J Pettis, October 23, 2007, 05:17:09 PM

Previous topic - Next topic

J Pettis

Jon,  Is there a better way to code a long pause other than:

PAUSE 60000
PAUSE 60000
PAUSE 60000
PAUSE 60000


Thanks,
Jarrett

JonnyMac

There is a more flexible way.  Define a variable, like this:

SYMBOL  idx             = B2

Now you can use that as a control variable in a FOR-NEXT loop:

Long_Delay:
  FOR idx = 1 TO 4
    PAUSE 60000
  NEXT


You can update the end value of the loop to change the length of the delay (in minutes in this example).
Jon McPhalen
EFX-TEK Hollywood Office

J Pettis

Thanks Jon! I figure I m at the point now where I need to start coding better.  :o

Jarrett

JonnyMac

It's never too early to start doing things well!   ;)
Jon McPhalen
EFX-TEK Hollywood Office