Renderingen-US

warn

Translation status: English reader-locale proof. Term names and code fences follow the en pack; supporting prose may still be English.

Writes a warning message.

Syntax: warn <expression>

Category#

output

Examples#

radix/corpus/mone/mone.fab (canonical · keyword)#

Writes a warning message.

# =============================================================================
# warn — Writes a warning message.
# =============================================================================
#
# What this teaches:
#   • the `warn` keyword — emits a warning-style diagnostic (distinct from `print`/`debug`)
#   • diagnostic output categories — warn for warnings vs write/vide for other I/O
#
# Common mistakes:
#   • Confusing warn (stderr warning) with print (diagnostic info) — warn emits warnings, print emits neutral informational output.
#
# See also: write, debug
# =============================================================================

# warn diagnostic output
#
# warn <expr>  -- emit a warning-style diagnostic (distinct from print/vide)
#
# GRAMMAR:
#   outputStmt :← 'warn' expr
#
# EXPECTED OUTPUT:
#   mone-style warning diagnostic (single warn call).

main {
    warn "cave"
}