[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Inconsistent syntax for DO



There are three descriptions of the syntax of DO in the report.  In section
4.2.4, the syntax is

	(do ((<variable> <init> <step>) ...)
	    (<test> <expression> ...)
	  <command> ...)

and the text makes it clear that (1) the <step>s are optional and (2) the
result of the form is unspecified if there are no <expression>s.

In sections 7.1.3 and 7.3, the syntax is

	(do ((<variable> <init> [<step>])*)
	    (<test> <sequence>)
	  <command>*)

(more or less) where <sequence> is defined as

	<command>* <expression>

The bug is that section 4.2.4 allows there to be no expressions after the test,
while the other two sections do not.  I don't particularly care which way it
gets resolved (though I slightly prefer the section 4.2.4 version), but this
inconsistency should get fixed in R5RS.

	Pavel