|
From: | helmut . karlowski |
Subject: | Re: Inconsistent behaviour of +=() and existing array keys |
Date: | Sat, 29 Nov 2014 19:19:37 -0000 |
User-agent: | Opera Mail/12.16 (Win32) |
On Fri, Nov 28, 2014 at 03:47:49PM -0500, Maarten Billemont wrote:least for the associative arrays case, because in the case of normal arrays,ksh93 does some pretty funny things: | dualbus@hp ~ % ksh93 -c 'a=(); a+=([0]=b); typeset -p a' | typeset -A a=([0]=b) # Ha! Now 'a' is an associative array...
Associative is more "default" in ksh93 as in bash: a=([0]=4) typeset -p a gives in bash: declare -a a='([0]="4")' in ksh93: typeset -A a=([0]=4) An empty array (a=()) gives in ksh93: typeset -C a=() -C means Compound variable, which is something different. -Helmut -- Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/
[Prev in Thread] | Current Thread | [Next in Thread] |