Chapter 11. Subroutines and variable scoping
Compartmentalizing code with subroutines
Common problems with variables
Controlling variable scoping
Variable Scoping Guidelines for complex programs
Reusing a subroutine
Thinking logically may come naturally to Vulcans like Star Trek’s Mr. Spock, but it’s a challenge for most earthlings. That’s what those millions of VCRs and microwave-ovens blinking 12:00 ... 12:00 ... 12:00—since the 1980s—have been trying to tell us.
What’s more, even those who excel in logical thinking can experience drastic degradations in performance when subjected to time pressures, sleep deprivation, frequent interruptions, tantalizing daydreams, or problems at home—i.e., under normal ...