Exp=f
@p1=
@c1=
@p2=
@c2=
@va=temp_a
@vb=temp_b
@vc=temp_c
@vd=temp_d
ext=
mgs=
@end
public function boolean Ycompare ( long yp1, long yp2, string exp );
//:Ycompare
//ĿģȽĴС൱?a>b,a<b,a=b
//p1ҪȽϵĵһ
//p2ҪȽϵĵڶ
//expǴڣСڻڣ">","<","="
//ؽ
//0ʾʽΪ٣1ʾʽΪ
//LastError=0ȷLastErrorΪμֲ
	Boolean b_negative 
	
	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
///////////////////////////////////////////////////////////////////////////////////////   
	b_negative = False //ֲڴǷ
    If (yp1 < 0) Then 
		yp1 = -yp1
	 b_negative = True //ΪaΪȻø
	 end if
    integer result ,a,b,c,d //ֲ
    //p1ֲĸֽڡ
     a = mod(yp1, 256)
     b = mod((yp1 / 256) , 256)
     c = mod((yp1 / 65536),256)
     d = mod((yp1 / 16777216), 256)
    //ⲽa,b,dĵڲ,
    //@fļе@pλдмʽ
    result =  CalculateEx_2(DecArray,a, b, c, d,KeyPath,16, 2000)
    If result <> 0 Then
        LastError = result
    End If
    long temp_a,temp_b,temp_c,temp_d  //ֲ
    
    temp_a = a
	 temp_b = b
	 temp_c = c
	 temp_d = d
   	@1
	//ĸֽٺϲһ
	yp1 = temp_a +(temp_b * 256)+(temp_c * 65536)+ (temp_d * 16777216)
	 If (b_negative) Then 
		yp1=-yp1//ָԭķ
	end if
    LastError = -3 //ʾc
    If (exp = ">") Then
	 LastError = 0
	 return (yp1 > yp2)
	 end if
    If (exp = "<") Then 
	 LastError = 0
	 return (yp1 < yp2)
	 end if
    If (exp = "=") Then 
	 LastError = 0
	 return (yp1 = yp2)
	 end if


end function
