You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Makecode has block if else that generates code if .. else if .. else if .. else. This is useful block but it is full of troubles.
New else if section can be added only at the end of the block (before the last else). It is not possible to insert new else if section in the middle (+ button is missing at inner else if parts)
It is possible to delete any else if part (-) button of the complex statement but there is no way to add it back later (see point 1)
When else if parts are added (+) or deleted (-), false value is drooped to the "desk", these values cannot be selected and deleted. Well, man has to exit editor and then reopen project, then it is possible to select and delete those disconnected false blocks. And there could be many of them, it is not easy task to clean up the desk... It is possible that more then 1 false block is dropped for each else if section... This is a BUG in the editor.
This block is useful but I have stopped to use it because it is buggy (point 3) and difficult to use (point 1).
Hint, Try to use use this block to write event handler for DPAD messages, 16 "if else" sections has to be added to handle 2 states of 8 buttons. that is a long statement. It is not easy to change order of conditions in such statement or insert new condition to the middle of the block... Some details are here https://kitronik.co.uk/blogs/resources/adding-bluetooth-remote-control-move-mini
The text was updated successfully, but these errors were encountered:
Makecode has block
if else
that generates codeif .. else if .. else if .. else
. This is useful block but it is full of troubles.New
else if
section can be added only at the end of the block (before the lastelse
). It is not possible to insert newelse if
section in the middle (+
button is missing at innerelse if
parts)It is possible to delete any
else if
part (-
) button of the complex statement but there is no way to add it back later (see point 1)When
else if
parts are added (+
) or deleted (-
),false
value is drooped to the "desk", these values cannot be selected and deleted. Well, man has to exit editor and then reopen project, then it is possible to select and delete those disconnectedfalse
blocks. And there could be many of them, it is not easy task to clean up the desk... It is possible that more then 1false
block is dropped for eachelse if
section... This is a BUG in the editor.This block is useful but I have stopped to use it because it is buggy (point 3) and difficult to use (point 1).
Hint, Try to use use this block to write event handler for DPAD messages, 16 "if else" sections has to be added to handle 2 states of 8 buttons. that is a long statement. It is not easy to change order of conditions in such statement or insert new condition to the middle of the block... Some details are here https://kitronik.co.uk/blogs/resources/adding-bluetooth-remote-control-move-mini
The text was updated successfully, but these errors were encountered: