Arraysort - MACROMEDIA COLDFUSION MX 61-CFML Reference

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

ArraySort

Description
Sorts array elements numerically or alphanumerically.
Returns
True, if sort is successful; False, otherwise.
Category
Array
functions,
Function syntax
ArraySort(array, sort_type [, sort_order ])
History
ColdFusion MX:
Changed thrown exceptions: this function can throw the ArraySortSimpleValueException
error and ValueNotNumeric error.
Changed the order in which sorted elements are returned: in a
this function might return elements in a different sort order than in earlier releases. If
sort_type = "textnocase"
elements that differ only in case differently from earlier releases, as follows:
ColdFusion MX reverses the elements' original order
Earlier releases of ColdFusion do not change the elements' original order
For example, in a
ColdFusion MX returns
Earlier ColdFusion releases return
Parameters
Parameter
Description
array
Name of an array
sort_type
• numeric: sorts numbers
• text: sorts text alphabetically, taking case into account (also known as case
• textnocase: sorts text alphabetically, without regard to case (also known as case-
sort_order
• asc - ascending sort order. Default.
• desc - descending sort order.
390
Chapter 3: ColdFusion Functions
List functions
and
sort_order = "desc"
,
textnocase
desc
d,b,A,a,a
sensitive). All letters of one case precede the first letter of the other case:
- aabzABZ, if
sort_order = "asc"
- ZBAzbaa, if
sort_order = "desc"
insensitive). A letter in varying cases precedes the next letter:
- aAaBbBzzZ, in an ascending sort; preserves original intra-letter order
- ZzzBbBaAa, in a descending sort; reverses original intra-letter order
- aabzABZ or aAaBbBzzZ, depending on value of
- from smaller to larger, for numbers
- ZBAzbaa or ZzzBbBaAa, depending on value of
- from larger to smaller, for numbers
sort of
, the following occurs:
d,a,a,b,A
d,b,a,a,A
(ascending sort)
(descending sort)
, descending sort,
textnocase
, ColdFusion MX processes
, for letters
sort_type
, for letters
sort_type

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents