[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+-------------+############################################################
#+-| A_DELETED() |--------------------------------------------------+#########
#| +-------------+ Returns value of deleted flag for current record |#########
#+------------------------------------------------------------------+#########
##############################################################################
##############################################################################
#+--| Summary |------------------+############################################
#| #INCLUDE database.hdr |############################################
#+-------------------------------+############################################
##############################################################################
##############################################################################
#+--| Syntax |----------------------------------+#############################
#| FUNCTION LOGICAL a_deleted PROTOTYPE |#############################
#| PARAMETERS ALIAS aliasname |#############################
#+----------------------------------------------+#############################
##############################################################################
##############################################################################
############+---| Description |-----------------------------------+###########
############| The a_deleted() function returns the value of the |###########
############| deleted flag for the record currently pointed to |###########
############| in the specified aliasname. If the record has been |###########
############| marked for deletion, a_deleted() returns TRUE. |###########
############| --------------------------------------------------- |###########
############| The a_deleted() function performs identically to |###########
############| the deleted() function. a_deleted() differs |###########
############| syntactically in that it accepts an alias as a |###########
############| parameter |###########
############+-----------------------------------------------------+###########
##############################################################################
##############################################################################
#########+--| Design |---------------------------------------------+##########
#########| Use a_deleted() when your application has more than one |##########
#########| database open at one time. The a_deleted() function |##########
#########| eliminates the need to manage the current workarea. |##########
#########+---------------------------------------------------------+##########
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Print out all transactions that have not been |#########
#########| * deleted. Note:long variable names are used. |#########
#########| |#########
#########| DO WHILE .NOT. a_eof( transactions ) |#########
#########| IF a_deleted( transactions ) |#########
#########| !transactions SKIP |#########
#########| ELSE |#########
#########| ? transactions->dated, transactions->desc |#########
#########| !transactions SKIP |#########
#########| ENDIF |#########
#########| ENDDO |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * Look at each record in a database to ensure |#########
#########| * it is to be deleted |#########
#########| |#########
#########| EDIT ALL FOR a_deleted( accounts ) |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 3 |-------------------------------------------+#########
#########| * An alias can be a parameter to a function. |#########
#########| * This function returns TRUE if the current |#########
#########| * record in each alias is deleted. |#########
#########| |#########
#########| FUNCTION LOGICAL both |#########
#########| PARAMETERS ALIAS a, PARAMETERS ALIAS b |#########
#########| RETURN a_deleted(a) .AND. a_deleted(b) |#########
#########| ENDPRO |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
deleted()
SET DELETE
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson