Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
I — — source: Informix-list mailing list archive (1991-1998)
Hi,
I'm in the processing of revamping some code and have spotted what I
think is superflous use of the GLOBALS statement.
A typical example would be as follows:
a.4gl would look like this:
---------------------------------------
DATABASE dbname
GLOBALS "/pathname/global.4gl"
DEFINE variable1 CHAR(20)
END DEFINE
MAIN
blah
END MAIN
FUNCTION func()
END FUNCTION
b.4gl would look like this:
---------------------------------------
DATABASE dbname
GLOBALS "/pathname/global.4gl"
FUNCTION func2()
END FUNCTION
c.4gl would have the same structure as b.4gl
As we are running RDS we compile the programs like this:
fglpc a.4gl
fglpc b.4gl
fglpc c.4gl
And finish off with: cat a.4go b.4go c.4go > newprog.4gi
The question is: are the GLOBALS statements in b.4gl and c.4gl
unnecessary?
Also, is the DATABASE statement in b.4gl and c.4gl unnecessary too?
Any advice given would be welcome.
Cheers, Ian.
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.