]> git.xonotic.org Git - xonotic/gmqcc.git/blob - tests/arrays2.qc
error about too many elements in initializer; added test for initialized arrays:...
[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
4 void main() {
5     float i;
6     print(ftos(glob1[0]));
7     for (i = 1; i != 7; ++i)
8         print(" ", ftos(glob1[i]));
9     print("\n");
10
11     print(ftos(glob2[0]));
12     for (i = 1; i != 7; ++i)
13         print(" ", ftos(glob2[i]));
14     print("\n");
15 }