// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1365 globals endglobals native testSuccess takes nothing returns nothing function foo takes integer x returns integer local integer x_1 local integer x_2 local integer x_3 if x > 1000 then set x_1 = x return foo(x_1 / 1000) endif if x > 100 then set x_2 = x return foo(x_2 / 100) endif if x > 10 then set x_3 = x return foo(x_3 / 10) endif return x endfunction function initGlobals takes nothing returns nothing endfunction function main takes nothing returns nothing call initGlobals() if foo(7531) == 7 then call testSuccess() endif endfunction function config takes nothing returns nothing endfunction