Difference between revisions of "Scope"

From Computer History Wiki
Jump to: navigation, search
(An OK start)
 
m (+cat)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
'''Scope''' is the range in a [[program]] over which a particular [[variable]] is visible/usable.
+
'''Scope''' is a term which has a number of meanings in the world of information systemw.
 +
 
 +
==Programming languages==
 +
 
 +
Most formally, in a [[programming language]], it is the range in a [[program]] over which a particular [[variable]] is visible/usable.
  
 
For instance, [[local variable]]s in an inner [[control flow|block]] can only be used in that block.
 
For instance, [[local variable]]s in an inner [[control flow|block]] can only be used in that block.
  
A '''global''' variable is one which can be seen, and used, anywhere; in [[programming language]]s which allow separately [[compiler|compiled]] [[module]]s to be joined together with a [[linker]] after the compilation, a global variable created in one could be seen/used in any part of the linked program.
+
A '''global''' variable is one which can be seen, and used, anywhere; in programming languages which allow separately [[compiler|compiled]] [[Architecture#Architectural techniques|modules]] to be joined together with a [[linker]] after the compilation, a global variable created in one could be seen/used in any part of the linked program.
 +
 
 +
==Networks==
 +
 
 +
In a [[communication network]], a scope means a subset of the network, one inside a boundary which selects a portion of the entire network.
 +
 
 +
{{semi-stub}}
  
{{stub}}
+
[[Category: Software Basics]]

Latest revision as of 21:47, 16 December 2018

Scope is a term which has a number of meanings in the world of information systemw.

Programming languages

Most formally, in a programming language, it is the range in a program over which a particular variable is visible/usable.

For instance, local variables in an inner block can only be used in that block.

A global variable is one which can be seen, and used, anywhere; in programming languages which allow separately compiled modules to be joined together with a linker after the compilation, a global variable created in one could be seen/used in any part of the linked program.

Networks

In a communication network, a scope means a subset of the network, one inside a boundary which selects a portion of the entire network.