mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
23 lines
425 B
Text
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 ) );
|