Make hex to ascii

George KrietsepisGeorge Krietsepis Junior MemberPosts: 159
Dear All,
could you please help me on the below issue ?
I have a hexadecimal array Buffer[] = $00,$00,$00,$00,$00,$05,$00,$03,$02,$12,$34
What I need to do is to get the two last hex's, buffer[10] = $12 and buffer[11] = $34 and calculate the decimal number of the hex $1234 ( 4660d ). Using the hextoi('1234') is the goal but HOW can I make the buffer[10] and buffer[11] to be the ASCII of '1234' ?



  • DanielDaniel System Developer Posts: 9
    value = ( buffer[10] * 256 ) + buffer[11]
    Not sure why you need ASCII there.
    If you need to convert your value to an ASCII string to show on a text field: itoa(value)

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file