diff --git a/courses/fundamentals_of_ada/020_declarations/01-introduction.rst b/courses/fundamentals_of_ada/020_declarations/01-introduction.rst index a568e1fd4..c18779f71 100644 --- a/courses/fundamentals_of_ada/020_declarations/01-introduction.rst +++ b/courses/fundamentals_of_ada/020_declarations/01-introduction.rst @@ -40,7 +40,8 @@ Declarations - ``N`` is usually an :dfn:`identifier` -* Declaration **must precede** use +.. warning:: Declaration **must precede** use + * **Some** implicit declarations - **Standard** types and operations diff --git a/courses/fundamentals_of_ada/020_declarations/02-identifiers_and_comments.rst b/courses/fundamentals_of_ada/020_declarations/02-identifiers_and_comments.rst index a22c2557a..e5a37d246 100644 --- a/courses/fundamentals_of_ada/020_declarations/02-identifiers_and_comments.rst +++ b/courses/fundamentals_of_ada/020_declarations/02-identifiers_and_comments.rst @@ -37,7 +37,7 @@ Identifiers - `SpacePerson` |equivalent| `SPACEPERSON` - ...but **different** from `Space_Person` -* Reserved words are **forbidden** +.. warning:: Reserved words are **forbidden** ---------------- Reserved Words diff --git a/courses/fundamentals_of_ada/020_declarations/03-literals.rst b/courses/fundamentals_of_ada/020_declarations/03-literals.rst index bb5abc331..e9ede4c1b 100644 --- a/courses/fundamentals_of_ada/020_declarations/03-literals.rst +++ b/courses/fundamentals_of_ada/020_declarations/03-literals.rst @@ -34,7 +34,8 @@ Decimal Numeric Literals numeral [.numeral] E [+numeral|-numeral] numeral ::= digit {['_'] digit} -* Underscore is not significant +.. tip:: Underscore is **not** significant and used for grouping + * **E** (exponent) must always be integer * Examples diff --git a/courses/fundamentals_of_ada/020_declarations/05-universal_types.rst b/courses/fundamentals_of_ada/020_declarations/05-universal_types.rst index 075853c92..ecb451bf7 100644 --- a/courses/fundamentals_of_ada/020_declarations/05-universal_types.rst +++ b/courses/fundamentals_of_ada/020_declarations/05-universal_types.rst @@ -34,12 +34,12 @@ Numeric Literals Are Universally Typed * Compiler handles typing - - No bugs with precision +.. tip:: No bugs with precision - .. code:: Ada +.. code:: Ada - X : Unsigned_Long := 0; - Y : Unsigned_Short := 0; + X : Unsigned_Long := 0; + Y : Unsigned_Short := 0; ---------------------------------------- Literals Must Match "Class" of Context diff --git a/courses/fundamentals_of_ada/020_declarations/06-named_numbers.rst b/courses/fundamentals_of_ada/020_declarations/06-named_numbers.rst index ac259ceb0..688c5a9ab 100644 --- a/courses/fundamentals_of_ada/020_declarations/06-named_numbers.rst +++ b/courses/fundamentals_of_ada/020_declarations/06-named_numbers.rst @@ -51,12 +51,13 @@ Named Number Benefit * Evaluation at **compile time** - As if **used directly** in the code - - **Perfect** accuracy - .. code:: Ada +.. tip:: They have **perfect** accuracy - Named_Number : constant := 1.0 / 3.0; - Typed_Constant : constant Float := 1.0 / 3.0; +.. code:: Ada + + Named_Number : constant := 1.0 / 3.0; + Typed_Constant : constant Float := 1.0 / 3.0; .. container:: latex_environment footnotesize diff --git a/courses/fundamentals_of_ada/020_declarations/07-scope_and_visibility.rst b/courses/fundamentals_of_ada/020_declarations/07-scope_and_visibility.rst index 8fb78fab7..4779e57ab 100644 --- a/courses/fundamentals_of_ada/020_declarations/07-scope_and_visibility.rst +++ b/courses/fundamentals_of_ada/020_declarations/07-scope_and_visibility.rst @@ -61,9 +61,8 @@ Scope and "Lifetime" ---------------------- * Object in scope |rightarrow| exists -* No *scoping* keywords - - C's :c:`static`, :c:`auto` etc... +.. warning:: No *scoping* keywords (C's :c:`static`, :c:`auto` etc...) .. image:: block_scope_example.jpeg :height: 50% @@ -101,9 +100,11 @@ Overcoming Hiding - Needs named scope -* Homographs are a *code smell* +.. warning:: - - May need **refactoring**... + * Homographs are a *code smell* + + - May need **refactoring**... .. code:: Ada diff --git a/courses/fundamentals_of_ada/030_basic_types/01-introduction.rst b/courses/fundamentals_of_ada/030_basic_types/01-introduction.rst index 860b02b69..afa16e419 100644 --- a/courses/fundamentals_of_ada/030_basic_types/01-introduction.rst +++ b/courses/fundamentals_of_ada/030_basic_types/01-introduction.rst @@ -15,7 +15,8 @@ Strong Typing - **Check** of values and operations - Easy for a computer - - Developer can focus on **earlier** phase: requirement + +.. tip:: Developer can focus on **earlier** phase: requirement ---------------------------------------- Strongly-Typed Vs Weakly-Typed Languages @@ -198,7 +199,8 @@ Type Model Run-Time Costs * **Same performance** for identical programs - Run-time type checks can be disabled - - Compile-time check is *free* + +.. note:: Compile-time check is *free* .. container:: columns diff --git a/courses/fundamentals_of_ada/030_basic_types/02-discrete_numeric_types.rst b/courses/fundamentals_of_ada/030_basic_types/02-discrete_numeric_types.rst index 83257e691..2a76eb995 100644 --- a/courses/fundamentals_of_ada/030_basic_types/02-discrete_numeric_types.rst +++ b/courses/fundamentals_of_ada/030_basic_types/02-discrete_numeric_types.rst @@ -51,9 +51,11 @@ Predefined Signed Integer Types - Guaranteed ranges: :ada:`Short_Integer` ``<=`` :ada:`Integer` ``<=`` :ada:`Long_Integer` - Ranges are all **implementation-defined** -* Portability not guaranteed +.. warning:: - - But may be difficult to avoid + Portability not guaranteed + + * But may be difficult to avoid --------------------------------- Operators for Signed Integer Type @@ -67,12 +69,13 @@ Operators for Signed Integer Type :multiplying operator: :ada:`* | / | mod | rem` :highest precedence operator: :ada:`** | abs` -* *Note*: for exponentiation :ada:`**` +.. note:: - - Result will be a signed integer - - So power **must** be :ada:`Integer` ``>= 0`` + Exponentiation :ada:`**` result will be a signed integer -* Division by zero |rightarrow| :ada:`Constraint_Error` + - |rightarrow| power **must** be :ada:`Integer` ``>= 0`` + +.. warning:: Division by zero |rightarrow| :ada:`Constraint_Error` ------------------------ Signed Integer Overflows diff --git a/courses/fundamentals_of_ada/030_basic_types/02-discrete_numeric_types_with_mod.rst b/courses/fundamentals_of_ada/030_basic_types/02-discrete_numeric_types_with_mod.rst index 3e2e2e579..bdb8b709e 100644 --- a/courses/fundamentals_of_ada/030_basic_types/02-discrete_numeric_types_with_mod.rst +++ b/courses/fundamentals_of_ada/030_basic_types/02-discrete_numeric_types_with_mod.rst @@ -51,9 +51,11 @@ Predefined Signed Integer Types - Guaranteed ranges: :ada:`Short_Integer` ``<=`` :ada:`Integer` ``<=`` :ada:`Long_Integer` - Ranges are all **implementation-defined** -* Portability not guaranteed +.. warning:: - - But may be difficult to avoid + Portability not guaranteed + + - But may be difficult to avoid --------------------------------- Operators for Signed Integer Type @@ -67,12 +69,13 @@ Operators for Signed Integer Type :multiplying operator: :ada:`* | / | mod | rem` :highest precedence operator: :ada:`** | abs` -* *Note*: for exponentiation :ada:`**` +.. note:: + + Exponentiation :ada:`**` result will be a signed integer - - Result will be a signed integer - - So power **must** be :ada:`Integer` ``>= 0`` + - |rightarrow| power **must** be :ada:`Integer` ``>= 0`` -* Division by zero |rightarrow| :ada:`Constraint_Error` +.. warning:: Division by zero |rightarrow| :ada:`Constraint_Error` ------------------------ Signed Integer Overflows @@ -119,7 +122,7 @@ Modular Types * **Unsigned** values * Adds operations and attributes - * Typically **bit-wise** manipulation +.. note:: Typically **bit-wise** manipulation * Syntax 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 2d96a9c3c..b1ff2dce0 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 @@ -77,10 +77,12 @@ Predefined Floating Point Types - :ada:`Long_Float` ``>= 11`` digits * General-purpose -* Best to **avoid** predefined types - - Loss of **portability** - - Easy to avoid +.. tip:: + + It is best, and easy, to **avoid** predefined types + + - Loss of **portability** ------------------------------- Floating Point Type Operators @@ -140,7 +142,8 @@ Numeric Types Conversion * Special rule: can always convert between numeric types - Explicitly - - :ada:`Float` |rightarrow| :ada:`Integer` causes **rounding** + +.. warning:: :ada:`Float` |rightarrow| :ada:`Integer` causes **rounding** .. code:: Ada diff --git a/courses/fundamentals_of_ada/030_basic_types/10-subtypes.rst b/courses/fundamentals_of_ada/030_basic_types/10-subtypes.rst index ffcfe3857..397e97786 100644 --- a/courses/fundamentals_of_ada/030_basic_types/10-subtypes.rst +++ b/courses/fundamentals_of_ada/030_basic_types/10-subtypes.rst @@ -16,7 +16,7 @@ Subtype - :ada:`Type_Name` is an existing :ada:`type` or :ada:`subtype` -* If no constraint |rightarrow| type alias +.. note:: If no constraint |rightarrow| type alias ----------------- Subtype Example diff --git a/courses/fundamentals_of_ada/standard_course.txt b/courses/fundamentals_of_ada/standard_course.txt index 51c6e04fd..d25ee8df5 100644 --- a/courses/fundamentals_of_ada/standard_course.txt +++ b/courses/fundamentals_of_ada/standard_course.txt @@ -3,22 +3,20 @@ 020_declarations.rst 030_basic_types.rst 040_statements.rst +080_expressions.rst 050_array_types.rst 060_record_types.rst 070_subprograms.rst -075_type_derivation.rst -080_expressions.rst 090_overloading.rst +075_type_derivation.rst +190_exceptions.rst +280_low_level_programming.rst 100_packages.rst 110_private_types.rst 120_limited_types.rst 130_program_structure.rst 135_visibility.rst -140_access_types.rst 160_genericity.rst -170_tagged_derivation-intro.rst -180_polymorphism.rst -190_exceptions.rst -230_interfacing_with_c.rst +270_introduction_to_contracts.rst 240_tasking.rst 920_reference_material.rst