# int() function

The int() function returns the numeric integer equivalent from a
 given expression.

## Syntax

```
int(num.exp)
```

## Parameter(s)

| num.exp | Expression whose numeric integer equivalent is returned. |
| --- | --- |

## Example(s)

This example truncates the decimal and returns the integer portion of the number.

```
print int(5.1)
5
```

 This example illustrates using the int() function to keep one decimal place
 and truncate the rest.

```
x = 10.25
y = int(x*10)/10
print y
10.2
```

## See also

- [abs() function](https://d3codex.com/pickbasic-flashbasic/abs-function/)
- [BASIC functions](https://d3codex.com/pickbasic-flashbasic/basic-functions/)
- [Numeric expressions](https://d3codex.com/pickbasic-flashbasic/numeric-expressions/)
- [precision statement](https://d3codex.com/pickbasic-flashbasic/precision-statement/)
- [Statements and functions](https://d3codex.com/pickbasic-flashbasic/statements-and-functions/)

---
Source: https://d3codex.com/pickbasic-flashbasic/int-function/ - part of the D3Codex reference.
