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,8af7fe40dc0a55ae X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!p2g2000prf.googlegroups.com!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Restarting Tread: Why isn't this program working with Unchecked_Converstion Date: Fri, 16 Jan 2009 09:24:25 -0800 (PST) Organization: http://groups.google.com Message-ID: <03040d1b-9e24-4f09-8d0c-0854d7f59021@p2g2000prf.googlegroups.com> References: <83d19cd8-71ca-43c1-a3eb-05832290e565@r36g2000prf.googlegroups.com> <40239b21-b265-467f-9b27-5890fb2f4c67@w1g2000prm.googlegroups.com> <5df15a77-b654-41da-bea0-a799f4cb6230@v13g2000yqm.googlegroups.com> <9069fcf7-4257-4439-ad4a-8d7c8c17f5cf@v5g2000pre.googlegroups.com> <70172b19-360c-4eba-815c-ede747c3bcdf@w39g2000prb.googlegroups.com> NNTP-Posting-Host: 94.108.132.104 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1232126665 22714 127.0.0.1 (16 Jan 2009 17:24:25 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 16 Jan 2009 17:24:25 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: p2g2000prf.googlegroups.com; posting-host=94.108.132.104; posting-account=pcLQNgkAAAD9TrXkhkIgiY6-MDtJjIlC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.18) Gecko/20081030 Iceape/1.1.13 (Debian-1.1.13-1),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:3391 Date: 2009-01-16T09:24:25-08:00 List-Id: ChristopherL wrote on comp.lang.ada: > On Jan 16, 7:11 am, Ludovic Brenta wrote: > > type Signed_8 is range - 2**7 .. 2**7 - 1; > > for Signed_8'Size use 8; > > I didn't use the second line in my program! Without it, my system > uses 10 bits for this. I'm going to use my solution for now. > > Also experimenting on my own, if I only make the below change the > variable Result has a value of -62 and not as above (-56). > > -- type Short_integer1 is range 0.. ((2 ** 8) - 1); > -- for Short_Integer1'Size use 8; > > type Short_integer1 is mod 2 ** 8; > for Short_Integer1'Size use 8; > > What does the following line of code do? It's new to me and have to > know! > > type Short_integer1 is mod 2 ** 8; This declares a modular type as defined in ARM 3.5.4: http://www.adaic.com/standards/05rm/html/RM-3-5-4.html I'm still curious to know what you are trying to achieve with all these conversions. As I pointed out, the result has neither the value nor the bit representation of the floating-point argument. -- Ludovic Brenta.