I ave ah questions it is just a question, so dont penalized me okay
question 1: how do you spot logic errors
question 2: how do you fix it
question 3: what can be done to try to prevent it, is there a way
divinity02
6
Posting Whiz in Training
Recommended Answers
Jump to Post1: You get an exception (null pointer, zero divide etc)
or
the program behaves in a way didnlt expect (wrong output etc)2: Trace the execution one step at a time, using a debugger or lots of print statements until you find where its going wrong
3: Design top-down - …
Jump to Post... not to mention unit testing.
Jump to Post2: Trace the execution one step at a time, using a debugger or lots of print statements until you find where its going wrong
(sounds like there are logical expressions in if tests or loops that are not evaluating to the result you expect - so print them and all …
All 11 Replies
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
LaxLoafer
71
Posting Whiz in Training
divinity02
6
Posting Whiz in Training
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
joeharv
0
Newbie Poster
divinity02
6
Posting Whiz in Training
DenisOxon
12
Posting Whiz
divinity02
6
Posting Whiz in Training
divinity02
6
Posting Whiz in Training
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
ddanbe
2,724
Professional Procrastinator
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.