Kết xuấtvi

bắt_đầu

Translation status: Tiếng Việt reader-locale proof. Term names and code fences follow the vi pack; supporting prose may still be English.

Declares the synchronous program entry point.

Aliases: main, entry

Syntax: bắt_đầu <block>

Category#

function

Examples#

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

Declares the synchronous program entry point.

test "do nothing deliberately" {
    pass
}
# =============================================================================
# bắt_đầu — Declares the synchronous program entry point
# =============================================================================
#
# What this teaches:
#   • Declares the synchronous program entry point.
#   • Related keywords: hàm, nhập
#
# Common mistakes:
#   • Attaching `@ cli` to a non-`bắt_đầu` declaration — `@ cli` may only annotate an `bắt_đầu` entry point (SEM009).
#
# See also: hàm, nhập
# =============================================================================

# bắt_đầu — basic program entry point
#
# bắt_đầu { <body> }
#
# GRAMMAR:
#   entryBlock :← 'bắt_đầu' block
#
# EXPECTED OUTPUT:
#   none — smoke asserts exit 0; entry diagnostic via ghi_chú.
#
# BACKEND:
#   Contrast with salve-munde.fab (module-scope ghi_chú), functionibus.fab
#   (calls module-level hàm), and cli/cli.fab (bắt_đầu đối_số).

main {
    print "ingressus"
}

Expected output:

ingressus