lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


* David Kastrup:

> "Warlich, Christof" <christof.warlich@thermofisher.com> writes:
>
>>> You've been using C/C++ too long :)
>> Probably ;).
>
> I don't think that I have seen any C++ style guide encourage anything
> but block local loop variables, written like
>
> for (int i=0; i<j; i++) ...

You'll certainly find style guides which advocate the opposite.  There
used to be a time when different compilers had different ideas about
the scope of variables defined this way.