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.

    Greeting with line input

    ASPL 0.7.0 · Current release

    Complete source and a checked ASPL 0.7.0 outcome.

    On this page

    Purpose and outcome

    Print a prompt, read a name, then print a greeting and return 0. Send the declared input line for the chosen variant. EOF before the line traps with input-exhausted and retains the printed prompt.

    See Line input.

    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 lines: ["ليلى"]

    دالة ابدأ_الرئيسية() -> ص64 {
        اطبع("ما اسمك؟ ").
        دع الاسم = اقرأ_سطر().
        اطبع("مرحبا ").
        اطبع(الاسم).
        اطبع("\س").
        أرجع 0.
    }
    
    Download إدخال.لبات

    Expected outcomes
    {
      "browser": {
        "check": "success",
        "class": "success",
        "output": "ما اسمك؟ مرحبا ليلى\n",
        "processStatus": 0
      },
      "native": {
        "check": 0,
        "status": 0,
        "output": "ما اسمك؟ مرحبا ليلى\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 lines: ["Mina"]

    fn start_main() -> i64 {
        print("ما اسمك؟ ");
        let name = read_line();
        print("مرحبا ");
        print(name);
        print("\n");
        return 0;
    }
    
    Download input.aspl

    Expected outcomes
    {
      "browser": {
        "check": "success",
        "class": "success",
        "output": "ما اسمك؟ مرحبا Mina\n",
        "processStatus": 0
      },
      "native": {
        "check": 0,
        "status": 0,
        "output": "ما اسمك؟ مرحبا Mina\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 lines: ["١٢٣","١٢٣"]

    fn مرر(value: string) -> string {
        return value;
    }
    
    fn start_main() -> i64 {
        print("first: ");
        var first = اقرأ_سطر();
        let kept = first.
        let returned = مرر(first).
        اطبع("second: ").
        let second = read_line().
        first = second.
        إذا returned matches kept {
            print("equal: ");
            print(returned).
            اطبع(" / ").
            print(kept).
            اطبع("\n").
            return 0.
        }
        أرجع 1.
    }
    
    Download input.mixed.aspl

    Expected outcomes
    {
      "browser": {
        "check": "success",
        "class": "success",
        "output": "first: second: equal: ١٢٣ / ١٢٣\n",
        "processStatus": 0
      },
      "native": {
        "check": 0,
        "status": 0,
        "output": "first: second: equal: ١٢٣ / ١٢٣\n"
      }
    }

    Check the result

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

    Browse pages