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

Synopsis

    cmxKeyNo( [nOrder] | [cTag [, cBag]] ) -> nKeyno

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

    cmxKeyNo() returns the number of a key within an index; in contrast,
    recno() returns the physical record number.

    cmxKeyNo() will return 1 for the first key in the index, 2 for the
    second, 3 for the third, etc.  Recno() will in effect return random
    numbers when in index order.

    cmxKeyNo() obeys the current index scope in effect (if any).  It will
    return 1 for the first key in the scope, 2 for the second, etc.

    If the current record is out of scope (or you are at EOF()), cmxKeyNo()
    will return 0.

Description

    cmxKeyNo() can be useful for displaying scroll bars when in index order,
    and/or displaying messages like "Record 9 of 123" when viewing records
    in a TBrowse.

Example

    use demo                        && Assume demo has 1000 records
    set index to first              && Make records in first name order
    ? cmxKeyNo()                    && Will display 1
    ? recno()                       && Who knows?
    skip 10
    ? cmxKeyNo()                    && Will display 11
    ? recno()                       && Who knows?
    go bottom
    ? cmxKeyNo()                    && Will display 1000
    ? recno()                       && Who knows?

See Also

    cmxKeyCount(), cmxKeyGoto(), cmxKeySkip()


See Also: cmxKeyCount() cmxKeyGoto() cmxKeySkip()

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