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

Home » Public Forums » archive » Re: @ Symbol
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: @ Symbol [message #3024] Thu, 27 October 1994 09:20
sjt is currently offline  sjt
Messages: 72
Registered: November 1993
Member
mallozzi@ssl.msfc.nasa.gov wrote:
: Hi everyone:
: I would like to include files in my IDL code using the @ symbol, but I
: want to use variable filenames (e.g. @variable_file_name). This is not
: accepted by IDL, so I currently get around it by extending !path to include
: the appropriate directory so IDL finds the file. I have in mind a function
: like INCLUDE, variable_file_name. Has anyone written such a function or know
: of some way to include files by using a variable name?

: Thanks
: mallozzi@ssl.msfc.nasa.gov

I think there could be a problem with this as IDL compiles the routine
into an internal code before executing it, so it would have to be
something like the EXECUTE command. In fact maybe the following would
work (albeit very slowly!)

openr, ilu,/get,file ; Open the file

cline='' ; make the command line a string

while (not eof(ilu)) do begin
readf, ilu, cline
iok = execute(cline)
if (not iok) then message, '++ ERROR in included line: '+cline
endwhile

free_lun, ilu

I'm not sure that this is the best way as I just wrote it on the spur
of the moment.

--
+------------------------+---------------------------------- --+---------+
| James Tappin, | School of Physics & Space Research | O__ |
| sjt@xun8.sr.bham.ac.uk | University of Birmingham | -- \/` |
| "If all else fails--read the instructions!" | |
+----------------------------------------------------------- --+---------+
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: min_curve_surface
Next Topic: Re: read gif files in IDL

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

Current Time: Wed Oct 08 15:22:11 PDT 2025

Total time taken to generate the page: 0.00436 seconds