Type conversion routines
Go Up to API Categories Index
This topic lists all type conversion routines included in the Delphi run-time library.
Contents
Miscellaneous routines
The following table lists all routines with no particular category used to convert a type to another:
| Routine | Description | 
|---|---|
| 
 Converts a binary value into its hexadecimal representation.  | |
| 
 Returns the Types.TRect for a rectangle of given dimensions.  | |
| 
 Converts a string of hexadecimal digits to the corresponding binary value.  | |
| 
 Creates a Types.TPoint structure from a pair of coordinates.  | |
| 
 Creates a Types.TRect structure from a set of coordinates.  | |
| 
 Creates a Types.TSmallPoint structure from a pair of coordinates.  | 
Type to Type conversion routines
The following table lists all routines used to convert a data type to another and back:
| Routine | Reverse Routine | Description | 
|---|---|---|
| 
 Converts a binary value into its hexadecimal representation and a hexadecimal representation back to binary.  | ||
| 
 Converts a binary-coded decimal value (BCD) to the corresponding Currency value and back.  | ||
| 
 Converts a binary-coded decimal value (BCD) to the corresponding double precision floating point value and back.  | ||
| 
 Converts a binary-coded decimal value (BCD) to an integer and back.  | ||
| 
 Converts a comp to a double value and back.  | 
To String conversion
The following table lists all routines used to convert a data type into its string representation.
| Routine | Description | 
|---|---|
| 
 Returns a string representation of a binary-coded decimal (BCD) value.  | |
| 
 Converts a Boolean value to a string.  | |
| 
 Formats a measurement and its conversion unit into a human-readable string.  | |
| 
 System.SysUtils.CurrToStr, System.SysUtils.CurrToStrF, System.SysUtils.FormatCurr  | 
 Formats a Currency value as a string.  | 
| 
 System.SysUtils.DateTimeToStr, System.SysUtils.DateTimeToString, System.SysUtils.FormatDateTime  | 
 Converts a System.TDateTime value to a string.  | 
| 
 Converts a System.TDate value to a string.  | |
| 
 System.SysUtils.FloatToStr, System.SysUtils.FloatToStrF, System.SysUtils.FormatFloat, System.SysUtils.FloatToText, System.SysUtils.FloatToTextFmt  | 
 Converts a floating point value to a string.  | 
| 
 Converts a 32 or 64-bit integer to a string.  | |
| 
 Converts a System.TDateTime value to a string.  | |
| 
 Converts an unsigned 32 or 64-bit integer to a string.  | |
| 
 Formats a string and returns it to a variable.  | 
From String conversion
The following table lists all routines used to convert a string to a specific data type:
| Routine | With Def. Value | Exception-less variant | Description | 
|---|---|---|---|
| 
 Converts a string to the corresponding binary-coded decimal (BCD) value.  | |||
| 
 Converts a string to a Boolean value.  | |||
| 
 Parses a string into a value and conversion type.  | |||
| 
 Converts a string to a Currency value.  | |||
| 
 Converts a string to a System.TDate value.  | |||
| 
 Converts a string to a System.TDateTime value.  | |||
| 
 Converts a given string to a floating-point value.  | |||
| 
 Converts a string that represents an integer (decimal or hex notation) to a number.  | |||
| 
 Converts a string that represents an integer (decimal or hex notation) to a number.  | |||
| 
 Converts a string to a System.TDateTime value.  | |||
| 
 Converts a string to a Data.SqlTimSt.TSQLTimeStamp value.  | |||
| 
 Converts a string to a numeric representation.  |