như
Translation status: Tiếng Việt reader-locale proof. Term names and code fences follow the vi pack; supporting prose may still be English.
Introduces an alias name.
Aliases: as
Syntax: <name> như <alias>
Category#
aliasing
Related#
Examples#
radix/corpus/ut/ut.fab (canonical · keyword)#
Introduces an alias name.
# =============================================================================
# như — Introduces an alias name.
# =============================================================================
#
# What this teaches:
# • Parameter aliasing — `như` renames function parameters for clarity or disambiguation
# • Import aliasing — also used in `nhập` contexts for renamed imports
#
# Common mistakes:
# • confusing như (import or parameter alias) with sicut (comparison) or velut (pattern match)
#
# See also: từ, đối_số
# =============================================================================
# như — alias introducer
#
# GRAMMAR:
# alias :← ident 'như' ident
#
# EXPECTED OUTPUT:
# Scalar stdout smoke (see body).
#
# BACKEND:
# Cross-ref: destructura/, nhập/, phân_tích/ (per-field như).
#
fn greet(string location as loc) → string {
return loc
}
main {
print greet("Roma")
}Expected output:
Roma