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,f9957894e0bdf128 X-Google-Attributes: gid103376,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!wns14feed!worldnet.att.net!attbi_s22.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: How to put 200 into an integer sub-type of 16 bits (code included) References: <407ae64d-3cb3-4310-b59e-f1bbae9910a5@t39g2000prh.googlegroups.com> <71gqm49eatq868htrvd7eghm3m8su8kcbl@4ax.com> <3d3719f4-355c-4094-9902-495d612d46fe@n33g2000pri.googlegroups.com> In-Reply-To: <3d3719f4-355c-4094-9902-495d612d46fe@n33g2000pri.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 173.16.158.68 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s22 1231958946 173.16.158.68 (Wed, 14 Jan 2009 18:49:06 GMT) NNTP-Posting-Date: Wed, 14 Jan 2009 18:49:06 GMT Organization: AT&T ASP.att.net Date: Wed, 14 Jan 2009 18:49:06 GMT Xref: g2news2.google.com comp.lang.ada:4259 Date: 2009-01-14T18:49:06+00:00 List-Id: ChristopherL wrote: > > What I want to do is this. I have a variable holding the base 10 value > 200. It has a certain bit representation. If the variable was an > integer of 16 bits it's representation would be something such as > 0000000011001000. For give me if I'm wrong. Anyway, what I'd like to > do is put that exact bit representation in another variable of a > different type. Why do you want to do that? You'll find that you get better responses if you describe the problem you're trying to solve, not what you think the solution to it is. Ada works best when it's used the way it was intended, and that's sometimes different from the low-level approaches required in other languages. -- Jeff Carter "I've got to stay here, but there's no reason why you folks shouldn't go out into the lobby until this thing blows over." Horse Feathers 50