Clarify valid range of P in 1989/ovdluhe alt code
This commit is contained in:
1 parent
66308ecd7c
commit
4238aac1ac
2 files changed
+8
-6
No files matched your search
@@ -15,7 +15,7 @@ Run the program this way:
|
|||||||
./ovdluhe < textfile
|
./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.
|
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
|
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
|
whatever you wish, as long as it's a positive `int` (or evaluates to a positive
|
||||||
default `(A<<AP)` does).
|
`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:
|
### Alternate use:
|
||||||
@@ -57,7 +58,8 @@ default `(A<<AP)` does).
|
|||||||
P=5 ./try.alt.sh
|
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:
|
## Judges' remarks:
|
||||||
|
|||||||
+2
-2
@@ -810,8 +810,8 @@ script.
|
|||||||
|
|
||||||
[Cody](#cody) fixed an infinite loop where the program would print the same thing over
|
[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
|
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
|
that by necessity had to not have an increment stage but the pointer only got
|
||||||
(in the loop itself) did the pointer get updated.
|
updated in the `if` path (in the loop itself).
|
||||||
|
|
||||||
Cody also provided the [try.sh](/1989/ovdluhe/try.sh) script which runs the
|
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
|
program four times on three files to show the different output. It doesn't run
|
||||||
|
|||||||
Reference in new issue
Block a user