Write language name in 3D ASCII: Difference between revisions
m
syntax highlighting fixup automation
Fredisland (talk | contribs) |
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
||
Line 20:
=={{header|11l}}==
<
|‘ XX
X
Line 33:
L(line) lines
print((‘ ’ * (lines.len - L.index - 1))‘’(line.ljust(width).replace(‘ ’, ‘ ’).replace(‘X’, ‘__/’) * 3))</
{{out}}
Line 48:
=={{header|360 Assembly}}==
3D EBCDIC. This program does nothing clever in any way: it just prints out strings.
<
STM 14,12,12(13)
BALR 12,0
Line 60:
BR 14
LTORG
END</
{{out}}
<pre>
Line 74:
=={{header|Action!}}==
Atari 8-bit computers use [https://en.wikipedia.org/wiki/ATASCII ATASCII] character set which is a variation of ASCII.
<
$00 $00 $00 $00 $4E $4E $4E $00 $00 $00 $00 $00 $00 $00 $00 $00 $4E $00 $00 $00 $00 $4E $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $4E $00 $00 $00
$00 $00 $00 $46 $47 $00 $00 $47 $00 $00 $00 $00 $00 $00 $00 $42 $47 $47 $00 $00 $42 $47 $47 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $42 $47 $47 $00 $00
Line 93:
ptr=PeekC(88)+280
MoveBlock(ptr,data,400)
RETURN</
{{out}}
[https://gitlab.com/amarok8bit/action-rosetta-code/-/raw/master/images/Write_language_name_in_3D_ASCII.png Screenshot from Atari 8-bit computer]
Line 100:
Quotes are not escaped by \ in ada (nor does \ have any meaning in strings),
so this turns out highlighting funny.
<
with Ada.Strings.Fixed; use Ada.Strings.Fixed;
procedure AsciiArt is
Line 116:
if i mod 3 = 0 then New_Line; Put(i/3*' '); end if;
end loop;
end AsciiArt;</
{{out}}
<pre>
Line 131:
=={{header|Arturo}}==
<
______ __
/\ _ \ /\ \__
Line 139:
\ \_\ \_\ \_\ \ \__\\ \____/\ \_\\ \____/
\/_/\/_/\/_/ \/__/ \/___/ \/_/ \/___/
:}</
{{out}}
Line 152:
=={{header|AutoHotkey}}==
<
draw =
(
Line 169:
GuiClose:
ExitApp</
{{out}}
<pre> ______ __ __ __ __
Line 179:
=={{header|AWK}}==
<syntaxhighlight lang="awk">
# syntax: GAWK -f WRITE_LANGUAGE_NAME_IN_3D_ASCII.AWK
BEGIN {
Line 198:
exit(0)
}
</syntaxhighlight>
{{out}}
<pre>
Line 214:
==={{header|Applesoft BASIC}}===
Ported from [[Write language name in 3D ASCII#ZX Spectrum Basic|ZX Spectrum Basic]].<
20 DIM B(5,5) : REM OUR BIGMAP CHARACTERS
30 FOR L = 1 TO 5 : REM 5 CHARACTERS
Line 262:
9030 DATA 31,4,4,4,31: REM I
9040 DATA 14,17,16,17,14: REM C
</syntaxhighlight>
==={{header|BBC BASIC}}===
{{works with|BBC BASIC for Windows}}
Uses the built-in '''BBC Micro'''-compatible character generator, so any text can be specified.
<
END
Line 288:
PRINT
NEXT row%
ENDPROC</
{{out}}
<pre>
Line 303:
==={{header|FreeBASIC}}===
freebasic is quite a long name, so I have done a combi.
<
dim as integer xres=loword(width)
Line 330:
print "BASIC"
Sleep
</syntaxhighlight>
{{out}}
<pre> \ \ \ \ \ \ \ \ \ \ \ \
Line 351:
==={{header|Liberty BASIC}}===
<syntaxhighlight lang="lb">
r=21:s=9:c=s
For i=1 To 11
Line 370:
Next
Data 479667712,311470336,485697536,311699712,476292608,0,1976518785,1160267905,1171157123,1160267909,1171223529
</syntaxhighlight>
{{out}}
Line 440:
==={{header|TI-83 BASIC}}===
<
Disp “ +o+ooo +o+ooo
Disp “ .o .o
Line 446:
Disp “ +o +ooooo
Disp “
Disp “ BASIC</
Replace . + o with 0x81,0x80,and 0x7F http://tibasicdev.wikidot.com/one-byte-tokens
Line 458:
but the output would still look the same.
Fixed the error and removed the need for 2^z.
<
20 FOR l=1 TO 5: REM 5 characters
30 FOR m=1 TO 5: REM 5 rows
Line 494:
9020 DATA 15,16,14,1,30: REM S
9030 DATA 31,4,4,4,31: REM I
9040 DATA 14,17,16,17,14: REM C</
To me it does not work. So I bring my particular solution:
<
10 LET d=0: INK 1: GO SUB 40
20 LET d=1: INK 6: GO SUB 40
Line 515:
150 DATA "XXX XXXX XXX X X "
160 DATA "X X X X X X X "
170 DATA "XXX X X XXX X XXX"</
[[File:Basic.jpg]]
=={{header|Batch File}}==
<
for %%b in (
""
Line 533:
""
) do echo(%%~b
pause</
=={{header|Befunge}}==
===Befunge-93===
<
v"'%$%'%$%3$%$%7% 0%&7&%&7&(%$%'%$"<
>"%$%7%$%&%$%&'&%7%$%7%$%, '&+(%$%"v
Line 546:
? ";(;(+(+$%+(%&(;(3%$%&$ 7`+( ":v >
^v!:-1<\,:g7+*63%4 \/_#4:_v#:-*84_$@
$_\:,\^ >55+,$:^:$</
{{out}}
<pre>
Line 562:
(It adds line offset to those strings,and the strings are encoded with numbers just because.)
{{works with|CCBI|2.1}}
<syntaxhighlight lang="befunge">
v THE DATA IMAGE.(totally useless after loading into stack)
>89 v Made by gamemanj
Line 598:
" "
^ $,< < < (code path reuse here,all 3 end in ,$ so I merged them)
</syntaxhighlight>
{{out}}
<pre>
Line 612:
=={{header|Brainf***}}==
Coming up with decent 3D font was honestly the hardest part.
<
-...[<]<+++[>++++[>>...<<-]<-]> >>..>>>.....<<<..>>>...[<]++[>>
.....>>>...<<<<<-]>.>.>.>.<<..> >.[<]<+++++[>++++[>>.<<-]<-]>>>
Line 627:
..>>.<<.>>.>......<..>..<.<<..> >.<<.>>.>...<<.>.>..<..>..<..>.
.<..<<.>>.>..<..>..<.<<<.>..... .>>.<.>>......<<..>>..<<.<...>>
.<.>>..<<.>.<.>>..<<..>>..<<..> >..<<.<.>>.<.>>..<<..>>..<<.<<.</
{{out}}
<pre>
Line 641:
=={{header|C}}==
3D enough?<
const char*s = " _____\n /____/\\\n/ ___\\/\n\\ \\/__/\n \\____/";
int main(){ puts(s); return 0; }</
{{out}}
<pre>
Line 654:
=={{header|C sharp|C#}}==
<
using System.Text;
Line 757:
}
}
}</
Output:
Line 769:
=={{header|C++}}==
<
#include <windows.h>
#include <iostream>
Line 799:
}
//--------------------------------------------------------------------------------------------------
</syntaxhighlight>
{{out}}
<pre>
Line 817:
</pre>
Another solution:
<
// @author Martin Ettl (http://www.martinettl.de)
// @date 2013-07-26
Line 841:
return 0;
}
</syntaxhighlight>
{{out}}
<pre>
Line 857:
=={{header|Clojure}}==
{{libheader|clj-figlet}}
<
(println
(render-to-string
(load-flf "ftp://ftp.figlet.org/pub/figlet/fonts/contributed/larry3d.flf")
"Clojure"))</
{{out}}
Line 879:
This displays 'COBOL' in 3D with a shadow effect. The font is 'Slant Relief' from [http://http://patorjk.com/software/taag/ here].
{{works with|OpenCOBOL}}
<
PROGRAM-ID. cobol-3d.
Line 956:
GOBACK
.</
{{out}} (note: the shadow effect is quite faint on this site):
Line 973:
=={{header|Common Lisp}}==
{{libheader|cl-ppcre}}
<
(ql:quickload :cl-ppcre)
(defvar txt
Line 986:
)
(princ (cl-ppcre:regex-replace-all " " (cl-ppcre:regex-replace-all "x" txt "_/") " " ))
</syntaxhighlight>
{{out}}
<pre>
Line 999:
=={{header|ContextFree}}==
<syntaxhighlight lang="contextfree">
startshape START
Line 1,101:
ARCL [ size 0.97 y 0.55 r 1.5 ]
}
</syntaxhighlight>
{{out}}
[https://www.contextfreeart.org/gallery/view.php?id=4205 Output Image]
Line 1,107:
=={{header|D}}==
This generates a single image ASCII stereogram.
<
// by Jan Hubicka and Thomas Marsh
// (GNU General Public License)
Line 1,165:
writeln();
}
}</
{{out}}
<pre>nguageDLangunguageDLangunguageDLangunguageDLangung
Line 1,181:
=={{header|Dart}}==
<
void main(){
print("""
Line 1,191:
""".replaceAll('X','_/'));
}
</syntaxhighlight>
{{out}}
<pre>
Line 1,204:
{{libheader| System.SysUtils}}
{{Trans|Java}}
<syntaxhighlight lang="delphi">
program Write_language_name_in_3D_ASCII;
Line 1,318:
F5('guy');
readln;
end.</
{{out}}
<pre> _/_/_/ _/ _/ _/
Line 1,343:
=={{header|Elixir}}==
<
def decode(str) do
Regex.scan(~r/(\d+)(\D+)/, str)
Line 1,355:
2 3 B5_1/4 6 B3 1B/_/2 /1_2 6 B1\n3 3 B10_6 B3 3 /2B_1_6 B1
4 2 B11_2B 1B_B2 B1_B 3 /1B/_/B_B2 B B_B1\n6 1B/11_1/3 B/_/2 3 B/_/"
IO.puts ASCII3D.decode(data)</
{{out}}
Line 1,371:
=={{header|Erlang}}==
<
-module(three_d).
-export([main/0]).
Line 1,377:
main() ->
io:format(" _____ _ \n| ___| | | \n| |__ _ __| | __ _ _ __ __ _ \n| __| '__| |/ _` | '_ \\ / _` |\n| |__| | | | (_| | | | | (_| |\n|____/_| |_|\\__,_|_| |_|\\__, |\n __/ |\n |___/\n").
</syntaxhighlight>
{{out}}
<pre>
Line 1,393:
'''3D ASCII:'''
{{trans|Elixir}}
<
-export([decode/1]).
Line 1,401:
Joined = string:join(lists:flatmap(Fun, Splited), ""),
Lines = binary:replace(binary:list_to_bin(Joined), <<"B">>, <<"\\">>, [global]),
io:format("~s~n", [Lines]).</
{{out}}
<pre>
Line 1,426:
=={{header|ERRE}}==
<
DIM TBL$[17,1]
Line 1,462:
END PROGRAM
</syntaxhighlight>
{{out}}
<pre>
Line 1,486:
=={{header|F_Sharp|F#}}==
<
let maxY = picture.Length
let maxX = picture |> List.maxBy String.length |> String.length
Line 1,529:
if x = 0 then printfn ""
printf "%c" c) a2
</syntaxhighlight>
{{out}}
<pre>
Line 1,546:
=={{header|Forth}}==
=== Text strings ===
<
\ Simple Method
Line 1,563:
( test at the console )
page "forth"
</syntaxhighlight>
{{out}}
Line 1,583:
=== Bit Matrix Method ===
<
\ Modified BFox for simple 3D presentation 2015-07-14
Line 1,685:
\ test the solution in the Forth console
</syntaxhighlight>
{{out}}
Line 1,715:
For the interest component of the task, I thought about rendering the result from an input string and realized that it wasn't completely trivial as the glyphs of the Lean font overlap with the standard letter spacing. Rendering different fonts would add interest because now there would be a point in developing a common font representation and rendering function. Block and Lean would have sufficed, but I looked further and found the Keyboard and Small Keyboard fonts. These I found somewhat amusing, for the final component of the task.
<
import (
Line 1,807:
fmt.Println(render("Go", lean))
fmt.Println(render("Go", smallKeyboard))
}</
{{out}}
<pre>
Line 1,823:
=={{header|Groovy}}==
A simple way to display ASCII art
<
_|_|_|
_| _| _|_| _|_| _|_| _| _| _| _|
Line 1,830:
_|_|_| _| _|_| _|_| _| _|_|_|
_|
_|_|"""</
A more complicated example:
<
def request = "http://www.network-science.de/ascii/ascii.php?TEXT=${delegate}&x=23&y=10&FONT=block&RICH=no&FORM=left&STRE=no&WIDT=80"
def html = new URL(request).text
Line 1,838:
}
println "Groovy".asAsciiArt</
{{out}}
<pre> _|_|_|
Line 1,850:
=={{header|Haskell}}==
A simple printing of the ASCII art
<
{-
__ __ __ ___ ___
Line 1,871:
main = putStrLn ascii3d
</syntaxhighlight>
{{out}}
Line 1,885:
=={{header|Icon}} and {{header|Unicon}}==
The following fits under the fuzzy definition of 3D ASCII and pays homage to one of the Icon Newsletter logos.
<
write(ExpandText(
if !arglist == "icon" then
Line 1,918:
s ? until pos(0) do
writes(repl(" ",tab(many(&digits)))|tab(upto(&digits)|0))
end</
{{out}} with "icon" as the argument:
Line 1,954:
=={{header|J}}==
<
view 5#.^:_1]21-~a.i.'j*ez`C3\toy.G)' NB. Due to Oleg Kobchenko
________________________
Line 1,976:
\| | | |
\_____|_____|_____|
</syntaxhighlight>
For the VRML script, see [http://nsg.upor.net/jpage/jpage.htm Andrew Nikitin's J page] (search for VRML) and for the origin of the 3D J banner, see [http://www.jsoftware.com/pipermail/programming/2007-May/006539.html Oleg Kobchenko's post to the J Forums].
Line 1,982:
Here's a slimmer version:
<
Line 2,018:
\| |
\_____|
</syntaxhighlight>
Explanation: the argument says where to place the solid "blocks". Each block is described by three integers, describing position along the x, y and z axis. In other words, 1 0 0 is one position to the right of 0 0 0, while 0 1 0 is one place down and 0 0 1 is one place towards the observer. (Thus the space at the top of the "slimmer" version could have been eliminated by subtracting 2 from the middle column of integers being passed to 'view'.)
Line 2,030:
It's not really that obfuscated. The characters in <var>z</var> are used to draw the letters. The array <var>f</var> contains one element per letter of the alphabet. Each array element is another array of 7 longs because each output letter is made of 7 lines of text. Each long value represents a sequence of 2-bit integers that are extracted by bit-twiddling and used to find the right character in <var>z</var>.
<
char[]z={' ',' ','_','/',};
long[][]f={
Line 2,108:
System.out.print(' ');
System.out.println(o[i]);}}}
</syntaxhighlight>
{{out}} With no parameters:
Line 2,137:
One small point of interest here is the use of string interpolation to simulate a "heredoc" string.
<
"\("
#
Line 2,153:
| [[range(length;0;-1) | " " * .], . ] | transpose[] | join("") ;
banner3D</
{{out}}
<pre>
Line 2,169:
=={{header|Julia}}==
{{trans|Awk}}
<
xxxxx
x x
Line 2,179:
xx xx x x x x xx
""", "x" => "_/"))
</
_/_/_/_/_/
_/ _/
Line 2,192:
=={{header|Kotlin}}==
{{trans|Java}}
<
class Ascii3D(s: String) {
Line 2,288:
Ascii3D("of the")
Ascii3D("Java entry")
}</
{{out}}
Line 2,330:
=={{header|Lasso}}==
<
---------------------------------------------------------------
| ,--, |
Line 2,349:
")
stdoutnl(#lasso)</
<pre>---------------------------------------------------------------
| ,--, |
Line 2,369:
=={{header|Lua}}==
<
io.write("| $$\n")
io.write("| $$ /$$ /$$ /$$$$$$\n")
Line 2,376:
io.write("| $$ | $$ | $$ /$$__ $$\n")
io.write("| $$$$$$$$| $$$$$$/| $$$$$$$\n")
io.write("|________/ \______/ \_______/\n")</
{{out}}
<pre> /$$
Line 2,387:
|________/ ______/ _______/</pre>
Alternate:
<
__
/\ \
Line 2,394:
\ \ \___\ \ \_\ \/\ \_\ \_
\ \____\\ \____/\ \___/\_\
\/____/ \/___/ \/__/\/_/]]</
{{out}}
<pre> __
Line 2,406:
=={{header|Mathematica}}/{{header|Wolfram Language}}==
No hardcoding at all!
<
ImageData[Binarize[Rasterize["Mathematica", ImageSize -> 150]]], 0];
Print[StringRiffle[
Line 2,414:
ConstantArray[
" ", {Max[locs[[All, 1]]] + 1, Max[locs[[All, 2]]] + 1}],
locs -> "\\"], Map[# + 1 &, locs, {2}] -> "#"], "\n"]];</
{{output}}
<pre>
Line 2,439:
=={{header|MiniScript}}==
Nothing fancy here, but in keeping with MiniScript's "clear and simple" ethos:
<
" ______ _____ _________",
"|\ \/ \ ___ ________ ___|\ _____\ ________ ________ ___ ________ _________ ",
Line 2,451:
for line in data
print line
end for</
{{out}}
<pre> ______ _____ _________
Line 2,463:
=={{header|Modula-2}}==
<
FROM Terminal IMPORT WriteString,WriteLn,ReadChar;
Line 2,501:
ReadChar
END Art.
</syntaxhighlight>
=={{header|Nanoquery}}==
<
println "|\\ ___ \\|\\ __ \\|\\ ___ \\|\\ __ \\|\\ __ \\|\\ \\|\\ \\|\\ ___ \\ |\\ __ \\ |\\ \\ / /| "
println "\\ \\ \\\\ \\ \\ \\ \\|\\ \\ \\ \\\\ \\ \\ \\ \\|\\ \\ \\ \\|\\ \\ \\ \\\\\\ \\ \\ __/|\\ \\ \\|\\ \\ \\ \\ \\/ / / "
Line 2,511:
println " \\ \\__\\\\ \\__\\ \\__\\ \\__\\ \\__\\\\ \\__\\ \\_______\\ \\_____ \\ \\_______\\ \\_______\\ \\__\\\\ _\\ __/ / / "
println " \\|__| \\|__|\\|__|\\|__|\\|__| \\|__|\\|_______|\\|___| \\__\\|_______|\\|_______|\\|__|\\|__|\\___/ / "
println " \\|__| \\|___|/ "</
{{out}}
<pre> ________ ________ ________ ________ ________ ___ ___ _______ ________ ___ ___
Line 2,524:
=={{header|NetRexx}}==
Based on an idea found in the [[#Scala|Scala]] version.
<
options replace format comments java crossref symbols nobinary
Line 2,589:
method isFalse public constant binary returns boolean
return \isTrue()
</syntaxhighlight>
{{out}}
<pre>
Line 2,610:
=={{header|Nim}}==
{{trans|Python}}
<
const nim = """
Line 2,622:
let lines = nim.dedent.multiReplace(("#", "<<<"), (" ", " "), ("< ", "<>"), ("<\n", "<>\n")).splitLines
for i, line in lines:
echo spaces(lines.len - i), line</
{{out}}
<pre> <<< <<< <<<<<<<<<<<<<<< <<< <<<
Line 2,632:
=={{header|OCaml}}==
<syntaxhighlight lang="ocaml">
print_string "
_|_|_| _|_|_| _|_| _|_| _|_| _|
Line 2,640:
_|_|_| _|_|_| _| _| _| _| _|_|_|_|_|
"
</syntaxhighlight>
{{out}}
<pre>
Line 2,652:
=={{header|Pascal}}==
<
program WritePascal;
Line 2,678:
end;
end.
</syntaxhighlight>
Need 64-Bit Integer for this solution.
My goal was to do a straight-forward solution, (Just two nested loops, no conditional code).
Line 2,696:
=={{header|Perl}}==
<
use strict;
use warnings;
Line 2,706:
) {
print $tuple->[0] x $tuple->[1];
}</
{{out}}
<pre> _ \ |
Line 2,715:
=={{header|Phix}}==
<!--<
<span style="color: #008080;">constant</span> <span style="color: #000000;">s</span> <span style="color: #0000FF;">=</span> <span style="color: #008000;">"""
------*** *
Line 2,726:
"""</span>
<span style="color: #7060A8;">puts</span><span style="color: #0000FF;">(</span><span style="color: #000000;">1</span><span style="color: #0000FF;">,</span><span style="color: #7060A8;">substitute_all</span><span style="color: #0000FF;">(</span><span style="color: #000000;">s</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"* "</span><span style="color: #0000FF;">,{</span><span style="color: #008000;">"_/"</span><span style="color: #0000FF;">,</span><span style="color: #008000;">" "</span><span style="color: #0000FF;">}))</span>
<!--</
{{out}}
<pre>
Line 2,739:
===obfuscated===
For those of you who like this sort of thing, same output
<!--<
<span style="color: #008080;">constant</span> <span style="color: #000000;">q</span> <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">{</span><span style="color: #000000;">0(30)10C</span><span style="color: #0000FF;">,</span><span style="color: #000000;">0(31)176</span><span style="color: #0000FF;">,</span><span style="color: #000000;">0(32)2A4</span><span style="color: #0000FF;">,</span><span style="color: #000000;">0(33)6N3</span><span style="color: #0000FF;">,</span><span style="color: #000000;">0(34)7GP</span><span style="color: #0000FF;">,</span><span style="color: #000000;">0(35)DWF</span><span style="color: #0000FF;">,</span><span style="color: #000000;">0(36)QC4</span><span style="color: #0000FF;">}</span>
<span style="color: #7060A8;">puts</span><span style="color: #0000FF;">(</span><span style="color: #000000;">1</span><span style="color: #0000FF;">,</span><span style="color: #7060A8;">substitute_all</span><span style="color: #0000FF;">(</span><span style="color: #7060A8;">sprintf</span><span style="color: #0000FF;">(</span><span style="color: #7060A8;">join</span><span style="color: #0000FF;">(</span><span style="color: #7060A8;">repeat</span><span style="color: #0000FF;">(</span><span style="color: #008000;">"%16b"</span><span style="color: #0000FF;">,</span><span style="color: #000000;">7</span><span style="color: #0000FF;">),</span><span style="color: #008000;">"\n"</span><span style="color: #0000FF;">),</span><span style="color: #000000;">q</span><span style="color: #0000FF;">),</span><span style="color: #008000;">" 10"</span><span style="color: #0000FF;">,{</span><span style="color: #008000;">"-"</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"_/"</span><span style="color: #0000FF;">,</span><span style="color: #008000;">" "</span><span style="color: #0000FF;">})&</span><span style="color: #008000;">"\n"</span><span style="color: #0000FF;">)</span>
<!--</
===another version===
Inspired by Ruby
<!--<
<span style="color: #7060A8;">puts</span><span style="color: #0000FF;">(</span><span style="color: #000000;">1</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"""
__ ________
Line 2,765:
<span style="color: #008000;">"\\ \\ \\ \\ \\_\\ /\n / / / \\ \\ \\ \\ \\ \\ / / \\\n/_/ / \\"</span><span style="color: #0000FF;">&</span>
<span style="color: #008000;">" \\ \\ \\ \\ \\ /_/ /\\ \\\n\\_\\/ \\_\\/ \\_\\/ \\_\\/\\_\\/\n"</span><span style="color: #0000FF;">)</span>
<!--</
=={{header|PicoLisp}}==
{{Trans|Tcl}}
<
"***** * "
"* * * * * "
Line 2,803:
(maplist '((X) (transform X "/" "\\")) (cdr Lst)) )
(bye)</
{{out}}
Line 2,819:
=={{header|PureBasic}}==
<
PrintN(" ////\ ////\ ////| ")
PrintN(" //// \ __ //// \ __ |XX|_/ ")
Line 2,836:
Print(#CRLF$ + #CRLF$ + "Press ENTER to exit"): Input()
CloseConsole()
EndIf</
Sample output:
<pre> ////\ ////\ ////|
Line 2,855:
=={{header|Python}}==
<b>Implementation 1:</b> based on the Scala type idea of 'fleshing out' a 2D banner version.
<
##### # # ##### # # #### # #
# # # # # # # # # ## #
Line 2,866:
lines = py.replace('#', '<<<').replace(' ','X').replace('X', ' ').replace('\n', ' Y').replace('< ', '<>').split('Y')
for i, l in enumerate(lines):
print( ' ' * (len(lines) - i) + l)</
{{out}}
Line 2,877:
<b>Implementation 2:</b>
<
charHeight = 8
Line 2,949:
endStr = (val + 1) * charWidth # end string position of 3D letter
lineOut += charTable[i][beginStr:endStr]
print(lineOut)</
{{out}}
Line 2,962:
<b>Implementation 3:</b> a more general solution that scrapes http://www.network-science.de/ascii for the ASCII art.
<
import html
Line 2,978:
ascii_text = ascii_text[:ascii_text.index(post_ascii)]
print(ascii_text)</
{{out}}
<pre> ____ __ __
Line 2,992:
=={{header|Quackery}}==
<
say "|\ __ \|\ \|\ \|\ __ \|\ ____\|\ \|\ \ |\ ___ \ |\ __ \|\ \ / /|" cr
say "\ \ \|\ \ \ \ \ \ \ \|\ \ \ \___|\ \ \/ /|\ \ __/|\ \ \|\ \ \ \/ / /" cr
Line 3,001:
say " \ \ \_______________________________________________________/ / /" cr
say " \ \____________________________________________________________/ /" cr
say " \|____________________________________________________________|/" cr</
{{out}}
Line 3,022:
Use the GUI to create a text banner:
<
#lang racket/gui
Line 3,065:
(for ([line (dropf-right (dropf lines empty?) empty?)])
(displayln (string-trim line #:left? #f))))
</syntaxhighlight>
{{out}}
Line 3,086:
(formerly Perl 6)
Produces a good old-fashioned stereogram, meant to be looked at by focusing beyond the screen, not by crossing your eyes. If you can't get it to converge, try shrinking the font size till the images are closer together than your eyes. Also helps to be old enough to have progressive lenses, so you can look through the reading part of your glasses. Or borrow glasses from someone who's farsighted. <tt>:-)</tt>
<syntaxhighlight lang="raku"
my $text = q:to/END/;
Line 3,108:
.say;
}
say '' for ^5;</
{{out}}
<small><pre>
Line 3,133:
=={{header|Raven}}==
<syntaxhighlight lang="raven">[
" ##### #### # # #### # #"
" # # # # # # # ## #"
Line 3,150:
$line r/#/@@@/g r/ /X/g r/X/ /g r/@ /@!/g r/@$/@!/g as $l1
$l1 "@" split $r1 join "!" split $r2 join print "\n" print
</syntaxhighlight>
{{out}}
<pre> ///////////////> ////////////> ///> ///> ////////////> ///> ///>
Line 3,167:
This REXX has been used as part of a test suite for some REXX interpreters to stress test their syntax parser.
<
signal . /* Uses left-hand shadows, slightly raised view.
0=5~2?A?2?A?
Line 3,193:
,13,u));_=_('=',left('',16,u));_=_('#','|\\|');_=translate(_,"|"u,'@"')
do k=0 for 16;x=d2x(k,1);_=_(x,left('',k+1));end;say ' '_;end;exit;_:return,
changestr(arg(1),_,arg(2))</
Some older REXXes don't have a '''changestr''' BIF, so one is included here ──► [[CHANGESTR.REX]].
Line 3,222:
{{Works with|ooRexx}}
{{Works with|Regina}}
<
drop !top !bot
Line 3,288:
isFalse:
procedure
return \isTrue()</
{{out}}
<pre> ///////////////\
Line 3,312:
<br>the output doesn't have trailing blanks,
<br>the input text can be any consistent non-blank character except the forward slash (<big>'''/'''</big>) or backward slash (<big>'''\'''</big>).
<
#=7; @.1 = '@@@@ '
@.2 = '@ @ '
Line 3,328:
do k=1 for 2; say strip(left('',#-j)$.k,"T") /*the LEFT BIF does indentation.*/
end /*k*/ /* [↑] display a line and its shadow.*/
end /*j*/ /*stick a fork in it, we're all done. */</
{{out|output|text= when using the internal default input:}}
<pre>
Line 3,348:
=={{header|Ruby}}==
<
#### #
# # #
Line 3,412:
#
#
EOS</
{{out}}
Line 3,460:
'''Another version:''' like a 3D solid.
<
def decode(str)
str.split(/(\d+)(\D+)/).each_slice(3).map{|_,n,s| s * n.to_i}.join.tr('sub','/_\\')
end
puts decode(enc)</
{{out}}
Line 3,485:
=={{header|Rust}}==
<
[' ', '#', '/', '_', 'L', '|', '\n'][id as usize]
}
Line 3,522:
println!("{}", decode(&code));
}</
{{out}}
Line 3,537:
{{libheader|Scala}}
===Java style===
<
val name = """
Line 3,598:
}
println(ASCII3D)</
===Idiomatic===
Cleaner code.
<
object Ascii3D extends App {
Line 3,641:
println(ASCII3D)
}</
{{out}}
<pre>
Line 3,657:
=={{header|Seed7}}==
<
const array string: name is [] (
Line 3,698:
end for;
writeln(previousLine);
end func;</
{{out}}
Line 3,716:
=={{header|Sidef}}==
{{trans|Ruby}}
<
***
Line 3,736:
};
say banner3D(text);</
<pre>
Line 3,752:
=={{header|SQL}}==
<
union all select 'S \|', 'Q Q\ ', 'L | ' from dual
union all select '\SSS ', 'Q Q |', 'L | ' from dual
Line 3,758:
union all select ' SSS |', '\QQQ\\|', 'LLLL\' from dual
union all select ' \__\/', ' \_Q_/ ', '\___\' from dual
union all select ' ', ' \\ ', ' ' from dual;</
This works in Oracle. For other databases, try it without "from dual".
{{out}}
Line 3,775:
=={{header|Tcl}}==
<
proc mergeLine {upper lower} {
Line 3,810:
{ * *** *}
}
printLines $lines</
{{out}}
<pre>
Line 3,824:
=={{header|UNIX Shell}}==
{{works with|Bash|4}}
<
mapfile -t name <<EOF
Aimhacks
Line 3,887:
main "$@"
</syntaxhighlight>
{{Out}}
<pre> __/__/__/ __/
Line 3,934:
=={{header|Visual Basic .NET}}==
{{trans|C#}}
<
Sub Main()
Line 3,950:
End Sub
End Module</
{{out}}
<pre> ___ ___ ___ ________ ___ ___ ________ ___ ________ ________ ________ ___ ________ ________ _______ _________
Line 3,965:
=={{header|Wren}}==
This uses the 3D ASCII letter font [https://github.com/arpan98/3dwrite/blob/master/3d_font.txt here].
<
____ ____ ____
|\ \ |\ \ |\ \
Line 4,015:
for (i in 0..8) {
System.print("%(w[i]) %(r[i]) %(e[i]) %(n[i])")
}</
{{out}}
Line 4,032:
=={{header|XPL0}}==
Here's XPL0's "cheap hack." (Hats off to D!)
<
proc DrawBlock(X, Y);
Line 4,058:
];
];
]</
{{out}}
Line 4,081:
=={{header|Yabasic}}==
<syntaxhighlight lang="yabasic">
// Method 1
// r$ = system$("explorer \"http://www.network-science.de/ascii/ascii.php?TEXT=${delegate}&x=23&y=10&FONT=block&RICH=no&FORM=left&STRE=no&WIDT=80&TEXT=Yabasic\"")
Line 4,119:
write(2, 2, "\\")
write(1, 1, "#")
print</
=={{header|zkl}}==
{{trans|Common Lisp}}
<
"
xxxxxx x x x
Line 4,132:
"
#<<<<
.replace(" "," ").replace("x","_/").println();</
{{out}}
<pre>
|