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

Home » Public Forums » archive » Re: How to rip off the brackets when writing STRUCTURE into file in a whole?
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: How to rip off the brackets when writing STRUCTURE into file in a whole? [message #62684] Thu, 25 September 2008 12:39
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
ZuYing wrote:
> Dear all,
>
> I try to write a structure into a file but the free format will
> preserve the annoying brackets, and since each input is for different
> structures of unknown type, I can not write a specific format for it
> to input line by line. Any suggestions to write structures into a data
> file without brackets hanging around?
>
> Cheers,
>
> Ying


Hi,
not sure if this is the best way of doing it or not, but it works:

a = {a:0,b:'bb'}
b = string(a,/print)

now, if your structure does NOT contain any other structure, just remove
the first and last character of the b string (the {})
If you do have sub-structures, search and replace every occurrence of {
and }!

then, write b to your file!
Jean
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How to rip off the brackets when writing STRUCTURE into file in a whole?
Next Topic: IDLWAVE "Expanding path..."

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

Current Time: Fri Oct 10 06:46:31 PDT 2025

Total time taken to generate the page: 0.71484 seconds