• Post Reply Bookmark Topic Watch Topic
  • New Topic

help  RSS feed

 
Jade Davidson
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I must be overlooking something obvious, but I don't know why I am getting "else without if" compiler errors.


(edited by Cindy to format code)
[This message has been edited by Cindy Glass (edited December 14, 2001).]
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ack!
Go to the effort of including brackets even for single line statements, you'll save on so much stress in the long run.
Bit hard to see your layout since you didn't use the UBB [ code] tags, but I recommend lining up the start and end braces.

Dave.
 
William Barnes
Ranch Hand
Posts: 1049
2
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First problem:

Second problem:

If you wrote this with 1] an editor that indented automatically, or 2] used {} correctly you would see the problem
 
Jade Davidson
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, I see it now. thanks.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!