Siebel VB Language Reference > Methods Reference for Siebel VB > Mathematical Methods >

Get Rounded Integer Method


The Get Rounded Integer method removes the fractional part of a number. It returns the integer part of a number. For positive and negative numbers, it removes the fractional part of the expression and returns the integer part only. For example:

  • Fix (6.2) returns 6.
  • Fix (-6.2) returns negative 6.

For more information, see This method uses the same arguments as the Get Absolute Value method. For more information, see Get Absolute Value Method..

Format

Fix(number)

This method uses the same arguments as the Get Absolute Value method. For more information, see Get Absolute Value Method.

How The Get Integer Method Handles Variant Types

The data type of the return value matches the data type of the numeric expression. This includes variant expressions unless the numeric expression is one of the following:

  • A string variant type that evaluates to a number. In this situation, the data type of the return value is a double variant type.
  • An empty variant type. In this situation, the data type of the return value is a long variant type.

For more information, see Variants.

Example

The following example returns the integer portion of a number that the user enters:

Sub Button_Click
   Dim usernum
   Dim intvalue
   usernum = 77.54
   intvalue = Fix(usernum)
End Sub

Siebel VB Language Reference Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Legal Notices.