t_bareproc.mod 291 B

1234567891011121314
  1. MODULE TBareProc;
  2. (* gm2 ext: a bare procedure *value* as a statement is an implicit
  3. zero-argument call (PROC is the PIM procedure-type keyword). *)
  4. VAR ExitCode : INTEGER;
  5. PROCEDURE hit;
  6. BEGIN ExitCode := 42 END hit;
  7. VAR p : PROC;
  8. BEGIN
  9. ExitCode := 0;
  10. p := hit;
  11. p
  12. END TBareProc.