Hi,
When you allocate a new register (with e.g. \newdimen) that is always a
global definition (kind of a tex tradition). As a (likely to stay)
experiment I added
\newlocaldimen \foo
\setnewlocaldimen \foo 123pt
and comparable helpers. Some more can be found in lowlevel-scope.pdf in
the distribution. The idea is that users who write their own macros that
need 'variables' can define them locally without the danger for clashing
with system ones (or each others macros). Actually, global assignments
only affects that variable, so one can do
\bgroup
\newlocaldimen\foo
\bgroup
\global\foo=456pt
\egroup
... use \foo
\egroup
Best use names like \mydimena etc in order nnot to clash with system
ones (that can be protected against overload). In spite of redefinitions
each time a macro using it gets expanded, performance is quite okay.
It falls in the category "interesting hacks but maybe not needed because
never asked for", but on the other hand, sometimes availability creates
retrospective demand. (I also did \newlocalread and added some extra
random access hackery to \read, so who knows what users will abuse that
feature for.)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________