# rem() function

The rem() function returns the remainder
portion of the result of dividing one number by another.

## Syntax

```
rem(dividend, divisor)
```

## Parameter(s)

| dividend | Number to be divided by the number specified in divisor. |
| --- | --- |
| divisor | Number used to divide the number specified in dividend. |

## Description

There is no limitation on the
numeric value of the dividend or divisor. The rem() and mod() functions are identical.

Note: The
use of the rem() function within a FlashBASIC or
BASIC program that is executed from a macro clears all active select-lists.

## Example(s)

rem() is used
to find the end of a page. Every 60 lines, a form feed (`char(12)`) is printed.

```
for i = 1 to lines
 print rec<i>
 if not(rem(i,60)) then print char(12):
next i
```

## See also

- [char() function](https://d3codex.com/pickbasic-flashbasic/char-function/)
- [BASIC functions](https://d3codex.com/pickbasic-flashbasic/basic-functions/)
- [mod() function](https://d3codex.com/pickbasic-flashbasic/mod-function/)
- [not() function](https://d3codex.com/pickbasic-flashbasic/not-function/)
- [Statements and functions](https://d3codex.com/pickbasic-flashbasic/statements-and-functions/)

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