Skip to content

Commit 1bf6569

Browse files
Merge branch 'slides/188-expressions-quantified-expressions-remove-slide' into 'master'
Resolve "Expressions: Quantified Expressions - Remove Slide" Closes #188 See merge request feng/training/material!255
2 parents 1e5ea09 + 51e3945 commit 1bf6569

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

courses/fundamentals_of_ada/080_expressions/05-quantified_expressions.rst

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -26,37 +26,6 @@ Introduction
2626
..
2727
language_version 2012
2828
29-
----------
30-
Examples
31-
----------
32-
33-
.. code:: ada
34-
35-
with GNAT.Random_Numbers; use GNAT.Random_Numbers;
36-
with Ada.Text_IO; use Ada.Text_IO;
37-
procedure Quantified_Expressions is
38-
Gen : Generator;
39-
Values : constant array (1 .. 10) of Integer := (others => Random (Gen));
40-
41-
Any_Even : constant Boolean := (for some N of Values => N mod 2 = 0);
42-
All_Odd : constant Boolean := (for all N of reverse Values => N mod 2 = 1);
43-
44-
function Is_Sorted return Boolean is
45-
(for all K in Values'Range =>
46-
K = Values'First or else Values (K - 1) <= Values (K));
47-
48-
function Duplicate return Boolean is
49-
(for some I in Values'Range =>
50-
(for some J in I + 1 .. Values'Last => Values (I) = Values (J)));
51-
52-
begin
53-
Put_Line ("Any Even: " & Boolean'Image (Any_Even));
54-
Put_Line ("All Odd: " & Boolean'Image (All_Odd));
55-
Put_Line ("Is_Sorted " & Boolean'Image (Is_Sorted));
56-
Put_Line ("Duplicate " & Boolean'Image (Duplicate));
57-
end Quantified_Expressions;
58-
.. include:: ../examples/080_expressions/quantified_expressions.rst
59-
6029
-----------------------------------------
6130
Semantics Are As If You Wrote This Code
6231
-----------------------------------------

0 commit comments

Comments
 (0)