Skip to content

Commit 421634a

Browse files
committed
020: warnings, tips
1 parent c7360a4 commit 421634a

File tree

6 files changed

+19
-15
lines changed

6 files changed

+19
-15
lines changed

courses/fundamentals_of_ada/020_declarations/01-introduction.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ Declarations
4040

4141
- ``N`` is usually an :dfn:`identifier`
4242

43-
* Declaration **must precede** use
43+
.. warning:: Declaration **must precede** use
44+
4445
* **Some** implicit declarations
4546

4647
- **Standard** types and operations

courses/fundamentals_of_ada/020_declarations/02-identifiers_and_comments.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Identifiers
3737
- `SpacePerson` |equivalent| `SPACEPERSON`
3838
- ...but **different** from `Space_Person`
3939

40-
* Reserved words are **forbidden**
40+
.. warning:: Reserved words are **forbidden**
4141

4242
----------------
4343
Reserved Words

courses/fundamentals_of_ada/020_declarations/03-literals.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ Decimal Numeric Literals
3434
numeral [.numeral] E [+numeral|-numeral]
3535
numeral ::= digit {['_'] digit}
3636
37-
* Underscore is not significant
37+
.. tip:: Underscore is **not** significant and used for grouping
38+
3839
* **E** (exponent) must always be integer
3940
* Examples
4041

courses/fundamentals_of_ada/020_declarations/05-universal_types.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ Numeric Literals Are Universally Typed
3434

3535
* Compiler handles typing
3636

37-
- No bugs with precision
37+
.. tip:: No bugs with precision
3838

39-
.. code:: Ada
39+
.. code:: Ada
4040
41-
X : Unsigned_Long := 0;
42-
Y : Unsigned_Short := 0;
41+
X : Unsigned_Long := 0;
42+
Y : Unsigned_Short := 0;
4343
4444
----------------------------------------
4545
Literals Must Match "Class" of Context

courses/fundamentals_of_ada/020_declarations/06-named_numbers.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@ Named Number Benefit
5151
* Evaluation at **compile time**
5252

5353
- As if **used directly** in the code
54-
- **Perfect** accuracy
5554

56-
.. code:: Ada
55+
.. tip:: They have **perfect** accuracy
5756

58-
Named_Number : constant := 1.0 / 3.0;
59-
Typed_Constant : constant Float := 1.0 / 3.0;
57+
.. code:: Ada
58+
59+
Named_Number : constant := 1.0 / 3.0;
60+
Typed_Constant : constant Float := 1.0 / 3.0;
6061
6162
.. container:: latex_environment footnotesize
6263

courses/fundamentals_of_ada/020_declarations/07-scope_and_visibility.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,8 @@ Scope and "Lifetime"
6161
----------------------
6262

6363
* Object in scope |rightarrow| exists
64-
* No *scoping* keywords
6564

66-
- C's :c:`static`, :c:`auto` etc...
65+
.. warning:: No *scoping* keywords (C's :c:`static`, :c:`auto` etc...)
6766

6867
.. image:: block_scope_example.jpeg
6968
:height: 50%
@@ -101,9 +100,11 @@ Overcoming Hiding
101100

102101
- Needs named scope
103102

104-
* Homographs are a *code smell*
103+
.. warning::
105104

106-
- May need **refactoring**...
105+
* Homographs are a *code smell*
106+
107+
- May need **refactoring**...
107108

108109
.. code:: Ada
109110

0 commit comments

Comments
 (0)