Previous topic | Ada Home Page | Index

Scope

scope:

scope of a declaration:

"cannot see in; can see out"

Which names are in scope?

can refer to:

local declaration masks global declaration of same name

AVOID global variables !

An example shows the visibility of each name defined in a program, at different points throughout the program.

Another example also shows the visibility of each name defined in a program, at different points throughout the program. It also shows the the output produced when the program is run. You need to understand the scope rules in order to understand the output.

Scope - good practice

localise scope as far as possible

procedures

constants

variables


Previous topic | Ada Home Page | Index
c-lokan@adfa.oz.au / 14 Feb 96