<p style="padding:0 0 0 0; margin:0 0 0 0;">Hi,</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">that's why portaudio.pp declares types like this:</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">PaStream = Pointer;</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">PPaStream = ^PaStream;</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">PPPaStream = ^PPaStream;</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">V.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">______________________________________________________________<br />
> Od: Sven Barth <pascaldragon@googlemail.com><br />
> Komu: fpc-pascal@lists.freepascal.org<br />
> Datum: 21.01.2017 12:29<br />
> Předmět: Re: [fpc-pascal] Array as result in function.<br />
></p>
<br />
If the C code however is the one allocating the array (in which case the<br />
type is usually a pointer to a pointer, like "float**" or "^pcfloat" in<br />
Pascal) then you *must not* use a Pascal array, but instead simply pass<br />
in a "pcfloat" variable like this:<br />
<br />
some_func(@mypcfloat);<br />
<br />
I hope this clears up a few points for mixing C and Pascal arrays.<br />
<br />
Regards,<br />
Sven<br />
<br />
_______________________________________________<br />
fpc-pascal maillist - fpc-pascal@lists.freepascal.org<br />
<a href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</a><br />