comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Help with pointers
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Help with pointers [message #91718] Fri, 14 August 2015 07:36 Go to previous message
g.nacarts is currently offline  g.nacarts
Messages: 148
Registered: November 2013
Senior Member
Hi

I return a 2D array in a Function (A DOUBLE = Array[216, 216]).

I wanted to return that array as a pointer and I did the following

A_Ptr = PTR_NEW(A, /NO_COPY)

RETURN, A_Ptr

I call this pointer on a different function like this:

Diff = total((A[ind] - B[ind])^2.)

But I got the following error:
"Unable to convert variable to type pointer."

I typed help, A, B
<PtrHeapVar9> DOUBLE = Array[216, 216]
B FLOAT = Array[216, 216]

I tried this as well Diff = total((*A[ind] - B[ind])^2.) but still doesn't work.

Can anyone please help with this?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Write 3dimensional array as bsq-file without using ENVI Methods
Next Topic: to create & overlay a polygon shape file

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:55:52 PDT 2025

Total time taken to generate the page: 0.00447 seconds