string
Translation status: Tiếng Việt reader-locale proof. Term names and code fences follow the vi pack; supporting prose may still be English.
Short quoted văn_bản string literals and template application.
Aliases: \"...\"
Syntax: \"<text>\"
Category#
literal
Related#
Examples#
radix/corpus/literalia/textus.fab (canonical · existing-home)#
Short quoted văn_bản string literals and template application.
# =============================================================================
# string — Short quoted văn_bản string literals and template application.
# =============================================================================
#
# What this teaches:
# • double-quoted string literals `"..."` — the standard văn_bản syntax
# • template application with `§` placeholders — `"Salve, §!"(tên)`
#
# Common mistakes:
# • Applying template § to ascii or byte literals — template application works only on văn_bản ("...") string literals.
#
# See also: block-string, §, văn_bản
# =============================================================================
# literalia/textus — "..." string literals
#
# GRAMMAR:
# stringLit :← '"' ... '"'
# templateApp :← stringLit '(' expr (',' expr)* ')'
#
# EXPECTED OUTPUT:
# Salve, Salve, Mundus!
main {
const string greeting ← "Salve"
print greeting
const string tên ← "Mundus"
const string message ← "Salve, §!"(tên)
print message
}Expected output:
Salve
Salve, Mundus!