- 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 4: If, For, And, Not, Or
Hey, that rhymes even! :P Lesson 4 is now out. Decision-making and repeating instructions are on the agenda for this one, expanding the repetoire of basic skills for writing code. Learning to Program With Haiku, Lesson 4.
- darkwyrm's blog
- Login or register to post comments







Comments
Re: Lesson 4: If, For, And, Not, Or
Thank's darkwyrm!!!
Re: Lesson 4: If, For, And, Not, Or
Thank you very much for taking the time to write these lessons, darkwyrm. These are worth their bytes in gold.
Re: Lesson 4: If, For, And, Not, Or
If variables can be declared using the equals operator, why is 'int' used?
Thanks.
Re: Lesson 4: If, For, And, Not, Or
If variables can be declared using the equals operator, why is 'int' used?
Variables can't be declared using the equals operator. At least they can't in C/C++. You've misunderstood something I guess.
Example:
Re: Lesson 4: If, For, And, Not, Or
But, they can be changed with just an equals, right?
Sorry, this is quite different from the only language that I know, BBC BASIC (excluding assembly).
Re: Lesson 4: If, For, And, Not, Or
That is correct. :)
Re: Lesson 4: If, For, And, Not, Or
Small typo in the Boolean examples;
For the Boolean Value of NOT, the example says
if ( !(a == 1 || b == 2) )and it says that means "if the opposite of a equaling 1 and b equaling 2", but it should say "if the opposite of a equaling 1 OR b equaling 2".It would need to say
if ( !(a == 1 && b == 2) )for it to be "if the opposite of a equaling 1 and b equaling 2".Correct?