入口
Translation status: 简体中文 reader-locale proof. Term names and code fences follow the zh-Hans pack; supporting prose may still be English.
Declares the synchronous program entry point.
Aliases: main, entry
Syntax: 入口 <block>
Category#
function
Related#
Examples#
radix/corpus/incipit/incipit.fab (canonical · keyword)#
Declares the synchronous program entry point.
test "do nothing deliberately" {
pass
}
# =============================================================================
# 入口 — Declares the synchronous program entry point
# =============================================================================
#
# What this teaches:
# • Declares the synchronous program entry point.
# • Related keywords: 函数, 导入
#
# Common mistakes:
# • Attaching `@ cli` to a non-`入口` declaration — `@ cli` may only annotate an `入口` entry point (SEM009).
#
# See also: 函数, 导入
# =============================================================================
# 入口 — basic program entry point
#
# 入口 { <body> }
#
# GRAMMAR:
# entryBlock :← '入口' block
#
# EXPECTED OUTPUT:
# none — smoke asserts exit 0; entry diagnostic via 显示.
#
# BACKEND:
# Contrast with salve-munde.fab (module-scope 显示), functionibus.fab
# (calls module-level 函数), and cli/cli.fab (入口 参数).
main {
print "ingressus"
}Expected output:
ingressus