Rainer Stratmann wrote:
Am Thursday 30 August 2012 14:39:06 schrieb leledumbo:
Since this behavior is documented, one should read the documentation first:
http://www.freepascal.org/docs-html/ref/refse76.html
There is much documentation spread over many servers.
Anyway, how could one find that Result is used as function result without
reading the docs?
The scenario occures when someone starts freepascal as I already documented in
my first E-Mail.
When someone wants to compile a TurboPascal or Delphi program with freepascal.
Then he already knows that result is a function result, but freepascal gives
an error about this.
I agree. However I don't know whether a blanket "you're in the wrong
mode, lackwit!" error message would be a solution, since it's possible
to envisage cases where result is an ordinary variable and should be
referenced as such- irrespective of mode.
procedure xxx(var result2: yyy);
begin
result := zzz
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal