---
url: /flow/guide/scripting-reference/functions/numeric/trunc.md
---

# Trunc

## Declaration

`Function Trunc( aValue : Extended) : Integer`

### Example

```pascal
procedure OnMapEvent(var Value:Variant);
begin
  Value := Trunc(123.455) //result is 123
end;
```

## Description

Returns aValue truncated to a whole number. All decimal places are dropped.

Refer to [Round](/flow/guide/scripting-reference/functions/numeric/round) for a function that rounds to the nearest whole number

The following is an example of truncation

Trunc(3.4) = 3

Trunc(3.5) = 3

Trunc(3.6) = 3

Trunc(4.4) = 4

Trunc(4.5) = 4

Trunc(4.6) = 4
