29 lines
514 B
Plaintext
29 lines
514 B
Plaintext
namespace main
|
|
|
|
struct Human {
|
|
name: string
|
|
age: i64
|
|
}
|
|
|
|
export func main(args: []^string) {
|
|
// c::printf("%d\n", args.count)
|
|
|
|
// let i: i64
|
|
|
|
// while i < args.count {
|
|
// c::printf("%s\n", args[i])
|
|
// i = i + 1
|
|
// }
|
|
|
|
let human = alloc Human {
|
|
age = 23
|
|
name = "oliver"
|
|
}
|
|
|
|
c::printf("%s is %d years old\n", human.name, human.age)
|
|
|
|
// human.name = "hubert"
|
|
// human.age = 92
|
|
|
|
c::printf("%s is %d years old\n", human.name, human.age)
|
|
} |