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

Home » Public Forums » archive » Read ASCII
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Read ASCII [message #10591] Thu, 08 January 1998 00:00 Go to previous message
DMottershead is currently offline  DMottershead
Messages: 17
Registered: January 1998
Junior Member
I am trying to read in some ASCII data in a column form with a format
defined in my main procedure like this:

fileData = {WBD_File, $
yr:0, $
mn:0, $
day:0, $
hour:0, $
minute:0, $
value:0.0}

info={obj:obj, $
filedata:filedata}
ptr=ptr_new(info,/no_copy)

I am opening and reading the data in my event handler like this:

'open': begin
filename='d:\idl\mhl\syd9712.wbd'

WIDGET_CONTROL, (*ptr).infowbd.fileText, SET_VALUE = filename

x=35136
arr=fltarr(6,x)
hdr=strarr(5)
count=0

;make a the same structure as fileData

a=(*ptr).fileData

data=replicate(a,x)

openr, lun, filename,/get_lun

;read header in

readf,lun,hdr

WHILE NOT EOF(lun) DO BEGIN
READF, lun, a
data(count)=a
count=count+1
endwhile

data=data(0:count-1)

; tell user abour file header

WIDGET_CONTROL, (*ptr).infowbd.fileHeader, SET_VALUE = hdr

; get the data values

My problem exists when I try to "copy" the "data" back to the fileData
structure.
How do I make the fileData structure the same size as the "data". I have
tried to replicate (*ptr).fileData without any success. Also, how do I
copy the values from "data" to "(*ptr).fileData"? In advance, thanks for
your help.


--
Regards

David

************************************************************ *******
David Mottershead Phone: +61 2 9949 0234
Manly Hydraulics Laboratory Fax: +61 2 9948 6185
110b King St, Manly Vale, 2093 email: dmottershead@mhl.nsw.gov.au
SYDNEY, AUSTRALIA WWW: http://www.mhl.nsw.gov.au
************************************************************ *******
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: idl for solaris
Next Topic: IDL and sqlite

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

Current Time: Wed Oct 08 16:47:56 PDT 2025

Total time taken to generate the page: 0.10705 seconds