1ADD: full-screen editing calculator 2--- 3 4Usage: 5 6 add [-p num] [-i interval] [-o script] scripts 7 8Options: 9 10 -h print the usage message 11 -p num Sets precision (number of digits after the decimal 12 place). 13 -i interval Sets compounding interval for interest computation. 14 -o script Specify file in which to save output transcript. 15 -V print the version 16 17 An output transcript may be saved and reloaded for further editing. 18 Scripts are loaded from left to right (with the "output" processed 19 first). 20 21Computations: 22 23 ADD performs fixed-point computation. It is designed for use as a 24 checkbook balancing tool. 25 26 ADD maintains a running result for each operation. You may scroll to 27 any position in the expression list and modify the list. Enter data by 28 typing numbers (with optional decimal point), separated by operators. 29 30 The operators are all single-character: 31 32 '+' begins an addition 33 '-' begins a subtraction 34 '~' negates the result 35 '*' begins a multiplication 36 '/' begins a division 37 '%' begins an interest computation (uses 'interval'): rate=number. 38 '$' begins a sales-tax computation: rate=number. 39 '(' opening parenthesis. This may enclose a unary '-', more 40 parentheses, or data (implicit unary '+'). 41 ')' closing parenthesis, expects another operator, not data. 42 '=' flushes out the current number, forces recomputation of the 43 running result. 44 'W' allows one less column for numbers. 45 'w' allows one more column for numbers. 46 47 A space flushes out the current number-input, and (by default) sets the 48 next operator to be the same as the current one. You may repeat the 49 last arithmetic operation of any type: 50 51 'a' repeats the last '+' (default 0). 52 's' repeats the last '-' (default 0). 53 'n' repeats the last '-'. 54 'm' repeats the last '*' (default 1). 55 'd' repeats the last '/' (default 1). 56 'i' repeats the last '%' (default 4). 57 't' repeats the last '$' (default 4). 58 59 You may toggle the prefix operator of any number by typing a single 60 character: 61 62 'A' toggles the operator to '+'. 63 'S' toggles the operator to '-'. 64 'N' toggles the operator to '~'. 65 'M' toggles the operator to '*'. 66 'D' toggles the operator to '/'. 67 'I' toggles the operator to '%'. 68 'T' toggles the operator to '$'. 69 70Editing: 71 72 As you enter data, you may edit it. A backspace deletes the last digit 73 of the current number (if it is visible). Use the arrow keys or 74 vi-style 'h' and 'l' to move left and right within the line. Other 75 editing commands include 76 77 'u' undoes the last x/X command (restricted to restoring the 78 current data only). 79 'x' deletes the current data. If the data is null, deletes the 80 following line. 81 'X' deletes the current data. If the data is null, deletes the 82 preceding line and moves up. 83 'o' opens a new line after the current line. 84 'O' opens a new line before the current line. 85 '#' edit the associated comment. 86 87 An "open" permits you to insert a new operator and data into the 88 expression list. You may type an operator character (e.g., '+'), and 89 continue with the new data, or an operator-repeat (e.g., 'A'). In 90 either case, you may edit the new data, just as you would the old data. 91 A 'u' (or other toggle, such as 'o', 'O', or 'q') typed after an open 92 will undo the open (and close it). 93 94Scrolling/cursor movement: 95 96 H move to the top line on the screen. 97 M move to the middle line on the screen. 98 L move to the last line on the screen 99 CTL/F scroll forward one screen. 100 CTL/B scroll backward one screen. 101 j move forward one line (also CTL/N). 102 k move backward one line (also CTL/P). 103 z<CR> move the current line to the top of the screen. 104 z. move the current line to the middle of the screen. 105 z- move the current line to the bottom of the screen. 106 107 Like VI, ADD allows you to jump to a particular line with a ":" command 108 109 :$ jumps to the last entry 110 :1 jumps to the first entry. 111 112Scripts: 113 114 Transcript files are formatted to permit line-oriented entries: 115 116 <operator><value><tab><ignored> 117 118 The transcripts saved by ADD contain the running result in the 119 "ignored" part. To exit without saving a transcript, type 'Q'. A 120 normal exit, by typing 'q', saves the list of operators, data (and 121 running result) in the specified file. 122 123 You can read and write scripts without leaving ADD. 124 125 :e file clears the current script and reads a script from the file. 126 :f shows the current script-name (also CTL/G) 127 :r file reads a script at the current entry 128 :w file writes a script to the specified file. 129