very simple swift question
very simple swift question
- Subject: very simple swift question
- From: email@hidden
- Date: Tue, 24 Feb 2015 13:34:38 -0800
I'm just starting Swift, and using a book (Swift for Programmers) that
has this example code in it:
let number1 = 45
let number2 = 72
let sum = number1 + number2
...
But this gives me an error on the third line, saying "Consecutive
statements on a line must be separated by a ';'."
I know I could use a var instead of a constant, initialize it to number1
and then add number2 separately, but shouldn't the above code be legal?
Is this something that changed in Swift since that book came out? (I am
using the new beta build of Xcode 6.3, which I think has an updated
Swift version.)
Thanks,
Howard
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden