Variable scope and lifetime

The variable, after declaration, has its own lifespan and it lasts until the subroutine in which it was created is completed. Sometimes we want her to keep its value even after leaving the subroutine. Also, the variable is visible only within the module in which the it is located. Is there a need for it to be seen outside the module? How to define the range and extend the life span of variables will be found in the text that follows.