[fpc-devel] Proposal: In-out-parameters
JeLlyFish.software at gmx.net
Tue Aug 10 19:37:20 CEST 2010
_-jane-_ at web.de:
> You wrote 2010-08-09:
> > You should at least have used the 1995 version.
> > Ada83 is pretty outdated, even here[tm], considering that
> > Ada2005 compilers are available for about five years now. :D
> > <[http://www.adahome.com/rm95/rm9x-06-02.html]>
> You're right. I was lazy. This was the first report I've found. Has
> something changed for the specs of copy-[in]-out-parameters?
Yes, the rules have relaxed a bit, but not substantially. The biggest change was that Ada95 made out-mode parameters readable, in Ada83 they were write-only, which many people considered a bit awkward. But that's a language detail which wouldn't concern us in FPC, out mode parameters are already read-write, and there's no reason to "fix" that.
> > Well, it would involve a function call to the getter upon entry
> > and another one to the setter upon exit.
> > So it would be much more than just a by-copy transfer
> > (which usually is nothing more than just using a register holding
> > the value instead of a pointer to the actual memory location).
> ...but only if the properties are implemented via functions.
> Nevertheless it works whereas a simple reference parameter does not
> directly, and that's the point of the proposal.
Yes. In that way, properties would behave like normal variables again. I'd like that. ;) But there was a reason, why FPC doesn't support that anymore.
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
More information about the fpc-devel