× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Takken, Cor wrote:
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.


I agree with that, if any procedure should be able to access or reset the variable.

But if the variable is supposed to be private to that one procedure, you have opened it up to access by the whole world, even if it is indirect access.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.