INT()

INT(V)

RETURNS THE INTEGER VALUE OF V

  • Type: Function
  • Parameter: 1
  • Group: Mathematics

ACTION

The function INT(V) returns V downwards to the nearest integer (integer part).

V can be a real or integer number, but if V is an integer, INT(V) is V.

SYNTAX: Result=INT(V)

  • V = real or integer value.

USE

  • The function INT() is used to calculate an integer value.

ERROR

  • If V is not a correct expression.

EXAMPLE

rem EXAMPLE 1: Integer part of a positive number

print int(3.2)

print "Result = 3"

rem --------------------------------------------

rem EXAMPLE 2: Integer part of a negative number

print int(-3.2)

print "Result = -4"

SEE ALSO

FRAC()

MOD()