Declare global in called table goes away following lookup?

John Esak john at valar.com
Mon Aug 20 02:21:55 PDT 2007


> I thought any variable defined in auto had that property ,g or no ,g
> Without the ,g it wouldn't live past the first record, but it
> would live for
> the initial transition from auto to input, or from any to any.

Yes, actually this is true.... but it has little to no utility without the
,g.  In other words, yes from auto to input... the value is kept and that is
extremely useful. However, from auto to -v sort/select without the ,g there
would be zero usefulness since the auto(matic) table does not run before the
sort/select table.  So, for example, if on a sort/select table you want to
ask a question of the user as to what dates he wants a report drawn for, and
then print these dates on the output format, without the variable being
defined on the auto(matic) table *and* having the ,g attribute, you couldn't
do this.

With DECLARE there is no need for the auto(matic) table passing any
variables through to the output table through sort/select... just declare
them global and ,g on the sort/select itself and they carry through for
printing on the output format. (Of course, they have to be declare'd extern
on the output prc.)

So, the ,g sort of (to make a very bad pun) helped do some
table-passing-global stuff when the declare ability was not present.

JE



More information about the Filepro-list mailing list