Character codes: Difference between revisions
Content added Content deleted
No edit summary |
(added Fantom example) |
||
Line 198: | Line 198: | ||
<lang false>'A." |
<lang false>'A." |
||
"65,</lang> |
"65,</lang> |
||
=={{header|Fantom}}== |
|||
A character is represented in single quotes: the 'toInt' method returns the code for the character. The 'toChar' method converts an integer into its respective character. |
|||
<lang fantom> |
|||
fansh> 97.toChar |
|||
a |
|||
fansh> 'a'.toInt |
|||
97 |
|||
</lang> |
|||
=={{header|Forth}}== |
=={{header|Forth}}== |