Program flow
The flow of a program can often be confusing to an inexperienced programmer regardless of whether they are a traditional programmer or an automation programmer. However, the overall flow of a program is very simple. In the most basic sense, a program will flow from top to bottom. A program will start at the very first command and will end at the last command. However, a program can have multiple paths to that last command.
Though a program will flow from top to bottom, the path it takes to the bottom may vary. A program can branch out into different paths, code blocks can be looped over, and functions that live in other files can be called. It is also important to understand that the last command that is executed is not necessarily the last command in the file or group of files. We’re going to explore some of these concepts in more detail later on in the book; however, for now, just assume that a program will start at the first command and end at the last command...