You can create arrays of compound variables, each array element is a
compound variable which may contain an array.
Such trees are only limited by memory size and were a driving force to
deliver a 64bit ksh93 shell in Solaris.

ksh93 -c 'compound container ; compound -A container.a1 ; compound -A
container.a1[foo].a2 ; compound -A container.a1[foo].a2[bar]=( integer
z=1 ) ; print -v container'
(
        typeset -C -A a1=(
                [foo]=(
                        typeset -C -A a2=(
                                [bar]=(
                                        typeset -l -i z=1
                                )
                        )
                )
        )
)

http://svn.genunix.org/repos/on/branches/ksh93/gisburn/scripts/simplefiletree1.sh
is a demo application which builds such trees.

Olga

On Wed, May 5, 2010 at 11:25 AM, Daniel Beggemann <[email protected]> wrote:
> Hello
> is it possible to have nested associative arrays, i.e. a tree like structure 
> where each element of an associative array can contain another associative 
> array?
>
> Thanks,
>
> --
> Daniel
> --
> GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
> Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
> _______________________________________________
> ast-users mailing list
> [email protected]
> https://mailman.research.att.com/mailman/listinfo/ast-users
>



-- 
      ,   _                                    _   ,
     { \/`o;====-    Olga Kryzhanovska   -====;o`\/ }
.----'-/`-/     [email protected]   \-`\-'----.
 `'-..-| /     Solaris/BSD//C/C++ programmer   \ |-..-'`
      /\/\                                     /\/\
      `--`                                      `--`

_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to