Locale names starting with the letter j are usual taken by J base library
or addons. Avoid them unless you intend to contribute to addons.

Name conflicts between different user's locales is rare, unless both
scripts are loaded in the same session.  Therefore you need not worry too
much.

On Oct 17, 2017 8:12 PM, "Rudolf Sykora" <[email protected]> wrote:

Hello,

several times I encountered a problem of scoping my variables.
As I understand, variables in J are either global, or local.
This is fairly similar to C, but in C the globals may be globals
just within a file, and, unless marked extern, they are still
invisible to the outside.

Since local variables of a function are not visible to functions
called by the function, I do not see a good way to limit the scope
of my variables. Using _locale_ is not a good way either, since it
may happen somobody else will incidently create the same _locale_,
which will later interfere with mine.

Solving this with objects together with automatically-created numbered
_locale_ seems a bit too heavy weapon.

Is there a good way?

Thanks for comments
Ruda
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to