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

Home » Public Forums » archive » Forcing READ_ASCII output to be a set of strings...
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: Forcing READ_ASCII output to be a set of strings... [message #43134 is a reply to message #43004] Tue, 15 March 2005 01:04 Go to previous messageGo to previous message
Karsten Rodenacker is currently offline  Karsten Rodenacker
Messages: 98
Registered: July 1997
Member
Humm, interesting debate
Why not:
function read_s_ascii_new, na, count=i
openr,lun,na,/get_lun
i=0
s=''
while ~eof(lun) do begin
readf, lun,s
r=i eq 0 ? s : [temporary(r),s]
i++
endwhile
free_lun,lun
return,i eq 0 ? -1l : r
end
By the way read_s_ascii was an old routine from I don't know whom.
Regards
Karsten

On Mon, 14 Mar 2005 14:56:22 -0600, Michael Wallace
<mwallace.no.spam@no.spam.swri.edu.invalid> wrote:

>> Second, why should the default be string rather than float? Just
>> because you have a need to use strings for this particular application
>> doesn't mean that RSI should change their defaults. For default
>> values, a floating point number is the best assumption to make. If the
>> default values don't work for you, use a template. This is why
>> templates exist...
>
> And by the way, you want to do:
>
> template = ascii_template()
> data = read_ascii('myfile.csv', TEMPLATE = template)
>
> If you need to use the template multiple times, just save it off
> somewhere and restore it in your code whenever you need it.
>
> -Mike



--
Karsten Rodenacker
------------------------------------------------------------ -------- :-)
GSF - Forschungszentrum Institute of Biomathematics and Biometry
D-85758 Oberschleissheim Postfach 11 29
Karsten.Rodenacker@gsf.de | http://ibb.gsf.de/
http://ibb.gsf.de/homepage/karsten.rodenacker/
Tel: +49 89 31873401 | FAX: ..3369
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDL6.0 and Mac OS 10.3
Next Topic: precedence question

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

Current Time: Wed Oct 08 17:32:27 PDT 2025

Total time taken to generate the page: 0.00462 seconds