[Top] [All Lists]

Re: Error in rfc3028? Only one elsif allowed per if?

2002-08-11 08:06:05

Marc Mutz <mutz(_at_)kde(_dot_)org> writes:


I just stumbled across this one:

3.1.     Control Structure If

   There are three pieces to if: "if", "elsif", and "else".  Each is
   actually a separate command in terms of the grammar.  However, an
   elsif MUST only follow an if, and an else MUST follow only either an
   if or an elsif.  An error occurs if these conditions are not met.

Error or intentional?

It says "an elsif", not "one elsif" -- having several elsif's per if
seems fine, as they "follow" the if in some sense.  "an elsif MUST
only directly follow an if or elsif" is more clear though, the word
"follow" is not strictly defined in the language, I think.