Alright all, Something that's really bugging the hell out of me. Really interested to hear if any has had this issue or knows a way around it. Essentially what i want is to read an INT value from a String[]
So for instance if i input some variables into a routine such as:
Input1 :IN, Input2 :IN, Input3 :IN
DECL INT iCounter,Num1
DECL INT Input1,Input2,Input3
DECL CHAR StringName[6]
StringName = "Input"
FOR iCounter = 1 to 3
SWRITE (StringName[],Stat,Offset,"%1d",iCounter)
;So now StringName[] will Equal "Input1" which is the same as the routine input
ENDFOR
BUT what im then having issues with is using the value of "Input1" because most of the kernal will read this as a CHAR type and not INT. I've tried STRTOINT, I tried Casting it out and back in.
The only way i think it could work is:
*%7s is an example
SREAD (StringName[],Stat,Offset,"%7s",Num1)
So I'm essentially reading the value of the string to convert into a number. Hope this makes sense? To be honest I'm quite certain you can do this in an ABB, I think if anything its either totally not possible, or perhaps I've not quite got the right format variable for converting.
Apologies if this is long winded.
All the best
Ash