Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- di_Library v. 0.1 - <b>di_setoutput()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
di_setOutput()
Set output to specified device(s)
------------------------------------------------------------------------------
Syntax

    di_setOutput([<nNewDevices>]) --> nSelectedDevices

Arguments

    <nNewDevices> is the sum of the device handles for which you
    wish to enable output.  If the argument is omitted, no change is
    made to the output device list.

Returns

    nSelectedDevices is the sum of the device handles which are
    enabled for output.

Description

    Modify or determine the devices for which output is enabled.  Device
    handle 1 is reserved for the screen; other device handles are
    created by initialization functions.  Devices which have not been
    initialized, or which were deinitialized will not be enabled.  If
    the argument passed is different from the return value, that
    indicates that some device(s) could not be enabled for output.  Each
    device handle is of the form 2, so every positive integer is a
    unique sum of device handles.  Currently, the largest used HTML
    device handle is 220.

Examples

    #DEFINE SCREEN 1
    ....
    nPage1 := di_initHTML()
    ? nPage1                            // Result:  2
    nPage2 := di_initHTML()
    ? nPage2                            // Result:  4
    ? di_setOutput(SCREEN)              // Result:  1
    di_SAY(1,1,"Hello World!")
    ? di_setOutput(nPage2 + SCREEN)     // Result:  5
    di_SAY(1,1,"Hello World!")
    ? di_setOutput(37)                  // Result:  5

    Note: Since 37 = (1+4+32), di_setOutput(37) attempts to enable
    output for devices 1, 4 and 32.  In the example, device 32 has not
    been initialized, so therefore only devices 1 and 4 are enabled for
    output in this context.

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