This is Interval.m in view mode; [Download] [Up]
#import "Interval.h" @implementation Interval - (BOOL)isIn:(unsigned long)number { if((number>=from) && (number<=to)) return TRUE; else return FALSE; } - (unsigned long)lowerBound { return from; } - (unsigned long)upperBound { return to; } - initWithLower:(unsigned long)low upper:(unsigned long)high { [self init]; from=low; to=high; return self; } - dumpAsAsciiIn:(NXStream *)aStream; { if(from<to) NXPrintf(aStream,"%d-%d",from,to); else if(from==to) NXPrintf(aStream,"%d",from); return self; } @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.