[fpc-devel] Proposal: Enhanced replacement for assignment operators

"Vinzent Höfler" JeLlyFish.software at gmx.net
Sun Aug 8 10:18:19 CEST 2010


Hans-Peter Diettrich <DrDiettrich1 at aol.com>:

> Marc Weustink schrieb:
> 
> > What is wrong with :
> > 
> > MyObj.PointArrayField[i] := MyObj.PointArrayField[i] +
> >   FunctionReturningPointOffset(param)
> 
> The need for duplicating a long expression, with chances for typos :-(

So we need Ada's renaming feature?

declare
   x : Some_Type renames MyObj.PointArrayField (i);
begin
   x := x + FunctionReturningPointOffset (param);
end;


Vinzent.

-- 
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!  
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail



More information about the fpc-devel mailing list