Swap

SUMMARY

Swap - Die Reihenfolge der angegebenen Elemente wird auf dem Stack vertauscht.

SYNTAX

Swap(<num_of_entries>);

ARGUMENTS

num_of_entries (type:integer)
The order of the defined elements on the stack is swapped.
0 or 1 does not have any effect.
<0 undefined. If 'num_of_entries' is higher than the number of stack elements all elements are swapped.

DESCRIPTION

Stack
  1. Missing arguments are taken from the stack.(and removed from there).
  2. The order of the defined elements on the stack is swapped.
  3. The job does not have a return value.

Effect
The order of the defined elements on the stack is swapped.

EXAMPLES

///Stack before (4 Elements):
//"a"
//"b"
//"c"
//"d"
Swap(2);
//Stack afterwrds (4 Elements):
//"b"
//"a"
//"c"
//"d"

//Stack before (4 Elements):
//2
//"a"
//"b"
//"c"
Swap();
//Stack afterwrds (3 Elements):
//"b"
//"a"
//"c"


Syntax Notation
[aaa]
aaa is optional (zero or one occurences)
(aaa|bbb)
aaa exclusive or bbb
(aaa)*
aaa may occur indefinitely often or may be omitted
(aaa)+
aaa may occur indefinitely often but at least once
(aaa)m..n
aaa may occur from m to n times