A module for problem 15, part 2.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| character(len=:), | public, | allocatable | :: | label | |||
| integer(kind=ip), | public | :: | focal_length | = | 0 |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(lens), | public, | dimension(:), allocatable | :: | lenses |
the lenses in the box |
| procedure, public :: add_lens | |
| procedure, public :: remove_lens |
remove the lens with the label (if present)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(box), | intent(inout) | :: | me | |||
| character(len=*), | intent(in) | :: | label |