Joakim Hove wrote:
i have a quite large and unwieldy function with *many* local
variables. The various variables are typically only used in small
parts of the function, and I would like to define them locally:
You should break it up into multiple functions. It will read much
better, and can even generate the same code if you use the inline
directive (C99 and gcc).
Doing that can also handle the local initializations, because
function parameters are just initialized local variables. So many
of the variables should disappear. The paramatization and breakup
may well identify common code subsets.
--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!