Clarify valid range of P in 1989/ovdluhe alt code

This commit is contained in:
Cody Boone Ferguson committed 2024-01-12 08:25:07 -08:00
1 parent 66308ecd7c
commit 4238aac1ac
2 files changed
+8 -6

No files matched your search

+6 -4
View File
@@ -15,7 +15,7 @@ Run the program this way:
./ovdluhe < textfile
```
The program stops when it reaches the end of the template buffer\
The program stops when it reaches the end of the template buffer
by chance or is killed.
@@ -39,8 +39,9 @@ make P=9 clobber alt
```
You do not have to define `P` but if you do you can replace the value with
whatever you wish, as long as it's an int (or evaluates to an int like the
default `(A<<AP)` does).
whatever you wish, as long as it's a positive `int` (or evaluates to a positive
`int` like the default `(A<<AP)` does). Too high a value will likely cause the
program to fail and a negative value will cause a compilation error.
### Alternate use:
@@ -57,7 +58,8 @@ default `(A<<AP)` does).
P=5 ./try.alt.sh
```
NOTE: if you specify too high a value for `P` the program might fail.
NOTE: if you specify too high a value for `P` the program might fail. If you
specify a value < 0 it will fail to compile.
## Judges' remarks:
+2 -2
View File
@@ -810,8 +810,8 @@ script.
[Cody](#cody) fixed an infinite loop where the program would print the same thing over
and over again, flooding the screen. The problem is that there was a `for` loop
that by necessity had to not have an increment stage but only in the `if` path
(in the loop itself) did the pointer get updated.
that by necessity had to not have an increment stage but the pointer only got
updated in the `if` path (in the loop itself).
Cody also provided the [try.sh](/1989/ovdluhe/try.sh) script which runs the
program four times on three files to show the different output. It doesn't run