xref: /original-bsd/usr.bin/pascal/libpc/RANG4.c (revision 811429ef)
1 /*-
2  * Copyright (c) 1979, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  */
7 
8 #ifndef lint
9 static char sccsid[] = "@(#)RANG4.c	8.1 (Berkeley) 06/06/93";
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