mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
19 lines
No EOL
388 B
Text
19 lines
No EOL
388 B
Text
// switch06
|
|
//
|
|
|
|
var a array;
|
|
a[1] := "hello";
|
|
a[2] := "world";
|
|
a[3] := "again";
|
|
a[4] := "there";
|
|
|
|
foreach elem in a
|
|
case( elem )
|
|
"world": continue; // this should continue the FOREACH
|
|
"again": break; // this should exit the CASE
|
|
default: print( "case element: " + elem );
|
|
endcase
|
|
|
|
print( "element: " + elem );
|
|
endforeach
|
|
print( "done" ); |