रेंडरिंगhi

string

Translation status: हिन्दी reader-locale proof. Term names and code fences follow the hi pack; supporting prose may still be English.

Short quoted पाठ string literals and template application.

Aliases: \"...\"

Syntax: \"<text>\"

Category#

literal

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!