Re: What's the differences between REGISTER and AUTO?



Nick Keighley wrote, On 04/11/08 13:08:

<snip>

auto is used with variables to indicate they are not static
or external. That they are local to a function and are

Local to the block, which can be a smaller scope than the entire function.

(conceptually) created on entry and (conceptually) destroyed
on exit. A stack is often used to implement this.

int fred (void)
{
auto int i;
auto j

Missing semi-colon ;-)

}

the above are both legal. j is implicitly int (at least in the 1989
standard for C).

Illegal in C99 of course.

<snip good stuff>
--
Flash Gordon
If spamming me sent it to smap@xxxxxxxxxxxxxxxxx
If emailing me use my reply-to address
See the comp.lang.c Wiki hosted by me at http://clc-wiki.net/
.



Relevant Pages