asc function alternative

G

Guoqi Zheng

Sir,

When I call the asc function to return an interger value of one byte. it can
only return up to 128, which function I can use to return > 128? I use ascw,
but it seems to be the same, so I am using convert.toInt16 now. any idea
which function can do the same task?

--
Kind regards

Guoqi Zheng
guoqi AT meetholland dot com
Http://www.meetholland.com
 
H

Herfried K. Wagner [MVP]

* "Guoqi Zheng said:
When I call the asc function to return an interger value of one byte. it can
only return up to 128, which function I can use to return > 128?

How do you call the function on a byte? The byte already contains the
number, so why do you need 'Asc' at all?
I use ascw,
but it seems to be the same, so I am using convert.toInt16 now.

???

\\\
Dim b As Byte = 233
Dim i As Short = b
///
 
G

Guoqi Zheng

haha.... That is the part I am confusing, I am not familiar with those
byte/bit. I am getting clearer now.

I converted byte to char, then use asc to call the number, does it sounds
stupid? Now, I also remove my Convert.ToInt16 functions. Thanks man.

By the way, I am doing all these in order to figure out a quoted-printable
class. For quoted-printable, any octet except.... may be represented by....

I use System.Text.Encoding.UTF8.GetBytes(strInput) to get an array of
bytes, the encode those bytes, the bytes I got from UTF8.GetBytes is same as
what they said "octet", am I understand right or how can I get an array of
octets from an string?

Thank you very much for your help!!!
--
Kind regards

Guoqi Zheng
guoqi AT meetholland dot com
Http://www.meetholland.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top