fpc/tests/webtbs/tw0873a.pp
fpc 790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00

39 lines
599 B
ObjectPascal

{$mode objfpc}
// Compile it using the Delphi extensions
// directive.
type
TObjectB = class
private
procedure SetValue(v: integer);
public
fx: integer;
Constructor Create;
Destructor Destroy;
property x: integer read fx write SetValue;
end;
var
Obj: TObjectB;
Constructor TObjectB.Create;
begin
fx := 0;
end;
Destructor TObjectB.Destroy;
begin
end;
procedure TObjectB.SetValue(v: integer);
begin
fx := v + 2;
end;
begin
writeln('This will be printed');
Obj := TObjectB.Create;
writeln('This won''t.');
end.