tclass12c.pp 651 B

1234567891011121314151617181920212223242526272829303132
  1. program tclass12c;
  2. {$ifdef fpc}
  3. {$mode delphi}
  4. {$endif}
  5. {$apptype console}
  6. type
  7. TSomeClass = class
  8. strict private
  9. const
  10. PrivateConst = 1;
  11. type
  12. PrivateType = type Integer;
  13. var
  14. FPrivateField: PrivateType;
  15. public
  16. procedure DoSomething(Value: PrivateType = PrivateConst);
  17. function ReturnSomething: PrivateType;
  18. property SomeProp: PrivateType read FPrivateField write FPrivateField default PrivateConst;
  19. end;
  20. procedure TSomeClass.DoSomething(Value: PrivateType = PrivateConst);
  21. begin
  22. end;
  23. function TSomeClass.ReturnSomething: PrivateType;
  24. begin
  25. Result := PrivateConst;
  26. end;
  27. begin
  28. end.