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

Home » Public Forums » archive » Re: Passing Batch File Names
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: Passing Batch File Names [message #62282 is a reply to message #62281] Tue, 02 September 2008 11:15 Go to previous messageGo to previous message
Brian Larsen is currently offline  Brian Larsen
Messages: 270
Registered: June 2006
Senior Member
Trae,

just because I like messing with you, don't forget that you can read
the whole file at once w/o having to use that dreaded "WHILE ~EOF(lun)
DO BEGIN" line for a huge speed improvement, not that it matters for
this application.

file='batch_test.pro'
;; how many lines are in the file
lines = file_lines(file)
;; an array to hold the whole file, execute doesn't care if the string
is '' it just executes null
var_arr=strarr(lines)
openr, lun, file, /GET_LUN
READF,lun , var_arr
for i=0ul,n_elements( var_arr) -1ul do result=execute(var_arr[i])
free_lun, lun
END





Cheers,

Brian

------------------------------------------------------------ --------------
Brian Larsen
Boston University
Center for Space Physics
http://people.bu.edu/balarsen/Home/IDL
[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
Read Message
Read Message
Read Message
Read Message
Previous Topic: Singular Value Decomposition in 3 Dimensions
Next Topic: FFT and ROTATE

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

Current Time: Fri Oct 10 09:50:08 PDT 2025

Total time taken to generate the page: 0.56206 seconds