Reputation: 1317
I am getting an error on syntax var a = b = c = 7
being one RHS value for many LHS just like in C:
int a,b,c ;
a = b = c = 7 ;
so on Nim lang:
Error: invalid indentation
How can I fix this?
Upvotes: 2
Views: 153
Reputation: 381
xbello answered the question, but if we want to be similar at the C code, we should also answer how to do multiple affectations after declaration :
var a,b,c
(a,b,c) = (7,7,7)
Upvotes: 1