Skip to content

Commit db6268d

Browse files
committed
Small changes to 06-type-extension-polymorphism.
1 parent 11c968c commit db6268d

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

episodes/06-type-extension-polymorphism.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ ftn example1.f90 object_type.f90
144144
:::::::::::::::::::::::::
145145

146146
In the example main program, check you can provide some value for the
147-
new charge component via a constructor (e.g., `q = -1.0`), and access
147+
new charge component via a constructor (e.g., `q = 5.0`), and access
148148
the ancestor components of the new type in both long and short forms.
149149

150150
::::::::::::::: solution
@@ -335,11 +335,11 @@ CLASS(sphere_t)
335335

336336
### Type selection
337337

338-
Code may detect the dynamic type of a polymorphic variable via use
339-
of the `select type` construct, which allows appropriate action to
340-
to taken depending on the dynamic type. This is similar to the
341-
simple `select case` construct, where the behaviour is controlled
342-
by the dynamic type of the *selector*, here `p`:
338+
Code may detect the dynamic type of a polymorphic variable via use of the
339+
`select type` construct, which allows appropriate action to to taken depending
340+
on the dynamic type, notably granting access to the components of extended
341+
types. This is similar to the simple `select case` construct, where the
342+
behaviour is controlled by the dynamic type of the *selector*, here `p`:
343343

344344
```fortran
345345
select type (p)

0 commit comments

Comments
 (0)