Anonymous user
Add a variable to a class instance at runtime: Difference between revisions
Add a variable to a class instance at runtime (view source)
Revision as of 14:11, 6 May 2009
, 15 years ago→{{header|Tcl}}: add version requirements
(→{{header|Smalltalk}}: + Tcl) |
m (→{{header|Tcl}}: add version requirements) |
||
Line 268:
=={{header|Tcl}}==
{{works with|Tcl|8.6}}
{{works with|Tcl|8.5}}and the [http://wiki.tcl.tk/TclOO TclOO package]
The code below uses the fact that each object is implemented as a namespace, to add a ''time'' variable to an instance of ''summation'':
<lang Tcl>
|