Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: typeset -T versus typeset -r, bug or feature?



On Sep 11,  2:45pm, Peter Stephenson wrote:
} Subject: Re: typeset -T versus typeset -r, bug or feature?
}
} Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
} > Do this in an interactive shell so that the third line doesn't cause the
} > shell to exit:
} > 
} > typeset -T READ write
} > typeset -r READ
} > READ=wrong
} zsh: read-only variable: READ
} > write=right
} > print $READ
} right
} 
} This is a feature.

OK, but note also that write=right did not convert write into a scalar
(see parallel thread about math assignment).  I'm not really griping
about this as it would mean an implicit un-tying, just noting a point
of interest. 



Messages sorted by: Reverse Date, Date, Thread, Author