Skip to content

Commit b694085

Browse files
Merge branch 'slides/131-replace_element_with_component' into 'master'
Resolve "Replace 'element' used in the slides with "component"" See merge request feng/training/material!295
2 parents c7360a4 + 069fb45 commit b694085

File tree

56 files changed

+238
-238
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+238
-238
lines changed

courses/fundamentals_of_ada/030_basic_types/06-character_types.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ Language-Defined Character Types
99
* :ada:`Character`
1010

1111
- 8-bit Latin-1
12-
- Base element of :ada:`String`
12+
- Base component of :ada:`String`
1313
- Uses attributes :ada:`'Image` / :ada:`'Value`
1414

1515
* :ada:`Wide_Character`
1616

1717
- 16-bit Unicode
18-
- Base element of :ada:`Wide_Strings`
18+
- Base component of :ada:`Wide_Strings`
1919
- Uses attributes :ada:`'Wide_Image` / :ada:`'Wide_Value`
2020

2121
* :ada:`Wide_Wide_Character`
2222

2323
- 32-bit Unicode
24-
- Base element of :ada:`Wide_Wide_Strings`
24+
- Base component of :ada:`Wide_Wide_Strings`
2525
- Uses attributes :ada:`'Wide_Wide_Image` / :ada:`'Wide_Wide_Value`
2626

2727
-----------------------------

courses/fundamentals_of_ada/050_array_types/02-constrained_array_types.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ Quiz
6363

6464
Explanations
6565

66-
A. Legal - elements are :ada:`Boolean`
66+
A. Legal - components are :ada:`Boolean`
6767
B. Legal - object types match
68-
C. Legal - elements are :ada:`Boolean`
69-
D. Although the sizes are the same and the elements are the same, the type is different
68+
C. Legal - components are :ada:`Boolean`
69+
D. Although the sizes are the same and the components are the same, the type is different
7070

courses/fundamentals_of_ada/050_array_types/03-unconstrained_array_types.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Null Index Range
8181

8282
* When :ada:`'Last` of the range is smaller than :ada:`'First`
8383

84-
* Array is empty - no elements
84+
* Array is empty - no components
8585

8686
* When using literals, the compiler will allow out-of-range numbers to indicate empty range
8787

@@ -189,7 +189,7 @@ Indefinite Types
189189
No Indefinite Component Types
190190
-------------------------------
191191

192-
* Arrays: consecutive elements of the exact **same type**
192+
* Arrays: consecutive components of the exact **same type**
193193
* Component size must be **defined**
194194

195195
- No indefinite types

courses/fundamentals_of_ada/050_array_types/05-operations.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ Which statement(s) is (are) legal?
172172
Explanations
173173

174174
A. All objects are just Boolean values
175-
B. An element of :ada:`A` is the same type as :ada:`B`
175+
B. A component of :ada:`A` is the same type as :ada:`B`
176176
C. Slice must be of outermost array
177177
D. Slicing allowed on single-dimension arrays
178178

courses/fundamentals_of_ada/050_array_types/06-looping_over_objects.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Note on Default Initialization for Array Types
77
------------------------------------------------
88

99
* In Ada, objects are not initialized by default
10-
* To initialize an array, you can initialize each element
10+
* To initialize an array, you can initialize each component
1111

1212
* But if the array type is used in multiple places, it would be better to initialize at the type level
1313
* No matter how many dimensions, there is only one component type
@@ -51,7 +51,7 @@ Two High-Level For-Loop Kinds
5151
Array/Container For-Loops
5252
---------------------------
5353

54-
* Work in terms of elements within an object
54+
* Work in terms of components within an object
5555
* Syntax hides indexing/iterator controls
5656

5757
.. code:: Ada
@@ -60,7 +60,7 @@ Array/Container For-Loops
6060
...
6161
end loop;
6262
63-
* Starts with "first" element unless you reverse it
63+
* Starts with "first" component unless you reverse it
6464
* Loop parameter name is a constant if iterating over a constant, a variable otherwise
6565

6666
..

courses/fundamentals_of_ada/050_array_types/07-aggregates.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ Aggregates in Ada 2022
269269
Illegal : Array_T := ();
270270
Ada2022 : Array_T := [];
271271
272-
* Single element array
272+
* Single component array
273273

274274
.. code:: Ada
275275
@@ -308,7 +308,7 @@ Iterated Component Association
308308
309309
Object2 := [for Item of Object => Item * 2];
310310
311-
* :ada:`Object2` will have each element doubled
311+
* :ada:`Object2` will have each component doubled
312312

313313
-------------------------------
314314
More Information on Iterators

courses/fundamentals_of_ada/065_discriminated_records/02-variant_records.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Mutable Variant Record
116116

117117
* An object can be created without a constraint (:ada:`Pat`)
118118
* Or we can create in immutable object where the discriminant cannot change (:ada:`Sam`)
119-
* And we can create an array whose element is mutable
119+
* And we can create an array whose component is mutable
120120

121121
--------------------------------
122122
Mutable Variant Record Example

courses/fundamentals_of_ada/065_discriminated_records/03-discriminant_record_array_size_idiom.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ Vectors of Varying Lengths
1919
+ Need two pieces of data
2020

2121
* Array contents
22-
* Location of last valid element
22+
* Location of last valid component
2323

2424
* For common usage, we want this to be a type (probably a record)
2525

2626
+ Maximum size array for contents
27-
+ Index for last valid element
27+
+ Index for last valid component
2828

2929
---------------------------------
3030
Simple Vector of Varying Length

courses/fundamentals_of_ada/075_type_derivation/01-introduction.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Type Derivation
1818
Reminder: What is a Type?
1919
---------------------------
2020

21-
* A type is characterized by two elements
21+
* A type is characterized by two components
2222

2323
- Its data structure
2424
- The set of operations that applies to it

courses/fundamentals_of_ada/080_expressions/05-quantified_expressions.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,8 @@ Quiz
354354
type Array2_T is array (1 .. 3) of Array1_T;
355355
A : Array2_T;
356356
357-
The above describes an array A whose elements are arrays of three elements.
358-
Which expression would one use to determine if at least one of A's elements are sorted?
357+
The above describes an array A whose components are arrays of three components.
358+
Which expression would one use to determine if at least one of A's components are sorted?
359359

360360
A. | ``(for some El of A => (for some Idx in 2 .. 3 =>``
361361
| ``El (Idx) >= El (Idx - 1)));``
@@ -368,8 +368,8 @@ D. | ``(for all El of A => (for some Idx in 2 .. 3 =>``
368368
369369
.. container:: animate
370370

371-
A. Will be :ada:`True` if any element has two consecutive increasing values
372-
B. Will be :ada:`True` if every element is sorted
371+
A. Will be :ada:`True` if any component has two consecutive increasing values
372+
B. Will be :ada:`True` if every component is sorted
373373
C. Correct
374-
D. Will be :ada:`True` if every element has two consecutive increasing values
374+
D. Will be :ada:`True` if every component has two consecutive increasing values
375375

0 commit comments

Comments
 (0)