العرضar

فراغ

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

Primitive no-value return type.

Aliases: void, unit

Syntax: فراغ

Category#

type

Examples#

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

Primitive no-value return type.

# =============================================================================
# فراغ — Primitive no-value return type.
# =============================================================================
#
# What this teaches:
#   • Void return — `فراغ` for functions that produce no value
#   • Side-effect functions — functions returning `فراغ` execute for their side effects like `اعرض`
#
# Common mistakes:
#   • confusing فراغ (void return type) with فارغ (empty collection initializer) or نوع_لاشيء (null singleton)
#
# See also: دالة, أعد
# =============================================================================



# فراغ — void return type
#
# GRAMMAR:
#   returnType :← 'فراغ'
#
# EXPECTED OUTPUT:
#   Scalar stdout smoke (see body).
#

fn log(string message) → void {
    print message
}

main {
    log("vacuum smoke")
}

Expected output:

vacuum smoke