BubbleSortB

From SCAR Divi Manual
Revision as of 19:33, 10 December 2012 by Freddy (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Definition

procedure BubbleSortB(var Values: TIntArray);

Availability

SCAR Divi 3.11 > 3.37 (Deprecated, use SortTIA and ReverseTIA)

Description

Uses the bubblesort sorting algorithm to sort a given set of integer values specified by the TIntArray Values. The values will be sorted large->small.

Example

var
  Values: TIntArray;
  i: Integer;
begin
  Values := [9, 1, 8, 2, 4];
  BubbleSortB(Values);
  for i := Low(Values) to High(Values) do
    WriteLn(Values[i]);
end.

Output:

9
8
4
2
1

See Also