Braces also define the scope of a function's body. Variable names declared locally can be contained anywhere between the braces. One minor break in the rules is that any parameters declared in the function header are also considered to be inside the function's scope (whereas the function name itsef is not). e.g. in
int Function(int a, int b) {
int c = a + b;
}
all the names a, b and c are considered local to the function. The name Function is non-local.
Copyright © 2003 Roger Hartley