These are some basic lines of code in Cilia:
- Types
Int,Int32,Int64,Float
- Variables
Int x = 42var x = 42const x = 42String[] wordsSet<String> namesContactInfo[String] contactInfoForID
- Functions
func multiply(Int a, b) -> Int { return a * b }func print(ContactInfo a) { ... }func concat(String a, b) -> String { return ... }
- Loops
for i in 1..10 { ... }for i in 0..<words.size() { ... }for i in [5, 7, 11, 13] { ... }for word in words { ... }