[fpc-pascal] Re: [Bulk] Re: Namespaces Support

Marco van de Voort marcov at stack.nl
Wed Oct 30 20:45:25 CET 2013

In our previous episode, Dmitry Boyarintsev said:
> I guess, technically it should be possible to use two different units with
> the same name.
> I recall there was a discussion a while (few years) ago, about (re)using
> Delphi introduced 'in' syntax (afaik, it is not available in pascal).
> uses
>   unitA in 'unitA.pas'
>   ,unitAA in '.\some\other\place\unitA.pas'
> Don't remember what was the conclusion of the conversation.
> Yet again, this "in" solution is only allowed at either "program" or
> "library" units.

What if unitaa needs recompilation, and it is not in the dir it was originally
compiled in. .\some\other\place then has a different meaning.

Specially if the relative paths are short (like ..\src\ or so), there is still
quite some room for clashes. 

That is probably the reason it is mainly used in the DPR, there relative
paths can be interpreted relative to the .dpr, and .dpr's are generally not
recompiled in other directories.

More information about the fpc-pascal mailing list