[fpc-pascal] Changing variable in conditional

ik idokan at gmail.com
Tue Jan 8 09:52:58 CET 2013


On Tue, Jan 8, 2013 at 10:44 AM, Krzysztof <dibo20 at wp.pl> wrote:
> Hi,
>
> I like when Free Pascal trying to implement best practices from other
> languages. That was with increment variable using assign operator: i += 1.
> Anyway, few days ago I analyzed C++ code and I liked one syntax:
>
> if ( ( i = GetSomeValue ) >= 10 ) {
>   // variable "i" already has value returned by GetSomeValue
> }
>
> I wonder if FPC has equivalent for this.

No, and thanks Wirth for that, and for FPC/Delphi devs for not adding it up.
It's one of the worst possible features ever existed in programming
languages, and the cause for many bugs

>
> Regards
>
> _______________________________________________
> 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