blockly else statement

Post Reply
nikos
Posts: 4
Joined: Wednesday 17 January 2018 17:02
Target OS: Raspberry Pi
Domoticz version:
Contact:

blockly else statement

Post by nikos » Wednesday 17 January 2018 17:15

Hi all,

I am new here, so pls excuse me if I am asking something already answered (I have not found an answer yet).
So my question is why is the "else' statement missing from the "if" options? Is it implemented by some other means??
Its presence would save us from an awful lot of repetitions.

misfit
Posts: 15
Joined: Wednesday 29 November 2017 12:03
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: blockly else statement

Post by misfit » Sunday 21 January 2018 11:06

You have that:
elseif.png
elseif.png (8.8 KiB) Viewed 217 times
If you want to run statement if none of the 'else if' branch evaluates to true, then just put an always true condition (with a user variable) in a last 'else if' branch.

nikos
Posts: 4
Joined: Wednesday 17 January 2018 17:02
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: blockly else statement

Post by nikos » Monday 22 January 2018 13:06

Thanks misfit, that's a good idea to get around the lack of the else statement. But why is it missing from the Domoticz blockly?

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests