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.

    Sum numbers from 1 to 10

    ASPL 0.7.0 · Current release

    A complete program with three supplied source variants for browser and native hosts.

    On this page

    What the program does

    This complete program adds the integers from 1 through 10. It uses mutable integer bindings, a while loop, and an if statement. The source stays unchanged when you switch reading language.

    Arabic source

    This supplied variant uses Arabic keywords. Open it as a separate Home draft; it will not replace another draft or run automatically.

    Browser and native · ASPL 0.7.0 · Arabic source

    Execution: Browser and native · ASPL 0.7.0

    Prerequisites:
    • No prior knowledge is required to open and check it.

    Input: No input lines are required.

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

    Expected outcomes
    {
      "browser": {
        "check": "success",
        "class": "success",
        "output": "55\n",
        "processStatus": 0
      },
      "native": {
        "check": 0,
        "status": 0,
        "output": "55\n"
      }
    }

    English source

    This supplied variant uses English keywords. It belongs to the same sum example family as the Arabic and mixed variants.

    Browser and native · ASPL 0.7.0 · English source

    Execution: Browser and native · ASPL 0.7.0

    Prerequisites:
    • No prior knowledge is required to open and check it.

    Input: No input lines are required.

    fn start_main() -> i64 {
        var total: i64 = 0;
        var number: i64 = 1;
        while (number <= 10) {
            total = total + number;
            number = number + 1;
        }
        if (total matches 55) {
            print("55\n");
            return 0;
        }
        return 1;
    }
    
    Download sum.aspl

    Expected outcomes
    {
      "browser": {
        "check": "success",
        "class": "success",
        "output": "55\n",
        "processStatus": 0
      },
      "native": {
        "check": 0,
        "status": 0,
        "output": "55\n"
      }
    }

    Mixed source

    This supplied variant uses both vocabularies. It is its own source file, not a translation generated by the website.

    Browser and native · ASPL 0.7.0 · Mixed source

    Execution: Browser and native · ASPL 0.7.0

    Prerequisites:
    • No prior knowledge is required to open and check it.

    Input: No input lines are required.

    fn ابدأ_الرئيسية() -> ص64 {
        متغير المجموع: ص64 = 0;
        متغير العدد: ص64 = 1;
        طالما (العدد <= 10) {
            المجموع = المجموع + العدد;
            العدد = العدد + 1;
        }
        إذا (المجموع matches 55) {
            print("55\n");
            return 0;
        }
        أرجع 1;
    }
    
    Download sum.mixed.aspl

    Expected outcomes
    {
      "browser": {
        "check": "success",
        "class": "success",
        "output": "55\n",
        "processStatus": 0
      },
      "native": {
        "check": 0,
        "status": 0,
        "output": "55\n"
      }
    }

    Check the outcome

    The catalog records the checked result for the browser and native hosts. Predict the output and returned status before expanding it.

    Show the expected browser and native outcomes for the English source.
    {
      "browser": {
        "check": "success",
        "class": "success",
        "output": "55\n",
        "processStatus": 0
      },
      "native": {
        "check": 0,
        "status": 0,
        "output": "55\n"
      }
    }

    Browse pages