Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Advantage CA-Clipper Guide v5.5 - ax_clrscope() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 AX_ClrScope()
 Clear the TOP or BOTTOM scope value
------------------------------------------------------------------------------

 Syntax

     AX_ClrScope( [ 0|1 ] ) -> logical

     [ 0|1 ] An optional numeric value in which:

     0  specifies the TOP scope is to be cleared.
     1  specifies the BOTTOM scope is to be cleared.

 Returns

     Returns TRUE (.T.) if the scope value is cleared, FALSE (.F.)
     if not. If .F. is returned, the error code returned from the
     AX_Error() function will give you more information as to why
     the operation failed.

 Description

     AX_ClrScope() clears the specified scope value for the current tag or
     index. A scope may be defined to mark the top and bottom range of an
     index.

     If no parameter is specified, 0 (clear TOP scope) is assumed.

     If one scope value is cleared, the new boundary value is assumed to
     be the top or bottom of the actual index.  For example, if only the
     BOTTOM scope is cleared, the visible records of the index will be
     from the TOP scope value to the end of the index file.

     AX_ClrScope(0) performs the same function as SET SCOPETOP with no
     value specified. AX_ClrScope(1) performs the same function as SET
     SCOPEBOTTOM with no value specified.

     Scopes exist per index order. That is, each index order in each work
     area can have its own scope. Only the scope on the currently active
     index order in the currently active work area is in effect, however.
     Scopes continue to exist until the scope is cleared (using
     CLEAR SCOPE) or the corresponding index is closed. Changing active
     index orders and/or work areas does not clear a scope; it just changes
     what scope is in effect.

 Example

     USE test VIA "DBFCDXAX"       // Open TEST.DBF
     INDEX ON state TAG state      // Create an index on the STATE field

     ? "Set the top SCOPE value to AZ and the bottom SCOPE value to CA"
     ? "to limit the range of visible records by STATE..."

     AX_SetScope( 0, "AZ" )        // Sets the SCOPETOP to "AZ"
     AX_SetScope( 1, "CA" )        // Sets the SCOPEBOTTOM to "CA"
     Browse()                      // Browse all records w/ states from AZ-CA

     CLEAR
     WAIT "Now clear the SCOPE condition..."
     AX_ClrScope( 0 )              // Clear SCOPETOP
     AX_CLrScope( 1 )              // Clear SCOPEBOTTOM


See Also: AX_SetScope() SET SCOPE SET SCOPETOP SET SCOPEBOTTOM

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