On 11/29/2012 05:21 PM, Martin wrote:
Just to confirm my observations. (again trying to get pascal script to work)


if "const" is NOT used, then TPoint is put into a register
if "const" is used, then TPoint is in mem, and the register is a reference.

Is that right? (I know the doc says, no assumption, and can be ref or value)
It does make sense.

"Not const" forces copying the data during the function all, "const" uses the (supposedly) more efficient call by reference, while the compiler prevents modifying the data.

(Beware that with objects the object reference is the "variable", and not the object instance.)

-Michael
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to