3 Commits

Author SHA1 Message Date
ed7ab15a1e do error checking 2023-12-04 13:52:09 +01:00
91fac6d160 added help comment 2023-12-04 13:44:19 +01:00
a33a76bb06 add edit feature 2023-12-04 13:35:40 +01:00
2 changed files with 10 additions and 23 deletions

28
rpn.go
View File

@@ -178,27 +178,17 @@ DESCRIPTION
[no]debug toggle debug output (nodebug turns it off) [no]debug toggle debug output (nodebug turns it off)
[no]showstack show the last 5 items of the stack (noshowtack turns it off) [no]showstack show the last 5 items of the stack (noshowtack turns it off)
Show commands: Show commands: dump display the stack contents hex show last stack item
in hex form (converted to int) history display calculation history vars
show list of variables
dump display the stack contents Stack manipulation commands: clear clear the whole stack shift remove
hex show last stack item in hex form (converted to int) the last element of the stack reverse reverse the stack elements swap
history display calculation history exchange the last two stack elements dup duplicate last stack item undo
vars show list of variables undo last operation edit edit the stack interactively using vi or
$EDITOR
Stack manipulation commands: Other commands: help|? show this message manual show manual
clear clear the whole stack
shift remove the last element of the stack
reverse reverse the stack elements
swap exchange the last two stack elements
dup duplicate last stack item
undo undo last operation
edit edit the stack interactively using vi or $EDITOR
Other commands:
help|? show this message
manual show manual
quit|exit|c-d|c-c exit program quit|exit|c-d|c-c exit program
Register variables: Register variables:

View File

@@ -186,14 +186,12 @@ Configuration Commands:
[no]showstack show the last 5 items of the stack (noshowtack turns it off) [no]showstack show the last 5 items of the stack (noshowtack turns it off)
Show commands: Show commands:
dump display the stack contents dump display the stack contents
hex show last stack item in hex form (converted to int) hex show last stack item in hex form (converted to int)
history display calculation history history display calculation history
vars show list of variables vars show list of variables
Stack manipulation commands: Stack manipulation commands:
clear clear the whole stack clear clear the whole stack
shift remove the last element of the stack shift remove the last element of the stack
reverse reverse the stack elements reverse reverse the stack elements
@@ -203,7 +201,6 @@ Stack manipulation commands:
edit edit the stack interactively using vi or $EDITOR edit edit the stack interactively using vi or $EDITOR
Other commands: Other commands:
help|? show this message help|? show this message
manual show manual manual show manual
quit|exit|c-d|c-c exit program quit|exit|c-d|c-c exit program