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.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: WAIT Command without halting?  (Read 856 times)
Usama Amin
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 18
question 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

It would print hello once every second?
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
question Re: WAIT Command without halting?
« Reply #4 on: Oct 21st, 2012, 5:02pm »

on Oct 21st, 2012, 3:30pm, Usama Amin wrote:
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'!

Richard.
User IP Logged

Usama Amin
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 18
question Re: WAIT Command without halting?
« Reply #5 on: Oct 21st, 2012, 5:03pm »

It didnt work sad
User IP Logged

Usama Amin
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 18
question 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 cry
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: WAIT Command without halting?
« Reply #7 on: Oct 21st, 2012, 9:26pm »

on Oct 21st, 2012, 5:04pm, Usama Amin wrote:
This worked but wehen i tried incorporating it in my program it didnt cry

I'm afraid that's your problem! Use the debugging tools available to you to find out why it's not working.

Richard.
User IP Logged

Usama Amin
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 18
question Re: WAIT Command without halting?
« Reply #8 on: Oct 22nd, 2012, 4:43pm »

I got it working thatnks for the advice Richard! grin
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls