On 3/10/24 3:55 PM, Zachary Santer wrote:
Relatedly, how would one set attributes on a variable declared in a calling function? 'readonly' and 'export' can do it for their respective attributes, but otherwise, I think you just can't.
You can't (you might be able to using nameref tricks I'm not motivated enough to investigate); that's a consequence of dynamic scoping and how `declare' works. `readonly' and `export' just act on variables found using the usual dynamic scooping rules. You could write loadable builtins `array', `assoc', and `integer' to do the same for those attributes if you desired. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature