|
Tony, As Rick says use a static variable. Define a variable in the procedure using the STATIC keyword. Any value in that variable will not go away from one call of the procedure to the next call of the procedure. Store the account number in a static variable defined in the procedure for use on the next call to the procedure. Paul -- Paul Morgan Senior Programmer Analyst - Retail J. Jill Group 100 Birch Pond Drive, PO Box 2009 Tilton, NH 03276-2009 Phone: (603) 266-2117 Fax: (603) 266-2333 "Tony Carolla" wrote > As far as I know, each time a subprocedure is called, it's variables > are all initialized, so this means that, for each subprocedure, I need > a global set of variables in the main procedure that it can store > stuff in. This just doesn't seem to go with what I believe > subprocedures were designed for. If I want to use one of these > subprocedure in another program, I have to duplicate the global > variables from the main program. > > Is there a way to make some variables in a subprocedure persistent?
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.