virgil

Hello World!

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!