Re: [Seed7-users] Include Bug
Interpreter and compiler for the Seed7 programming language.
Brought to you by:
thomas_mertes
From: Zaakari <Za...@pr...> - 2021-09-20 22:05:51
|
Ah, I see. Well don't sweat too much over it. Either I'll have a complicated directory structure with simple file names, or I'll have complicated file names with a simple directory structure. So, feel free to leave it how it is. Thanks, though, for sharing the ins and outs of how the includes work, Zachary ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Friday, September 17th, 2021 at 1:35 PM, Thomas Mertes <tho...@gm...> wrote: > Hi Zachary, > > Seed7 has a mechanism to avoid that the same library is included twice. > You can see this mechanism at the end of seed7_05.s7i. > A map of file names (not paths) is used to avoid that the same library is included twice. > You have two include files with the name point.s7i (in different directories). > This mechanism skips the second attempt to include point.s7i. > If you name the files different the problem will be gone. > > To solve your problem there must be a map of absolute paths, instead of a map of file names. > It should be the absolute path of the actual include file, not the path from the include statement. > > Possibly, the PRIMITIVE_INCLUDE() function could be changed to return the absolute path of the > actual include. I have to think it over to come to a good solution. > > In the meantime, you can circumvent the problem by giving your include files unique names. > > Regards, > Thomas |