< Back to Snippets

Reverse Selected

Reverse the order of the selected item on the stack and all items higher (newer). So the selected item swaps places with the x register, next oldest item swaps with the y register, etc.


<subroutine ID="ReverseSelected">
  <ifSelection exists="true">
    <StackBox.LeftArrow/>
    <whileX isSelected="false">
      <StackBox.RollNDown/>
      <StackBox.DownArrow/>
    </whileX>
  </ifSelection>
</subroutine>