Both sides previous revision
Previous revision
Next revision
|
Previous revision
|
manual:chapter6:stack:cmd_stkpush [2019/10/09 09:41] claudio |
manual:chapter6:stack:cmd_stkpush [2019/10/22 15:22] (current) jojo1973 Fixed internal link |
==== STKPUSH ==== | ==== STKPUSH ==== |
---- | ---- |
<callout type="primary" color="" icon="fa fa-comment" title="Description"> | <callout type="primary" color="" icon="fa fa-book" title="Synopsis"> |
---- | ---- |
Push a snapshot of the current stack to level 1 on the "stack of stacks". | Push a snapshot of the current stack on the Undo stack |
</callout> | </callout> |
| |
<callout color="crimson" icon="fa fa-indent" title="Stack Diagram"> | <callout color="green" icon="fa fa-indent" title="Stack Diagram"> |
---- | ---- |
^ __Input Stack__ ^ ^ __Output Stack__ ^ | ^ __Input Stack__ ^ ^ __Output Stack__ ^ |
| | **→** | | | | | **→** | | |
| //Level 1// | **→** | //Level 1// | | | //Level 1// | //→// | //Level 1// | |
| |
{{page>manual:chapter6:aux:legend&nofooter&noeditbtn&inline}} | {{page>manual:chapter6:aux:legend&nofooter&noeditbtn&inline}} |
| |
| {{fa>times?lg&color=red}} **Support for inclusion in symbolic expressions** | | |**Type**| [[manual:chapter5:basics#commands|Command]] || |
| {{fa>times?lg&color=red}} **Support for parallel list processing** | | |**Parallel list processing**| [[manual:chapter5:listproc#group-1commands-that-cannot-parallel-process|Group 1]] || |
| {{fa>times?lg&color=red}} **Affected by flags** | | |**Affected by flags**| None || |
</callout> | </callout> |
| |
<callout type="warning" icon="fa fa-thumbs-down" title="Compatibility"> | <callout color="orangered" icon="fa fa-comment" title="Description"> |
---- | ---- |
This command is new in newRPL, does not exist in userRPL. | The ''STKPUSH'' command creates a snapshot of the stack and pushes it on the top of the Undo stack. The Undo stack may contain up to 8 snapshots: each time a ninth is pushed on it, the snapshot on level 8 is lost. |
| |
| The command has little utility in interactive mode, since each time a command is typed and ''[[manual:chapter6:operators:cmd_ovr_xeq|XEQ]]''ted a snapshot of the stack is already pushed on the Undo stack: the only effect of ''STKPUSH'' would be to duplicate the latest snapshot. |
| </callout> |
| |
| <callout type="danger" icon="true" title="Compatibility"> |
| ---- |
| This command is new in newRPL and does not exist in userRPL. |
</callout> | </callout> |
| |
<callout type="info" icon="true" title="Usage"> | <callout type="info" icon="true" title="Usage"> |
---- | ---- |
The following program: | The following program |
<code> | <code> |
« 123 | « 123 |
» | » |
</code> | </code> |
leaves an empty stack, and when pressing Undo (**LF** cursor while at the stack) the numbers 123, 456, 789 will appear on the stack. | leaves an empty stack. If **LF** is pressed, the previous stack will be restored. |
| <code> |
| 3: 123 |
| 2: 456 |
| 1: 789 |
| …………………………………………………………………………………… |
| </code> |
</callout> | </callout> |
| |
<callout color="darkslategray" icon="fa fa-hand-o-right" title="Related Commands"> | <callout color="darkgray" icon="fa fa-hand-o-right" title="Related Commands"> |
| ---- |
{{page>manual:chapter6:stack&nofooter&noeditbtn&inline}} | {{page>manual:chapter6:stack&nofooter&noeditbtn&inline}} |
</callout> | </callout> |