changequote({,}) define({_TITLE_},{Varkon MBS Programmers manual}) define({_SUBTITLE_},{- trunc - Function}) define({_INDEXLINK_},{index}) define({_STYLE_},{../varkonstyle.css}) include(../../include/header.inc)

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
include(../../include/svnversion.inc) include(../../include/footer.inc)