Skip to content

2.1 Integers and Longs

Himxh edited this page Sep 12, 2026 · 3 revisions

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.

HimDSL 文档 / Documentation

入门 / Getting Started

语言基础 / Language Basics

控制流 / Control Flow

函数 / Functions

数据结构 / Data Structures

自定义类型 / Custom Types

Minecraft 集成 / Minecraft Integration

事件与调度 / Events & Scheduling

GUI 系统 / GUI System

内置函数参考 / Built-ins Reference

进阶 / Advanced

扩展 API / Extension API

你真的需要 API 吗?/ Do you really need the API?

Clone this wiki locally