lanceboyle@qwest.net wrote:
I have a unit named Head which exports a single procedure also named Head. In the calling program, the compiler (20050331) generates an error, "statement used as expression." The docs don't seem to say anything about a name limitation. Have my previous two Pascals let me get away with something naughty? Of course, renaming either the unit or the procedure fixes the problem.
Yes, due to qualified identifiers (which GPC didn't support until somewhat more than a year ago), unit names (more precisely, interface names) conflict with declarations.
BTW, which previous Pascals (unless you mean earlier GPC versions) allow this? Borland Pascal doesn't, AFAIR.
Frank