Expected expression after operation


#1

I feel as if I typed in the code verbatim from the book and I keep getting this error. Can anyone identify why?


#2

There is a syntax error on line 27.

var currentQuestionIndex : Int = 0
...

The ellipsis, three dots, after the var declaration is upsetting the compiler.

After the var declaration, the compiler is trying to parse the following phrase (a range expression):

...UpperBound

But the UpperBound is missing, causing the error message you are getting.

To my surprise, although syntactically mis-formed, the following code still compiles without any errors!

var foo : Int = 5

...7

func fooBar() {
}

#3

Thanks. I guess I was typing in the code a little to literal.