\d .show / L[`v`r`tr`bl`b`t`l`h`i`br`tl]:_ci,/179 191 217+!:'2 7 2;LL[`v`b`t`i]:_ci 186 208 210 215 // windows L[`v`r`tr`bl`b`t`l`h`i`br`tl]:"|++++++-+++";LL[`v`b`t`i]:"|+++" P:20 / print width box:{:[emp x;,," ";5=t:4:x;dic x;~t;mat x;fmt x]} / box logic fmt:{,wid[@x]_ssr[5:x;"\n";";"]} / format value wid:{:[x|P>#y;y;(P#y),".."]} / format width sep:{,'/|@[|L.v,''x;0;{x,'L.v}]} / vertical separation edg:{(,1!L[x],1_-1_ L[`h,y][L.v=*z]),z} / edges top:edg[`tr`tl;`t] / top edge mid:edg[`r`l;`i] / middle edge bot:|edg[`br`bl;`b]@|: / bottom edge two:{:[(#*x)=i:(+\L.t=*x)?2;x;.[x;(;i);LL[]L[!LL]?]]} / values + attributes enc:two top 1_ bot@,/(mid sep@)' / enclose pad:{{y,((x-#y),#*y)#""}[|/#:'x]'x} / pad with blanks emp:_in[;(;.();())] / empty or nil? nul:{:[&/emp'x[;2];2#'x;x]} / null handler hor:pad@box' / horizontals ver:+:'pad@+:' / verticals unt:{+(+y)_di x} / untick dic:unt[1]enc@+ver'+hor'nul@.: / dict mat:{unt[1+!3]cmp[x]box@.+(`$"f",/:$!#x;x)} / matrix cmp:{:[~2=#^x;y;y _di -1_1_&y[;0]_lin L`tl`bl`l]} / compress show:`0:1!"\n",,/"\n",'box@ / entry point \ d.a:.+(`x`y;10 20) d.a..k:"a string" d.a..l:`a_symbol d.b.c:20 30 d.b.d:40 50 60 d.e.f.g:(2 3#!6;.[.+(`q`r;(1 2 3;`a`b`c));`r.;:;.+(`m`n`o;80 90 100)]) show d \ +-+------------------------------+--------------+ |a|+-+--+ |+-+----------+| | ||x|10| ||k|"a string"|| | |+-+--+ |+-+----------+| | ||y|20| ||l|`a_symbol || | |+-+--+ |+-+----------+| +-+------------------------------+--------------+ |b|+-+--------+ | | | ||c|20 30 | | | | |+-+--------+ | | | ||d|40 50 60| | | | |+-+--------+ | | +-+------------------------------+--------------+ |e|+-+--------------------------+| | | ||f|+-+----------------------+|| | | || ||g|+--------------------+||| | | || || ||+-----+ |||| | | || || |||0 1 2| |||| | | || || |||3 4 5| |||| | | || || ||+-----+ |||| | | || || ||+-+--------+-------+|||| | | || || |||q|1 2 3 | ||||| | | || || ||+-+--------+-------+|||| | | || || |||r|`a `b `c|+-+---+||||| | | || || ||| | ||m|80 |||||| | | || || ||| | |+-+---+||||| | | || || ||| | ||n|90 |||||| | | || || ||| | |+-+---+||||| | | || || ||| | ||o|100|||||| | | || || ||| | |+-+---+||||| | | || || ||+-+--------+-------+|||| | | || || |+--------------------+||| | | || |+-+----------------------+|| | | |+-+--------------------------+| | +-+------------------------------+--------------+ or: http://www.nsl.com/k/box.png