On 12/12/12 1:04 PM, Dan Douglas wrote:
> Hello. Could we possibly modify or create an additional variant of "typeset 
> -n"
> which produces "real" references rather than just dynamic references by name?
> In other words, I'd like to be able to create reference variables that always
> point to the instance of a variable that was visible at the time the reference
> was created, similar to the way ksh93's nameref works.

This is the `pointer' implementation, as opposed to the `symbolic link'
implementation I chose.

The problem is the same as any use of pointers: what happens when the
object you point to goes out of scope?  Or would you restrict it, like
declare -g, to only use the global scope?

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to