You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 10, 2025. It is now read-only.
function test( name ) {
switch( name ) {
case /^steve$/i {
printf("I'm a regexp\n");
}
case "Steven" {
printf("I know you!\n" );
}
default {
printf("I don't know who you are\n" );
}
}
}
test( "Steve" ); // Regexp match
test( "Steven" ); // Literal match
test( "Bob" ); // Unhandled case
NOTE: I explicitly use blocks here, because fall-throughs are evil :)