DIdx

From BR Wiki
Revision as of 14:54, 13 January 2012 by Mikhail.zheleznov (talk | contribs) (edit)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

DIDX (array-name)

The DIDX internal function returns an array that is a descending index obtained from sorting the array named. The array to be sorted may be either string or numeric. Only permitted in the MAT statement.

Comments and Examples

See the AIdx function.

Related Functions

Other functions that operate on arrays are

Technical Considerations

  1. DIdx will places equal array elements into ascending order by array index. In other words, for an array with three elements 10, 20 and 20, DIdx will return 2, 3, 1 (instead of 3, 2, 1).
  2. The RD specification in BRConfig.sys can affect the DIdx function because it determines when two numeric values are considered equal.
  3. The COLLATE option in effect when the program was last saved or in the OPTION statement can alter the sort order from the DIDX function when sorting string values.
  4. To use DIDX, the arrays on both sides of the equal sign must have the same dimensions.