View Single Post
  #1   Spotlight this post!  
Unread 11-02-2006, 09:00 AM
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: !HELP! IM STUCK IN A SUBROUTINE!!! !HELP!

printf is your best debug friend

computers have a nasty habit of doing exactly what you tell them to do

instead of what you want them to do

whenever a program is not doing what you expected, printf the variables to see whats going on inside the SW

in fact, you should get in the habit of checking SW modules this way, to make sure it is doing exactly what you thought it would do (module level testing). Then if its working correctly take the debug (printf...) statements out, or have a debug variable that you set to 0 to disable them.