Files passed to -i= on the command line are being compiled in the reverse order given, leading to (unexpected?) dependency issues.
For example:
$ cat a.ldpl
DATA:
a is text
$ cat b.ldpl
DATA:
b is text
PROCEDURE:
store "yay" in a
$ cat c.ldpl
PROCEDURE:
display a crlf
display b crlf
$ ldpl -i=a.ldpl -i=b.ldpl c.ldpl
LDPL Error: Malformed statement (b.ldpl:5)
This errors because b.ldpl is actually compiled first right now. With this patch, running the same code above preserves the compilation order:
$ ldpl -i=a.ldpl -i=b.ldpl c.ldpl
LDPL: Compiling...
* File(s) compiled successfully.
* Saved as c-bin
$ ./c-bin
yay
I know we're going to rework -i in the future but I thought this might be worth changing now.
Files passed to
-i=
on the command line are being compiled in the reverse order given, leading to (unexpected?) dependency issues.For example:
This errors because
b.ldpl
is actually compiled first right now. With this patch, running the same code above preserves the compilation order:I know we're going to rework
-i
in the future but I thought this might be worth changing now.