static (--)

Inputs

Outputs

static is reserved and may appear in MPL source, but it has no documented standalone effect.

It neither creates nor clears pending declaration modifiers. In particular, it does not set the pending static specifier used by virtual, and it does not affect pending overload or private specifiers.

Behavior

Example

{} 0 {} [
  static static ordinaryLocal: 1;
  virtual staticLocal: 2;

  "-- static does not declare a static local --" printCompilerMessage
  ordinaryLocal printStack _:;

  "-- virtual does declare a static local --" printCompilerMessage
  staticLocal printStack _:;

  0
] "main" exportFunction

Expected Output During Compilation

-- static does not declare a static local --
1 Cref
-- virtual does declare a static local --
2

See also