العرضar

أسكي

Translation status: العربية reader-locale proof. Term names and code fences follow the ar pack; supporting prose may still be English.

Single-quoted ASCII machine-text literals.

Aliases: '...'

Syntax: '<text>'

Category#

literal

Examples#

radix/corpus/literalia/ascii.fab (canonical · existing-home)#

Single-quoted ASCII machine-text literals.

# =============================================================================
# أسكي — Single-quoted ASCII machine-text literals.
# =============================================================================
#
# What this teaches:
#   • single-quoted ASCII literals `'...'` — compact syntax for machine-facing strings like route paths
#
# Common mistakes:
#   • Including non-ASCII characters in أسكي literals — أسكي literals are ASCII-only; use "..." for Unicode نص.
#
# See also: نص, string
# =============================================================================

# literalia/ascii — '...' literals
#
# EXPECTED OUTPUT:
#   pg:query

main {
    const أسكي route ← 'pg:query'
    print route
}

Expected output:

pg:query

radix/corpus/bounded/conversio-ascii-overflow-decline.fab (supporting · reject)#

Decline: an أسكي literal longer than the target capacity rejects with ascii_literal_too_long.

# =============================================================================
# أسكي overflow decline — literal over capacity fails closed
# =============================================================================
#
# Decline row (reject reason in the comment):
#   1. over capacity — `'alpha' ↦ أسكي<4>` asks a 5-byte literal to fit a
#      capacity of 4: SEM011 ascii_literal_too_long
#
# Common mistakes:
#   • expecting silent truncation — the D7 overflow rule fails closed at
#     check for literals whose byte count exceeds the target capacity
#
# See also: ↦, أسكي
# =============================================================================

# أسكي literal over capacity — expected compile failure
#
# WHY: pins the fail-closed overflow token in conversio-ascii-overflow-decline.expected.

main {
    const أسكي<4> a ← 'alpha' ↦ أسكي<4>
    print a
}

Expected: compilation rejects this example.