views:

233

answers:

2
A: 

I can't answer your question but I suggest to learn OOP with a language like Python or Groovy. Pascal isn't really something on which you'll be able to build a career. I'd rather suggest that as a third or fourth language to give you some ideas how other languages work but not as your first/main language.

Both offer an interactive console (for Python, I suggest iPython) where you can do small experiments.

Aaron Digulla
-1 "I can't answer your question." Then don't post an answer. Post a comment.
Rob Kennedy
Too long+complex for a comment.
Aaron Digulla
All the text and all three URLs fit with over 100 characters to spare.
Rob Kennedy
@Aaron Digulla:Actually I am learning python two.Thanks for the advice.
Jichao
-1 Pretty pathetic. Despite all the cloud, Python jobs are not exacty easy to find either. Delphi is way easier.
Marco van de Voort
A: 

That appears to be some nonstandard extension. The implementation of the function in question is:

function FooParent.Baz (b, a, z: Char) = s: Str100;
begin
  WriteStr (s, 'FooParent.Baz (', b, ', ', a, ', ', z, ')')
end;

Normally in Pascal, the name of the function is used as the function return variable, so the above function would be written like this:

function FooParent.Baz (b, a, z: Char): Str100;
begin
  WriteStr (Baz, 'FooParent.Baz (', b, ', ', a, ', ', z, ')')
end;

It appears that the = s syntax indicates that the return value of the function is stored in the variable s inside the function body. I'm not sure why that would need to be exposed in the object interface, though.

Greg Hewgill
It has to be in the interface because it's in the implementation. One of the "new features" of GPC is that "repeated function headings (in forward declarations and interfaces) are checked stricter: if one has a result variable, so must the other (according to the OOE draft)." http://www.gnu-pascal.de/gpc-es/News.html#News
Rob Kennedy
That explains it; thanks!
Greg Hewgill
All Object Pascal is a non-standard extension. The object Pascal draft was never ratified.
Marco van de Voort