Skip to content

Commit

Permalink
Small improvements
Browse files Browse the repository at this point in the history
These improvements were suggested during the code review.
  • Loading branch information
gusthoff committed Aug 30, 2024
1 parent dea6c99 commit cbc3d34
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions content/courses/advanced-ada/parts/data_types/records.rst
Original file line number Diff line number Diff line change
Expand Up @@ -889,8 +889,9 @@ discriminants without defaults are

In this section, we discuss a couple of details about record discriminants that
we haven't covered yet. Although the discussion will be restricted to
record discriminants, keep in mind that tasks can also have discriminants.
We'll focus on task discriminants in another chapter.
record discriminants, keep in mind that tasks and protected types can also have
discriminants. We'll focus on discriminants for tasks and protected types in
separate chapters.

.. todo::

Expand Down Expand Up @@ -1858,7 +1859,8 @@ When deriving types with discriminants, we may use a more constrained type for
the discriminants of derived type. For example, if the discriminant :ada:`D` of
the parent type is of :ada:`Integer` type, the corresponding discriminant of
the derived type may use a constrained subtype such as :ada:`Natural` or
:ada:`Positive`. For example:
:ada:`Positive` |mdash| because both :ada:`Natural` and :ada:`Positive` are
subtypes of type :ada:`Integer`. For example:

.. code:: ada compile_button project=Courses.Advanced_Ada.Data_Types.Records.Discriminants.Derived_Types_More_Constrained_Discriminants

Expand Down

0 comments on commit cbc3d34

Please sign in to comment.