- Debugger: Odds and Ends
- Package Management: Getting Cross
- Package Management: New Contract Starts
- Package Management: Building Things (Part 2)
- Research into crowdfunding
- Bitcoin now accepted!
- Flattery will get you everything.
- Raising funds for Haiku through Goodsearch
- Debugger: Overview of New Features
- ASLR and DEP implemented
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?