2013/11/13 Rainer Stratmann <rainerstratm...@t-online.de> > On Wednesday 13 November 2013 09:39:27 you wrote: > > > > Move (S^, D^, L) > > > > should do it. > > > > Tomas > > Yes, thanks. > > I am confused with the meaning of > > const source; > > and > > var dest; > > Is there a description of the behaviour of const and var in this case? > Why is it not both const or both var? >
"source" is where the data "comes from", so the procedure won't modify it (if there is no memory overlap between source and dest), so it is declared as "const" "dest" is where the data is copied to, so the procedure will necessarily modify it (if "count" is <> 0), and the procedure should modify so it is declared as "var". Actually, IMO it could be declared as "out", this would avoid a meaningless warning. -- Frederic Da Vitoria (davitof) Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal