[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+--------+#################################################################
#+-| DELETE |--------------------------------------------+####################
#| +--------+ The DELETE command marks specified records |####################
#| within [Scope] for deletion. |####################
#+-------------------------------------------------------+####################
##############################################################################
##############################################################################
#+--| Syntax |--------------------------------------------------+#############
#| [!<Alias>] DELETE [Scope][WHILE <L-exp>][FOR <L-exp>] |#############
#+--------------------------------------------------------------+#############
##############################################################################
##############################################################################
##########+---| Description |--------------------------------------+##########
##########| The default scope of DELETE is RECORD recno(). DELETE |##########
##########| does not physically remove specified records from the |##########
##########| <Alias>. When SET DELETE is ON, SEEK, SKIP, GOTO TOP |##########
##########| and GOTO BOTTOM ignore deleted records. GOTO will go |##########
##########| to a deleted record regardless of the SET DELETE flag. |##########
##########| Use RECALL to retrieve a deleted record. Use PACK to |##########
##########| physically remove a deleted record from the <Alias>. |##########
##########| ------------------------------------------------------ |##########
##########| DELETE does not affect a_reccount() or reccount(), |##########
##########| which always return the number of physical records |##########
##########| in the alias. |##########
##########+--------------------------------------------------------+##########
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Allow a user to delete a record. |#########
#########| |#########
#########| ! 12,25 SAY "Delete Record? " GET yes |#########
#########| READ |#########
#########| IF yes |#########
#########| !accounts DELETE && Default scope is record |#########
#########| ENDIF |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * Delete records from a specified shipper, |#########
#########| * then pack the file. |#########
#########| |#########
#########| !nuts DELETE ALL FOR nuts->shipper = "By Mule" |#########
#########| !bolts DELETE ALL FOR bolts->shipper = "By Mule" |#########
#########| !nails DELETE ALL FOR nails->shipper = "By Mule" |#########
#########| |#########
#########| !nuts PACK |#########
#########| !bolts PACK |#########
#########| !nails PACK |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 3 |-------------------------------------------+#########
#########| * SET DELETE ON acts as a filter. |#########
#########| |#########
#########| !names DELETE ALL FOR names->first = "Kurt" |#########
#########| !names LIST && We will be able to see all |#########
#########| && records where names->first |#########
#########| && is equal to "Kurt". |#########
#########| SET DELETE ON |#########
#########| !names LIST && We will not see any records |#########
#########| && where names->first = "Kurt". |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
GOTO
GOTO BOTTOM
GOTO TOP
PACK
RECALL
SET DELETE
SKIP
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson