Torah puzzle | Programmer's notes | Program code |
My priorities: the programs should be
ascii files.
Second, I have removed means dangerous for portability:
farmalloc,
farrealloc, ... ) is substituted by static
arrays (each kept within 64 Kbytes).
max, min are defined
explicitly.
ldiv and the
corresponding data type ldiv_t are substituted
by straighforward use of x/y and
x%y.
Each line of each data file is enclosed in square brackets
[...], which makes the programs insensitive to a
specific representation for end-of-line (NL, or
CR, or CR+NL, ...).
Texts of programs are now mosaic: some lines are by Y. Rosenberg, others are mine. Sometimes it makes the code somewhat unnatural and simplifiable.
The first program prepare is completely mine. It
is not necessary, but I find it convenient.
The second program searh is mostly by Y.
Rosenberg, but spoiled by me: I have removed a speeding-up
mechanism ("Letter 2 table"). Why did I? In order to make the
program more understandable. True, it runs much slower, but
still, the most time-consuming step is distance,
not search.
| back to Programs | Programmer's notes |
| back to Steps of computation | back to Torah puzzle |