   10REM  >  donmcd.calc.StoreConst,     30/4/95.
   20
   30MODE 12
   40COLOUR 3
   50FOR d = 1 TO 2
   60   PRINT "program BBC Basic V,  donmcd.calc.storeconst,"'" store constants, by D McDonald,"'".. 63/5 Hutchison Rd, Wgtn2, N.Z.  13.06.95   23:11"'
   70   NEXT d
   80
   90COLOUR 7
  100
  110PRINT'"This program stores up to 10,000 REAL positive/negative constants in" ' "REAL array C()."
  120PRINT'" (non-zero) constants can be stored, printed out, or used in calculations."
  130PRINT '"recommended that a scientific etc. constant be stored near its mantissa value"''" e.g.  C(981) = 9.805  acceleration due to gravity, m/s2"'" e.g.  C(141) = SQR2  .. = 1.4142..  root2"
  140PRINT" e.g.  C(301) = LOG2  .. = 0.3010299..??" ' " e.g.  C(93) = 92.5E6 .. astronom unit, Earth orbit radius, miles." ' "       C(314) = 3.14159 .. = pi, circle ratio."
  150
  160
  170DIM C(10000)  , C$(10000)
  180ON ERROR  :  COLOUR 3 :REPORT  : PRINT CHR$(7)" at erl. ";ERL
  190REPEAT
  200
  210REPEAT
  220   COLOUR 7
  230   INPUT LINE' "enter expression value,   ac$,    can involve previous C(.)'s"'"  (return quit.)";  ac$
  240   IF ac$ <> "" THEN
  250      ac = EVAL(ac$)
  260      PRINT ac
  270      INPUT "enter store location 1 to 10,000 (cf.+ 1st 4 figs.) ";n%
  280      C(n%) = ac
  290      IF n% = 0 THEN PRINT CHR$(7) "silly?? Stored in zero?! too bad."
  300
  310      INPUT LINE' "enter mnemonic label, description ";C$(n%)
  320      PRINT ' "..  C( ";n%  " ) == "ac$  "  value = "ac "   mnemonic = " C$(n%)
  330      ENDIF
  340
  350   UNTIL ac$ = ""
  360
  370PRINT "End Input.."
  380
  390PRINT ' "table of stored constants.  (zero values deleted)"
  400PRINT"subscript  |    value   |   mnemonic."
  410PRINT"---             ---         ---"
  420FOR n% = 0 TO 1E4
  430   IF C(n%)  <> 0  THEN PRINT "C( "; n%  " ) ="TAB(15) C(n%)   TAB(30) C$(n%)
  440   NEXT n%
  450
  460
  470COLOUR 3
  480PRINT CHR$(7)' "More calculations/constants  ..<Return>  , or   Q/q.uit";
  490INPUT LINE ; m$
  500UNTIL m$ = "Q" OR  m$  = "q"
  510
  520PRINT "program StoreConst  e n d ..  LVAR"
  530PRINT " Run again ? Yy/n"
  540A$ = GET$
  550IF A$ = "Y" OR A$ ="y" THEN RUN
  560END