4.3BSD/usr/contrib/apl/lib/fn/edmx

edmx;d;name;type;shape;idx;format;px;xv;new
format { 8 4
L' {'variable name? '
name { L'
}(2=Lnc name)/okname
}0,L{'error: variable unknown'
okname: d { BJ name
org { ?1
L'{ 'shape is',NJshape{Rd
d { ,d
L'{ ' type is '
L{(2 9R'numeric  character')[org+ type{' 'E(,0)\0Rd;]
L{'index origin is',NJ org
v { I`1Yshape
askindex:L'{'index? '
idx { ,BJL'
}(0=Ridx)/end
idx { (Rshape)Yidx,org
px { `1Yidx
dx { d[xv { v+(`1Yshape)X+(`1Ushape)B(-org)+`1Uidx]
format NJ dx
L'{' ',((px-org)X1Yformat)R' '
new { ,BJL'
new { (((`1Yshape)+org-px)DRnew)Rnew
dx[(px-org)+IRnew]{new
format NJ dx
d[xv]{dx
}askindex
end:BJ name,'{ shape R d'