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

  1. /*
  2.    Listing 6.6 Passing a LOCAL Variable by Reference
  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(@mvar)    // pass by reference 
  16. ? mvar            // 400 
  17. return nil 
  18.  
  19.  
  20. function myfunc2(mvar) 
  21. mvar *= 2 
  22. return nil
  23.  
  24. // end of file CHP0606.PRG
  25.