In this project, we will create our first project, the Print Project!
Let's define our project, maybe we want an "About Me" profile that displays in our terminal. We want to decorate it nicely with separators and various emojis.
To get started, we need to modify our bark code. Change it to something like "About Me":
bark("About Me");
Make sure to add a semicolon after each line!
We can style it nicely with characters and emojis:
bark("**** About Me 😎 *****");
But how can we print multiple lines of text to the terminal? To do that, just duplicate the bark code!
bark("**** About Me 😎 *****");
bark("**** About Me 😎 *****");
Let's change the second line to a separator with dashes:
bark("**** About Me 😎 *****");
bark("----------------------");
As you can already start to understand, our program will consist of multiple bark functions repeated. Go ahead, this is your chance to get creative!
bark("**** About Me 😎 *****");
bark("----------------------");
bark("I am 24 years old");
bark("I like programming");
bark("I like nature");
bark("I have a pet dog too!");
To run this program, again use:
glang main.glang
The end "main.glang" file should look something like this:
func main() {
bark("**** About Me 😎 *****");
bark("----------------------");
bark("I am 24 years old");
bark("I like programming");
bark("I like nature");
bark("I have a pet dog too!");
}
main();
Congratulations, your first GLang project is complete! Up and onwards!