[fpc-pascal] Can variables be declared within a block?

Reimar Grabowski reimgrab at web.de
Mon Oct 18 21:09:52 CEST 2010


On Mon, 18 Oct 2010 19:21:57 +0100
Vannus <vannus at gmail.com> wrote:

> Since then, i would say "If you need vars throughout your code, then
> something is wrong with your code"
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?

R.
-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?



More information about the fpc-pascal mailing list