Navigation: ABC Library Reference > BufferedPairsClass > BufferedPairsClass Methods >====== EqualRightBuffer (compare “right” fields to “buffer” fields) ====== | |
EqualRightBuffer( <;caseflag> )
EqualRightBuffer | Compares the right buffer value to corresponding “buffer” field |
caseflag | A BYTE value that designates that the matching value is case sensitive. A value of 1 (TRUE) makes the comparison result case sensitive. |
The EqualRightBuffer method returns one (1) if each “right” field equals its corresponding “buffer” field; otherwise it returns zero (0).
Implementation:
The “left” field is the first (left) parameter of the AddPair method. The “right” field is the second (right) parameter of the AddPair method. The BufferedPairsClass automatically supplies the “buffer” field.
Return Value: BYTE
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.EqualRightBuffer !compare CUST fields to save buffer
CASE MESSAGE('Abandon Changes?',,,BUTTON:Yes+BUTTON:No)
OF BUTTON:No
Fields.AssignRightToLeft !copy changes to CUST (write) buffer
OF BUTTON:Yes
Fields.AssignBufferToLeft !restore original to CustQ (display) buffer
END
END