Answers to your tech questions
Computer forums for help with removing malicious software (malware) and improving computer security

Welcome ( Log In | Register )
Easy as 1,2,3!

 
Reply to this topicStart new topic
> VB 2005 Command, String to ASCII Value
Vectris
post Sep 13 2008, 10:35 PM
Post #1


Silver Member
Group Icon

Group: Tech Classroom
Posts: 323
Joined: 24-July 08
From: U.S.
Member No.: 80,488
Operating System: Windows XP Professional Version 2002 Service Pack 3



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.
Go to the top of the page
 
+Quote Post
Ax238
post Nov 27 2008, 04:22 PM
Post #2


ASCII and ye shall receive.
Group Icon

Group: Tech Team
Posts: 723
Joined: 9-November 06
From: Somewhere out there
Member No.: 64,025
Operating System: XP Pro SP2



I'm a bit late, but the function you are looking for is Asc.
Go to the top of the page
 
+Quote Post
Vectris
post Nov 30 2008, 10:44 AM
Post #3


Silver Member
Group Icon

Group: Tech Classroom
Posts: 323
Joined: 24-July 08
From: U.S.
Member No.: 80,488
Operating System: Windows XP Professional Version 2002 Service Pack 3



Ya that's what I used. I figured this out a while ago but thanks for replying with more info on it.
Go to the top of the page
 
+Quote Post
appleoddity
post Feb 24 2009, 10:23 PM
Post #4


SuperMember
Group Icon

Group: Tech Team
Posts: 1,655
Joined: 7-January 09
From: Flint, Michigan
Member No.: 83,485
Operating System: Windows XP, Server 2003/2008, Linux



QUOTE (Vectris @ Sep 13 2008, 11:35 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. smile.gif
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 


RSS Time is now: 20th November 2009 - 11:53 PM
Advertisements do not imply our endorsement of that product or service. The forum is run by volunteers who donate their time and expertise. We make every attempt to ensure that the help and advice posted is accurate and will not cause harm to your computer. However, we do not guarantee that they are accurate and they are to be used at your own risk.
Member site: Alliance of Security Analysis Professionals | UNITE Against Malware
Memory Forums | Auto Repair Forum
© Geeks to Go, Inc. | All Rights Reserved | Privacy Policy