Odd things happening...

Jay R. Ashworth jra at baylink.com
Wed Mar 2 10:37:44 PST 2005


On Wed, Mar 02, 2005 at 12:16:29PM -0500, Kenneth Brody wrote:
> Quoting Jeff Harrison (Wed, 2 Mar 2005 08:44:18 -0800 (PST)):
> [...]
> > 2) As I understand it non-global dummy fields will
> > only hold their value for the duration of the
> > processing table in which they are set.  If the
> > variable is assigned in input processing then as soon
> > as input processing is over then the value is lost -
> > even if the field was declared in the automatic table.
> [...]
> 
> Not quite.  When the record is read/re-read and automatic processing
> is run, is when non-global variables are cleared.
> 
> You can easily verify this with two simple processing tables:
> 
>     automatic:
> 
>         mesgbox "Automatic processing.  aa = '" & aa & "'"
>         aa(10,*) = "aa is set"
>         mesgbox "Automatic processing after assign.  aa = '" & aa & "'"
> 
>     input:
> 
>         end
>       @entsel
>         bb(5,.0,g) = bb + "1"
>         show "entsel processing.  aa = '"' & aa & "'  bb = '" & bb & "'"
>         end
> 
> Briin up record 1, and you will see the two automatic processing
> messages, once with aa blank, and then filled in.  You will then
> see the entsel message with aa still filled in, and bb with a
> counter.  Switch screens, and you will see the entsel message
> again, with aa still filled in, and the counter incrementing.

Jeff; don't I remember you once writing a routine for automatic that
took advantage of some of those side effects to generate a reasonably
reliable answer to the question "which of the three possible automatic
passes am I in right now?"?

Cheers,
-- jra
-- 
Jay R. Ashworth                                                jra at baylink.com
Designer                          Baylink                             RFC 2100
Ashworth & Associates        The Things I Think                        '87 e24
St Petersburg FL USA      http://baylink.pitas.com             +1 727 647 1274

      If you can read this... thank a system adminstrator.  Or two.  --me


More information about the Filepro-list mailing list