[Question]
  [
Write the shortest program which will take a string of numbers (of up to *at least* 20 length) as input, and display the output using the standard digital clock style numbers. For instance for input 81, a solution with ascii output would give:
```
 _
|_|  |
|_|  |
```
Graphical output is also acceptable, if it helps.
  
[Answer]
## [Funciton](http://esolangs.org/wiki/Funciton)
Not really a language suitable for golfing... but regardless, I tried to keep the code size as small as I could — quite a different challenge than in “usual” languages. This is **1555 characters** or **3110 bytes** (if encoded as UTF-16; UTF-8 is larger).
Here’s a screenshot of the program running. It really works:
![Here’s a screenshot of the program running. It really works :)](https://i.stack.imgur.com/rhnV7.png)
Since this looks ugly in StackExchange due to the extra line spacing, consider running the following code in your browser’s JavaScript console to fix that: `$('pre').css('line-height',1)`
```
     ╓─╖ ╔╗┌─╖   ┌─╖
     ║ʜ║ ║╟┤↔╟┐ ┌┤‼╟┐
     ╙┬╜ ╚╝╘═╝│ │╘╤╝│
╔═╗  ┌┴────┐  │┌┴╖ ┌┴╖
║0║ ┌┴─┐  ┌┴─┐└┤ʜ╟─┤·╟┐
╚╤╝┌┴╖┌┴╖┌┴╖┌┴╖╘╤╝ ╘╤╝│
┌┘┌┤·╟┤ɦ╟┤·╟┤?╟ │  ┌┴╖│
│ │╘╤╝╘╤╝╘╤╝╘╤╝ └──┤‼╟┘
│┌┴╖│ ┌┴╖┌┘╔═╧╗    ╘═╝
└┤?╟┘┌┤?╟┘┌╢10║    ┌─────────┐
 ╘╤╝ │╘╤╝┌┘╚══╝ ┌─┬┘╔══╗┌──╖┌┴╖ ╓─╖
  ┘  └───┘╔════╗│┌┴┐║21╟┤>>╟┤·╟┐║ɦ║
╔════════╗║1005╟┘└┬┘╚══╝╘═╤╝╘╤╝│╙┬╜        ┌─┐
║14073768║╚════╝ ┌┴╖ ┌─╖ ┌┴╖┌┴╖└─┴─────────┘┌┴╖
║7584800 ╟───────┤?╟─┤‼╟─┤ʜ╟┤·╟─────────────┤·╟┐╔═══════╗╔══╗
╚════════╝       ╘╤╝ ╘╤╝ ╘╤╝╘╤╝    ╔══╗┌─╖┌┐╘╤╝│║2097151║║21╟┐
 ╔═══════════════╗│   ┘   │  │     ║48╟┤−╟┤├─┤┌┘╚══╤════╝╚══╝│
 ║140737555464224╟┘  ┌────┘┌┬┘     ╚══╝╘╤╝└┘┌┘│╓─╖ │┌┐┌─╖┌─╖┌┴─╖
 ╚═══════════════╝   │ ┌───┘└─────────┐┌┴─╖ │┌┘║↔║ ├┤├┤‼╟┤↔╟┤>>║
┌────────────┐┌────┐┌┴╖│┌────────────┐├┤<<║ ││ ╙┬╜┌┘└┘╘╤╝╘═╝╘╤═╝
│   ╔══╗╔═══╗├┘╓─╖ └┤·╟┘│   ╔══╗╔═══╗├┘╘╤═╝ │└─┐└─┤╔═╗┌┴╖ ┌──┘
│   ║95║║892║│┌╢‡╟┐ ╘╤╝ │   ║95║║877║│ ┌┘╔══╧═╗│  │║0╟┤?╟┬┘
│   ╚═╤╝╚═╤═╝││╙─╜│  │  │   ╚═╤╝╚═╤═╝│╔╧╗║2097║│  │╚═╝╘╤╝│
│╔══╗┌┴╖┌┐│  ││┌─╖│ ┌┴╖ │╔══╗┌┴╖┌┐│  │║1║║151 ║│  └──────┘
│║32╟┤?╟┤├┤  │└┤‼╟┘┌┤‡║ │║32╟┤?╟┤├┤  │╚═╝╚════╝│
│╚══╝╘╤╝└┘└──┴┐╘╤╝ │╘╤╝ │╚╤═╝╘╤╝└┘└──┴┐      ┌─┘
│    ┌┴╖     ┌┴╖┌─╖│ │ ┌┴╖│  ┌┴╖     ┌┴╖ ┌─╖┌┴╖
│    │‼╟─────┤·╟┤‼╟┘ │┌┤·╟┘  │‼╟─────┤·╟─┤‼╟┤‡║
└┐┌┐ ╘╤╝     ╘╤╝╘╤╝  ││╘╤╝┌┐ ╘╤╝     ╘╤╝ ╘╤╝╘╤╝
 ├┤├┐┌┴╖╔══╗  └──┐┌┐ │└┐├─┤├┐┌┴╖╔══╗  ├──┐└  │
 │└┘└┤?╟╢32║╔═══╗├┤│┌┴╖││ └┘└┤?╟╢32║╔═╧═╗│┌┐┌┴╖╔══╗
╔╧══╗╘╤╝╚══╝║881╟┘│├┤?╟┘│    ╘╤╝╚══╝║325║└┤├┤?╟╢32║
║927║╔╧══╗  ╚═══╝ └┘╘╤╝╔╧═══╗╔╧══╗  ╚═══╝ └┘╘╤╝╚══╝
╚═══╝║124╟───────────┘ ║1019║║124╟───────────┘
     ╚═══╝             ╚════╝╚═══╝
```
It could probably be smaller if I hadn’t made a mistake due to which the output was back to front; I fixed that by adding an extra function to reverse the input. Otherwise I would probably have to rewrite all of it.
I also made another mistake (swapping the operands in two calls to `‼`) which made it necessary to declare the extra `‡` function, but this one is so small it fits *inside* the main function and thus doesn’t add any characters!
[Answer]
### wxpython, many characters
```
import wx, wx.gizmos as g
class T(wx.Frame):
 def __init__(_):
  wx.Frame.__init__(_, None, size = (800, 60))
  l = g.LEDNumberCtrl(_, -1)
  l.Value = raw_input()
class M(wx.App):
 def OnInit(_):
  T().Show()
  return 1
M().MainLoop()
```
Test
```
echo -n 81 | python codegolf-997-wx.py
```
![enter image description here](https://i.stack.imgur.com/0LUTJ.png)
ps: not a serious entry, but looks like graphical output is also acceptable, so I just gave it a try :-)
[Answer]
## J, 90, 78 68 chars
[ **update:** using unicode (1 byte) encoding:
```
,./(10 3 3$((90$3)#:256#.24x-~3&u:'%ė¨ÔW/~º»sy¡ăì<t÷²'){' _|'){~"./.Y
NB. utf characters are: 37 279 168 212 87 47 126 186 187 115 121 161 259 236 60 116 247 178
```
works as before: ]
```
,./(10 3 3$((90$3)#:1219424106940570763878862820444729939648410x){' _|'){~"./. '58321'
 _  _  _  _    
|_ |_| _| _|  |
 _||_| _||_   |
```
The key is in the encoding of digits as base-3 integers. Zero, for example is:
```
:
 _ 
| |
|_|
```
or `' _ | ||_|'`, which becomes 0102022123 = 2750.
[Answer]
## Golfscript - 66 chars
```
"placeholder text for userscript which counts chars             ";
```
`xxd`: (use `xxd -r` to revert)
```
0000000: 332c 7b3a 533b 2e7b 3438 2d22 5e70 285d  3,{:S;.{48-"^p(]
0000010: 7025 d3c4 4ab1 7d4a b8dc 4469 ce41 2222  p%..J.}J..Di.A""
0000020: f303 227b 6261 7365 7d2f 3330 2f53 3d33  .."{base}/30/S=3
0000030: 2f3d 7b22 5f20 7c22 3d7d 257d 256e 407d  /={"_ |"=}%}%n@}
0000040: 2f3b                                     /;
```
This follows most of the other answers in that there are no spaces between numbers and trailing spaces are kept in. A space between numbers can easily be added with `1+` before `{"_ |"=}%`. Packed into a base 3 number, and then as base 243 into a string.
[Answer]
## APL (Dyalog) (45)
```
{3 3⍴' _|'[1+⍵⊤⍨9⍴3]}¨⎕UCS'ા8धगɯે૙ࣃଏ૽'[1+⍎¨⍞]
```
The string, `ા8धगɯે૙ࣃଏ૽`, are the unicode characters `2750 56 2343 2327 623 2759 2777 2243 2831 2813` (however, you should be able to just copy and paste it). They encode the numbers. The program reads a line from the keyboard.
Explanation:
* `1+⍎¨⍞`: read a line from the keyboard, parse each character as a digit, then add 1 to each number (APL arrays are 1-based by default).
* `⎕UCS'ા8धगɯે૙ࣃଏ૽'[`...`]`: Select the characters belonging to the digits of the numbers you entered, and look up the Unicode values.
* `{`...`}¨`: for each of these values, do:
* `1+⍵⊤⍨9⍴3`: get the first 9 base-3 digits from the value as expressed in base-3, and add 1 (because the arrays ar 1-based).
* `' _|'[`...`]`: select a space, horizontal line, or vertical line depending on these digits
* `3 3⍴`: format as a 3-by-3 box.
[Answer]
# Mathematica 205 209 198 179
```
i = IntegerDigits; t = Thread; r = Rule;
z@n_ := Row@i@n /. t[r[Range[0, 9], Grid[Partition[ReplacePart[Characters@" _ |_||_|", 
t[r[#, ""]]], 3], Spacings -> 0] & 
/@ (i /@ {5, 24578, 49, 47, 278, 67, 6, 4578, , 78})]]
```
**Usage**
```
z@1234567890
```
![digits](https://i.stack.imgur.com/3sltt.png)
[Answer]
# JavaScript (145)
~~148~~ 145
Since JavaScript doesn’t really have standard input/output, this is written as a function that takes a string and returns the output as a string.
```
function r(n){for(i=o="",b=" |_\n|",L=n.length;i<3*L;)o+=b[(c="ǪĠòƲĸƚǚĢǺƺ".charCodeAt(n[i%L])>>(i++/L|0)*3)&1]+b[c&2]+b[c&4]+b[i%L?0:3];return o}
```
Spaced out:
```
function r(n)
{
    for (i = o = "", b = " |_\n|", L = n.length;   i < 3*L;   )
        o += b [ (c = "ǪĠòƲĸƚǚĢǺƺ".charCodeAt(n[i%L]) >> (i++/L|0)*3) & 1 ] +
             b [ c&2 ] +
             b [ c&4 ] +
             b [ i%L ? 0 : 3 ];  // space or newline
    return o
}
```
Here’s how it works:
* Every digit shape is encoded in a Unicode character consisting of 9 bits.
* The first three bits are for the first row, etc.
* In each group of three bits, the first specifies whether the first character is `|` or space, the second whether it’s `_` or space, and the third again `|` or space.
* These three bits are retrieved as `c&1`, `c&2` and `c&4`, which are then used as indexes into the string `b`.
* At each iteration, `i%L` is the “x-coordinate”, i.e. the digit within the input `n`
* At each iteration, `i/L` is the “y-coordinate”, i.e. the row, but we need `|0` to make it an integer
* Finally, the spaces between the digits and the newlines between the lines are *also* retrieved by indexing into `b`, re-using the space character *and* the otherwise unused position 3 in that string! :)
[Answer]
## Ruby, 142
```
' _     _  _     _  _  _  _  _ 
| |  | _| _||_||_ |_   ||_||_|
|_|  ||_  _|  | _||_|  ||_| _|'.lines{|l|puts x.chars.map{|i|l[i.to_i*3,3]}*''}
```
expects input in the variable `x`. examples:
```
x = '321'
#  _  _    
#  _| _|  |
#  _||_   |
x = '42'
#      _ 
#  |_| _|
#    ||_ 
```
[Answer]
## python3.8.10 : ~~148~~ 138 bytes
Old (148):
```
a=input()
N=0x375fa9176b3538d93ca41ea
for i in 0,3,6:print(''.join(' |'[N&x<<i>0]+' _'[N&x<<i+1>0]+' |'[N&x<<i+2>0]for x in[1<<9*int(x)for x in a]))
```
New (138):
```
a=input()
N=0x375fa9176b3538d93ca41ea
for i in -1,2,5:print(''.join(' |_|'[(N&x<<i+k>0)*k]for x in[1<<9*int(x)for x in a]for k in(1,2,3)))
```
[try the code here](https://tio.run/##NYzRCoIwGIXvfYpdtc0snL9zLmaP4AtIxLKkNdhEDBb47kuD7g7nfN8ZP/PTO4hRN8aN75nQpG3yAIIPWjJR3YBDfZfQ65I9dDL4CRlkHDqwrMj4aZyMmwnGx5c3jmC0XBfckXYXlDJ7e85pai@bE1anY0rJdOMD/XdI/2a7RrI9AqU0RlZAyStRy/wL)
[Answer]
## Golfscript - 97 chars
```
:*{32' _':$@'14'{?~!=}:&~32}%n*{:x' |':|\'1237'&$x'017'&|x'56'&}%n*{:x|\'134579'&$x'147'&|x'2'&}%
```
[Answer]
# D: 295 Characters
```
import std.stdio;void main(string[]a){string[3]o;foreach(c;a[1]){int n=cast(int)(c)-48;auto e=" ";o[0]~=n!=1&&n!=4?" _ ":"   ";o[1]~=!n||n>3&&n!=7?"|":e;o[1]~=n>1&&n!=7?"_":e;o[1]~=n<5||n>6?"|":e;o[2]~=!(n&1)&&n!=4?"|":e;o[2]~=!n||n>1&&n!=4&&n!=7?"_":e;o[2]~=n!=2?"|":e;}foreach(l;o)writeln(l);}
```
More Legibly:
```
import std.stdio;
void main(string[] a)
{
    string[3] o;
    foreach(c; a[1])
    {
        int n = cast(int)(c) - 48;
        auto e = " ";
        o[0] ~= n != 1 && n != 4 ? " _ " : "   ";
        o[1] ~= !n || n > 3 && n != 7 ? "|" : e;
        o[1] ~= n > 1 && n != 7 ? "_" : e;
        o[1] ~= n < 5 || n > 6 ? "|" : e;
        o[2] ~= !(n&1) && n != 4 ? "|" : e;
        o[2] ~= !n || n > 1 && n != 4 && n != 7 ? "_" : e;
        o[2] ~= n != 2 ? "|" : e;
    }
    foreach(l; o)
        writeln(l);
}
```
[Answer]
### Windows PowerShell, 127
```
$i="$input"[0..99]
'☺ ☺☺ ☺☺☺☺☺','♠☻♥♥♦♣♣☻♦♦','♦☻♣♥☻♥♦☻♦♥'|%{$c=$_
""+($i|%{('···0·_·0··|0·_|0|_|0|_·0|·|'-split0)[$c[$_-48]]})}
```
Since the strings contain some unpleasant-to-write characters, a hexdump for your convenience:
```
000: 24 69 3D 22 24 69 6E 70 │ 75 74 22 5B 30 2E 2E 39  $i="$input"[0..9
010: 39 5D 0A 27 01 00 01 01 │ 00 01 01 01 01 01 27 2C  9]◙'☺ ☺☺ ☺☺☺☺☺',
020: 27 06 02 03 03 04 05 05 │ 02 04 04 27 2C 27 04 02  '♠☻♥♥♦♣♣☻♦♦','♦☻
030: 05 03 02 03 04 02 04 03 │ 27 7C 25 7B 24 63 3D 24  ♣♥☻♥♦☻♦♥'|%{$c=$
040: 5F 0A 22 22 2B 28 24 69 │ 7C 25 7B 28 27 20 20 20  _◙""+($i|%{('
050: 30 20 5F 20 30 20 20 7C │ 30 20 5F 7C 30 7C 5F 7C  0 _ 0  |0 _|0|_|
060: 30 7C 5F 20 30 7C 20 7C │ 27 2D 73 70 6C 69 74 30  0|_ 0| |'-split0
070: 29 5B 24 63 5B 24 5F 2D │ 34 38 5D 5D 7D 29 7D     )[$c[$_-48]]})}
```
[Answer]
**Java Solution: ~~585~~ 570 Chars**
I don't think I'll be attempting any more golfing in Java...
```
import java.util.*;
public class CG997{public static void main(String[]args){
short[][]lets=new short[][]{{0,1,3,2,0,4,2,1,4},{0,0,3,0,0,4,0,0,4},{0,1,3,0,1,
4,2,1,3},{0,1,3,0,1,4,0,1,4},{0,0,3,2,1,4,0,0,4},{0,1,3,2,1,3,0,1,4},{0,1,3,2,1
,3,2,1,4},{0,1,3,0,0,4,0,0,4},{0,1,3,2,1,4,2,1,4},{0,1,3,2,1,4,0,0,4}};
String[]syms=new String[]{" ","_","|","  ","| "};
String s=new Scanner(System.in).nextLine();
for(int o=0;o<3;o++){for(char c:s.toCharArray()){for(int i =0;i<3;i++)
System.out.print(syms[lets[Short.parseShort(c+"")][i+o*3]]);
}System.out.println();}}}
```
[Answer]
# Bash, 11 characters
```
toilet "$i"
```
Yes I know, I'm cheating.
You need to have toilet installed.
[Answer]
# gForth, ~~186~~ 175 chars
New version:
```
: s query parse-word bounds s" D@DD@DDDDDb`ddfFF`fff`Fd`df`f`" bounds do cr 2dup do i c@ '0 - j + c@ 3 0 do dup 3 and s"  _|" drop + 1 type 4 / loop drop loop 10 +loop bye ; s
```
This actually bothers to exit (+3 chars) as well :). Here is the more readable version, it does some bit-packing to reduce the LUT size by 1/3, but the resulting code is more complex so it's not much of a savings:
```
: 7s query parse-word bounds 
    s" D@DD@DDDDDb`ddfFF`fff`Fd`df`f`"
    bounds do 
        cr
        2dup do
            i c@ '0 - j + c@
            3 0 do
                dup 3 and
                s"  _|" drop + 1 type
                4 / \ shorter than an rshift
            loop
            drop
        loop
    10 +loop bye ;
7s
```
Old version:
```
: s query parse-word bounds s"  _     _  _     _  _  _  _  _ | |  | _| _||_||_ |_   ||_||_||_|  ||_  _|  | _||_|  ||_|  |" bounds do cr 2dup do i c@ '0 - 3 * j + 3 type loop 30 +loop ; s
```
This leaves the stack unbalanced and doesn't bother to exit the interpreter. Here is a cleaner more readable version
```
: 7s query parse-word bounds 
    s"  _     _  _     _  _  _  _  _ | |  | _| _||_||_ |_   ||_||_||_|  ||_  _|  | _||_|  ||_|  |"
    bounds do 
        cr
        2dup do
            i c@ '0 - 3 * j + 3 type
        loop
    30 +loop 2drop bye ;
7s
```
[Answer]
# Java 8, ~~280~~ 274 bytes
```
interface M{static void main(String[]a){String x="",y=x,z=x;for(int c:a[0].getBytes()){c-=48;x+=" "+(c==4|c==1?" ":"_")+" ";y+=(c==7|c>0&c<4?" ":"|")+(c==7|c<2?" ":"_")+(c>4&c<7?" ":"|");z+=(c%2<1&c!=4?"|":" ")+(c%3==1?" ":"_")+(c==2?" ":"|");}System.out.print(x+"\n"+y+"\n"+z);}}
```
-6 bytes thanks to *@ceilingcat*.
**Explanation:**
[Try it here.](https://tio.run/##RY9Bb8IwDIX/ShYJlCpQtSVbGa2ZtPtOHAGhKAQUJlLUZihpy2/PAp3Yxbbee58tn/iVT6uL1Kf9t/dKG1kfuJDoq2sMN0qga6X26MyVJitTK31cb3nUDSOygPHEgZ20YItDVZPAI7Hg62QbH6X5dEY2JIo6MQU2LywFAcD6UNIPjBDCC4x2CBeOAgli3otlMhYlC2awehzRP7nMBmn3kJYshPJnqGjv@Cgr07F4gQD3972P5Gg2nHqiANk/d1u5xshzXP2Y@BL@McRSvNGYuqG1IXLz3qfZjL2@5fP35Bc)
```
interface M{                     // Class
  static void main(String[]a){   //  Mandatory main-method
    String x="",                 //   String for row 1, starting empty
           y=x,                  //   String for row 2, starting empty
           z=x;                  //   String for row 3, starting empty
    for(int c:a[0].getBytes()){  //   Loop over the bytes of the input
      c-=48;                     //    Convert the byte to integer
      x+=                        //    Append to row 1:
         c==4|c==1?              //     If the digit is a 1 or 4:
            "   "                //       Append three spaces
           :                     //      Else:
            " _ ";               //       Append a space + underscore + space instead
      y+=                        //    Append to row 2:
         (c==7|c>0&c<4?          //      If the digit is 1, 2, 3, or 7:
           " "                   //       Append a space
          :                      //      Else:
           "|")                  //       Append a pipe
         +(c==7|c<2?             //     +If the digit is 0, 1, or 7:
            " "                  //       Append a space
           :                     //      Else:
            "_")                 //       Append an underscore
         +(c>4&c<7?              //     +If the digit is 5 or 6:
            " "                  //       Append a space
           :                     //      Else:
            "|");                //       Append a pipe
      z+=                        //    Append to row 3:
         (c%2<1&c!=4?            //      If the digit is 0, 2, 6 or 8:
           "|"                   //       Append a pipe
          :                      //      Else:
           " ")                  //       Append a space
          +(c%3==1?              //     +If the digit is 1, 4, or 7:
             " "                 //       Append a space
            :                    //      Else:
             "_")                //       Append a pipe
          +(c==2?                //     +If the digit is 2:
             " "                 //       Append a space
            :                    //      Else:
             "|");               //       Append a pipe
    }                            //   End of loop
    System.out.print(x+"\n"+y+"\n"+z);
                                 //   Print the three rows
  }                              //  End of main-method
}                                // End of class
```
As function this would be [**212 bytes**](https://tio.run/##RVBdb4IwFH33V9w10ZQgRJENZ6nLsuf5ssdtMV3FDafFtNWAwm/HixB9uU3Px705ZyOOwsv2idqs/mu5FcbAu0jVuQeQKpvotZAJLJovwIfVqfoFSeWf0J/fYByGeNXDYaywqYQFKOBQG29@7sQ5J2RY8Hx44jlbZ5riVpAz45ylx8Mpy10uOQ9LHOMXgkfIjMASCCtcThGMSjkfDWQcIolUSRy3g@OghZZXaB6iKLqJ2Kmx94N4PJAPHM1ls/eq7E/aUzcr58HdV@nEHrSC3CVfirhF@5xYVbMm5/7ws8WcXdxjlq5gh3XRNi12Ipyuq8LYZOdnB@vvkbJU@ZKScTAJH5@i6fOI@DZ7wxpftRYFdZyuyqqu75oL) instead.
[Answer]
# [JavaScript (V8)](https://v8.dev/), ~~118~~ 115 bytes
-3 bytes: realised a cheaper way to loop through `|_|`
```
n=>[613550340,2132540234,1866373582].map(d=>n.replace(/./g,c=>(i=1<<c*3,g=s=>d&(i*=2)?s:' ')`|`+g`_`+g`|`)).join`
`
```
[Try it online!](https://tio.run/##Xc7PDoIgAIDxu0/RKaARCghSiT1Ia8nwz3AGTpsn353qWNffd/kGs5rFzm56HVcVOx29rm6SciEynmeYUc5EnjGeY6qk5AUXit3J00yw0ZUnczuNxrYwJWmPra7A9tjAry66avbQHTRD1@UMdgA7TcvSHjhCiAzB@Tqpow1@CWNLxtDDDgJFAUKX5E8z@hkRslCnb41v "JavaScript (V8) – Try It Online")
Takes input as a string of digits, uses three magic numbers which represent the state of each segment for each digit; every three bits is a digit.
Ungolfed and explained
```
n => [ // magic numbers
              //      9   8   7   6   5   4   3   2   1   0
  613550340,  // = 0b010_010_010_010_010_000_010_010_000_010_0
  2132540234, // = 0b111_111_100_011_011_111_110_110_100_101_0
  1866373582  // = 0b110_111_100_111_110_100_110_011_100_111_0
].map(d => n.replace(/./g,
  c => (
    i = 1 << c * 3, // initialise i to first bit of digit
    g = s => d & (i *= 2) ? s : ' ' // function to check bits
  )`|` + g`_` + g`|` // do function on each of '|_|'
)).join`
```
[Answer]
## C# 369 Characters
```
static void Main(string[] a){var b = new[] {123,72,61,109,78,103,119,73,127,111};var g = new[]{" _  ","|","_","| ","|","_","| "};a[0].ToCharArray().SelectMany((x,w)=>g.Select((y,i)=>new{s=((b[x-48]>>i&1)==1)?y:new String(' ',y.Length),j=i,v=w})).GroupBy(z=>(z.j+2)/3).ToList().ForEach(q=>Console.WriteLine(String.Join("", q.OrderBy(l=>l.v).Select(k=>k.s).ToArray())));}
```
I could easily cut *a few* characters out. The point was more to abuse LINQ :)
More whitespace version:
```
static void Main(string[] a)
{
    var b = new[] {123, 72, 61, 109, 78, 103, 119, 73, 127, 111};
    var g = new[] { " _  ", "|", "_", "| ", "|", "_", "| " };
    a[0].ToCharArray().SelectMany(
        (x,w)=>g.Select(
           (y,i)=>new{s=((b[x-48]>>i&1)==1)?y:new String(' ',y.Length),j=i,v=w}))
            .GroupBy(z=>(z.j+2)/3).ToList().ForEach(
            q=>Console.WriteLine(
                String.Join("", q.OrderBy(l=>l.v).Select(k=>k.s).ToArray())));
}
```
[Answer]
# Python, ~~218~~ ~~180~~ 176
`b=map(int,raw_input());a=map(int,bin(914290166014670372457936330)[2:]);c=' |_';p=lambda k:''.join(c[a[9*n+k]]+c[2*a[9*n+1+k]]+c[a[9*n+2+k]]for n in b)+'\n';print p(6)+p(0)+p(3)`
With line breaks:
```
b=map(int,raw_input())
a=map(int,bin(914290166014670372457936330)[2:])
p=lambda k:''.join(' |'[a[9*n+k]]+' _'[a[9*n+1+k]]+' |'[a[9*n+2+k]]for n in b)+'\n'
print p(6)+p(0)+p(3)
```
[Answer]
## Java, 2,095
```
public class DigitalNumber {
    public static void main(String args[]){
        char[][] panel = new char[3][120]; //A 20 digit panel!
        int digXIndex = 0;int digYIndex = 0;
        for (int i=0;i<args[0].length(); i++){
            int dig=Integer.parseInt(""+args[0].charAt(i));
            panel[digXIndex][digYIndex]=32;   
            digYIndex++;
            if (dig!=1 && dig!=4)
                panel[digXIndex][digYIndex]='_';  
            else
                panel[digXIndex][digYIndex]=32;
            digYIndex++;
                panel[digXIndex][digYIndex]=32; 
            digYIndex=3*i;
            digXIndex++;
            if (dig!=1 && dig!=2 && dig!=3 && dig!=7)
                panel[digXIndex][digYIndex]='|';    
            else
                panel[digXIndex][digYIndex]=32;
            digYIndex++;
            if (dig!=1 && dig!=0 && dig!=7)
                panel[digXIndex][digYIndex]='_';    
            else
                panel[digXIndex][digYIndex]=32;
            digYIndex++;
            if (dig!=6 && dig!=5)
                panel[digXIndex][digYIndex]='|';  
            else
                panel[digXIndex][digYIndex]=32;
            digYIndex=3*i;
            digXIndex++;
            if (dig!=6 && dig!=8 && dig!=2 && dig!=0)
                panel[digXIndex][digYIndex]=32;  
            else
                panel[digXIndex][digYIndex]='|';
            digYIndex++;
            if (dig!=7 && dig!=4 && dig!=1)
                panel[digXIndex][digYIndex]='_';  
            else
                panel[digXIndex][digYIndex]=32;
            digYIndex++;
            if (dig!=2)
                panel[digXIndex][digYIndex]='|';  
            else
                panel[digXIndex][digYIndex]=32;
            digXIndex=0;
            digYIndex+=(i*3)+1;
        }       
        for (int i=0; i<3; i++){
            for (int j=0; j<120; j++)
                if (panel[i][j]!=0)
                System.out.print((char)(panel[i][j]));
                else
                    System.out.print("");
            System.out.println();
        }   
    }
}
```
SAMPLE I/O
```
java DigitalNumber 98765432109876543210
     _  _  _  _  _     _  _     _  _  _  _  _  _     _  _     _ 
    |_||_|  ||_ |_ |_| _| _|  || ||_||_|  ||_ |_ |_| _| _|  || |
     _||_|  ||_| _|  | _||_   ||_| _||_|  ||_| _|  | _||_   ||_|
```
[Answer]
# PHP, ~~140~~ ~~136~~ ~~133~~ ~~131~~ ~~129~~ 128 bytes
I could save ~~5~~ 7 more with extended ascii: one each for `"| _"` and the linebreak, three for `~"z/]{4lno~|"` (bitwise negation would turn everything to extended ascii characters = no special characters, and PHP doesn´t need quotes there), two for `-1` (it´s only there to keep the map in standard ascii). But for readability and compatibility, I stay with standard ascii.
```
for(;""<$c=$argv[1][$i++];)for($n=753754680;$n>>=3;)$r[$p++%3].="| _"[ord(~"z/]{4lno~|"[$c])-1>>$n%8&1?:$n&2];echo join("
",$r);
```
**the bitmap**
* Take LEDS `_`,`|_|`, `|_|` as bits `-6-`,`024`,`135` (bit number &2 is 0 for vertical LEDs)
* Create bitmaps for numbers 0..9: `[123,48,94,124,53,109,111,112,127,125]`
* Decrease by 1 to make them all printable ascii codes -> `"z/]{4lno~|"`
* negate -> `~"z/]{4lno~|"` (allows ternary shorthand in character selection)
**the template**
* use `7` for the spaces -> `767`,`024`,`135`
* regroup by columns instead of rows -> `701`,`623`,`745` (renders `$p=0` obsolete)
* reverse -> `547326107` (read the map from right to left; allows arithmetic looping)
* append zero -> `5473261070` (allows to combine shift with test in loop head)
* read octal, convert to decimal -> `753754680` (two bytes shorter: one digit and the prefix)
**breakdown**
```
for(;""<$c=$argv[1][$i++];) // loop through input characters
    for($n=753754680;$n>>=3;)   // loop through template
        $r[$p++%3].="| _"[          // append character to row $p%3:
            ord(~"z/]{4lno~|"[$c])-1// decode bitmap
                >>$n%8&1            // test bit $n%8 (always 1 for bit 7)
            ?                       // if set: 1 (space)
            :$n&2                   // else: 2 (underscore) for bits 2,3,6; 0 (pipe) else
        ];
echo join("\n",$r);         // print result
```
[Answer]
# Powershell, 114 bytes
```
param($a)6,3,0|%{$l=$_
-join($a|% t*y|%{('   0 _ 0 _|0|_ 0| |0  |0|_|'-split0)[(+('f-SR5Z^mvr'["$_"])-shr$l)%8]})}
```
Test script:
```
$f = {
param($a)6,3,0|%{$l=$_
-join($a|% t*y|%{('   0 _ 0 _|0|_ 0| |0  |0|_|'-split0)[(+('f-SR5Z^mvr'["$_"])-shr$l)%8]})}
}
&$f "1234567890"
&$f "81"
```
Output:
```
    _  _     _  _  _  _  _  _
  | _| _||_||_ |_   ||_||_|| |
  ||_  _|  | _||_|  ||_| _||_|
 _
|_|  |
|_|  |
```
Main idea:
Each standard digital clock style number contains 3 lines. Moreover, the first line contains only 2 options. A total of 6 options. Therefore, 7 bits are enough to encode each digit.
```
line str=@('   ', ' _ ', ' _|', '|_ ', '| |', '  |', '|_|')
#    line str    binary       dec    ASCII
-    --------    ---------    ---    -----
0 -> 1 
     4 
     6        -> 1 100 110 -> 102 -> 'f'
1 -> 0
     5
     5        -> 0 101 101 ->  45 -> '-'
...
8 -> 1
     6
     6        -> 1 110 110 -> 118 -> 'v'
9 -> 1
     6
     2        -> 1 110 010 -> 114 -> 'r'
```
So, the string `f-SR5Z^mvr` encodes all segments for all standard digital clock style numbers.
Note: The order of the `line str` was specially selected so that all codes were in the interval `32..126`.
[Answer]
# [Vyxal](https://github.com/Lyxal/Vyxal) `jṠ`, 40 bytes
```
»*ż↵↲ṡŀ≬₍ṡfl₆ǎ8≠∇ƈH»`_ |`τ3/₀/ƛ£⁰ƛ¥nIi;ṅ
```
[Try it Online!](http://lyxal.pythonanywhere.com?flags=j%E1%B9%A0&code=%C2%BB*%C5%BC%E2%86%B5%E2%86%B2%E1%B9%A1%C5%80%E2%89%AC%E2%82%8D%E1%B9%A1fl%E2%82%86%C7%8E8%E2%89%A0%E2%88%87%C6%88H%C2%BB%60_%20%7C%60%CF%843%2F%E2%82%80%2F%C6%9B%C2%A3%E2%81%B0%C6%9B%C2%A5nIi%3B%E1%B9%85&inputs=0123456789&header=&footer=)
A mess. Uses base-3 compression.
```
»...»                     # Compressed integer containing all digits
     `_ |`τ               # Decompress by custom base-3
           3/             # Divide into 3
             ₀/           # Divide each piece into 10
               ƛ          # Map this new list to...
                £         # Store to register
                 ⁰ƛ    ;  # Map this new input to...
                   ¥      # Push register
                    nIi   # Get correct value
                        ṅ # Join
                          # (Implicit) Join by newlines
```
[Answer]
# Ocaml, 268
```
let t=function|'1'|'4'->"   "|_->" _ "let m=function|'0'->"| |"|'1'|'7'->"  |"|'2'|'3'->" _|"|_->"|_|"|'5'|'6'->"|_ "let b=function|'0'|'8'->"|_|"|'1'|'4'|'7'->"  |"|'2'->"|_ "|_->" _|"let f s=let g h=String.iter(fun c->print_string(h c))s;print_newline()ing t;g m;g b
```
Readable version
```
let t = function
  | '1'
  | '4' -> "   "
  | _ -> " _ "
let m = function
  | '0' -> "| |"
  | '1'
  | '7' -> "  |"
  | '2'
  | '3' -> " _|"
  | _ -> "|_|"
  | '5'
  | '6' -> "|_ "
let b = function
  | '0'
  | '8' -> "|_|"
  | '1'
  | '4'
  | '7' -> "  |"
  | '2' -> "|_ "
  | _ -> " _|"
let f s =
  let g h =
    String.iter (fun c -> print_string (h c)) s;
    print_newline () in
  g t;
  g m;
  g b
```
[Answer]
## Ghostscript ~~(270)~~ ~~(248)~~ (214)
*Edit:* More substitutions. Removed space between digits.
*Edit:* Even more substitutions. Main loop now looks like what it does!
```
/F{forall}def[48<~HUp;::1ncBInp~>{1 index 1 add}F
pop/*{dup
2 idiv exch
2 mod
1 eq}/P{print}/#{( )P}/?{ifelse
P}/O{{( )}?}/|{*{(|)}O}/_{*{(_)}O}>>begin[[[[ARGUMENTS{{load
# _ #}F()=]2{{| _ |}F()=]}repeat]pop[[[[}F
```
Uses ghostscript's argument-processing feature: invoke with `gs -dNODISPLAY -- digit.ps 012 345 6789`.
[Answer]
### Delphi || 453 (568 With format)
Not even close enough to win but it was fun to do ^.^ 
```
const asc: array[0..9] of array[0..2] of string = ((' _ ','| |','|_|'),('   ','  |','  |'),(' _ ',' _|','|_ '),(' _ ',' _|',' _|'),('   ','|_|','  |'),(' _ ','|_ ',' _|'),(' _ ','|_ ','|_|'),(' _ ','  |','  |'),(' _ ','|_|','|_|'),(' _ ','|_|',' _|'));var s,l:string;x,i:integer;begin Readln(s);s:=StringReplace(s,' ','',[rfReplaceAll]);for I := 0 to 2 do begin l:='';for x := 1 to length(s) do l := l + asc[StrToInt(s[x])][i];writeln(l);end;readln;end.  
```
### With format
```
const
asc: array[0..9] of array[0..2] of string = (
  (' _ ','| |','|_|'),
  ('   ','  |','  |'),
  (' _ ',' _|','|_ '),
  (' _ ',' _|',' _|'),
  ('   ','|_|','  |'),
  (' _ ','|_ ',' _|'),
  (' _ ','|_ ','|_|'),
  (' _ ','  |','  |'),
  (' _ ','|_|','|_|'),
  (' _ ','|_|',' _|'));
var
s,l:string;
x,i:integer;
begin
    Readln(s);
    s:=StringReplace(s,' ','',[rfReplaceAll]);
    for I := 0 to 2 do
    begin
      l:='';
      for x := 1 to length(s) do
        l := l + asc[StrToInt(s[x])][i];
      writeln(l);
    end;
    readln
```
end.
[Answer]
# [Perl 5](https://www.perl.org/) `-F`, 96 bytes
```
map{@m=/./g;say map{substr'    _  _||_ | |  ||_|',3*$m[$_],3}@F}1011011111,4522633566,6532526562
```
[Try it online!](https://tio.run/##FYdBCsIwEEWvkkWhIGmbzHRGRYSuuvMEIqGCiGBsaOpCTK/umL7/Fu@H2/QkET@Eb@ePTd3cD3H4qPXH9zXOU6kyLpuSUylP5Uilxk3hz4W7aFy6frHGrmZ0SwCMSMyaCYGAiUHEWMCWeLvb/8YwP8ZXlOpEtbFGqv4P "Perl 5 – Try It Online")
The string  `_ _||_ | | ||_|` represents the possible "cross sections" of the digits (grabbed the idea from @mazzy's PowerShell solution). The numbers in the list `1011011111,4522633566,6532526562` represent indices into that string for the first, second, and third line of each of the digits 0-9. The index must be multiplied by 3 to get to the correct position. This loops over each character input (stored in the `@F` array by the `-F` option on the command line), finds the correct index into the string for that input, and then outputs the result.
### Old version: [Perl 5](https://www.perl.org/) `-n`, 102 bytes
```
for$b(' a ',dbe,fcg){say s%.%'$b=~y/'.(b,abcdf,dg,df,acf,ef,e,bcdf,Z,f)[$&]."/ /r=~y/a-z/___|/r"%geer}
```
[Try it online!](https://tio.run/##K0gtyjH9/z8tv0glSUNdIVFBXSclKVUnLTlds7o4sVKhWFVPVV0lybauUl9dTyNJJzEpOSVNJyVdB0gmJqfppAKRDlgsSidNM1pFLVZPSV9BvwikIVG3Sj8@Pr5Gv0hJNT01taj2/39DI2MTUzNzC0sDBOtffkFJZn5e8X9dX1M9A0OD/7p5AA "Perl 5 – Try It Online")
Considers the characters of the display to be named like this:
$$\begin{array}{|c|c|c|} 
\hline
 & a & \\ \hline
d &b & e \\ \hline
f & c & g \\ \hline
\end{array}$$
The code iterates over strings representing each line of that table `(' a ',dbe,fcg)`. On each of those, it changes the elements turned off into spaces. This information is in the list
`(b,abcdf,dg,df,acf,ef,e,bcdf,z,f)`. It uses the current element of the input (stored in `$_` by the commandline switch and extracted by the pattern match into `$&`) to index into that list. Finally, the letters a, b, and c are changed to underscores (`_`) and all other letters into pipes (`|`).
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 36 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
•ʒïgÈ¨&Û≠∍›vâsŸ”_‡y•…| _ÅвJ3ôTäÅвø»
```
Outputs with additional single space between the output-digits. If this is not allowed, it'll be 1 byte longer by adding a `J` before the `»`.
[Try it online.](https://tio.run/##AVYAqf9vc2FiaWX//@KAosqSw69nw4jCqCbDm@KJoOKIjeKAunbDonPFuOKAnV/igKF54oCi4oCmfCBfw4XQskozw7RUw6RJU8Oow7jCu///MTM1NzkyNDY4MA)
**Explanation:**
```
•ʒïgÈ¨&Û≠∍›vâsŸ”_‡y•
          # Push compressed integer 5210925748351095970666976465591163407510385
 …| _     # Push string "| _"
     Åв   # Convert the integer to this custom base (basically convert it to
          # base-length - 3 in this case - and index each into the string)
       J  # Join this list of characters to a single string:
          #  " _ | ||_|     |  | _  _||_  _  _| _|   |_|  | _ |_  _| _ |_ |_| _   |  | _ |_||_| _ |_| _|"
3ô        # Split it into triplets
  Tä      # Split that into 10 equal-sized parts
    Åв    # Convert the (implicit) input-integer to this custom base
      ø   # Zip/transpose; swapping rows/columns
       »  # Join each inner list by spaces, and then each string by newlines
          # (after which the result is output implicitly)
```
[See this 05AB1E tip of mine (section *How to compress large integers?*)](https://codegolf.stackexchange.com/a/166851/52210) to understand why `•ʒïgÈ¨&Û≠∍›vâsŸ”_‡y•` is `5210925748351095970666976465591163407510385`.  
[See this 05AB1E tip](https://codegolf.stackexchange.com/a/120966/52210) to understand how the ASCII-art string `" _ | ||_| | | _ _||_ _ _| _| |_| | _ |_ _| _ |_ |_| _ | | _ |_||_| _ |_| _|"` is compressed.
[Answer]
# [Factor](https://factorcode.org/) + `lcd`, 3 bytes
```
lcd
```
[Try it online!](https://tio.run/##S0tMLskv@h8a7OnnbqWQk5yikJmvYM3FpWRoZKH0H8j/X16UWZL6HwA "Factor – Try It Online")
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal), 33 bytes
```
»@Ǐ+Ẇ₃e⋏UWṡ:≠7ẏŀz→=»`| _`τ₀/3/τ∩⁋
```
Ports the 05AB1E answer.
[Try it Online!](https://vyxal.pythonanywhere.com/#WyIiLCIiLCLCu0DHjyvhuobigoNl4ouPVVfhuaE64omgN+G6j8WAeuKGkj3Cu2B8IF9gz4TigoAvMy/PhOKIqeKBiyIsIiIsIjEzNTc5MjQ2ODAiXQ==)
## How?
```
»@Ǐ+Ẇ₃e⋏UWṡ:≠7ẏŀz→=»`| _`τ₀/3/τ∩⁋
»@Ǐ+Ẇ₃e⋏UWṡ:≠7ẏŀz→=»              # Push compressed integer 5210925748351095970666976465591163407510385
                    `| _`         # Push string "| _"
                         τ        # Convert the integer to this custom base
                          ₀/      # Split into ten pieces
                            3/    # Split each into three pieces
                              τ   # For each string, convert the (implicit) input to this custom base
                               ∩  # Transpose
                                ⁋ # Join on newlines
```
]