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

Home » Public Forums » archive » Re: create_struct problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: create_struct problem [message #34339] Wed, 05 March 2003 06:34
Wayne Landsman is currently offline  Wayne Landsman
Messages: 117
Registered: January 1997
Senior Member
>
> This new tag-name prohibition might have subtle effects. For example,
> I think MRDFITS reads a FITS table into a structure with fields named
> according to the FITS column name. If the column is named 'FOR' or
> 'BEGIN', then you are sunk?

MRDFITS checks that the table name is not one of 35 reserved IDL names. If
it is, then a '_' is prepended to the structure name tag (e.g. "_CASE").
If I remember correctly, the names that caused the most problems were the
comparison operators (e.g. 'LE') which were the most likely to be a FITS
table column name.

--Wayne Landsman
Re: create_struct problem [message #34341 is a reply to message #34339] Wed, 05 March 2003 00:58 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
David Fanning <david@dfanning.com> writes:

> Reimar Bauer (R.Bauer@fz-juelich.de) writes:
>
>> where is described this behaviour in idl5.6
>>
>> x=create_struct('case',1)
>> % CREATE_STRUCT: Illegal tag name: case.
>> % Execution halted at: $MAIN$
>>
>>
>> in 5.5 it was no problem
>>
>> It looks like no controll statement works
>
> Well, hooray! It looks like the sheriff is
> finally going to enforce the reserved word
> prohibition. Guess we will all have to clean
> up our language or end up in the slammer. :-)

This, I have no problem with. Creating a structure with a reserved
word is almost like creating a structure that can't be used.

It's nowhere like ATAN which had a working behavior before the sheriff
changed it :-)

This new tag-name prohibition might have subtle effects. For example,
I think MRDFITS reads a FITS table into a structure with fields named
according to the FITS column name. If the column is named 'FOR' or
'BEGIN', then you are sunk?

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
Re: create_struct problem [message #34344 is a reply to message #34341] Tue, 04 March 2003 12:31 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Reimar Bauer (R.Bauer@fz-juelich.de) writes:

> Why is such a change not announced a version before.

Because real programmers don't have any more foresight
than you and I do. :-(

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
Re: create_struct problem [message #34346 is a reply to message #34344] Tue, 04 March 2003 11:49 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
David Fanning wrote:

> Reimar Bauer (R.Bauer@fz-juelich.de) writes:
>
>> where is described this behaviour in idl5.6
>>
>> x=create_struct('case',1)
>> % CREATE_STRUCT: Illegal tag name: case.
>> % Execution halted at: $MAIN$
>>
>>
>> in 5.5 it was no problem
>>
>> It looks like no controll statement works
>
> Well, hooray! It looks like the sheriff is
> finally going to enforce the reserved word
> prohibition. Guess we will all have to clean
> up our language or end up in the slammer. :-)

Ouch!

Why is such a change not announced a version before.

But it is not as bad as i thougt before.
case is forbidden cases is permitted.

cheers

Reimar

>
> Cheers,
>
> David
>
> Cheers,
>
> David

--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
Re: create_struct problem [message #34347 is a reply to message #34346] Tue, 04 March 2003 09:58 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Reimar Bauer (R.Bauer@fz-juelich.de) writes:

> where is described this behaviour in idl5.6
>
> x=create_struct('case',1)
> % CREATE_STRUCT: Illegal tag name: case.
> % Execution halted at: $MAIN$
>
>
> in 5.5 it was no problem
>
> It looks like no controll statement works

Well, hooray! It looks like the sheriff is
finally going to enforce the reserved word
prohibition. Guess we will all have to clean
up our language or end up in the slammer. :-)

Cheers,

David

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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Old log_log plot question ...
Next Topic: Re: Old log_log plot question ...

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

Current Time: Wed Oct 08 07:09:24 PDT 2025

Total time taken to generate the page: 0.00458 seconds