Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Delay (doesn't exist)
#1
Hi
In some programs you get "Delay (xxxx)" but I can't find a version of QBASIC that understands it. Could someone please tell me something about "Delay (xxxx)"
Reply
#2
Well, if you see "Delay(xxx)" in a program, it will most likely be a user created Subroutine. It is not a standard BASIC command.

basically it will call a sub that the programmer has created and feed in the xxx value.

Try using the TIMER keyword to work out how to make a delay routine based on seconds. If you get stuck or have problems, come back here and we will be happy to help.

Although there is a similar command, called SLEEP X
This halts the program for X seconds, but can be bypassed by pressing a key.
Reply
#3
A delay in QB would be like either like this....

Code:
DELAY = 1000

DO
(Program Here)
FOR i = 1 TO DELAY
LOOP

Or like this...

Code:
TIMER = 0
DO
d = d + 1
LOOP UNTIL TIMER = 1
d = DELAY

DO
(Program Here)
FOR i = 1 TO DELAY
LOOP

The last one should give you a one second delay if I remember right, the first one you have to tweek a lil to get the right delay.. :wink:
Kevin (x.t.r.GRAPHICS)

[Image: 11895-r.png]
Reply
#4
http://faq.qbasicnews.com/?blast=DelaySecs

^-^
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#5
OMG!!! This is SEVEN months old! Why are you digging up old threads?
Reply
#6
You could also use SOUND 0, ticks
roeten van Frenkel
Visit us at The Official S&F PROD. Homepage
Reply
#7
Quote:OMG!!! This is SEVEN months old! Why are you digging up old threads?

*checks* myeh.
Tt was dead -again- when you posted

...10 days =P
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#8
Quote:Tt was dead -again- when you posted
...10 days =P

>_<

The irony!
:oops:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)