Chr: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
JwellsNB (talk | contribs)
JwellsNB (talk | contribs)
Line 25: Line 25:


var  Lowercase, Uppercase;
var  Lowercase, Uppercase;
Lowercase = Chr(97);
Lowercase = String.fromCharCode(97);
Uppercase = Chr(97 - 32);
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

Related Items

Asc