Kết xuấtvi

trống

Translation status: Tiếng Việt reader-locale proof. Term names and code fences follow the vi pack; supporting prose may still be English.

Primitive no-value return type.

Aliases: void, unit

Syntax: trống

Category#

type

Examples#

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

Primitive no-value return type.

# =============================================================================
# trống — Primitive no-value return type.
# =============================================================================
#
# What this teaches:
#   • Void return — `trống` for functions that produce no value
#   • Side-effect functions — functions returning `trống` execute for their side effects like `ghi_chú`
#
# Common mistakes:
#   • confusing trống (void return type) with tập_rỗng (empty collection initializer) or rỗng_ty (null singleton)
#
# See also: hàm, trả
# =============================================================================



# trống — void return type
#
# GRAMMAR:
#   returnType :← 'trống'
#
# EXPECTED OUTPUT:
#   Scalar stdout smoke (see body).
#

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

main {
    log("vacuum smoke")
}

Expected output:

vacuum smoke