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

Home » Public Forums » archive » Command line arguments
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: command line arguments [message #62642 is a reply to message #42537] Mon, 29 September 2008 09:41 Go to previous message
Spon is currently offline  Spon
Messages: 178
Registered: September 2007
Senior Member
On Sep 29, 5:01 pm, xiao <littledd...@gmail.com> wrote:
> HI~ guys , is these lines right? Why I cannot open the file based on
> the following errors. I know the file is there :(   Thank you
>
> filename=command_line_args()
> print,filename
> file='filename'
> OPENR, lun, file, /GET_LUN
>   rows = File_Lines(file)
> header = STRARR(14)
> READF, lun, header
>  PRINT, header
>   Point_Lun, -lun, currentLocation
>
> Or like this?
>
> filename=command_line_args()
> print,filename
> OPENR, lun, 'filename', /GET_LUN
>   rows = File_Lines('filename')
> header = STRARR(14)
> READF, lun, header
>  PRINT, header
>   Point_Lun, -lun, currentLocation

What exactly are the errors you mention you're getting?

Also, what do you get when you type this?

filename=command_line_args(count=count)
help, filename
print, transpose(filename)
print, 'Count:', Count

What are you using the following line for?

file='filename'

If you want to extract the first string from the string array returned
by the command_line_args() function, I would use
file = filename[0]
instead.

Apart from that - as it stands, I would say that yes, these lines are
probably right in that I can't find an obvious coding error there, but
it depends on what you're trying to do!

Tell us more :-)
Chris
[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
Previous Topic: Re: IDL Workbench Printing Woes
Next Topic: Re: Newbie math trouble

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

Current Time: Fri Oct 10 13:03:23 PDT 2025

Total time taken to generate the page: 0.95926 seconds