การเรนเดอร์th-TH

เริ่ม

Translation status: ภาษาไทย reader-locale proof. Term names and code fences follow the th-TH pack; supporting prose may still be English.

Declares the synchronous program entry point.

Aliases: main, entry

Syntax: เริ่ม <block>

Category#

function

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