Flow Control

  • Boolean logic
  • if
  • cond

Making Decisions

Flow control is the programming term for deciding how to act to a given circumstance. We make decisions like this all the time.

If it's a nice day out, then we should visit the park; otherwise we should stay inside and play board games.

If your car's tank is nearly empty, then you should visit a gas station; otherwise you should continue to your destination.

If you want to have a fun time learning to code, then you should attend ClojureBridge London;

There does not always need to ben an otherwise

Testing conditions to react

Software is also full of these decisions. If the user's input is valid, then we should save their data; otherwise we show an error message.

The common pattern here is that you test some condition and react differently based on whether the condition is true or false.

Boolean Values

true or false are referred to as boolean values or boolean data type

results matching ""

    No results matching ""