عام
Translation status: العربية reader-locale proof. Term names and code fences follow the ar pack; supporting prose may still be English.
Marks an import as re-exported from the current module.
Aliases: public
Syntax: استورد من <source> عام <name>
Category#
modifier
Related#
Examples#
radix/corpus/publica/publica.fab (canonical · keyword)#
Marks an import as re-exported from the current module.
# =============================================================================
# عام — Marks an import as re-exported from the current module.
# =============================================================================
#
# What this teaches:
# • Module export visibility — `@ عام` (en spelling `@ public`) exports a
# declaration from the current module, making it importable by any consumer
# • The opposite of `@ خاص`; controls the public API surface of a module
# • Unmarked top-level declarations are module-private: only `@ عام` /
# `@ داخلي` declarations appear in the file's importable surface
#
# Common mistakes:
# • Leaving a declaration unmarked and expecting it to be importable — the
# export surface is `@ عام` / `@ داخلي` only.
#
# See also: خاص, استورد
# =============================================================================
# @ عام marks a declaration as public metadata
#
# Annotations attach visibility metadata to the following declaration.
#
# GRAMMAR:
# annotatedDecl :← '@' 'عام' funcDecl
#
# EXPECTED OUTPUT:
# عام
@ public { }
fn publicum() → string {
return "publica"
}
main {
print publicum()
}Expected output:
publica