Show ASCII table: Difference between revisions

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