home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 6.6 Passing a LOCAL Variable by Reference
- Author: Greg Lief
- 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
- */
-
- //───── NOTE: must compile with /N option!
-
- function myfunc1
- local mvar := 200
- myfunc2(@mvar) // pass by reference
- ? mvar // 400
- return nil
-
-
- function myfunc2(mvar)
- mvar *= 2
- return nil
-
- // end of file CHP0606.PRG
-