Before object-orientation the predominant method for structuring programs was procedural programming. Procedural programming is so called because the program code gives a step-by-step procedure (a set of instructions that accomplish a task, i.e. an algorithm) for solving ‘the problem’.
When designing a procedural program the programmer will usually break down the problem in a top-down manner. An overall algorithm will be specified which will be successively refined into smaller steps. This design methodology typically yields the structure of a main program, involving a number of calls to smaller procedures or function calls, which can in turn call further functions or procedures (a function is a procedure that returns a value).
In such a design, data is place into separate structures (called data structures). Often this data may be visible to, and able to be accessed by, every function or procedure in the whole program. In such a situation, where the data is said to be ‘global’, each function/procedure is able to change the data.
The ramification of data being global is that if a change is made to its data structure, all the functions and procedures that operate on that data will also have to be modified. Thus one small change could have a knock on effect throughout the program, involving changes to numerous, widely-scattered routines.