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

Home » Public Forums » archive » Re: null array
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: null array [message #36471] Wed, 24 September 2003 18:35 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Tomson writes:

> But What I want to do is to initialize several arrays which are in common
> block and their length will be changed for different call and the lengths
> of them may be zero. If the lengthes of them are zero, the process will be
> changed. If there isnot any initialization, the array return to the main
> program may be the former ones.

If I understand you correctly, you may find a pointer
useful in this situation. A pointer could point to
a "null array", in the sense that it would point to
an "undefined variable":

ptr = Ptr_New(/Allocate_Heap)
IF N_Elements(*ptr) EQ 0 THEN Print, 'Pointer undefined' ELSE $
*ptr = [initValue]

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to read the data like this?
Next Topic: Programming ENVI

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

Current Time: Thu Oct 09 14:22:16 PDT 2025

Total time taken to generate the page: 1.12810 seconds