Tuple unpacking outside of var/let block #2421
At the moment, I have write code like this
temp2 = HADec2AzAlt(HArad, Delta, latitude)
Azimuth = temp2[1]
Altitude = temp2[2]
return( [Azimuth/unitdegree, Altitude/unitdegree] )
I would rather be writing something like this
(Azimuth, Altitude) = HADec2AzAlt(HArad, Delta, latitude)
return( [Azimuth/unitdegree, Altitude/unitdegree] )
Please finish up the Tuple unpacking before releasing nim 1.0
This should work, or maybe it isn't enough for your case?:
proc testTuple: (int, bool) = (666, true)
let (a, b) = testTuple()