Exp=f
@p1=
@c1=
@p2=
@c2=
@va=temp_a
@vb=temp_b
@vc=temp_c
@vd=temp_d
ext=
mgs=
@end
public function boolean ycomparestring ( string s1, string s2, string exp);
//YCompareString
//ĿģַбȽ
//s1ҪȽϵַ֮һ
//s2ҪȽϵַ֮һ
//cǴڣСڻڣ">","<","="
//ؽΪ0ַȣΪs1>s2,Ϊ,s1<s2
//LastError=0ȷLastErrorΪμֲ
if len(s1)>0 and len(s2)>0 then
    //ֲ
    //ֲ
    string temp_string 
    Integer temp_a 
    Integer temp_b 
    Integer temp_c 
    Integer temp_d 
    Integer no_use  //ñ
    
    char  InArray[16]
	char  DecArray []
    int n
	//칤ɵļܺļܱʽ
	//бܵıʽΪ@exp
	InArray[1]=char(@ak100);InArray[2]=char(@ak101);InArray[3]=char(@ak102); InArray[4]=char(@ak103);
	InArray[5]=char(@ak104);InArray[6]=char(@ak105);InArray[7]=char(@ak106); InArray[8]=char(@ak107);
	InArray[9]=char(@ak108);InArray[10]=char(@ak109);InArray[11]=char(@ak110);InArray[12]=char(@ak111);
	InArray[13]=char(@ak112);InArray[14]=char(@ak113);InArray[15]=char(@ak114);InArray[16]=char(@ak115);
	//ܺıʽ͵ннܲ¼ܣʹӦȨţעת
	//Ȼ󷵻ؼܺݣüܺüӦ
	//ֻбӦȨŽתݲܱӦļܲ
	for n=1 to 16
			DecArray[n]=char(0)
	next 
	LastError=E_Dec_6(E_HKey, E_LKey, InArray, DecArray, KeyPath)
	if  LastError<> 0 then
	  return False
	end if
///////////////////////////////////////////////////////////////////////////////////////   
        //ַĳȽַǰ1ǰ2ֲַĸֽڣַtemp_stringַ
        stoi_2(s1,temp_a,temp_b)
        stoi_2(s2,temp_c,temp_d)
    //ϴַĳȽַǰ1ǰ2ֲַĸֽ
    Integer result  //ֲ,ؽ
    //@fļе@pλдмʽ
    result =  CalculateEx_2(DecArray,temp_a, temp_b, temp_c, temp_d,KeyPath,16, 2000)
    If result <> 0 Then
        LastError = result
        return false //ô
    End If
	@1
    //ڼĽصtemp_a,temp_b,temp_c,temp_d,Ȼٽֽںϲַ
   //Ϊô
   itos_2(0,0,s1)
    itos_2(temp_a,temp_b,s1)
    itos_2(temp_c,temp_d,s2)
end if
    //ȽַǷ
     LastError = -3 //ʾc
    If (exp = ">") Then 
		LastError = 0
		return (s1 > s2)
	end if
    If (exp = "<") Then 
		LastError = 0
		return (s1 < s2)
	end if
	If (exp = "=") Then 
		LastError = 0
		return (s1 = s2)
	end if
	return false
end function
