mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
25 lines
470 B
Text
25 lines
470 B
Text
// Scope04 - make sure locals in sub-blocks can override other locals
|
|
//
|
|
var a array;
|
|
a[1] := 4;
|
|
a[2] := 5;
|
|
a[3] := 9;
|
|
|
|
function foo( a )
|
|
outer:
|
|
foreach i in (a)
|
|
print( "1. I=" + i );
|
|
var j := 0;
|
|
inner:
|
|
while (j <= 10)
|
|
print( "J=" + j );
|
|
if (j == i)
|
|
continue outer;
|
|
endif
|
|
j := j + 1;
|
|
endwhile
|
|
print( "2. I=" + i );
|
|
endforeach
|
|
endfunction
|
|
|
|
foo(a);
|