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

Home » Public Forums » archive » Re: How to use pointers instead of arrays
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: How to use pointers instead of arrays [message #33154 is a reply to message #33153] Mon, 09 December 2002 06:39 Go to previous message
paul wisehart is currently offline  paul wisehart
Messages: 28
Registered: December 2002
Junior Member
;create an array
your_array = indgen(10,10)

your_array_pointer = ptr_new(your_array,/no_copy)
;the '/no_copy' causes the ptr to point to the 'ACTUAL' array
;OTHERWISE it would make a copy of it.
;With the '/no_copy' you shouldn't try and access the array w/the
;original variable name 'your_array'

;to access the array
print, (*your_array_pointer)[2,5]
;print the array at position [2,5]
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: 3D Scatterplots
Next Topic: Re: 2002 IDL Christmas Project

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

Current Time: Sat Oct 11 21:40:14 PDT 2025

Total time taken to generate the page: 1.99710 seconds