DIAdem Help

Method: Int for VBS

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

Method: Int for VBS

Specifies the integer part of a number, where the method rounds the number to obtain an integer number. For negative numbers, the method returns integer numbers that are less than or equal to the argument number.

vInt = Object.Int(number)
ObjectVBS
Object with this method. You do not need to specify this object.
numberVariant
Specifies any numeric expression.
vIntVariant
Receives the integer part of a number. For negative numbers, the similar Fix 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(Int(99.2))    ' Returns 99
Call MsgBox(Int(-99.8))   ' Returns -100
Call MsgBox(Int(-99.2))   ' Returns -100

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