xref: /csrg-svn/usr.bin/pascal/libpc/PRED.c (revision 3017)
11675Smckusick /* Copyright (c) 1979 Regents of the University of California */
21675Smckusick 
3*3017Smckusic static char sccsid[] = "@(#)PRED.c 1.2 03/07/81";
41675Smckusick 
51675Smckusick #include "h01errs.h"
61675Smckusick 
7*3017Smckusic long
81675Smckusick PRED(value, lower, upper)
91675Smckusick 
10*3017Smckusic 	long	value;
11*3017Smckusic 	long	lower;
12*3017Smckusic 	long	upper;
131675Smckusick {
141675Smckusick 	value--;
151675Smckusick 	if (value < lower || value > upper) {
161675Smckusick 		ERROR(ERANGE, value);
171675Smckusick 		return;
181675Smckusick 	}
191675Smckusick 	return	value;
201675Smckusick }
21