In this tutorial, we'll cover the basic syntax of Cyrus Lang to get you started with writing your first programs.
Let's start with the classic "Hello, World!" program:
func main() {
println("Hello, World!")
}
This simple program demonstrates a few key elements of Cyrus Lang syntax:
func
keyword.main()
function is the entry point of the program.
are used to define code blocks.println()
is a built-in function for printing to the console.Cyrus Lang uses type inference to determine variable types. Here's how you declare variables:
let name = "Alice"
let age = 30
let pi = 3.14159
In the next section, we'll dive deeper into variables and types in Cyrus Lang.