What he heard -
bread_count := 0;
Start
IF((bread_count += 1) AND (egg_count > 0))
THEN bread_count += 12;
End
What she meant -
bread_count := 0;
Start
bread_count += 1;
IF(egg_count > 0) THEN egg_count += 12;
End
I give the guy credit. He debugged her statement on the fly. You can’t use an AND unless it’s part of a logical condition, so he kept her expression even though doing so required the redundancy of mating it to a tautology (the act of adding 1 to bread_count is always true). Even worse, what if the store only had 9 eggs?
Now you understand why the perfect programming language would be DWIM (do what I mean) instead of DWIS (do what I said), which is impossible.
Sorry Drew. Still want the flow chart!
Next entry: TNB: How Dare You Shoot My Child!
Previous entry: building a desert, step 2