News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

basic sleep

Started by daddyd, 21:16, 16 September 13

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

daddyd

it's been ages since i used basic on the cpc, just tried it again to make something simple to show to kids how easy it is/was.
can't remember how to do a 'sleep' in basic, for example in a loop changing the color of the border and waiting 2 seconds between each color change.
i know it can be done because i did it waaaay back in the 80ties :) i'm starting to think i just used an empty for-loop or something.

anybody?

andycadley

Oddly Locomotive Basic didn't have a PAUSE command like other versions of Basic, but you could do roughly the same with:

t = TIME: WHILE TIME < t + (300 * 2):WEND

adjusting 2 for the number of seconds you wanted to wait for.

ralferoo

You could do something like:
for i=1 to 50*2:call &bd19:next
for a 2 second pause.

Sykobee (Briggsy)

could you use EVERY?


EVERY 600 GOSUB #(routine to change colour)

Powered by SMFPacks Menu Editor Mod