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.

    Exact numeric types

    ASPL 0.7.0 · Current release

    Complete source and a checked ASPL 0.7.0 outcome.

    On this page

    Purpose and outcome

    Use all ten types, the full u64 maximum, f32 rounding, and numeric formatting. It prints numeric types\n and returns 0.

    See Exact numeric family.

    Arabic source

    This is a supplied complete source. Opening creates a new draft; Run requires an explicit action.

    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 = 18446744073709551615.
        دع مباشر: ع32 = 1.0000000596046448.
        دع بتات: ط8 = 0سحح.
        دع محول: ط8 = ط8(255).
        إذا (نسق_ط64(الحد) لا يطابق "18446744073709551615") { أرجع 1. }
        إذا (نسق_ع32(مباشر) لا يطابق "1.00000012") { أرجع 2. }
        إذا ((بتات & 0س0ح) لا يطابق 15 أو (بتات >> 4) لا يطابق 15 أو محول لا يطابق 255) { أرجع 3. }
        متغير بايتات: قائمة<ط8> = [0, 255].
        متغير نسخة: قائمة<ط8> = بايتات.
        نسخة[0] = بتات << 0.
        إذا (بايتات[0] لا يطابق 0 أو نسخة[0] لا يطابق 255) { أرجع 4. }
        اطبع("numeric types\س").
        أرجع 0.
    }
    
    Download أنواع-الأعداد.لبات

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

    English source

    This is a supplied complete source. Opening creates a new draft; Run requires an explicit action.

    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 maximum: u64 = 18446744073709551615;
        let direct: f32 = 1.0000000596046448;
        let bits: u8 = 0xff;
        let converted: u8 = u8(255);
        if (format_u64(maximum) not match "18446744073709551615") { return 1; }
        if (format_f32(direct) not match "1.00000012") { return 2; }
        if ((bits & 0x0f) not match 15 or (bits >> 4) not match 15 or converted not match 255) { return 3; }
        var bytes: list<u8> = [0, 255];
        var copy: list<u8> = bytes;
        copy[0] = bits << 0;
        if (bytes[0] not match 0 or copy[0] not match 255) { return 4; }
        print("numeric types\n");
        return 0;
    }
    
    Download numeric-types.aspl

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

    Mixed source

    This is a supplied complete source. Opening creates a new draft; Run requires an explicit action.

    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 ابدأ_الرئيسية() -> i64 {
        دع maximum: u64 = 18446744073709551615.
        let direct: ع32 = 1.0000000596046448;
        let latin: ط8 = 0xff;
        دع عربي: u8 = 0سحح.
        let binary_latin: u8 = 0b0011;
        دع binary_arabic: ط8 = 0ث0011.
        let converted: u8 = ط8(255);
        if (نسق_ط64(maximum) not match "18446744073709551615") { return 1. }
        إذا (format_f32(direct) not match "1.00000012") { أرجع 2; }
        if ((latin & 0x0f) not match 15 or (عربي >> 4) not match 15) { return 3. }
        إذا ((binary_latin | binary_arabic) not match 3 أو converted not match 255) { أرجع 4; }
        var bytes: قائمة<u8> = [0, latin];
        متغير copy: list<ط8> = bytes.
        copy[0] = عربي.
        if (bytes[0] not match 0 or copy[0] not match 255) { return 5. }
        print("numeric types\n");
        return 0.
    }
    
    Download numeric-types.mixed.aspl

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

    Check the result

    The source card shows hosts, input, and expected outcomes from the canonical catalog. Reading language changes neither source nor result.

    Historical normative scope

    Browse pages