Added FORchk.c
authorceriel <none@none>
Thu, 10 Sep 1987 15:56:28 +0000 (15:56 +0000)
committerceriel <none@none>
Thu, 10 Sep 1987 15:56:28 +0000 (15:56 +0000)
lang/m2/libm2/FORchk.c [new file with mode: 0644]
lang/m2/libm2/LIST

diff --git a/lang/m2/libm2/FORchk.c b/lang/m2/libm2/FORchk.c
new file mode 100644 (file)
index 0000000..f911e29
--- /dev/null
@@ -0,0 +1,8 @@
+static char m[] = "Warning: FOR-loop control variable was changed in the body";
+_forloopchk(a,b)
+       unsigned a, b;
+{
+       if (a != b) {
+               Traps_Message(m , 0, sizeof(m) - 2, 1);
+       }
+}
index f9bd631..ab3d139 100644 (file)
@@ -16,6 +16,7 @@ Semaphores.mod
 random.mod
 Strings.mod
 catch.c
+FORchk.c
 Traps.mod
 Arguments.c
 LtoUset.e