|
of_setcompare
|
|
Full name
|
pfc_n_cst_linkedlistbase.of_setcompare
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_setcompare(n_cst_linkedlistnodecompare)
|
public function integer of_setcompare (n_cst_linkedlistnodecompare anv_compare);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_SetCompare
//
// Access: public
//
// Arguments :
// anv_compare the object to be used to compare two nodes
//
// Returns: integer
// 1 = success
// -1 = failure
// -2 = failure, the compare object has already been set
//
// Description:
// Allows the specification of a different comparison object.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 6.0 Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
// Copyright © 1996-1997 Sybase, Inc. and its subsidiaries. All rights reserved.
// Any distribution of the PowerBuilder Foundation Classes (PFC)
// source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////
// Validate the passed in comparison object.
if IsNull(anv_compare) Or Not IsValid(anv_compare) then
return -1
end if
// Confirm the compare object has not already been assigned.
If of_IsCompareObjectAssigned() Then
// Cannot reset comparison object.
return -2
end If
// Reset the comparison object.
inv_compare = anv_compare
return 1
end function