tbs0214.pp 664 B

1234567891011121314151617181920212223242526272829
  1. { $OPT=-St }
  2. Program SttcTest;
  3. { Note: I've cut a lot out of this program, it did originally have
  4. constructors, destructors and instanced objects, but this
  5. is the minimum required to produce the problem, and I think
  6. that this should work, unless I've misunderstood the use of
  7. the static keyword. }
  8. Type
  9. TObjectType1 = Object
  10. Procedure Setup; static;
  11. Procedure Weird; static;
  12. End;
  13. Procedure TObjectType1.Setup;
  14. Begin
  15. End;
  16. Procedure TObjectType1.Weird;
  17. Begin
  18. End;
  19. Begin
  20. TObjectType1.Setup;
  21. TObjectType1.Weird;
  22. TObjectType1.Weird; // GPFs before exiting "Weird"
  23. Writeln('THE END.');
  24. End.