Renderingla

scribe

Writes a value to standard output.

Syntax: scribe <expression>

Category

output

Related

Examples

examples/corpus/nota/nota.fab (canonical · keyword)

Writes a value to standard output.

# nota — diagnostic output statements
#
# nota literal-textus
# nota expr
# nota template with § interpolation
# nota labeled template with multiple § placeholders
#
# GRAMMAR:
#   outputStmt :← 'nota' expr (',' expr)*
#
# EXPECTED OUTPUT:
#   nota.expected — greeting, variable, formatted strings, sum, coordinates.

incipit {
    # Simple string output
    nota "Salve, Munde!"

    # Variable output
    fixum _ nomen ← "Marcus"
    nota nomen

    # Multiple arguments
    fixum _ aetas ← 30
    nota "nomen: §"(nomen)
    nota "aetas: §"(aetas)

    # Expressions
    fixum _ x ← 10
    fixum _ y ← 20
    nota "summa: §"(x + y)

    # Multiple values in one statement
    nota "coordinata: § §"(x, y)
}

Expected output:

Salve, Munde!
Marcus
nomen: Marcus
aetas: 30
summa: 30
coordinata: 10 20