polserver/testsuite/escript/switch/switch09.src
turleypol fd1dcb6512 switch tests where never executed :(
fixed unaligned load for switch statements
2018-06-03 21:54:16 +02:00

23 lines
425 B
Text

// switch06
//
function foo2( p )
case (p)
4: return "four";
5: return "five";
"fourteen": return 14;
"thirteen": return 13;
default: return "NOTA: " + p;
endcase
endfunction
function foo( p )
return "p " + foo2(p) + " d";
endfunction
print( foo( 1 ) );
print( foo( 4 ) );
print( foo( "thirteen" ) );
print( foo( "fourteen" ) );
print( foo( 14 ) );
print( foo( 13 ) );