VB 2005 Command
Posted 13 September 2008 - 10:35 PM
"Life's like a game of Poker, sometimes you win, sometimes you lose" - Garfield
Register to Remove
Posted 24 February 2009 - 10:23 PM
I'm currently learning VB (2005 edition, express) and I wanted to know how I can change a string to it's ASCII value. I don't know much about ASCII but apparently a letter/character has a numerical value in what's known as ASCII. I'm not sure if there's a command or not for converting a string to the ASCII value but if anyone knows a good way to do this, whether it's from experience or something you found, I'm open to it. And I did try googling this one but I couldn't come up with anything useful... I will continue to search though, thanks to anyone who can provide info on this.
Although ASC is a valid command... You can't technically convert a "string" to its ASCII value. You can convert a single character to its ASCII value. But a string does not have an ASCII value. Only single characters have an equivalent ASCII value. What you do with the value of each character in the string is up to you.
If you want to convert a string that consists of a numeric value, (such as "12345") to an integer you can work with, you can use the .tointeger method and receive an integer = 12345. Now you can manipulate the integer mathematically.
This thread is old, but I figured I would post some extra information anyways.
The help you have been given is free. If you have been happy with our help please consider donating to support this forum.
If you would like to say thanks for the help I have given you please View My Profile and Leave a Comment.
Your encouragement is welcome.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users