This silly (but easy-to-make) mistake of mine was pointed out to me already. :) 
I did, however, see some weirdness with it after I fixed it. Here's my original 
response to that from last Thursday:

1) In my original example, I have fixed the getindices() call and I
noticed that I didn't have the common bundle "dg" [where the array is created]
listed in the bundlesequence, yet the output was exactly right. Any explanation
for that?

2) In a similar example except where the common bundle is in the
"bundlesequence" but is contained in another file that is included in
"inputs", I get four copies of the following message that precede
otherwise correct output:

   Function getindices was promised an array called "asset_cache" in
scope "dg" but this was not found

Hopefully someone will be able to respond to these minor concerns.

Thanks,
Justin

-----Original Message-----
From: milo...@gmail.com [mailto:milo...@gmail.com] 
Sent: Monday, March 29, 2010 4:21 AM
To: Justin Lloyd
Cc: help-cfengine@cfengine.org
Subject: Re: Accessing global arrays?

>    vars:
>        "at_fields" slist => getindices("$(g.asset_cache)"); ###### THIS
> DOES NOT WORK
>

Have you tried without the $ sign?

"v[index_1]" string => "value_1";
"v[index_2]" string => "value_2";
"parameter_name" slist => getindices("v");

This electronic communication and any attachments may contain confidential and 
proprietary 
information of DigitalGlobe, Inc. If you are not the intended recipient, or an 
agent or employee 
responsible for delivering this communication to the intended recipient, or if 
you have received 
this communication in error, please do not print, copy, retransmit, disseminate 
or 
otherwise use the information. Please indicate to the sender that you have 
received this 
communication in error, and delete the copy you received. DigitalGlobe reserves 
the 
right to monitor any electronic communication sent or received by its 
employees, agents 
or representatives.

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to