The USE statement names a module whose public definitions are to be made accessible. It has the following form:
USEmodule-name
[,
new-name
![]()
=>
use-name
...]
If a local entity has the same name as an object in the module, then the module object can be renamed, (as many renames as desired can be made in one USE statement, they are just supplied as a comma separated list),
USE HOUSE_DEFS, GET_HOME=>GET_HOUSE
Here the module object GET_HOUSE is renamed to GET_HOME when used locally. This renaming facility is essential otherwise user programs would often require rewriting due to name clashes, in this way the renaming can be done by the compiler. Renaming should not be used unless absolutely necessary as it can add a certain amount of confusion to the program. It is only permissible to rename an object once in a particular scoping unit.