ASCII char to decmal value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am reading values from a comm port and recieve individual ascii characters
including non-printing and extended ones. They span the entire range from dec
value 0 to 255. What I need to do is get the decimal value from either a byte
or char value. i.e. NUL will give 0, SOH - 1, STX - 2 .... A - 39, B - 40
etc... up to 255

Have tried the web but can't sem to find anything.

Cheers in advance.
 
Hi,

Please will you be so kind not to multipost, crossposting is not any problem
in the dotnet and fox newsgroups. (Crossposting is sending one message to
more relevant newsgroups in one time and than we can all learn from the
answers).

I answered this question in the newsgroup dotnet general.

Cor
 
Director - Minvent said:
I am reading values from a comm port and recieve individual ascii
characters
including non-printing and extended ones. They span the entire range from
dec
value 0 to 255. What I need to do is get the decimal value from either a
byte
or char value. i.e. NUL will give 0, SOH - 1, STX - 2 .... A - 39, B - 40
etc... up to 255

In which format are these characters returned? Strings? 'Char's? 'Byte's?
 
Back
Top