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

  1. /*
  2.    Listing 6.3 Visibility of PRIVATE 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 the /N option!
  12.  
  13. function myfunc1
  14. public whatever := 2000 
  15. private mvar := 20 
  16. myfunc2() 
  17. ? mvar      // 20 
  18. ? whatever  // 2000 
  19. return nil 
  20.  
  21.  
  22. function myfunc2 
  23. private mvar := 50, whatever := "testing" 
  24. ? mvar     // 50 
  25. ? whatever // testing 
  26. return nil
  27.  
  28. // end of file CHP0603.PRG
  29.