Reimar Grabowski schrieb:
for (int i = 0;...)
Can't see anything wrong. I use declaration of variables inside blocks quite often in Java and C++
but have never missed it in pascal. Please enlighten me. What is so bad about creating temporary variables
inside blocks instead of the beginning of a function in a language that supports it?
I never thought about doing such declarations in Pascal.
Although I would not be against it in general (provided
that all identifiers have to be different) I see one
(small) disadvantage:
If you want to know the number of bytes pushed to the stack
(i.e. in a recursive function) then you don't have the declarations
at one place anymore but they are spread over the code which
would make it hard to get an overview.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal