Случайно нашел встроенную функцию преобразования Convert. Это Unit под названием StdConvs. Этот файл имеет в себе данные типа:
// Distance Conversion Units
// basic unit of measurement is meters
cbDistance: TConvFamily;
duAngstroms: TConvType;
duMicrons: TConvType;
duMillimeters: TConvType;
duMeters: TConvType;
duKilometers: TConvType;
duInches: TConvType;
duMiles: TConvType;
duLightYears: TConvType;
duFurlongs: TConvType;
duHands: TConvType;
duPicas: TConvType;
можете проверить на примере эту функцию:
[php]
var
i: Integer;
begin
GetConvFamilies (aFamilies);
for i := Low(aFamilies) to High(aFamilies) do
ComboFamilies.Items.Add (ConvFamilyToDescription (aFamilies<em>));
// get the first and fire event
ComboFamilies.ItemIndex := 0;
ChangeFamily (self);
end;
procedure TForm1.ChangeFamily(Sender: TObject);
var
aTypes: TConvTypeArray;
i: Integer;
begin
ListTypes.Clear;
CurrFamily := aFamilies [ComboFamilies.ItemIndex];
GetConvTypes (CurrFamily, aTypes);
for i := Low(aTypes) to High(aTypes) do
ListTypes.Items.Add (ConvTypeToDescription (aTypes));
end;
The aFamilies and CurrFamily variables are declared in the private section of the form as follows:
aFamilies: TConvFamilyArray;
CurrFamily: TConvFamily;
[/php]