[fpc-devel] Multiple variable initialization
lazarus at kluug.net
Sat Mar 24 16:07:26 CET 2018
On 24.03.2018 15:41, Michael Van Canneyt wrote:
> On Sat, 24 Mar 2018, Ondrej Pokorny wrote:
>> Is there a reason why multiple variable initialization is forbidden?
>> program Test;
>> A: Integer = 0; // allowed
>> B, C: Integer = 0; // not allowed
> I think this is confusing to read. Are B and C both initialized, or
> only B ?
It's not confusing at all. As Mattias said, Integer is both applied to B
and C, so should be "= 0".
Well I cannot think of a good reason to disallow it :) And nobody has
given a good reason yet.
More information about the fpc-devel