Before introduce much more the syntax,
let’s learn something about the Blackey Script’s programming language features.
Blackey’s data type is much similar to Python, however the expressions are much similar to C language.
Blackey Script is a dynamically, strongly typed programming language.
The way we assign data type is very similar to Python, such as the expression below:
// Assign x as a constant value.
x = 1;
// Assign x as a string.
x = “Hello”;
The code above will print the result as:
The dynamic type means you need to analysis data type while run-time, the opposite is static type.
For example, like C / C ++, you need to specify the data type when declaring a variable.
Strong type means it doesn’t allow the variable with incorrect data type to operate.
For example, you cannot add a constant value with a string, like below:
x = 1 + “hello”;
The basic data types of Blackey Script are only floating point and string.
The other two derived types are Position and Region.
The following types are currently supported:
Blackey Script only support the data types we mentions above,
so the data type and syntax below are NOT supported:
Pointer, Array, Struct, Class … etc