Alvaro Agustin Fernandez wrote:
>
> Hello. I've been toying with writing an
> enumerated type class (e.g. Red,Blue,Green).
> similar to the C++ enumerated class intrisincs.
> But I was wondering if anybody had already done
> it... Anyone?
>
> Alvaro Fernandez
> Rice University
I'm not sure if this is exactly what you are referring to, but I do that with:
public :: colors, red, blue, green
type colors
private
integer :: choice
end type colors
type(colors), parameter :: &
red = colors(0), &
blue = colors(1), &
green = colors(2)
Bill
--
William F. Mitchell
Mathematical and Computational Sciences Division
National Institute of Standards and Technology
[log in to unmask] http://math.nist.gov/~mitchell
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|