- Debugger: Getting mixed signals
- 'Packaging Infrastructure' Contract Weekly Report #4
- Haiku monthly activity report - 06/2015
- 'Packaging Infrastructure' Contract Weekly Report #3
- 'Packaging Infrastructure' Contract Weekly Report #2
- GCI 2014 winners trip report (mentor side)
- TeX Live and LyX; Changes to the boot code
- 'Packaging Infrastructure' Contract Weekly Report #1
- Beginning of 'Packaging Infrastructure' Contract
- Haiku monthly activity report - 05/2015
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?