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

Home » Public Forums » archive » Re: reading file into structure?
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 file into structure? [message #24821] Thu, 19 April 2001 04:37
Ivan Zimine is currently offline  Ivan Zimine
Messages: 40
Registered: February 1999
Member
Randall Skelton wrote:
> READF, 1, data ;<-- this works.
> READF, 1, data.values ;<-- why doesn't this work?

because data is passed by reference and
data.values is passed to READF by value

> READF, 1, array
> data.values = array ; <-- dirty cheat

not a dirty cheat but one possible way to get your data into structure.
another way is to define values in your structure as a pointer

data = {basic_struct, comment: ' ', values: ptr_new(fltarr(nlev))}

and then

READF, 1, *data.values


--
Ivan Zimine | ivan.zimine@physics.unige.ch
Dpt. of Radiology | (+41 22) 372 70 70
Geneva University Hospitals |
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Tab Widgets?
Next Topic: DIALOG_PICKFILE

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

Current Time: Thu Oct 09 21:11:15 PDT 2025

Total time taken to generate the page: 0.31979 seconds