This commit is contained in:
nub31
2025-06-02 18:19:48 +02:00
parent a4bda0b715
commit 81fe75446d
2 changed files with 48 additions and 48 deletions

View File

@@ -1,38 +1,13 @@
namespace main
struct Ape {
name: string
age: i64
}
struct Human {
parent: Ape
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 {
parent = alloc Ape {
name = "john"
age = 24
}
age = 23
name = "oliver"
}
c::printf("%s is %d years old\n", human.name, human.age)
c::printf("parent name is %s\n", human.parent.name)
// human.name = "hubert"
// human.age = 92
}