xref: /original-bsd/usr.bin/pascal/libpc/RANG4.c (revision 2301fdfb)
1 /* Copyright (c) 1979 Regents of the University of California */
2 
3 static char sccsid[] = "@(#)RANG4.c 1.4 11/12/82";
4 
5 char ERANG[] = "Value of %D is out of range\n";
6 
7 long
8 RANG4(value, lower, upper)
9 	long	value;
10 	long	lower;
11 	long	upper;
12 {
13 	if (value < lower || value > upper) {
14 		ERROR(ERANG, value);
15 		return;
16 	}
17 	return	value;
18 }
19