Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *This is part of a series of posts about the Genie programming language. I am updating my progress in learning the language from scratch in the hopes it will be useful for anyone also trying to get to programming in the linux/Gtk world. This is an extremely basic overview of how loops look like in Genie. If you have any experience with other languages, there will be nothing new to you.*
- Here is a for loop that will print a series of numbers and report that it is finished:
- ```
- [indent=4]
- init
- for var I = 1 to 10
- print I.to_string()
- print("All done!")
- ```
- Now a simple while loop to achieve the same goal as the previous example:
- ```
- [indent=4]
- init
- var loop = 1
- while loop <= 10
- print loop.to_string()
- loop = loop + 1
- ```
- That's it.
Add Comment
Please, Sign In to add comment