JSDesign - ANNOUNCEMENTS No posting of code in the forum...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
ANNOUNCEMENTS No posting of code in the forum Check class announcements daily 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 INFINITE LOOPS An infinite loop occurs when the expression controlling the loop never becomes false Example1 var x = 30; while(x > 0) { document.writeln(“<li>Element</li>”); } Example2 var x = 7; // how about x = 8 while (x != 0) { document.writeln(“<li>Element</li>”); x = x – 2; } How can we detect infinite loops?
Background image of page 2
3 PROGRAMMING ERRORS Syntax Error: (Compile-time error) The program violates the language’s grammar Semantic Error: The program fails to accomplish what we want Debugging: The process of finding and fixing errors. Extremely hard for large software systems. Tools for debugging: Trace tables Output statements Debuggers Analogy: Taco tom ate. Syntactically therefore semantically incorrect. A taco ate tom. Syntactically correct however semantically incorrect. Tom ate a taco Syntactically and semantically correct (what we want!)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 HOW TO FIND PROBLEMS IN YOUR CODE The process of finding problems in computer code is called debugging Why the word debugging? See first computer bug at: http://www.jamesshuggins.com/h/tek1/first_computer_bug_large.htm Computer programming is NOT
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/12/2012 for the course CMSC 122 taught by Professor Staff during the Fall '08 term at Maryland.

Page1 / 14

JSDesign - ANNOUNCEMENTS No posting of code in the forum...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online