mojo_client/bin/scripts/example_loop_if.def
False.Genesis c8015e9929 * fixed if (error on multiple endifs)
* implemented loop...endloop & exitloop
* fixed crash on parsing ${} (var with no name)
* added an example .def file to explain loop/if-statements
2007-03-20 21:37:38 +00:00

22 lines
332 B
Modula-2

#permission=255
// example script to explain how to use loops/ifs
set,x 0
loop
set,y 0
add,x 1
if ?{bigger,${x} 5}
exitloop
endif
loop
if ?{bigger,${y} 8}
exitloop
else
set,tmp ${x}
mul,tmp ${y}
out LOOP:${x}:${y} = ${tmp}
endif
add,y 1
endloop
endloop
out end if/loop test script