home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / ada / 2385 < prev    next >
Encoding:
Text File  |  1992-08-19  |  1.6 KB  |  57 lines

  1. Newsgroups: comp.lang.ada
  2. Path: sparky!uunet!seas.gwu.edu!lodhi
  3. From: lodhi@seas.gwu.edu (Fakhar Lodhi)
  4. Subject: Another Question about protected records
  5. Message-ID: <1992Aug19.222949.12391@seas.gwu.edu>
  6. Originator: lodhi@seas.gwu.edu
  7. Sender: news@seas.gwu.edu
  8. Organization: George Washington University
  9. Date: Wed, 19 Aug 1992 22:29:49 GMT
  10. Lines: 45
  11.  
  12. Yesterday I asked two questions about protected records. While I am 
  13. still waiting for the answers, I have another question about their syntax.
  14. I would greatly appreciate if some body, especially some one in the Ada9x 
  15. design team, could provide me the answers. Thanks.
  16.  
  17. Now the question is:
  18.  
  19. Section 9.5 of the Ada 9X Mapping Vol. II (Mapping Specification),
  20. version 4.0, 24 Dec. 91, gives the syntax of a protected record specification
  21. as follows:
  22.  
  23. (para 5)
  24.  
  25.    protected_record_specification ::=
  26.      protected [type] identifier [discriminat_part] is
  27.        {protected_operation_declaration}
  28.      private
  29.        {protected_operation_declaration}
  30.      record
  31.        component_list
  32.      end [protected_record_simple_name]
  33.  
  34. The same syntax is used in example given in section 9.6
  35.  
  36. But, an example in section 3.3.2.1 of Ada 9X Mapping Vol. I (Mapping Rationale)
  37. ver. 4.1, 4 March 92 uses a different syntax. The code is as follows:
  38.  
  39.     < some stuff deleted >
  40.     protected record type mailbox is
  41.       
  42.        < stuff deleted >
  43.     private record
  44.        
  45.        < stuff deleted>
  46.  
  47.     end record;
  48.  
  49. which is clearly different from the syntax given above.
  50. (end record is not a valid syntax.)
  51.  
  52. Now the question is, which one of the two is correct?
  53.  
  54. Once again, I would greatly appreciate your help. Thanks.
  55.  
  56. Fakhar Lodhi
  57.