[fpc-pascal] Re: How to avoid namespace name clashes after USES ?
Sven Barth
pascaldragon at googlemail.com
Tue Aug 21 15:00:49 CEST 2012
Am 21.08.2012 14:10, schrieb Jorge Aldo G. de F. Junior:
> "With no error messages, or even with no changes to the program since 1
> and a half year in the repository, the scientific calculations are now
> all blown up, and program outputs only errors at runtime. The maintainer
> now curses and chases me for having the nerve to leave a program
> known as working in such a horrible mess in the repository."
>
> Never tested, but doesnt the compiler warn of the colision ? if not, it should.
>
> Usually i prefix my symbols with some meaningfull prefixes to avoid
> collision. I never have two symbols with the same name and i hardly
> used unit prefixes in the past.
>
> But a collision warning from the compiler would be helpfull.
Units provide a namespace, so UnitA.Foo is not the same as UnitB.Foo.
Thus it is perfectly allowed and valid and sometimes also common to have
a collision here. [also the compiler stops looking for further symbols
if it has found the first one => one of the reasons for the high
compilation speed]
Regards,
Sven
More information about the fpc-pascal
mailing list