Posts: 21
Threads: 4
Joined: Aug 2004
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)"
Posts: 2,771
Threads: 96
Joined: Oct 2003
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.
Posts: 2,404
Threads: 153
Joined: Jan 2005
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)
Posts: 2,765
Threads: 138
Joined: Nov 2002
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Posts: 2,771
Threads: 96
Joined: Oct 2003
OMG!!! This is SEVEN months old! Why are you digging up old threads?
Posts: 26
Threads: 0
Joined: Jul 2004
You could also use SOUND 0, ticks
Posts: 2,765
Threads: 138
Joined: Nov 2002
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
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Posts: 2,771
Threads: 96
Joined: Oct 2003
Quote:Tt was dead -again- when you posted
...10 days =P
>_<
The irony!
:oops: