BBC BASIC for Windows
« WAIT Command without halting? »
Welcome Guest. Please Login or Register. Apr 6th, 2018, 12:02am
ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018. Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.
If you require a dump of the post on your message board, please come to the support board and request it.
Re: WAIT Command without halting?
« Reply #3 on: Oct 21st, 2012, 3:30pm »
So if i used:
Task1% = TIME Task2% = TIME REPEAT WAIT 1 : REM Release the CPU to other processes IF (TIME - Task1%) > 100 THEN Task1% = TIME PRINT "hello" ENDIF UNTIL FALSE
So if i used [code snipped] It would print hello once every second?
Why are you asking when it takes only a moment to try it? One of the advantages of an interpreted language like BBC BASIC is that you get instant results - copy-and-paste the code into the BB4W editor and click 'Run'!
Re: WAIT Command without halting?
« Reply #6 on: Oct 21st, 2012, 5:04pm »
Sorry, Task1% = TIME Task2% = TIME REPEAT WAIT 1 : REM Release the CPU to other processes IF (TIME - Task1%) > 100 THEN Task1% = TIME PRINT "hello" ENDIF UNTIL FALSE This worked but wehen i tried incorporating it in my program it didnt