渲染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 debug value to standard output.

Syntax: 查看 <expression>

Category#

output

Examples#

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

Writes a debug value to standard output.

# =============================================================================
# 查看 — Writes a debug value to standard output.
# =============================================================================
#
# What this teaches:
#   • Diagnostic output — `查看` for inspection-style debugging, distinct from `显示` and `警告`
#   • Output variety — Faber provides multiple output functions for different purposes
#
# Common mistakes:
#   • confusing 查看 (diagnostic output) with 测试 (test block) or 断言 (assertion) — 查看 is for inspection, not validation
#
# See also: 写入, 警告
# =============================================================================




# 查看 diagnostic output
#
# 查看 <expr>  -- emit a vide-style inspection diagnostic (distinct from 显示/mone)
#
# GRAMMAR:
#   outputStmt :← '查看' expr
#
# EXPECTED OUTPUT:
#   vide-style diagnostic: "inspecta"

main {
    debug "inspecta"
}

Expected output:

inspecta