Tomas Hajny wrote:
> Date sent:            Fri, 21 Oct 2005 09:46:05 +0200 (CEST)
> Subject:              Re: [fpc-devel] Strange behaviour of ;
> From:                 "Peter Vreman" <[EMAIL PROTECTED]>
> To:                   "FPC developers' list" <fpc-devel@lists.freepascal.org>
> Send reply to:        FPC developers' list <fpc-devel@lists.freepascal.org>
>       <mailto:[EMAIL PROTECTED]>
>       <mailto:[EMAIL PROTECTED]>
> 
>>>Marc Weustink wrote:
>>>
>>>>It looks like "+ <some call>" is parsed wrong. The next "program"
>>>>compiles fine.
>>>
>>>Well, the compiler/parser thinks you use the unary + operator which
>>>it can safely throw away :) IIRC TP accepted the unary + operator
>>>for any expression so we did.
>>
>>Delphi doesn't allow it. a single '+ <x>' is not changed implicitly to
>>'0 + <x>' so that there is checking done instead of ignoring the the
>>'+'.
> 
> 
> TP/BP doesn't allow it either:
> 
> Turbo Pascal  Version 7.0  Copyright (c) 1983,92 Borland 
> International
> T.PAS(3): Error 113: Error in statement.
>   + ParamStr(0);

But it allows
s:=+ParamStr(0);
iirc

>   ^
> 
> Tomas
> _______________________________________________
> fpc-devel maillist  -  fpc-devel@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
> 

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to