“Multiple declaration” means that a variable that was already declared in another location in the procedure is again declared. For example, the redeclaration of task-global variables in subordinate procedures would be a multiple declaration.
Multiple declarations are accepted only if the variable is declared with exactly the same attributes (except for CONTAINER and INIT) as the preexisting variable. In this case, the declaration is ignored. No new variable is created.
If the variable already exists with a container, the specification CONTAINER = *STD is sufficient for a multiple declaration. This has the same effect as the correct specification of the container.
If the variable already exists with a value, the entry INIT = *NONE is sufficient for a multiple declaration. The variables are not devalued; they maintain their values. This has the same effect as entering the initial value directly.
If the declarations do not match, error handling is activated.
This also applies if implicitly declared variables are subsequently redeclared explicitly. They must then be declared with the default values.
In this way, for example, procedure parameters can be declared as normal S variables; however, the attributes of the procedure parameters must be retained.