Hi Shao,<br><br><div class="gmail_quote">On Thu, Mar 18, 2010 at 4:51 AM, Miller, Shao <span dir="ltr"><<a href="mailto:Shao.Miller@yrdsb.edu.on.ca">Shao.Miller@yrdsb.edu.on.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Good day to All,<br>
[snip]<br>
<br>
'if <condition> <command>' : Stefan's fine implementation will execute<br>
<command> is <condition> is a non-zero unsigned integer. Although its<br>
behaviour can already be mimicked somewhat with some of the ugliest<br>
recursive-variable-expansion business you've ever seen in a gPXE script,<br>
users might be more familiar with 'if' from other scripting/programming<br>
languages.<br></blockquote><div>I think it would be nice to have at least equal and not-equal operators in <condition>, to check variable values.<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
': <label>' : This defines a "point-of-interest" in a script for jumping<br>
to with 'goto'. Regardless of implementation, can we agree on this<br>
form/format?<br>
<br>
Stefan and I worked through some examples of implementing loops and an<br>
if-else construct where we realized that a "deferred execution" of<br>
"routine bodies" headed by ':' was not as usable as the case where<br>
"where they appear, there shall they be executed." I had an idea that<br>
we might gain a reduced code-size cost with the constraint that one can<br>
only 'goto' a "routine" which has already been passed by the parser. To<br>
do this, I tried "deferred execution" of such routines. This proved<br>
difficult to express an if-else construct with. A recent patch I've<br>
submitted does not have this constraint and actually costs less code<br>
than that strategy took anyway.<br></blockquote><div>So does 'deferred execution' mean stopping code execution till the label is found? I found it a bit difficult to follow the terms yesterday. <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<font color="#888888">[snip]<br></font></blockquote><div> <br>Regards,<br></div></div>Lynus<br>