Skip to content

Commit 842d2b3

Browse files
Remove protected member attribute from derived_types.md, not standard Fortran (#401)
See https://fortran-lang.discourse.group/t/protected-attribute-for-derived-type-components/7360
1 parent 79e883b commit 842d2b3

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

source/learn/quickstart/derived_types.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ end program test_employee
223223
`member-attributes` (optional):
224224

225225
- `public` or `private` access attributes
226-
- `protected` access attribute
227226
- `allocatable` with or without `dimension` to specify a dynamic array
228227
- `pointer`, `codimension`, `contiguous`, `volatile`, `asynchronous`
229228

@@ -236,12 +235,7 @@ type :: t_example
236235
! private hides it from use outside of the t_example's scope.
237236
! The default initialization [=0] is the [init] part.
238237
239-
! 2nd case: protected
240-
integer, protected :: i
241-
! In contrary to private, protected allows access to i assigned value outside of t_example
242-
! but is not definable, i.e. a value may be assigned to i only within t_example.
243-
244-
! 3rd case: dynamic 1-D array
238+
! 2nd case: dynamic 1-D array
245239
real, allocatable, dimension(:) :: x
246240
! the same as
247241
real, allocatable :: x(:)

0 commit comments

Comments
 (0)