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

Home » Public Forums » archive » operating on tab-/comma-delimited 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
operating on tab-/comma-delimited files [message #85698] Wed, 28 August 2013 09:56 Go to previous message
Seb is currently offline  Seb
Messages: 15
Registered: January 2006
Junior Member
Hi,

I am in the process of updating code I've inherited as I learn IDL, and
noticed that it uses the following workflow for fixing errors in
tab-/comma-delimited files:

1. Use file_search to generate a list of files to work on

2. Use FOR loop to iterate through each file

2.1 Create a float array with the same dimensions as input file
2.2 Load the data into a string array with 'openr' -> 'strarr' ->
'readf' -> 'close'
2.3 Loop through each line doing various tests/operations
2.4 Copy the fixed data into the float array in 2.1

3. Write the float array with 'openw' -> 'printf' -> 'close'

Based on what I'm reading, it seems this should be more efficient by
using 'read_ascii' and then fixing the errors with array indexing and
then writing the data back. Is this worth pursuing, or are there any
recommendations for a module I should know about?

Thanks,

--
Seb
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: delete all windows at once
Next Topic: What subprogram? What parameters and keywords?

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

Current Time: Thu Oct 09 07:19:51 PDT 2025

Total time taken to generate the page: 0.56377 seconds