// Forward declaration:
Procedure newhook (); Forward;

// Main function:
Procedure main ();
Begin
  WriteLn('main();');
  NewHook ();
  return;
End;

Procedure hookthink ();
Begin
  WriteLn('self.hi = %f', self.hi);
  Remove(self);
End;

Procedure NewHook ();
Begin
  local entity hook;

  hook := spawn ();
  self := hook;
  self.hi := 1;
  self.health := 100;
  self.think := hookthink;
  self.nextthink := time + 0.1;
  return;
End;
