Re: [fpc-pascal] Weird absence of compilation error

2013-03-21 Thread OBones
Tomas Hajny wrote: What I was expecting is that the compilation fails in all cases. Is there some flag that I failed to specify? You can add {$X-} to the top (i.e. disable the so-called extended syntax allowing to treat functions like procedures) and then it fails. However, I think that it shoul

Re: [fpc-pascal] Weird absence of compilation error

2013-03-21 Thread OBones
be ignored by the compiler. A '-' (minus) would force some action, so it is absolutely wrong at this place. Thanks for the explanation on the behavior. - Original Message - From: "OBones" To: "FPC-Pascal users discussions" Sent: Thursday, March 21, 2013

Re: [fpc-pascal] Weird absence of compilation error

2013-03-21 Thread Tomas Hajny
On Thu, March 21, 2013 10:53, OBones wrote: Hello, > I'm using FPC 2.6.0 and have the following test program : > > program test; > > function Element: Double; > begin >Result := 4; > end; > > function Tmp: Double; > begin >Result := 10; + Element; > end; > > begin >WriteLn(Tmp); > en

Re: [fpc-pascal] Weird absence of compilation error

2013-03-21 Thread Gerhard Scholz
scussions" Sent: Thursday, March 21, 2013 10:53 AM Subject: [fpc-pascal] Weird absence of compilation error Hello all, I'm using FPC 2.6.0 and have the following test program : program test; function Element: Double; begin Result := 4; end; function Tmp: Double; begin Result

[fpc-pascal] Weird absence of compilation error

2013-03-21 Thread OBones
Hello all, I'm using FPC 2.6.0 and have the following test program : program test; function Element: Double; begin Result := 4; end; function Tmp: Double; begin Result := 10; + Element; end; begin WriteLn(Tmp); end. And quite surprisingly to me, both ppc386 and pccrossx64 compile it s