comp.lang.ada
 help / color / mirror / Atom feed
From: "Rich Herrick" <rich.delete.me@richherrick.com.delete.me.too>
Subject: Re: access & address
Date: Sat, 16 Oct 2004 15:15:27 GMT
Date: 2004-10-16T15:15:27+00:00	[thread overview]
Message-ID: <jWacd.305803$bp1.199184@twister.nyroc.rr.com> (raw)
In-Reply-To: 3025014.yqGbeSrbak@linux1.krischik.com


"Martin Krischik" <krischik@users.sourceforge.net> 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.





  reply	other threads:[~2004-10-16 15:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-14  9:05 access & address Hans Van den Eynden
     [not found] ` <1347924.5V7QhTSfdI@linux1.krischik.com>
     [not found]   ` <ckm14i$erb2@cui1.lmms.lmco.com>
2004-10-14 18:09     ` Martin Krischik
2004-10-14 20:13       ` CBFalconer
2004-10-15  8:18         ` Martin Krischik
     [not found]     ` <2t7jm8F1sp752U1@uni-berlin.de>
2004-10-14 18:17       ` Martin Krischik
2004-10-14 19:52         ` Xenos
2004-10-15  8:53           ` Martin Krischik
2004-10-15 17:30             ` Xenos
2004-10-16 14:25               ` Martin Krischik
2004-10-16 15:15                 ` Rich Herrick [this message]
2004-10-15 15:46           ` Björn Persson
2004-10-15 17:09             ` Xenos
2004-10-17 23:38               ` Björn Persson
2004-10-18  7:42                 ` Martin Krischik
2004-10-14 19:37       ` Xenos
2004-10-15  8:30         ` Martin Krischik
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox