You are correct in that an optimal situation exists when necessary dynamic
storage can be supplied to a reentrant program by the caller.

However, that is not ALWAYS the case.

My objection is to the use of the term "ALWAYS".

To paraphrase something read years ago, "THE ONLY ABSOLUTE IS THAT THERE ARE
NO ABSOLUTES."

John P Baker
Software Engineer

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf
Of Jeffrey D Smith
Sent: Saturday, October 21, 2006 12:24
To: [email protected]
Subject: Re: Is the teaching of non-reentrant HLASM coding practices ever
defensible?

A reentrant program need not use GETMAIN/FREEMAIN/STORAGE. I've written
zillions of reentrant routines that rely on the caller to provide a
work area or that rely on pre-allocated storage areas (usually PC routines).

Using pre-allocated or caller-specified work areas is extremely fast. If
a caller provides a work area that is allocated within itself, then the
caller is non-reentrant, but the called routine is still reentrant.

Jeffrey D. Smith
Principal Product Architect
Farsight Systems Corporation
700 KEN PRATT BLVD. #204-159
LONGMONT, CO 80501-6452
303-774-9381 direct
303-484-6170 FAX
http://www.farsight-systems.com/
comments are invited on my encryption project

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to