Home
The HyperCard Center
HyperTalk Reference

Note: This is a work in progress and many formatting issues have been fixed. Read more about the project on the home page.

round

the round of number

Value returned: the integer nearest to number

Odd integers plus exactly 0.5 round up; even integers (or 0) plus exactly 0.5 round down.

If number is negative, HyperCard internally removes the negative sign, rounds its absolute value, then puts the negative sign back on.

Examples

the round of 5.5
the round of 5.5 + 3 -- returns 9
the round of (5.5 + 3) -- returns 8
get round(the top of card window / 2)

Related Topics

Placeholders

number

An expression that evaluates to a number.

For example:

169 / 19
pi
(60.625 * 500)
average(1,4,5,10)
i+1 -- (where i is a number)
line 1 of fld "Debits"

Note: Formally, HyperCard distinguishes between factors (simple values) and expressions. The difference between factors and expression matters only if you like to drop parentheses. Most functions take factors as their parameters, which is why abs of -10 + 2 returns 12 and abs of (-10 + 2) returns 8. In short, always use parentheses to group things the way you want them to evaluate, and you won’t have to worry about the difference between factors and expressions.

HyperTalk Reference

Version 0.8b4 (July 4, 2025)

Made with Macintosh

Switch to Retro View