On Fri, 18 Nov 2011 23:11:14 -0800 (PST)  leledumbo 
<leledumbo_c...@yahoo.co.id>  wrote

re use of "Out" parameters
>  ...  As stated in the 
> docs (http://www.freepascal.org/docs-html/ref/refsu57.html): "The initial 
> value of the parameter on function entry is discarded, and should not be 
> used." which is why you get 0. 

It seems a bit drastic to me to discard the existence of the dynamic array
as well as the (non-existent) values stored in it! Presumably, all will be well 
if I size the array inside the initializing routine, breaking my rule that the 
routine that makes the array must also contain the code to get rid of it.
>  
> > 2) I substitute "Array Of Longint" for "DataA". 
>  
> That would make X parameter to be treated as "open array of longint" not 
> "dynamic array of longint" 

That is a distinction too subtle for me!

Andrew Bennett


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

Reply via email to