LB Booster
« includesKey not understood »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 04:23am



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: includesKey not understood  (Read 181 times)
Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx includesKey not understood
« Thread started on: Apr 26th, 2016, 4:03pm »

Liberty BASIC is arguably inconsistent in the way parameters are passed to functions and subs. A function's formal parameters must be enclosed in parentheses but a sub's formal parameters must not be enclosed in parentheses.

If you accidentally put a sub's formal parameters in parentheses LB doesn't detect the problem at 'compile time' but issues the non-obvious "includesKey:" not understood error at runtime:

Code:
    call world b$
    print b$
    end

sub world (byref b$)
    b$ = "Hello world!"
end sub 

Fortunately LBB detects the problem at compile time and reports a 'Syntax error' before even trying to run the program.

I don't want to imply that LBB is always better at reporting errors than LB - that is far from the case - but in this specific instance it happens to be.

Richard.
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