Legacy:CreateStringFromCode

From Spherical
Revision as of 22:38, 1 June 2013 by Apollolux (talk | contribs) (created from http://web.archive.org/web/20110802033529/http://www.spheredev.org/wiki/CreateStringFromCode)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This function returns a string corresponding to the ASCII code number inputted.

Usage

string CreateStringFromCode(integer);


  • number integer. The ASCII index number of the character to be returned. Eg: 65 is 'A'

Examples

var string = CreateStringFromCode(65);
font.drawText(0, 0, "The first letter of the alphabet is " + string);
FlipScreen();
GetKey();

Notes

The CreateStringFromCode function is not a commonly used function, but in special cases, it may be useful. Note that the JavaScript specification includes a similar function, String.fromCharCode which acts the same way but supports multiple arguments.

API:Script/navbox