|
of_ostype
|
|
Full name
|
pfc_n_cst_conversion.of_ostype
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_ostype(string,ref ostypes)
|
public function integer of_ostype (string as_source, ref ostypes ae_ostype);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_OSType
//
// Access: public
//
// Arguments:
// as_source The string value to be converted to an ostype
// datatype value.
// ae_ostype An ostypes variable passed by reference which will
// hold the ostype 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 NULL.
// If as_source value is Invalid, function returns -1.
//
// Description: Converts a string value to an ostype data type value.
//
//////////////////////////////////////////////////////////////////////////////
//
// 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.
//
//////////////////////////////////////////////////////////////////////////////
//Check parameters
If IsNull(as_source) Then
Return -1
End If
//Convert to lowercase
as_source = Lower (as_source)
Choose Case as_source
Case "aix", "aix!"
ae_ostype = AIX!
Case "hpux", "hpux!"
ae_ostype = HPUX!
Case "macintosh", "macintosh!"
ae_ostype = MACINTOSH!
Case "osf1", "osf1!"
ae_ostype = OSF1!
Case "sol2", "sol2!"
ae_ostype = SOL2!
Case "windows", "windows!"
ae_ostype = WINDOWS!
Case "windowsnt", "windowsnt!"
ae_ostype = WINDOWSNT!
Case Else
Return -1
End Choose
Return 1
end function
Name
|
Owner
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.lower |
systemfunctions
|