SourceForge.net Logo

Euphoria Standard Library
(ESL)

Home Page | Project Status | Contribute | Guidelines and Information



Euphoria Standard Library module:

enum.e



1. Introduction


Implements an enumeration feature similar to the enum keyword in the C and C++ programming languages. It does this by keeping track of a sequence of sequences hidden from the user.



2. Routines

new_enumeration, create_enum

Syntax: i = new_enumeration(x, i), ...
Description: Begins a new enumeration. If x is an integer it that is the value the enumeration begins at, if it's a sequence of length 2 the first value is the begining value and the second is the end value. Returns an integer which is an index into the list of enumerations.
Status: PROPOSED


next_enum

Syntax: i = next_enum(i1)
Description: Takes an integer id designating which enumeration to use and returns the next number. Any call made after reaching the end value causes an error.
Status: PROPOSED


range

Syntax: s = range(i1, i2)
Description: Returns a sequence of all the numbers from i1 to i2. Should probably be moved to another file.
Status: PROPOSED