Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Synchronized (not SLACK)
As a follow-up on another thread (and somewhat as a correction to what I
posted), the 2002 Standard does not (at least at quick glance) use the term
"slack" (for bytes or bits inserted within records).  The following is the
entire text of what I was trying to explain when I originally commented that
 an
file with a record layout might have "unexpected garbage" between fields.

From page 110 of the 2002 Standard,

"
8.5.1.5.4 Item alignment for increased object-code efficiency

Some computer memories are organized in such a way that there are natural
addressing boundaries in the computer memory, such as word boundaries, half-
word
boundaries, and byte boundaries. The way in which data is stored is determin
ed
by the runtime module, and need not respect these natural boundaries.

However, certain uses of data in such constructs as arithmetic operations or
subscripting may be facilitated if the data is stored so as to be aligned on
these natural boundaries. Specifically, additional machine operations might 
be
required at execution time for the accessing and storage of data if portions
 of
two or more data items appear between adjacent natural boundaries, or if cer
tain
natural boundaries bifurcate a single data item.

Data items that are aligned on these natural boundaries in such a way as to
avoid such additional machine operations are defined to be synchronized.

Synchronization can be accomplished in two ways:

1) By use of the SYNCHRONIZED clause.

2) By recognizing the appropriate natural boundaries and organizing the data
suitably without the use of the SYNCHRONIZED clause.

Each implementor who provides for special types of alignment shall specify t
he
precise interpretations that are to be made. The use of such items within a
group may affect the results of statements in which the group is used as an
operand. Each implementor who provides for these special types of alignment
shall describe the effect of the implicit FILLER and the semantics of any
statement referencing these groups."

--
Bill Klein
wmklein <at> ix.netcom.com



Report this thread to moderator Post Follow-up to this message
Old Post
William M. Klein
07-30-04 08:55 AM


Re: Synchronized (not SLACK)
"William M. Klein" <wmklein@nospam.netcom.com> wrote in message
news:UNjOc.2772$cK.402@newsread2.news.pas.earthlink.net...
> As a follow-up on another thread (and somewhat as a correction to what I
> posted), the 2002 Standard does not (at least at quick glance) use the
term
> "slack" (for bytes or bits inserted within records).

In a sense you're right, at least as far as "normative" specifications go.
However, the term "slack bits or bytes" does appear in ISO/IEC 1989:2002 in
two NOTEs, one on Page 404 in the subject 14.7.1, Parameters, and the other
on Page 407 in the topic 14.7.2.1, Group items, under the subject 14.7.2,
Returning items.

-Chuck Stevens



Report this thread to moderator Post Follow-up to this message
Old Post
Chuck Stevens
07-30-04 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:10 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.