Similar approach to Raul, where I build the digits from 7-bit encoding.
Obviously requires simplification.
c=:119 36 93 109 46 107 123 37 127 47
b=:0,.(#: 4 #. #: c),.0
d=:13 : '5 3 $ |. (y { b) {"0 1 seg'
hx=:13 : '(1,x,1)#y'"1
vx=:13 : '(1,x,1,x,1)#y'
vhx=:[ vx hx
lcd=:13 : '}:"1 ,./ ,&'' ''"1 x&vhx@:d"0 "."0": y'
3 lcd 12345
--- --- ---
| | | | | |
| | | | | |
| | | | | |
--- --- --- ---
| | | | |
| | | | |
| | | | |
--- --- ---
Best wishes,
John
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm