Character codes: Difference between revisions

Content added Content deleted
(→‎{{header|Ruby}}: ++ sather)
(+Icon+Unicon)
Line 212:
=={{header|HicEst}}==
<lang hicest>WRITE(Messagebox) ICHAR('a'), CHAR(97)</lang>
 
== Icon and Unicon ==
==={{header|Icon}}===
<lang Icon>procedure main(arglist)
if *arglist > 0 then L := arglist else L := [97, "a"]
 
every x := !L do
write(x, " ==> ", char(integer(x)) | ord(x) ) # char produces a character, ord produces a number
end</lang>
Icon and Unicon do not currently support double byte character sets.
Sample output:
<pre>97 ==> a
a ==> 97</pre>
==={{header|Unicon}}===
This Icon solution works in Unicon.
 
=={{header|J}}==