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

Re: RW on Working-Storage (was: J4 - presentation/discussion on "Future of the COBOL Standard&
On Fri, 14 Mar 2008 14:29:05 GMT, "William M. Klein" <wmklein@nospam.netcom.
com> wrote:

>Concerning ther statement,
>
> "They are allocated no later than immediately before initialization"
>
>Let's look again at the entire paragraph which states,
>
>"Data items and file connectors defined in the working-storage, communicati
on,
>or file section of a source element that is not an initial program are stat
ic
>items. Also, screen item attributes in a source element that is not an init
ial
>program are treated as static items. These items are set to their initial s
tate
>each time the runtime element or object containing them is set to its initi
al
>state, as described in 14.5.2.1.2.1, Initial state, and in 14.5.2.2, Initia
l
>state of object data. They are allocated no later than immediately before
>initialization and persist to the first of the following:
>- the end of the run unit,
>- the execution of a CANCEL statement of a program that directly or indirec
tly
>contains the items,
>- the end of the object's life cycle in the case of object data."
>
>It seems to me that Robert is assuming that "before initialization" is PROG
RAM
>initialization, but in context it is clear that the "they" is the individua
l
>data items.  It is also clear that THEIR "persistance" in this context ends
 with
>a CANCEL and that the next time the same program is CALLed, this same
>"initialization" (and allocation before) can occur.

The question for THIS particular thread is whether "The standard says workin
g-storage is
allocated statically." versus whether working-storage items can be reallocat
ed dynamically
while the program is running.

The standard calls them "static items" without defining the phrase. Dictiona
ries define
static and its Latin root statis as motionless, fixed. It seems clear to me 
that a static
data item is one whose address does not change during the item's life. By co
ntrast, a
dynamic item is mobile in memory.

>Again, all of this refers to what the Standard says (which is minimal) abou
t what
>type of allocation is done for what it calls "static" items and does not im
ply
>how many (if any) existing compiler/run-times do storage allocation as a pa
rt of
>setting to the 2nd through N-th time of "initial state".

The 02 standard says under CANCEL:

"NOTE It is neither prohibited nor required that the storage of the specifie
d program be
freed by the execution of a CANCEL statement."

I wish standards writers didn't embelish substantive statements with "note",
 giving the
impression the statements are parenthetical asides. ISO should employ copy e
ditors to
clean up awkward techie writing style.

Report this thread to moderator Post Follow-up to this message
Old Post
Robert
03-14-08 11:57 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:31 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.