type conversion error - help needed urgent [message #84471] |
Sun, 26 May 2013 11:05 |
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
|
|
|