Enumerations: Difference between revisions

m
m (→‎{{header|Diego}}: Added `flag` enumeration)
Line 986:
+------+</lang>
 
And, you can iterate over the values (though an example of that is probably beyond the scope of this task), along with numerous other variations on these themes.<lang J> {{for_example. fruit do. echo;example end.}} ''
apple
banana
cherry</lang>
 
(A person could reasonably argue that enums were introduced in some languages to work around deficiencies in array handling in those languages. But this would be a part of a larger discussion about type systems and the use of systems of bit patterns to represent information.)
 
=={{header|Java}}==
6,951

edits