The scope of a channel

The scope of a channel is the code from which it can be accessed.

Scope example, with LINK commands

The following figure shows the same five interactive programs previously described in "Current channel example, with LINK commands".

The scope of the X channel—the code from which it can be accessed—is programs A, B, and C.

The scope of the Y channel is programs D and E.

Note that, by the time control is returned to program A by program B, the X channel has been modified—it doesn't contain the same set of containers as when it was created by program A.

Figure 1. The scope of a channel—example showing LINK commands
The picture shows the scenario described in the text.

The following table lists the name and scope of the current channel (if any) of each of the five programs shown in the previous figure.

Table 1. The scope of a channel—example with LINK commands
Program Current channel Scope of channel
A None Not applicable
B X A, B, C
C X A, B, C
D None Not applicable
E Y D, E