Re: General help [message #53314] |
Wed, 04 April 2007 03:00 |
Paolo Grigis
Messages: 171 Registered: December 2003
|
Senior Member |
|
|
D.Kochman@gmail.com wrote:
>
> [...]
>
> So lets say I do something like
>
> arr=DBLARR(51,dg.numberbins)
>
> It doesn't like it in my function, unless I define inside of it (the
> function) an initial value, despite the fact that the datastructure dg
> - has
>
> numberbins:double(1024.0) $
>
> And gives the error "array must be greater than 0"
That error message just means that dg.numberbins is 0 or a
negative scalar. Example:
IDL> print,dblarr(5,-2,3)
% Array dimensions must be greater than 0.
Ciao,
Paolo
|
|
|
Re: General help [message #53318 is a reply to message #53314] |
Tue, 03 April 2007 18:04  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
D.Kochman@gmail.com writes:
> After modifying the equation that it was supposed to fit, I was
> feeling good about myself....now not so much.
Well, clearly, something is not defined inside your function
that you think is *suppose* to be defined. So there are only
a couple of possibilities. One, you didn't pass it into the
function, so it isn't there. Two, you passed *something* in,
but it wasn't what you thought you were passing. And, maybe,
three, you passed it in incorrectly. I think I would put a
STOP inside the function and when program execution stopped
I'd have a look around. If nothing else, we would discover
a few more clues. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|