home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / ada / 2190 < prev    next >
Encoding:
Internet Message Format  |  1992-07-24  |  1.2 KB

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