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 99d1d3441..860b02b69 100644 --- a/courses/fundamentals_of_ada/030_basic_types/01-introduction.rst +++ b/courses/fundamentals_of_ada/030_basic_types/01-introduction.rst @@ -114,7 +114,7 @@ Categories of Types Scalar Types -------------- -* Indivisible: No components +* Indivisible: No :dfn:`components` (also known as *fields* or *elements*) * **Relational** operators defined (``<``, ``=``, ...) - **Ordered** diff --git a/courses/fundamentals_of_ada/060_record_types/01-introduction.rst b/courses/fundamentals_of_ada/060_record_types/01-introduction.rst index e6c1114c3..ac8e86178 100644 --- a/courses/fundamentals_of_ada/060_record_types/01-introduction.rst +++ b/courses/fundamentals_of_ada/060_record_types/01-introduction.rst @@ -22,8 +22,8 @@ Syntax and Examples .. code:: Ada type Record1_T is record - Field1 : Integer; - Field2 : Boolean; + Component1 : Integer; + Component2 : Boolean; end record; * Records can be **discriminated** as well diff --git a/courses/fundamentals_of_ada/060_record_types/04-aggregates.rst b/courses/fundamentals_of_ada/060_record_types/04-aggregates.rst index f4e55376b..06a5f7fc6 100644 --- a/courses/fundamentals_of_ada/060_record_types/04-aggregates.rst +++ b/courses/fundamentals_of_ada/060_record_types/04-aggregates.rst @@ -249,7 +249,7 @@ Quiz .. code:: Ada type Nested_T is record - Field : Integer; + Component : Integer; end record; type Record_T is record One : Integer; diff --git a/courses/fundamentals_of_ada/060_record_types/06-variant_records.rst b/courses/fundamentals_of_ada/060_record_types/06-variant_records.rst index 873054450..e2f3f5734 100644 --- a/courses/fundamentals_of_ada/060_record_types/06-variant_records.rst +++ b/courses/fundamentals_of_ada/060_record_types/06-variant_records.rst @@ -32,7 +32,7 @@ Immutable Variant Record type Person_Group is (Student, Faculty); type Person (Group : Person_Group) is record - -- Fields common across all discriminants + -- Components common across all discriminants -- (must appear before variant part) Age : Positive; case Group is -- Variant part of record @@ -46,11 +46,11 @@ Immutable Variant Record * In a variant record, a discriminant can be used to specify the :dfn:`variant part` (line 8) + Similar to case statements (all values must be covered) - + Fields listed will only be visible if choice matches discriminant - + Field names need to be unique (even across discriminants) + + Components listed will only be visible if choice matches discriminant + + Component names need to be unique (even across discriminants) + Variant part must be end of record (hence only one variant part allowed) -* Discriminant is treated as any other field +* Discriminant is treated as any other component * But is a constant in an immutable variant record @@ -60,7 +60,7 @@ Immutable Variant Record Immutable Variant Record Example ---------------------------------- -* Each object of :ada:`Person` has three fields, but it depends on :ada:`Group` +* Each object of :ada:`Person` has three components, but it depends on :ada:`Group` .. code:: Ada @@ -69,7 +69,7 @@ Immutable Variant Record Example * :ada:`Pat` has :ada:`Group`, :ada:`Age`, and :ada:`Gpa` * :ada:`Sam` has :ada:`Group`, :ada:`Age`, and :ada:`Pubs` - * Aggregate specifies all fields, including the discriminant + * Aggregate specifies all components, including the discriminant * Compiler can detect some problems, but more often clashes are run-time errors @@ -121,7 +121,7 @@ Mutable Variant Record Mutable Variant Record Example -------------------------------- -* Each object of :ada:`Person` has three fields, but it depends on :ada:`Group` +* Each object of :ada:`Person` has three components, but it depends on :ada:`Group` .. code:: Ada diff --git a/courses/fundamentals_of_ada/065_discriminated_records/01-introduction.rst b/courses/fundamentals_of_ada/065_discriminated_records/01-introduction.rst index bdeca6ec5..ec0f8998f 100644 --- a/courses/fundamentals_of_ada/065_discriminated_records/01-introduction.rst +++ b/courses/fundamentals_of_ada/065_discriminated_records/01-introduction.rst @@ -31,7 +31,7 @@ Defining a Discriminated Record * **Discriminant** controls behavior of the record * Part of record definition - * Can be read as any other field + * Can be read as any other component * But can only be modified by object assignment (sometimes) diff --git a/courses/fundamentals_of_ada/065_discriminated_records/02-variant_records.rst b/courses/fundamentals_of_ada/065_discriminated_records/02-variant_records.rst index ef4f31e13..95e7ad8f3 100644 --- a/courses/fundamentals_of_ada/065_discriminated_records/02-variant_records.rst +++ b/courses/fundamentals_of_ada/065_discriminated_records/02-variant_records.rst @@ -6,7 +6,7 @@ Variant Records What is a Variant Record? --------------------------- -* A :dfn:`variant record` uses the discriminant to determine which fields are currently accessible +* A :dfn:`variant record` uses the discriminant to determine which components are currently accessible .. code:: Ada @@ -133,7 +133,7 @@ Mutable Variant Record Example end if; Update (Pat); -* But you cannot change the discriminant like a regular field +* But you cannot change the discriminant like a regular component .. code:: Ada @@ -220,7 +220,7 @@ Quiz .. container:: latex_environment footnotesize - * If you fix the compilation error (by changing the name of one of the :ada:`End_Point` fields), then + * If you fix the compilation error (by changing the name of one of the :ada:`End_Point` components), then * You would get a warning on line 20 (because :ada:`A_Line` is constrained to be a :ada:`Line` diff --git a/courses/fundamentals_of_ada/065_discriminated_records/03-discriminant_record_array_size_idiom.rst b/courses/fundamentals_of_ada/065_discriminated_records/03-discriminant_record_array_size_idiom.rst index 5d0f06d59..2f48b1e05 100644 --- a/courses/fundamentals_of_ada/065_discriminated_records/03-discriminant_record_array_size_idiom.rst +++ b/courses/fundamentals_of_ada/065_discriminated_records/03-discriminant_record_array_size_idiom.rst @@ -44,7 +44,7 @@ Simple Vector of Varying Length Obj2 : Simple_Vstring := (0, (others => '+')); Obj3 : Simple_Vstring; -* Issue - Operations need to consider :ada:`Last` field +* Issue - Operations need to consider :ada:`Last` component * :ada:`Obj1 = Obj2` will be false * Can redefine :ada:`=` to be something like diff --git a/courses/fundamentals_of_ada/065_discriminated_records/04-interfacing_with_c.rst b/courses/fundamentals_of_ada/065_discriminated_records/04-interfacing_with_c.rst index 0fc86d983..fcae7c875 100644 --- a/courses/fundamentals_of_ada/065_discriminated_records/04-interfacing_with_c.rst +++ b/courses/fundamentals_of_ada/065_discriminated_records/04-interfacing_with_c.rst @@ -11,9 +11,9 @@ Passing Records Between Ada and C .. code:: C struct Struct_T { - int Field1; - char Field2; - float Field3; + int Component1; + char Component2; + float Component3; }; int DoSomething (struct Struct_T); @@ -32,9 +32,9 @@ Building a C-Compatible Record .. code:: Ada type Struct_T is record - Field1 : Interfaces.C.int; - Field2 : Interfaces.C.char; - Field3 : Interfaces.C.C_Float; + Component1 : Interfaces.C.int; + Component2 : Interfaces.C.char; + Component3 : Interfaces.C.C_Float; end record; * We use types from :ada:`Interfaces.C` to map directly to the C types @@ -46,9 +46,9 @@ Building a C-Compatible Record .. code:: Ada type Struct_T is record - Field1 : Interfaces.C.int; - Field2 : Interfaces.C.char; - Field3 : Interfaces.C.C_Float; + Component1 : Interfaces.C.int; + Component2 : Interfaces.C.char; + Component3 : Interfaces.C.C_Float; end record with Convention => C_Pass_By_Copy; ------------------------- @@ -64,9 +64,9 @@ Mapping Ada to C Unions .. code:: C union Union_T { - int Field1; - char Field2; - float Field3; + int Component1; + char Component2; + float Component3; }; * By using a discriminant record and adding aspect :ada:`Unchecked_Union` @@ -75,9 +75,9 @@ Mapping Ada to C Unions type C_Union_T (View : natural := 0) is record case View is - when 0 => Field1 : Interfaces.C.int; - when 1 => Field2 : Interfaces.C.char; - when 2 => Field3 : Interfaces.C.C_Float; + when 0 => Component1 : Interfaces.C.int; + when 1 => Component2 : Interfaces.C.char; + when 2 => Component3 : Interfaces.C.C_Float; when others => null; end case; end record with Convention => C_Pass_By_Copy, @@ -92,9 +92,9 @@ Quiz .. code:: C union Union_T { - struct Record_T field1; - char field2[11]; - float field3; + struct Record_T component1; + char component2[11]; + float component3; }; .. code:: Ada diff --git a/courses/fundamentals_of_ada/065_discriminated_records/99-summary.rst b/courses/fundamentals_of_ada/065_discriminated_records/99-summary.rst index 87beff9c8..032a96c4d 100644 --- a/courses/fundamentals_of_ada/065_discriminated_records/99-summary.rst +++ b/courses/fundamentals_of_ada/065_discriminated_records/99-summary.rst @@ -9,7 +9,7 @@ Properties of Discriminated Record Types * Rules - Case choices for variants must partition possible values for discriminant - - Field names must be unique across all variants + - Component names must be unique across all variants * Style diff --git a/courses/fundamentals_of_ada/100_packages/03-referencing_other_packages.rst b/courses/fundamentals_of_ada/100_packages/03-referencing_other_packages.rst index fccaa18d2..ca5965ab8 100644 --- a/courses/fundamentals_of_ada/100_packages/03-referencing_other_packages.rst +++ b/courses/fundamentals_of_ada/100_packages/03-referencing_other_packages.rst @@ -92,7 +92,7 @@ What To Import with A; package B is type Something is record - Field : A.Something; + Component : A.Something; end record; end B; @@ -100,5 +100,5 @@ What To Import procedure Foo is X : B.Something; begin - X.Field := ... + X.Component := ... diff --git a/courses/fundamentals_of_ada/110_private_types/02-implementing_abstract_data_types_via_views.rst b/courses/fundamentals_of_ada/110_private_types/02-implementing_abstract_data_types_via_views.rst index e64ee57f4..36683e7ac 100644 --- a/courses/fundamentals_of_ada/110_private_types/02-implementing_abstract_data_types_via_views.rst +++ b/courses/fundamentals_of_ada/110_private_types/02-implementing_abstract_data_types_via_views.rst @@ -173,10 +173,10 @@ Quiz Which component(s) is (are) legal? - A. ``Field_A : Integer := Private_T'Pos (Private_T'First);`` - B. ``Field_B : Private_T := null;`` - C. ``Field_C : Private_T := 0;`` - D. :answermono:`Field_D : Integer := Private_T'Size;` + A. ``Component_A : Integer := Private_T'Pos (Private_T'First);`` + B. ``Component_B : Private_T := null;`` + C. ``Component_C : Private_T := 0;`` + D. :answermono:`Component_D : Integer := Private_T'Size;` .. code:: Ada diff --git a/courses/fundamentals_of_ada/120_limited_types/05-combining_limited_and_private_views.rst b/courses/fundamentals_of_ada/120_limited_types/05-combining_limited_and_private_views.rst index 3d50f3823..27b05e270 100644 --- a/courses/fundamentals_of_ada/120_limited_types/05-combining_limited_and_private_views.rst +++ b/courses/fundamentals_of_ada/120_limited_types/05-combining_limited_and_private_views.rst @@ -193,16 +193,16 @@ Quiz type P2_T is private; private type L1_T is limited record - Field : Integer; + Component : Integer; end record; type L2_T is record - Field : Integer; + Component : Integer; end record; type P1_T is limited record - Field : L1_T; + Component : L1_T; end record; type P2_T is record - Field : L2_T; + Component : L2_T; end record; end P; diff --git a/courses/fundamentals_of_ada/140_access_types/08-memory_management.rst b/courses/fundamentals_of_ada/140_access_types/08-memory_management.rst index 485c09351..d9c4569ac 100644 --- a/courses/fundamentals_of_ada/140_access_types/08-memory_management.rst +++ b/courses/fundamentals_of_ada/140_access_types/08-memory_management.rst @@ -40,11 +40,11 @@ Incomplete Types type Unconstrained_Record_Access_T is access all Unconstrained_Record_T; type Some_Record_T is record - Field : String (1 .. 10); + Component : String (1 .. 10); end record; type Unconstrained_Record_T (Size : Index_T) is record - Field : String (1 .. Size); + Component : String (1 .. Size); end record; -------------------- @@ -56,14 +56,14 @@ Linked List in Ada .. code:: Ada type Some_Record_T is record - Field : String (1 .. 10); - Next : Some_Record_Access_T; + Component : String (1 .. 10); + Next : Some_Record_Access_T; end record; type Unconstrained_Record_T (Size : Index_T) is record - Field : String (1 .. Size); - Next : Unconstrained_Record_Access_T; - Previous : Unconstrained_Record_Access_T; + Component : String (1 .. Size); + Next : Unconstrained_Record_Access_T; + Previous : Unconstrained_Record_Access_T; end record; ------------------------ @@ -78,8 +78,8 @@ Simplistic Linked List type Some_Record_T; type Some_Record_Access_T is access all Some_Record_T; type Some_Record_T is record - Field : String (1 .. 10); - Next : Some_Record_Access_T; + Component : String (1 .. 10); + Next : Some_Record_Access_T; end record; Head : Some_Record_Access_T := null; @@ -105,7 +105,7 @@ Simplistic Linked List Put_Line ("List"); while Head /= null loop - Put_Line (" " & Head.Field); + Put_Line (" " & Head.Component); Head := Head.Next; end loop; diff --git a/courses/fundamentals_of_ada/160_genericity/04-generic_formal_data_in_depth.rst b/courses/fundamentals_of_ada/160_genericity/04-generic_formal_data_in_depth.rst index da4aa1a6c..e69667a35 100644 --- a/courses/fundamentals_of_ada/160_genericity/04-generic_formal_data_in_depth.rst +++ b/courses/fundamentals_of_ada/160_genericity/04-generic_formal_data_in_depth.rst @@ -127,10 +127,10 @@ And the following declarations: .. code:: Ada type Record_T is record - Field : Integer; + Component : Integer; end record; function Add (L : Record_T; I : Integer) return Record_T is - ((Field => L.Field + I)) + ((Component => L.Component + I)) function Weird (L : Integer; R : Integer) return Integer is (0); Which of the following instantiation(s) is/are **not** legal? diff --git a/courses/fundamentals_of_ada/170_tagged_derivation/02-tagged_derivation-simple.rst b/courses/fundamentals_of_ada/170_tagged_derivation/02-tagged_derivation-simple.rst index 348cdb728..1146646e1 100644 --- a/courses/fundamentals_of_ada/170_tagged_derivation/02-tagged_derivation-simple.rst +++ b/courses/fundamentals_of_ada/170_tagged_derivation/02-tagged_derivation-simple.rst @@ -96,7 +96,7 @@ Freeze Point for Tagged Types Tagged Aggregate ------------------ -* At initialization, all fields (including **inherited**) must have a **value** +* At initialization, all components (including **inherited**) must have a **value** .. code:: Ada @@ -113,7 +113,7 @@ Tagged Aggregate * For **private types** use :dfn:`aggregate extension` - Copy of a parent instance - - Use :ada:`with null record` absent new fields + - Use :ada:`with null record` absent new components .. code:: Ada @@ -199,26 +199,26 @@ Which code block(s) is (are) legal? .. container:: column A. | ``type A1 is record`` - | ``Field1 : Integer;`` + | ``Component1 : Integer;`` | ``end record;`` | ``type A2 is new A1 with null record;`` B. | :answermono:`type B1 is tagged record` - | :answermono:`Field2 : Integer;` + | :answermono:`Component2 : Integer;` | :answermono:`end record;` | :answermono:`type B2 is new B1 with record` - | :answermono:`Field2b : Integer;` + | :answermono:`Component2b : Integer;` | :answermono:`end record;` .. container:: column C. | ``type C1 is tagged record`` - | ``Field3 : Integer;`` + | ``Component3 : Integer;`` | ``end record;`` | ``type C2 is new C1 with record`` - | ``Field3 : Integer;`` + | ``Component3 : Integer;`` | ``end record;`` D. | ``type D1 is tagged record`` - | ``Field1 : Integer;`` + | ``Component1 : Integer;`` | ``end record;`` | ``type D2 is new D1;`` diff --git a/courses/fundamentals_of_ada/170_tagged_derivation/02-tagged_derivation.rst b/courses/fundamentals_of_ada/170_tagged_derivation/02-tagged_derivation.rst index 9bc05675f..fb40ee92c 100644 --- a/courses/fundamentals_of_ada/170_tagged_derivation/02-tagged_derivation.rst +++ b/courses/fundamentals_of_ada/170_tagged_derivation/02-tagged_derivation.rst @@ -154,26 +154,26 @@ Which code block(s) is (are) legal? .. container:: column A. | ``type A1 is record`` - | ``Field1 : Integer;`` + | ``Component1 : Integer;`` | ``end record;`` | ``type A2 is new A1 with null record;`` B. | :answermono:`type B1 is tagged record` - | :answermono:`Field2 : Integer;` + | :answermono:`Component2 : Integer;` | :answermono:`end record;` | :answermono:`type B2 is new B1 with record` - | :answermono:`Field2b : Integer;` + | :answermono:`Component2b : Integer;` | :answermono:`end record;` .. container:: column C. | ``type C1 is tagged record`` - | ``Field3 : Integer;`` + | ``Component3 : Integer;`` | ``end record;`` | ``type C2 is new C1 with record`` - | ``Field3 : Integer;`` + | ``Component3 : Integer;`` | ``end record;`` D. | ``type D1 is tagged record`` - | ``Field1 : Integer;`` + | ``Component1 : Integer;`` | ``end record;`` | ``type D2 is new D1;`` diff --git a/courses/fundamentals_of_ada/170_tagged_derivation/03-extending_tagged_types.rst b/courses/fundamentals_of_ada/170_tagged_derivation/03-extending_tagged_types.rst index 1403ae593..d5951af78 100644 --- a/courses/fundamentals_of_ada/170_tagged_derivation/03-extending_tagged_types.rst +++ b/courses/fundamentals_of_ada/170_tagged_derivation/03-extending_tagged_types.rst @@ -8,9 +8,9 @@ How Do You Extend a Tagged Type? * Premise of a tagged type is to :dfn:`extend` an existing type -* In general, that means we want to add more fields +* In general, that means we want to add more components - * We can extend a :ada:`tagged` type by adding fields + * We can extend a :ada:`tagged` type by adding components .. code:: Ada @@ -38,7 +38,7 @@ How Do You Extend a Tagged Type? Tagged Aggregate ------------------ -* At initialization, all fields (including **inherited**) must have a **value** +* At initialization, all components (including **inherited**) must have a **value** .. code:: Ada @@ -98,7 +98,7 @@ Private Tagged Types Private Extensions -------------------- -* In the previous slide, we exposed the fields for :ada:`Mammal_T`! +* In the previous slide, we exposed the components for :ada:`Mammal_T`! * Better would be to make the extension itself private @@ -143,7 +143,7 @@ Aggregates with Private Tagged Types Null Extensions ----------------- -* To create a new type with no additional fields +* To create a new type with no additional components * We still need to "extend" the record - we just do it with an empty record @@ -152,7 +152,7 @@ Null Extensions type Dog_T is new Canine_T with null record; -* We still need to specify the "added" fields in an aggregate +* We still need to specify the "added" components in an aggregate .. code:: Ada @@ -199,6 +199,6 @@ Which completion(s) of Create is (are) valid? A. Correct - :ada:`Parents.Create` returns :ada:`Parent_T` B. Cannot use :ada:`others` to complete private part of an aggregate - C. Aggregate has no visibility to :ada:`Id` field, so cannot assign + C. Aggregate has no visibility to :ada:`Id` component, so cannot assign D. Correct - :ada:`P` is a :ada:`Parent_T` diff --git a/courses/fundamentals_of_ada/175_multiple_inheritance/01-introduction.rst b/courses/fundamentals_of_ada/175_multiple_inheritance/01-introduction.rst index daa8659d3..3ee3ed6f0 100644 --- a/courses/fundamentals_of_ada/175_multiple_inheritance/01-introduction.rst +++ b/courses/fundamentals_of_ada/175_multiple_inheritance/01-introduction.rst @@ -28,7 +28,7 @@ Multiple Inheritance Is Forbidden in Ada Multiple Inheritance - Safe Case ---------------------------------- -* If only one type has concrete operations and fields, this is fine +* If only one type has concrete operations and components, this is fine .. code:: Ada diff --git a/courses/fundamentals_of_ada/175_multiple_inheritance/02-interfaces.rst b/courses/fundamentals_of_ada/175_multiple_inheritance/02-interfaces.rst index 10dbb9d8b..6d78aba2a 100644 --- a/courses/fundamentals_of_ada/175_multiple_inheritance/02-interfaces.rst +++ b/courses/fundamentals_of_ada/175_multiple_inheritance/02-interfaces.rst @@ -10,7 +10,7 @@ Interfaces - Rules - Abstract primitives - Null primitives - - No fields + - No components * Null subprograms provide default empty bodies to primitives that can be overridden diff --git a/courses/fundamentals_of_ada/180_polymorphism/02-classes_of_types.rst b/courses/fundamentals_of_ada/180_polymorphism/02-classes_of_types.rst index 226074392..eacd08f2e 100644 --- a/courses/fundamentals_of_ada/180_polymorphism/02-classes_of_types.rst +++ b/courses/fundamentals_of_ada/180_polymorphism/02-classes_of_types.rst @@ -23,7 +23,7 @@ Classes * Objects of type :ada:`Root'Class` have at least the properties of `Root` - - Fields of `Root` + - Components of `Root` - Primitives of `Root` ----------------- diff --git a/courses/fundamentals_of_ada/180_polymorphism/04-exotic_dispatching_operations.rst b/courses/fundamentals_of_ada/180_polymorphism/04-exotic_dispatching_operations.rst index 2ca9c5057..78780159b 100644 --- a/courses/fundamentals_of_ada/180_polymorphism/04-exotic_dispatching_operations.rst +++ b/courses/fundamentals_of_ada/180_polymorphism/04-exotic_dispatching_operations.rst @@ -69,7 +69,7 @@ Controlling Result (1/2) type Animal is tagged null record; function Feed_Treats (Number_Of_Treats : Integer) return Animal; -* If the child adds fields, all such subprograms have to be overridden +* If the child adds components, all such subprograms have to be overridden .. code:: Ada diff --git a/courses/fundamentals_of_ada/280_low_level_programming/02-data_representation.rst b/courses/fundamentals_of_ada/280_low_level_programming/02-data_representation.rst index d17a03cf9..3d3240684 100644 --- a/courses/fundamentals_of_ada/280_low_level_programming/02-data_representation.rst +++ b/courses/fundamentals_of_ada/280_low_level_programming/02-data_representation.rst @@ -187,7 +187,7 @@ Record Representation Clauses - Driver mapped on the address space, communication protocol... - * Fields represented as + * Components represented as .. code:: Ada @@ -294,15 +294,15 @@ Change of Representation .. code:: Ada type Rec_T is record - Field1 : Unsigned_8; - Field2 : Unsigned_16; - Field3 : Unsigned_8; + Component1 : Unsigned_8; + Component2 : Unsigned_16; + Component3 : Unsigned_8; end record; type Packed_Rec_T is new Rec_T; for Packed_Rec_T use record - Field1 at 0 range 0 .. 7; - Field2 at 0 range 8 .. 23; - Field3 at 0 range 24 .. 31; + Component1 at 0 range 0 .. 7; + Component2 at 0 range 8 .. 23; + Component3 at 0 range 24 .. 31; end record; R : Rec_T; P : Packed_Rec_T; diff --git a/courses/fundamentals_of_ada/902_future_capabilities.rst b/courses/fundamentals_of_ada/902_future_capabilities.rst index 3e3af577b..7cdfe2f57 100644 --- a/courses/fundamentals_of_ada/902_future_capabilities.rst +++ b/courses/fundamentals_of_ada/902_future_capabilities.rst @@ -724,7 +724,7 @@ Redesign of Object Orientation (1/2) * Ada OOP model contains syntactical oddities - Relation between type and methods is difficult to track - - No way to selectively hide/show fields + - No way to selectively hide/show components - No proper constructor/destructor - Calls are not dispatching by default - Access type can only access one type in hierarchy by default diff --git a/courses/fundamentals_of_ada/examples/090_overloading/composition_of_equality.rst b/courses/fundamentals_of_ada/examples/090_overloading/composition_of_equality.rst index 44c44a96c..d42198a8d 100644 --- a/courses/fundamentals_of_ada/examples/090_overloading/composition_of_equality.rst +++ b/courses/fundamentals_of_ada/examples/090_overloading/composition_of_equality.rst @@ -6,12 +6,12 @@ function "=" (L, R : My_Integer) return Boolean is (False); -- for illustration purposes type Record_T is tagged record - Field : My_Integer := 0; + Component : My_Integer := 0; end record; type Record_Vector is array (My_Integer range 1 .. 10) of Record_T; I1, I2 : constant My_Integer := 0; - R1, R2 : constant Record_Vector := (others => (Field => 0)); + R1, R2 : constant Record_Vector := (others => (Component => 0)); begin -- uses primitive "=" => False Put_Line (Boolean'Image (I1 = I2)); diff --git a/courses/fundamentals_of_ada/examples/140_access_types/accessibility_checks.rst b/courses/fundamentals_of_ada/examples/140_access_types/accessibility_checks.rst index d6c617c94..380e901e3 100644 --- a/courses/fundamentals_of_ada/examples/140_access_types/accessibility_checks.rst +++ b/courses/fundamentals_of_ada/examples/140_access_types/accessibility_checks.rst @@ -12,8 +12,8 @@ type Recursive_Record_T; type Global_Access_T is access all Recursive_Record_T; type Recursive_Record_T is record - Field : Integer; - Next : Global_Access_T := null; + Component : Integer; + Next : Global_Access_T := null; end record; Global_Pointer : Global_Access_T; Global_Object : aliased Recursive_Record_T; @@ -23,16 +23,16 @@ Local_Object : aliased Recursive_Record_T; begin Global_Pointer := Global_Object'Access; - Put_Line (Integer'Image (Global_Pointer.Field)); + Put_Line (Integer'Image (Global_Pointer.Component)); -- Global_Pointer := Local_Object'Access; -- illegal Global_Pointer := Local_Object'Unchecked_Access; - Put_Line (Integer'Image (Global_Pointer.Field)); + Put_Line (Integer'Image (Global_Pointer.Component)); Local_Pointer := Global_Object'Access; - Put_Line (Integer'Image (Local_Pointer.Field)); + Put_Line (Integer'Image (Local_Pointer.Component)); Local_Pointer := Local_Object'Access; - Put_Line (Integer'Image (Local_Pointer.Field)); + Put_Line (Integer'Image (Local_Pointer.Component)); Local_Pointer := Local_Access_T (Global_Pointer); - Put_Line (Integer'Image (Local_Pointer.Field)); + Put_Line (Integer'Image (Local_Pointer.Component)); -- Global_Pointer := Global_Access_T (Local_Pointer); -- illegal end Proc_Access; diff --git a/courses/fundamentals_of_ada/examples/160_genericity/generic_data.rst b/courses/fundamentals_of_ada/examples/160_genericity/generic_data.rst index 088872b26..37cf57e07 100644 --- a/courses/fundamentals_of_ada/examples/160_genericity/generic_data.rst +++ b/courses/fundamentals_of_ada/examples/160_genericity/generic_data.rst @@ -80,7 +80,7 @@ package Types is type Hidden_T; type Tagged_Record_T is tagged record - Field : access Hidden_T; + Component : access Hidden_T; end record; type Hidden_T is private; type Boolean_Array_Of_Integers_T is array (Boolean) of Integer; diff --git a/courses/fundamentals_of_ada/examples/170_tagged_derivation/primitives.rst b/courses/fundamentals_of_ada/examples/170_tagged_derivation/primitives.rst index b995e034d..7a5d531b4 100644 --- a/courses/fundamentals_of_ada/examples/170_tagged_derivation/primitives.rst +++ b/courses/fundamentals_of_ada/examples/170_tagged_derivation/primitives.rst @@ -4,14 +4,14 @@ package Primitives_Example is type Record_T is record - Field : Integer; + Component : Integer; end record; type Access_To_Record_T is access Record_T; type Array_T is array (1 .. 10) of Integer; procedure Primitive_Of_Record_T (P : in out Record_T) is null; function Primitive_Of_Record_T (P : Integer) return Record_T is - ((Field => P)); + ((Component => P)); procedure Primitive_Of_Record_T (I : Integer; P : access Record_T) is null; procedure Not_A_Primitive_Of_Record_T diff --git a/courses/fundamentals_of_ada/examples/170_tagged_derivation/tagged_derivation.rst b/courses/fundamentals_of_ada/examples/170_tagged_derivation/tagged_derivation.rst index 43250138f..e28864b1a 100644 --- a/courses/fundamentals_of_ada/examples/170_tagged_derivation/tagged_derivation.rst +++ b/courses/fundamentals_of_ada/examples/170_tagged_derivation/tagged_derivation.rst @@ -4,25 +4,25 @@ package Tagged_Derivation is type Root_T is tagged record - Root_Field : Integer; + Root_Component : Integer; end record; - function Primitive_1 (This : Root_T) return Integer is (This.Root_Field); + function Primitive_1 (This : Root_T) return Integer is (This.Root_Component); function Primitive_2 (This : Root_T) return String is - (Integer'Image (This.Root_Field)); + (Integer'Image (This.Root_Component)); type Child_T is new Root_T with record - Child_Field : Integer; + Child_Component : Integer; end record; overriding function Primitive_2 (This : Child_T) return String is - (Integer'Image (This.Root_Field) & " " & - Integer'Image (This.Child_Field)); + (Integer'Image (This.Root_Component) & " " & + Integer'Image (This.Child_Component)); function Primitive_3 (This : Child_T) return Integer is - (This.Root_Field + This.Child_Field); + (This.Root_Component + This.Child_Component); -- type Simple_Deriviation_T is new Child_T; -- illegal type Root2_T is tagged record - Root_Field : Integer; + Root_Component : Integer; end record; -- procedure Primitive_4 (X : Root_T; Y : Root2_T); -- illegal @@ -31,8 +31,8 @@ with Ada.Text_IO; use Ada.Text_IO; with Tagged_Derivation; use Tagged_Derivation; procedure Test_Tagged_Derivation is - Root : Root_T := (Root_Field => 1); - Child : Child_T := (Root_Field => 11, Child_Field => 22); + Root : Root_T := (Root_Component => 1); + Child : Child_T := (Root_Component => 11, Child_Component => 22); begin Put_Line ("Root: " & Primitive_2 (Root)); Put_Line ("Child: " & Primitive_2 (Child)); @@ -40,6 +40,6 @@ Put_Line ("Root from Child: " & Primitive_2 (Root)); -- Child := Child_T (Root); -- illegal -- Put_Line ("Child from Root: " & Primitive_2 (Child)); -- illegal - Child := (Root with Child_Field => 999); + Child := (Root with Child_Component => 999); Put_Line ("Child from Root via aggregate: " & Primitive_2 (Child)); end Test_Tagged_Derivation; diff --git a/courses/fundamentals_of_ada/labs/160_genericity.lab.rst b/courses/fundamentals_of_ada/labs/160_genericity.lab.rst index fc704f22e..e419b34b0 100644 --- a/courses/fundamentals_of_ada/labs/160_genericity.lab.rst +++ b/courses/fundamentals_of_ada/labs/160_genericity.lab.rst @@ -4,7 +4,7 @@ Genericity Lab * Requirements - - Create a record structure containing multiple fields + - Create a record structure containing multiple components - Need subprograms to convert the record to a string, and compare the order of two records - Lab prompt package :ada:`Data_Type` contains a framework diff --git a/courses/fundamentals_of_ada/labs/230_interfacing_with_c.lab.rst b/courses/fundamentals_of_ada/labs/230_interfacing_with_c.lab.rst index e99e85741..478d68863 100644 --- a/courses/fundamentals_of_ada/labs/230_interfacing_with_c.lab.rst +++ b/courses/fundamentals_of_ada/labs/230_interfacing_with_c.lab.rst @@ -17,7 +17,7 @@ Interfacing with C Lab * Hints - - Structure contains the following fields + - Structure contains the following components + Distance (floating point) + Distance Type (enumeral) diff --git a/courses/fundamentals_of_ada/labs/280_low_level_programming.lab.rst b/courses/fundamentals_of_ada/labs/280_low_level_programming.lab.rst index 33d2b9425..d330c1bee 100644 --- a/courses/fundamentals_of_ada/labs/280_low_level_programming.lab.rst +++ b/courses/fundamentals_of_ada/labs/280_low_level_programming.lab.rst @@ -28,8 +28,8 @@ Project Requirements * Message should at least contain: * Unique Identifier - * (Constrained) string field - * Two other fields + * (Constrained) string component + * Two other components * CRC value * "Send" / "Receive" diff --git a/courses/fundamentals_of_ada/labs/893_ada_numerics.lab.rst b/courses/fundamentals_of_ada/labs/893_ada_numerics.lab.rst index 653a7d149..9e3c1730d 100644 --- a/courses/fundamentals_of_ada/labs/893_ada_numerics.lab.rst +++ b/courses/fundamentals_of_ada/labs/893_ada_numerics.lab.rst @@ -20,9 +20,9 @@ Ada.Numerics Lab * For each iteration of the loop, pick a random element in the array * For the selected element - * Increment the counter field + * Increment the counter component * Find a random floating point number between 1_000 and 9_999 - * Add the square root of the number to the floating point field + * Add the square root of the number to the floating point component * For each index in the array diff --git a/courses/fundamentals_of_ada/labs/answers/160_genericity.txt b/courses/fundamentals_of_ada/labs/answers/160_genericity.txt index dfd31f382..53ee1bb83 100644 --- a/courses/fundamentals_of_ada/labs/answers/160_genericity.txt +++ b/courses/fundamentals_of_ada/labs/answers/160_genericity.txt @@ -1,20 +1,20 @@ package Data_Type is type Record_T is record - Integer_Field : Integer; - Character_Field : Character; + Integer_Component : Integer; + Character_Component : Character; end record; function ">" (L, R : Record_T) return Boolean is - (if L.Character_Field > R.Character_Field then True - elsif L.Character_Field < R.Character_Field then False - else L.Integer_Field > R.Integer_Field); + (if L.Character_Component > R.Character_Component then True + elsif L.Character_Component < R.Character_Component then False + else L.Integer_Component > R.Integer_Component); function Image (Element : Record_T) return String is - (Element.Character_Field & " =>" & Integer'Image (Element.Integer_Field)); + (Element.Character_Component & " =>" & Integer'Image (Element.Integer_Component)); end Data_Type; @@ -92,22 +92,22 @@ procedure Main is Element : Data_Type.Record_T; begin - List.Add (My_List, (Integer_Field => 111, - Character_Field => 'a')); - List.Add (My_List, (Integer_Field => 111, - Character_Field => 'z')); - List.Add (My_List, (Integer_Field => 111, - Character_Field => 'A')); - List.Add (My_List, (Integer_Field => 999, - Character_Field => 'B')); - List.Add (My_List, (Integer_Field => 999, - Character_Field => 'Y')); - List.Add (My_List, (Integer_Field => 999, - Character_Field => 'b')); - List.Add (My_List, (Integer_Field => 112, - Character_Field => 'a')); - List.Add (My_List, (Integer_Field => 998, - Character_Field => 'z')); + List.Add (My_List, (Integer_Component => 111, + Character_Component => 'a')); + List.Add (My_List, (Integer_Component => 111, + Character_Component => 'z')); + List.Add (My_List, (Integer_Component => 111, + Character_Component => 'A')); + List.Add (My_List, (Integer_Component => 999, + Character_Component => 'B')); + List.Add (My_List, (Integer_Component => 999, + Character_Component => 'Y')); + List.Add (My_List, (Integer_Component => 999, + Character_Component => 'b')); + List.Add (My_List, (Integer_Component => 112, + Character_Component => 'a')); + List.Add (My_List, (Integer_Component => 998, + Character_Component => 'z')); List.Sort (My_List); List.Print (My_List); diff --git a/courses/fundamentals_of_ada/labs/answers/ada95/160_genericity.txt b/courses/fundamentals_of_ada/labs/answers/ada95/160_genericity.txt index 17dcccc68..fa8c442be 100644 --- a/courses/fundamentals_of_ada/labs/answers/ada95/160_genericity.txt +++ b/courses/fundamentals_of_ada/labs/answers/ada95/160_genericity.txt @@ -1,7 +1,7 @@ package Data_Type is type Record_T is record - Integer_Field : Integer; - Character_Field : Character; + Integer_Component : Integer; + Character_Component : Character; end record; function ">" (L, R : Record_T) return Boolean; @@ -14,19 +14,19 @@ package body Data_Type is function ">" (L, R : Record_T) return Boolean is begin - if L.Character_Field > R.Character_Field then + if L.Character_Component > R.Character_Component then return True; - elsif L.Character_Field < R.Character_Field then + elsif L.Character_Component < R.Character_Component then return False; else - return L.Integer_Field > R.Integer_Field; + return L.Integer_Component > R.Integer_Component; end if; end ">"; function Image (Element : Record_T) return String is begin - return Element.Character_Field & " =>" & - Integer'Image (Element.Integer_Field); + return Element.Character_Component & " =>" & + Integer'Image (Element.Integer_Component); end Image; end Data_Type; @@ -105,22 +105,22 @@ procedure Main is Element : Data_Type.Record_T; begin - List.Add (My_List, (Integer_Field => 111, - Character_Field => 'a')); - List.Add (My_List, (Integer_Field => 111, - Character_Field => 'z')); - List.Add (My_List, (Integer_Field => 111, - Character_Field => 'A')); - List.Add (My_List, (Integer_Field => 999, - Character_Field => 'B')); - List.Add (My_List, (Integer_Field => 999, - Character_Field => 'Y')); - List.Add (My_List, (Integer_Field => 999, - Character_Field => 'b')); - List.Add (My_List, (Integer_Field => 112, - Character_Field => 'a')); - List.Add (My_List, (Integer_Field => 998, - Character_Field => 'z')); + List.Add (My_List, (Integer_Component => 111, + Character_Component => 'a')); + List.Add (My_List, (Integer_Component => 111, + Character_Component => 'z')); + List.Add (My_List, (Integer_Component => 111, + Character_Component => 'A')); + List.Add (My_List, (Integer_Component => 999, + Character_Component => 'B')); + List.Add (My_List, (Integer_Component => 999, + Character_Component => 'Y')); + List.Add (My_List, (Integer_Component => 999, + Character_Component => 'b')); + List.Add (My_List, (Integer_Component => 112, + Character_Component => 'a')); + List.Add (My_List, (Integer_Component => 998, + Character_Component => 'z')); List.Sort (My_List); List.Print (My_List); diff --git a/courses/fundamentals_of_ada/labs/prompts/140_access_types/password_manager.ads b/courses/fundamentals_of_ada/labs/prompts/140_access_types/password_manager.ads index fc75a9450..850a6c5bb 100644 --- a/courses/fundamentals_of_ada/labs/prompts/140_access_types/password_manager.ads +++ b/courses/fundamentals_of_ada/labs/prompts/140_access_types/password_manager.ads @@ -2,7 +2,7 @@ package Password_Manager is type Login_T is (Email, Banking, Amazon, Streaming); type Password_T is null record; - -- Need fields for count and password string + -- Need components for count and password string -- These aren't right, but they compile! function Update diff --git a/courses/fundamentals_of_ada/labs/prompts/160_genericity/data_type.ads b/courses/fundamentals_of_ada/labs/prompts/160_genericity/data_type.ads index 475d5a12a..b05835d41 100644 --- a/courses/fundamentals_of_ada/labs/prompts/160_genericity/data_type.ads +++ b/courses/fundamentals_of_ada/labs/prompts/160_genericity/data_type.ads @@ -1,5 +1,5 @@ package Data_Type is - type Record_T is null record; -- Add at least two fields + type Record_T is null record; -- Add at least two components function ">" (L, R : Record_T) diff --git a/courses/fundamentals_of_ada/labs/prompts/280_low_level_programming/messages.adb b/courses/fundamentals_of_ada/labs/prompts/280_low_level_programming/messages.adb index 7ca9b8437..bc390093c 100644 --- a/courses/fundamentals_of_ada/labs/prompts/280_low_level_programming/messages.adb +++ b/courses/fundamentals_of_ada/labs/prompts/280_low_level_programming/messages.adb @@ -1,14 +1,14 @@ package body Messages is function Create - (Text : String; - Field3 : Boolean; - Field4 : Character) + (Text : String; + Component3 : Boolean; + Component4 : Character) return Message_T is begin return - (Unique_Id => 0, Text => (others => ' '), Field3 => Field3, - Field4 => Field4, Crc => Crc_T'First); + (Unique_Id => 0, Text => (others => ' '), Component3 => Component3, + Component4 => Component4, Crc => Crc_T'First); end Create; ------------- diff --git a/courses/fundamentals_of_ada/labs/prompts/280_low_level_programming/messages.ads b/courses/fundamentals_of_ada/labs/prompts/280_low_level_programming/messages.ads index 92d203115..0acb18ad1 100644 --- a/courses/fundamentals_of_ada/labs/prompts/280_low_level_programming/messages.ads +++ b/courses/fundamentals_of_ada/labs/prompts/280_low_level_programming/messages.ads @@ -2,9 +2,9 @@ with Crc; use Crc; package Messages is type Message_T is private; function Create - (Text : String; - Field3 : Boolean; - Field4 : Character) + (Text : String; + Component3 : Boolean; + Component4 : Character) return Message_T; function Get_Crc (Message : Message_T) @@ -16,10 +16,10 @@ package Messages is procedure Print (Message : Message_T); private type Message_T is record - Unique_Id : Integer; - Text : String (1 .. 9); - Field3 : Boolean; - Field4 : Character; - Crc : Crc_T; + Unique_Id : Integer; + Text : String (1 .. 9); + Component3 : Boolean; + Component4 : Character; + Crc : Crc_T; end record; end Messages; diff --git a/courses/fundamentals_of_ada/quiz/limited_private/quiz.rst b/courses/fundamentals_of_ada/quiz/limited_private/quiz.rst index 52ced2d36..5dc3f2bc2 100644 --- a/courses/fundamentals_of_ada/quiz/limited_private/quiz.rst +++ b/courses/fundamentals_of_ada/quiz/limited_private/quiz.rst @@ -24,7 +24,7 @@ C. | ``type A is array (1 .. 10) of Lim;`` | ``F : A;`` | ``end record;`` D. | :answermono:`type Priv is record` - | :answermono:`Field : Integer := Lim'Size;` + | :answermono:`Component : Integer := Lim'Size;` | :answermono:`end record;` .. container:: animate diff --git a/courses/fundamentals_of_ada/quiz/limited_private/template/main.adb b/courses/fundamentals_of_ada/quiz/limited_private/template/main.adb index 69b7bb90c..4ec7b548d 100644 --- a/courses/fundamentals_of_ada/quiz/limited_private/template/main.adb +++ b/courses/fundamentals_of_ada/quiz/limited_private/template/main.adb @@ -31,7 +31,7 @@ procedure Main is --$ begin cut type Priv is record - Field : Integer := Lim'Size; + Component : Integer := Lim'Size; end record; --$ end cut diff --git a/courses/fundamentals_of_ada/quiz/mutable_with_array/quiz.rst b/courses/fundamentals_of_ada/quiz/mutable_with_array/quiz.rst index ee7baedc9..968a6d5a4 100644 --- a/courses/fundamentals_of_ada/quiz/mutable_with_array/quiz.rst +++ b/courses/fundamentals_of_ada/quiz/mutable_with_array/quiz.rst @@ -18,6 +18,6 @@ D. ``V : R (6) := (6, S => "Hello")`` .. container:: animate Choices **A** and **B** are mutable: the runtime assumes :ada:`Size` - can be :ada:`Positive'Last`, so field :ada:`S` will cause a run-time error. + can be :ada:`Positive'Last`, so component :ada:`S` will cause a run-time error. Choice **D** tries to copy a 5-character string into a 6-character string, also generating a run-time error. diff --git a/courses/fundamentals_of_ada/quiz/mutable_with_array/template/main.adb b/courses/fundamentals_of_ada/quiz/mutable_with_array/template/main.adb index ef2badc52..2fcca975f 100644 --- a/courses/fundamentals_of_ada/quiz/mutable_with_array/template/main.adb +++ b/courses/fundamentals_of_ada/quiz/mutable_with_array/template/main.adb @@ -20,7 +20,7 @@ procedure Main is --$ begin answer -- Choices **A** and **B** are mutable: the runtime assumes :ada:`Size` - -- can be :ada:`Positive'Last`, so field :ada:`S` will cause a run-time error. + -- can be :ada:`Positive'Last`, so component :ada:`S` will cause a run-time error. -- Choice **D** tries to copy a 5-character string into a 6-character string, -- also generating a run-time error. --$ end answer