VB 2005 Command
2 min read
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.
Ask AI
AI can make mistakes. Check the cited posts. Archived advice can be out-of-date
Don't include personal information. Questions and selected public posts go to OpenAI. About Ask AI