Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

; expected

 
andrew cassato
Ranch Hand
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am working on Selection Sort and I have a method which is returning the error "; expected" when the ; is there so I am not sure what I am doing wrong but creating this fraction is not working...


the error is on line 4 and 5, same problem.

thanks in advance
 
Mohamed Sanaulla
Saloon Keeper
Pie
Posts: 3159
33
Google App Engine Java Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have a comma(,) at the end of line 3. Is it a typo? It would be better if you can provide the complete code.
 
Henry Wong
author
Marshal
Pie
Posts: 20836
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
andrew cassato wrote:
the error is on line 4 and 5, same problem.


Yea, sometimes these types of errors are caused by errors from previous lines. If the lines look okay, it's recommended to look a few lines back.

Henry
 
andrew cassato
Ranch Hand
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mohamed Sanaulla wrote:You have a comma(,) at the end of line 3. Is it a typo? It would be better if you can provide the complete code.


do'h. yea i took a variable out and forgot to remove the comma... weird that the error happens later.
thanks for your help
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64192
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
andrew cassato wrote:weird that the error happens later.

Not at all. The line ending with the comma is perfectly valid -- it could be continued with more comma-separated declarations on the next line. It's not until after that line that parser can possibly detect that something's gone awry.
 
andrew cassato
Ranch Hand
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for clearing that up
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic