Your SlideShare is downloading. ×
Syntax errors
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Syntax errors

221
views

Published on


0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
221
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. SYNTAX ERRORS DUH!
  • 2. We Can Make Mistakes in Code TooSub Main() Dim stopProgram As String I though I stopProgram = "no" dun did this While stopProgram = "no" ok . . . Console.WriteLine("HA HA!") Console.WriteLine("HA HA!") Console.WriteLine("HA HA!") Console.WriteLine("Do you want to stop?") stopProgram = Console.ReadLine() Console.WriteLine("GOODBYE!") Console.ReadLine() End SubEnd Module
  • 3. We Can Make Mistakes in Code TooSub Main() Dim stopProgram As String stopProgram = "no" That’s better! While stopProgram = "no" Console.WriteLine("HA HA!") Console.WriteLine("HA HA!") Console.WriteLine("HA HA!") Console.WriteLine("Do you want to stop?") stopProgram = Console.ReadLine() End While Console.WriteLine("GOODBYE!") Console.ReadLine() End SubEnd Module
  • 4. Visual Studio Will Tell You When You’ve Made a Mistake
  • 5. Visual Studio Will Tell You When You’ve Made a MistakeVisual Studio has found that the While state has not been closed with an End While
  • 6. Visual Studio Will Tell You When You’ve Made a MistakeVisual Studio will tell you where the error can be found.The line thecode can be found Be careful! You may have to dig around the code to see EXACTLY where the problem comes from
  • 7. Visual Studio Will Tell You When You’ve Made a Mistake This is Line 8 . . . . . . But this is where the code is missing
  • 8. Visual Studio Will Tell You When You’ve Made a Mistake You don’t to count the lines yourself Visual Studio has a line counter
  • 9. We call this type error a . . . SYNTAX ERROR
  • 10. Syntax Error Definition:In computer science a syntaxerror refers to an error in the syntax of a sequence of characters or tokens that is intended to be written in a particular programming language.
  • 11. Syntax Error Definition: IF . .•YOU’VE MISSED SOMETHING OUT•YOU’VE TYPED SOMETHINGWRONG•YOU’VE WRITTEN SOMETHING INTHE WRONG ORDER YOU HAVE JUST MADE A SYNTAX ERROR!

×