On 5/2/16 12:12 PM, Chet Ramey wrote:
> On 4/27/16 4:07 PM, Eduardo A. Bustamante López wrote:
> 
>> The 'mapfile' one is interesting, because it drops the nameref attribute from
>> the 'r' variable.
> 
> Array variables can't have the nameref attribute.  The process of creating
> and clearing the array with the name supplied as an argument clears that
> attribute.  Maybe it should display a warning.

I was poking around with this idea to see what ksh93 does, and it's not all
that consistent.  Consider the difference in behavior between these two
cases.  This one throws an error:

typeset -n foo ; typeset -i foo=7*6 ; typeset -p foo

and this one throws away the nameref attribute:

typeset -n foo ; typeset -i foo ; foo=7*6 ; typeset -p foo

-- 
``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