Forum: Cfengine Help
Subject: Re: Questions about the reference manual
Author: mwlarsen
Link to topic: https://cfengine.com/forum/read.php?3,18107,18199#msg-18199

neilhwatson Wrote:
-------------------------------------------------------
> > 1. depth_search => urecurse("inf");
> 2. 
> 3. body depth_search urecurse(d)
> 4. {
> 5. depth => "${d}";
> 6. exclude_dirs => { "\.svn", "\.git" };
> 7. }
> 

Perhaps it would help if I had a clue what the symbols "=>" and "->" mean. 
They're not operators I'm familiar with from any of the scripting languages 
I've used. Can you describe their meaning? Give them a name?

> Line 1 is from a promise.  Parts of a promise are
> comprised of external body parts.

What promise is line 1 from? What are the "external body parts" you're 
referring to?

>  At first this
> seems like spaghetti programming but this actually
> allows for lots of code to be reused.
> 
> Line 3 started the body part of the depth_search
> type specifically named urecurse.  This name could
> be anything.

I'm not grasping what you mean by "depth_search type specifically named 
urecurse". There are different types of depth_search?

>  (d) names the variable that is
> passed from line 1, the string 'inf'.  This is
> similar to passing variables to functions and
> subroutines in programming languages.
> 
> Line 5 sets the depth of the recursion, in this
> case infinite.
> 
> Line 6 tells the recursion to exclude directories
> names .svn and .git.

I did at least grasp those three paragraphs...

Thanks for your patience.

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

Reply via email to