[Seed7-users] Include Bug
Interpreter and compiler for the Seed7 programming language.
Brought to you by:
thomas_mertes
From: Zaakari <Za...@pr...> - 2021-09-11 16:56:03
|
Hey Thomas, It seems I have stumbled across an error regarding includes. Say my folder structure is like so: - test/ - test.sd7 - code/ - point.s7i - editor_point.s7i Within point.s7i is a structure named "Point", and within editor_point.s7i is a structure named "EditorPoint" which is a sub structure of "Point". Now if test.sd7 includes editor_point.s7i, which in turn includes point.s7i, all is fine. However, if I change my folder structure (and includes) to this: - test/ - test.sd7 - code/ - editor/ - point.s7i - general/ - point.s7i Then the program fails saying it can't find a match for "Point". It doesn't say that it couldn't find the include file "general/point.s7i"; it just seems to skip reading its contents (or something). I'm pretty sure there aren't any other errors, because if I include "general/point.s7i" in test.sd7 then the program works. But that shouldn't be necessary, as it's all ready being included through "editor/point.s7i". I've attached a zip file containing an example program. If you run it, it will crash, but if you un-comment line #2 in test.sd7 (which includes "general/point.s7i"), then it succeeds. So, this error seems to arise when an included file includes another file in different (non-child) directory. If you would take a look at this, I would be grateful. Thanks, Zachary |