xHarbour Reference Documentation > Function Reference |
Creates the complement for values of data type C, D, L, M, N
Complement( <xValue> ) --> xComplement
The function returns the complement of the passed value, or NIL if an illegal data type is passed.
Category: | CT:Miscellaneous , Miscellaneous functions |
Source: | ct\misc2.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example displays results of Complement() PROCEDURE Main LOCAL cString := "xHarbour" LOCAL dDate := StoD( "20070131" ) LOCAL lLogic := .T. LOCAL nNumber := 3.15 ? Complement( cString ) // result: (not printable) ? Complement( dDate ) // result: 11/30/92 ? Complement( lLogic ) // result: .F. ? Complement( nNumber ) // result: -3.15 RETURN
http://www.xHarbour.com