Walter Bright wrote:
language_fan wrote:
Maybe Walter has not yet transitioned from the good olde Pascal/C
style programming to the C++/D/Java style?
Heh, there's still a Fortran influence in my code <g>.
This may be a good time to ask about how these variables which can be
declared anywhere in the function scope are implemented.
void bar(bool foo) {
if(foo) {
int a = 1;
...
}
else {
int a = 2;
...
}
}
is the stack frame using two ints, or is the compiler seeing only one? I
never bothered to check it out and just declared 'int a = void;' at the
beginning of the routine to keep the stack frames as small as possible.