# = assignment operator

The = assignment operator represents
either the assignment operator in an assignment statement or a relational
operator in a conditional expression.

## Syntax

```
var = exp
exp = exp
```

## Description

The = operator
does not require surrounding spaces, although they are commonly added
for clarity.

In logical (conditional) expressions, the eq symbol is an alternative to the = sign.

## Example(s)

This use of the = sign illustrates assignment. The array element on the left side
of the = sign is assigned the current value of
the variable, `name`.

```
customer.item<1> = name
```
This example illustrates a conditional expression. If
the value of the variable `answer` is `quit`, the expression evaluates to true and the statement following the `then` condition is executed.

```
if answer = "quit" then stop
```

## See also

- [* arithmetic operator](https://d3codex.com/pickbasic-flashbasic/asterisk-arithmetic-operator/)
- [*= assignment operator](https://d3codex.com/pickbasic-flashbasic/asterisk-equals-assignment-operator/)
- [+= assignment operator](https://d3codex.com/pickbasic-flashbasic/plus-equals-assignment-operator/)
- [- arithmetic operator](https://d3codex.com/pickbasic-flashbasic/minus-arithmetic-operator/)
- [-= assignment operator](https://d3codex.com/pickbasic-flashbasic/minus-equals-assignment-operator/)
- [/= assignment operator](https://d3codex.com/pickbasic-flashbasic/slash-equals-assignment-operator/)
- [:= assignment operator](https://d3codex.com/pickbasic-flashbasic/colon-equals-assignment-operator/)
- [Arithmetic expressions](https://d3codex.com/pickbasic-flashbasic/arithmetic-expressions/)
- [Arithmetic operators](https://d3codex.com/pickbasic-flashbasic/arithmetic-operators/)
- [assigned() function](https://d3codex.com/pickbasic-flashbasic/assigned-function/)
- [Assignment](https://d3codex.com/pickbasic-flashbasic/assignment/)
- [Boolean evaluation](https://d3codex.com/pickbasic-flashbasic/boolean-evaluation/)
- [eq assignment operator](https://d3codex.com/pickbasic-flashbasic/eq-assignment-operator/)
- [if statement](https://d3codex.com/pickbasic-flashbasic/if-statement/)
- [ifr statement](https://d3codex.com/pickbasic-flashbasic/ifr-statement/)
- [let statement](https://d3codex.com/pickbasic-flashbasic/let-statement/)
- [matbuild statement](https://d3codex.com/pickbasic-flashbasic/matbuild-statement/)
- [matparse statement](https://d3codex.com/pickbasic-flashbasic/matparse-statement/)
- [mod() function](https://d3codex.com/pickbasic-flashbasic/mod-function/)
- [not() function](https://d3codex.com/pickbasic-flashbasic/not-function/)
- [Numeric expressions](https://d3codex.com/pickbasic-flashbasic/numeric-expressions/)
- [Precedence](https://d3codex.com/pickbasic-flashbasic/precedence/)
- [precision statement](https://d3codex.com/pickbasic-flashbasic/precision-statement/)
- [Relational operators](https://d3codex.com/pickbasic-flashbasic/relational-operators/)
- [Reserved characters](https://d3codex.com/pickbasic-flashbasic/reserved-characters/)
- [sum() function](https://d3codex.com/pickbasic-flashbasic/sum-function/)

---
Source: https://d3codex.com/pickbasic-flashbasic/equals-assignment-operator/ - part of the D3Codex reference.
