programlibs/Panel/demos/font.xtl

source · imports pn: libs/Panel/src/Panel.xtl; hx: libs/Hex1000/src/Hex1000.xtl; rx: libs/Radix/src/Radix.xtl

ᵘa̲rt : Int -> Char

function · line 11

d u:a_rt: digit latches d (the leftmost first) as three lines

ᵘa̲rt ← { d →
  s ← ᵖⁿs̲egs d
  n ← t̲ally d
  c̲ol ← { k → r̲avel k s̲elect 2 1 t̲ranspose s }
  one ← n r̲eshape 1
  i ← (9 c̲at n) r̲eshape one c̲at (1 + c̲ol 1) c̲at one c̲at (1 + 2 × c̲ol 6) c̲at (1 + c̲ol 7) c̲at (1 + 2 × c̲ol 2) c̲at (1 + 2 × c̲ol 5) c̲at (1 + c̲ol 4) c̲at 1 + 2 × c̲ol 3
  t ← i s̲elect " _|"
  r̲ow ← { k → r̲avel 2 1 t̲ranspose 3 t̲ake (3 × k) d̲rop t }
  (3 c̲at 3 × n) r̲eshape (r̲ow 0) c̲at (r̲ow 1) c̲at r̲ow 2
}

ᵘs̲hown : Char -> Char

function · line 22

u:s_hown text: the display after typing text at the calculator

ᵘs̲hown ← { text →
  (st, d, done, took) ← ʰˣCalcRom ʰˣt̲ype (ʰˣReset, ʳˣk̲eys text, 30000)
  p̲rint! text
  ᵘa̲rt r̲ev d
}