脚本编写

IDC

IDC变量

auto 声明局部变量

extern 声明全局变量

IDC表达式

支持大部分C语言表达式,不支持op=这种

支持字符串切片操作

IDC语句

不支持switch语句

不支持复合赋值语句

对花括号中的变量范围没有规定

IDC函数

static my_func(x,z,y){
	auto a,b,c;
	......
}

调用函数时,如果是以&传入参数则以地址传递,否则为值传递

IDC对象

class ExampleClass {
	ExampleClass(x,y){
		this.a = x;
		this.y = y;	
	}
	~ExampleClass(){	
	}
	foo(x){
		this.a = this.a + x;
	}
}

static main(){
	ExampleClass ex;
	auto ex = ExampleClass(1,2);
	ex.foo(10);
	ex.z = "string";
}

IDC程序

#include <idc.idc>
static main(){
	......
}

#include<文件> 将指定的文件包含在当前文件中