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=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c6ca9cbe17b867c4 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.maxwell.syr.edu!news-rtr.nyroc.rr.com!news-out.nyroc.rr.com!twister.nyroc.rr.com.POSTED!53ab2750!not-for-mail From: "Rich Herrick" Newsgroups: comp.lang.ada References: <1c2f5137.0410140105.66fdb23e@posting.google.com> <1347924.5V7QhTSfdI@linux1.krischik.com> <2t7jm8F1sp752U1@uni-berlin.de> <1982479.VT7X1MC7VE@linux1.krischik.com> <1137756.92Qd5cOqoD@linux1.krischik.com> <3025014.yqGbeSrbak@linux1.krischik.com> Subject: Re: access & address X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Message-ID: Date: Sat, 16 Oct 2004 15:15:27 GMT NNTP-Posting-Host: 66.24.208.111 X-Complaints-To: abuse@rr.com X-Trace: twister.nyroc.rr.com 1097939727 66.24.208.111 (Sat, 16 Oct 2004 11:15:27 EDT) NNTP-Posting-Date: Sat, 16 Oct 2004 11:15:27 EDT Organization: Road Runner Xref: g2news1.google.com comp.lang.ada:5330 Date: 2004-10-16T15:15:27+00:00 List-Id: "Martin Krischik" wrote in message news:3025014.yqGbeSrbak@linux1.krischik.com... > Currently I enjoy patching together the libraries of two different vendors. > Both of which have a C interface. That puts a real new twist to "knowing > your data". And only when PC-lint runs I know when the two interfaces won't > fit together. I had to convert a large piece of middleware from Ada (83) to C a few years back. My company scheduled 3 MM to do the work. I did it in a week. I don't know what that says, except maybe its a little easier than going the other way. > > > int is guaranteed to hold a value of at least 65535. > > I thought int must only be signed 16bit - and that goes only to 32767. While > size_t need to be large enough to hold any size. Hence it is unsigned. And > on one of my machines it is actually 64 bit. Internally, signness doesn't matter on the size of the value that can be represented. The only time it matter, is in intrepretation. Maybe this was your argument about not liking how C deals with signness? For good or ill, C was a "step above" Assembly, were signness is only an issue when choosing your instructions. The same quantity can be 65535 or -1 (assuming 2's comp. in this can) depending on what instruction is used. C standard says that a -1 assigned to an unsigned variable will give that variable's type's max. size. At work I do a lot of Ada (mostly 83, but we are moving to 95--yeah!), C and C++. For my own stuff, I prefer C++, when I don't have to worry about someone dying if my code does. That's just my preference--my hammer against your saw. Regards.