]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - tests/length.qc
renaming the length operator to _length and fixing the lexing of that operator, gener...
[xonotic/gmqcc.git] / tests / length.qc
index 5abe769cc5b18bedc6cf1d253a59152f75bea899..ba5f01d9bad79d51b6fc7348218ea39a4abd0190 100644 (file)
@@ -4,20 +4,20 @@ float c[5] = { 5, 4, 3, 2, 1 }; // 5
 const float d[] = { 1 };        // 1
 
 void main() {
-    print(ftos(length a), "\n"); // 11
-    print(ftos(length b), "\n"); // 3
-    print(ftos(length c), "\n"); // 5
-    print(ftos(length d), "\n"); // 1
+    print(ftos(_length a), "\n"); // 11
+    print(ftos(_length b), "\n"); // 3
+    print(ftos(_length c), "\n"); // 5
+    print(ftos(_length d), "\n"); // 1
 
-    static float al = length(a);
-    static float bl = length(b);
-    static float cl = length(c);
-    static float dl = length(d);
+    static float al = _length(a);
+    static float bl = _length(b);
+    static float cl = _length(c);
+    static float dl = _length(d);
 
     print(ftos(al), "\n"); // 11
     print(ftos(bl), "\n"); // 3
     print(ftos(cl), "\n"); // 5
     print(ftos(dl), "\n"); // 1
 
-    print(ftos(length "hello world"), "\n"); // 11
+    print(ftos(_length "hello world"), "\n"); // 11
 }