Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / help with looping.

Author
Message
Blobby 101
18
Years of Service
User Offline
Joined: 17th Jun 2006
Location: England, UK
Posted: 17th Jun 2006 13:45
is it possible to finish a loop using the exit comand after a cirtain amount of time using somthing like the wait comand?
i'm using dark basic classic.
this is my code

perfection is not achived, it is earned.
Dream And Death
18
Years of Service
User Offline
Joined: 21st Feb 2006
Location: The circus! Juggling job, kids and DBPro
Posted: 17th Jun 2006 16:06
i think this will work with DBC.
Before loop starts:
varTime=Timer()

During loop:
if Timer()=varTime+10000 then exit

adjust 10000 accordingly (its in milliseconds!)

Hope this works/helps.
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 17th Jun 2006 16:07
I can't see your code. This loop has a time limit...


`Ten seconds!!!
T = Timer()+10000

Repeat

`Code Here!

Until t <= Timer()

Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 17th Jun 2006 16:08
Two versions in 1 minute.

Dream And Death
18
Years of Service
User Offline
Joined: 21st Feb 2006
Location: The circus! Juggling job, kids and DBPro
Posted: 17th Jun 2006 19:42
And we both chose 10000? Great minds think alike!
Blobby 101
18
Years of Service
User Offline
Joined: 17th Jun 2006
Location: England, UK
Posted: 29th Jun 2006 19:22
thanks, that's a real help!

perfection is not achived, it is earned.

Login to post a reply

Server time is: 2024-09-25 01:31:07
Your offset time is: 2024-09-25 01:31:07