of_wait


pfcapsrv.pbl   >   pfc_n_cst_datetime   >   of_wait   

Full name pfc_n_cst_datetime.of_wait
Access public
Extend of integer
Return value integer
Prototype public function integer of_wait(datetime)

Name Datatype
No Data

Name Datatype
ldt_value date
ll_null long

public function integer of_wait (datetime adtm_target);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  		of_Wait
//
//	Access:  		public
//
//	Arguments:
//	adtm_Target 	Target DateTime.
//
//	Returns:  		integer
//						1 if function waited the expected time.
//						If any argument's value is NULL, function returns NULL.
//						If any argument's value is Invalid, function returns -1.
//
//	Description:  	Given a datetime, will wait until datetime is reached.
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	5.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.
//
//////////////////////////////////////////////////////////////////////////////

date 	ldt_value

//Check parameters
If IsNull(adtm_Target) Then
	long ll_null
	SetNull(ll_null)
	Return ll_null
End If

//There is only need to test the Date portion of the DateTime.
ldt_value = Date(adtm_Target)

//Check for invalid date
If Not of_IsValid(ldt_value) Then
	Return -1
End If

//Wait until Target datetime
DO UNTIL DateTime(Today(),Now()) >= adtm_Target
	Yield() //Yields control to other graphic objects, including objects that are not PB.
LOOP

Return 1

end function

     
Name Owner
pfc_n_cst_datetime.of_wait pfc_n_cst_datetime

     
Name Owner
systemfunctions.date systemfunctions
systemfunctions.datetime systemfunctions
systemfunctions.isnull systemfunctions
systemfunctions.now systemfunctions
systemfunctions.setnull systemfunctions
systemfunctions.today systemfunctions
systemfunctions.yield systemfunctions
pfc_n_cst_datetime.of_isvalid pfc_n_cst_datetime

     
Full name
No Data

     
Name Scope
No Data