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

ทางเลือก

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

Binds CLI options metadata to a function declaration.

Syntax: ฟังก์ชัน <name>(...) ทางเลือก <ident> → <type>

Category#

entry

Examples#

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

Binds CLI options metadata to a function declaration.

# =============================================================================
# ทางเลือก — Binds CLI options metadata to a function declaration.
# =============================================================================
#
# What this teaches:
#   • Options bundle — The `ทางเลือก <ident> → <type>` syntax attaches a CLI options struct to a function.
#   • Declaration syntax — Options are declared as a modifier on the function signature, after the parameter list.
#
# Common mistakes:
#   • Duplicate flag definitions in ทางเลือก — each short and long flag must be unique within the CLI surface.
#
# See also: อาร์กิวเมนต์, ถึง
# =============================================================================

# ทางเลือก — CLI options bundle on ฟังก์ชัน
#
# GRAMMAR:
#   funcModifier :← ')' 'ทางเลือก' ident '→' type
#
# EXPECTED OUTPUT:
#   No เริ่ม — declaration or test-runner surface only.
#
# BACKEND:
#   declaration-only CLI binding (whitelist: ทางเลือก/optiones.fab).
#

fn mitte() options Opts → string {
    return "ok"
}