Reflection/List properties: Difference between revisions
Content added Content deleted
No edit summary |
|||
Line 384: | Line 384: | ||
-- "foo = 23" |
-- "foo = 23" |
||
</pre> |
</pre> |
||
=={{header|Nanoquery}}== |
|||
<lang Nanoquery>// declare a class that has fields to be listed |
|||
class Fields |
|||
declare static field1 = "this is a static field. it will not be listed" |
|||
declare field2 |
|||
declare field3 |
|||
declare field4 |
|||
end |
|||
// list all the fields in the class |
|||
for fieldname in Fields.getFieldNames() |
|||
println fieldname |
|||
end</lang> |
|||
{{out}} |
|||
<pre>field3 |
|||
field2 |
|||
field4</pre> |
|||
=={{header|Objective-C}}== |
=={{header|Objective-C}}== |