Write language name in 3D ASCII: Difference between revisions
Content added Content deleted
m (→block characters: enlarged the font size of the smiley.) |
m ({{Out}} / moved Category to top) |
||
Line 1: | Line 1: | ||
{{task}} |
{{task}} |
||
⚫ | |||
The task is to write the language's name in 3D ASCII. (We can leave the definition of "3D ASCII" fuzzy, so long as the result is interesting or amusing, not a cheap hack to satisfy the task.) |
|||
⚫ | |||
The task is to write the language's name in 3D ASCII. |
|||
(We can leave the definition of "3D ASCII" fuzzy, |
|||
so long as the result is interesting or amusing, |
|||
not a cheap hack to satisfy the task.) |
|||
=={{header|Ada}}== |
=={{header|Ada}}== |
||
Quotes are not escaped by \ in ada (nor does \ have any meaning in strings), |
Quotes are not escaped by \ in ada (nor does \ have any meaning in strings), |
||
so this turns out highlighting funny. |
|||
<lang Ada>with Ada.Text_IO; use Ada.Text_IO; |
<lang Ada>with Ada.Text_IO; use Ada.Text_IO; |
||
with Ada.Strings.Fixed; use Ada.Strings.Fixed; |
with Ada.Strings.Fixed; use Ada.Strings.Fixed; |
||
Line 52: | Line 58: | ||
GuiClose: |
GuiClose: |
||
ExitApp</lang> |
ExitApp</lang> |
||
⚫ | |||
'''Output:''' |
|||
<pre> ______ __ __ __ __ |
<pre> ______ __ __ __ __ |
||
/\ __ \/\ \_\ \/\ \/ / |
/\ __ \/\ \_\ \/\ \/ / |
||
Line 81: | Line 87: | ||
} |
} |
||
</lang> |
</lang> |
||
{{out}} |
|||
<p>output:</p> |
|||
<pre> |
<pre> |
||
_/_/_/_/ _/ _/ _/ _/ |
_/_/_/_/ _/ _/ _/ _/ |
||
Line 181: | Line 187: | ||
NEXT row% |
NEXT row% |
||
ENDPROC</lang> |
ENDPROC</lang> |
||
{{out}} |
|||
'''Output:''' |
|||
<pre> |
<pre> |
||
##### ##### #### ##### #### #### ###### #### |
##### ##### #### ##### #### #### ###### #### |
||
Line 338: | Line 344: | ||
==={{header|ZX Spectrum Basic}}=== |
==={{header|ZX Spectrum Basic}}=== |
||
We have used an extended (non-ASCII) character in this example to produce |
We have used an extended (non-ASCII) character in this example to produce |
||
an inverted space symbol (143 on the spectrum character table), for simplicity. |
|||
We could substitute another character, and change the handler |
|||
to cause a colour switch using a traditional space (ascii 32), |
|||
but the output would still look the same. |
|||
<lang zxbasic>10 LET s$="BASIC": REM our language name |
<lang zxbasic>10 LET s$="BASIC": REM our language name |
||
Line 430: | Line 440: | ||
^ $,< < < (code path reuse here,all 3 end in ,$ so I merged them) |
^ $,< < < (code path reuse here,all 3 end in ,$ so I merged them) |
||
</lang> |
</lang> |
||
{{out}} |
|||
Output is: |
|||
<pre> |
<pre> |
||
Line 445: | Line 455: | ||
const char*s = " _____\n /____/\\\n/ ___\\/\n\\ \\/__/\n \\____/"; |
const char*s = " _____\n /____/\\\n/ ___\\/\n\\ \\/__/\n \\____/"; |
||
int main(){ puts(s); return 0; }</lang> |
int main(){ puts(s); return 0; }</lang> |
||
{{out}} |
|||
Output |
|||
<pre> |
<pre> |
||
_____ |
_____ |
||
Line 487: | Line 497: | ||
//-------------------------------------------------------------------------------------------------- |
//-------------------------------------------------------------------------------------------------- |
||
</lang> |
</lang> |
||
{{out}} |
|||
Output |
|||
<pre> |
<pre> |
||
______ ______ |
______ ______ |
||
Line 529: | Line 539: | ||
} |
} |
||
</lang> |
</lang> |
||
{{out}} |
|||
Output |
|||
<pre> |
<pre> |
||
/$$$$$$ /$$$$$$$ /$$$$$$$ |
/$$$$$$ /$$$$$$$ /$$$$$$$ |
||
Line 646: | Line 656: | ||
.</lang> |
.</lang> |
||
{{out}} (note: the shadow effect is quite faint on this site): |
|||
<pre> |
|||
_______'''_/'''\\\\\\\\\_______'''_/'''\\\\\_______'''_/'''\\\\\\\\\\\\\_________'''_/'''\\\\\_______'''_/'''\\\_____________ |
_______'''_/'''\\\\\\\\\_______'''_/'''\\\\\_______'''_/'''\\\\\\\\\\\\\_________'''_/'''\\\\\_______'''_/'''\\\_____________ |
||
____'''_/'''\\\'''////////'''______'''_/'''\\\'''///'''\\\____'''_\/'''\\\'''/////////'''\\\_____'''_/'''\\\'''///'''\\\____'''_\/'''\\\_____________ |
____'''_/'''\\\'''////////'''______'''_/'''\\\'''///'''\\\____'''_\/'''\\\'''/////////'''\\\_____'''_/'''\\\'''///'''\\\____'''_\/'''\\\_____________ |
||
Line 656: | Line 667: | ||
___'''_\////'''\\\\\\\\\____'''_\///'''\\\\\/_____'''_\/'''\\\\\\\\\\\\\'''/'''_____'''_\///'''\\\\\'''/'''_____'''_\/'''\\\\\\\\\\\\\\\_ |
___'''_\////'''\\\\\\\\\____'''_\///'''\\\\\/_____'''_\/'''\\\\\\\\\\\\\'''/'''_____'''_\///'''\\\\\'''/'''_____'''_\/'''\\\\\\\\\\\\\\\_ |
||
______'''_\/////////'''_______'''_\/////'''_______'''_\/////////////'''_________'''_\/////'''_______'''_\///////////////'''__ |
______'''_\/////////'''_______'''_\/////'''_______'''_\/////////////'''_________'''_\/////'''_______'''_\///////////////'''__ |
||
Press enter to stop appreciating COBOL in 3D. |
Press enter to stop appreciating COBOL in 3D.</pre> |
||
=={{header|D}}== |
=={{header|D}}== |
||
Line 939: | Line 950: | ||
println "Groovy".asAsciiArt</lang> |
println "Groovy".asAsciiArt</lang> |
||
{{out}} |
|||
Output: |
|||
<pre> _|_|_| |
<pre> _|_|_| |
||
_| _| _|_| _|_| _|_| _| _| _| _| |
_| _| _|_| _|_| _|_| _| _| _| _| |
||
Line 973: | Line 984: | ||
</lang> |
</lang> |
||
{{out}} |
|||
<pre> __ __ __ ___ ___ |
|||
/\ \/\ \ /\ \ /\_ \ /\_ \ |
/\ \/\ \ /\ \ /\_ \ /\_ \ |
||
\ \ \_\ \ __ ____\ \ \/'\ __\//\ \ \//\ \ |
\ \ \_\ \ __ ____\ \ \/'\ __\//\ \ \//\ \ |
||
Line 1,019: | Line 1,031: | ||
end</lang> |
end</lang> |
||
{{out}} with "icon" as the argument: |
|||
<pre> /\ |
|||
\/ |
\/ |
||
/\ |
/\ |
||
Line 1,206: | Line 1,219: | ||
</lang> |
</lang> |
||
With no parameters |
{{out}} With no parameters: |
||
⚫ | |||
<pre> |
<pre> |
||
_/ |
_/ |
||
Line 1,337: | Line 1,349: | ||
return \isTrue() |
return \isTrue() |
||
</lang> |
</lang> |
||
{{out}} |
|||
'''Output:''' |
|||
<pre> |
<pre> |
||
///\ ///\ ///////////////\ |
///\ ///\ ///////////////\ |
||
Line 1,370: | Line 1,382: | ||
for i, l in lines: |
for i, l in lines: |
||
echo repeatChar((lines.len - i) * 3), l</lang> |
echo repeatChar((lines.len - i) * 3), l</lang> |
||
{{out}} |
|||
Output: |
|||
<pre> <<<> <<<> <<<<<<<<<<<<<<<> <<<> <<<> <<<<<<<<<<<<> <<<<<<<<<<<<> <<<<<<<<<<<<> |
<pre> <<<> <<<> <<<<<<<<<<<<<<<> <<<> <<<> <<<<<<<<<<<<> <<<<<<<<<<<<> <<<<<<<<<<<<> |
||
<<<<<<> <<<> <<<> <<<<<<> <<<<<<> <<<> <<<> <<<> <<<> <<<> <<<> |
<<<<<<> <<<> <<<> <<<<<<> <<<<<<> <<<> <<<> <<<> <<<> <<<> <<<> |
||
Line 1,522: | Line 1,534: | ||
</lang> |
</lang> |
||
{{out}} |
|||
Output: |
|||
<pre> |
<pre> |
||
/@@@@@@@ /@@ |
/@@@@@@@ /@@ |
||
Line 1,731: | Line 1,743: | ||
end /*j*/ /* [↑] show a line and its shadow*/ |
end /*j*/ /* [↑] show a line and its shadow*/ |
||
/*stick a fork in it, we're done.*/</lang> |
/*stick a fork in it, we're done.*/</lang> |
||
{{out}} when using the default input: |
|||
<pre> |
<pre> |
||
////////////\ |
////////////\ |
||
Line 2,074: | Line 2,086: | ||
]</lang> |
]</lang> |
||
{{out}} |
|||
Output: |
|||
<pre> |
<pre> |
||
///\ ///\ /////////\ ///\ ///////\ |
///\ ///\ /////////\ ///\ ///////\ |
||
Line 2,093: | Line 2,105: | ||
\\\/ \\\/ \\\/ \\\\\\\\\\\/ \\\\\\\/ |
\\\/ \\\/ \\\/ \\\\\\\\\\\/ \\\\\\\/ |
||
</pre> |
</pre> |
||
⚫ | |||
⚫ |