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

Home » Public Forums » archive » Re: Unhelpful Help Messages
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: Unhelpful Help Messages [message #67802] Fri, 28 August 2009 00:57
Maarten[1] is currently offline  Maarten[1]
Messages: 176
Registered: November 2005
Senior Member
On Aug 28, 2:57 am, Jeremy Bailin <astroco...@gmail.com> wrote:
> On Aug 26, 6:22 pm, David Fanning <n...@dfanning.com> wrote:
>
>
>
>> Folks,
>
>> Having spent more time this week than I wanted to learning
>> that "too many array elements" really means "you are
>> *totally* confusing me with that binsize that isn't
>> really a number", I thought I might work on an article
>> this weekend on "Unhelpful Help Messages".
>
>> This could be one of those articles that grows over time,
>> but I thought I might ask if anyone else has a favorite
>> Unhelpful Help Message they would like to share. Another
>> one I deal with on an almost weekly basis is a "syntax
>> error" when someone hasn't put the Coyote Library on their
>> IDL path correctly. This one particularly confuses new
>> users.
>
>> Any others?
>
>> Cheers,
>
>> David
>> --
>> David Fanning, Ph.D.
>> Coyote's Guide to IDL Programming (www.dfanning.com)
>> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
>
> This is one that makes sense to me, but is probably the top confused
> question I get from people:
>
> % Loop limit expression too large for loop variable type.
>
> (e.g. "for i=0,500000" instead of "for i=0L,500000")

For new users, I always put
compile_opt defint32, strictarr, strictarrsubs
in the idl startup script. That at least covers the command-line. I
wish there was an option to enforce this throughout a session, but
instructing them to use
compile_opt idl2
in each function and procedure isn't too hard.

Maarten
Re: Unhelpful Help Messages [message #67806 is a reply to message #67802] Thu, 27 August 2009 17:57 Go to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On Aug 26, 6:22 pm, David Fanning <n...@dfanning.com> wrote:
> Folks,
>
> Having spent more time this week than I wanted to learning
> that "too many array elements" really means "you are
> *totally* confusing me with that binsize that isn't
> really a number", I thought I might work on an article
> this weekend on "Unhelpful Help Messages".
>
> This could be one of those articles that grows over time,
> but I thought I might ask if anyone else has a favorite
> Unhelpful Help Message they would like to share. Another
> one I deal with on an almost weekly basis is a "syntax
> error" when someone hasn't put the Coyote Library on their
> IDL path correctly. This one particularly confuses new
> users.
>
> Any others?
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Coyote's Guide to IDL Programming (www.dfanning.com)
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

This is one that makes sense to me, but is probably the top confused
question I get from people:

% Loop limit expression too large for loop variable type.

(e.g. "for i=0,500000" instead of "for i=0L,500000")

-Jeremy.
Re: Unhelpful Help Messages [message #67824 is a reply to message #67806] Thu, 27 August 2009 06:58 Go to previous message
Maarten[1] is currently offline  Maarten[1]
Messages: 176
Registered: November 2005
Senior Member
On Aug 27, 12:22 am, David Fanning <n...@dfanning.com> wrote:

> Having spent more time this week than I wanted to learning
> that "too many array elements" really means "you are
> *totally* confusing me with that binsize that isn't
> really a number", I thought I might work on an article
> this weekend on "Unhelpful Help Messages".

IDL> a = findgen(10)
IDL> b = a[10]
% Attempt to subscript A with <LONG ( 10)> is out of
range.

IDL> b = a[0:10]
% Subscript range values of the form low:high must be >= 0, < size,
with low <= high: A.

The first message is OK, I get the array, and the value that is wrong.
The second message is slightly less helpful, as you don't get
information which boundary is out of range. Here it isn't too bad, but
if you use the following in a function call (i.e. more than one on a
line), then things do get confusing:

IDL> a = {a:findgen(10), b:findgen(10)}
IDL> c = a.a[0:10]
% Subscript range values of the form low:high must be >= 0, < size,
with low <= high: <No name>.

Maarten
Re: Unhelpful Help Messages [message #67834 is a reply to message #67824] Wed, 26 August 2009 16:57 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Aug 26, 6:22 pm, David Fanning <n...@dfanning.com> wrote:

> This could be one of those articles that grows over time,
> but I thought I might ask if anyone else has a favorite
> Unhelpful Help Message they would like to share.

I am often momentarily confused when I run a procedure where the
procedure name and file name differ. For example, if my file
"test.pro" contains

pro newtest
print,'hello world'
return
end

and then I run it

IDL> test
% Compiled module: TEST.
% Attempt to call undefined procedure/function: 'TEST'.
% Execution halted at: $MAIN$

which makes it seem like procedure "test" has been successfully
compiled, but procedure "test" doesn't exist.

(I suppose the IDL error message is technically correct that the
*module* 'test' does exist but the procedure/function 'test' does
not. )

--Wayne
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: idl 7
Next Topic: display polygon on the image

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

Current Time: Wed Oct 08 11:35:55 PDT 2025

Total time taken to generate the page: 0.00663 seconds