Wanted: A dec conversion that returns a single value
Oldbitcollector (Jeff)
Posts: 8,091
I'm hunting for something that I suspect exists, but I can't seem to lay my hands on it..
I need a DEC conversion routine that converts to a single byte value. Most of the common conversion routines like those that are included in video and serial drivers seem to simply place bytes on the screen. What I'm looking for is one that will convert to a single value.
Have I missed something obvious here?
Thanks
OBC
I need a DEC conversion routine that converts to a single byte value. Most of the common conversion routines like those that are included in video and serial drivers seem to simply place bytes on the screen. What I'm looking for is one that will convert to a single value.
Have I missed something obvious here?
Thanks
OBC
Comments
-Phil
Apparently the limit for case statement is 64, so if you don't need all 128 standard ascii charcters, maybe you can disable the ones you don't need to stay within that 64 case limit or just use the if statements I have
c := "0" + v
where v is in the range [0..9]. If you want to NULL-terminate the "string", make c an array of 2 bytes, where the 2nd one is 0.
Jonathan
OBC