You are here: Symbol Reference > MtxVec Namespace > Classes > TVec Class > public > SortDescend Method > TVec.SortDescend Method ()
MtxVec VCL
ContentsIndex
PreviousUpNext
TVec.SortDescend Method ()

Sorts vector elements in descending order.

Pascal
function SortDescend: TVec; overload;

Sort all calling vector elements in descending order.

If the vector is complex, the complex values are first compared by the absolute value and then by the argument.

var a: TVec; begin CreateIt(a); try a.SetIt(True,[2,1,3,4]); a.SortDescend; // a = [4,3,2,1] finally FreeIt(a); end;
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!