Skip to content

Commit 5c2405e

Browse files
committed
reformat slide that was a bit large
1 parent 91a718f commit 5c2405e

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

courses/fundamentals_of_ada/030_basic_types/11-subtypes_full_picture.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -253,19 +253,21 @@ Idiom: Subtypes as Local Constraints
253253

254254
Do not use for checks that should **always** happen, even in production.
255255

256-
.. code:: Ada
256+
* Constrain input range
257257

258-
subtype Incrementable_Integer is Integer
259-
range Integer'First .. Integer'Last - 1;
258+
.. code:: Ada
260259
260+
subtype Incrementable_Integer is Integer range Integer'First .. Integer'Last - 1;
261261
function Increment (I : Incrementable_Integer) return Integer;
262262
263+
* Constrain output range
264+
263265
.. code:: Ada
264266
265-
subtype Valid_Fingers_T is Integer
266-
range 1 .. 5;
267-
Fingers : Valid_Fingers_T
268-
:= Prompt_And_Get_Integer ("Give me the number of a finger");
267+
subtype Valid_Fingers_T is Integer range 1 .. 5;
268+
Fingers : Valid_Fingers_T := Prompt_And_Get_Integer ("Give me the number of a finger");
269+
270+
* Constrain array index
269271

270272
.. code:: Ada
271273

0 commit comments

Comments
 (0)