Hello everbody,
I coded a procedure which takes an object as a value parameter
procedure AnyThing (var v: ObjTyp);
where
type ObjTyp = object ....
The compiler returns the error "object must not be a value parameter" - this is pretty clear to me, but I can do it in Borland Pascal (at least with 6.0). Also, I used the --borland-pascal option
Is there some possibility ?
Thank you, best regards, Michael
===== Höhlenforschung in Ãsterreich: www.xploration.at.tt
__________________________________________________________________
Gesendet von Yahoo! Mail - http://mail.yahoo.de Möchten Sie mit einem Gruà antworten? http://grusskarten.yahoo.de
Hello,
On Thu, 26 Sep 2002, [iso-8859-1] Michael Behm wrote:
I coded a procedure which takes an object as a value parameter
procedure AnyThing (var v: ObjTyp);
What you wrote is passing a reference parameter ;-)
The compiler returns the error "object must not be a value parameter" - this is pretty clear to me, but I can do it in Borland Pascal (at least with 6.0). Also, I used the --borland-pascal option
Is there some possibility ?
Do we really need such b(ack/ug)-compatibility for BP ?
Regards, Adam Naumowicz
-------------------------------------- WWW: http://math.uwb.edu.pl/~adamn/ --------------------------------------
Adam Naumowicz wrote:
On Thu, 26 Sep 2002, [iso-8859-1] Michael Behm wrote:
I coded a procedure which takes an object as a value parameter
procedure AnyThing (var v: ObjTyp);
What you wrote is passing a reference parameter ;-)
The compiler returns the error "object must not be a value parameter" - this is pretty clear to me,
Yes, that's listed on the To-Do list.
but I can do it in Borland Pascal (at least with 6.0). Also, I used the --borland-pascal option
Is there some possibility ?
Do we really need such b(ack/ug)-compatibility for BP ?
I don't know if we really need it, but after all the other bug compatibility we've already implemented, I don't think we should stop there. I think we should warn (except in `--borland-pascal'), though.
However, it's not a high priority, and unless someone else volunteers to do it, I might do it the next time I do some major changes in the OOP stuff.
Frank