On Fri, 4 Feb 2011 06:41:24 -0800 (PST), leledumbo
<leledumbo_c...@yahoo.co.id> wrote:

>
>FPC is Delphi compatible regarding this. Dynamic arrays are passed by
>reference, so you don't need var here. Please be aware when you directly
>play with dynamic array contents, since it's actually a pointer to a record
>in heap and it's reference counted.

OK, what will happen if I have a declaration like this:
function TSSCommBuf.Read(var Data: TByteArr): boolean; 
as opposed to
function TSSCommBuf.Read(Data: TByteArr): boolean;

Will they be equivalent or will there be an "extra layer" of pointer??


Bo Berglund

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

Reply via email to