aboutsummaryrefslogtreecommitdiff
path: root/hcalc.rst
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-01-09 21:32:43 -0500
committerB. Watson <urchlay@slackware.uk>2024-01-09 21:32:43 -0500
commitde4dffd8bb02dbd2969edc44e4915decb75e9b1d (patch)
treea45c488a323df8a825e6a8b183ac939a45ab085a /hcalc.rst
parente439c8e385c197d9ff75ebd50379bcf72ddd58b8 (diff)
downloadhcalc-de4dffd8bb02dbd2969edc44e4915decb75e9b1d.tar.gz
Rearrange man page.
Diffstat (limited to 'hcalc.rst')
-rw-r--r--hcalc.rst124
1 files changed, 64 insertions, 60 deletions
diff --git a/hcalc.rst b/hcalc.rst
index 951d067..314944e 100644
--- a/hcalc.rst
+++ b/hcalc.rst
@@ -87,6 +87,69 @@ mode, there is no prefix.
In case of error (e.g. division by zero), the display will show **err**,
and you'll have to press *CLR* to continue.
+BUTTONS
+=======
+
+The user interface mimics a pocket calculator, so it's made of
+buttons. Each button can be pressed either by clicking on it with the
+mouse, or pressing its keystroke (given in **bold**). A few buttons
+have multiple functions, depending on which mouse button is used.
+
+*0* to *9*, *A* to *F* (**0-9**, **a-f**)
+ Digits. Lowercase only for the hex digits. Entering digits
+ larger than the current number base is impossible (e.g. hex digits
+ when in decimal mode, or digits other than 0 or 1 in binary mode) and
+ will be ignored.
+
+*.* (**.**)
+ Decimal point. Only works in decimal mode (base 10); other bases
+ are integer-only.
+
+*+* *-* *x* *รท* (**+** **-** **\*** **x** **/** **%**)
+ Arithmetic: addition, subtraction, multiplication, division (modulus with
+ right-click). Note that the **x** key is the same as **\***.
+
+*=* (**=** **Enter**)
+ Finish the calculation and display the result.
+
+*+/-* (**_** **i**)
+ Invert sign.
+
+*INV* (**~**)
+ Unary NOT; invert the bits in the current number.
+
+*OR* *AND* *XOR* (**&** **|** **^**)
+ Boolean operations.
+
+*DEC* *HEX* *OCT* *BIN* (**D** **H** **O** **B** or **F1** to **F4**)
+ Change the number base. The number being displayed will be converted
+ to the new base.
+
+*DEL* (**Backspace** or **Delete**)
+ Delete the last digit entered. Deleting the last digit results in 0.
+
+*STO* *RCL* *SUM* (**[**, **]**, **}**)
+ Store to memory (like *M* on most calculators); recall memory (like *MR*);
+ add current value to memory (like *M+*).
+
+*<<** *>>* (**<** **>**)
+ Bit shift by one position, left or right.
+
+*SHF* (**S**)
+ Shift left/right by some number of bits (binary
+ operation, like addition). Shifts left for positive
+ numbers and right for negative. This is less confusing
+ than it sounds: 1 shifted left once is 2, -1 shifted right
+ once in -2.
+
+*CE* (**u**)
+ Clears the number being entered, same as backspacing over it,
+ but does not clear any pending operation.
+
+*CLR* (**C**, **Escape**)
+ Clears the display, memory, and any pending operation. With right-click,
+ exits **hcalc** (use **Q** or **^Q** to quit from the keyboard).
+
MOUSE
=====
@@ -110,62 +173,7 @@ quits the application). This can be useful, e.g. if you paste "2+2=",
KEYBOARD
========
-**0-9**, **a-f**
- Digits. Lowercase only for the hex digits. Entering digits
- larger than the current number base is impossible (e.g. hex digits
- when in decimal mode, or digits other than 0 or 1 in binary mode) and
- will be ignored.
-
-**+** **-** **\*** **x** **/** **%**
- Arithmetic: addition, subtraction, multiplication, division, modulus. Note that
- **x** is the same as **\***.
-
-**.**
- Decimal point. Only works in decimal mode (base 10); other bases
- are integer-only.
-
-**_** **i**
- Invert sign. The *+/-* key.
-
-**=** **Enter**
- The *=* key (equals).
-
-**&** **|** **^** **~**
- Boolean operations. AND, OR, XOR, NOT (unary).
-
-**<** **>**
- Bit shifts, unary. Left 1 bit, right 1 bit.
-
-**S**
- *SHF* key: shift left/right by some number of bits (binary
- operation, like addition). Shifts left for positive
- numbers and right for negative. This is less confusing
- than it sounds: 1 shifted left once is 2, -1 shifted right
- once in -2.
-
-**Backspace** **Delete**
- *DEL* key: delete the rightmost digit.
-
-**C** **Escape**
- *CLR* key: clears the number and any pending operation.
-
-**u**
- *CE* (clear entry) key. Clears the number being entered, same as backspacing over it,
- but does not clear any pending operation.
-
-**D** **H** **O** **B**
- *DEC* *HEX* *OCT* *BIN* keys.
- Set the number base to decimal, hex, octal, or binary. The
- number currently displayed is converted into the new base.
- These are capital letters (hold down Shift).
-
-**F1** **F2** **F3** **F4**
- Same as **D** **H** **O** **B**.
-
-**[** **]** **}**
- *STO* (store number), *RCL* (recall stored number), *SUM*
- (add current number to stored number). *STO*, *RCL*, and *SUM* are
- the same as *M*, *MR*, and *M+* on 'pocket' calculators.
+These keys don't have calculator buttons.
**^C**
Copy the current number to the X selection
@@ -178,10 +186,6 @@ KEYBOARD
**q**
Quiet. Toggles the audible bell.
-**Q** **^Q**
- Quit **hcalc**. Capital letter, so press Shift. Control-Q does
- the same thing.
-
**z**
Zoom: change window size. Alternates between the 3 sizes: **-small**,
**-medium**, **-large**.