[fpc-pascal] uses in '' relative paths

Marcos Douglas B. Santos md at delfire.net
Thu Oct 8 14:37:06 CEST 2020


On Wed, Oct 7, 2020 at 2:02 PM Mattias Gaertner via fpc-pascal
<fpc-pascal at lists.freepascal.org> wrote:
>
> On Wed, 7 Oct 2020 10:53:16 -0600
> Ryan Joseph via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
>
> > I'm trying "uses in" which I never knew existed before.
> >
> > The idea is that I provide a path to TOML.pas using -Fu then use the
> > "in" syntax to reference the units which are in a subdirectory. This
> > makes it safe from the project importing the unit so any private
> > units in the subdirectory don't override units from the importing
> > project.
> >
> > unit TOML;
> > interface
> > uses
> >   TOMLParser in '/sources',
> >   TOMLTypes in '/sources';
>
> uses
>   TOMLParser in 'sources/TOMLParser.pas',
>   TOMLTypes in 'sources/TOMLTypes.pas';
>
> Not Delphi compatible.

I think this works even on Delphi 7...

best regards,
Marcos Douglas


More information about the fpc-pascal mailing list