diff --git a/courses/fundamentals_of_ada/030_basic_types/07-real_types.rst b/courses/fundamentals_of_ada/030_basic_types/07-real_types.rst index 36dfe58dd..2d96a9c3c 100644 --- a/courses/fundamentals_of_ada/030_basic_types/07-real_types.rst +++ b/courses/fundamentals_of_ada/030_basic_types/07-real_types.rst @@ -167,9 +167,9 @@ What is the output of this code? Put_Line (Float'Image (F)); end; -A. 7.6 +A. 7.6E-01 B. Compile Error -C. 8.0 +C. 8.0E-01 D. :answer:`0.0` .. container:: animate diff --git a/courses/fundamentals_of_ada/040_statements/04-assignment_statements.rst b/courses/fundamentals_of_ada/040_statements/04-assignment_statements.rst index 136bc1ace..d779d9925 100644 --- a/courses/fundamentals_of_ada/040_statements/04-assignment_statements.rst +++ b/courses/fundamentals_of_ada/040_statements/04-assignment_statements.rst @@ -88,7 +88,7 @@ Aliasing the Assignment Target // becomes total += value; -* Ada 2022 implements this by using the target name symbol **@** +* Ada 2022 implements this by using the target name symbol :ada:`@` .. code:: Ada diff --git a/courses/fundamentals_of_ada/040_statements/05-conditional_statements.rst b/courses/fundamentals_of_ada/040_statements/05-conditional_statements.rst index 82e8c1166..3585ba49c 100644 --- a/courses/fundamentals_of_ada/040_statements/05-conditional_statements.rst +++ b/courses/fundamentals_of_ada/040_statements/05-conditional_statements.rst @@ -204,7 +204,7 @@ D. | ``end if;`` Explanations * :ada:`A` uses the C-style equality/inequality operators - * :ada:`D` is legal because :ada:`else` is not required + * :ada:`D` is legal because :ada:`else` is not required for an :ada:`if` block ------ Quiz diff --git a/courses/fundamentals_of_ada/050_array_types/03-unconstrained_array_types.rst b/courses/fundamentals_of_ada/050_array_types/03-unconstrained_array_types.rst index b43e2d1a1..a30422ca1 100644 --- a/courses/fundamentals_of_ada/050_array_types/03-unconstrained_array_types.rst +++ b/courses/fundamentals_of_ada/050_array_types/03-unconstrained_array_types.rst @@ -57,8 +57,8 @@ Supplying Index Constraints for Objects .. code:: Ada - Weekdays(Sat) := 0.0; -- Compiler error - Weekend(Mon) := 0.0; -- Compiler error + Weekdays(Sat) := 0.0; -- Constraint error + Weekend(Mon) := 0.0; -- Constraint error --------------------------------------- Bounds Must Satisfy Type Constraints diff --git a/courses/fundamentals_of_ada/110_private_types/05-when_to_use_or_avoid_private_types.rst b/courses/fundamentals_of_ada/110_private_types/05-when_to_use_or_avoid_private_types.rst index 00ad67c5a..4950d4185 100644 --- a/courses/fundamentals_of_ada/110_private_types/05-when_to_use_or_avoid_private_types.rst +++ b/courses/fundamentals_of_ada/110_private_types/05-when_to_use_or_avoid_private_types.rst @@ -46,5 +46,5 @@ When to Avoid Private Types type Vector is array (Positive range <>) of Float; V : Vector (1 .. 3); ... - V (1) := Alpha; + V (1) := Alpha; -- Illegal since Vector is private diff --git a/courses/fundamentals_of_ada/labs/030_basic_types.lab.rst b/courses/fundamentals_of_ada/labs/030_basic_types.lab.rst index 59374c515..6a05a614d 100644 --- a/courses/fundamentals_of_ada/labs/030_basic_types.lab.rst +++ b/courses/fundamentals_of_ada/labs/030_basic_types.lab.rst @@ -69,7 +69,18 @@ Basic Types Lab Hints .. code:: Ada 'Image (Object) - Object'Image + Object'Image + +-------------------------- +Basic Types Extra Credit +-------------------------- + +* See what happens when your data is invalid / illegal + + - Number of tests = 0 + - Assign a very large number to the test score total + - Color type only has one value + - Add a number larger than 360 to the circle value ---------------------------------------- Basic Types Lab Solution - Declarations @@ -83,14 +94,3 @@ Basic Types Lab Solution - Implementation .. container:: source_include labs/answers/030_basic_types.txt :start-after:--Implementation :end-before:--Implementation :code:Ada :number-lines:18 --------------------------- -Basic Types Extra Credit --------------------------- - -* See what happens when your data is invalid / illegal - - - Number of tests = 0 - - Assign a very large number to the test score total - - Color type only has one value - - Add a number larger than 360 to the circle value -