#include <stdio.h>
void foo(void)
{
printf("I'm a function call inside of foo\n");
}
void bar(void)
{
printf("I'm a function call inside of bar\n");
}
int main(void)
{
int x = 1;
while(x) {
foo();
bar();
}
return 0;
}
What prevents bar() from executing before foo() is finished in this
while loop?
Chad
The definition of the C language, which says that statements are
executed in sequence, one after another.
--
Larry Jones
They say winning isn't everything, and I've decided
to take their word for it. -- Calvin
That the compiler generates code which calls foo, and then calls bar.
Calling a function doesn't complete until the function returns.
(There's some weird exceptions, involving things like "setjmp",
but you probably never need to know.)
-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / usenet...@seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!