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

Home » Public Forums » archive » Re: storing ASCII_TEMPLATE templates for later use
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: storing ASCII_TEMPLATE templates for later use [message #21935] Fri, 06 October 2000 00:00
Theo Brauers is currently offline  Theo Brauers
Messages: 58
Registered: November 1997
Member
Henk wrote:
>
> Hi,
>
> Is it possible to reuse ASCII_TEMPLATE structures for later use ?
> I find it a very handy tool to describe ascii files, but I don't want to do
> the whole procedure everytime I read a data file. Therefore I would like to
> know how I can store the resulting structure in a file, or type it in in a
> procedure. I will then be able to make a generic file reading routine for
> all my data files.
> Sorry if this is a stupid question, still learning...
>
> Thanks,
>
> Henk

This should work:

PRO create_template(file)
mytemplate = ASCII_TEMPLATE(file)
SAVE, mytemplate, FILENAME='/somewhere/mytemplate.sav'
END

FUNCTION reuse_template(file)
RESTORE, FILENAME='/somewhere/mytemplate.sav'
data = READ_ASCII(file, TEMPLATE=mytemplate)
RETURN, data
END

Best Theo

--
----------------------------------------------
Dr. Theo Brauers
Institut fuer Atmosphaerische Chemie (ICG-3)
Forschungszentrum Juelich
52425 JUELICH, Germany
Tel. +49-2461-61-6646 Fax. +49-2461-61-5346
http://www.kfa-juelich.de/icg/icg3/MITARBEITER/th.brauers.ht ml
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Setting the horizontal scroll position in a list widget
Next Topic: storing ASCII_TEMPLATE templates for later use

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

Current Time: Fri Oct 10 20:38:58 PDT 2025

Total time taken to generate the page: 0.80457 seconds