3 int f(int a, int b, int c)
\r
5 int a = b; // ERROR, redefinition
\r
8 float a = float(a) + 1.0; // okay
\r
14 int f(int a, int b, int c); // okay to redeclare
\r
17 float b(int a); // okay, b and b() are different
\r
20 bool c; // okay, and c() are different
\r
22 float f; // okay f and f() are different
\r
23 float tan; // okay, hides built-in function
\r
24 float sin(float x); // okay, can redefine built-in functions
\r
25 float cos(float x) // okay, can redefine built-in functions
\r
29 bool radians(bool x) // okay, can overload built-in functions
\r
34 int gi = f(1,2,3); // ERROR, can't call user-defined function from global scope
\r
49 gl_Position = vec4(f);
\r
51 for (int f = 0; f < 10; ++f)
\r
56 float x = 2.0, /* 2nd x visible here */ y = x; // y is initialized to 2
\r
57 int z = z; // ERROR: z not previously defined.
\r
60 int x = x; // x is initialized to '1'
\r
68 S S = S(0); // 'S' is only visible as a struct and constructor
\r
69 S.x; // 'S' is now visible as a variable
\r
78 struct S { // okay, hides S
\r
83 struct S { // ERROR, redefinition of struct S
\r