Help with IDL STructure with variable string parameters to store [message #1547] |
Fri, 26 November 1993 07:03 |
vchagant
Messages: 4 Registered: April 1993
|
Junior Member |
|
|
Hi IDL GURUS,
We are using IDL 3.0
This is the program I wrote
===============================================
pro xt_pro
test = {name:'XXXXXXXXXXX',$
number:'XXXXXXXXXX',$
city:'XXXXXXXXXXXX'}
;test.name = STRING(test.name,FORMAT='(A40)');
;test.number = STRING(test.number,FORMAT='(A40)')
;test.city = STRING(test.city,FORMAT='(A40)');
test1 = test
file_name='test.dat'
test.name = 'singh'
test.number = '102.90'
test.city = 'Huntsville'
openw,1,file_name
writeu,1,test
print,test
close,1
openr,1,file_name
readu,1,test1
print,test1
close,1
stop
end
====================================================
This is the answer
===========================
IDL> .r test
% Compiled module: XT_PRO.
IDL> xt_pro
{ singh 102.90 Huntsville}
% READU: End of file encountered. Unit: 1
File: test.dat
% Execution halted at XT_PRO <test.pro( 24)> (READU).
% Called from $MAIN$ .
IDL>
===========================
What is the error I am doing.
If some one could help me , i will appriciate
Thanks
kris chaganti
chaganti@xanth.msfc.nasa.gov
or
vchagant@uahcs2.cs.uah.edu
|
|
|