Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help

 
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: 986
Eclipse IDE Firefox Browser Tomcat Server
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic