[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+----------+###############################################################
#+-| CONTINUE |----------------------------------------------------+##########
#| +----------+ The CONTINUE command sets the record number to the |##########
#| next record which meets the condition specified by |##########
#| the LOCATE command |##########
#+-----------------------------------------------------------------+##########
##############################################################################
##############################################################################
#+--| Syntax |-----------------+##############################################
#| [!<Alias>] CONTINUE |##############################################
#+-----------------------------+##############################################
##############################################################################
##############################################################################
#######+---| Description |-------------------------------------------+########
#######| If the CONTINUE finds the next record, then found() returns |########
#######| TRUE and eof() returns FALSE. |########
#######+-------------------------------------------------------------+########
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Open a database and search for the name "Tom". |#########
#########| |#########
#########| USE "looker.dbf" ALIAS look |#########
#########| LOCATE ALL FOR look->name = "Tom" |#########
#########| |#########
#########| *--- As we find the record ... edit the name. |#########
#########| |#########
#########| DO WHILE found() |#########
#########| @10,10 SAY "Edit name: " GET look->name |#########
#########| READ |#########
#########| CONTINUE |#########
#########| ENDDO |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * For more than one database, use a_eof(). |#########
#########| * This allows relations to be programmed easily |#########
#########| * without using the SELECT command. |#########
#########| |#########
#########| OPEN a[r] ALIAS names |#########
#########| OPEN a[r+1] ALIAS auto |#########
#########| !names LOCATE ALL FOR names->state = 'CA' |#########
#########| !auto LOCATE ALL FOR auto->state = 'CA' |#########
#########| |#########
#########| DO WHILE .not. a_eof( names ) .and. .not. a_eof( auto ) |#########
#########| IF names->name <> find_name |#########
#########| !names CONTINUE |#########
#########| LOOP |#########
#########| ENDIF |#########
#########| |#########
#########| IF auto->name <> find_name |#########
#########| !auto CONTINUE |#########
#########| LOOP |#########
#########| ENDIF |#########
#########| |#########
#########| EDIT FIELDS names->name, auto->car |#########
#########| ENDDO |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
LOCATE
eof()
found()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson