आयात
Translation status: हिन्दी reader-locale proof. Term names and code fences follow the hi pack; supporting prose may still be English.
Imports names from another module or package source.
Aliases: import
Syntax: आयात सेवन <source> [सार्वजनिक] (<name> [रूपमें <alias>] | * रूपमें <alias>)
Category#
package
Related#
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!