else if ( Value1 > Value2 );
return( GreaterThan );
else
return( Equal );
}
16.3
Pascal
Procedure QuickSort
(
FirstIdx : integer;
LastIdx : integer;
Names : NAME_ARRAY
);
var
MidPoint : integer;
begin
if ( LastIdx > FirstIdx ) then
begin
Partition( FirstIdx , LastIdx , Names , MidPoint );
QuickSort( FirstIdx , MidPoint – 1 , Names );
QuickSort( MidPoint + 1 , LastIdx , Names );
end
end;