Microsoft KB Archive/68166

Word 5.50: INT Function Returns Trailing Zeros

PSS ID Number: Q68166 Article last modified on 11-02-1994

5.00 5.50 6.00

MS-DOS

= SUMMARY =

The INT function in Word version 5.50 returns different values than those returned in Word 5.00.

The following table compares the different values returned by the same INT macro statement in Word 5.00 and Word 5.50.

Macro Statement Word 5.00 Result Word 5.50 Result ————— —————- —————-

INT(3.7) 3 3.0 INT(3.14) 3 3.00 INT(-3.7) -4 -4.0 INT(-3.14) -4 -4.00

The INT macro function can be used to round a number to the next smallest integer. For example, the integer of 3.7 is 3; the integer of -3.7 is -4.

In Word 5.00, the INT function returns only the integer portion of a number, with no decimal point and no trailing zeros. The Word 5.50 INT function returns the decimal point and preserves the number of significant digits from the original number.

This difference may cause macros written in Word 5.00 that use the INT function to work differently in Word version 5.50.

KBCategory: kbother kbmacro KBSubcategory: Additional reference words: os2 ============================================================================= Copyright Microsoft Corporation 1994.