Skip to content
MicroBlaster edited this page Jul 9, 2020 · 1 revision

Purpose: Finds the specified value in an array of strings.

Syntax: sort

SourceArray: The source array to be sorted.
FoundArray: An array to hold the sorted list.

Notes:

Example:

# Create an array.
$Names[1] := "Fleet Admiral Clausewitz"
$Names[2] := "Captain Zyrain"
$Names[3] := "Captain Wilson"
$Names[4] := "Admiral Nelson"

# Sort the array
sort $Found $Sorted

# Display the results.
echo "Sorted " $Sorted " items.*"
$i := 1
while $i <= $Sorted
    echo $Sorted[$i] "*"
    $i++
end

:Done
echo "That's all Folks!*"

Clone this wiki locally