Hello World!

March 20, 2022 ยท View on GitHub

Let's take a look at our first Virgil program! As we'll see in later sections, here we simply define a main method and make one call to a builtin function to print to the console.

def main() {
    System.puts("Hello World!\n");
}

If you've followed the instructions to download and run programs, you should be able to simply run it:

% virgil HelloWorld.v3
Hello World!