It can – that’s a great writing there – but I was thinking in terms of subroutines and the variables within. Example: You can have global and local variables. A subroutine can be treated as an object by the rest of a program if all of the variables within are local in scope. The subroutine outputs one or several results which can be treated as the same as if they were global constants declared at the start. But you can also add to the subroutine, change what it outputs, or even open up the subroutine’s local scope variables so that the entire program has access to all of it.

It can – that’s a great writing there – but I was thinking in terms of subroutines and the variables within.

Example: You can have global and local variables. A subroutine can be treated as an object by the rest of a program if all of the variables within are local in scope. The subroutine outputs one or several results which can be treated as the same as if they were global constants declared at the start.

But you can also add to the subroutine, change what it outputs, or even open up the subroutine’s local scope variables so that the entire program has access to all of it.

Leave a comment

Your email address will not be published. Required fields are marked *


3 × nine =

Leave a Reply