Scope control

The keyword static is implemented for data local to function, but not for data local to files. As a consequence, a global variable cannot be hidden to other compilation units. In other words, all global variables can be referenced via extern declarations.

static int x ; // not supported

void f()
{
  static char c ; // supported
  /* ... */
}

The keyword extern is implemented, so you can use extern to reference entities which are defined within another compilation unit, or manually located entities (see next section).



AG 2013-04-10