repsort

Syntax

stat = REPSORT(tag, sort_mode)

Arguments

stat: integer

tag: database variable

sort_mode: see tables below

Meaning

Sorts the occurrences of tag. Using sort_mode you can indicate how Collections is to sort.

Sort_mode

Meaning

0

text sort

1

numeric sort

2

date sort

3

alphanumerical sort (available from Collections 1.12)

By adding a value to the sort_mode code, you can specify in greater detail how you want to sort.

Sort_mode

Meaning

sort + 8

sort in descending rather than ascending order

sort + 256

in text mode: as upper case

sort + 512

in text mode: as lower case

sort + 1024

in text mode: ignore accents

You can combine these extra values. If sort_mode is equal to 1288 (8 + 256 + 1024) that means: sort on text, as capitals, and ignore accents while sorting.

Example

stat = REPSORT(au,1024)

Result

After a text sort of all authors, with the accents being ignored, stat is 0 (if the sort has been successful).