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-Thread: 103376,2cb1f0b6d642e1dc X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.bbs-scene.org!xmission!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Pascal Calling Convention Date: Wed, 30 Mar 2011 08:50:13 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <9b04626e-567d-408c-aab3-39b964b3ffd6@l2g2000prg.googlegroups.com> <4d90efdd$1$14806$882e7ee2@usenet-news.net> <330393be-cb82-4cd8-ba44-6e59af7b75bf@v11g2000prb.googlegroups.com> <4d90fd41$1$14782$882e7ee2@usenet-news.net> <4d9148d2$1$14782$882e7ee2@usenet-news.net> <9d1b632e-8185-40b6-b1e3-4781cb8bbe60@b22g2000prb.googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1301489412 20044 192.74.137.71 (30 Mar 2011 12:50:12 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Wed, 30 Mar 2011 12:50:12 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:UMdZwJ+8gIes8Qc6tTAOrsSDqZw= Xref: g2news2.google.com comp.lang.ada:19569 Date: 2011-03-30T08:50:13-04:00 List-Id: Adam Beneschan writes: > If that feature were added, I'd want the language to specify that the > value of the attribute must be a valid value for the subtype. Yes. >...(Maybe > that's what you meant and didn't say so explicitly?) That would still > be a no-op if every bit pattern would be a valid value, which would be > the case for Integer (or for the first subtype of a "mod 2**32" or > "mod 2**64" type on most machines, which I think would be needed to > make Hyman's example work). Perhaps the feature would only be allowed on such (sub)types. You'd need some way to declare such types. "Type T is at least 1..1_000_000, possibly larger, but make sure all bit patterns are meaningful." Or maybe require that T'Base have this property for all integer types T. I don't think you want this feature for floats and pointers. Records and arrays? But it's such a corner case, I doubt you really want this feature at all! ;-) By the way, I invented this feature some years ago, when I read about the data structure Hyman mentioned. I said to myself, "That's interesting. I wonder how I'd design a high-level language in which that thing could be written (correctly, and portably)." - Bob