manual:chapter6:stack:cmd_clear

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
manual:chapter6:stack:cmd_clear [2019/10/17 15:31]
jojo1973
manual:chapter6:stack:cmd_clear [2021/09/14 15:25] (current)
jojo1973 Redone
Line 1: Line 1:
 ==== CLEAR ==== ==== CLEAR ====
----- 
 <callout type="primary" color="" icon="fa fa-book" title="Synopsis"> <callout type="primary" color="" icon="fa fa-book" title="Synopsis">
 ---- ----
-Deletes any object on the stack, leaving it empty+Delete all objects on the stack
 </callout> </callout>
  
 <callout color="green" 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__  ^^+|  **O<sub>n</sub>**  |  **...**   **O<sub>1</sub>**  |  **→**  |  ****  | 
-|  **O<sub>n</sub>**  |  ...  |  **O<sub>1</sub>**  |  **→**  |  |  |  | +|  //Level n//  |  //...//   //Level 1//  |  ////  |  //Level 1//  |
-|  //Level n//  |  ...  |  //Level 1//   **→**   //Level n//   ...   //Level 1//  | +
  
 {{page>manual:chapter6:aux:legend&nofooter&noeditbtn&inline}} {{page>manual:chapter6:aux:legend&nofooter&noeditbtn&inline}}
  
-|**Type**| [[manual:chapter5:basics#operators|Command]]  || +| **Keyword type**  | [[manual:chapter5:basics#commands|Command]]  || 
-|**Parallel list processing**| [[manual:chapter5:listproc#group-1commands-that-cannot-parallel-process|Group 1]]  ||  +| **Parallel list processing capabilities**  | [[manual:chapter5:listproc#group-1commands-that-cannot-parallel-process|Group 1]]  | //Commands that cannot parallel process//  
-|**Affected by flags**| None  ||+| **Affected by flags**  [[manual:appendix:flags#flag-28|-28]]  //Enable RPN stack mode//  | 
 +| ::: | [[manual:appendix:flags#flag-29|-29]]  | //RPN stack depth// 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 </callout> </callout>
  
 <callout color="orangered" icon="fa fa-comment" title="Description"> <callout color="orangered" icon="fa fa-comment" title="Description">
 ---- ----
-The ''CLEAR'' commands deletes all the objects from the stack. The contents can be immediately recovered pressing **LS**.+The ''CLEAR'' command deletes all the objects on the stack. The contents can be recovered pressing immediately after the **LF** key. 
 + 
 +When in RPN mode ''CLEAR'' fills all the levels with the value stored in the top-most level of the stack.
 </callout> </callout>
  
-<callout type="success" icon="true" title="Compatibility">+<callout type="warning" icon="true" title="Compatibility">
 ---- ----
-This command is fully compatible with userRPL.+''CLEAR'' is not fully equivalent to its **userRPL** counterpart. 
 + 
 +In particular: 
 + 
 +  * **userRPL** has no RPN stack mode.
 </callout> </callout>
  
 <callout type="info" icon="true" title="Usage"> <callout type="info" icon="true" title="Usage">
 ---- ----
 +**__Input__**
 <code> <code>
-4:                           123 +4:                                   1_m 
-3:            "This is a string" +3:                       { 'X' 'Y' 'Z' } 
-2:               { 'X' 'Y' 'Z'+2:                    "This is a string" 
-1:                           1_m +1:                                   123 
-…………………………………………………………………………………… +………………………………………………………………………………………………………… 
-CLEAR+CLEAR                                   
 </code> </code>
-will result in an empty stack.</callout>+\\ 
 +**__Output__** 
 +<code> 
 +4:                                       
 +3:                                       
 +2:                                       
 +1:                                       
 +………………………………………………………………………………………………………… 
 +                                         
 +</code> 
 +</callout>
  
 <callout color="darkgray" icon="fa fa-hand-o-right" title="Related Commands"> <callout color="darkgray" icon="fa fa-hand-o-right" title="Related Commands">
Line 46: Line 75:
 {{page>manual:chapter6:stack&nofooter&noeditbtn&inline}} {{page>manual:chapter6:stack&nofooter&noeditbtn&inline}}
 </callout> </callout>
 +
  • manual/chapter6/stack/cmd_clear.1571351489.txt.gz
  • Last modified: 2019/10/17 15:31
  • by jojo1973