xref: /original-bsd/usr.bin/pascal/libpc/RANG4.c (revision e59fb703)
1 /*-
2  * Copyright (c) 1979 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  */
7 
8 #ifndef lint
9 static char sccsid[] = "@(#)RANG4.c	1.6 (Berkeley) 04/09/90";
10 #endif /* not lint */
11 
12 char ERANG[] = "Value of %D is out of range\n";
13 
14 long
15 RANG4(value, lower, upper)
16 	long	value;
17 	long	lower;
18 	long	upper;
19 {
20 	if (value < lower || value > upper) {
21 		ERROR(ERANG, value);
22 	}
23 	return	value;
24 }
25