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>intpos()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
INTPOS()

Syntax:     INTPOS(<expH>)

Arguments:  <expH> is either a number 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:      The conversion of signed 16-bit integers to unsigned 16-bit
            integers.  Positive arguments will remain unchanged, while
            negative arguments will produce results which are converted
            accordingly.

            The function will return a 0 for invalid arguments (see
            examples).

Notes:      <expH> % 65536 will be returned for values greater than or
            equal to 65536.

Library:    CT1.LIB


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

Examples:   ? INTPOS(-1)                && Result: 65535
            ? INTPOS(-2)                && Result: 65534
            ? INTPOS(30000)             && Result: 30000
            ? INTPOS(60000)             && Result: 60000

            * Beware: INTPOS(0) = INPOS(65536)
            ? INTPOS(0)                 && Result: 0
            ? INTPOS(65536)             && Result: 0

            * Values greater than 65536
            *
            * The difference between 90000 and 65536 is
            * 24464.
            ? INTPOS(90000)             && Result: 24464

            * As in the example INTPOS(-1)
            * 24464 will be subtracted from 65536.
            ? INTPOS(-90000)            && Result: 41072



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

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