bl791's picture
download
raw
918 Bytes
/*
nobreak -- TADS 3 extension
This is a very simple extension that lets you write switch statements without having to write an explicit "break" after every case. It also lets you specify multiple values for a single case. All you have to do is #include this file from any .t file, and then in that file you can do like this:
switch(x) {
case(1):
"It is one!";
case(2, 3, 4):
"It's two through four!";
case('heffelump', 'woozle'):
"It's very confoozle!";
default:
"It's something else entirely!";
}
The above code will always print exactly one of those output strings.
Note that the values in the cases still have to be constants.
This "library" was written by Brendan Barnwell (brenbarn@brenbarn.net)
*/
enum uselessSwitchCase;
#define case(opt...) \
case uselessSwitchCase: \
break; \
opt#foreach! case opt!:!
#define default \
case uselessSwitchCase: \
break; \
default

Xet Storage Details

Size:
918 Bytes
·
Xet hash:
91851bd147534dde88ae6c3bd1a686f4022da6516ad7f02be47233384a18da4b

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.