Visibility modifiers is a method used in programming to specify the specific object for it's as visible or invisible, the purpose of visibility modifier is to define what is able to access or what is not to be able to access the object.
In coluber it's able to define visibility modifier at several objects:
- data.
- task.
As an example defined:
public data measurement:
inch: float
type_meas: string
public task process():
serve measurements = measurement(inch: 1.5, type_meas: "meter")
public, defined as visibility modifier it can accessed through main.clbr at the root project or across modules in stdlib or library.
private data measurement:
inch: float
type_meas: string
private task process():
serve measurements = measurement(inch: 1.5, type_meas: "meter")
main.clbr or other modules in both are unable to access the objects for as is the private modifier.
Top comments (0)