العرضar

حقق

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

Declares that a type implements one or more عقد contracts.

Aliases: implements

Syntax: صنف <name> حقق <interface-list> <block>

Category#

type

Examples#

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

Declares that a type implements one or more عقد contracts.

# =============================================================================
# حقق — Declares that a type implements one or more عقد contracts
# =============================================================================
#
# What this teaches:
#   • Declares that a type implements one or more عقد contracts.
#   • Related keywords: صنف, عقد
#
# Common mistakes:
#   • Declaring `صنف حقق Implendum` without implementing all required methods — every method signature in the عقد must have a body in the صنف.
#
# See also: صنف, عقد
# =============================================================================

# حقق — صنف implements a عقد (interface contract)
#
# صنف Nomen حقق Implendum { … }
#
# GRAMMAR:
#   genusDecl :← 'صنف' ident 'حقق' ident '{' methodDecl* '}'
#
# EXPECTED OUTPUT:
#   implet.expected — Aurelia from عقد plenum().

interface Nominatum {
    fn plenum() → string
}

class Civis implements Nominatum {
    var string اسم

    fn plenum() → string {
        # satisfies عقد requirement
        return "§"(self.nomen)
    }
}

main {
    const Civis civis ← Civis { اسم = "Aurelia" }
    print civis.plenum()
}

Expected output:

Aurelia