if (x = 1)
if var x = 1
if let x = 1 //let is const in C
var x = 1
var x: Int = 1
In swift you can doCode: [Select]if var x = 1I guess declaring a variable in the condition would be an automatic true?
if( int x = 1 )
Oh btw, the datatype on variables are assumed
Code: [Select]if( int x = 1 )Dunno about swift, however, C++ will return false if 0 was assigned.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16