So (Sven) to clarify, assume that your original ifthen [patch is now in latest svn compiler although more work will needed to do x:=if a then b else c;? j
On 2 February 2016 at 18:33, Sven Barth <pascaldra...@googlemail.com> wrote: > On 02.02.2016 10:25, Michael Schnell wrote: > > On 02/01/2016 09:35 PM, Maciej Izak wrote: > >> > >> > >> x := if true then 0 else 1 > > > > Here a keyword and a statement just optionally returns a value, Same is > > ignored in all legacy code but can be use it you want to and do know > > what you do. > > > > Additionally "0" now is a statement, (optionally) extending what is > > considered a statement. > > Why would "0" now be a statement? As long as the "if" is the expression > as well then the definition would be "if Condition then ThenExpr else > ElseExpr", not "if Condition then ThenStmt else ElseStmt". Otherwise > things like procedures ore assignments would be allowed as well which is > not the case. > > > > > This is a rather drastic change in the basic definition of the language, > > but might be doable. I's completely optional, and I don't see how it > > might break anything. > > Of course it's doable. See the patch I attached at the initial mail of > this thread. > > Regards, > Sven > _______________________________________________ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal >
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal