These examples check if the values of the first Brick
is equal to the corresponding value of the second
Brick. If they are, the function returns true, otherwise, it returns false.
Details
(define nameList (new Brick: 2 Name:Object:3))
Returns: #<Record 123456>
The copied brick has a different Object ID than the original brick.
(copy nameList)
Returns: #<Record 234567>
The copied Brick has the same values as the original Brick.
(isEqual #<Record 123456> #<Record 234567> )
Returns: true
The isEqual function returns false for Records with different field values.
(define nameList2 (new Brick: 2 Name:Object:1 Mortgage:Number:4 Payments:Number:9))
Returns: #<Record 345678>
(isEqual nameList nameList1 )
Returns: false
Related Examples
Here are examples of the isEqual function at work.