Posts: 489
Threads: 34
Joined: Jan 2005
multiple sleep's don't work.
Code:
print "press 2 keys."
sleep
sleep
end 0
it will exit after only 1 key is pressed.
:evil:
ttp://m0n573r.afraid.org/
Quote:quote: "<+whtiger> you... you don't know which way the earth spins?" ... see... stupidity leads to reverence, reverence to shakiness, shakiness to... the dark side
...phear
Posts: 1,688
Threads: 119
Joined: Jun 2003
heh heh... just like qb! :lol:
Jumping Jahoolipers!
Posts: 489
Threads: 34
Joined: Jan 2005
huh? you have to press 2 keys in qb.
ttp://m0n573r.afraid.org/
Quote:quote: "<+whtiger> you... you don't know which way the earth spins?" ... see... stupidity leads to reverence, reverence to shakiness, shakiness to... the dark side
...phear
Posts: 1,688
Threads: 119
Joined: Jun 2003
it will if you press an extended key.
Jumping Jahoolipers!
Posts: 489
Threads: 34
Joined: Jan 2005
i'm not.
and it doesn't matter if there's 2 or more sleeps.
Code:
do:sleep:print i:i+=1:loop
ttp://m0n573r.afraid.org/
Quote:quote: "<+whtiger> you... you don't know which way the earth spins?" ... see... stupidity leads to reverence, reverence to shakiness, shakiness to... the dark side
...phear
Posts: 268
Threads: 9
Joined: Dec 2004
It's expected behaviour. SLEEP waits for a keypress but doesn't clear the keyboard buffer as it previously did; you have to explicitely clean it up afterwards:
Code:
SLEEP
WHILE INKEY$ <> "": WEND
Posts: 2,771
Threads: 96
Joined: Oct 2003
or
Code:
Print "Hi!"
SLEEP
dmy$ = INKEY$
SLEEP
end
Posts: 1,439
Threads: 15
Joined: Apr 2003
hrm... then it's kinda pointless to SLEEP without an arg, isn't it? While Inkey$ = "": Wend works just the same...
Posts: 6,419
Threads: 74
Joined: Mar 2002
But with sleep you type less
Posts: 489
Threads: 34
Joined: Jan 2005
ok, but won't that break qb-compatibility?
ttp://m0n573r.afraid.org/
Quote:quote: "<+whtiger> you... you don't know which way the earth spins?" ... see... stupidity leads to reverence, reverence to shakiness, shakiness to... the dark side
...phear