Repository navigation
2.1 Integers and Longs
Himxh edited this page Sep 12, 2026
·
3 revisions
int a = 0;
long a2 = 1;
bool a3 = true;
var a4 = 20000000000;
var a5 = false;
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.
- 首页 / Home
- 安装与快速开始 / Installation & Quick Start
- 第一个脚本 / Your First Script
- 命令速查 / Command Reference
- 自动执行脚本 / Auto-run Scripts
- 定义函数 / Defining Functions
- 函数重载 / Function Overloading
- Lambda 表达式 / Lambda Expressions
- 函数式接口 / Functional Interfaces
- 选择器总览 / Selectors Overview
- 选择器过滤器 / Selector Filters
- EntityRef 引用 / EntityRef
- 占位符参考 / Placeholders Reference
- PlaceholderAPI 桥接 / PAPI Bridge
- 创建 GUI / Creating a GUI
- GUISlot 槽位 / GUISlot
- 点击回调 / Click Callbacks
- onClose 回调 / onClose Callback
- GUI 刷新 / GUI Refresh
- 数学函数 / Math Built-ins
- 高精度计算 / BigDecimal Built-ins
- 字符串函数 / String Built-ins
- 集合函数 / Collection Built-ins
- 文件 I/O / File I/O
- 命令与 sleep / Commands & sleep