Hello,
This fpc example seems to do more or less the same as the Delphi static
class/record procedure example.
Only extra requirement is to declare a object instance variable and use that
to call the test routine.
Less ideal.
type
TmyRecord = record
A,B,C,D,E,F : integer;
end;
TmyObject = object
A,B,C,D,E,F : integer;
procedure Test;
end;
procedure TmyObject.Test;
begin
writeln( 'Hi' );
end;
var
MyObject : TmyObject;
begin
writeln( SizeOf(TmyRecord) );
writeln( SizeOf(TmyObject) );
// TmyObject.Test; // not allowed, does not compile
MyObject.Test;
end.
Bye,
Skybuck.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal