SmartPascal
TConvType
Type
Defines a measurement type as used by Convert ConvUtils unit
  type TConvType = type Word;
Description
The TConvType type defines a measurement type used in the Convert general purpose conversion utility.
 
The type should be assigned from one of the TConvFamily values. (See TConvFamily for available values).
Related commands
Convert Convert one measurement value to another
TConvFamily Defines a family of measurement types as used by Convert
 
Example code : Convert UK gallons to litres
var
  gallons, litres  : Double;
  fromType, toType : TConvType;

begin
  // Define the gallons value
  gallons := 1;

  // Convert to litres
  fromType := vuUKGallons;
  toType   := vuLiters;
  litres := Convert(gallons, fromType, toType);

  // Display both values
  ShowMessageFmt('%f UK gallons = %f litres',[gallons, litres]);
end;
Show full unit code
   1.00 UK gallons = 4.55 litres