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

Home » Public Forums » archive » Writing an array of a structure to a file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Writing an array of a structure to a file [message #210] Tue, 11 February 1992 09:06
rfinch is currently offline  rfinch
Messages: 51
Registered: March 1991
Member
PV-Wave 3.1, Sun 4.

I've got an array of a structure which must be sorted and duplicate
entries deleted. Since PV-Wave's sort can only handle simple arrays
(not structures), I want to dump the array structure to an ascii file
and use Unix sort on it.

However, since the array is large (up to 5000 elements), I don't want
to use a "for" loop. What is want to do is say:

writef, unit, catlg_sta, format='(7a,3i10)'

where structure is defined as:

catlg_stru = {catlg, a:' ', b:' ', c:' ', e:' ', f:' ', $
d_st:' ', d_ed:' ', jul_st:0L, jul_ed:0L, dssfile:0L}
catlg_sta = replicate({catlg}, 5000)


However, curiously each tag field of each array element is put on its
own line. And stranger, it doesn't seem to make a lot of difference
just what the format is! A format of '(a)' produces the same result.
Free format is no good, as it decides itself where line breaks occur;
not good for subsequent sorting.

Any ideas how I can get each array element on its own line?

--
Ralph Finch 916-653-8268
rfinch@water.ca.gov ...ucbvax!ucdavis!caldwr!rfinch
Any opinions expressed are my own; they do not represent the DWR
[Message index]
 
Read Message
Previous Topic: Tabs in IDL text-widgets, an update
Next Topic: Phase Unwrapping Algo

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

Current Time: Fri Oct 10 15:45:50 PDT 2025

Total time taken to generate the page: 0.00231 seconds