|
of_boolean
|
|
Full name
|
pfc_n_cst_conversion.of_boolean
|
Access
|
public
|
Extend of
|
boolean
|
Return value
|
boolean
|
Prototype
|
public function boolean of_boolean(string)
|
Name
|
Datatype
|
lb_null
|
Boolean
|
public function boolean of_boolean (string as_val);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_Boolean
//
// Access: public
//
// Arguments:
// as_val The string to be converted to a boolean value.
//
// Returns: boolean
// The boolean value of the string.
// If any argument's value is NULL, function returns NULL.
// If any argument's value is Invalid, function returns NULL.
//
// Description: Converts a string value to a boolean 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.
//
//////////////////////////////////////////////////////////////////////////////
Boolean lb_null
SetNull(lb_null)
//Check parameters
If IsNull(as_val) Then
Return lb_null
End If
//Convert to uppercase
as_val = Upper(as_val)
Choose Case as_val
Case 'TRUE', 'T', 'YES', 'Y', '1'
Return True
Case 'FALSE', 'F', 'NO', 'N', '0'
Return False
End Choose
//Invalid input parameter
Return lb_null
end function
Name
|
Owner
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.setnull |
systemfunctions
|
systemfunctions.upper |
systemfunctions
|