Ryan Bowen 2011. Powered by Blogger.
RSS

I Make A Foolish Mistake, As Usual

For those of you who understand programming, take a look at this code and have a good laugh at me:



For those who don't understand where I went wrong, here's what I stupidly did:

I set it so that if the user entered something that wasn't a digit, it would ask them to type a new value.

Alas I thought I was being clever by using "confirmed--" which tells the code to reduce the value of confirmed by one. What I didn't consider what that, if the user did it wrong more than once, the value of confirmed would plummet into negative numbers and the loop would last forever. Even if the user did enter a correct digit!

I'm working on fixing it now, I haven't had much time to work this week but I intend on catching up!

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 comments:

Post a Comment

Total Pageviews