Corrections to ASCII editions of DM, Spec0.2


Sun, 3 Dec 1995 05:47:50 GMT

I have uploaded slightly modified verisions of the ASCII editions of the
Designers' Manual and Specficiation revision 0.2.

The change diffs are appended hereto. The errors are, like many of mine,
silly but dramatic. They revolve around the conversion of negative
values and relational notation (<, <=, ...). The operators simply
disappeared.

I hope that nobody has been aversely affected by these. Note that these
errors are not those of Graham Nelson or the other authors of those
documents; they are mine alone.

========================

Modifications to designers' manual:

4628c4628
< -1 to tell the parser it doesn't want to decide after all.

---
>        1 to tell the parser it doesn't want to decide after all.
4674c4674
< it returned -1.  The parser then looks at the name words.  It recognises any
---
> it returned 1.  The parser then looks at the name words.  It recognises any
4682c4682
< as if it were a parse_name routine:  i.e., returning -1, 0 or the number of
---
> as if it were a parse_name routine:  i.e., returning 1, 0 or the number of
4820,4821c4820,4821
<           -1   the objects are declared "indistinguishable",
<           -2   they are declared different.
---
>           1   the objects are declared "indistinguishable",
>           2   they are declared different.
5362c5362
<        -1  if the text isn't understood,
---
>        1  if the text isn't understood,
5368,5372c5368,5372
< parsed_number.  On an unsuccessful match (returning -1) it doesn't matter
< what the final value of wn is.  On a successful match it should be left
< pointing to the next thing after what the routine understood.  Since
< NextWord moves wn on by one each time it is called, this happens
< automatically unless the routine has read too far.  For example: 
---
> parsed_number.  On an unsuccessful match (returning 1) it doesn't matter what
> the final value of wn is.  On a successful match it should be left pointing
> to the next thing after what the routine understood.  Since NextWord moves wn
> on by one each time it is called, this happens automatically unless the
> routine has read too far.  For example:
5386c5386
< of NextWord which returns -1 once the original word stream has run out.
---
> of NextWord which returns 1 once the original word stream has run out.
6255c6255
< (where 0<=n<=49) to be displayed at the end of this turn, provided it hasn't
---
> (where 0 n 49) to be displayed at the end of this turn, provided it hasn't
6495c6495
< -n switches it off.  The output streams are:  1 (the screen), 2 (the game
---
> n switches it off.  The output streams are:  1 (the screen), 2 (the game
6670c6670
< with the hexadecimal value $ffff (i.e., 65535) being the same as -1.  The
---
> with the hexadecimal value $ffff (i.e., 65535) being the same as 1.  The
6727c6727
<     »-1, which equals $ffff, which equals the library constant NULL;
---
>     »1, which equals $ffff, which equals the library constant NULL;
6804c6804
< nothing); and NULL, which equates to -1 or (in hexadecimal) equivalently to
---
> nothing); and NULL, which equates to 1 or (in hexadecimal) equivalently to
7123c7123
< giving the names of local variables for the routine (0<=n<=15).  The routine
---
> giving the names of local variables for the routine (0 n 15).  The routine
7204c7204
<            random(x)          uniformly random number between 1 and x>=1
---
>            random(x)          uniformly random number between 1 and x  1
7653c7653
<       -1  if the user's input isn't understood,
---
>       1  if the user's input isn't understood,
7659c7659
< parsed_number.On an unsuccessful match (returning -1) it doesn't matter what
---
> parsed_number.On an unsuccessful match (returning 1) it doesn't matter what
8773c8773
< all, -1 to make the parser resume its usual course (looking at the name), or
---
> all, 1 to make the parser resume its usual course (looking at the name), or
8784,8785c8784,8785
< parser_one and parser_two are indistinguishable.  Routine returns:  -1 if the
< objects are indistinguishable, -2 if not.
---
> parser_one and parser_two are indistinguishable.  Routine returns:  1 if the
> objects are indistinguishable, 2 if not.
8965c8965
< As NextWord, but returning -1 when the word stream has run out.
---
> As NextWord, but returning 1 when the word stream has run out.
9001c9001
< if r > 0 then r seconds pass every turn, if r < 0 then -r turns pass every
---
> if r > 0 then r seconds pass every turn, if r < 0 then r turns pass every
9025c9025
< and English ones from "one" to "twenty"), returning -1000 if it fails
---
> and English ones from "one" to "twenty"), returning 1000 if it fails

=================================

Modifications to specification 0.2:

298,299c298,299 < 2.2 These values are sometimes regarded as signed, in the range -32768 to < 32767. In effect -n is stored as 65536 - n and so the top bit is the sign

---
> 2.2 These values are sometimes regarded as signed, in the range 32768 to
>     32767.  In effect n is stored as 65536 n and so the top bit is the sign
325,328c325,328
<       integer in the range 1<=x<=n, for any value 1<=n<=32767.  Any method 
<       can be used for this (for instance, using the host computer's clock time
<       in milliseconds).  The uniformity of randomness should be optimised for
<       low values of n (say, up to 100 or so) and it is especially important to
---
>       integer in the range 1<x<n, for any value 1<n<32767.  Any method can be
>       used for this (for instance, using the host computer's clock time in
>       milliseconds).  The uniformity of randomness should be optimised for low
>       values of n (say, up to 100 or so) and it is especially important to
361c361
<       S >= 1000 then S is used as a seed in a standard seeded random-number
---
>       S 1000 then S is used as a seed in a standard seeded random-number
1256c1256
<         be assumed to be in the range -99 to 999 inclusive, and the turn number
---
>         be assumed to be in the range 99 to 999 inclusive, and the turn number
1487c1487
< 8.8.3 There are eight "windows", numbered 0 to 7.  The code -3 is used as a
---
> 8.8.3 There are eight "windows", numbered 0 to 7.  The code 3 is used as a
1659c1659
<     The original Infocom files seldom use erase_window, except with window -1
---
>     The original Infocom files seldom use erase_window, except with window 1
1709c1709
<     loudest of these).  The volume level -1 should be implemented as "loudest
---
>     loudest of these).  The volume level 1 should be implemented as "loudest
2739c2739
<                Decrement variable by 1. This is signed, so 0 decrements to -1.
---
>                Decrement variable by 1. This is signed, so 0 decrements to 1.
2826c2826
<                Increment variable by 1.  (This is signed, so -1 increments to
---
>                Increment variable by 1.  (This is signed, so 1 increments to
3041c3041
<                storing -1 into a 1-byte property results in the property value
---
>                storing 1 into a 1-byte property results in the property value
3371c3371
<                sorted.  If the number of entries is given as -n, then the
---
>                sorted.  If the number of entries is given as n, then the