[plt-scheme] Enumeration types

From: Mike T. Machenry (dskippy at ccs.neu.edu)
Date: Tue Jul 9 07:33:47 EDT 2002

It would greatly depend on what you were doing. If you're using the 
enumerated symbols to stand for some properties as they are very
commonly used, then all you need are symbols in scheme. If you are
using them another way, then I'm affraid I'd need more context as
scheme is very different from C and often there are no equivalents

-mike

On Mon, Jul 08, 2002 at 02:16:17PM +0100, Paulo J. Matos wrote:
> [Please handle PLT Scheme list administrative tasks through the Web:
>    http://list.cs.brown.edu/mailman/listinfo/plt-scheme]
> 
> Hi all,
> 
> Is it possible to create a enumeration type in scheme? Just like
> enums in C? Or a way to emulate the workings?
> 
> I though about:
> (define ENUM1 1)
> (define ENUM2 2)
> ...
> (define ENUMn n)
> 
> but this is dirty... is there a cleaner way?
> 
> Best regards,
> 
> -- 
> Paulo J. Matos : pocm(_at_)rnl.ist.utl.pt
> Instituto Superior Tecnico - Lisbon    
> Software & Computer Engineering - A.I.
>  - > http://www.rnl.ist.utl.pt/~pocm 
>  ---	
> 	Yes, God had a deadline...
> 		So, He wrote it all in Lisp!
> 
> 



Posted on the users mailing list.