| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > FieldPairsClass > FieldPairsClass Methods >====== Equal (return 1 if all pairs are equal) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[clearright clear each right field .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[equalleftright return 1 if all pairs are equal .htm|{{btn_next_n.gif|Next page}}]] | | || **Equal** {{blk2blue.jpg|blk2blue.jpg}} The **Equal **method returns one (1) if all pairs are equal and returns zero (0) if any pairs are not equal. **Implementation:** The Equal method simply calls the EqualLeftRight method which does all the comparison work. Therefore, there are two different methods (Equal and EqualLeftRight) that produce exactly the same result. This provides an alternative calling convention for the FieldPairsClass and the BufferedPairsClass. The EqualLeftRight method name is consistent with the other comparison methods in the BufferedPairsClass and is provided for that purpose. See //BufferedPairsClass Methods// for more information. **Example:** ** Fields.AddPair(CUST:Name,  CustQ.Name)  !establish Name pair** ** Fields.AddPair(CUST:Phone, CustQ.Phone) !establish Phone pair** ** Fields.AddPair(CUST:ZIP,  CustQ.ZIP)    !establish ZIP pair** ** !some code** ** IF ~Fields.Equal                        !compare field pairs** **  CASE MESSAGE('Abandon Changes?',,,BUTTON:Yes+BUTTON:No)** **  OF BUTTON:No** **   Fields.AssignRightToLeft       !copy changes to CUST (write) buffer** **  OF BUTTON:Yes** **   Fields.AssignLeftToRight       !restore original to CustQ (display) buffer** **  END** ** END** **See Also:**     [[equalleftright return 1 if all pairs are equal .htm|EqualLeftRight]]