Enumerated Scalar

As a one time Pascal programmer - does Ruby have the concept of an
enumerated scalar? It seems to have enumerations but I can't see a
standard method that recognizes inate ordering eg EObj.next, EObj < FObj
etc

···

--
Posted via http://www.ruby-forum.com/.

There is definitively nothing built in. You have to create this
yourself or use one of the libs out there that implement enums.

http://raa.ruby-lang.org/project/enum/
http://raa.ruby-lang.org/search.rhtml?search=enum

Also, often Symbols are used to represent fixed values.

Kind regards

robert

···

On Wed, Nov 3, 2010 at 3:11 PM, Mike Stephens <rubfor@recitel.net> wrote:

As a one time Pascal programmer - does Ruby have the concept of an
enumerated scalar? It seems to have enumerations but I can't see a
standard method that recognizes inate ordering eg EObj.next, EObj < FObj
etc

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/