home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / ada / 3887 < prev    next >
Encoding:
Text File  |  1993-01-05  |  1.2 KB  |  31 lines

  1. Newsgroups: comp.lang.ada
  2. Path: sparky!uunet!gatech!udel!gvls1!oak!schrey
  3. From: schrey@oak.NoSubdomain.NoDomain (Timothy M. Schreyer)
  4. Subject: Re: Enum's start at 0?
  5. Message-ID: <1993Jan5.220007.26218@gvl.unisys.com>
  6. Sender: schrey@oak (Timothy M. Schreyer)
  7. Nntp-Posting-Host: oak
  8. Reply-To: schrey@prc.unisys.com
  9. Organization: Paramax Systems
  10. References: <238@trident.datasys.swri.edu> <1992Dec30.033842.10112@seas.gwu.edu>
  11. Date: Tue, 5 Jan 1993 22:00:07 GMT
  12. Lines: 17
  13.  
  14. In article <1992Dec30.033842.10112@seas.gwu.edu>, mfeldman@seas.gwu.edu (Michael Feldman) writes:
  15. |> In article <238@trident.datasys.swri.edu> tim@trident.datasys.swri.edu (Timothy J. Barton) writes:
  16. |> >Just curious, but is there a reason enumerated type's POS values
  17. |> >start at 0 instead of 1?
  18. |> >
  19. |> Just like everything else in computing. ASCII characters, for example,
  20. |> run from 0 to 127, not 128. You can represent 0..127 using one less bit than
  21. |> 1..128.
  22. |> 
  23.    All right... then why do string indices start at 1? :-)
  24.  
  25.      Tim
  26. -- 
  27.  Timothy M. Schreyer                         schrey@vfl.paramax.com
  28.  Software Technology R&D                     (215) 648-2475 
  29.  Paramax Systems Corporation                 FAX: (215) 648-2288
  30.  PO Box 517, Paoli, PA 19301
  31.