User Tools

Site Tools


equalleftbuffer_compare_left_fields_to_buffer_fields_.htm
Navigation:  ABC Library Reference > BufferedPairsClass > BufferedPairsClass Methods >====== EqualLeftBuffer (compare “left” fields to “buffer” fields) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

EqualLeftBuffer( <;caseflag> )

blk2blue.jpg

EqualLeftBuffer Compares left 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 EqualLeftBuffer method returns one (1) if each “left” 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.EqualLeftBuffer         !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

See Also:     AddPair, RealList

equalleftbuffer_compare_left_fields_to_buffer_fields_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1