xref: /csrg-svn/usr.bin/pascal/libpc/SUCC.c (revision 3034)
11707Smckusick /* Copyright (c) 1979 Regents of the University of California */
21707Smckusick 
3*3034Smckusic static char sccsid[] = "@(#)SUCC.c 1.2 03/07/81";
41707Smckusick 
51707Smckusick #include "h01errs.h"
61707Smckusick 
7*3034Smckusic long
81707Smckusick SUCC(value, lower, upper)
91707Smckusick 
10*3034Smckusic 	long	value;
11*3034Smckusic 	long	lower;
12*3034Smckusic 	long	upper;
131707Smckusick {
141707Smckusick 	value++;
151707Smckusick 	if (value < lower || value > upper) {
161707Smckusick 		ERROR(ERANGE, value);
171707Smckusick 		return;
181707Smckusick 	}
191707Smckusick 	return	value;
201707Smckusick }
21