ในชื่อ
Translation status: ภาษาไทย reader-locale proof. Term names and code fences follow the th-TH pack; supporting prose may still be English.
Introduces an alias name.
Aliases: as
Syntax: <name> ในชื่อ <alias>
Category#
aliasing
Related#
Examples#
radix/corpus/ut/ut.fab (canonical · keyword)#
Introduces an alias name.
# =============================================================================
# ในชื่อ — Introduces an alias name.
# =============================================================================
#
# What this teaches:
# • Parameter aliasing — `ในชื่อ` renames function parameters for clarity or disambiguation
# • Import aliasing — also used in `นำเข้า` contexts for renamed imports
#
# Common mistakes:
# • confusing ในชื่อ (import or parameter alias) with sicut (comparison) or velut (pattern match)
#
# See also: ออก, อาร์กิวเมนต์
# =============================================================================
# ในชื่อ — alias introducer
#
# GRAMMAR:
# alias :← ident 'ในชื่อ' ident
#
# EXPECTED OUTPUT:
# Scalar stdout smoke (see body).
#
# BACKEND:
# Cross-ref: destructura/, นำเข้า/, แยก/ (per-field ในชื่อ).
#
fn greet(string location as loc) → string {
return loc
}
main {
print greet("Roma")
}Expected output:
Roma