×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Hi Barbara -
On Fri, 08 Feb 2008 12:27:41 -0500, Barbara Morris
<bmorris@xxxxxxxxxx> wrote:
If a variable is
local, the checking is limited to that procedure; if global, the
checking needs to be done for the whole module; if exported from a
module in a program, the checking needs to be done for the whole
program; if exported from a service program, the checking needs to be
done for the whole system.
All other global variables have to be checked for the whole module, so
I don't see the need to jump through hoops to protect the few
variables that I would have as local static variables if I didn't have
to jump through hoops. The vast majority of my global variables in
service programs need to be available to multiple procedures anyway.
As for exporting, personally I *never* export variables, only
procedures. If a caller needs to be able to read the variable apart
from any other kind of action, I provide a "get" procedure which
returns the variable's value. If a caller needs to be able to change
it explicitly, I would provide a "put" procedure. So the variable is
protected from random changes from the outside world except through
the defined interfaces.
I do have "get" procedures in many of my service program. At the
moment I can't think of a straight "put" procedures in any of my
service programs, though I know I have one as an internal procedure in
a regular program.
Ken
Opinions expressed are my own and do not necessarily represent the views
of my employer or anyone in their right mind.
As an Amazon Associate we earn from qualifying purchases.