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

Home » Public Forums » archive » string read
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
string read [message #71554] Sun, 27 June 2010 22:29
gaurijyoti29 is currently offline  gaurijyoti29
Messages: 10
Registered: April 2009
Junior Member
I am reading the data from a file and passing it to routine dms2d as
given below;

OPENR, unit, 'd:\data.txt'
d=fltarr(8)
dat = ' '
for i=0,3 do begin
READF, unit, dat
print,dat
for j=0,7 do begin
d[j]=dms2d(dat[j])
print,d[j]
endfor

it gives following errors

% Type conversion error: Unable to convert given STRING to DOUBLE
% Detected at : DMS2D

the input file( strarr(8,4) is as follows;

'28 55 31','28 54 23','28 56 27','28 57 18','77 57 10','77 56 52','77
56 42','77 55 23'
'28 54 31','28 55 23','28 57 27','28 54 18','77 59 10','77 58 52','77
56 42','77 55 23'
'28 58 31','28 59 23','28 56 27','28 52 18','77 57 10','77 56 52','77
45 42','77 54 23'
'28 56 31','28 57 23','28 56 27','28 57 18','77 53 10','77 57 52','77
56 42','77 55 23'

would appreciate any help.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Add GSHHS coastline on georeferenced image layers retrieved from MODIS HDF file?
Next Topic: Colorbar with logarithm base 2

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

Current Time: Wed Oct 08 15:40:06 PDT 2025

Total time taken to generate the page: 0.00520 seconds