What is wrong with the following?

 

x <- 1:2

if(x[1] > 0)

{

                if(x[2] > 0)

                {

                                print("1 & 2 > 0")

                }

                else

                {

                                print("1 > 0")

                }

}

else

{

                if(x[2] > 0)

                {

                                print("2 > 0")

                }

                else

                {

                                print("NONE > 0")

                }

}

 

Gives me

 

Error: unexpected 'else' in "else"

 

What am I missing?

 

Kevin


	[[alternative HTML version deleted]]

