Sequence Conversion

new topic     » topic index » view thread      » older message » newer message

To convert the ascii representation of a hex number to the actual hex value
use value(), where ascii is asequence containing the ascii representation
(which in Eu must be prefixed by #, as in "#1A") and hex is the actual
number:

include get.e
sequence temp
temp=value(ascii)
if temp[1]=GET_SUCCESS then
    hex=temp[2]
else
    -- error-handling code here
end if

And to convert the other way:

ascii=sprintf("%x",hex)

-- Mike Nelson

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu