0

How to write a++ in the new version of swift ??

I want to write a++ in my code but the new version doesn't let me do it how do I write a ++ in the new version

8th Jan 2017, 5:58 AM
gauresh
1 Answer
+ 1
Yes i found this also. In swift 3 they have removed the ++ and changed it to the below a++ is now == a += 1 The + 1 and sum it to a Therefore the below works out as: var a = 1 a += 1 a += 1 print(a) // prints 3 (assuming you use this in an existing function etc.)
10th Jan 2017, 1:55 PM
Paul Bartholomew