Renderingla

Assigns a value to a binding, field, or assignable expression.

Aliases: assignment, assign

Syntax: <place> ← <expression>

Category

assignment

Related

Examples

examples/corpus/assignatio/assignatio.fab (canonical · operator-group)

Assigns a value to a binding, field, or assignable expression.

# assignatio — simple explicit assignment
#
# <place> ← <expression>
#
# Compound assignment glyphs were removed. Use explicit assignment, or postfix
# ⊕ / ⊖ for unit increment/decrement (see incrementa/incrementa.fab).
#
# EXPECTED OUTPUT:
#   20
#   25
#   15
#   30
#   10
#   salve munde

incipit {
    varia numerus x ← 10

    x ← 20
    # 20
    nota x

    x ← x + 5
    # 25
    nota x

    x ← x - 10
    # 15
    nota x

    x ← x * 2
    # 30
    nota x

    x ← x / 3
    # 10
    nota x

    varia textus s ← "salve"
    s ← s + " munde"
    # salve munde
    nota s
}

Expected output:

20
25
15
30
10
salve munde