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

Reply via email to