• 10/6/25 9:01 am
- 399 views • 1 today
- save_alt 18 downloads
- Compatibility
- Minecraft 1.21
- Changes include
6
这里是皮革剑,一个充满特性的世界。
这个数据包是一个小型教学语言:C-Minus语言的编译器,可以将C-Minus语言代码编译成mcfunction代码并执行。
运行函数"c-:display/"打开代码编辑界面,在界面内编辑的代码可以被保存(并同时编译),之后可以点击运行。
该语言为C语言的子集,支持如下语法:
int类型定义,int和void函数定义,作用域,四则运算,函数调用,if-else分支和while循环。
This is LeatherSword, a world filled with features.
This pack is a compiler of a tiny programming language: "C-Minus".
Run function “c-:display/” to open the code editing interface where you can save (and compile) your code. Then click "Run" to run the code.
C-Minus is a subset of C language, with only the following syntax:
int variables, int and void functions, scoping, arithmetic operations, function calls, if-else conditional branching, and while loop.
示例代码如下: (运行该代码将得到int函数的返回值为18.)
Example Code of C-Minus:
这个数据包是一个小型教学语言:C-Minus语言的编译器,可以将C-Minus语言代码编译成mcfunction代码并执行。
运行函数"c-:display/"打开代码编辑界面,在界面内编辑的代码可以被保存(并同时编译),之后可以点击运行。
该语言为C语言的子集,支持如下语法:
int类型定义,int和void函数定义,作用域,四则运算,函数调用,if-else分支和while循环。
This is LeatherSword, a world filled with features.
This pack is a compiler of a tiny programming language: "C-Minus".
Run function “c-:display/” to open the code editing interface where you can save (and compile) your code. Then click "Run" to run the code.
C-Minus is a subset of C language, with only the following syntax:
int variables, int and void functions, scoping, arithmetic operations, function calls, if-else conditional branching, and while loop.
示例代码如下: (运行该代码将得到int函数的返回值为18.)
Example Code of C-Minus:
int gcd (int u, int v) { /* calculate the gcd of u and v */
if (v == 0) return u;
else return gcd(v, u - u / v * v); /* v,u-u/v*v is equals to u mod v*/
}
int main() {
int x; int y; int temp;
x = 72;
y = 18;
if (x<y) {
temp = x;
x = y;
y = temp;
}
return gcd(x,y);
}More like this
6742514
119



Have something to say?