Skip to content

Hello World Tutorial

Let’s write and compile the classic Hello World example.

Create a file named hello.xs with the following content:

// hello.xs
Print("Hello, CrossBasic!")

Compile it:

xcompile hello.exe hello.xs

Run the generated executable:

# Linux/macOS
./hello

# Windows
hello.exe

You should see:

Hello, CrossBasic!

Congratulations—you’ve run your first CrossBasic program!