help & help,/structure [message #72208] |
Fri, 13 August 2010 11:59  |
wlandsman
Messages: 743 Registered: June 2000
|
Senior Member |
|
|
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
|
|
|
|
Re: help & help,/structure [message #75666 is a reply to message #72208] |
Wed, 06 April 2011 07:52  |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On Apr 6, 11:24 am, Mark Piper <mpi...@ittvis.com> wrote:
> This is fixed in 8.0.1. Please grab the update from the ittvis website.
This explains why structure=0 works for me.
|
|
|
|
Re: help & help,/structure [message #75672 is a reply to message #72208] |
Wed, 06 April 2011 01:40  |
Foldy Lajos
Messages: 268 Registered: October 2001
|
Senior Member |
|
|
On Tue, 5 Apr 2011, Demitri wrote:
> 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?
>
!MORE=0
regards,
Lajos
|
|
|
Re: help & help,/structure [message #75673 is a reply to message #72208] |
Tue, 05 April 2011 17:40  |
|
Originally posted by: Demitri
Thanks for the quick reply! That suggestion was made earlier in this
thead (from last August), but it doesn't seem to work. (I just tried it
now too.)
s = create_struct('a', 1, 'b', 'xxx')
help, s
help, s, structure=0
Cheers,
Demitri
---
On 2011-04-05 20:31:40 -0400, Paulo Penteado <pp.penteado@gmail.com> said:
> On Apr 5, 9:14�pm, Demitri wrote:
>> 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?
>
> help,whatever,structure=0
>
> ?
|
|
|
Re: help & help,/structure [message #75674 is a reply to message #72208] |
Tue, 05 April 2011 17:31  |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On Apr 5, 9:14 pm, Demitri wrote:
> 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?
help,whatever,structure=0
?
|
|
|