readonly on array broken?
Hi, I've just stumpled over the following behaviour: $ arr=(foo bar) $ readonly arr $ arr[0]=bla mksh: read-only: arr[0] $ arr=bla $ echo ${arr[@]} bla bar Does the read-only flag not apply to array names in scalar context? I've just checked ksh93 and bash. Both of them refuse the third assignment from above. Is this a bug, or am I missing something? I've also checked `typeset -r arr[*]' which shows the same behaviour. I'm running 'MIRBSD KSH R49 2014/01/11'. Best regards, Bert
Re: readonly on array broken?
Bert M�nnich dixit: $ arr=(foo bar) $ readonly arr $ arr=bla Is this a bug, or am I missing something? I've also checked `typeset -r arr[*]' which shows the same behaviour. Thanks for the report; this seems to be a bug in the code we inherited from pdksh indeed. Will fix. bye, //mirabilos -- Natureshadow Ach, mach doch was du willst, du hast doch eh immer Recht! mirabilos jupp ~/.etc/sig……… Natureshadow unfaßbar… Natureshadow Mit Eszett sogar, unfaßbar!