String()
Summary
Converts a real number to a string.
Syntax
str_value = String(number value)
| Argument | Contents |
|---|---|
| value | A real or integer number |
Returns
A string that indicates the value of real_value.
Notes
-
String(value) is the same as Format(value, "*.######") for real numbers, so String(0.0000001) returns 0. If you want more than six significant digits you can use, for example, Format(value, "*.*").
Example
r = 2/3
ShowMessage(String(r) + "|" + Format(r, "*.######") + "|" + Format(r, "*.*"))
r = 0.0000001
ShowMessage(String(r) + "|" + Format(r, "*.######") + "|" + Format(r, "*.*"))
See Also
| Function | Summary |
|---|---|
| Format() | Formats a number |
| Value() | Converts a string to a real number |
| Char() | Returns a character of the ASCII table |