# abs() function

The abs() function returns the absolute
(positive) portion of the integer number derived from the given numeric
expression.

## Syntax

```
abs(num.exp)
```

## Parameter(s)

| num.exp | Expression resulting in an integer number. |
| --- | --- |
Note: If the expression is nonnumeric, 0 is assumed.

## Example(s)

```
x = -1
y = abs(x)
print y
1
```

## See also

- [FlashBASIC C functions overview](https://d3codex.com/pickbasic-flashbasic/flashbasic-c-functions-overview/)
- [int() function](https://d3codex.com/pickbasic-flashbasic/int-function/)
- [Numeric expressions](https://d3codex.com/pickbasic-flashbasic/numeric-expressions/)
- [Statements and functions](https://d3codex.com/pickbasic-flashbasic/statements-and-functions/)
- [ub070 user exit](https://d3codex.com/pickbasic-flashbasic/ub070-user-exit/)

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