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

Home » Public Forums » archive » ascii_template
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: ascii_template [message #21074 is a reply to message #20978] Thu, 03 August 2000 00:00 Go to previous message
Bernard Puc is currently offline  Bernard Puc
Messages: 65
Registered: January 1998
Member
David Fanning wrote:
>
> Luis Alonso (luis.alonso@uv.es) writes:
>
>> my question for tonite (here in the old world) is:
>> i've got an ascii file i need to read zillions of times, and i don't want to
>> deal with the bother of filling the ascii_template dialog on and on
>> so, is there a way to store in a file that template, and be able to recover
>> it to use with read_ascii?
>
> I hear in the old world, they turn the on-line help
> off at 5PM. :-(
>
> Try this:
>
> mytemplate = ASCII_TEMPLATE("mydatafile.dat")
> FOR j=0,zillion-1 DO BEGIN
> data[j] = READ_ASCII(TEMPLATE=mytemplate, datafile[j])
> ENDFOR


And furthermore, if you wanted to save that template in a file, you
could just do:

save, filename='mytemplate.idl', mytemplate

and to get it back some other day:

restore, 'mytemplate.idl'

--
Bernard Puc AETC, INC.
bpuc@va.aetc.com 1225 Jefferson Davis Highway #800
(703) 413-0500 Arlington, VA 22202
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Top 10 IDL Requests ... python
Next Topic: Simple number formatting problem

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

Current Time: Sun Nov 30 11:42:25 PST 2025

Total time taken to generate the page: 0.24117 seconds