make sccs.include replace the entire line
[unix-history] / usr / src / usr.bin / pascal / libpc / PRED.c
CommitLineData
4c919c74
KM
1/* Copyright (c) 1979 Regents of the University of California */
2
a745d566 3static char sccsid[] = "@(#)PRED.c 1.5 %G%";
4c919c74 4
4c919c74 5
492cc5d3 6long
4c919c74
KM
7PRED(value, lower, upper)
8
492cc5d3
KM
9 long value;
10 long lower;
11 long upper;
4c919c74 12{
d3fdcc0c
KM
13 if (value == lower) {
14 ERROR("Cannot take pred of first element of a range\n");
d3fdcc0c 15 }
4c919c74
KM
16 value--;
17 if (value < lower || value > upper) {
d3fdcc0c 18 ERROR("Value of %D is out of range\n", value);
4c919c74
KM
19 }
20 return value;
21}