[gPXE-devel] More Scripting Discussion

Lynus Vaz lynusvaz at gmail.com
Wed Mar 17 23:09:10 EDT 2010


Hi Shao,

On Thu, Mar 18, 2010 at 4:51 AM, Miller, Shao
<Shao.Miller at yrdsb.edu.on.ca>wrote:

> Good day to All,
> [snip]
>
> 'if <condition> <command>' : Stefan's fine implementation will execute
> <command> is <condition> is a non-zero unsigned integer.  Although its
> behaviour can already be mimicked somewhat with some of the ugliest
> recursive-variable-expansion business you've ever seen in a gPXE script,
> users might be more familiar with 'if' from other scripting/programming
> languages.
>
I think it would be nice to have at least equal and not-equal operators in
<condition>, to check variable values.

>
> ': <label>' : This defines a "point-of-interest" in a script for jumping
> to with 'goto'.  Regardless of implementation, can we agree on this
> form/format?
>
> Stefan and I worked through some examples of implementing loops and an
> if-else construct where we realized that a "deferred execution" of
> "routine bodies" headed by ':' was not as usable as the case where
> "where they appear, there shall they be executed."  I had an idea that
> we might gain a reduced code-size cost with the constraint that one can
> only 'goto' a "routine" which has already been passed by the parser.  To
> do this, I tried "deferred execution" of such routines.  This proved
> difficult to express an if-else construct with.  A recent patch I've
> submitted does not have this constraint and actually costs less code
> than that strategy took anyway.
>
So does 'deferred execution' mean stopping code execution till the label is
found? I found it a bit difficult to follow the terms yesterday.

> [snip]
>

Regards,
Lynus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://etherboot.org/pipermail/gpxe-devel/attachments/20100318/265a3078/attachment.html 


More information about the gPXE-devel mailing list