Next Previous Contents

2. The control flow of C and Tcl

2.1 The flow of C

2.2 Standard flow in Tcl

Explain:

Let us consider as an example five Tcl commands: A calls B, which in turn calls C (which calls F)and then D. The flow of control and the effect in the C-stack can be represented by

    FLOW         C-STACK
    -------------------
    start        A    
    A calls B    A:B  
    B calls C    A:B:C 
    C calls F    A:B:C:F  
    F returns    A:B:C  
    C returns    A:B  
    B calls D    A:B:D  
    D returns    A:B  
    B returns    A    

Next Previous Contents