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>cmxkeycount()</b> get the number of keys in an index http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
cmxKeyCount()         Get the number of keys in an index
------------------------------------------------------------------------------

Synopsis

    cmxKeyCount( [nOrder] | [cTag [, cBag]] ) -> nKeys

Arguments

    nOrder, cTag and cBag are optional parameters which specify the index.
    If omitted, the current master index will be used.

    nOrder is the numeric order of the index.

    cTag is the tag of the index, and cBag is the specific index file in
    which to find cTag.

Returns

    cmxKeyCount() returns the number of keys in an index.

    If the index is not conditional and no scope has been set for the index,
    cmxKeyCount() will be identical with recCount().  However, for a
    conditional index, there may be fewer keys than there are records in the
    database (since some records may not meet the index FOR condition)

    cmxKeyCount() obeys the current index scope in effect.  It will only
    count the keys contained within the current scope.

Description

    cmxKeyCount() determines the number of keys in an index.

Example

    use demo                        && Assume demo has 1000 records
    index on first to first for age <= 30
    index on last to last for salary <= 50000

    set index to first, last        && First is the master index
    ? recCount()                    && Will return 1000
    ? cmxKeyCount()                 && Will return number of keys in first
                                    && (i.e., number of recs where age <= 30)
    ? cmxKeyCount(2)                && Will return number of keys in last
                                    && (i.e., number of recs where
                                    && salary <= 500000)

See Also

    cmxKeyGoto(), cmxKeyNo(), cmxKeySkip()


See Also: cmxKeyGoto() cmxKeyNo() cmxKeySkip()

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