You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if it's beyond the scope of this language given how its a bit tongue in cheek but it would be nice to have the ability to split a program up into components and then include them aka the COBOL INCLUDE statement.
You could within the DATA division allow an INCLUDE statement with similar syntax to COBOL:
DATA:
INCLUDE member-name.ldpl
INCLUDE another-member-name.ldpl
Or maybe have an additional INCLUDE division?
In either case the include could act as a "copy-paste" merging the DATA and PROCEDURE divisions of the included source into the requesting file in the order in which they are included.
You could go one further and allow the INCLUDE statement in the PROCEDURE division to open the possibility of dynamic includes ;)
In adding includes it opens this language up to the entertaining possibility of libraries.
The text was updated successfully, but these errors were encountered:
Yes! It's been planned. At the moment, in fact, you can do ldpl -i=file1.ldpl -i=file2.ldpl mysource.ldpl to include file1.ldpl and file2.ldpl into mysource.ldpl. I will add the include statement as soon as I can though!
I had been trying to think of interesting things I could build with this language for the fun of doing so and was reminded of the 1991 web framework written in Forth. I'm not entirely sure it's possible to do in ldpl but it would be fun trying.
Not sure if it's beyond the scope of this language given how its a bit tongue in cheek but it would be nice to have the ability to split a program up into components and then include them aka the COBOL
INCLUDE
statement.Given a directory structure like so:
You could within the
DATA
division allow anINCLUDE
statement with similar syntax to COBOL:Or maybe have an additional
INCLUDE
division?In either case the include could act as a "copy-paste" merging the
DATA
andPROCEDURE
divisions of the included source into the requesting file in the order in which they are included.You could go one further and allow the
INCLUDE
statement in thePROCEDURE
division to open the possibility of dynamic includes ;)In adding includes it opens this language up to the entertaining possibility of libraries.
The text was updated successfully, but these errors were encountered: