การเรนเดอร์th-TH

octeti

Translation status: ภาษาไทย reader-locale proof. Code fences render through the th-TH pipeline; prose is canonical Latin.

Primitive byte-buffer type.

Aliases: bytes

Syntax: octeti

Category#

type

Examples#

radix/corpus/octeti/octeti.fab (canonical · keyword)#

Primitive byte-buffer type.

# =============================================================================
# octeti — Primitive byte-buffer type.
# =============================================================================
#
# What this teaches:
#   • Primitive buffer type — `octeti` is the built-in byte buffer, analogous to `Vec<u8>` in Rust.
#   • Literal syntax — Byte buffers can be written with hex literals like `|de ad be ef|`.
#
# Common mistakes:
#   • Writing octeti hex literals with an odd digit count — each byte requires two hex digits.
#
# See also: textus, lista
# =============================================================================

# octeti — byte-buffer type alias
#
# typus Fascis = octeti
#
# GRAMMAR:
#   typeAliasDecl :← 'typus' ident '=' typeExpr
#
# EXPECTED OUTPUT:
#   octeti.expected — type-known diagnostic.

type Fascis = bytes

main {
    const bytes sig  |de ad be ef|
    const bytes hello  |48 65 6c 6c 6f|
    const bytes empty  ||
    print "octeti typus notus"
}

Expected output:

octeti typus notus