[scripting] Added for loops
[people/lynusvaz/gpxe.git] / src / tests / while.gpxe
1 #!gpxe
2 set a 10
3 while $(${a} > 0)
4         if $(${a} == 3 )
5                 break
6         fi
7         set b 5
8         while $(${b} > 0)
9                 echo ${a}, ${b}
10                 if $(${b} == 5)
11                         set b 2
12                         for c in 2 3 5 7 11 13 17 19
13                                 echo "c = ${c}"
14                         done
15                         continue
16                 fi
17                 set b $(${b} - 1)
18         done
19         set a $(${a} - 1)
20 done
21
22 for i in 1 2 3 4 5 6 7 8 
23         if $(${i} == 5)
24                 continue
25         fi
26         if $(${i} == 7)
27                 break
28         fi
29         echo "i = ${i}"
30 done