OScript API/Built-in Package Index

Class: Integer

An OScript Integer is a 64-bit signed integer and can take on any value in the range of -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.

Integer values can be obtained by:

  • declaring an Integer variable (default value of 0)
  • using an Integer literal (for example 27, -3958)
  • evaluating an expression that results in an Integer value (for example 345 + 26)
  • executing a function that returns an Integer value (for example Length())

Integer expressions are created by joining two or more Integers (using the arithmetic or bitwise logical operators) to form an expression whose result is another Integer. The following example illustrates:

    Integer theLength = Length( "abcdefghijklmno" )
    Integer shorter = ( theLength - 10 )

Arithmetic expressions can be created containing a mixture of Reals and Integers. When this is done, Integer math operations are performed until a Real is encountered. From that point on, Real math operations are performed.

Class Attributes

Maximum Integer.

Minimum Integer.

Class Attributes

Integer MaxInteger

Maximum Integer.

Integer MinInteger

Minimum Integer.

 Copyright © 2023 OpenText Corporation. All rights reserved.