

Task

Given a character value in your language, print its code   (could be ASCII code, Unicode code, or whatever your language uses).



Example

The character   'a'   (lowercase letter A)   has a code of 97 in ASCII   (as well as Unicode, as ASCII forms the beginning of Unicode).

Conversely, given a code, print out the corresponding character.




// An 'a' and a 'b'
var s = "a";
var c = 98;
var h = " ";
 
$print("Character code for 'a': ", $sget(s, 0), "\n");
 
$sset(h, 0, c);
$print("Character code ", c,  ": ", h, "\n");