Difference between revisions of "Ar Sort"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>CSbot
(Automated import of articles)
 
imported>QQuix
(Organizing the Array Functions category list)
 
Line 1: Line 1:
{{BotAddedPage|CSbot|DragoonWraith}}
{{Function
{{Function
  | origin = OBSE
  | origin = OBSE
Line 20: Line 19:
[[Category:Functions (OBSE)]]
[[Category:Functions (OBSE)]]
[[Category:Functions (OBSE v0017)]]
[[Category:Functions (OBSE v0017)]]
[[Category:Array Variable Functions (OBSE)]]
[[Category:Array Functions (OBSE)]]

Latest revision as of 11:25, 18 September 2010

< [[::Category:Functions|Category:Functions]]

A function added by the Oblivion Script Extender.

Syntax:

(sortedArray:Array) ar_Sort toSort:array sortDescending:bool

Attempts to sort the elements of an array in ascending or descending order and returns a new Array containing the elements in sorted order (keys associated with the elements are lost). In order to be sorted all elements of an array must be of the same type (strings, numbers, or objects). If this condition is not met an empty Array is returned. Strings are sorted alphabetically and case-insensitively, numbers are sorted numerically, and objects are sorted by formID. By default the elements are sorted in ascending order.