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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1014db,4873305131bf4d94 X-Google-Attributes: gid1014db,public X-Google-Thread: 109fba,4873305131bf4d94 X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,4873305131bf4d94 X-Google-Attributes: gid103376,public From: Craig Franck Subject: Re: Porting Experiences (was Ada and Pascal etc ) Date: 1997/11/05 Message-ID: <63olmd$kos@bgtnsc02.worldnet.att.net>#1/1 X-Deja-AN: 288019694 References: <34557f2b.1934172@news.mindspring.com> <34566fe9.447229@news.mindspring.com> <345673af.1413708@news.mindspring.com> <3456b9f3.0@news.eznet.net> <3456e71b.3833189@news.mindspring.com> <3459AC95.1D75@dynamite.com.au> <63bhta$g2e@bgtnsc03.worldnet.att.net> <345BB35E.4488@dynamite.com.au> <63ftj9$r9g@bgtnsc02.worldnet.att.net> <345E3ACD.A15@gsg.eds.com> <63m3pt$t2d@bgtnsc02.worldnet.att.net> <345F93EF.13EB@gsg.eds.com> Organization: AT&T WorldNet Services Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++ Date: 1997-11-05T00:00:00+00:00 List-Id: "Shmuel (Seymour J.) Metz" wrote: >Craig Franck wrote: > >> That was mentioned in an several e-mails I received. > >Since I last posted I saw an article stating that the next C standard >will include a way to specify the required precision. That will be a >welcome change! > >> It seems you can define the interface with the machine in Ada; in >> C, what you would do is keep the values in the portable range as >> defined by the standard. This isn't as bad as it would seeem. If >> an implementation decides 64-bit ints are the best representation, >> a short, int, and long could all be 64-bits. Portable software just >> wouldn't exceed 32,767 for an int. > >Which is the same situation that we had when C first emrged, except that >8-bit processors are no longer an issue. If I need more than 32 bits, >how fo I declare it without getting 128 bits on some machines? There are ways to tune code for a particular platform in C and have it still remain portable. The case of an int being 32-bits and a long 64 (on a particular platform), and you want something larger than UINT_MAX, boy, isn't it a waste to declare it as a long, is that what you are getting at? I don't see it as a major issue. >With Ada >or PL/I the issue doesn't arise. I imagine it arises with the compiler people! :-) -- Craig clfranck@worldnet.att.net Manchester, NH I try to take one day at a time, but sometimes several days attack me at once. -- Ashleigh Brilliant