[fpc-pascal] Changing variable in conditional

Michael Fuchs freepascal at ypa-software.de
Tue Jan 8 09:52:53 CET 2013


Am 08.01.2013 09:44, schrieb Krzysztof:
> 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.

I hope not.

Why do you use Pascal if you want this ugly C-crap-style?
Even the i += 1 is a sin.

*shudder*
Michael




More information about the fpc-pascal mailing list