Renderingen-US

main

Translation status: English reader-locale proof. Term names and code fences follow the en pack; supporting prose may still be English.

Declares the synchronous program entry point.

Aliases: main, entry

Syntax: main <block>

Category#

function

Examples#

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

Declares the synchronous program entry point.

test "do nothing deliberately" {
    pass
}
# =============================================================================
# main — Declares the synchronous program entry point
# =============================================================================
#
# What this teaches:
#   • Declares the synchronous program entry point.
#   • Related keywords: fn, import
#
# Common mistakes:
#   • Attaching `@ cli` to a non-`main` declaration — `@ cli` may only annotate an `main` entry point (SEM009).
#
# See also: fn, import
# =============================================================================

# main — basic program entry point
#
# main { <body> }
#
# GRAMMAR:
#   entryBlock :← 'main' block
#
# EXPECTED OUTPUT:
#   none — smoke asserts exit 0; entry diagnostic via print.
#
# BACKEND:
#   Contrast with salve-munde.fab (module-scope print), functionibus.fab
#   (calls module-level fn), and cli/cli.fab (main args).

main {
    print "ingressus"
}

Expected output:

ingressus