mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-12-18 16:31:29 +00:00
23 lines
373 B
C++
23 lines
373 B
C++
|
void(string, ...) print = #1;
|
||
|
string(float) ftos = #2;
|
||
|
|
||
|
void(float n) main = {
|
||
|
local float i;
|
||
|
|
||
|
for (i = 0; i < n; i += 1) {
|
||
|
print("for ", ftos(i), "\n");
|
||
|
}
|
||
|
|
||
|
i = 0;
|
||
|
while (i < n) {
|
||
|
print("while ", ftos(i), "\n");
|
||
|
i += 1;
|
||
|
}
|
||
|
|
||
|
i = 0;
|
||
|
do {
|
||
|
print("do ", ftos(i), "\n");
|
||
|
i += 1;
|
||
|
} while (i < n);
|
||
|
};
|