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

Home » Public Forums » archive » Re: Am I stupid?
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: Am I stupid? [message #25767 is a reply to message #25695] Wed, 11 July 2001 14:02 Go to previous messageGo to previous message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
Bob Crawford <r_w_crawford@yahoo.com> writes:


> H C Pumphrey wrote:

>> In article <onn16cvpe1.fsf@cow.physics.wisc.edu>, Craig Markwardt <craigmnet@cow.physics.wisc.edu> writes:
>> |> Not that [IDL's policy on keyword uniqueness] doesn't frustrate the heck
>> |> out of me sometimes. There
>> |> are many times where I want keywords like TIME, TIMEUNIT, TIMESTEP,
>> |> and so on. My suggestion is that the above policy should hold,
>> |> *unless* there is an exact match to a specific keyword.
>>
>> That seems to be what R [1] does already. Apart from this special case, I don't
>> see any way around it, not without IDL having a direct link to your
>> subconscious so that it can tell which out of TIME, TIMEUNIT and TIMESTEP
>> you meant when you said FOO,TI=137

> ... but it should know what you meant when you say: FOO, TIME=37

> Bob.
> (sometimes frustrated too)


It is quite possible to redefine the rules such that one could unambiguously
have the keywords TIME and TIMESTEP simultaneously. However, consider what
happens when a user mistakenly abbreviates TIMESTEP=3 to TIME=3. Under the
present rules, IDL signals that a possible error has occured. But with the
proposed new rules, no error message would be generated--it would just happily
go ahead and do the wrong thing!

I've also been occasionally frustrated by this behavior, but I've come to the
conclusion (a little reluctantly) that it's actually ``A Good Thing''. In a
perfect world, we could be sure that the user remembered not to use TIME as an
abbreviation of TIMESTEP, but you and I know that we don't live in a perfect
world.

It would be better, as somebody has already suggested, if situations like this
were caught by the compiler, instead of waiting until somebody actually tried
to use the TIME keyword. But the present abbreviation rules should not be
changed.

William Thompson
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: help with findfile
Next Topic: read input from a widget

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

Current Time: Wed Oct 08 16:52:41 PDT 2025

Total time taken to generate the page: 0.00463 seconds