Jump to content

Character codes: Difference between revisions

no edit summary
m (Automated syntax highlighting fixup (second round - minor fixes))
No edit summary
Line 956:
println[char["Frink rules!"]] // prints [70, 114, 105, 110, 107, 32, 114, 117, 108, 101, 115, 33]
println[[70, 114, 105, 110, 107, 32, 114, 117, 108, 101, 115, 33]] // prints "Frink rules!"</syntaxhighlight>
 
 
=={{header|GAPFutureBasic}}==
<syntaxhighlight lang="futurebasic">
print "a -> "; ASC("a")
print "98 -> "; CHR$(98)
 
handleevents
</syntaxhighlight>
{{output}}
<pre>
a -> 97
98 -> b
</pre>
 
 
=={{header|Gambas}}==
<syntaxhighlight lang="gambas">Public Sub Form_Open()
Line 972 ⟶ 988:
ASCII code 35 represents #
</pre>
 
=={{header|GAP}}==
 
{{header|GAP}}==
<syntaxhighlight lang="gap"># Code must be in 0 .. 255.
CharInt(65);
Line 978 ⟶ 996:
IntChar('Z');
# 90</syntaxhighlight>
 
 
=={{header|Go}}==
In Go, a character literal ''is'' simply an integer constant of the character code:
719

edits

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