From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 21 Oct 92 23:47:59 GMT From: pattis@beaver.cs.washington.edu (Richard Pattis) Subject: Uninitialized subtype variables Message-ID: <1992Oct21.234759.24972@beaver.cs.washington.edu> List-Id: I cannot find anything in the LRM (mostly around 3.2.1) for Ada that says after elaborating X : NATURAL; X's value is guaranteed to be >= 0. Is this in fact correct? Is there even a guarantee that the bit pattern it contains can be interpreted as a legal INTEGER? Now, suppose I also declared PROCEDURE P (N : NATURAL); A smart compiler could avoid checking the parameter constraint when calling P(X). But this could lead to some interesting errors if X truly contained a negative value from its (lack of) initialization. Any comments? -- ------------------------------------------------------------------------------ Richard E. Pattis "Programming languages are like Department of Computer Science pizzas - they come in only "too" and Engineering sizes: too big and too small."