[fpc-devel] Declare variables inside the code
Vinzent Höfler
JeLlyFish.software at gmx.net
Wed May 11 00:13:18 CEST 2011
On Tue, 10 May 2011 23:48:30 +0200, Joerg Schuelke <joerg.schuelke at gmx.de>
wrote:
> Am Tue, 10 May 2011 18:41:35 -0300
> schrieb "kingbizugo at gmail.com" <kingbizugo at gmail.com>:
>
>> Some small details can also increase
>> the community.
>>
>> Lets see the OOP, its very helpful and speedup a lot the work and has
>> been added to the Pascal. Same for generics.
>
> To decide that a declaration is a statement and can occur everywhere
> where a statement is required, is not that small you think. This has
> many consequences, influencing the whole code generation process.
You mean, just like try/finally blocks? ;)
FWIW, a declaration is not a statement here:
Swap_And_Ignore_Exceptions :
declare
Temp : Integer;
begin
Temp := X;
X := Y;
Y := Temp;
exception
when others =>
null;
end;
Ada compilers can happily handle that since the mid-80s, so I don't
see why doing it a quarter of a century later would suddenly be a
problem. Apart from that I don't want to see it in Pascal, as it
does not make sense there unless you go down the whole way...
Vinzent.
More information about the fpc-devel
mailing list