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

Rainer Stratmann RainerStratmann at t-online.de
Thu Aug 30 18:26:26 CEST 2012


Am Thursday 30 August 2012 18:07:13 schrieb Jonas Maebe:
> On 30 Aug 2012, at 17:14, Rainer Stratmann wrote:
> > TP for DOS at
> > least supports a function result (as I remember) thus it is not Delphi
> > only as you mention.
>
> Turbo Pascal does not support the "result" alias for the function result.
>
> > What's wrong with such a message that is easy to implement and will help
> > beginners to freepascal a lot?
>
> We give such a message when someone tries to define a "class" type without
> having ObjFPC/Delphi mode activated. That is a message that is always
> correct, because
>
> type
>   tsomething = class
>   end;
>
> does not and cannot have any other meaning in another compilation mode. As
> has been pointed out by other people, that is not true for random
> occurrences of the word "result" in the source code.

Even then the message
"are you in the right 
syntax-mode? only ObjFPC (-MObjfpc) or Delphi (-Mdelphi) mode supports a 
function result"
can not be wrong. Added to this that the occurence of the identifier "result" 
not using in combination with a function result is very unlikely. I think 
99,99% has to do with the scenario that I described. And maximum in one of a 
thousand cases it is the scenario that has been pointed out above.

>
> Jonas
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal





More information about the fpc-pascal mailing list