Bug#100505: algorithmic environment does not allow a line with only a comment
severity 100505 wishlist
thanks
This bug report is, at best, a wishlist bug. The package does
what it does -- if you read the rest of the manual (notably
Section 2.1), you'll find that it used to be possible to enter
``simple statements'' as free text terminated with a \\ command.
In order to implement line numbering, the author had to change the
way things work so that a \STATE command is necessary for simple
statements. Because you need a \STATE to write a statement, you
need a \STATE to create a comment on a line; you've discovered the
correct method of placing a comment on a line without any other
material.
Also, Section 2.9 points out that while the \COMMENT command can't
be used on the first line of a construct, those commands do allow
you to specify a comment in an optional argument, as in
\begin{algorithmic}[1]
\STATE $x = 0$ \COMMENT{Start from $0$}
\WHILE[only run ten times]{$x < 9$}
\STATE $x = x + 1$
\ENDWHILE
\end{algorithmic}
(You do need the braces, though.)
CMC
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
Behind the counter a boy with a shaven head stared vacantly into space,
a dozen spikes of microsoft protruding from the socket behind his ear.
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
C.M. Connelly c@eskimo.com SHC, DS
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
Reply to: