home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.ada
- Path: sparky!uunet!seas.gwu.edu!lodhi
- From: lodhi@seas.gwu.edu (Fakhar Lodhi)
- Subject: Another Question about protected records
- Message-ID: <1992Aug19.222949.12391@seas.gwu.edu>
- Originator: lodhi@seas.gwu.edu
- Sender: news@seas.gwu.edu
- Organization: George Washington University
- Date: Wed, 19 Aug 1992 22:29:49 GMT
- Lines: 45
-
- Yesterday I asked two questions about protected records. While I am
- still waiting for the answers, I have another question about their syntax.
- I would greatly appreciate if some body, especially some one in the Ada9x
- design team, could provide me the answers. Thanks.
-
- Now the question is:
-
- Section 9.5 of the Ada 9X Mapping Vol. II (Mapping Specification),
- version 4.0, 24 Dec. 91, gives the syntax of a protected record specification
- as follows:
-
- (para 5)
-
- protected_record_specification ::=
- protected [type] identifier [discriminat_part] is
- {protected_operation_declaration}
- private
- {protected_operation_declaration}
- record
- component_list
- end [protected_record_simple_name]
-
- The same syntax is used in example given in section 9.6
-
- But, an example in section 3.3.2.1 of Ada 9X Mapping Vol. I (Mapping Rationale)
- ver. 4.1, 4 March 92 uses a different syntax. The code is as follows:
-
- < some stuff deleted >
- protected record type mailbox is
-
- < stuff deleted >
- private record
-
- < stuff deleted>
-
- end record;
-
- which is clearly different from the syntax given above.
- (end record is not a valid syntax.)
-
- Now the question is, which one of the two is correct?
-
- Once again, I would greatly appreciate your help. Thanks.
-
- Fakhar Lodhi
-