Daniel,

the arrays can indeed be multi-dimensional, the real question is what do you 
want to do
with the keys? Get indices applies only to one-dimensional arrays, so what 
would you want
to do with another array?

e.g. getindexlist("Hosts","2")

to extract a list of the second index?

Daniel Dehennin wrote:
> Hello,
> 
> Continuing my exploration of cf3, I find associative arrays greats, but
> is there any chance to make them multi-dimensional?
> 
> Something like:
> 
> --8<---------------cut here---------------start------------->8---
> vars:
>     "Hosts[server1][ipaddress]" string => "10.2.3.4";
>     "Hosts[server2][ipaddress]" string => "10.2.3.5";
> --8<---------------cut here---------------end--------------->8---
> 
> Then doing a getindices("Hosts[server1]").
> 
> Regards.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@cfengine.org
> https://cfengine.org/mailman/listinfo/help-cfengine

-- 
Mark Burgess

-------------------------------------------------
Professor of Network and System Administration
Oslo University College, Norway

Personal Web: http://www.iu.hio.no/~mark
Office Telf : +47 22453272
-------------------------------------------------
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to