A simple sequence of statements.
You need to do a simple computation.
Some variables whose values need to be changed.
Variables with changed values.
One statement after another. For example, to take a meal price, and compute the tip and total:
- ' Compute tip and total.
- sTipAmount = sMealPrice * 0.15
- sTotal = sMealPrice + sTipAmount
sMealPrice
goes into this sequence, and sTipAmount
and sTotal
come out.
sMealPrice
has to have a value before the code runs, otherwise the expression sMealPrice * 0.15
won't mean anything.
You can tell that sTipAmount
and sTotal
come out of the sequence, because they are on the left of the assignment statements (e.g., sTipAmount = sMealPrice * 0.15
). A variable on the left of an assignment statement has a value put into it.