警告
Translation status: 繁體中文 reader-locale proof. Term names and code fences follow the zh-Hant pack; supporting prose may still be English.
Writes a warning message.
Syntax: 警告 <expression>
Category#
output
Related#
Examples#
radix/corpus/mone/mone.fab (canonical · keyword)#
Writes a warning message.
# =============================================================================
# 警告 — Writes a warning message.
# =============================================================================
#
# What this teaches:
# • the `警告` keyword — emits a warning-style diagnostic (distinct from `註記`/`檢視`)
# • diagnostic output categories — 警告 for warnings vs 寫出/vide for other I/O
#
# Common mistakes:
# • Confusing 警告 (stderr warning) with 註記 (diagnostic info) — 警告 emits warnings, 註記 emits neutral informational output.
#
# See also: 寫出, 檢視
# =============================================================================
# 警告 diagnostic output
#
# 警告 <expr> -- emit a warning-style diagnostic (distinct from 註記/vide)
#
# GRAMMAR:
# outputStmt :← '警告' expr
#
# EXPECTED OUTPUT:
# mone-style warning diagnostic (single 警告 call).
main {
warn "cave"
}