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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9e499c74312ed3f0 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-19 15:55:08 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!144.212.100.101!newsfeed.mathworks.com!news.mathworks.com!uunet!ash.uu.net!world!bobduff From: Robert A Duff Subject: Re: Static assertions Sender: bobduff@world.std.com (Robert A Duff) Message-ID: Date: Sat, 19 May 2001 22:53:56 GMT References: <3B054ABE.9B3DA459@boeing.com> <3B05A63C.25F6B80C@boeing.com> Organization: The World Public Access UNIX, Brookline, MA X-Newsreader: Gnus v5.3/Emacs 19.34 Xref: archiver1.google.com comp.lang.ada:7653 Date: 2001-05-19T22:53:56+00:00 List-Id: Jeffrey Carter writes: > I see. Assert_1 cannot be a dead variable, since it is a constant, but > it will probably never be referenced. I guess it's a "dead constant". Yeah. Or "dead object". > It would appear that > > Assert_1 : constant Assert := Assert'(Integer'Size = 73); > > must cause a compilation error, since Assert is a static subtype, so the > qualified expression is static, and a static qualified expression must > be evaluated at compile time. I agree. > I'm just trying to come up with something a little shorter and less > obscure than using Boolean'Pos. A worthy goal. I wish that "Assert(Integer'Size = 73)" would work. Alas. - Bob