Add a variable to a class instance at runtime: Difference between revisions
Content added Content deleted
m (→{{header|Pike}}: objects not classes) |
No edit summary |
||
Line 338: | Line 338: | ||
return 0; |
return 0; |
||
}</lang> |
}</lang> |
||
=={{header|Octave}}== |
|||
Octave is dynamically typed, and can have fields added in two methods: |
|||
<lang octave> |
|||
% Given struct "test" |
|||
test.b=1; |
|||
test = setfield (test, "c", 3); |
|||
</lang> |
|||
=={{header|Oz}}== |
=={{header|Oz}}== |