Skip to content

Commit 01b2614

Browse files
Merge branch 'slides/125-visibility-nitpicks' into 'master'
Resolve "visibility nitpicks" Closes #125 See merge request feng/training/material!161
2 parents 7ac0dbe + 3abbd0e commit 01b2614

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

courses/fundamentals_of_ada/135_visibility.rst

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,10 @@ Operators and Primitives
8080
"use" Clauses
8181
---------------
8282

83-
* Provide direct visibility into packages' exported items
83+
* :ada:`use Pkg;` provides direct visibility into public items in :ada:`Pkg`
8484

8585
+ :dfn:`Direct Visibility` - as if object was referenced from within package being used
86+
+ :dfn:`Public Items` - any entity defined in package spec public section
8687

8788
* May still use expanded name
8889

@@ -277,32 +278,32 @@ No Ambiguity Introduction
277278
"use type" and "use all type"
278279
-------------------------------
279280

280-
* Clauses can give visibility to subprogams using the specified type
281+
* :ada:`use type` makes **primitive operators** directly visible for specified type
281282

282-
* :ada:`use type`
283+
- Implicit and explicit operator function declarations
283284

284285
.. code:: Ada
285286
286287
use_type_clause ::= use type subtype_mark
287288
{, subtype_mark};
288289
289-
* Makes **primitive operators** directly visible for specified type
290290
291-
- Implicit and explicit operator function declarations
292291
293-
* :ada:`use all type` *(Only available in Ada 2012 or later)*
292+
* :ada:`use all type` makes primitive operators **and all other operations** directly visible for specified type
293+
294294

295295
.. code:: Ada
296296
297297
use_all_type_clause ::= use all type subtype_mark
298298
{, subtype_mark};
299299
300-
* Makes primitive operators **and all other operations** directly visible for specified type
301300
302301
* More specific alternative to :ada:`use` clauses
303302

304303
- Especially useful when multiple :ada:`use` clauses introduce ambiguity
305304

305+
*Note that* :ada:`use all type` *was introduced in Ada 2012*
306+
306307
--------------
307308
Example Code
308309
--------------
@@ -426,7 +427,7 @@ Writing Readable Code - Part 1
426427
The "renames" Keyword
427428
-----------------------
428429

429-
* Certain entities can be renamed within a declarative region
430+
* :ada:`renames` declaration creates an alias to an entity
430431

431432
- Packages
432433

0 commit comments

Comments
 (0)