Re: help & help,/structure [message #72203] |
Fri, 13 August 2010 14:56  |
chris_torrence@NOSPAM
Messages: 528 Registered: March 2007
|
Senior Member |
|
|
On Aug 13, 2:56 pm, mgalloy <mgal...@gmail.com> wrote:
> On 8/13/10 2:37 PM, Heinz Stege wrote:
>
>
>
>
>
>> On Fri, 13 Aug 2010 11:59:58 -0700 (PDT), wlandsman wrote:
>
>>> A documented new feature of HELP,/STRUCTURE in IDL 8.0 has caused me
>>> a minor annoyance: According to the online help:
>
>>> "If a single argument is provided to HELP, and it is a structure,
>>> then HELP will automatically display the structure information without
>>> having to set the /STRUCTURE keyword."
>
>>> But I think this means that I can no longer use HELP to determine
>>> the number of elements in a structure array. In IDL 7.1 I could
>>> write
>
>>> IDL> print,!version
>>> { x86 linux unix linux 7.1.1 Aug 19 2009 32 64}
>>> IDL> help,tab
>>> TAB STRUCT = -> <Anonymous> Array[58]
>
>>> to determine that it has 58 elements. But in IDL 8.0, I get
>>> information about the structure but no information about the number of
>>> elements it contains... I have to print,N_Elements(tab) . --Wayne
>
>>> IDL> print,!version
>>> { x86 linux unix linux 8.0 Jun 18 2010 32 64}
>
>>> IDL> help,tab
>>> ** Structure<a065d74>, 21 tags, length=168, data length=162, refs=1:
>>> OBS_ID STRING '00031688021 '
>>> EXTNAME STRING 'uu297081092I '
>>> ASPCORR INT 0
>>> FILTER STRING 'U '
>>> TSTART DOUBLE 2.9708109e+08
>
>> I had that problem too, played a while arround, and found that
>> help,names='tab' is doing the trick.
>
>> Shorter, but a little bit uggly: help,tab,''
>
>> help,tab,structures=0 unexspectedly does not work ;-)
>
>> Would really be nice, to have the dimension information within the
>> header line of the help,tab output.
>
> Yes, it seems like /STRUCTURES should only automatically kick in is if
> the only variable passed to HELP is a structure *and* only has a single
> element. IDL 8.0.1?
>
> Mike
> --www.michaelgalloy.com
> Research Mathematician
> Tech-X Corporation
Mike is exactly correct. This was an oversight in IDL 8.0, and will be
fixed in the next update. It will automatically do the /structure if
there is only 1 element.
-Chris
ITTVIS
|
|
|