language.sic (803B)
int ~age = 25
dec height = 87.5
str name = "George"
// some comment here
// another one here
int main {
str name = arg[0]
print(name)
return 0
}
// definition of human struct
def Human {
str name
dec height
int age
}
opt<Human> test = none
opt<Human> jockey = get_jockey()
match jockey {
some(x) => print(x.name);
none => print("no jockey");
}
for int i in [0:100] {
}
some<T> my_func() {
some
}
str[] names = ["James", "Jake", "Janice"]
for (str n in names) {
print(n)
}
for names as n {
print(n)
}
bool adult = age > 18
return "Henry" if adult is Human else "Dog" if adult is Dog else "Animal"
if adult is Human {
return "Henry"
} else {
return "Dog"
}
return adult is Human ? "Henry" : "Dog"
float x = 12.5
int y = 12
if cast(int, x) == y {
print("yay")
}