How make a variable to be constant on runtime if cannot have had initializing value unless later on in another scope block? e.g.
illustration is
u : int
# ...
let n= # can't afford RHS due to obeying next condition but n must be safe...
#...
if u > 7: # as runtime constant
n=3
else
n=1
var h = n * 70
You can do it like this
let n = if u > 7:
3
else:
1
So sorry, I recklessly post without trying out
works great then, thanks!
I find it considerably more readable and less error prone to do
let n =
if u > 7:
3
else:
1