Re: GLOBALS statement everywhere
Posted in 1998
This is a multi-part message in MIME format. --------------1CD6EAA9D18A26DA071B5FFF Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I am pretty sure that the global and the database statements need to be in every 4gl. This is because the 4gl is first compiled into .4go which needs to know both before it is cat together with the others into .4gi Yours, Mark Roach I wrote: > 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. --------------1CD6EAA9D18A26DA071B5FFF Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Mark Roach Content-Disposition: attachment; filename="vcard.vcf" begin: vcard fn: Mark Roach n: Roach;Mark org: Bob Jones University email;internet: mroach@bju.IT5_PO title: Informix Programmer x-mozilla-cpt: ;0 x-mozilla-html: FALSE version: 2.1 end: vcard --------------1CD6EAA9D18A26DA071B5FFF--