pascalabcnet/TestSuite/classconst2.pas

13 lines
209 B
ObjectPascal
Raw Permalink Normal View History

2017-11-22 22:54:13 +03:00
type
t1 = class
const a = sin(1);
class function test: real;
begin
Result := a;
end;
end;
begin
assert(abs(t1.test-sin(1)) < 0.000001);
assert(abs(t1.a-sin(1)) < 0.000001);
end.