Hi Rodolfo,<div><br></div><div>In this case though, printf will never return #f so "and" is equivalent to "begin", right?</div><div><br></div><div>-Joe</div><div><br></div><div><br><br><div class="gmail_quote">
On Wed, Mar 21, 2012 at 2:30 PM, Rodolfo Carvalho <span dir="ltr"><<a href="mailto:rhcarvalho@gmail.com">rhcarvalho@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div class="im">On Wed, Mar 21, 2012 at 17:21, Joe Gilray <span dir="ltr"><<a href="mailto:jgilray@gmail.com" target="_blank">jgilray@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Tim,<div><br></div><div>Thanks for sharing your code.</div><div><br></div><div>Quick, newby question: why do you use "and" instead of "begin" in your progress function?<br></div></blockquote><div><br>
</div><div><br></div></div><div>If you are used to run commands from bash you may do things like</div><div><br></div><div>command1 && command2 && command3</div><div><br></div><div>e.g.: mkdir somedir && cd somedir && git clone ...</div>
<div><br></div><div><br></div><div>Why people do that? Simply put, all of the commands after a `&&' are only run if the commands before executes fine (return code 0).</div><div>So "git clone" will be executed only if I could create a dir and cd to it. It will not be executed if I don't have permissions to create a dir.</div>
<div><br></div><div>Using "and" is like using "&&" in bash, while "begin" is equivalent of separating the commands with ";".</div><div><br></div><div>More on short-circuit evaluation: <a href="http://en.wikipedia.org/wiki/Short-circuit_evaluation" target="_blank">http://en.wikipedia.org/wiki/Short-circuit_evaluation</a></div>
<div><br></div><div>HTH,</div><div><br></div><div>Rodolfo</div></div>
</blockquote></div><br></div>