# Manuals/calci/SORTING

**SORTING(Array,Ascending)**

- where is set of numbers to be sorted,
- is the value that decides whether numbers should be sorted in ascending or descending order.

## Description

- This function sorts the array of numbers in either ascending or descending order.
- Sorting means arranging a set of data in some order.
- For non-zero value of , the numbers are sorted in ascending order.
- If is
**0**, the numbers are sorted in descending order.

## Examples

- SORTING([5,9,15,2,106,344],1) = 2 5 9 15 106 344
- SORTING([-3,5.5,0.025,-44],1) = -44 -3 0.025 5.5
- SORTING([56.3,4/5,21,7.645],0) = 56.3 21 7.645 0.8

## Related Videos

## See also

## References