tstatic5.pp 993 B

12345678910111213141516171819202122232425262728293031323334353637
  1. program tstatic5;
  2. {$APPTYPE console}
  3. {$ifdef fpc}
  4. {$mode delphi}{$H+}
  5. {$endif}
  6. type
  7. { TSomeClass }
  8. TSomeClass = class
  9. public
  10. class var
  11. FSomethingStatic: Integer;
  12. FSomethingStatic1: String;
  13. class procedure SetSomethingStatic(AValue: Integer); static;
  14. var
  15. FSomeRegularField: Integer;
  16. FSomeRegularField1: String;
  17. class var
  18. FSomethingStatic2: byte;
  19. class property SomethingStatic: Integer read FSomethingStatic write SetSomethingStatic;
  20. class property SomethingStatic1: String read FSomethingStatic1 write FSomethingStatic1;
  21. class property SomethingStatic2: byte read FSomethingStatic2 write FSomethingStatic2;
  22. property SomethingRegular: Integer read FSomeRegularField write FSomeRegularField;
  23. property SomethingRegular1: String read FSomeRegularField1 write FSomeRegularField1;
  24. end;
  25. { TSomeClass }
  26. class procedure TSomeClass.SetSomethingStatic(AValue: Integer);
  27. begin
  28. FSomethingStatic := AValue;
  29. end;
  30. begin
  31. end.