Renderingen-US

Experimental through version 1. Version 0 was alpha. This is the first language release: the interface is relatively stable, not frozen. Nothing is promised stable until version 2.

args

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

Binds command-line arguments for an entry point.

Syntax: main args <name> <block> | fn <name>() args <name> <block>

Category#

function

Examples#

radix/corpus/reference/keyword/argumenta/argumenta.fab (canonical · keyword)#

Binds command-line arguments for an entry point.

# =============================================================================
# args — Binds command-line arguments for an entry point.
# =============================================================================
#
# What this teaches:
#   • CLI entry binding — `main args <name>` declares a program entry
#     that receives command-line arguments
#   • Annotation-driven CLI — `@ cli`, `@ description`, and `main args`
#     work together to define a structured CLI interface
#
# Common mistakes:
#   • attaching `@ cli` to a `fn` instead of an `main` (SEM009), or forgetting to annotate with `@ cli` before `main args`
#
# See also: main, cli, command, option, operand
# =============================================================================

# args — CLI entry operand binding
#
# GRAMMAR:
#   entryDecl :← 'main' 'args' ident block
#
# EXPECTED OUTPUT:
#   none — the runner executes the entry and prints nothing; empty golden.
#
# BACKEND:
#   declaration-only CLI entry (whitelist: args/argumenta.fab).
#

@ cli { name = "argumenta-smoke" }
@ description "argumenta exemplum"
main args args {
}