home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a012 / 1.ddi / CHAP06.EXE / CHP0612.PRG < prev    next >
Encoding:
Text File  |  1991-04-30  |  632 b   |  27 lines

  1. /*
  2.    Listing 6.12 LOCAL overriding STATIC
  3.    Author: Greg Lief
  4.    Excerpted from "Clipper 5: A Developer's Guide"
  5.    Copyright (c) 1991 M&T Books
  6.                       501 Galveston Drive
  7.                       Redwood City, CA 94063-4728
  8.                       (415) 366-3600
  9. */
  10.  
  11. //───── NOTE: must compile with /N compiler option
  12.  
  13. static counter := 0
  14.  
  15. function main 
  16. local counter := 1  // whoops! forgot to delete this one 
  17. ? counter           // 1 -- looking at the LOCAL 
  18. myfunc() 
  19. return nil
  20.  
  21.  
  22. function myfunc 
  23. ? counter           // 0 -- looking at the STATIC 
  24. return nil
  25.  
  26. // end of file CHP0612.PRG
  27.