Fix

Return the integer portion of a number.

Syntax
      Fix (expression)

Key
   expression  The numeric expression whose integer portion will be returned.

Negative numbers will be rounded up by Fix().

Examples

Dim dblDemo

dblDemo = Fix(123.64) Will return 123
dblDemo = Fix(-32.45) Will return -32

“If you are planning for a year, sow rice; if you are planning for a decade, plant trees; if you are planning for a lifetime, educate people” ~ Chinese Proverb

Related VBScript commands

Int - Return the integer portion of a number (negative numbers round down).


 
Copyright © 1999-2024 SS64.com
Some rights reserved