Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do you get the ASCII value of a character?

Status
Not open for further replies.

tristero

Programmer
Jan 24, 2003
95
US
also, is there a function that translates a character into bits? (110101)

Dan Trenz
Ann Arbor, MI
 
? ASC('A') && 65

Ali Koumaiha
TeknoSoft Inc
Farmington Hills, Michigan
 
also look @ Bintoc() and ctobin() fuctions.

Ali Koumaiha
TeknoSoft Inc
Farmington Hills, Michigan
 

BINTOC()


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
tristero,

Here's a quick-n-dirty example that might get you started:

Code:
lcChar = "A"
lcResult = ""
FOR lnCounter = 1 TO 8
	lcResult = IIF(BITTEST(ASC(lcChar), lnCounter - 1), "1", "0") ;
		+ lcResult
ENDFOR
? lcResult

Andy
 
Mike,
How'd you get in this (almost) ALL Michigan thread? Maybe you'll have to move. :)

Dan - Ann Arbor, MI
Ali - Farmington Hills, MI
Andy - Lansing, MI
Rick - Lansing, MI

Rick

 
And Jimoo too Rick...he's from lansing..



Ali Koumaiha
Wireless Toyz
Farmington Hills, Michigan
 
Yes Ali,
I just said goodnight to Andy as he walked out the door, and Jim O. lives about 1/2 mile from here! We've got quite a few FP developers in the area. I'm proud of the fact that MI has 3 VFP MS MVPs out of the current total of 46!

In fact, I've seen at least 7 of them posting in the VFP forums here on Tek-Tips. (Some aren't as obvious or as vocal as others. :)) It's one of the reasons that TT has such quality answers. Of course - in my opinion - most of the best answers come from the non-MVPs (or possible future MVPs!).

Rick
 
Rick, I am opening a business (a Franchise) in Lansing in bout 6 months in front of meijer. The one across from the nice mall (Life Center Mall??) you know the mall that has the shops outdoors instead of indoors.

So, i will be in lansing more often. When i open, all of the guys on Tek-tips will come to my shop and get a free Cell phone (top of the line).. that's a promise :)

Ali Koumaiha
Wireless Toyz
Farmington Hills, Michigan
 
Rick

How'd you get in this (almost) ALL Michigan thread? Maybe you'll have to move.

And the fact that TT IS located in Michigan...I must be in the wrong place since UT is a few miles from where I am...;-)


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top