Why am I losing value in global variable?

Jeff Harrison jeffaharrison at yahoo.com
Mon Aug 31 19:38:49 PDT 2009


--- On Mon, 8/31/09, Boaz Bezborodko <boaz at mirrotek.com> wrote:

> From: Boaz Bezborodko <boaz at mirrotek.com>
> Subject: Why am I losing value in global variable?
> To: filepro-list at lists.celestial.com
> Date: Monday, August 31, 2009, 3:31 PM
> I have a report where I have the user
> input a date during selection 
> processing.  That variable, 'bf', is established as a
> global variable in 
> the auto processing table.  I then make another
> variable, 'be'-also 
> established in the auto processing table as a global
> variable, equal to 
> the beginning of the month of the first variable. 
> (be=BOM(bf) in the 
> sort/select processing table) Both are listed on the
> heading of a report.
> 
> The problem is that the report 'remembers' 'bf', but lists
> 'be' as 
> blank.  When I go through debug 'be' is correct
> throughout sort/select 
> processing, but as soon as it hits auto processing prior to
> going 
> through the report process 'be' becomes blank.
> 
> Why is a global variable being remembered when it is set
> through an 
> INPUT command, but not otherwise?
> 
> Boaz
> _______________________________________________

To quote Bill Clinton (sort of) it depends on what your definition of 'be' be.  Seriously though, how are you defining this variable?  Are you perhaps defining it twice, or not at all?  If you use an input statement on an undefined variable, then it will default to global.

Jeff Harrison
jeffaharrison at yahoo.com

Author of JHImport and JHExport.  The fastest and easiest ways to import and export filepro data.



      


More information about the Filepro-list mailing list