[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: template for READ_ASCII



Alex,
This is great. It is the first time I have seen a simple example of how a
structure is constructed. My template is so simple, I really like this
approach. I now have 2 solutions. Great!!  Thanks again.

Bob

> From: Alex Schuster <Wonko@planet-interkom.de>
> Organization: Der Alex
> Newsgroups: comp.lang.idl-pvwave
> Date: Mon, 25 Jun 2001 12:44:55 +0200
> Subject: Re: template for READ_ASCII
> 
> Bob Fugate wrote:
> 
>> My question is, can I save the template somehow so I don't have to
>> regenerate it with ASCII_TEMPLATE each time I restart IDL and  want to read
>> new tables? I realize I only have to run ASCII_TEMPLATE once each session
>> but I would like to make this completely automatic and so I don't have to
>> manually go through the GUI each day. It is not a really big deal but I am
>> getting greedy.
> 
> There is the SAVE method already mentioned in this thread, but another
> possibility would be the creation of the template in your program like I
> just did in one of mine:
> 
> template = { $
> version : 1.0, $
> datastart : 9, $
> delimiter : 32B, $
> missingvalue : !values.f_nan, $
> commentsymbol : '', $
> fieldcount : 8L, $
> fieldtypes : [ 3, 4, 4, 4, 4, 4, 4, 4 ], $
> fieldnames : [ 'time', 'xyz', 'field3', 'field4', $
> 'field5', 'field6', 'field7', 'winkel' ], $
> fieldlocations : [ 0, 3, 8, 14, 22, 27, 33, 40 ], $
> fieldgroups : [ 0, 1, 1, 1, 1, 1, 1, 7 ] }
> 
> Just do a HELP, mytemplate, /STRUCT, and you will see what kind of
> struct the template is. There is nothing wrong with using SAVE and
> RESTORE, but sometimes I like to avoid extra files and prefer a single
> one.
> 
> Alex
> -- 
> Alex Schuster     Wonko@planet-interkom.de
> alex@pet.mpin-koeln.mpg.de