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
Re: Help with pointers [message #91725 is a reply to message #91724] Fri, 14 August 2015 09:30 Go to previous messageGo to previous message
zacharyanorman is currently offline  zacharyanorman
Messages: 17
Registered: July 2015
Junior Member
If you just have one index that you are taking the difference of, you need to use parenthesis around the pointer to access that index. Here is an example:

a = findgen(216,216)
b = 1.1*findgen(216,216)
A_ptr = ptr_new(a,/no_copy)
ind = 5
diff = (*A_ptr)[ind]-b[ind]
print, diff
[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:38:32 PDT 2025

Total time taken to generate the page: 0.00391 seconds