======================================================================
MAKE AN INSTANT CALCULATOR
======================================================================
PRODUCT : R:BASE VERSION : 3.1 or Higher
CATEGORY : PROGRAMMING SUBCATEGORY : KEYMAPS
======================================================================
By defining and saving a key map (a keyboard macro) for [Alt-F1], you can
calculate results on the fly in any R:BASE session.
Even people who know nothing about R:BASE can use the calculator by
pressing [Alt-F1] at the R> prompt and entering the expression they want
to calculate. You can use an R:BASE function or any other mathematical
expression. R:BASE does the calculation and displays the answer.
Define the key map by following this procedure exactly:
<> Press [Ctrl-F1]
<> Choose Define a key map
<> Press [Alt-F1]
<> Enter: SET VAR zz_ DOUBLE = &
<> Press [Enter]
<> Enter: SHOW VAR zz_
<> Press [Enter]
<> Press [Ctrl-F2]
Save the key map by choosing Settings under Tools on the Main Menu
and then choosing Save settings to... under Configuration on the
Settings menu.
Once you save the current settings to the configuration file (RBASE.CFG),
R:BASE will define the key map at the beginning of every R:BASE session.
Whenever you need a calculator, press [Alt-F1] at any R> prompt and enter
an expression. For example, enter 655/5 to get the answer 131, or enter
(SQRT(2)) to get the square root of 2. You must put parentheses around function
expressions, but other calculations, such as 144/12*3, don't need them.
Make sure you don't use the variable ZZ_ for any other purpose or else
choose a different name for your calculator variable.