How to create endless loop with keypress

Stellaferox

Active Member
Licensed User
Hi,

In the former days of programming I used an endless loop in a subroutine to keep on going with a keypress to stop. Anybody got an idea how to do this with DO UNTIL or DO WHILE?
Marc
 

Stellaferox

Active Member
Licensed User
Yes, Erel, I agree but I want to create an endless loop to keep on going (like bounce a ball against the screensides) without using the timeticksub.
Marc
 

petrbury

Member
Licensed User
Longtime User
Hi, I don't know if it is what you really want, but endless loop you can make this way :

do until 0 = 1
doevents
loop

Petr
 

Stellaferox

Active Member
Licensed User
The timer is to slow for what I want I think. I solved the problem in a "for next" loop. Now the ball really bounces (see post moving figures)
Marc
 

Cableguy

Expert
Licensed User
Longtime User
Hi

were is "Moving figures"??
 

Cableguy

Expert
Licensed User
Longtime User
RandomCoder I don't think that was what he refered to, since he talks abou using a for next loop.
I think he is preparing a new post?
Maybe Im wrong, I don't know...
 

RandomCoder

Well-Known Member
Licensed User
Longtime User
Stellaferox used a for next loop to bounce the ball. I'm presuming that's what he's refering too.

Regards,
RandomCoder
 

Stellaferox

Active Member
Licensed User
Yep, that's right. I tried to use a FORNEXT LOOP but fell back on a DO UNTIL loop that endlessly goes on and bounces the ball to the screensides (see code)
Marc
 
Top