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>cmxkeydel()</b> delete a key from a custom built index http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
cmxKeyDel()           Delete a key from a Custom Built Index
------------------------------------------------------------------------------

Synopsis

    cmxKeyDel( [nOrder] | [cTag [, cBag]] ) -> lSuccess

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

    cmxKeyDel() returns .T. if the key was successfully deleted, .F.
    otherwise.

    cmxKeyDel() will fail if:

    o   You are not on a valid record (i.e., at EOF())
    o   The key does not exist.
    o   The index is not a Custom Built Index.
    o   The specified index does not exist.
    o   No index was specified and there is no master index.

Description

    cmxKeyDel() deletes a key from a Custom Built Index.  A Custom Built
    Index is an index which is _not_ automatically maintained by Comix. 
    Instead, you explicitly add and delete keys from the index using the
    cmxKeyAdd() and cmxKeyDel() functions.

    cmxKeyDel() evaluates the key expression for the index, and then deletes
    the key for the current record from the index.

    The index must be a Custom Built Index (it is an error to call
    cmxKeyDel() for a non-Custom Built Index).

Example

    use demo
    index on last to last custom                && Create Custom Built Index
                                                && Initially empty

    for n := 1 to recCount() step 50            && Add every 50'th record
        goto n
        cmxKeyAdd()
    next n

    list last                                   && Record 1, 51, etc.

    for n := 1 to recCount() step 100           && Remove every 100'th rec
        goto n
        cmxKeyDel()
    next n

    list last                                   && Record 51, 151, etc.

See Also

    cmxCustom(), cmxFor(), cmxKeyAdd()


See Also: cmxCustom() cmxFor() cmxKeyAdd()

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