index

Varkon MBS Programmers manual

# trunc - Function

## Description

Returns the integer part of an argument (truncates).

## Syntax

      i:=trunc(x);

      int   i;
      float x;

## Principal parameters

x | - A value.

## Optional parameters

None.

## Return value

An INT value equal to the (truncated) integer part of x.

## Example

       i:=trunc(10.75);   ! Returns  10
       i:=trunc(10.25);   ! Returns  10
       i:=trunc(0.0);     ! Returns   0
       i:=trunc(-10.25);  ! Returns -10
       i:=trunc(-10.75);  ! Returns -10

Varkon version 1.19C svn# 97