TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: andrew clarke
from: Paul Edwards
date: 1996-06-24 20:36:56
subject: Pacific C

> /* When compiled with Pacific C, this program prints:
>    size is 4
>    Yuck! */

ac> It also prints 'size is 4' with Borland C++ for DOS 3.1 when compiled with 
ac> the -a switch.

Crikey!  I've never seen that before.  Padding at the end of a structure
that contains only character variables!  Anyway, I looked up the standard,
and an implementation is allowed to pad between any structure members, plus
at the end, and there is no exception for char-only variables.  You know
what that means, don't you?  You have to read data from a file as a pure
character buffer, you can't put it into structures.  :-(  Damn!  Oh well,
time to change my habits.  BFN.  Paul.
@EOT:

---
* Origin: X (3:711/934.9)

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.