numberFormat | ||||||||||
Type | property | |||||||||
Dictionary | LCS | |||||||||
Library | LiveCode Script | |||||||||
Syntax |
| |||||||||
Summary | Specifies how many digits before and after the decimal point a computed number should have. | |||||||||
Introduced | 1.0 | |||||||||
OS | mac, windows, linux, ios, android | |||||||||
Platforms | desktop, server, mobile | |||||||||
Example |
| |||||||||
Values |
| |||||||||
Related | Property: showValue Control Structure: function Operator: = Keyword: scrollbar, numeric Object: scrollbar Glossary: container, precision, string, property, call, comment, operator, execute, decimal point, local property, statement, handler Function: format, value, abs Command: reset, multiply | |||||||||
Description | If there are zeros after the decimal point, the number of zeros indicates the number of digits after the decimal point in a calculated number. If there are more digits after the decimal point, the number is truncated. If there are fewer digits, trailing zeros are added. If there are hash marks after the decimal point, the number of hash marks indicates the maximum number of digits after the decimal point. If there are more digits, the number is truncated, but if there are fewer digits, no trailing zeroes are added.
Since the numberFormat is a local property, its value is reset to 0.###### when the current handler finishes executing. It retains its value only for the current handler, and setting it in one handler does not affect its value in other handlers it calls. (The numberFormat of a scrollbar is not reset in this way.)
| |||||||||
Tags | math |