Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
soc:2009:lynusvaz:notes:scripting_doc:features_added [2009/08/15 23:17] lynusvaz |
soc:2009:lynusvaz:notes:scripting_doc:features_added [2009/08/16 00:19] (current) lynusvaz |
||
---|---|---|---|
Line 1: | Line 1: | ||
=====Scripting Features===== | =====Scripting Features===== | ||
- | The features mentioned here are NOT YET part of mainline gPXE, and are still under development. The modified code can be found in my git repository, in the [[http://git.etherboot.org/?p=people/lynusvaz/gpxe.git;a=shortlog;h=refs/heads/offset|offset]] branch. | + | The features mentioned here are NOT YET part of mainline gPXE, and are still under development. The modified code can be found in my git repository, in the [[http://git.etherboot.org/?p=people/lynusvaz/gpxe.git;a=shortlog;h=refs/heads/expt|expt]] branch. |
- Identifiers | - Identifiers | ||
Line 121: | Line 121: | ||
fi | fi | ||
- | 6. While and for loops have been added: | + | ====Loops==== |
+ | You can use while and for loops as: | ||
while <condition> | while <condition> | ||
do | do | ||
Line 151: | Line 152: | ||
done | done | ||
displays: | displays: | ||
- | 0 | + | i = 0 |
- | 1 | + | i = 1 |
- | 2 | + | i = 2 |
- | 3 | + | i = 3 |
- | 5 | + | i = 5 |
- | 18 | + | i = 18 |
A break statement will exit a loop, and a continue statement will start the next iteration of the loop. | A break statement will exit a loop, and a continue statement will start the next iteration of the loop. | ||
for i in 1 2 3 4 5 6 | for i in 1 2 3 4 5 6 |