[scripting] While with break and continue
[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                         continue
13                 fi
14                 set b $(${b} - 1)
15         done
16         set a $(${a} - 1)
17 done