Re: convert numbers
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Oct 11, 2003
- 498 views
On Sat, 11 Oct 2003 16:54:15 -0600, sixs at ida.net wrote: > >I have a field that is displayed in trace as: >hk =3D (49'1',50'2',51 '3') >I have tried to use the "value" to get the number "123" > >I don't understand > Does running this help any? sequence hk hk=3D"123" include get.e include misc.e sequence res while 1 do res=3Dvalue(hk) if res[1]=3DGET_SUCCESS then if integer(res[2]) then printf(1,"Integer %d\n",{res[2]}) elsif atom(res[2]) then printf(1,"Atom %g\n",{res[2]}) elsif sequence(res[2]) then printf(1,"Sequence \"%s\", aka %s\n",{res[2],sprint(res[2])}) else puts(1,"UNKNOWN TYPE!!\n") end if else puts(1,"invalid somehow\n") end if puts(1,"Enter another value:") hk=3Dgets(0) if length(hk)<2 then abort(0) end if puts(1,"\n") end while abort(0) Regards, Pete