This repository has been archived on 2025-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
Files
nub-lang-archive-2/example/main.nub
nub31 00a249f84d ...
2025-06-02 15:52:06 +02:00

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)
}