Is there a comprehensive guide to rules syntax?

I can find examples in the forum on the syntax used in rules. Its helpful, but I’d rather find a guide which lays it all out? Does such a thing exist? In particular, I’d like to convert some of my if/else statements to switch statements. I’ve found several examples, and I have a working rule using a switch statement, but I have not been able to find an answer to these questions:

  1. Is there no ‘break’ for each case?
  2. Can there be a default case?

No, I am afraid there is no such guide, but there is an Xtend guide there:

http://www.eclipse.org/xtend/documentation/101_gettingstarted.html

1 Like
  1. Correct, there is no break. Each case is independent. There is no fall through from one case to the next so there is no need for a break.

  2. Yes. Just use the word “default” instead of "case

The direct link to where switch is discussed is here.

Ah, I see. I should spend more time looking at the Eclipse pages. I believe OH2 was based on the SmartHime project, is that correct?

Thanks for the reply.

“My Break-Dancing days are over, but there’s always the Funky Chicken” – The Full Monty

That is correct but for the Rules you are asking about all the documentation either resides in the Docs or are linked to from the docs. In this case, the link to the Xtend docs exists in the Rules page of the OH Docs.