[fpc-devel] fpc-devel Digest, Vol 178, Issue 38

Martin Frb lazarus at mfriebe.de
Thu Feb 21 18:34:34 CET 2019


On 21/02/2019 17:05, Nikolai Zhubr wrote:
>
> Actually no. Inline declarations (where implemented) are not limited 
> to a loop index and not even limited to a loop. If you have an option 
> to declare some few variables locally to some code block (e.g. FOR, as 
> well as IF, CASE, WHILE, etc), in case you know for sure from their 
> meaning that their values just make no sense outside of this very 
> block, you would know they do not leak out accidentally. This is 
> certainly not the same as detecting uninitialized variables. A 
> variable might be technically initialized, but at the same time its 
> value might make no sense outside of some scope (for the reasons of 
> your business logic or whatever else considerations).
>
Search the forum and mail history. The discussion has been add several 
times. And there are plenty of more examples, why it is not good.
No point in repeating them. Especially not, since the decision has afaik 
already been made long ago.





More information about the fpc-devel mailing list