xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

Complement()

Creates the complement for values of data type C, D, L, M, N

Syntax

Complement( <xValue> ) --> xComplement

Arguments

<xValue>
This is a value of data type C, D, L, M or N.

Return

The function returns the complement of the passed value, or NIL if an illegal data type is passed.

Info

Category: CT:Miscellaneous , Miscellaneous functions
Source:ct\misc2.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// 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

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe