of_addhead


pfcapsrv.pbl   >   pfc_n_cst_list   >   of_addhead   

Full name pfc_n_cst_list.of_addhead
Access public
Extend of integer
Return value integer
Prototype public function integer of_addhead(n_cst_linkedlistnode)

Name Datatype
No Data

Name Datatype
li_rc Integer
lnv_locatenode n_cst_linkedlistnode

public function integer of_addhead (n_cst_linkedlistnode anv_newheadnode);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  of_AddHead
//
//	Access:  Public
//
//	Arguments : 
//	anv_newheadnode  The node to be added to the list as the new Head node.
//
//	Returns:  integer
//	1 = success
//	-1 = failure
//
//	Description:  
//	Adds a new node to the Head of the linked list.
//
// Note:
//	Duplicates may not be allowed.
// Not a valid action for sorted lists.
//
//////////////////////////////////////////////////////////////////////////////
//
//	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.
//
//////////////////////////////////////////////////////////////////////////////

Integer li_rc
n_cst_linkedlistnode lnv_locatenode

// Not a valid request when the list is sorted.
If ib_sorted Then Return FAILURE

// If duplicates are not allowed, check for duplicates.
If Not ib_duplicatesallowed Then
	If of_IsInList(anv_newheadnode) Then
		// A duplicate was encountered.
		Return FAILURE
	End If
End If

Return Super::of_AddHead(anv_newheadnode)
end function

     
Name Owner
No Data

     
Name Owner
pfc_n_cst_linkedlistbase.of_addhead pfc_n_cst_linkedlistbase
pfc_n_cst_list.of_isinlist pfc_n_cst_list

     
Full name
No Data

     
Name Scope
No Data