渲染zh-Hans

退出

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

Sets the exit code or exit expression for an entry point.

Syntax: 入口 参数 <name> 退出 <expr> <block>

Category#

entry

Examples#

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

Sets the exit code or exit expression for an entry point.

# =============================================================================
# 退出 — Sets the exit code or exit expression for an entry point
# =============================================================================
#
# What this teaches:
#   • Sets the exit code or exit expression for an entry point.
#   • Related keywords: 入口, 异步入口, 参数
#
# Common mistakes:
#   • Using `抛错` without a `⇥` on the enclosing function — `抛错` requires an enclosing function with a `⇥` alternate-exit type (SEM010).
#
# See also: 入口, 异步入口, 参数
# =============================================================================

# 退出 — CLI exit code on entry
#
# GRAMMAR:
#   entryModifier :← '退出' integer
#
# EXPECTED OUTPUT:
#   No 入口 — declaration or test-runner surface only.
#
# BACKEND:
#   declaration-only entry modifier (whitelist: 退出/exitus.fab).
#

@ 命令行 { name = "exitus-smoke" }
main args args exit 1 {
}