रेंडरिंगhi

सार्वजनिक

Translation status: हिन्दी reader-locale proof. Term names and code fences follow the hi pack; supporting prose may still be English.

Marks an import as re-exported from the current module.

Aliases: public

Syntax: आयात सेवन <source> सार्वजनिक <name>

Category#

modifier

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