Re: Happy Reasons to use IDL 8.1 [message #76214] |
Tue, 24 May 2011 08:37  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
>
> David Fanning writes:
>
>> I've discovered another happy reason to love IDL 8.1
>> this morning. I couldn't figure out why a main-level
>> program wouldn't compile. It didn't like this line:
>>
>> img = Image(image, ...)
>>
>> Apparently, you can't define an image variable with
>> the name "image" and then use it as the argument
>> to the Image function.
>
> No problem doing this at the IDL command line:
>
> IDL> W = WINDOW(DIMENSIONS=[800,800)
> IDL> image = cgdemodata(7)
> IDL> img = image(image,/current)
>
> I don't know *what* is going on with my main-level
> program. I know main-level programs don't really
> work in IDL 8.1, so maybe it just has something to
> do with that. Well, they work, just don't ever
> make a programming error in one, or you are hosed
> for that IDL session. I'm not sure they get
> recompiled correctly. Maybe that is what happened.
So now I renamed "bob" back to image and everything
compiles and runs perfectly.
Did I mention I *love* IDL 8.1. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Happy Reasons to use IDL 8.1 [message #76216 is a reply to message #76214] |
Tue, 24 May 2011 08:34   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> I've discovered another happy reason to love IDL 8.1
> this morning. I couldn't figure out why a main-level
> program wouldn't compile. It didn't like this line:
>
> img = Image(image, ...)
>
> Apparently, you can't define an image variable with
> the name "image" and then use it as the argument
> to the Image function.
No problem doing this at the IDL command line:
IDL> W = WINDOW(DIMENSIONS=[800,800)
IDL> image = cgdemodata(7)
IDL> img = image(image,/current)
I don't know *what* is going on with my main-level
program. I know main-level programs don't really
work in IDL 8.1, so maybe it just has something to
do with that. Well, they work, just don't ever
make a programming error in one, or you are hosed
for that IDL session. I'm not sure they get
recompiled correctly. Maybe that is what happened.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Happy Reasons to use IDL 8.1 [message #76352 is a reply to message #76214] |
Tue, 24 May 2011 13:06  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> So now I renamed "bob" back to image and everything
> compiles and runs perfectly.
>
> Did I mention I *love* IDL 8.1. :-)
Oh, for God's sake. Now it wants me to name
my image variable BOB again!!
IDL> help, image
IMAGE UNDEFINED = <Undefined>
IDL> help, /source
Compiled Procedures:
$MAIN$ C:\IDL\default\log_test2.pro
BUILD_TESTMODULE C:\Program Files\ITT\IDL\IDL81\external\dlm
\build_testmodule.pro
CGCONTROL C:\IDL\coyote\cgcontrol.pro
Compiled Functions:
IDL> .compile -v 'C:\IDL\default\log_test2.pro'
IMG = IMAGE(IMAGE,RGB_TABLE=RGB_TABLE,/CURRENT,LAYOUT=
[2,1,1],TITLE='Linear')
^
% Syntax error.
At: C:\IDL\default\log_test2.pro, Line 37
What the *hell* is going on here!? :-(
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|