Next: , Previous: Stack Basics, Up: Introduction

3.4 Numeric Entry

Pressing a digit or other numeric key begins numeric entry using the minibuffer. The number is pushed on the stack when you press the <RET> or <SPC> keys. If you press any other non-numeric key, the number is pushed onto the stack and the appropriate operation is performed. If you press a numeric key which is not valid, the key is ignored.

There are three different concepts corresponding to the word “minus,” typified by ‘a-b’ (subtraction), ‘-x’ (change-sign), and ‘-5’ (negative number). Calc uses three different keys for these operations, respectively: -, n, and _ (the underscore). The - key subtracts the two numbers on the top of the stack. The n key changes the sign of the number on the top of the stack or the number currently being entered. The _ key begins entry of a negative number or changes the sign of the number currently being entered. The following sequences all enter the number -5 onto the stack: 0 <RET> 5 -, 5 n <RET>, 5 <RET> n, _ 5 <RET>, 5 _ <RET>.

Some other keys are active during numeric entry, such as # for non-decimal numbers, : for fractions, and @ for HMS forms. These notations are described later in this manual with the corresponding data types. See Data Types.

During numeric entry, the only editing key available is <DEL>.