for in syntax
This commit is contained in:
@@ -2,9 +2,19 @@ module "main"
|
||||
|
||||
extern "puts" func puts(text: cstring)
|
||||
|
||||
struct Test
|
||||
{
|
||||
data: [23]cstring
|
||||
}
|
||||
|
||||
extern "main" func main(argc: i64, argv: [?]cstring): i64
|
||||
{
|
||||
defer puts("Bye cruel world!")
|
||||
puts("Hello world!")
|
||||
let names = struct Test {}
|
||||
|
||||
for name, i in names.data
|
||||
{
|
||||
puts(name)
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
Reference in New Issue
Block a user