RAD Studio VCL Reference
|
Registers a new conversion family and returns its identifier.
function RegisterConversionFamily(const ADescription: string): TConvFamily;
TConvFamily RegisterConversionFamily(const AnsiString ADescription);
ConvUtils
Call RegisterConversionFamily to create a new conversion family. A conversion family represents a type of thing that can be measured using different measurement units. For example, the StdConvs unit defines conversion families for distance, volume, area, temperature, and so on.
Once you have registered a new conversion family, you can register units of measurement that belong to the family using the RegisterConversionType function. RegisterConversionType takes the conversion family identifier returned by RegisterConversionFamily as an argument. The global Convert function can then convert between any two conversion types (units of measurement) that have been registered with the same conversion family.
ADescription is a string that names the conversion family. Typically, this names the thing measured, such as 'Distance', 'Volume', 'Area', 'Temperature', and so on.
RegisterConversionFamily returns an identifier for the new conversion family.
Adding New Measurement Types
Converting Measurements
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|