[fpc-devel] Declare variables inside the code

Joerg Schuelke joerg.schuelke at gmx.de
Wed May 11 14:06:17 CEST 2011


Am Wed, 11 May 2011 12:26:09 +0200
schrieb Michael Schnell <mschnell at lumino.de>:

> Readability problems might arise regarding the scope of equally named 
> variables. Pascal ovoid much of this.

I agree,

and somebody will then come and suggest:

Lets do it this way.

var a:integer;
begin
  some code using a;
    var a:integer;
    begin
      some code using the inner a;
    end;
  some code using the outer a;
end;

and we are one step closer to C++ with pascal keywords.
OK, it could be done. But should it?, I think not.

	Jörg



More information about the fpc-devel mailing list