Re: very simple swift question
Re: very simple swift question
- Subject: Re: very simple swift question
- From: email@hidden
- Date: Tue, 24 Feb 2015 13:55:18 -0800
Never mind. It was a typo: I had "number 1" instead of "number1" in that
third statement.
I probably shouldn't try to learn a new language when home sick, huh?
:-)
Thanks,
Howard
On 02/24/2015 13:34, email@hidden wrote:
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
_______________________________________________
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