25.08.23, 13:06 +0200, Robert Nowotny via dovecot:
I would say "elsif" itself is a typo - in most languages it is "elseif". in that case both versions should be valid keywords - the current (but unusual) "elsif" and the more common "elseif"
You are obviously entitled to your opinion, but what matters wrt to the language syntax is the language specification. And the relevant RFC specifies[1] the control if as if ... elsif ... else, regardless if one likes that or not. [1] https://www.rfc-editor.org/rfc/rfc5228.html#section-3.1
So, I concur with Horst that there's a typo in the error message that should be corrected. (trivial patch attached)
Am 25.08.2023 um 12:38 schrieb Horst Prote:
Hi,
in a sieve script I just made a syntax error and got this error message on calling sievec:
error: the else command must follow an if or elseif command.
My first thougth was "Are you kidding me!" as I used "elseif". But then I realized that the correct syntax is "elsif". So I think that error message should be corrected to
error: the else command must follow an if or elsif command.
-- Regards mks