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
|
|
|
Re: help & help,/structure [message #72204 is a reply to message #72203] |
Fri, 13 August 2010 13:56   |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
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
|
|
|
Re: help & help,/structure [message #72205 is a reply to message #72204] |
Fri, 13 August 2010 13:37   |
Heinz Stege
Messages: 189 Registered: January 2003
|
Senior Member |
|
|
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.
|
|
|
Re: help & help,/structure [message #75675 is a reply to message #72203] |
Tue, 05 April 2011 17:14   |
|
Originally posted by: Demitri
Hi,
I've just been bitten by this new "feature". I have a script that calls
'help', but now with 8.0 it dumps the full structure to the screen.
This output is longer than the screen so the effective result is that
my script stops until I manually hit a spacebar to continue. Truly
annoying when I had to do this about 200 times today.
Can I turn this off? Barring this, is there a way I can code this so
that it will work as before if I run IDL 7 or 8?
Cheers,
Demitri
New York University
(Wow, I managed to write that in a fairly civilized manner!)
---
On 2010-08-13 17:56:53 -0400, Chris Torrence <gorthmog@gmail.com> said:
> 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 m
> e
>>>> a minor annoyance: � According to the online help:
>>
>>>> � � �"If a single argument is provided to HELP, and it is a stru
> cture,
>>>> 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 determ
> ine
>>>> the number of elements in a structure array. � � �In IDL 7.1 I c
> ould
>>>> write
>>
>>>> IDL> �print,!version
>>>> { x86 linux unix linux 7.1.1 Aug 19 2009 � � �32 � � �64}
>>>> IDL> �help,tab
>>>> TAB � � � � � � STRUCT � �= -> �<Anonymous> �Arr
> ay[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
|
|
|
Re: help & help,/structure [message #75709 is a reply to message #75675] |
Thu, 14 April 2011 20:16  |
R.G.Stockwell
Messages: 163 Registered: October 2004
|
Senior Member |
|
|
> "Demitri" wrote in message
> news:4d9bb075$0$20476$c3e8da3$eb767761@news.astraweb.com...
> Hi,
> I've just been bitten by this new "feature". I have a script that calls
> 'help', but now with 8.0 it dumps the full structure to the screen.
> This output is longer than the screen so the effective result is that
> my script stops until I manually hit a spacebar to continue. Truly
> annoying when I had to do this about 200 times today.
> Can I turn this off? Barring this, is there a way I can code this so
> that it will work as before if I run IDL 7 or 8?
> Cheers,
> Demitri
> New York University
> (Wow, I managed to write that in a fairly civilized manner!)
> ---
ha, yeah it is a bit annoying, for help of an array of structures.
I have found myself adding a second garbage (non-existent) variable, which
makes it work.
help, mystructarr, a
where a does not exist.
IDL> help, star,a
star STRUCT = -> <Anonymous> Array[54]
A UNDEFINED = <Undefined>
cheers,
bob
|
|
|