# public

Public is a visibility modifier, that can be atteched to definitions on module level, or in component types. It means:

- on module level: the definition is visible in every module where it is imported to.
- in a component type: the definition is visible via the runs on scope in every function/altstep/testcase.

Related keywords:

- friend
- private

### public definition;

Example 1:

module module1 {
import from module2 all;
const module2Type c_example1 := 4; //by default public, visible
const module2PublieType c_example2 := 4; //public, visible
const module2FriendType c_example3 := 4; //this is a friend module, visible
const module2PrivateType c_example4 := 4; //ERROR, not visible
}

module module2 {
friend module1;
type integer module2Type;//by default public, visible in every module
public type integer module2PublieType; //public, visible in every module
friend type integer module2FriendType; //friend, visible only in friend modules
private type module2PrivateType; //private, visible only in this module
}