LB Booster
Programming >> Language extensions >> !include http://lbb.conforums.com/index.cgi?board=extensions&action=display&num=1481595219 !include
Post by Alincon on Dec 13th, 2016, 01:13am
I have used this successfully as last stmt in pgm Code:
!include lb45func.bas
But I am having problems trying to include other pieces of code. I keep getting a 'mistake' error on the !include line. I do put the !include in column one. Does the module being included have to be in the LBB folder? Are there restrictions on what code can be 'included'? Can I include basic code that is in a file with a file extension other than 'bas'? Any other things I may have missed in the documentation?
r.m. Re: !include
Post by Richard Russell on Dec 13th, 2016, 08:28am
I am having problems trying to include other pieces of code. I keep getting a 'mistake' error on the !include line.
You are using the wrong syntax: it's not !include but 'include: the initial character must be an apostrophe ('), not an exclamation point (!). This is so the directive appears as an ordinary comment to LB 4 and is ignored; Liberty BASIC Workshop uses the same syntax (although the include feature works somewhat differently).
Quote:
I do put the !include in column one.
In LBB v3.07 it is no longer necessary to start the 'include in column 1.
Quote:
Does the module being included have to be in the LBB folder? Are there restrictions on what code can be 'included'? Can I include basic code that is in a file with a file extension other than 'bas'?
None of those restrictions apply so long as you specify a full file path, name and extension.
Richard. Re: !include
Post by Alincon on Dec 13th, 2016, 4:07pm
Well, I've misread the obvious before and I'll probably do it again. Thanks for setting me straight. Again.