[fpc-pascal] Re: Identifier not found "result"

Giuliano Colla giuliano.colla at fastwebnet.it
Sun Sep 2 12:39:30 CEST 2012

Il 31/08/2012 13:48, leledumbo ha scritto:
>> I question your assumption that
> "Result" is specifically more important than the other incompatibilities
> among different modes (i.e. your statement that it "will help...a lot"). I
> do not say that it is wrong to be more helpful in error messages, but
> rather that your proposal tries to "fix" a very small fragment of
> something much more general and moreover that the proposed message may be
> very easily misleading as already demonstrated by Mark. Yet other cases
> might not be detected by the compiler at all:
> +1. Since Result is not really special, i.e. it can be declared by user, it
> would be difficult to detect whether it's user's intention or not.
Treating just Result as a special case might not be worth while.

However a more general feature could perhaps be useful:
as the compiler knows all the keywords of all its modes, if an 
unresolved identifier happens to match a keyword of a different mode, a 
warning, sort of "wrong mode?" could be added. The overhead should be 
negligible, because it would occur only in case of unresolved 
identifier, and after a few of them compilation is stopped in any case.


More information about the fpc-pascal mailing list