home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 27.3. A final version of Assert(), this one
- with the ability to reset the internal counter.
- Author: Craig Yellick
- Excerpted from "Clipper 5: A Developer's Guide"
- Copyright (c) 1991 M&T Books
- 501 Galveston Drive
- Redwood City, CA 94063-4728
- (415) 366-3600
- */
-
- function Assert(expr)
- static counter := 0
- if expr = nil
- counter := 0
- else
- counter++
- if .not. expr
- break counter
- endif
- endif
- return nil
-
- // end of file CHP2703.PRG
-