Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Comix 3.0 Reference Manual - <b>cmxindexinfo()</b> return an array of index information http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
cmxIndexInfo()        Return an array of index information
------------------------------------------------------------------------------

Synopsis

    cmxIndexInfo() -> aIndexInfo

Arguments

    None.

Returns

    cmxIndexInfo() returns a two dimensional array of information about all
    indexes open in the current work area.

    The returned array dimensions are [6][n]. n is the number of indexes in
    use in the current work area.  The arrays are:

    [1]:    Index Tags (ordName())
    [2]:    Index Keys (ordKey())
    [3]:    Index Filters (ordFor())
    [4]:    Index Unique (cmxUnique())
    [5]:    Index Descend (cmxDescend())
    [6]:    Index Custom Built (cmxCustom())

Description

    cmxIndexInfo() returns a two dimensional array of information about all
    indexes.

    The returned array is set up to allow you to straightforwardly extract
    slices of information about the index (i.e., [1] is an array of index
    names, [2] is an array of index keys, etc.)

Example

    use demo
    set index to first
    myArray = cmxIndexInfo()

    *   Select slices of the info and dump them out
    dumpSlice("Index Tags", myArray[1])
    dumpSlice("Index Keys", myArray[2])
    dumpSlice("Index Filters", myArray[3])
    dumpSlice("Index Unique Settings", myArray[4])

    *   Now do a dump of all info for an index, one per line
    dumpAll(myArray)

    function dumpSlice(firstLine, infoArray)
        local n
        ? firstLine + ":"
        for n := 1 to len(infoArray)
            ? "Index " + str(n, 2) + ": "
            ?? infoArray[n]
        next n
    return nil

    function dumpAll(infoArray)
        local i, j
        ? "Total Dump: "
        for i := 1 to cmxCount()
            ?
            for j := 1 to 6
                ?? infoArray[j][i]
            next j
        next i
    return nil

See Also

    ordName(), ordFor(), cmxUnique()


See Also: ordName() ordFor() cmxUnique()

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