function CompareString(in_source, in_compare)
local ret_value;
local ret_msg;
if (in_source > in_compare) then
value = 1;
msg = 'source greate then';
end
if (in_source < in_compare) then
value = -1;
msg = 'source less then';
end
if (in_source == in_compare) then
value = 0;
msg = 'source equal then';
end
return value,msg;
end
source_string = "reacher";
in_string = io.read();
--获取字符串对比函数输入
execute_status, ret_msg = CompareString(source_string, in_string);
print('get execute status:'..execute_status);
print(ret_msg);