Liberty BASIC Community Forum
« lbpro.exe using cpu time while not running? »

Welcome Guest. Please Login or Register.
Nov 22nd, 2017, 01:26am


Rules|Home|Help|Search|Recent Posts|Notification


« Previous Topic | Next Topic »
Pages: 1 2 3  Notify Send Topic Print
 veryhotthread  Author  Topic: lbpro.exe using cpu time while not running?  (Read 3679 times)
hooshnik
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 105
xx Re: lbpro.exe using cpu time while not running?
« Reply #30 on: Mar 12th, 2014, 08:42am »

Also when this happens the program will pretend everything went fine after clicking on the checkbox and other times it will crash with a branch label not found using exactly the same code. Why is it so inconsistent? It's either wrong or right not in between.
User IP Logged

looking for file "include" support? Check out Aplomb Scribe http://libertybasic.conforums.com/index.cgi?action=display&board=open&num=1434746448
Rod
Global Moderator
ImageImageImageImageImage


member is offline

Avatar

Graphics = goosebumps!


PM

Gender: Male
Posts: 5567
xx Re: lbpro.exe using cpu time while not running?
« Reply #31 on: Mar 12th, 2014, 12:16pm »

As has been said already, if the branch label can't be found it means your program was in a sub or function when the branch label event fired. You will randomly be inside subs or functions depending on what your program is doing, this is what drives the inconsistency.

Event driven programming isn't quite as linear as old fashioned BASIC.

But to get a specific answer you need to share the code, either that or start looking at how your program flows, where are events handled with wait and scan and so how is the event being handled in a location where the branch label is out of scope.
User IP Logged

hooshnik
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 105
xx Re: lbpro.exe using cpu time while not running?
« Reply #32 on: Mar 13th, 2014, 09:58am »

This problem did not occur in a sub...

When I make a spelling mistake on a branch label (for a checkbox in this case) liberty basic doesn't tell me the destination label doesn't exist. It goes on to compile and run. Furthermore it will only randomly report a branch label not found. What I'm saying is the compiler should report an error all the time and give me branch label not found all the time.

I could try to give you a proof on concept but random things are random things...
User IP Logged

looking for file "include" support? Check out Aplomb Scribe http://libertybasic.conforums.com/index.cgi?action=display&board=open&num=1434746448
hooshnik
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 105
xx Re: lbpro.exe using cpu time while not running?
« Reply #33 on: Mar 13th, 2014, 10:04am »

I don't think I can submit code because I can't recreate the bug. I think what had happened is I had some other buggy code that was aggravating the compiler but it would compile anyway.

The point is if the compiler would have just told me I had made a spelling mistake with a branch label it would have saved all the fuss. I just confirmed it right now. I added an "e" in the label and it compiled anyway.
« Last Edit: Mar 13th, 2014, 10:05am by hooshnik » User IP Logged

looking for file "include" support? Check out Aplomb Scribe http://libertybasic.conforums.com/index.cgi?action=display&board=open&num=1434746448
Pages: 1 2 3  Notify Send Topic Print
« Previous Topic | Next Topic »

Rules|Home|Help|Search|Recent Posts|Notification

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls