Re: Suggestions for ESL (was: Euphoria Standard Library on UBoard)

new topic     » goto parent     » topic index » view thread      » older message » newer message

Pete Lomax wrote:
> 
> 
> On Sun, 24 Jul 2005 11:06:42 -0700, Tommy Carlier
> <guest at RapidEuphoria.com> wrote:
> 
> 
>>In languages like C#, that have built-in support for enum-types, it looks
> 
> <snip>
> Hmm, no mixed enums there. Let's see:
> }}}
<eucode>
> constant DAY=enum(),
> 		 MONTH=enum(),
> 		Apr=next(MONTH),
> 		Aug=next(MONTH),
> 		Dec=next(MONTH),
> 		Feb=next(MONTH),
> 		Friday=next(DAY),
> 		Jan=next(MONTH),
> 		Jul=next(MONTH),
> 		Jun=next(MONTH),
> 		Mar=next(MONTH),
> 		Monday=next(DAY),
> 		Nov=next(MONTH),
> 		Oct=next(MONTH),
> 		Saturday=next(DAY),
> 		Sep=next(MONTH),
> 		Sunday=next(DAY),
> 		Thursday=next(DAY),
> 		Tuesday=next(DAY),
> 		Wednesday=next(DAY),
> </eucode>
{{{

> 
> Does that look sensible to you?
> Do you have any example of using mixed enums?
> 
> 
>>To demonstrate how simple this concept is,
> 
> <snip>
> Actually, in my last post I was not even suggesting changing that
> functionality, just the names. But now I see even that simple code as
> quite unnecessarily over complicated.
> 
> Pete

You would have to have a routine last_enum() or end_enum() or some such 
in order to restart the count.  Other libraries have similar mechanisms.

-- 
==============================
Too many freaks, not enough circuses.
j.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu