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

Home » Public Forums » archive » Re: Reading structure from array
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: Reading structure from array [message #44536] Mon, 20 June 2005 18:35
Robert Moss is currently offline  Robert Moss
Messages: 74
Registered: February 1996
Member
photosalex@freenetname.co.uk wrote:
> Hello, All!
>
> Could anyone suggest how to read a pre-defined structure containing
> variables and 2-D arrays from a source array? It's very simple to read
> such a structure from a file, using READU. Is there any way to do it
> with an array without explicitly specifying the indices of the sorce
> and target variables/arrays (this is gonna be too messy).
>
> Thanks a lot!
>

Write the source array to a temporary file as bytes (assuming it is not
already in a file), and read it back in using the structure definition
in the READF call. Something along these lines:

openw, lu, tmpfile, /get_lun
writeu, lu, data
free_lun, lu
openr, lu, tmpfile, /get_lun
readu, lu, struct
free_lun, lu
file_delete, tmpfile, /quiet
return, struct


--
Robert Moss, PhD
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Escaping Quotes
Next Topic: Re: Problem with IDLWAVE in XEmacs 21.5.18

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

Current Time: Wed Oct 08 13:36:04 PDT 2025

Total time taken to generate the page: 0.00428 seconds