Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Clipper Tools One Guide - <b>intneg()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
INTNEG()

Syntax:     INTNEG(<expH>)

Arguments:  <expH> is either a numerical value or a hexadecimal string
            of digits, which will be converted into a signed 16-bit number.

Returns:    A numeric value.
            A signed 16-bit number.

Usage:      With this function it is possible to convert an unsigned
            integer to a signed integer.

            All values for <expH> which are smaller than, or equal to
            +32767 (hex=7FFF) will remain positive.  Values which lie in
            the range +32768 (hex=8000) to +65535 (hex=FFFF) will
            lead to a negative result.

Notes:      The function returns a 0 as the result of invalid, too large or
            negative arguments.

Library:    CT1.LIB


--------------------------------- Example ------------------------------

Examples:   * Valid argument.
            ? INTNEG(0)                 && Result: 0
            ? INTNEG(-1)                && Result: 0
            ? INTNEG(30000)             && Result: 30000
            ? INTNEG(32767)             && Result: 32767
            ? INTNEG(32768)             && Result: -32768
            ? INTNEG(32769)             && Result: -32769
            ? INTNEG(60000)             && Result: -5536
            ? INTNEG(65535)             && Result: -1
            ? INTNEG("FFFF")            && Result: -1

            * Incorrect or arguments that are to large
            ? INTNEG("GGGG")            && Result: 0
            ? INTNEG(90000)             && Result: 0



See Also: INTPOS() NUMAND() NUMOR() NUMXOR()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson