function TCompile.GetError(): string;
begin
result := GetErrorGB(ErrorCode);
end;
function TCompile.GetErrorGB(const xErrorCode: integer): string; //返回错误描述
begin
case xErrorCode of
csTCompile_NoError: result := ''; //没有发现错误!
csTCompile_NoKnownError: result := '不知道的错误!';
csTCompile_NoErrorCode: result := '找不到错误号所对应的错误描述!';
csTCompile_CompileHexCodeError: result := '编译时指令的十六进制代码错误!';
csTCompile_HexMod2_EQ_1_Error: result := '编译时传入指令长度错误!';
csTCompile_PMMarker_Error: result := '编译得到参数名称时发生错误!';
csTCompile_FMMarker_Error: result := '编译得到函数名称时发生错误!';
csTCompile_Wording_Error: result := '语法发生错误!';
csTCompile_Bracket_Error: result := '语法错误,在 ( ) 处!';
csTCompile_Optimize_Error: result := '编译优化时发生错误!';
csTCompile_Define_Error: result := '函数编译错误(或超出定义域)!';
csTCompile_Handwriting_Error: result := '函数书写格式错误!';
csTCompile_FFHandwriting_Error: result := '积分函数书写格式错误!';
csTCompile_ReadFloat_Error: result := '编译读取常数数字时发生错误!';
csTCompile_ReadMarker_Error: result := '编译读取标识符时发生错误!';
csTCompile_Read_Error: result := '语法错误,有不识别的字符!';
csTCompile_Note_Match_Error: result := '注释符号不匹配! { } 或 /* */';
else
result := GetErrorGB(csTCompile_NoErrorCode);
end;
end;