[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
+---------------------------------+
|             DELETED             |
+---------------------------------+
DELETED([<expC> | <expN>])

-----------------------------------
Determines if current record is marked for deletion.
Return value - Logical
-----------------------------------

The DELETED() function returns a logical value that indicates whether
the current record is marked for deletion.  If the record is marked,
DELETED() returns a value of true (.T.); otherwise, it returns a value
of false (.F.).

DELETED() supports an optional argument <alias> which indicates the work
area to which the function is to be applied.  Specify a database alias
or work area letter (work area letters A through J for the first ten
work areas only) or specify the work area number.  If you specify an
alias or work area letter it must be enclosed in single or double
quotes.

If no database is open in the indicated work area, false is returned.
If the argument is omitted, the status of the currently selected work
area is returned.

In the program example that follows, the ITEMS database is scanned for
all records which are not DELETED().  Those which are not marked for
deletion have their total inventory value (QUANTITY*COST) added to the
INV_COST variable.

Clauses
-------

<expC> | <expN>
        Work area number or alias.

+---------------------------------+
|         Program Example         |
+---------------------------------+
In this example, ITEMS database is scanned for all records which are not
marked for deletion.  Records not marked for deletion have their total
inventory value (QUANTITY*COST) added to INV_COST variable.

USE items
SET TALK OFF
inv_cost = 0
SCAN FOR NOT DELETED()
        ? item, quantity, cost
        inv_cost = inv_cost + (quantity*cost)
ENDSCAN
? 'Total cost of current inventory:', inv_cost

-----------------------------------

See Also:  RECALL, SET DELETED

-----------------------------------

See Also: RECALL SET DELETED
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson