[fpc-devel] Multiple variable initialization
Alexander Grotewohl
alex at dcclost.com
Sat Mar 24 16:31:09 CET 2018
It sounds more like you're making a case for all integers to be
initialized to zero by default. I still fail to see any practical uses
other than wanting to not type "integer" twice.
Alex
On 03/24/2018 11:20 AM, Ondrej Pokorny wrote:
> On 24.03.2018 15:46, Alexander Grotewohl wrote:
>> The patch is to put them on separate lines. Preferably with
>> meaningful comments for each. If FPC was changed at the whim of every
>> programmer we'd end up with a huge mess that no longer resembles pascal.
>
> Please tell me who decides about the borderline between whim and
> usefulness.
>
> E.g. FPC supports initializing local variables, which Delphi and (if I
> am not mistaken) ISO Pascal don't support:
>
> procedure Test;
> var
> A: Integer = 0;
> begin
> end;
>
> Is it a whim as well? If FPC has this extension, why not to support
>
> procedure Test;
> var
> A, B: Integer = 0;
> begin
> end;
>
> ?
>
> Ondrej
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
More information about the fpc-devel
mailing list