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

Home » Public Forums » archive » READS-string conversion problem??!!
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
READS-string conversion problem??!! [message #78550] Tue, 29 November 2011 05:04
anil is currently offline  anil
Messages: 34
Registered: August 2009
Member
Hi,
This might be a very easy task though, I keep missing something and
I'm stuck with this type conversion error. My problem is : I have a
dataset and in the 6th line of these data, there is some information I
want to use to open other files. What I mean is I will gather month-
day-year information from this line and by using this I will determine
the number of that day for that year( julday(x,y,2002)-
julday(1,1,2002) etc..). And then find the files (another data set in
the same folder) corresponding to that day. The data set goes like
2002_current211.dat,2002_current218.dat etc.. So I just want to write
something like
filename=year+'_current'+day+'.dat' which I can not do. Here is the
code I have:

day3=strmid(b,22,2) ; where b is the 6th line.
day2=string(day3)
day1=fix(day2)
day=intarr(1,1)
reads,day1,day

I do the same for year and month also

numofday=julday(month,day,year)-julday(1,1,year)

then when I say :
filename=year+..............
I always get : % Type conversion error: Unable to convert given STRING
to Integer. or
% Type conversion error: Unable to convert given STRING to Long.

What is missing or wrong? Help please
Regards,
Anil
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL QUESTIONS(time convection)
Next Topic: Re: READS-string conversion problem??!!

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

Current Time: Wed Oct 08 15:27:04 PDT 2025

Total time taken to generate the page: 0.00542 seconds