العرضar

استورد

Translation status: العربية reader-locale proof. Term names and code fences follow the ar pack; supporting prose may still be English.

Imports names from another module or package source.

Aliases: import

Syntax: استورد من <source> [عام] (<name> [كـ <alias>] | * كـ <alias>)

Category#

package

Examples#

radix/corpus/importa/default-braced.fab (canonical · keyword)#

Canonical braced import record with private binding inferred from the path.

# =============================================================================
# استورد — Canonical braced import record with private binding inferred from the path
# =============================================================================
#
# What this teaches:
#   • Canonical braced import record with private binding inferred from the path.
#   • Related keywords: من, خاص, annotation-sugar
#
# Common mistakes:
#   • Letting the compiler infer an import name that collides with an existing top-level binding — use `اسم` or `كـ` to disambiguate (SEM005).
#
# See also: من, خاص, annotation-sugar
# =============================================================================

# استورد — canonical braced record
#
# The canonical record spells the source field and lets visibility/name defaults
# materialize the same ImportDecl as `استورد من "norma:text"`.

import { من = "norma:text" }

print "importa-braced"

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

Imports names from another module or package source.

# =============================================================================
# استورد — Imports names from another module or package source
# =============================================================================
#
# What this teaches:
#   • Imports names from another module or package source.
#   • Related keywords: من, عام, كـ
#
# Common mistakes:
#   • Missing the `من` source in the import record — an import record requires an `من` source path.
#
# See also: من, عام, كـ
# =============================================================================

# استورد من — named import from a sibling module
#
# استورد من relative path; an absent marker does not re-export.
#
# GRAMMAR:
#   استورد من "<path>" <name> [كـ <alias>]
#   استورد من "<path>" عام <name>   (re-export)
#
# Requires module layout: استورد/importa.fab imports from استورد/auxilium.fab.
# Harness compiles single files in isolation — sibling resolution needs package
# or module mode (faber check --package), not bare single-file emit.
#
# EXPECTED OUTPUT:
#   "Salve, Marcus!" on successful link.
#
# BACKEND: Rust/Go e2e whitelist — single-file compile cannot resolve sibling.

import from "./auxilium" auxilium

main {
    print auxilium.saluta("Marcus")
}

Expected output:

Salve, Marcus!