> if [Peter] didn't have [a PL/I compiler], he could
> get a free copy complete with documentation.
Free? I bought PL/I Enterprise. That was *definitely* not "free"!
Where can you get the free copy?
Why can't we just write the LEX & YACC for PL/I and have an open source
PL/I compiler?
_____
> For those more curious and with some time on their hands
> for such study do a google search on "lambda calculus".
Naw. Make this the PSIG topic for May.
> Using PL/I terms we have four different storage attributes for
> data: static, automatic, controlled, and based. The static
> storage is bound at compile time;the automatic, at entry to
> execution;and the controlled and based during execution.
> Thus you have static and dynamic (automatic, controlled, and
> based) storage with different binding times: prior to, at
> entry to, and during execution.
I agree with the four types and I agree with the PL/I keywords and I
agree with the time-of-allocation for static (at compile time),
automatic (at entry) and controlled (at moment of necessity). But Lynn,
based storage is ghost storage, shadow box storage, glass matte
storage. It isn't "allocated". It is instead a way of interpreting
previously allocated storage.
> Now when you declare a variable in PL/I you control its
> storage attribute, e.g. 'dcl a char(20) static;' or 'dcl b fixed
> dec (7,2) based;' The difference between these two is that
> the compiler allocates the space for 'static' storage while the
> programmer allocates based storage during execution. Thus
> only one copy of a static storage variable exists prior, at, and
> during execution. Only one copy of an automatic storage
> exists at and during execution, while multiple copies
> (allocations) of controlled and based storage variables can
> exist during execution.
Aw, shucks, I'll agree with you. Although I don't think of based
storage as something you allocate.
One major and practical consideration is that static has a "memory" It
may optionally be given a value at compile time, and the initial or a
new value is maintained across entries. Automatic is initialized by
code during entry and thus supplies no memory of any prior value. If I
want a counter within a routine to tell me how many times that routine
has been called, or how many total errors have occurred across all calls
to the routine, it must be static.
> Now why do you need dynamic storage? . . .
> . . . the real advantage of based variables lies in their support
> of list processing. We'll save that for the next step.
Lynn, you sound like you are writing the SL/I book and letting us see
the first draft right here. Is this what you are doing?
- Peter
=====================================================
To unsubscribe from this list, send an email message
to "steward@scoug.com". In the body of the message,
put the command "unsubscribe scoug-programming".
For problems, contact the list owner at
"postmaster@scoug.com".
=====================================================
<< Previous Message <<
Return to [ 12 |
April |
2005 ]
The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA
Copyright 2001 the Southern California OS/2 User Group. ALL RIGHTS
RESERVED.
SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group.
OS/2, Workplace Shell, and IBM are registered trademarks of International
Business Machines Corporation.
All other trademarks remain the property of their respective owners.