|
|
|
|
|
- Formatting according to the languages used
LengthToString (Function) In french: TailleVersChaîne Converts a size in bytes to a string with human-readable units such as kilobytes, megabytes or terabytes. This function is used to format the result returned by fSize, FTPSize, etc.
nSize is int = 123596900
Info(LengthToString(nSize))
Info(LengthToString(nSize, sizeKB))
Info(LengthToString(nSize, sizeGB))
Syntax
<Result> = LengthToString(<Size to convert> [, <Display format>])
<Result>: Character string - Conversion result. This result has 2 digits after the decimal point.
- Empty string ("") if an error occurred.
<Size to convert>: Integer Size to convert (in bytes). <Display format>: Optional Integer constant By default, the string is returned in the most readable unit. The following constants are used to force the use of a specific unit: | | sizeB | Size converted to bytes. | sizeGB | Size converted to gigabytes. | sizeKB | Size converted to kilobytes. | sizeMB | Size converted to megabytes. | sizeTB | Size converted to terabytes. |
Remarks Formatting according to the languages used The formatting of the result depends on the characteristics of the languages defined in the project description ("Language" tab). You can change the file size units and/or the decimal separator. Business / UI classification: Neutral code
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|