ASPL لباتASPL 0.7.0

Search documentation

Search starts with current English documentation · ASPL 0.7.0

Enter a complete name such as read_line, or words about a topic.

    العربية
    Source files

    Open one UTF-8 .aspl or .لبات file, up to 1 MiB, in a new draft. It stays in this browser and does not run automatically.

    Exported source modules

    ASPL 0.7.0 · Current release

    Download an entry and helper that export a record and return a private helper as a callable.

    On this page

    Purpose and preparation

    Native only, ASPL 0.7.0. Download the entry and the required helpers.aspl for English or مساعدات.لبات for Arabic into one directory. No input lines or data assets are required. The helper exports a function, a record and a function returning a private helper as a callable. Prints 42 followed by LF and returns 0.

    Current reference.

    Install the native toolchain · Follow the practical module guide.

    Arabic source

    Native only. These are source files, not browser run data.

    Native only · ASPL 0.7.0 · Arabic source

    Execution: Native only · ASPL 0.7.0

    Prerequisites:
    • Native only. Keep الرئيسية.لبات or main.aspl beside helpers.aspl in one directory. No data files are required.

    Input: No input lines are required.

    Arabic source · Required source modules, keep each variant in a separate directory:

    استورد مساعدات.لبات بسم مكتبة.
    دالة ابدأ_الرئيسية() -> ص64 {
        دع جواب: مكتبة::سجل_جواب = مكتبة::سجل_جواب { قيمة: 38 }.
        دع عمل: دالة(ص64) -> ص64 = مكتبة::اختر().
        إذا عمل(جواب::قيمة) لا يطابق مكتبة::جواب() { أرجع 1. }
        اطبع(نسق_ص64(عمل(جواب::قيمة)) + "\س").
        أرجع 0.
    }
    

    Follow the Linux instructions to run this example. Download the source to keep a copy.

    Download الرئيسية.لبات

    Expected outcomes
    {
      "native": {
        "check": 0,
        "status": 0,
        "output": "42\n"
      }
    }

    English source

    Native only. These are source files, not browser run data.

    Native only · ASPL 0.7.0 · English source

    Execution: Native only · ASPL 0.7.0

    Prerequisites:
    • Native only. Keep الرئيسية.لبات or main.aspl beside helpers.aspl in one directory. No data files are required.

    Input: No input lines are required.

    English source · Required source modules, keep each variant in a separate directory:

    import helpers.aspl as lib;
    fn start_main() -> i64 {
        let reply: lib::Reply = lib::Reply { value: 38 };
        let action: fn(i64) -> i64 = lib::choose();
        if action(reply::value) not matches lib::answer() { return 1; }
        print(format_i64(action(reply::value)) + "\n");
        return 0;
    }
    

    Follow the Linux instructions to run this example. Download the source to keep a copy.

    Download main.aspl

    Expected outcomes
    {
      "native": {
        "check": 0,
        "status": 0,
        "output": "42\n"
      }
    }

    Check the result

    Source cards show exact catalog outcomes. Downloads retain original bytes, digests and supplied vocabulary.

    aspl check main.aspl
    aspl run main.aspl
    aspl build -o module-program main.aspl
    ./module-program

    Historical normative scope

    • Historical specification, English source

      Historical MVP function background only; callable values and source modules are later extensions audited against the published native/browser 0.7.0 implementation

    Browse pages