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

Bernd Kreuss prof7bit at googlemail.com
Mon Oct 18 16:12:20 CEST 2010


On 18.10.2010 15:55, Frank Church wrote:

> I understand the need to avoid stuff that could create unintended errors

It would create something that I would call "irregularity" (or even
ugliness) in the language grammar. Nowhere else is it ever allowed to
have certain things inside a begin/end block, type, const, var are all
only allowed in the *same* certain places outside of such blocks.
Allowing var would also raise the question why not also allow type and
const and this would open a can of worms. It would destroy some (much)
of the simplicity (regularity, strictness, beauty, I don't know a better
word) of the grammar.

Bernd



More information about the fpc-pascal mailing list