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

  1. /*
  2.    Listing 6.5 Scope of LOCAL Variables
  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 option!
  12.  
  13. function myfunc1
  14. local mvar := 200 
  15. myfunc2() 
  16. ? mvar            // never gets this far 
  17. return nil 
  18.  
  19.  
  20. function myfunc2 
  21. mvar *= 2         // crash -- not visible here 
  22. return nil
  23.  
  24. // end of file CHP0605.PRG
  25.