string
Translation status: ภาษาไทย reader-locale proof. Term names and code fences follow the th-TH pack; supporting prose may still be English.
Short quoted ข้อความ string literals and template application.
Aliases: \"...\"
Syntax: \"<text>\"
Category#
literal
Related#
Examples#
radix/corpus/literalia/textus.fab (canonical · existing-home)#
Short quoted ข้อความ string literals and template application.
# =============================================================================
# string — Short quoted ข้อความ string literals and template application.
# =============================================================================
#
# What this teaches:
# • double-quoted string literals `"..."` — the standard ข้อความ syntax
# • template application with `§` placeholders — `"Salve, §!"(ชื่อ)`
#
# Common mistakes:
# • Applying template § to ascii or ไบต์ literals — template application works only on ข้อความ ("...") string literals.
#
# See also: block-string, §, ข้อความ
# =============================================================================
# literalia/textus — "..." string literals
#
# GRAMMAR:
# stringLit :← '"' ... '"'
# templateApp :← stringLit '(' expr (',' expr)* ')'
#
# EXPECTED OUTPUT:
# Salve, Salve, Mundus!
main {
const string greeting ← "Salve"
print greeting
const string ชื่อ ← "Mundus"
const string message ← "Salve, §!"(ชื่อ)
print message
}Expected output:
Salve
Salve, Mundus!