Skip to content
Xen / docs

Search documentation

English · v0.1.0-demo.2

Type to search the documentation.

    한국어
    Xen / coding-class v0.1.0-demo.2

    Your first program · Coding Class

    Apply the chapter in three steps: an exercise, a program project, and a debugging task. Implement first, then consult the hints and completion criteria. Use a separate file or working directory for each task.

    Write welcome.xen to print Hello, Xen! and My first program on separate lines in that order.

    Completion: Output is exactly two lines without quotation marks.

    Hint: Use two println calls inside main.

    Check the first exercise, build it with xen build welcome.xen -o welcome, and run ./welcome.

    Completion: xen run and ./welcome print the same output; checking alone does not print the greeting.

    Hint: check validates, run executes, and build creates an executable.

    Your source is in practice/, but you run xen run welcome.xen from its parent. Fix the invocation in two ways without duplicating the source.

    Completion: Changing directory and specifying practice/welcome.xen both print the same two lines.

    Hint: Check both the source argument and the shell’s working directory.

    Use xen check file.xen followed by xen run file.xen for ordinary programs; use xen test file.xen for test-only files. Record the original error, its cause, and the corrected result, then rerun every input in the completion criteria.