mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-24 12:51:04 +00:00
26 lines
484 B
C++
26 lines
484 B
C++
void test(string s) {
|
|
print(ftos(!s));
|
|
if (s) print(" on");
|
|
if (!s) print(" off");
|
|
if (!!s) print(" !!on");
|
|
print("\n");
|
|
}
|
|
|
|
void test2(string s) {
|
|
print(ftos(!s));
|
|
while (s) { print(" on"); break; }
|
|
while (!s) { print(" off"); break; }
|
|
while (!!s) { print(" !!on"); break; }
|
|
print("\n");
|
|
}
|
|
|
|
string str_nul;
|
|
|
|
void main(vector v) {
|
|
test("foo");
|
|
test2("foo");
|
|
test("");
|
|
test2("");
|
|
test(str_nul);
|
|
test2(str_nul);
|
|
}
|