[skip] if [not]|while [not]| = The possible 'Conditional' statements that can be used with this command.
<RetVar/IF> = Command return, with an 'if' statement used it will be TRUE (1) if condition passes or FALSE (0) if it fails, orherwise if you use a Variable it will be TRUE / FALSE as an integer.
<Value> = The required array name that you wish to reverse.
Will reverse the contents of an array <Value>, the last element becoming the first and the first element becoming the last.
This command is quite often used in conjuntion with 'dec =' and 'sort array' as part of the lead up commands to a 'while' loop when displaying array entries in a menu to keep the correct display order due to the use of the 'dec ='. ('dec =' starts from the bottom of an array rather than the top)
Example:
The initial contents order for $this.array
- 1
2
3
4
5
6
The resulting contents order for $this.array
- 6
5
4
3
2
1
Command Location:
- »» General Commands
- »» Arrays
<RetVar/IF> = reverse array <Value>
- »» Arrays