[Roles](Roles) - roles and skills of contributing community members - outdated list of stuff nobody kept of to date
[Community development](Community-development) - another outdated list
[Art Roadmap](Art-Roadmap)
+[NewQC](NewQC) - possible changes regarding QC (compiler, syntax, …) - never happened so the syntax descriptions are mostly wrong
- [DarkPlaces Wiki](DarkPlaces-Index)
- [QuakeC Specifications v1.0](QuakeC-Wiki)
- [QuakeC tutorials](http://www.inside3d.com/tutorials.php) at inside3d.com
-- [NewQC](NewQC) - Possible changes regarding QC (compiler, syntax, …)
- [Writing your first mutator](writing-your-first-mutator)
- [Tips for new developers](Programming-Tips)
However, the syntax to declare function pointers is simplified:
```c
+// in global scope
typedef float(float, float, float) op3func_t;
var float(float a, float b, float c) f;
op3func_t g;
+
+// in local scope
f = sum3;
g = f;
print(ftos(g(1, 2, 3)), "\n"); // prints 6
string strcat(string a, string b, ...) = #115;
```
+The function/field syntax is ambiguous. In global scope a declaration can be a variable, field or function. In local scope, it's always a variable. The `var` keyword can be used in global scope to treat is as local scope (always declaring a variable). The following table shows declarations in global scope:
+
+| Example code | Meaning |
+| `.float a;` | Entity field of type `float` |
+| `float(float x1) a;` or `float a(float x1);` | Function with a `float` param returning `float` |
+| `.float a(float x1);` | Function with a float param returning a `float` field reference |
+| `.float(float x1) a;` | Entity field of type function with a `float` param returning `float` |
+| `.float(float x1) a(float x2);` | Function with a `float` param returning a field reference of type function with a `float` param returning `float` |
+
+These rules were determined by experimenting with GMQCC:
+- if there are parentheses after the name, it's always a function
+- else if it starts with a period, it's a field
+- else if there are parentheses after the type, it's a function (using the old QC syntax)
+- else it's a variable
+
+GMQCC allows even weirder declarations like `float f(float)();` which can be called as `f()(42);`. It's not clear whether this behavior is intentional or the result of one of the many compiler bugs.
+
void
----