Falcon Syntax Examples
Below are basic examples of Falcon syntax implemented by the compiler:
Variable Declaration & Print
let myVar = 10
const PI = 3.14159
print("Value is: ${myVar}")
Function and Input
str getName() {
input(str username, "Enter your name: ")
return username
}
void main() {
let name = getName()
print("Hello, ${name}!")
}
File Inclusion
// Recursive inclusion handled by Pass 1
incl = "header.fl"
// Blind paste inclusion handled by Pass 2
include = "constants.header"