comp.lang.tcl
[Top] [All Lists]

Re: merging variables and arrays ... conflicting with cloverfield?

Subject: Re: merging variables and arrays ... conflicting with cloverfield?
From: Andreas Leitgeb
Date: 30 May 2008 16:15:18 GMT
Newsgroups: comp.lang.tcl

Uwe Klein <uwe_klein_habertwedt@xxxxxxxxxxx> wrote:
>> Last time I checked (couple of years ago), JIM had no variable
>> traces and no "upvar", either. Without these things, arrays

> I have recently extended JIM in a couple of points to
> make it useable as a userspace scriptable replacement for
> a linux in_kernel hardware driver.
> i.e. hardware_io usererspace interrupts, sockets, fileevent, signals.
cool!

> upvar works.
> you can even do at global or proc local scope
> upvar #0 $dict(elem1) var1

Hmm, is this a typo, or is this correct jim syntax for
the task under discussion?
in Tcl this would be valid syntax, getting the *name*
of the global variable from a local array. Jim
allows array-syntax for dicts, so it would still not
link to an dict-element, but to a global var just
whose name is stored in the dict.

And if jim's upvar really linked into a dict, then 
it is either further away from EIAS than I thought,...
or maybe it is just very smart at translating changes 
on var1 into changes on the global var holding the dict,
and the other way round.


<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy