[fpc-devel] Strange behaviour of ;
Tomas Hajny
XHajT03 at mbox.vol.cz
Fri Oct 21 23:25:55 CEST 2005
Date sent: Fri, 21 Oct 2005 09:46:05 +0200 (CEST)
Subject: Re: [fpc-devel] Strange behaviour of ;
From: "Peter Vreman" <peter at freepascal.org>
To: "FPC developers' list" <fpc-devel at lists.freepascal.org>
Send reply to: FPC developers' list <fpc-devel at lists.freepascal.org>
<mailto:fpc-devel-request at lists.freepascal.org?subject=unsubscribe>
<mailto:fpc-devel-request at lists.freepascal.org?subject=subscribe>
> > 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);
^
Tomas
More information about the fpc-devel
mailing list