From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a3ca574fc2007430 X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Ada and Automotive Industry Date: 1996/11/21 Message-ID: #1/1 X-Deja-AN: 198019639 references: <3280DA96.15FB@hso.link.com> <1996Nov6.210957.3070@ole.cdac.com> <1996Nov8.183051.21638@ole.cdac.com> <56l4tf$6ef@fozzie.sun3.iaf.nl> organization: New York University newsgroups: comp.lang.ada Date: 1996-11-21T00:00:00+00:00 List-Id: Geert says "Especially for array indices and string lengths, I find using the predefined type very useful. It might be that people on a 16-bit machine with 16-bit integers might not be able to handle strings longer than 65536 characters, or arrays with more than 2**16 elements. But they won't expect to be able to do so, so what's the problem? Using 32-bit array indices would not be efficient on that type of machine. " Sure, but I would still not use it by default, since then you cannot tell the difference between careless machine dependence and (as outlined above) deliberate machine specific behavior. I would use subtype Index is Integer -- efficient max sized array index type type q is (index range 0 .. 10) of ... I would not use type Integer by default, you can even just say type q is (integer range 0 .. 10) of ... the point is that you don't want to use machine dependent types by accident, which is what these defaults promote. As for itneger being the index type of string, this I think is a mistake (Jean Ichbiah always thought this was a mistake too, but it was one that did not get noticed early enough to do something about it :-) dp