h1. New QC Syntax It is possible that at some point we decide to switch QC-compiler which requires some changes to the code. h2. Clean syntax: In fteqcc there are some ambiguities regarding fieldpointers, function pointers, and field-return-types etc. A clean syntax is needed, *SUGGESTIONS ARE WELCOME*, my(blub's) current suggestion is: |_.definition|_.meaning| |float foo(void)| function| |float foo*(void)| function pointer| |.float foo(void)| member: method/function pointer| |..float foo(void)|/2. member: method/function pointer returning .float| |..*float foo(void)| |.*float foo*(void)| function pointer returning .float| |.*float| fieldpointer| |.*float foo(void)| fieldpointer: method/function pointer| |.*.float foo(void)| fieldpointer: method/function pointer returning .float| Additionally, at places where the definition of members or global functions is not allowed, they will be treated like fieldpointers. So inside parameterlists or a functionbody the list is as follows: |_.definition|_.meaning| |float foo(void)| *function pointer*| |float foo*(void)| function pointer| |.float foo(void)| *fieldpointer: method/function pointer*| |..float foo(void)|/2. *fieldpointer: method/function pointer returning .float*| |..*float foo(void)| |.*float foo*(void)| function pointer returning .float| |.*float| fieldpointer| |.*float foo(void)| fieldpointer: method/function pointer| |.*.float foo(void)| fieldpointer: method/function pointer returning .float| h2. Function definitions: The old-style QC way of defining functions will not be supported, so
void(float x) something = { ... }
becomes
void something(float x) { ... }
which is the most common way to define functions in the xonotic code already anyway. h2. Constants: From now on, the code
float x = 3
does what the first instinct tells you: it creates a global with the initial value 3. Contrary to old QC, where it created a constant. To create a constant use:
const float x = 3