Tutorials Home
What's New
Top Rated
Submit
myTutes
Random!
Figuring Out Functions
Author: Eddie Carroll
| Website: http://www.flashkit.com |
The Function Armoury - Chr
|
Chr
|
Syntax: Chr (number)
|
This function converts an ASCII code to its character equivalent. Every keyboard character has it's own unique ASCII code. For example the letter "a" is 97 and the capital letter "A" is 65. (see what an ASCII table looks like). The Chr function will convert the number 97 into the letter "a". A practical application of this function is the conversion of uppercase letters to lower case letters by converting the uppercase letter to a number, subtracting 32 from the code then converting the number back to the letter using the Chr function. To do this though you will require the use of the Ord function as well.
Set Variable: "temp" = 65
Set Variable: "myLetter" = Chr (temp)
The variable "myLetter" is assigned the string "A".
|
| |
|
| » Level Intermediate |
|
|
Added: : 2000-09-27
Rating: 8.85 Votes: 114
Hits: 12094
|
| » Author |
|
Eddie is the Content Editor at Flashkit.com and is actually a sentient Gateway Solo 2150xl notebook that suffers from acute lysdexia and caffine addiction. He is carried on the shoulders of a semi-autonomous human called "Body".
|
| » Download |
|
Download the files used in this tutorial.
|
|
Download (12 kb)
|
|
Get conversion and unzipping tools
for PC and Mac here!
|
| » Forums |
|
More help? Search our boards for quick answers!
|
|
Please rate this tutorial, 10 is the top rating, you can also click the
comments link to read/write a review.
|
|
|