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

Home » Public Forums » archive » Opening variable files
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: Opening variable files [message #8075 is a reply to message #7951] Tue, 04 February 1997 00:00 Go to previous message
D.Kennedy is currently offline  D.Kennedy
Messages: 26
Registered: January 1997
Junior Member
In article <Pine.SOL.3.95.970130104307.19425B-100000@ascc.artsci.wustl.edu>,
"Christopher E. Crabtree" <cecrabtr@artsci.wustl.edu> writes:
> I am an undergraduate as Washington University. We purchased IDL in the
> summer of 96. I am currently trying to write a widget based application
> and I ran into a problem. I want the user to be able to open a file of
> his or her choosing, but when I try to use the statement
>
> openr, 1, filename
>
> where filename is a string (variable) I get a message saying that a scalar
> value is expected. Is there any way to allow the user to enter in the new
> file name without exiting the application and recompiling the program with
> the new 'filename' inserted.

I use this:

; Pop up a window and let the user select the datafile
SET_PLOT, 'X'
datafile= PICKFILE(GET_PATH=path, PATH='/home7/dcjk/M15-radio/', $
/READ, FILTER='*.data')

; Tidy up the pathname etc
IF STRMID(path(0), STRLEN(path(0))-1,1) NE '/' THEN path = path(0) + '/'

; Open file
OPENR, input, datafile, /GET_LUN

--
David Kennedy, Dept. of Pure & Applied Physics, Queen's University of Belfast
Email: D.Kennedy@Queens-Belfast.ac.uk | URL: http://star.pst.qub.ac.uk/~dcjk/
Hi! I'm a .signature virus! Copy me into yours and join the fun!
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: surface plots with color shading
Next Topic: Angstrom symbol?

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

Current Time: Fri Oct 10 15:11:41 PDT 2025

Total time taken to generate the page: 0.63777 seconds