xref: /csrg-svn/usr.bin/pascal/libpc/RANG4.c (revision 62094)
140865Sbostic /*-
2*62094Sbostic  * Copyright (c) 1979, 1993
3*62094Sbostic  *	The Regents of the University of California.  All rights reserved.
440865Sbostic  *
540865Sbostic  * %sccs.include.redist.c%
640865Sbostic  */
71678Smckusick 
840865Sbostic #ifndef lint
9*62094Sbostic static char sccsid[] = "@(#)RANG4.c	8.1 (Berkeley) 06/06/93";
1040865Sbostic #endif /* not lint */
111678Smckusick 
129136Smckusick char ERANG[] = "Value of %D is out of range\n";
131678Smckusick 
143018Smckusic long
RANG4(value,lower,upper)151678Smckusick RANG4(value, lower, upper)
163018Smckusic 	long	value;
173018Smckusic 	long	lower;
183018Smckusic 	long	upper;
191678Smckusick {
201678Smckusick 	if (value < lower || value > upper) {
219136Smckusick 		ERROR(ERANG, value);
221678Smckusick 	}
231678Smckusick 	return	value;
241678Smckusick }
25