Jump to content

Character codes: Difference between revisions

make J implementation support unicode
(PowerShell implementation)
(make J implementation support unicode)
Line 188:
 
=={{header|J}}==
4 u: 97 98 99 9786
<lang j>cc=: {&a. :: (a.&i.)</lang>
abc☺
Examples of use:
cc3 u: 7 u: 'aabc☺'
97 98 99 9786
 
cc 97
a
cc 'alphabet'
97 108 112 104 97 98 101 116
cc 99+i.11
cdefghijklm
=={{header|Java}}==
<tt>char</tt> is already an integer type in Java, and it gets automatically promoted to <tt>int</tt>. So you can use a character where you would otherwise use an integer. Conversely, you can use an integer where you would normally use a character, except you may need to cast it, as <tt>char</tt> is smaller.
6,962

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.