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

Home » Public Forums » archive » Newbie IDl question
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: Newbie IDL question [message #52106 is a reply to message #28459] Mon, 08 January 2007 20:53 Go to previous messageGo to previous message
Mike[2] is currently offline  Mike[2]
Messages: 99
Registered: December 2005
Member
tony.ohagan@gmail.com wrote:
> Ahh ... actually I can reproduce the same sytax errors when running the
> program from
> $ idl myprog.pro

Tony - Just what is in your myprog.pro?

If it looks like this:

name = 'Larry'
CASE name OF
'Larry': PRINT, 'Stooge 1' & $
'Moe': PRINT, 'Stooge 2' & $
'Curly': PRINT, 'Stooge 3' & $
ELSE: PRINT, 'Not a Stooge' & $
ENDCASE

then running it from the command line with idl myprog.pro will work
because that is essentially the same as starting IDL and typing
@myprog, which uses the command line interpreter. Your "& $"s
make everything look like a single line command, which is all the
command line interpreter can handle.

If you actually create a program like this and put it in myprog2.pro:

pro myprog2
name = 'Larry'
CASE name OF
'Larry': PRINT, 'Stooge 1'
'Moe': PRINT, 'Stooge 2'
'Curly': PRINT, 'Stooge 3'
ELSE: PRINT, 'Not a Stooge'
ENDCASE
end

then you can start IDL and give the command myprog2. IDL will
find myprog2.pro, look for myprog2 in it and compile it (and it will
compile without errors becuase the compiler can handle multiline
statements) and then run it.

Does that work for you?

Mike
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Newbie IDL question
Next Topic: Writing on an image

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

Current Time: Sat Oct 11 16:02:23 PDT 2025

Total time taken to generate the page: 0.35227 seconds