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

Home » Public Forums » archive » type conversion error - help needed urgent
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
type conversion error - help needed urgent [message #84471] Sun, 26 May 2013 11:05
sid is currently offline  sid
Messages: 50
Registered: January 1995
Member
Hello everyone,
My variable is like this jplm5(4)=3456.
Since it is a huge number of files I would like to put this in a loop
So I did like this
res(2,w)='jplm'+strtrim(v,2)+dpi(0)
where v =10; this also changes thats why i need a loop in this also
then it gives error like unable to convert string to integer
then I did
res(2,w)='jplm'+strtrim(v,2)+string(dpi(0))
then if I print this alone
print, 'jplm'+strtrim(v,2)+string(dpi(0))
jplm10 34;it prints like this
Then I did
print, 'jplm'+strtrim(v,2)+'('+string(dpi(0))+')'
jplm10( 34);it prints like this now

but actually what i need is the value of this below,
jplm10(34)
I need to use this value for further calculations but this is taken as a string and the variable couldnt be used.

Please let me know how to take this as a variable without this type conversion error.

thanking you in advance
sid
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: celestial sphere plotting
Next Topic: on the background color of cgplot

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

Current Time: Wed Oct 08 18:40:10 PDT 2025

Total time taken to generate the page: 0.00507 seconds