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

2010-10-21 Thread leledumbo
> This argument can be used to promote each and every change, no matter how obscure it is. > But you forget that you may be forced to read code from other people in > which case you are > suddenly confronted with such weird constructs. Then it does not help that > you had guidelines > for your

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

2010-10-19 Thread Vinzent Höfler
On Tue, 19 Oct 2010 02:07:25 +0200, Dimitri Smits wrote: on the other hand, what stops the OP from using 'with'? (multiple levels/variables?) "with" contaminates the name space. Locally scoped variables don't. and you won't die from using another stack variable scoped at the beginning of

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

2010-10-18 Thread Dimitri Smits
- "Bernd Kreuss" schreef: > On 18.10.2010 15:19, Lukasz Sokol wrote: > > > Having variables declared within code block used to require to parse > the source code > > at least 2 times > > Or create them on the stack at the begin and remove them at the end > of > the block (which would be th

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

2010-10-18 Thread Bernd Kreuss
On 18.10.2010 15:19, Lukasz Sokol wrote: > Having variables declared within code block used to require to parse the > source code > at least 2 times Or create them on the stack at the begin and remove them at the end of the block (which would be the only way to have some additional functionality

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

2010-10-18 Thread Lukasz Sokol
On 18/10/2010 13:58, Frank Church wrote: > On 18 October 2010 07:49, Florian Klaempfl wrote: [...] >>> No. >>> >> > > That is a rather emphatic no :). > Is there some performance or other related reason why it is a bad idea? I'm > not knowledgeable in this area but I'd like to know. > > Som