home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!stanford.edu!bcm!aio!dnsurber
- From: dnsurber@lescsse.jsc.nasa.gov (Douglas N. Surber)
- Newsgroups: comp.lang.ada
- Subject: Re: Another Question about protected records
- Message-ID: <dnsurber.714854723@node_26400>
- Date: 26 Aug 1992 18:45:23 GMT
- References: <1992Aug19.222949.12391@seas.gwu.edu> <1992Aug25.175331.26911@inmet.camb.inmet.com>
- Sender: news@aio.jsc.nasa.gov (USENET News System)
- Organization: Lockheed Engineering and Sciences
- Lines: 53
-
- In <1992Aug25.175331.26911@inmet.camb.inmet.com> stt@spock.camb.inmet.com (Tucker Taft) writes:
-
- >In any case, we are currently considering dropping the reserved
- >word "record" completely from the syntax (and name) for protected types,
- >so that the new syntax would be :
-
- > protected [type] identifier[discriminant_part] is
- > {protected_operation_declaration}
- > private
- > {protected_item}
- > end [identifier];
-
- >where protected_item is either a protected_operation_declaration
- >or a component_declaration.
-
- Why the special case syntax for for a protected type? IMHO it would be
- more economical to use the existing type specification syntax with the
- addition of protected_type_definition as an alternative.
-
- type_definition ::=
- . . . as in Ada83
- | protected_type_definition
-
- protected_type_definition ::=
- protected identifier[discriminant_part] is
- {protected_operation_declaration}
- private
- {protected_item}
- end [identifier];
-
- Thus a protected type would be defined as
-
- type Prot is
- protected
- ...
- private
- ...
- end Prot;
-
- and a protected object would be
-
- Prot_Obj :
- protected
- ...
- private
- ...
- end Prot_Obj;
-
- I don't see the need for a new basic_declaration production. Just my two cents.
-
- Douglas Surber
- Lockheed
- Houston, TX
-