comp.lang.ada
 help / color / mirror / Atom feed
From: Hyman Rosen <hymie@prolifics.com>
Subject: Re: Announce: OpenToken 2.0 released
Date: 2000/02/17
Date: 2000-02-17T20:21:17+00:00	[thread overview]
Message-ID: <t7r9ebbmwc.fsf@calumny.jyacc.com> (raw)
In-Reply-To: wccbt5fg02r.fsf@world.std.com

Robert A Duff <bobduff@world.std.com> writes:
> If the *hardware* insists that the smallest integer type is 32 bits,
> then is it unreasonable for the C implementation to read 32-bit
> quantities?  Surely, if char and int are the same size (say, 32 bits), I
> should be allowed to write out the number -1, or 2**31-1, or 1_000_000!
> And surely if I can write it out, I should be able to read it back in.

But for now, and for the forseeable future, it's extremely unlikely
that file contents will have a granularity no smaller than 32 bits.
That means that stream input is still going to be reading octets,
whether or not the processor likes to deal with quantities 32, or 64,
bits at a time. I'm not saying that the situation you are describing
could never, in principle, occur. I'm just saying that I don't think
it will. If it does, than on that platform, you can not write your
input code as 'int c; while ((c = getchar()) != EOF) { ... }', but C
already has other mechanisms to deal with this case. But I don't
think that it's necessary for the ordinary C programmer to worry
about portability of everyday code to such an oddball platform.




  reply	other threads:[~2000-02-17  0:00 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-01-27  0:00 Announce: OpenToken 2.0 released Ted Dennison
2000-01-28  0:00 ` Jürgen Pfeifer
2000-01-28  0:00   ` Ted Dennison
2000-01-31  0:00 ` Hyman Rosen
2000-02-01  0:00   ` Ted Dennison
2000-02-01  0:00     ` Hyman Rosen
2000-02-01  0:00       ` David Starner
2000-02-01  0:00         ` Brian Rogoff
2000-02-01  0:00           ` Hyman Rosen
2000-02-01  0:00             ` Brian Rogoff
2000-02-02  0:00               ` Hyman Rosen
2000-02-02  0:00             ` Vladimir Olensky
2000-02-01  0:00               ` Hyman Rosen
2000-02-02  0:00             ` Jeff Carter
2000-02-02  0:00       ` Ted Dennison
2000-02-04  0:00         ` Ted Dennison
2000-02-05  0:00           ` Ehud Lamm
2000-02-04  0:00       ` Florian Weimer
2000-02-07  0:00         ` Hyman Rosen
2000-02-07  0:00           ` Florian Weimer
2000-02-07  0:00             ` Hyman Rosen
2000-02-09  0:00           ` Robert A Duff
2000-02-09  0:00             ` Hyman Rosen
2000-02-09  0:00               ` Larry Kilgallen
2000-02-17  0:00               ` Robert A Duff
2000-02-17  0:00                 ` Hyman Rosen
2000-02-17  0:00                   ` Robert A Duff
2000-02-17  0:00                   ` Hyman Rosen
2000-02-17  0:00                     ` Robert A Duff
2000-02-17  0:00                       ` Hyman Rosen [this message]
     [not found]                   ` <88iuk2$s6d3@ftp.kvaerner.com>
2000-03-05  0:00                     ` [OT] C and in-band signalling (was: Re: Announce: OpenToken 2.0 released) Florian Weimer
2000-03-06  0:00                       ` Tarjei T. Jensen
2000-03-06  0:00                         ` Keith Thompson
replies disabled

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