| 
	
		| Subject | Re: public variable getting lost |  
		| From | Ken Mayer <dbase@nospam.goldenstag.net> |  
		| Date | Sun, 22 Apr 2018 21:19:55 -0700 |  
		| Newsgroups | dbase.getting-started |  | On 4/22/2018 8:03 PM, ed furche wrote:
 > I have a public variable CLKHOURS.   i can look at it after I declare it,  when I first open the app.  It has a zero just as i Initialized it.
 > When I proceed to the next WFM, where I use it to accumulate a quantity,  and then look at it,  is is blank.
 > Example:   from the command window  I enter ?CLKHOURS.  I has no value...
 >
 > Obviously,  the reason I am concerned, is that the number I stored in it, is not put into the  DBF record...
 > I am using dBase 9 because dBase 11 doesnt play well with Crystal.
 
 First off, don't use public variables. Instead, if this is something you
 need available across the application:
 
 _app.ClkHours = 0
 
 Public variables are problematic, because you can easily accidentally
 overwrite them, and so on.
 
 Ken
 
 
 --
 *Ken Mayer*
 Ken's dBASE Page: http://www.goldenstag.net/dbase
 The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
 dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
 dBASE Tutorial: http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm
 
 
 |  |