From 5b0009f058ee46568f2417648cab1895ae020bef Mon Sep 17 00:00:00 2001 From: gusthoff Date: Sat, 20 Feb 2021 02:20:03 +0100 Subject: [PATCH] Editorial changes: removing unneeded instances of "ada-run" class. --- content/courses/intro-to-ada/chapters/arrays.rst | 8 +------- .../courses/intro-to-ada/chapters/modular_programming.rst | 6 ------ .../courses/intro-to-ada/chapters/more_about_types.rst | 2 -- .../intro-to-ada/chapters/object_oriented_programming.rst | 2 -- content/courses/intro-to-ada/chapters/records.rst | 2 -- .../intro-to-ada/chapters/strongly_typed_language.rst | 4 +--- 6 files changed, 2 insertions(+), 22 deletions(-) diff --git a/content/courses/intro-to-ada/chapters/arrays.rst b/content/courses/intro-to-ada/chapters/arrays.rst index 26ec01cad..c54fe163f 100644 --- a/content/courses/intro-to-ada/chapters/arrays.rst +++ b/content/courses/intro-to-ada/chapters/arrays.rst @@ -12,7 +12,6 @@ Arrays in Ada are used to define contiguous collections of elements that can be selected by indexing. Here's a simple example: .. code:: ada run_button project=Courses.Intro_To_Ada.Arrays.Greet - :class: ada-run with Ada.Text_IO; use Ada.Text_IO; @@ -72,7 +71,6 @@ to index into the array. equivalence between an array and a pointer to its initial element. .. code:: ada run_button project=Courses.Intro_To_Ada.Arrays.Array_Bounds_Example - :class: ada-run with Ada.Text_IO; use Ada.Text_IO; @@ -113,7 +111,6 @@ Since you can use any discrete type to index an array, enumeration types are permitted. .. code:: ada run_button project=Courses.Intro_To_Ada.Arrays.Month_Example - :class: ada-run with Ada.Text_IO; use Ada.Text_IO; @@ -192,7 +189,7 @@ an element outside of the bounds of the array, you will get a run-time error instead of accessing random memory as in unsafe languages. .. code:: ada run_button project=Courses.Intro_To_Ada.Arrays.Greet_3 - :class: ada-run, ada-run-expect-failure + :class: ada-run-expect-failure with Ada.Text_IO; use Ada.Text_IO; @@ -317,7 +314,6 @@ in that case, the bounds will need to be provided when creating instances of the type. .. code:: ada run_button project=Courses.Intro_To_Ada.Arrays.Unconstrained_Array_Example - :class: ada-run with Ada.Text_IO; use Ada.Text_IO; @@ -414,7 +410,6 @@ literals, as we can see in the example below. end String_Literals; .. code:: ada run_button project=Courses.Intro_To_Ada.Arrays.Greet_4 - :class: ada-run with Ada.Text_IO; use Ada.Text_IO; @@ -439,7 +434,6 @@ type if you supply an initialization, since the bounds can be deduced from the initialization expression. .. code:: ada run_button project=Courses.Intro_To_Ada.Arrays.Greet_5 - :class: ada-run with Ada.Text_IO; use Ada.Text_IO; diff --git a/content/courses/intro-to-ada/chapters/modular_programming.rst b/content/courses/intro-to-ada/chapters/modular_programming.rst index 379fd7853..0d073bbf7 100644 --- a/content/courses/intro-to-ada/chapters/modular_programming.rst +++ b/content/courses/intro-to-ada/chapters/modular_programming.rst @@ -38,7 +38,6 @@ Here is an example of a package declaration in Ada: And here is how you use it: .. code:: ada run_button project=Courses.Intro_To_Ada.Modular_Programming.Week - :class: ada-run with Ada.Text_IO; use Ada.Text_IO; with Week; @@ -121,7 +120,6 @@ In fact, we have been using the :ada:`use` clause since almost the beginning of this tutorial. .. code:: ada run_button project=Courses.Intro_To_Ada.Modular_Programming.Week - :class: ada-run with Ada.Text_IO; use Ada.Text_IO; -- ^ Make every entity of the Ada.Text_IO package @@ -306,7 +304,6 @@ we can use elements from this child package in a subprogram by simply writing we write :ada:`use Week.Child` in addition. For example: .. code:: ada run_button project=Courses.Intro_To_Ada.Modular_Programming.Child_Packages - :class: ada-run with Ada.Text_IO; use Ada.Text_IO; with Week.Child; use Week.Child; @@ -348,7 +345,6 @@ same way as before: we can reuse the previous test application and adapt the :ada:`with` and :ada:`use`, and the function call. This is the updated code: .. code:: ada run_button project=Courses.Intro_To_Ada.Modular_Programming.Child_Packages - :class: ada-run with Ada.Text_IO; use Ada.Text_IO; with Week.Child.Grandchild; use Week.Child.Grandchild; @@ -397,7 +393,6 @@ This is the corresponding package body of :ada:`Week.Child_2`: We can now reference both children in our test application: .. code:: ada run_button project=Courses.Intro_To_Ada.Modular_Programming.Child_Packages - :class: ada-run with Ada.Text_IO; use Ada.Text_IO; with Week.Child; use Week.Child; @@ -510,7 +505,6 @@ string. Likewise, we can use this strategy to implement the This is a simple test application for the packages above: .. code:: ada run_button project=Courses.Intro_To_Ada.Modular_Programming.Visibility - :class: ada-run with Ada.Text_IO; use Ada.Text_IO; with Book.Additional_Operations; use Book.Additional_Operations; diff --git a/content/courses/intro-to-ada/chapters/more_about_types.rst b/content/courses/intro-to-ada/chapters/more_about_types.rst index 234ddbc58..5b0ae1cdd 100644 --- a/content/courses/intro-to-ada/chapters/more_about_types.rst +++ b/content/courses/intro-to-ada/chapters/more_about_types.rst @@ -534,7 +534,6 @@ specify their values in aggregates, as seen above, and you can access their values via the dot notation. .. code:: ada run_button project=Courses.Intro_To_Ada.More_About_Types.Var_Size_Record_2 - :class: ada-run with Var_Size_Record_2; use Var_Size_Record_2; with Ada.Text_IO; use Ada.Text_IO; @@ -617,7 +616,6 @@ If you try to access a field that is not valid for your record, a Here is how you could write an evaluator for expressions: .. code:: ada run_button project=Courses.Intro_To_Ada.More_About_Types.Variant_Record - :class: ada-run with Variant_Record; use Variant_Record; with Ada.Text_IO; use Ada.Text_IO; diff --git a/content/courses/intro-to-ada/chapters/object_oriented_programming.rst b/content/courses/intro-to-ada/chapters/object_oriented_programming.rst index b68412d02..d0103fd71 100644 --- a/content/courses/intro-to-ada/chapters/object_oriented_programming.rst +++ b/content/courses/intro-to-ada/chapters/object_oriented_programming.rst @@ -341,7 +341,6 @@ type, namely an object of a classwide type. affect the original one. .. code:: ada run_button project=Courses.Intro_To_Ada.Object_Oriented_Programming.Tagged_Types - :class: ada-run with P; use P; @@ -400,7 +399,6 @@ the dot notation. Any remaining parameter are passed normally: .. code:: ada run_button project=Courses.Intro_To_Ada.Object_Oriented_Programming.Tagged_Types - :class: ada-run with P; use P; diff --git a/content/courses/intro-to-ada/chapters/records.rst b/content/courses/intro-to-ada/chapters/records.rst index edc873f8f..f9ee2b143 100644 --- a/content/courses/intro-to-ada/chapters/records.rst +++ b/content/courses/intro-to-ada/chapters/records.rst @@ -79,7 +79,6 @@ type mentioned above, we can access the :ada:`Year` component by writing Let's look at an example: .. code:: ada run_button project=Courses.Intro_To_Ada.Records.Record_Selection - :class: ada-run with Ada.Text_IO; use Ada.Text_IO; @@ -147,7 +146,6 @@ using the :ada:`Year` component of :ada:`Some_Day`. Let's look at a complete example: .. code:: ada run_button project=Courses.Intro_To_Ada.Arrays.Record_Component_Renaming - :class: ada-run package Dates is diff --git a/content/courses/intro-to-ada/chapters/strongly_typed_language.rst b/content/courses/intro-to-ada/chapters/strongly_typed_language.rst index 81c31cbb0..339566d29 100644 --- a/content/courses/intro-to-ada/chapters/strongly_typed_language.rst +++ b/content/courses/intro-to-ada/chapters/strongly_typed_language.rst @@ -296,7 +296,6 @@ The compiler will choose a floating-point representation that supports the required precision. For example: .. code:: ada run_button project=Courses.Intro_To_Ada.Strongly_Typed_Language.Custom_Floating_Types - :class: ada-run with Ada.Text_IO; use Ada.Text_IO; @@ -600,7 +599,6 @@ some values while staying within a single type. This is where subtypes come into play. A subtype does not introduce a new type. .. code:: ada run_button project=Courses.Intro_To_Ada.Strongly_Typed_Language.Days_Subtype - :class: ada-run with Ada.Text_IO; use Ada.Text_IO; @@ -642,7 +640,7 @@ constraints are enforced at run time: if you violate a subtype constraint, an exception will be raised. .. code:: ada run_button project=Courses.Intro_To_Ada.Strongly_Typed_Language.Days_Subtype_Error - :class: ada-run, ada-run-expect-failure + :class: ada-run-expect-failure with Ada.Text_IO; use Ada.Text_IO;