Basic Program (Hello World) in Cylvre

Learn the minimum to write programs in Cylvre

Quick Recap

Welcome to the first real page of this guide! If you made it this far, you have got Cylvre's compiler up and running and know how to compile and execute Cylvre programs. (If you don't, revisit the previous page and find out)

From here on out, we will learn about the syntax of Cylvre and what makes it simple, concise and easy to learn. We will also look at some features in-depth so that you can understand how to use Cylvre in the most effective way possible!

Hello World

The hello world program is credited to be the most simple task accomplished by any language. Here is the hello world program in Cylvre.

func main(){
    println("Hello, World!");
}

This is the most basic program in Cylvre, the most simple to understand too. There is no need of explaining. The main function is called with the single statement println(), which prints "Hello, World!" to the console. You'll also notice that the print statement is identical to the one at Kotlin (other than the semicolon). We will see in-depth on the different print statements next.

Save this file as HelloWorld.cylv compile and execute it (if you don't know, go to the previous page to find out.) and you will see the required output in the console.

Congratulations! You have created, saved, compiled and executed your first Cylvre program successfully! Go ahead to learn more!

Don't forget to indent your code!

Last updated