By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,552 Members | 927 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,552 IT Pros & Developers. It's quick & easy.

using a char

P: n/a
I have a String of bits -- "101011". I want to extract each bit in the
string as a char and then use each extracted char in multiplication.

The extraction part is easy (I think).

How can I convert each char to an int so that I can use it for
multiplication?

Thanks.

Nov 8 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
cint(..)

Thanks,

Seth Rowe
Fred wrote:
I have a String of bits -- "101011". I want to extract each bit in the
string as a char and then use each extracted char in multiplication.

The extraction part is easy (I think).

How can I convert each char to an int so that I can use it for
multiplication?

Thanks.
Nov 8 '06 #2

P: n/a
Hi Fred,

The first one is

Dim fred As Integer = Val("101011"(0))

I hope this helps,

Cor

"Fred" <eo*******@yahoo.comschreef in bericht
news:11**********************@m7g2000cwm.googlegro ups.com...
>I have a String of bits -- "101011". I want to extract each bit in the
string as a char and then use each extracted char in multiplication.

The extraction part is easy (I think).

How can I convert each char to an int so that I can use it for
multiplication?

Thanks.

Nov 9 '06 #3

P: n/a
val() worked without any problem. Cint() did not care for a char being
passed to it.
Thank you for your responses!
Cor Ligthert [MVP] wrote:
Hi Fred,

The first one is

Dim fred As Integer = Val("101011"(0))

I hope this helps,

Cor

"Fred" <eo*******@yahoo.comschreef in bericht
news:11**********************@m7g2000cwm.googlegro ups.com...
I have a String of bits -- "101011". I want to extract each bit in the
string as a char and then use each extracted char in multiplication.

The extraction part is easy (I think).

How can I convert each char to an int so that I can use it for
multiplication?

Thanks.
Nov 11 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.