use core {*}
main :: () {
println(fib(10));
}
fib :: (seqlen: u32) -> [..]u32 {
seq: [..]u32;
temp: u32;
// -a- this works
// a, b: u32;
// a, b = 0, 1;
//
// -b- this also works
// a, b := 0, 1;
//
// -c- this yields compile error
a, b :u32 = 0, 1;
while seq.length < seqlen {
array.push(&seq,a);
temp = a;
a = b;
b = a+b;
}
return seq;
}
The error yielded is:
expected token ';', got '='.
18 | a, b :u32 = 0, 1;
^
Consider the following code:
The error yielded is: