Paul Roebuck <[EMAIL PROTECTED]> writes: > I want the equivalent of this 'C' declaration. > enum StoplightColor { > green = 3, > yellow = 5, > red = 7 > }; > > This mostly works except the validity checking doesn't > seem to occur automatically. What didn't I do to enable > it?
I think you *dis*abled it by specifying an initializer which doesn't check the validity: > initialize.stoplightColor <- function(.Object, value) { > [EMAIL PROTECTED] <- as.integer(value) > .Object > } -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html