Running Your First Program
If you’ve already installed Wave following the previous installation guide, let’s now run your very first program!
Creating the hello.wave
File
First, create a new file named hello.wave
.
Writing the Code
Write the following code inside the hello.wave
file:
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:
wavec run hello.wave
Checking the Output
When you run the program, you should see the following output:
Hello Wave
Now you can confirm that Wave is properly installed and working. Congratulations! You’ve successfully run your first program.