Automatic type declaration
There are no type declarations nor type castings as found in C. Types are determined from context. In the statement, var i = 6, the variable i is a number type. For example, the following C code:
int max(int a, int b)
{
int result;
result = (a < b) ? b : a;
return result;
}
could be converted to the following ScriptEase code:
Clib.max(a, b)
{
var result = (a < b) ? b : a;
return result;
}
The code could be made even more like C by using a with statement as in the following fragment.
with (Clib)
{
max(a, b)
{
var result = (a < b) ? b : a;
return result;
}
}
A with statement can be used with large blocks of code which would allow Clib and SElib methods to be called like C functions. C programmers will appreciate this ability. Other users who decide to use the extra power of C functions will come to appreciate this ability.