]> git.xonotic.org Git - xonotic/gmqcc.git/blob - tests/rassign.qc
Experimental support for implicit return assignments. This closes #107. To enable...
[xonotic/gmqcc.git] / tests / rassign.qc
1 float f_float() {
2     return = 100.0f;
3     return = 200.0f;
4     return;
5 }
6
7 vector f_vector() {
8     return = '1 2 3';
9     return = '2 3 4';
10     return;
11 }
12
13 string f_string() {
14     return = "hello";
15     return = "world";
16     return;
17 }
18
19 void main() {
20     print(ftos(f_float()), "\n");  // 200.0f
21     print(vtos(f_vector()), "\n"); // '1 2 3'
22     print(f_string(), "\n");       // world
23 }