xref: /csrg-svn/usr.bin/pascal/libpc/RANG4.c (revision 9136)
11678Smckusick /* Copyright (c) 1979 Regents of the University of California */
21678Smckusick 
3*9136Smckusick static char sccsid[] = "@(#)RANG4.c 1.4 11/12/82";
41678Smckusick 
5*9136Smckusick char ERANG[] = "Value of %D is out of range\n";
61678Smckusick 
73018Smckusic long
81678Smckusick RANG4(value, lower, upper)
93018Smckusic 	long	value;
103018Smckusic 	long	lower;
113018Smckusic 	long	upper;
121678Smckusick {
131678Smckusick 	if (value < lower || value > upper) {
14*9136Smckusick 		ERROR(ERANG, value);
151678Smckusick 		return;
161678Smckusick 	}
171678Smckusick 	return	value;
181678Smckusick }
19