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

Sven Barth pascaldragon at googlemail.com
Tue Oct 19 09:25:20 CEST 2010


Am 18.10.2010 20:21, schrieb Vannus:
>
> On 18 October 2010 15:33, Sven Barth <pascaldragon at googlemail.com
> <mailto:pascaldragon at googlemail.com>> wrote:
>
>     Am 18.10.2010 16:20, schrieb Michael Van Canneyt:
>
>         Object Pascal is a simple, beautiful and easy to read language.
>         The FPC
>         team tries to keep it that way.
>
>
>     And that is why I like the FPC team so much. :D
>
>
> agreed.
>
> When I went from C++ to Pascal back in 98/99, I found it quite hard
> initially. Not being able to put variables anywhere & everywhere was
> really awkward, but it dawned on me that I shouold be coding better.
> Since then, i would say "If you need vars throughout your code, then
> something is wrong with your code"

Makes you wonder why the ReactOS devs always declare their variables at 
the beginning of the functions (they're using C). :P Take a look at the 
source files of ntoskrnl for example.

Regards,
Sven



More information about the fpc-pascal mailing list