sic
Translation status: हिन्दी reader-locale proof. Code fences render through the hi pipeline; prose is canonical Latin.
Starts the true branch of a one-line conditional expression.
Aliases: then
Syntax: si <condition> sic <expression> secus <expression>
Category#
control-flow
Related#
Examples#
radix/corpus/sic/sic.fab (canonical · keyword)#
Starts the true branch of a one-line conditional expression.
# =============================================================================
# sic — Starts the true branch of a one-line ternary conditional expression.
# =============================================================================
#
# What this teaches:
# • Ternary expressions — `<cond> sic <true-expr> secus <false-expr>` is a
# compact expression-level conditional
# • Unlike `si ergo`, `sic` is an expression that produces a value, not a
# statement
#
# Common mistakes:
# • Using `sic` without a `secus` branch — the ternary expression requires both true and false arms.
#
# See also: si, secus
# =============================================================================
# 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.
#
main {
const _ a ← 3
const _ b ← 9
const _ max ← a > b yields a else b
print max
}Expected output:
9