Jump to content

Add a variable to a class instance at runtime: Difference between revisions

Line 1,294:
=={{header|Ring}}==
We can add an attribute (or a group of attributes) to the object state using addattribute() function
==== Example ====
<lang ring>o1 = new point
addattribute(o1,"x")
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.