scriptum-display-option
Translation status: العربية reader-locale proof. Term names and code fences follow the ar pack; supporting prose may still be English.
A § slot shows an option exactly as print does: an absent option as نوع_لاشيء, a present one as its value.
Syntax: \"<template>\"(<option>)
Category#
format
Related#
Examples#
radix/corpus/scriptum/scriptum-display-option.fab (canonical · concept)#
A § slot shows an option exactly as print does: an absent option as نوع_لاشيء, a present one as its value.
# =============================================================================
# scriptum-display-option — an option in a `§` slot
# =============================================================================
#
# What this teaches:
# • An absent option placed in a `§` slot reads `نوع_لاشيء`, exactly as a bare
# `print` of it does; a present option reads as the value it holds.
#
# Common mistakes:
# • Expecting the host language's spelling of an absent value (`null`,
# `nil`, `None`) in the template text.
#
# See also: حرر, scriptum-display
# =============================================================================
# scriptum-display-option — absent and present options inside `§` slots
#
# EXPECTED OUTPUT:
# scriptum-display-option.expected — each template line, then the same values printed alone.
main {
const int ∪ none absent ← null
const int ∪ none present ← 4
print "absent=§"(absent)
print "present=§"(present)
print absent
print present
}Expected output:
absent=nihil
present=4
nihil
4