This repository has been archived on 2025-10-23. You can view files and clone it, but cannot push or open issues or pull requests.
Files
nub-lang-archive/example/src/main.nub
nub31 7c08297946 ...
2025-07-03 18:29:33 +02:00

30 lines
352 B
Plaintext

namespace main
struct Name {
first: cstring
last: cstring
}
struct Human
{
name: Name
age: i64
}
export func main(args: []cstring): i64
{
let x: Human
x = alloc Human {
name = alloc Name {
first = "john"
last = "doe"
}
age = 23
}
c::puts(x.name.last)
return 0
}