LB Booster
« Why no error message? »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 03:52am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Why no error message?  (Read 343 times)
Alincon
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 147
xx Why no error message?
« Thread started on: Apr 19th, 2015, 9:35pm »

Why does this code execute with out an error message of some kind?

Code:
    STATICTEXT #credit.st0, "Name", 20, 40, 50, 20
    TEXTBOX #credit.tbFname, 80,40,110,25   

    open title$ for window as #credit
    #credit, "trapclose [creditExit]"
    #credit.tbFnam, "Richard"   'textbox name is mis-spelled
    wait

 [creditExit]
    close #credit
    end
 
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Why no error message?
« Reply #1 on: Apr 19th, 2015, 10:10pm »

on Apr 19th, 2015, 9:35pm, Alincon wrote:
Why does this code execute with out an error message of some kind?

LBB can't report an error at compile-time, because it's possible the 'mis-spelled' handle is created at run time using MAPHANDLE, so is actually correct.

It would be possible to report an error at run-time, but LBB generally does relatively little run-time error checking, principally to improve performance (checking that the handle is valid would take time).

It's a difficult balancing act. Is it better to impair performance every time the program is run in order to catch an error during program development? I suppose, in principle, one could have two different run-time engines - one used during development with lots of error checking and another used for the final version with the error checking omitted.

If you feel this is a case when I've made the wrong call I can consider adding a run-time check in the next release (if there is one!).

Richard.

User IP Logged

RNBW
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 106
xx Re: Why no error message?
« Reply #2 on: Apr 19th, 2015, 10:39pm »

Just an observation: although it doesn't actually report an error, it doesn't print "Richard" in the textbox. If you were expecting text in the textbox, it would tell you something was wrong whilst debugging.

Ray
User IP Logged

Alincon
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 147
xx Re: Why no error message?
« Reply #3 on: Apr 20th, 2015, 01:46am »

Richard, I just wanted to know why no message, and your explanation is reasonable. Certainly don't need two run-time engines.
The next time, I'll know where to look.

r.m.
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