]> git.xonotic.org Git - xonotic/gmqcc.git/blob - tests/arrays2.qc
array testcase for previous commit
[xonotic/gmqcc.git] / tests / arrays2.qc
1 float glob1[7] = { 10, 20, 30, 40, 50, 60, 70 };
2 float glob2[7] = { 100, 200, 300, 400, 500, 600 };
3 float globs[] = { 1, 2, 3 };
4
5 void main() {
6     float i;
7     print(ftos(glob1[0]));
8     for (i = 1; i != 7; ++i)
9         print(" ", ftos(glob1[i]));
10     print("\n");
11
12     print(ftos(glob2[0]));
13     for (i = 1; i != 7; ++i)
14         print(" ", ftos(glob2[i]));
15     print("\n");
16
17     print(ftos(globs[0]));
18     for (i = 1; i != 3; ++i)
19         print(" ", ftos(globs[i]));
20     print("\n");
21 }