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

Reply via email to