mirror of
https://github.com/Dummi26/mers.git
synced 2025-03-10 14:13:52 +01:00

left side of assignments can now be various different things instead of just variables. any statement that returns a reference can be used to assign to the value behind that reference. variables are automatically referenced, so the '&' can be omitted. if the variable contains a reference and that reference should be used, dereference it with *varname instead of just varname.
12 lines
214 B
Plaintext
12 lines
214 B
Plaintext
a = (max int) {
|
|
println("Max: " + max.to_string())
|
|
for i max {
|
|
println(i.to_string())
|
|
}
|
|
}
|
|
a.debug()
|
|
// why does this work
|
|
a.thread(10).await()
|
|
// and this just blocks and does nothing
|
|
a.run(10)
|