Renderingla

sic

Starts the true branch of a one-line conditional expression.

Aliases: then

Syntax: si <condition> sic <expression> secus <expression>

Category

control-flow

Related

Examples

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

Starts the true branch of a one-line conditional expression.

# sic — ternary conditional
#
# GRAMMAR:
#   ternaryExpr :← expr 'sic' expr 'secus' expr
#
# EXPECTED OUTPUT:
#   Scalar stdout smoke (see body).
#
# BACKEND:
#   Cross-ref: si/si.fab, ternarius/ternarius.fab.
#

incipit {
    fixum _ a ← 3
    fixum _ b ← 9
    fixum _ max ← a > b sic a secus b
    nota max
}

Expected output:

9