Chr: Difference between revisions
Jump to navigation
Jump to search
Line 25: | Line 25: | ||
var Lowercase, Uppercase; | var Lowercase, Uppercase; | ||
Lowercase = | Lowercase = String.fromCharCode(97); | ||
Uppercase = | Uppercase = String.fromCharCode(97 - 32); | ||
NSB.Print("Lowercase = " + Lowercase); | NSB.Print("Lowercase = " + Lowercase); | ||
NSB.Print("Uppercase = " + Uppercase); | NSB.Print("Uppercase = " + Uppercase); |
Revision as of 05:51, 2 May 2013
Chr(number)
Description
Chr returns the equivalent character of an ANSI character code. The required expression, number, is any numeric expression.
Example (Basic)
Rem Chr Example 'Chr returns characters from numbers Dim Lowercase, Uppercase Lowercase = Chr(97) Uppercase = Chr(97 - 32) Print "Lowercase = " & Lowercase Print "Uppercase = " & Uppercase
Example (JavaScript)
//Chr Example //Chr returns characters from numbers var Lowercase, Uppercase; Lowercase = String.fromCharCode(97); Uppercase = String.fromCharCode(97 - 32); NSB.Print("Lowercase = " + Lowercase); NSB.Print("Uppercase = " + Uppercase);
Output
Lowercase = a Uppercase = A