DECLARE GLOBAL / EXTERN
Kenneth Brody
kenbrody at bestweb.net
Mon Jul 30 12:51:41 PDT 2007
Quoting Nancy Palmquist (Mon, 30 Jul 2007 15:33:22 -0400):
> Kenneth Brody wrote:
> > Note that it is perfectly acceptable to have DECLARE EXTERN in the
> > main processing, and DECLARE GLOBAL in the CALLed table, as long as
> > you don't use the variable until you call the table that actually
> > defines it with the DECLARE GLOBAL. I do this all the time.
>
> I can say this logic works well. In a programming setup where I was
> using a large set of library processes that would be called from
> multiple filepro files, I found I could manage it best if I put all the
> declare globals in a called library table.
>
> Then each file that does a call does the call to declare the global
> variables first, then does the library calls required.
>
> Then I only had the variable definitions in one process table and could
> change edits or lengths without updating 20+ tables.
[...]
It also allows you to add variables, perhaps even new (optional)
parameters to pass into the routine, without having to DECLARE them
in everything that calls the library. Only code that uses the new
variables would need to be changed.
--
KenBrody at BestWeb dot net spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com
More information about the Filepro-list
mailing list