Skip to main content

Running Your First Program

If you have already installed Wave following the previous installation guide, it's time to run your first program!

Creating the hello.wave File

First, create a new file named hello.wave.

Writing the Code

Open the hello.wave file and write the following code:

fun main() {
println("Hello Wave");
}

Here, fun main() represents the entry point of the program, and the println function prints text to the screen.

Running the Program

Now, let's run the Wave program. Open your terminal and enter the following command:

wave run hello.wave

Checking the Output

When you execute the program, you should see the following output:

Hello Wave

Now you have confirmed that Wave is installed and working correctly. Congratulations! You have successfully run your first program.