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: 1 Jul 91 15:21:34 GMT From: voder!wlbr!lonex.radc.af.mil!blackbird.afit.af.mil!dlindsle@ucbvax.Berkel ey.EDU (David T. Lindsley) Subject: Re: What should this do? Message-ID: <1991Jul01.152134.16085@afit.af.mil> List-Id: rharwood@east.pima.edu writes: >In article <1991Jun28.193513.14271@afit.af.mil>, dlindsle@afit.af.mil (David T . >Lindsley) writes: >procedure test_100 is > subtype INDEX is natural range 0..100; > type DYN_STRING (SIZE : INDEX := 0) is private; > private > type DYN_STRING (size : index := 0) is > record > DATA : string (1..size); > end record; And this version does compile, even here. Sorry about that, folks. Our AC is broken (it's 85F/30C-plus in here), and I'd been messing with that package all day. What I couldn't get to compile/run was: subtype Index is natural; -- range 0..100; type Dyn_String (Size : Index := 0) is record Data : string (1..Size); end record; S: Dyn_String; But this still leaves me with a question. Why does this work with a constrained subtype, but not with an unconstrained one? Either results in the elaboration of a null array -- why is this a problem with an unconstrained subtype? (Especially since NATURAL is a discrete (sub)type anyway... -- Dave Lindsley #24601# OPINIONS. MINE. (Nobody tells me dlindsle@blackbird.afit.af.mil anything anyway, so I can't possibly ?? lamroN eb yhW ?? be anybody's mouthpiece...)