Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!unido!unidui!flyer!declips!easix!andreas From: andreas@easix.gun.de (Andreas Baess) Newsgroups: comp.unix.aix Subject: Re: Aligned access to c structures (how to avoid) Message-ID: <1991Feb25.181243.27999@easix.gun.de> Date: 25 Feb 91 18:12:43 GMT References: <5053@lure.latrobe.edu.au> <1254@dkunix9.dk.oracle.com> <1991Feb15.220246.35565@shared.uucp> <1256@dkunix9.dk.oracle.com> Organization: Andreas Baess (Private) Lines: 20 bengsig@dk.oracle.com (Bjorn Engsig) writes: >|If you REALLY want to bash IBM a little bit, get their COBOL (shudder shudder) >| [ example ] >|and try to share it with the equivalent C global structure. You will find that >|the COBOL compiler does NOT boundary align, and you get nice weird results. >This behaviour is not specific to IBM but to Micro Focus cobol, which >is what is behind the IBM VS Cobol. I'm on thin ice here, but I actually think >cobol is required to behave like that (because of data file portability); please >correct me if I'm wrong. This is common in all COBOL implementations I know. There once upon was a time where main storage was so incredible expensive. Every COBOL programmer knows, that alignment of data can be enforced be declaring the field with an 01 level or by adding an sync behind the declaration. -- -> andreas@easix.GUN.de {tmpmbx,mcshh,smurf,flyer}!easix -> Was man nicht begreift kann man wenigstens nicht vergessen! Brought to you by Super Global Mega Corp .com