type TLogical = type Boolean; TVariable = type Variant; class procedure PleaseSort(var _array:array of TVariable); var _improve_with_strings_and_objects___:TLogical; _i:LongInt; _j:LongInt; _k:LongInt; _stop:LongInt; _swap:TVariable; begin _stop := System.High(_array); _k := _stop shr 1;// div 2 while _k > Math.ZeroValue do begin for _i := Math.ZeroValue to _stop - _k do begin _j := _i; while (_j >= Math.ZeroValue) and (_array[_j] > _array[_j + _k]) // here is the test...!!! do begin _swap := _array[_j]; _array[_j] := _array[_j + _k]; _array[_j + _k] := _swap; if _j > _k then System.Dec(_j, _k) else _j := Math.ZeroValue; end; end; _k := _k shr 1; // div 2 end; end;
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.