rev 247 - trunk/pr
SVN User <[email protected]>
| Newsgroups | gmane.comp.lang.prothon.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: mark Date: 2004-04-01 02:16:14 -0500 (Thu, 01 Apr 2004) New Revision: 247 Added: trunk/pr/closure.pr Log: new test code closure.pr Added: trunk/pr/closure.pr =================================================================== --- trunk/pr/closure.pr 2004-04-01 05:19:43 UTC (rev 246) +++ trunk/pr/closure.pr 2004-04-01 07:16:14 UTC (rev 247) @@ -0,0 +1,13 @@ +#!/usr/local/bin/prothon + + +def f1(): + count = 0 + def f2(): + &count += 1 + return &count + return f2 + +f =f1() +print f(), f(), f() # prints 1 2 3 +