home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 10.1 Display memory status in a pop-up box.
- 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 DispMem(n)
- /*
- Display available memory stats.
- Return .T. if it falls below specified level (optional).
-
- Debugger command line examples:
-
- ? dispmem() // Display memory status box
- tp dispmem(125) // Halt when memory falls below 125 kb
- */
- local clr
- if n = nil
- clr := setcolor("W+/R")
- @ 10, 40 to 16, 61 double
- @ 11, 41 say "Memory Status Kb"
- @ 12, 41 say "--------------------"
- @ 13, 41 say "Total available " +str(memory(0), 4)
- @ 14, 41 say "Largest block " +str( memory(1), 4)
- @ 15, 41 say "RUN area " +str(memory(3), 4)
- inkey(0)
- setcolor(clr)
- n := 0
- endif
- return (memory(0) < n)
-
- // end of file CHP1001.PRG
-