home *** CD-ROM | disk | FTP | other *** search
- /* Range.c -- implementation of NIHCL class Range
-
- THIS SOFTWARE FITS THE DESCRIPTION IN THE U.S. COPYRIGHT ACT OF A
- "UNITED STATES GOVERNMENT WORK". IT WAS WRITTEN AS A PART OF THE
- AUTHOR'S OFFICIAL DUTIES AS A GOVERNMENT EMPLOYEE. THIS MEANS IT
- CANNOT BE COPYRIGHTED. THIS SOFTWARE IS FREELY AVAILABLE TO THE
- PUBLIC FOR USE WITHOUT A COPYRIGHT NOTICE, AND THERE ARE NO
- RESTRICTIONS ON ITS USE, NOW OR SUBSEQUENTLY.
-
- Author:
- C. J. Eppich
- Computer Systems Laboratory
- Division of Computer Research and Technology
- National Institutes of Health
- Bethesda, Maryland 20892
- Phone: (301) 496-5361
- uucp: uunet!nih-csl!kgorlen
- Internet: kgorlen@alw.nih.gov
- September, 1987
-
- Function:
-
- Class Range implements an ordered pair of ints that can be used to indicate
- a segment of some array (possibly a character String or vector).
-
- $Log: Range.c,v $
- * Revision 3.0 90/05/20 00:20:55 kgorlen
- * Release for 1st edition.
- *
- * @(#)Range.cxx 1.1 (1.1) (1.2)
- */
-
- static const char SccsId[] = "@(#)Range.cxx 1.1 (1.1) (1.2)\t09 Nov 1993";
-
- #include "Range.hxx"
- #include <iostream.h>
-
- //======= Public member functions:
-
- void Range::printOn(ostream& strm) const
- {
- strm << first << ':' << len;
- }
-
- ostream& operator<< (ostream& strm, const Range& r)
- {
- r.printOn(strm);
- return strm;
- }
-