[fpc-pascal] Dynamic array as return type of functions

Christos Chryssochoidis c.chryssochoidis at gmail.com
Tue May 22 20:33:32 CEST 2007


Hi,

I tried to write some function that returned a dynamic array, and  
realized that this isn't allowed. Why? After all one can specify an  
array of variable length as type for variables... Furthermore - if  
I'm not mistaken - a dynamic array is implemented internally as a  
pointer, and so there wouldn't be any runtime overhead for returning  
a dynamic array from a  function.

Thanks,

Christos Chryssochoidis




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20070522/10d05017/attachment.html>


More information about the fpc-pascal mailing list