

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.




If OpenConsole()
  ;Results are the same when compiled for Ascii or Unicode
  charCode.c = 97
  Char.s = "a"
  PrintN(Chr(charCode))   ;prints a
  PrintN(Str(Asc(Char)))  ;prints 97
 
  Print(#CRLF$ + #CRLF$ + "Press ENTER to exit")
  Input()
  CloseConsole()
EndIf