|
Post by dutch8 on Jul 8, 2022 4:56:31 GMT -5
I'm new in Libertybasic, but have some experience with other programminglanguages. ?What is the Libertybasicstatement for
#include "programmadeel.bas"
so that I have to change this code one time only, and that all programs that use this code, all pickup the new version of programmadeel.bas? Editing one time only, and (re)compile all the programs that use programmadeel.bas
Thanks in advance.
|
|
|
Post by tsh73 on Jul 8, 2022 8:10:51 GMT -5
Hello dutch8 basically the answer is - No, you can't do that in native LB 4.x (this is something in next LB 5 what is still in the works, though libertybasiccom.proboards.com/thread/2017/liberty-basic-5-use-library) but there is a freeware editor by Alyce Watson alycesrestaurant.com/workshop.htm that supports many additional things, among them 'include filename.bas
(have read somewhere that it could not be *very first* line of a program, though)
|
|
|
Post by dutch8 on Jul 9, 2022 6:31:09 GMT -5
Thank you, moderator Tsh!
I think I will write my first Libertysourcecode in Liberty version 5. I suspect that is possibly the best way. Or do you think that I have to start in v4.5.1 because the new features in v5 are not stable enough?
My next steps will be: 1. install Liberty v5, 2. parameterizing the subroutine or function, to let it communicate with my main programs, via input- and givebackparamaters.
:-)
|
|
|
Post by tsh73 on Jul 9, 2022 7:09:01 GMT -5
only thing I say would be - it depends on your needs. LB 4.x does not having include statement did not prevented people from using it, so far.
|
|
|
Post by Brandon Parker on Jul 9, 2022 18:44:54 GMT -5
dutch8, I created a tool using Liberty BASIC itself that allows for "Include" files and much more. It is more of a preprocessor for LB 4.x and includes/allows for some nice features IMO. You can find the forum for it at the link below. LB Import Architect{:0) Brandon Parker
|
|
|
Post by dutch8 on Jul 10, 2022 16:21:36 GMT -5
Thank you, Tsh, and thank you, Brandon.
|
|
|
Post by dutch8 on Jul 11, 2022 10:47:55 GMT -5
Brandon: I checked your forum. Can you give me the url of your item about the precompiler on your forum please?
Tsh: What is wrong or missing in my code? I get the error: "CompileError - SUB not defined, call TestSub01 invoer kwadraat" using the mainprogram source:
library "e:\bron\Liberty\Incl\TestSub01.bas", #lib
input invoer
call TestSub01 invoer kwadraat
print kwadraat
end
and the subroutine source:
sub TestSub01 ibegin byref uterug
uterug=ibegin ^ 2
end sub
|
|
|
Post by tsh73 on Jul 11, 2022 11:12:45 GMT -5
|
|
|
Post by dutch8 on Jul 11, 2022 13:13:11 GMT -5
Thank you, Tsh!
|
|