by "Peter Mason" <peter.mason@[EMAIL PROTECTED]
>
Feb 12, 2008 at 11:38 PM
zhouqiang.search@[EMAIL PROTECTED]
wrote:
<...>
> IDL_DCOMPLEX *result = argv[2];
<...>
> result = complexarr(row , line)
<...>
Aside from the index-calc issue pointed out in the other post...
You make a single-precision complex array (2 * 4 bytes per element) on the
IDL side but you handle it as a double-precision one (2 * 8 bytes per
element) on the C side. Your C code is going past the end of this array,
tramping over things it shouldn't.
In your C code, use IDL_COMPLEX instead of IDL_DCOMPLEX.
Cheers
Peter Mason