1. Function overloading.
Now it is possible to declare multiple functions with the same name as long as the argument count differs.
Example:
Code: Select all
float max(float x, float y) { ... }
float max(float x, float y, float z) { ... }
float max(float x, float y, float z,float w) { ... }
It is now possible to have blocks of code in ZLibrary that is executed during library initialization.
Example:
Code: Select all
private int[10] lookup; //declare lookup table
{ //Initialize table
for(int i=0; i<lookup.SizeDim1; i++)
lookup[i] = ...
}
void getLookup(int index) { //function that uses the lookup table
...
}
Limitation: the ZLibrary must be located in App.OnLoaded to use initialize-blocks.
3. Library variable default assignment.
It is now allowed to give a library variable a default value (just like local variables).
This was previously not allowed in libraries.
Code: Select all
private int xx=42;
private string s="Hello";
4. Missing operators from C/Java now implemented
"~" : binary not. "int x = ~0xF0;"
"!" : unary not "int x = !y;" (x will be 0 if y is 0 else x will be 1)
"|=" : binary or assign
"<<=" : binary shift left assign
">>=" : binary shift right assign
"&=" : binary and assign
5. "do while".
Do-while loops now supported. These loops execute at least one iteration.
Code: Select all
int i=0;
do {
...
} while (i<5);
Previously there was a bug that caused the code below to fail to compile because x is declared twice, even though they are in separate blocks. That is now fixed.
Code: Select all
void f() {
{
int x=1;
}
{
int x=1;
}
}
The list of most-recently-used projects in the File menu has now been expanded from 8 to 16 items.
http://www.zgameeditor.org/files/ZGameEditor_beta.zip