V. Borland C ++ builder VCL numeric Conversion Function
1. inttostr
Converts an integer to an ansistring. The function prototype is as follows:
Ansistring _ fastcall inttostr (INT value );
2. inttohex
Converts an integer to a hexadecimal string. The function prototype is as follows:
Ansistring _ fastcall inttohex (INT value, int digits );
3. strtoint
The ansistring is converted to an integer. If the ansistring cannot be converted, an econverterror exception occurs,
The function prototype is as follows:
Int _ fastcall strtoint (const ansistring S );
4. strtointdef
Converts an ansistring string to a numeric value. The function prototype is as follows:
Int _ fastcall strtointdef (const system: ansistring S, int default );
5. floattostr
Converts a floating point number to an ansistring. The function prototype is as follows:
Ansistring _ fastcall floattostr (Extended value );
6. strtofloat
Converts an ansistring string to a floating point value. The function prototype is as follows:
Extended _ fastcall strtofloat (const ansistring S );
7. floattostrf
Converts a floating point number to an ansistring in the specified format. The function prototype is as follows:
Ansistring _ fastcall floattostrf (Extended value, tfloatformat format, int precision, int digits );
Vi. Borland C ++ builder VCL Time Functions
1. Date
The returned tdatetime object contains the current year, month, and day information. The function prototype is as follows:
System: tdatetime _ fastcall date (void );
2. Time
The returned tdatetime object contains the current time information. The function prototype is as follows:
System: tdatetime _ fastcall time (void );
3. Now
Returns the tdatetime object to obtain the current date and time information. The function prototype is as follows:
System: tdatetime _ fastcall now (void );
4. datetimetostring
Converts a tdatetime object to a string object in the specified format. The function prototype is as follows:
Void _ fastcall datetimetostring (ansistring &; Result, const ansistring format, system: tdatetime datetime );
5. datetostr
Convert the tdatetime object (including the current year, month, and day information) to a string object. The function prototype is as follows:
Ansistring _ fastcall datetostr (System: tdatetime date );
6. timetostr
Converts the current date to a string object. The function prototype is as follows:
Ansistring _ fastcall timetostr (System: tdatetime time );
7. datetimetostr
Convert a tdatetime object to a string object. The function prototype is as follows:
Ansistring _ fastcall datetimetostr (System: tdatetime datetime );
8. strtodate
Converts a String object to a year, month, or day object. The function prototype is as follows:
System: tdatetime _ fastcall strtodate (const ansistring S );
9. strtotime
Converts a String object to a time object. The function prototype is as follows:
System: tdatetime _ fastcall strtotime (const ansistring S );
10. strtodatetime
Converts a String object to an object of year, month, day, and time. The function prototype is as follows:
System: tdatetime _ fastcall strtodatetime (const ansistring S );
11. datetimetosystemtime
Convert the tdatetime object to the operating system time. The function prototype is as follows:
Void _ fastcall datetimetosystemtime (System: tdatetime datetime, _ systemtime &; systemtime );
12. systemtimetodatetime
Convert the operating system time to a tdatetime object. The function prototype is as follows:
System: tdatetime _ fastcall systemtimetodatetime (const _ systemtime &; systemtime );
Reference announcement address: http://blog.csdn.net/extcsdn/services/trackbacks/449494.aspx