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 
	
	byte InArray[16]
	byte DecArray []
    int n
	//칤ɵļܺļܱʽ
	//бܵıʽΪ@exp
	InArray[1]=@ak100;InArray[2]=@ak101;InArray[3]=@ak102; InArray[4]=@ak103;
	InArray[5]=@ak104;InArray[6]=@ak105;InArray[7]=@ak106; InArray[8]=@ak107;
	InArray[9]=@ak108;InArray[10]=@ak109;InArray[11]=@ak110;InArray[12]=@ak111;
	InArray[13]=@ak112;InArray[14]=@ak113;InArray[15]=@ak114;InArray[16]=@ak115;
	//ܺıʽ͵ннܲ¼ܣʹӦȨţעת
	//Ȼ󷵻ؼܺݣüܺüӦ
	//ֻбӦȨŽתݲܱӦļܲ
	for n=1 to 16
			DecArray[n]=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
