- Bits and Pieces: The Small BCardLayout
- Lesson 22: A First (Bigger) Project
- API Design is Hard, Finding Bugs (Can be Made) Easy!
- The Haiku Tutorial is Here!
- From Bugs back to Wireless and Friends
- Greetings (mostly) from the Kernel (Debugging Land)
- 2011 Google Code-In Contest, Haiku Selected as One of Eighteen Participating Organzations
- Virtualize a Physical Haiku Partition With Virtualbox
- BeGeistert 024 + Coding sprint report
- 2011 Google Summer of Code Mentor Summit
Lesson 6: More Loops and Conditions
Here marks the beginning of the second unit in my series, "Learning to Program With Haiku." Lesson #6 expands on our knowledge of loops and decision-making constructs. Good luck! Learning to Program With Haiku, Lesson 6.
- darkwyrm's blog
- Login or register to post comments







Comments
Re: Lesson 6: More Loops and Conditions
Nice lesson, DarkWyrm.
WRT the switch-case-thingy: So, the "break;" in a default switch-case is actually optional. Should one put it in there or not? On the one hand it signals that it will definitely break out at this place, on the other hand this could tempt you to simply remove it, erroneously thinking this would then execute the following code...
Two tiny typos on page 5:
Regards,
Humdinger
Re: Lesson 6: More Loops and Conditions
Nice lesson, DarkWyrm.
WRT the switch-case-thingy: So, the "break;" in a default switch-case is actually optional. Should one put it in there or not? On the one hand it signals that it will definitely break out at this place, on the other hand this could tempt you to simply remove it, erroneously thinking this would then execute the following code...
Thanks! Technically, a break statement in the default case is optional, though many put it in there out of habit.
Two tiny typos on page 5:
Regards,
Humdinger
The first one has been corrected. Thanks for pointing it out. :) The second one isn't a typo -- some people here in the US really do talk like that, even if it's not grammatically correct. ;)