1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
function CompParNom( a,b : truc ) : boolean;
begin
result := a.nom < b.nom;
end;
QuickSort( table, 0, length(table)-1, CompParNom );
function CompParPrenom( a,b : truc ) : boolean;
begin
result := a.prennom < b.prennom;
end;
QuickSort( table, 0, length(table)-1, CompParPrenom );
function CompParAge( a,b : truc ) : boolean;
begin
result := a.age < b.age;
end;
QuickSort( table, 0, length(table)-1, CompParAge );
function CompParTaille( a,b : truc ) : boolean;
begin
result := a.taille < b.taille;
end;
QuickSort( table, 0, length(table)-1, CompParTaille ); |
Partager