DIAdem Help

Method: Fix for VBS

  • Updated2024-09-12
  • 1 minute(s) read

Method: Fix for VBS

Specifies the integer part of a number by removing the decimal places.

vFix = Object.Fix(number)
ObjectVBS
Object with this method. You do not need to specify this object.
numberVariant
Specifies any numeric expression.
vFixVariant
Receives the integer part of a number. For negative numbers, the similar Int method returns integer numbers that are less than or equal to the argument.

The following example specifies the integer part of various numbers:

Call MsgBox(Fix(99.2))    ' Returns 99
Call MsgBox(Fix(-99.8))   ' Returns -99
Call MsgBox(Fix(-99.2))   ' Returns -99

See Also

Objects Overview

Related Topics

Abs | Asc | AscB | AscW | CBool | CByte | CCur | CDate | CDbl | CInt | CLng | CSng | CStr | ChrB | ChrW | Chr | Escape | Fix | Hex | Int | Oct | Sgn | UnEscape