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

Home » Public Forums » archive » printing an array from 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: printing an array from pointers [message #48182 is a reply to message #48125] Wed, 29 March 2006 08:29 Go to previous messageGo to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
David Fanning wrote:
> Paul Van Delst writes:
>
>
>> Note: all the above typed off top of head, so no guarantees. Test. Especially the
>> concatenate stuff. I can never remember how many groups of [[][]]'s to use for multi-D arrays.
>
>
> One more for every dimension you are trying to concatenate:
>
> As rows: t = [a, b] ; extra = 0
> As cols: t = [ [a], [b] ] ; extra = 1
> As frames: t = [ [[a]], [[b]] ] ; extra = 2
> etc. ; extra = etc

No "etc" allowed:

IDL> a=4
IDL> b=7
IDL> t = [a, b]
IDL> help, t
T INT = Array[2]
IDL> t = [ [a], [b] ]
IDL> help, t
T INT = Array[1, 2]
IDL> t = [ [[a]], [[b]] ]
IDL> help, t
T INT = Array[1, 1, 2]
IDL> t = [ [[[a]]], [[[b]]] ]

t = [ [[[a]]], [[[b]]] ]
^
% Only three levels of variable concatenation are allowed.


I've always found this behaviour confusing. Why special case for only three levels?

paulv

--
Paul van Delst
CIMSS @ NOAA/NCEP/EMC
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDLgrPalette woes
Next Topic: IDLgrPalette woes

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

Current Time: Sun Oct 12 13:44:17 PDT 2025

Total time taken to generate the page: 0.56001 seconds