Unlocking Programming: Statements
© 7 Jul 2011 Luther Tychonievich
Licensed under Creative Commons: CC BY-NC-ND 3.0
other posts

Unlocking Programming

Part of a series of posts explaining programming for the lay-person.


This is part of a series of posts; see the introduction to this series.

In programming a statement is not a statement at all but rather as single instruction or request. “‍Apply to wet hair‍” is a statement found on many shampoo bottles; “‍rinse‍” is another. Recipes often contain many statements: “‍butter one side of a slice of bread‍”, “‍grill until lightly browned‍”, “‍separate egg whites‍”, etc.

There are two important features of a statement. First, a statement is a sentence, not a noun phrase; it doesn’t give back any information. “‍Write 2 + 3 on a piece of paper‍” is a statement, but “‍add 2 to 3‍” is not. Second, a statement describes a single action. This a matter of presentation; “‍wash your hair‍” is a fine statement, as is “‍apply shampoo to hair‍” and “‍move palm across scalp‍”. However, “‍apply shampoo to hair, lather and rinse‍” is not one but three statements.

That’s it. Statements.

Looking for comments…

Loading user comment form…