J
Joe Laughlin
I'm sure there's a fairly easy answer for this... but how can I define a new
type with range checking?
Example: I want to define a new type that's like a double, except that you
can only give it values from 0.0 to 100.0. I'd also like it to act like a
double as much as possible, except that an exception is thrown when it's set
to an invalid number.
Ideas?
Thanks,
Joe
type with range checking?
Example: I want to define a new type that's like a double, except that you
can only give it values from 0.0 to 100.0. I'd also like it to act like a
double as much as possible, except that an exception is thrown when it's set
to an invalid number.
Ideas?
Thanks,
Joe