Nested function: Difference between revisions
m
→using a class: ditto counter class not private
m (→using a class: added re-pass 'sep' note) |
m (→using a class: ditto counter class not private) |
||
Line 1,133:
{{libheader|Phix/Class}}
Same output. I trust it is obvious that if you passed in c.count, you would not be able to update it.
Again note how MakeList's sep ''must'' be explicitly re-passed to MakeItem.<br>
Also note that the counter class ''cannot'' be made private to MakeList, however as a non-global it would automatically be private to a single source code file.
<lang Phix>class counter
public integer count
|