= 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

*= Assignment Operator

+= Assignment Operator

- Arithmetic Operator

-= Assignment Operator

/= Assignment Operator

:= Assignment Operator

Arithmetic Expressions

Arithmetic Operators

assigned() Function

Assignment

Boolean Evaluation

eq Assignment Operator

if Statement

ifr Statement

let Statement

matbuild Statement

matparse Statement

mod() Function

not() Function

Numeric Expressions

Precedence

precision Statement

Relational Operators

Reserved Characters

sum() Function