4.3BSD/usr/contrib/apl/lib/shapews

n*.KB	P	shapetxs { shape tx ; v; z
tx { ' ',tx,' '
v { tx E ' '
tx { (~v^1O|v)/tx
v { +\tx E ' '
z {(I`1Yv)J.=v
z { (+/^\~z)O|z
z { (V/[1] z)/ z
txs { (Rz)R(,z)\tx
	
unixshapetxs { unixshape tx ; v; z
tx { 0,tx,' '
v { 0= tx { (~tx =32)Xtx
tx { (~v^1O|v)/tx
v { +\tx  = 0
z {(I`1Yv)J.=v
z { (+/^\~z)O|z
z { (V/[1] z)/ z
txs { 1O|(Rz)R1U' ',(,z)\tx
	
showshapetxs { showshape tx ; v; z
L_tx { ' ',tx,' '
L_v { tx E ' '
L_tx { (~v^1O|v)/tx
L_v { +\tx E ' '
L_z {(I`1Yv)J.=v
L_z { (+/^\~z)O|z
L_z { (V/[1] z)/ z
txs { (Rz)R(,z)\tx
shapedescribeshapedescribe
L_'This ws contains three formatting functions'
L_'to shape a string of items into a 2d array,'
L_'one per row.'
L_' "shape" is the basic converting function.'
L_' "showshape" demonstrates how shape works'
L_' "unixshape" puts the data into the strange'
L_'format use by Lexec'
L_'  note: these functions contain no loops.'
''
Llx:&&L{'type ''shapedescribe'' for details'