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.

    Strings and Unicode

    ASPL 0.7.0 · Current release

    Complete supplied source, preparation, and checked ASPL 0.7.0 outcomes.

    On this page

    Purpose and preparation

    Browser and native, ASPL 0.7.0. Checks scalar indexing and slicing of Arabic and emoji, then prints aمرحبا😀! with status 0.

    See the current reference. No source module or external library is required.

    Arabic source

    This supplied complete source opens a new draft. Prepare the declared inputs/files in that draft, then select Run explicitly.

    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 {
        دع المتن = "aمرحبا😀".
        إذا (طول(المتن) لا يطابق 7) { أرجع 1. }
        إذا (محرف_عند(المتن, 1) لا يطابق "م") { أرجع 2. }
        إذا (رمز_عند(المتن, 1) لا يطابق 1605) { أرجع 3. }
        إذا (من_رمز(65) لا يطابق "A") { أرجع 4. }
        إذا (اقتطع(المتن, 1, 3) لا يطابق "مر") { أرجع 5. }
        دع هروب = "\س\ت\ر\ص\ي{0645}\"\\".
        إذا (طول(هروب) لا يطابق 7) { أرجع 6. }
        إذا (رمز_عند(هروب, 0) لا يطابق 10 أو رمز_عند(هروب, 1) لا يطابق 9 أو رمز_عند(هروب, 2) لا يطابق 13) { أرجع 7. }
        إذا (رمز_عند(هروب, 3) لا يطابق 0 أو محرف_عند(هروب, 4) لا يطابق "م") { أرجع 8. }
        إذا (محرف_عند(هروب, 5) لا يطابق "\"" أو محرف_عند(هروب, 6) لا يطابق "\\") { أرجع 9. }
        دع الرسالة = المتن + "!".
        اطبع(الرسالة).
        أرجع 0.
    }
    
    Download نصوص.لبات

    Expected outcomes
    {
      "browser": {
        "check": "success",
        "class": "success",
        "output": "aمرحبا😀!",
        "processStatus": 0
      },
      "native": {
        "check": 0,
        "status": 0,
        "output": "aمرحبا😀!"
      }
    }

    English source

    This supplied complete source opens a new draft. Prepare the declared inputs/files in that draft, then select Run explicitly.

    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 {
        let text = "aمرحبا😀";
        if (length(text) not match 7) { return 1; }
        if (char_at(text, 1) not match "م") { return 2; }
        if (codepoint_at(text, 1) not match 1605) { return 3; }
        if (from_codepoint(65) not match "A") { return 4; }
        if (slice(text, 1, 3) not match "مر") { return 5; }
        let escapes = "\n\t\r\0\u{0645}\"\\";
        if (length(escapes) not match 7) { return 6; }
        if (codepoint_at(escapes, 0) not match 10 or codepoint_at(escapes, 1) not match 9 or codepoint_at(escapes, 2) not match 13) { return 7; }
        if (codepoint_at(escapes, 3) not match 0 or char_at(escapes, 4) not match "م") { return 8; }
        if (char_at(escapes, 5) not match "\"" or char_at(escapes, 6) not match "\\") { return 9; }
        let message = text + "!";
        print(message);
        return 0;
    }
    
    Download strings.aspl

    Expected outcomes
    {
      "browser": {
        "check": "success",
        "class": "success",
        "output": "aمرحبا😀!",
        "processStatus": 0
      },
      "native": {
        "check": 0,
        "status": 0,
        "output": "aمرحبا😀!"
      }
    }

    Mixed source

    This supplied complete source opens a new draft. Prepare the declared inputs/files in that draft, then select Run explicitly.

    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 {
        دع المتن = "aمرحبا😀";
        if (طول(المتن) not match 7) { return 1; }
        إذا (char_at(المتن, 1) not match "م") { أرجع 2. }
        let رمز = رمز_عند(المتن, 1);
        if (رمز not match 1605) { return 3; }
        دع حرف = from_codepoint(65).
        إذا (حرف not match "A") { أرجع 4. }
        let مقطع = اقتطع(المتن, 1, 3);
        if (مقطع not match "مر") { return 5; }
        دع الرسالة = المتن + "!";
        اطبع(الرسالة).
        أرجع 0.
    }
    
    Download strings.mixed.aspl

    Expected outcomes
    {
      "browser": {
        "check": "success",
        "class": "success",
        "output": "aمرحبا😀!",
        "processStatus": 0
      },
      "native": {
        "check": 0,
        "status": 0,
        "output": "aمرحبا😀!"
      }
    }

    Check the result

    The source cards show the catalog's exact inputs and outcomes. Locale changes do not translate the supplied source. Download retains original source bytes.

    Browse pages