ส่วนตัว
Translation status: ภาษาไทย reader-locale proof. Term names and code fences follow the th-TH pack; supporting prose may still be English.
Marks a declaration as module-private (the default tier).
Aliases: private
Syntax: @ ส่วนตัว <declaration>
Category#
modifier
Related#
Examples#
radix/corpus/privata/privata.fab (canonical · keyword)#
Marks a declaration as module-private (the default tier).
# =============================================================================
# ส่วนตัว — Marks a declaration as module-private (the default tier).
# =============================================================================
#
# What this teaches:
# • Module-level visibility — `@ ส่วนตัว` (en spelling `@ private`) restricts
# a declaration to the current module, keeping it out of the importable
# surface
# • Used as an annotation (`@ ส่วนตัว`) on function declarations to control
# the module boundary; unmarked declarations are module-private by default
#
# Common mistakes:
# • Expecting `@ ส่วนตัว` to mean anything beyond module-private — it is an
# explicit marker for the default tier (accepted, no warning).
#
# See also: สาธารณะ, นำเข้า
# =============================================================================
# @ ส่วนตัว marks a declaration as private metadata
#
# Annotations attach visibility metadata to the following declaration.
#
# GRAMMAR:
# annotatedDecl :← '@' 'ส่วนตัว' funcDecl
#
# EXPECTED OUTPUT:
# ส่วนตัว
@ private { }
fn privatum() → string {
return "privata"
}
main {
print privatum()
}Expected output:
privata