home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!elroy.jpl.nasa.gov!ames!agate!dog.ee.lbl.gov!nosc!cod!sampson
- From: sampson@nosc.mil (Charles H. Sampson)
- Newsgroups: comp.lang.ada
- Subject: Re: initialization of vars when declared.
- Message-ID: <1992Jul24.173825.17273@nosc.mil>
- Date: 24 Jul 92 17:38:25 GMT
- References: <1992Jul21.053439.29957@iitmax.iit.edu> <EMERY.92Jul21093521@Dr_No.mitre.org>
- Organization: Computer Sciences Corporation
- Lines: 17
-
- In article <EMERY.92Jul21093521@Dr_No.mitre.org> emery@Dr_No.mitre.org (David Emery) writes:
- >a_variable : array (1..3) of integer := (1,2,3);
- > dave
- >(p.s. many people consider this declaration, which is an anonymous
- > array type, to be bad style. One problem is that the following
- > declarations are of two different types:
- > X : array (1..3) of integer;
- > Y : array (1..3) of integer;
- > and therefore you can't say "X := Y;")
-
- True, but as I've said before, there are common occurrences in program-
- ming where you know that you're never going to want to say X := Y, or at
- least the probability of ever wanting to say it is insignificant. For
- these, the type declaration to give the never-to-be-used type a name is
- unnecessary clutter.
-
- Charlie
-