Home THE HYPERCARD CENTER

HyperTalk Reference
Home » HyperTalk Reference » Properties

Note: This is a work in progress and will be formatting errors. Read more about the project on the home page.

numberFormat

set [the] numberFormat to text

where text is a valid number format.
The numberFormat property returns or sets the precision with which the results of mathematical operations are displayed in fields and the Message box. The following symbols specify the number format:

0 Use one zero for each digit you want to appear. . Use a period to indicate the position of the decimal point, if any.

# Use to indicate where you want trailing digits to appear if they have a value other than zero.

HyperCard sets the default number format to "0.######" on idle.

Important
: numberFormat takes effect only when you perform a mathemat- ical operation on a number.


Placeholders

text
An expression that evaluates to a text string.

A text expression can be a literal string surrounded by quotation marks or the value of a container.

For example:

"Hello"
"The sum is:" && 3
card field 1
line 1 of bg fld "Address"
the Message box
the selection
myVar -- a variable
See also: background, bkgnd, button, card, field, menu, menuItem, and stack

Related Topics

« number (property) | HyperTalk Reference | owner »


Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Modern View