1. The idea
1.1 Graphical representation of a program
1.2 A flat view ?
1.3 A dead end
1.4 Cheating ?
1.4.1 Adding functionality
1.4.2 Object orientation
1.4.3 Fiddling with function pointers
1.5 Context oriented programming
1.5.1 Sharing information within a level
1.5.2 Calling a function from a lower level
1.5.3 Definition of a level or a tree
2. Building blocks
3. Reusing modules in different context
Top Up Prec

2. Building blocks

Next

At this point, we have mostly circle around the TLMP concept. One may reject this concept of level. In the example above, we have main calling report and report calling printing and that's it! Further, unless you play with OO or function pointers, the module report will always call the module printing.

Here is the trick; The report module is not calling the printing module. Its implementation is calling a generic interface to print. This interface is passed various parameters, only known to the report module.

Going higher in the application, the programmer is free to connect the module needed to this interface. In fact, the programmer is allowed to connect a solution made of several modules and some glue written in C.

OO programmers are using this technique on a regular basis. The report module is calling a virtual function and a sub-class is providing the definition for it. In this respect, TLMP is not different from OO programming (well, it generates OO code to achieve its goal). The major difference is in the implementation and code readability.

Top Up Prec

Next
One big HTML document