Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SIx Driver RDD v3.00 - Reference Guide - <b>hs_verify():</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  hs_Verify():

  Purpose:  Verify a target string against the .DBF source string, passed as
            a code block.

   Syntax:  hs_Verify( <bSource>, <cValue> )

    Where:  <bSource> is a code block containing the expression to evaluate.

            <cValue> is the value to compare against the evaluated <bSource>.

  Returns:  Logical .T. if cValue is contained anywhere within Eval(bSource),
            else .F.

  Comments:  This differs somewhat in functionality to the CFTS CftsVerify()
             function, has been coded specifically for use with Clipper, and
             is roughly 10 times faster than CftsVerify().

  Example:

    // Lists all record numbers that contain the word "John" anywhere in
    // either the FIRST, LAST, STREET, or CITY fields.  Uses hs_Verify()
    // to prevent "fuzzy" matches.

    LOCAL cExpr := "test->FIRST + test->LAST + test->STREET + test->CITY"
    LOCAL bExpr := &( "{||" + cExpr + "}" )
    LOCAL cVal := "John", h := 0, nRec := 0

    CLS
    USE test EXCL

    IF !file("TEST.HSX")
      ? "Building HiPer-SEEK Index..."
      h := hs_Index( "TEST.HSX", cExpr, 2 )
    ELSE
      h := hs_Open( "TEST.HSX", 8, 1 )
    ENDIF

    hs_Set( h, cVal )
    nRec := hs_Next( h )

    DO WHILE nRec > 0
      dbGoto( nRec )
      IF hs_Verify( bExpr, cVal )
        ? nRec
      ENDIF
      nRec := hs_Next( h )
    ENDDO

    hs_Close( h )



See Also: hs_Next()

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