Hello World
Edit on GitHubWriting Your First Grain Program
It’s time to write your first Grain program! While simple, this program should verify that we have everything set up correctly.
The File Extension
All Grain files end with the extension .gr
. Let’s create our first file and call it hello.gr
.
The Code
The code for this program is fairly straightforward and should feel familiar from other languages.
Running the Program
To run the program, we use the Grain CLI:
If everything is set up properly, we should see the message appear in the console.