Jump to content

Show ASCII table: Difference between revisions

m
m (→‎{{header|K}}: more concise)
Line 2,189:
=={{header|Ecstasy}}==
<syntaxhighlight lang="java">
module testShowAsciiTable {
{
@Inject Console console;
void run() {
for (Int offset : 0..<16) {
for (Int ascii = 32+offset; :ascii 0..< 128; ascii += 16) {
{
for (Int ascii = 32+offset; ascii < 128; ascii += 16)
{
console.print($|{ascii.toString().rightJustify(3)}/\
|{ascii.toByte().toByteArray()}: \
|{new Char(ascii).quoted().leftJustify(5)}
, suppressNewline=True);
}
console.print();
}
{console.print();
}
}
}
</syntaxhighlight>
 
162

edits

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