|
But isn't that just the start of the answer? What is described here is
the need for a separate module (a very small one, I admit) which has
it's own global, non-exported, variable and at least 2 exported
procedures. One for reset and one for fetching (and perhaps one for
modifying, so additions, subtractions, muliplications, etc.). Bind it to
the program which is using this and voila, your meal is cooked!
That way you have protected the variable from direct access, you don't
have to cleverly lie to the compiler (sorry, divert it from the true
situation) and implement it quite cleanly.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.