lectures.alex.balgavy.eu

Lecture notes from university.
git clone git://git.alex.balgavy.eu/lectures.alex.balgavy.eu.git
Log | Files | Refs | Submodules

Scope.md (375B)


      1 +++
      2 title = 'Scope'
      3 +++
      4 # Scope
      5 region of program text.
      6 name is declared and valid in a scope.
      7 scopes are nested.
      8 
      9 - global: text outside any other scope
     10 - namespace: named scope nested in global scope (or another namespace)
     11 - class: text within class
     12 - local: between {...} of block or in function argument list
     13 - statement: e.g. in a for statement
     14 
     15 scopes keep names local