# Mod= Operator

Divides the value of a variable by the value of an expression, then assigns the remainder to the variable.

## Syntax

```
variable Mod= expression
```

## Parts

- variable
- Required numeric variable.
- expression
- Required numeric expression

## Remarks

The following two statements are functionally equivalent.

```
variable Mod= expression
variable = variable Mod expression
```

Because it is derived from the Mod operator, the sign of the variable becomes the same as the expression's.

## Examples

### Variable

Listing 1

```
x = 42
x Mod= 10
y = 24
y Mod= -10
```

variable | value |
---|---|

x | 2 |

y | -4 |

### Property

Listing 2

```
' Change value of property
#obj.value Mod= 2
```