V Forum

[ log in ]

iif tenary operator

zuwa 2019-07-04 23:27
Any plans on implementing this? It would be a nice to have...one of the things I miss in Go. Thanks.
medvednikov 2019-07-06 01:45
If you mean

a := true ? 1 : 0

you can do

a := if true { 1 } else { 0 }
zuwa 2019-07-06 14:00
👍👍 Thanks



Powered by Vorum, open-source blogging/forum software written in V