On 2013-04-19 21:24:50 +0200, Lubos Pintes wrote:
> This is How I understand the var parameter.
> It is an address, but is treated as normal variable, so it is not
> needed to dereference a pointer.
> For example
> int f(int* x) in C/C++ corresponds to
> function f(var x: integer): integer;
> Now we have
> int f(int x);
> If you declare it as
> function f(var x: integer): integer;
> and then try to assign something to x, the access violation is very
> probably raised because x contains value, not address.

Thanks for the explanation Lubos, much clear now.

-- 
Leonardo M. Ramé
http://leonardorame.blogspot.com

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to