Renderingen-US

as

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

Introduces an alias name.

Aliases: as

Syntax: <name> as <alias>

Category#

aliasing

Examples#

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

Introduces an alias name.

# =============================================================================
# as — Introduces an alias name.
# =============================================================================
#
# What this teaches:
#   • Parameter aliasing — `as` renames function parameters for clarity or disambiguation
#   • Import aliasing — also used in `import` contexts for renamed imports
#
# Common mistakes:
#   • confusing as (import or parameter alias) with sicut (comparison) or velut (pattern match)
#
# See also: from, args
# =============================================================================



# as — alias introducer
#
# GRAMMAR:
#   alias :← ident 'as' ident
#
# EXPECTED OUTPUT:
#   Scalar stdout smoke (see body).
#
# BACKEND:
#   Cross-ref: destructura/, import/, match/ (per-field as).
#

fn greet(string location as loc) → string {
    return loc
}

main {
    print greet("Roma")
}

Expected output:

Roma