The following functions are defined in the SysUtils unit and are much used:
- converts currency to string using local symbol and format.
For example: CurrToStr(currency_variable);
- converts currency value to string using using given format (usually ffCurrency) and digits places after the decimal place.
For example: CurrToStrF(currency_variable, ffCurrency, 2));
See FloatToStrF for more details on format.
- converts floating-point number to string using general format to 15 digits precision.
- Values for TFloatFormat are: ffGeneral, ffExponent, ffFixed, ffNumber and ffCurrency.
Precision is number of significant figures.
Uses DecimalSeparator and ThousandSeparator to display decimal places and separator symbol (eg comma).
Formats work in similar way to spreadsheet:
For example: FloatToStrF(float_variable, ffGeneral, 8, 4));
For example: FloatToStrF(float_variable, ffNumber, 10, 3));
For example: FloatToStrF(float_variable, ffCurrency, 6,
2));
- formats a currency value as a string, according to Format argument.
- formats floating point value as a string, according to Format argument.
- formats Int64 as a string.
- formats integer as a string.
- converts string to Currency. If string invalid EConvertError exception is raised.
- converts string to floating point. If string invalid EConvertError exception is raised.
- converts string to Int64. If string invalid EConvertError exception is raised.
- converts string to integer. If string invalid EConvertError exception is raised.
- converts string to Int64. Leading and trailing white space ignored. If string empty or invalid the default value is returned.
- converts string to integer. Leading and trailing white space ignored. If string empty or invalid the default value is returned.