2.1 Integers and Longs - HimxhMC/HimDSL GitHub Wiki
2.1 HimDSL的基本数据结构
整数类型 Integers
int a = 0;
long a2 = 1;
布尔类型 Boolean
bool a3 = true;
类型推断:Type inference
var a4 = 20000000000;
var a5 = false;
算术运算 calc
var a6 = a + a2;
a = a + 1;
a2 += 10;
支持的算数运算: Supported:
+ - * / %
+= -= *= %=
但是请不要使用i++的格式。 Do not use "i++".
所有Java学习者请注意。本DSL脚本只有基本类型,没有包装器。
此外,整数除法不会自动提升类型,需要在函数模块学习强制转换。
一切变量的值都可以为null。
All Java learners, please note. This DSL script only has primitive types and no wrappers.
In addition, integer division does not automatically promote types. You need to learn type casting in the function module.
The value of all variables can be null.