Hello everyone !!
After a long, long time of using GPC I began to write Object related programs. I did so at school (MacIntosh, ThinkPascal :-( ) and now I want to port my programs onto my Linux box. However here is a first error, of which I don't really know how to get around it. I think it's just an Syntax error concerning the two pascal dialects. Perhaps someone could send me a correction of it, that is compilable with GPC ?
Here is my shortened program :
program foo;
type something = object procedure say_hello; end;
procedure something.say_hello; begin writeln('Hello !'); end;
var someone : something;
begin new(someone); someone.say_hello; dispose(someone); end.
And now, this is what GPC cries about : foo.p: In function `program_Foo': foo.p:16: pointer type required for `New' foo.p:18: pointer type required for `Dispose'
I thought if I declare 'someone' as an object of the class 'something' it is automatically a pointer onto a structure of this class. Obviuosly I am wrong.
Help would be great !