Jump to content

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

Merge omitted languages at bottom and add Processing
(add {{omit from}} Delphi, Free Pascal, and Object Pascal)
(Merge omitted languages at bottom and add Processing)
Line 19:
<lang actionscript>var foo:Foo = new Foo();
foo.bar = "zap";</lang>
{{omit from|Modula-2}}
{{omit from|Scheme}}
 
=={{header|Ada}}==
Line 1,811 ⟶ 1,809:
=={{header|zkl}}==
Once created, class structure is fixed. However, using reflection, you can blow apart the class structure, add what ever and recompile the class (at run time). The REPL does this to store intermediate user results (defined classes, functions, variables, etc). It is ugly, slow and left as an exercise to the reader who cares.
 
 
{{omit from|Applesoft BASIC}}
Line 1,832 ⟶ 1,829:
{{omit from|Lily}}
{{omit from|M4}}
{{omit from|Modula-2Make}}
{{omit from|Maxima}}
{{omit from|ML/I}}
{{omit from|MakeModula-2}}
{{omit from|NetRexx}}
{{omit from|Object Pascal}}
Line 1,842 ⟶ 1,840:
{{omit from|Pascal}}
{{omit from|PlainTeX}}
{{omit from|Processing}}
{{omit from|PureBasic}}
{{omit from|R}}
{{omit from|TI-83 BASIC}} {{omit from|TI-89 BASIC}} <!-- Does not have objects. -->
{{omit from|Retro}}
{{omit from|Rust}}
{{omit from|Scheme}}
{{omit from|TI-83 BASIC}} {{omit from|TI-89 BASIC}} <!-- Does not have objects. -->
{{omit from|UNIX Shell}}
{{omit from|ZX Spectrum Basic}} <!-- Does not have objects. -->
Cookies help us deliver our services. By using our services, you agree to our use of cookies.