Chr: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
JwellsNB (talk | contribs)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
''This function is for BASIC compatibility. It is not available in pure JavaScript projects.''
Chr(''number'')
Chr(''number'')


Line 16: Line 18:
Print "Lowercase = " & Lowercase
Print "Lowercase = " & Lowercase
Print "Uppercase = " & Uppercase
Print "Uppercase = " & Uppercase
</pre>
== Example (JavaScript) ==
<pre>
//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);
</pre>
</pre>


Line 45: Line 34:


[[Category:Strings]]
[[Category:Strings]]
[[Category:BASIC Functions]]

Latest revision as of 15:20, 25 March 2019

This function is for BASIC compatibility. It is not available in pure JavaScript projects.

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

Output

Lowercase = a
Uppercase = A

Related Items

Asc