http://wiki.spheredev.org/index.php?title=Legacy:CreateStringFromCode&feed=atom&action=historyLegacy:CreateStringFromCode - Revision history2024-03-29T06:22:31ZRevision history for this page on the wikiMediaWiki 1.29.0http://wiki.spheredev.org/index.php?title=Legacy:CreateStringFromCode&diff=586&oldid=prevApollolux: created from http://web.archive.org/web/20110802033529/http://www.spheredev.org/wiki/CreateStringFromCode2013-06-01T22:38:41Z<p>created from http://web.archive.org/web/20110802033529/http://www.spheredev.org/wiki/CreateStringFromCode</p>
<p><b>New page</b></p><div>This function returns a string corresponding to the ASCII code number inputted.<br />
<br />
==Usage==<br />
<br />
{{Usage|returns=string|func=CreateStringFromCode|params=integer}}<br />
<br />
* '''number''' integer. The ASCII index number of the character to be returned. Eg: 65 is 'A'<br />
<br />
==Examples==<br />
<br />
<syntaxhighlight><br />
var string = CreateStringFromCode(65);<br />
font.drawText(0, 0, "The first letter of the alphabet is " + string);<br />
FlipScreen();<br />
GetKey();<br />
</syntaxhighlight><br />
<br />
==Notes==<br />
The <code>CreateStringFromCode</code> function is not a commonly used function, but in special cases, it may be useful. Note that the JavaScript specification includes a similar function, [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCharCode String.fromCharCode] which acts the same way but supports multiple arguments.<br />
<br />
{{API:Script/navbox}}</div>Apollolux