of_icon


pfcapsrv.pbl   >   pfc_n_cst_conversion   >   of_icon   

Full name pfc_n_cst_conversion.of_icon
Access public
Extend of integer
Return value integer
Prototype public function integer of_icon(string,ref icon)

Name Datatype
No Data

Name Datatype
No Data

public function integer of_icon (string as_source, ref icon ae_icon);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  		of_Icon
//
//	Access:  		public
//
//	Arguments:
//	as_source			The string value to be converted to Icon datatype value.
//	a_sqlpreviewtype	A icon variable passed by reference which will
//							hold the icon value that the string value was
//							converted to.
//
//	Returns: 		integer	 
//						1 if a successful conversion was made.
//						If as_source value is NULL, function returns -1
//						If as_source value is Invalid, function returns -1
//
//	Description:  Converts a string value to a icon data type value.
//
//////////////////////////////////////////////////////////////////////////////
//
//	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.
//
//////////////////////////////////////////////////////////////////////////////

//Check parameters
If IsNull(as_source) Then
	Return -1
End If

//Convert to lowercase
as_source = Lower (as_source)

Choose Case as_source
	Case "none", "none!"
		ae_icon = None!

	Case "question", "question!"
		ae_icon = Question!

	Case "information", "information!"
		ae_icon = Information!

	Case "stopsign", "stopsign!"
		ae_icon = StopSign!

	Case "exclamation", "exclamation!"
		ae_icon = Exclamation!
		
	Case Else
		Return -1
End Choose

Return 1

end function

     
Name Owner
No Data

     
Name Owner
systemfunctions.isnull systemfunctions
systemfunctions.lower systemfunctions

     
Full name
No Data

     
Name Scope
No Data