) decides it's a dastardly act indeed.
*My* code is nice and tidy and doesn't have to worry about allocations
or deallocations. *Your* code reminds me of those terrible C memallocs
which the programmer must keep track of lest he forget to release those
allocated bytes.
Throw that allocate in the trash can, Lynn. Use BEGIN.
> Before PL/Id had the "based" storage attribute it had
> "static", "automatic", and "control". You could have
> allocated ... allocate ... allocate ... deallocate ...
> continuing this process until you had exhausted the stack.
>
> In short the "allocate" statement in PL/I . . .
I'm trying to get _away_ from memory management. BEGIN takes care of
everything for me. Why use PL/I to write a C-styled program?
You're thinking too low-level. Forget about this memalloc stuff.
> you would have to have its dimension outside the "begin"
> segment and declare the matrix as an 'automatic' storage
> variable to have PL/I automatically allocate it on entry
> to the "begin" segment. All your processing of the matrix
> would have to occur within the "begin" segment as PL/I
> would automatically deallocate it upon exit, i.e. reaching
> the "end" statement for the "begin" block. I don't know
> why you would go to all this trouble when you could simply
> allocate it dynamically in the first place using either
> the "controlled" or "based" storage attribute.
That's the beauty of PL/I. While I write the program I can concentrate
on the problem to be solved, not the housekeeping required.
- 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
"rollin@scoug.com".
=====================================================
<< Previous Message <<
>> Next Message >>
Return to [ 13 |
February |
2004 ]
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.