渲染zh-Hans

警告

Translation status: 简体中文 reader-locale proof. Term names and code fences follow the zh-Hans pack; supporting prose may still be English.

Writes a warning message.

Syntax: 警告 <expression>

Category#

output

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"
}